bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Gnulib setenv on Mac OS X bug?


From: Richard W.M. Jones
Subject: Gnulib setenv on Mac OS X bug?
Date: Sun, 21 Mar 2010 20:13:17 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

There seems to be a bug in Gnulib's setenv module on Mac OS X.  At
configure time it says:

checking whether setenv validates arguments ... no

(The test program it is running is:

| int
| main ()
| {
| 
|        if (setenv ("", "", 0) != -1) return 1;
|        if (errno != EINVAL) return 2;
|        if (setenv ("a", "=", 1) != 0) return 3;
|        if (strcmp (getenv ("a"), "=") != 0) return 4;
| 
|   ;
|   return 0;
| }

and this returns status code 4)

As a result, in stdlib.h, this:

#if @GNULIB_SETENV@
# if @REPLACE_SETENV@
#  undef setenv
#  define setenv rpl_setenv

is replaced by:

#if 1
# if 1
#  undef setenv
#  define setenv rpl_setenv

However, no rpl_setenv function is getting generated in libgnu.a, so
of course the program fails to link.

Any ideas?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw




reply via email to

[Prev in Thread] Current Thread [Next in Thread]