[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gnulib setenv on Mac OS X bug?
From: |
Bruno Haible |
Subject: |
Re: Gnulib setenv on Mac OS X bug? |
Date: |
Sun, 21 Mar 2010 23:24:38 +0100 |
User-agent: |
KMail/1.9.9 |
Richard W.M. Jones wrote:
> (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;
> | }
This is lacking a #include <string.h>. I'm updating the test:
2010-03-21 Bruno Haible <address@hidden>
setenv: Tweaks.
* m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Include necessary headers in
the test program.
* doc/posix-functions/setenv.texi: Update platforms list.
--- m4/setenv.m4.orig Sun Mar 21 23:18:41 2010
+++ m4/setenv.m4 Sun Mar 21 23:10:35 2010
@@ -1,4 +1,4 @@
-# setenv.m4 serial 15
+# setenv.m4 serial 16
dnl Copyright (C) 2001-2004, 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -25,6 +25,7 @@
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
#include <stdlib.h>
#include <errno.h>
+ #include <string.h>
]], [[
if (setenv ("", "", 0) != -1) return 1;
if (errno != EINVAL) return 2;
--- doc/posix-functions/setenv.texi.orig Sun Mar 21 23:18:41 2010
+++ doc/posix-functions/setenv.texi Sun Mar 21 23:09:09 2010
@@ -14,7 +14,7 @@
@item
On some platforms, this function does not fail with @samp{EINVAL} when
passed an empty string or a string containing @samp{=}:
-FreeBSD 6.0, NetBSD 1.6, OpenBSD 3.8, Cygwin 1.5.x.
+MacOS X 10.5, FreeBSD 6.0, NetBSD 1.6, OpenBSD 3.8, Cygwin 1.5.x.
@item
On some platforms, this function removes a leading @samp{=} from the
value argument:
Re: Gnulib setenv on Mac OS X bug?,
Bruno Haible <=