From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carlo Wood To: bje@cygnus.com (Ben Elliston) Cc: bothner@cygnus.com, hjl@gnu.org, carlo@runaway.xs4all.nl, gas2@cygnus.com, bfd@cygnus.com, dkl@redhat.com Subject: Re: [cygnus.gas2] binutils bug: config.guess Date: Mon, 05 Apr 1999 08:17:00 -0000 Message-id: <199904051358.PAA02063@jolan.ppro> References: X-SW-Source: 1999/msg00067.html | > Or just do: | > (cd /; ld) | > Remember: (CMD) runs CMD in a sub-shell. | | Silly me. Thanks, | | Ben I'd suggest to do that where you detect the path to ld: ld_exec=`(cd /; which ld)` After all, the problem is in `which', not in the normal shell search. [ proof: ~/tmp>ls -ld ld drwxr-xr-x 2 carlo users 1024 Apr 5 15:55 ld/ ~/tmp>ld -V GNU ld version 2.9.1 (with BFD 2.9.1.0.15) Supported emulations: elf_i386 i386linux ] I already mailed to Ben, I intend to rewrite `which' so it behaves the same as the shell search (ie, will skip directories). I suppose that if (!access(test, X_OK) && !stat(test, &m)) found = S_ISREG(m.st_mode); will do? [ Now it just does the access(test, X_OK) ]. I suppose the main problem will be to get everyone to upgrade their `which' ;). -- Carlo Wood PS dkl@redhat.com : reference, bug #1998