According to Ralf Wildenhues on 2/18/2010 1:57 PM: >> Thanks for the offer, Ralf, but I feel pretty strongly >> that adding $EXEEXT as a suffix to every invocation would >> constitute "too much" pollution, and for what? To enable >> mingw-like systems to run tests using a portable shell. > > IIUC then it's not for MinGW. It's only for cross setups where you have > an emulator but the host system doesn't emulate $EXEEXT-interpolation > for you. Right? (On MinGW, .exe is appended implicitly in all > interesting situations.)
Yes, I agree - this is mainly for wine (about the only system out there where there is an emulator, but the emulator does not do implicit $EXEEXT handling). But wine runs on Linux, where we can be reasonably assured of having a better-than-POSIX shell, and thus rely on POSIX extensions like '-' in function names, as part of the workaround specific to wine. The workaround isn't needed on cygwin or mingw, but doesn't hurt, and those platforms also come with a guarantee of bash. The only other platform that init.sh is worried about is lack of $() in the default /bin/sh of Solaris; there, the workaround does NOT have to find bash; it is merely enough to find ksh (aka /usr/xpg4/bin/sh), so that the rest of any script that included init.sh can assume the common base of POSIX features. -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net
signature.asc
Description: OpenPGP digital signature