[svn] GnuPG - r4817 - trunk
David Shaw
dshaw at jabberwocky.com
Wed Aug 27 20:03:50 CEST 2008
On Wed, Aug 27, 2008 at 09:26:47AM -0700, Chuck Swiger wrote:
> Howdy--
>
> On Aug 27, 2008, at 6:55 AM, Werner Koch wrote:
>> On Wed, 27 Aug 2008 07:58, cvs at cvs.gnupg.org said:
>>> * configure.ac: Darwin's /bin/sh has a builtin echo that doesn't
>>> understand '-n'. Use tr to trim the carriage return instead.
>>
>> David, it seems that you are using Darwin as the development platform.
>> Although GnuPG should be buildable on any POSIX alike system, I doubt
>> that we should start to fix all the small glitches that Apple
>> introduced
>> in their OS again.
>
> Glitches in Bash? After all, Darwin is using Bash as /bin/sh;
> specifically 2.05b.0(1)-release for Darwin 8 (corresponding with OS X
> 10.4) or 3.2.17(1)-release for Darwin 9 aka 10.5...
It's not a glich. POSIX doesn't require echo to support -n. It's
very commonly supported, but not required. Darwin (well, OSX) is
POSIX compliant, and chooses to not support -n.
The gotcha is that configure (from autoconf) runs via /bin/sh, and
thus:
cat > echotest.sh
echo -n foo
echo bar
^D
$ sh echotest.sh
-n foo
bar
$ bash echotest.sh
foobar
Optional, but legal behavior.
David
More information about the Gnupg-devel
mailing list