Mail Archives: djgpp-workers/2001/11/22/04:31:07
On 21 Nov 2001 at 20:04, Eli Zaretskii wrote:
> > From: pavenis AT lanet DOT lv
> > Date: Wed, 21 Nov 2001 16:00:20 +0200
> >
> > When I'm invoking gcc through system() call for example:
> > system ("gcc -v -c -foo.c");
> >
> > gcc gets "C:\DJGPP\BIN/gcc.exe" as argv[0]. It happens when gcc is
> > searched on DOS path. Is this done so intentionally?
>
> We don't modify PATH, so you get the backslashes. The forward slash
> before gcc.exe is just out of habit, I guess.
>
> What part gives you trouble here? Is it the backslashes or the
> forward slash? Or maybe it's the fact that both backslashes and the
> forward slash are present?
>
> > Or backslashes should be converted to '/' and name to lowercase.
>
> We could convert the backslashes, but some programs (not DJGPP
> programs) might not like that.
>
> Would it help to use a backslash to append "\gcc.exe" to the
> directory from PATH? That would be a safer change, I think.
The problem was that it caused relative prefix detection to errorously
use it (not harmfull through). I added small piece of code in gcc/gcc.c
to convert DIR_SEPARATOR_2 to DIR_SEPARATOR when first
is defined in latest update of DJGPP port of gcc-3.0.2
Verified that it fixed this small (and mostly cosmetical) problem.
Andris
- Raw text -