www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 615] New: dmd does not properly read dmd.conf with Unix line-ending characters

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=615

           Summary: dmd does not properly read dmd.conf with Unix line-
                    ending characters
           Product: D
           Version: 0.175
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: rael zopyra.com


Using dmd.conf edited on linux, dmd does not appear to grok it.  If I copy a
dmd.conf edited on Windows, it parses it properly.  The two files differ in
line endings only.  If I had to guess, it is an error in inifile.c, in the
method inifile(), somewhere around line 272 or below.

To reproduce, I compiled a simple program as follows:

% dmd hello.d

using the linux-edited dmd.conf file:
[Environment]

DFLAGS=-I/opt/dmd/src/phobos

And this failed.  Using an explicit command-line argument:

% dmd -I/opt/dmd/src/phobos hello.d

works.  If I use the Windows-edited dmd.conf file, it works either way.


-- 
Nov 27 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=615


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME





I cannot reproduce this.


-- 
Nov 30 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=615






I discovered the issue after using strace under linux to track files opened
during execution of the dmd compiler.  It turns out that I had copied the
original dmd.conf file to my home directory somewhere along the way and dmd was
using that instead of the one in /etc.

I don't know if it would be worth it, but perhaps it might be useful to have
the '-v' option to dmd cause dmd to emit information about the configuration
file it thinks it is reading.


-- 
Dec 04 2006