Mail Archives: djgpp/2001/06/08/11:41:03
> From: Waldemar Schultz <schultz AT ma DOT tum DOT de>
> Newsgroups: comp.os.msdos.djgpp
> Date: Fri, 08 Jun 2001 14:25:20 +0200
>
>
> Thanks to all.
> I found the reason for the trouble,
> no idea why this caused the trouble though:
>
> There existed a zero-length file named "gcc" with no extension
> in my current directory.
> I removed it and everything is O.K. again. anyone an explanation ?
This is expected. The explanation begins with the fact that DOS
always looks in the current directory before examining the PATH, and
the ported Make (and library functions like `system') follow suit. So
Make finds that zero-length gcc before it had a chance to look in the
right place.
Then Make calls `spawnvpe' in the library to run the command.
`spawnvpe' looks at `gcc', sees that it is not a .exe executable and
not a Unixy shell script, and falls back on invoking it via
COMMAND.COM. The rest, as they say, is history...
(It's a bit ironic that COMMAND.COM almost saves the day, when it
finds out that `gcc' is not something it can run, looks along the
PATH, and finds gcc.exe. But it's too late: the command line is
already truncated.)
- Raw text -