delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/08/11:41:03

Date: Fri, 08 Jun 2001 18:34:43 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Waldemar Schultz <schultz AT ma DOT tum DOT de>
Message-Id: <9628-Fri08Jun2001183442+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp AT delorie DOT com
In-reply-to: <3B20C430.3BD7F628@ma.tum.de> (message from Waldemar Schultz on
Fri, 08 Jun 2001 14:25:20 +0200)
Subject: Re: long line with make & gcc
References: <3B20A3C4 DOT 5F245A4A AT ma DOT tum DOT de> <9fqd84$n49$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <3B20C430 DOT 3BD7F628 AT ma DOT tum DOT de>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019