Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi Christian,

On 07/18/11 04:56, Christian Lohmaier wrote:

Hi MIke, *,

On Fri, Jul 15, 2011 at 9:34 PM, Mike Eberdt<libreme@comcast.net>  wrote:

Configure.in eventually gets parsed by /bin/sh, and on Free/Net/OpenBSD
/bin/sh is not synonymous with bash.  Therefore, bash-isms in configure.in
can be problematic.

Oops, I mistyped; I meant to say that it is 'configure' (not 'configure.in') that's getting parsed by /bin/sh.

I don't understand your patch then.
-if test "$EUID" -eq "0"  -a "z`uname -o 2>/dev/null`" = "zCygwin" ; then
+# $EUID is a bash-ism, so we can't assume its existence.
[...]
+if test "z`uname -o 2>/dev/null`" = "zCygwin"&&  test "$EUID" -eq 0; then

So while you converted test "and" link to&&, the $EUID that according
to your comment is a bashism still is used. So how does this solve
anything?

While /bin/sh on FreeBSD always evaluates both X and Y in "if test X -a Y", it does correctly skip Y when X is false in "if X && Y". So as long as the OS check is first, we don't evaluate $EUID except on Cygwin.

However, the form that Michael Meeks checked in is much better, since it avoids the subtlety in the ordering of the 2 tests, while still using "test -a" like in the rest of the file.


(Besides that, configure is created with shebang of /bin/bash here)

Hmm. For me, 'configure' begins with #!/bin/sh on Linux as well as on FreeBSD.

ME

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.