[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] setenv: restore to working order
From: |
Jim Meyering |
Subject: |
[PATCH] setenv: restore to working order |
Date: |
Sun, 19 Dec 2010 22:49:05 +0100 |
In preparation for coreutils-8.8, I tried to update gnulib to the latest
to get Paul's recent Solaris 8 vs. ACL fix.
However, the OSF-vs-unsetenv portability fixes caused trouble:
building coreutils configured with --enable-gcc-warnings,
I saw this new failure:
cc1: warnings being treated as errors
setenv.c:359:1: error: no previous declaration for 'rpl_setenv' \
[-Wmissing-declarations]
I've just pushed this to fix it:
>From f5555e473be0147419ac6bdfc901ec2284802086 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 19 Dec 2010 22:48:27 +0100
Subject: [PATCH] setenv: restore to working order
$HAVE_SETENV is used in gl_FUNC_SETENV, yet its definitions were
mistakenly removed.
* m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Restore code to set
HAVE_SETENV.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Restore code to initialize
HAVE_SETENV.
---
ChangeLog | 10 ++++++++++
m4/setenv.m4 | 4 +++-
m4/stdlib_h.m4 | 1 +
3 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ab8f234..357f06f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-12-19 Jim Meyering <address@hidden>
+
+ setenv: restore to working order
+ $HAVE_SETENV is used in gl_FUNC_SETENV, yet its definitions were
+ mistakenly removed.
+ * m4/setenv.m4 (gl_FUNC_SETENV_SEPARATE): Restore code to set
+ HAVE_SETENV.
+ * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Restore code to initialize
+ HAVE_SETENV.
+
2010-12-19 Bruno Haible <address@hidden>
Document some different function declarations on OSF/1 5.1.
diff --git a/m4/setenv.m4 b/m4/setenv.m4
index ccbe267..7070a5d 100644
--- a/m4/setenv.m4
+++ b/m4/setenv.m4
@@ -21,7 +21,9 @@ AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
HAVE_DECL_SETENV=0
fi
AC_CHECK_FUNCS_ONCE([setenv])
- if test $ac_cv_func_setenv = yes; then
+ if test $ac_cv_func_setenv = no; then
+ HAVE_SETENV=0
+ else
AC_CACHE_CHECK([whether setenv validates arguments],
[gl_cv_func_setenv_works],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
index e5a74cc..9ec3e00 100644
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -92,6 +92,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
+ HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV])
HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL])
--
1.7.3.rc2.221.gbf93f
- [PATCH] setenv: restore to working order,
Jim Meyering <=