[Issue 278] New: dmd.conf search path dosn't work
Walter Bright
newshound at digitalmars.com
Fri Aug 4 13:14:25 PDT 2006
Sean Kelly wrote:
> I do all my switching in /etc/dmd.conf and recently had some weird
> problems when I tried using Build on Linux. It turned out that I had an
> old dmd.conf file in /dmd/bin as well, and removing this fixed things.
> So I think the checking of /bin/dmd/dmd.conf may not work correctly. I
> have /dmd/bin in my path, could it be that the argv[0] doesn't contain a
> fully qualified path name and so the function ends up looking in the
> current directory twice?
Easy enough to check, compile/run this program on your system:
> #include <stdio.h>
> #include <assert.h>
> #include <stdlib.h>
>
> int main(argc,argv)
> int argc;
> char *argv[];
> { int i;
>
> printf("%d arguments\n",argc);
> for (i = 0; i < argc; i++)
> printf("arg[%d] = '%s'\n",i,argv[i]);
> assert(argv[argc] == NULL);
> return EXIT_SUCCESS;
> }
More information about the Digitalmars-d-bugs
mailing list