diff options
| author | Paul Eggert | 2017-03-12 00:02:52 -0800 |
|---|---|---|
| committer | Paul Eggert | 2017-03-12 00:03:38 -0800 |
| commit | 026c2cbf354fab138a65ad7093f17fbb23edb23c (patch) | |
| tree | ac7c2c3989f020a81aeab2e4a45a6a1a30d1300b | |
| parent | cbd4708db21b633c64066dd6288d33d4ff6b4a5f (diff) | |
| download | emacs-026c2cbf354fab138a65ad7093f17fbb23edb23c.tar.gz emacs-026c2cbf354fab138a65ad7093f17fbb23edb23c.zip | |
Remove some stray gnulib files
* admin/merge-gnulib: rm m4/gnulib-tool.m4 too.
(GNULIB_MODULES): Remove unsetenv, as it is not needed and
the --avoid=unsetenv option avoided most of it anyway.
* lib/unsetenv.c, m4/gnulib-tool.m4, m4/setenv.m4: Remove.
* lib/gnulib.mk: Regenerate.
| -rwxr-xr-x | admin/merge-gnulib | 5 | ||||
| -rw-r--r-- | lib/gnulib.mk | 2 | ||||
| -rw-r--r-- | lib/unsetenv.c | 128 | ||||
| -rw-r--r-- | m4/gnulib-tool.m4 | 57 | ||||
| -rw-r--r-- | m4/setenv.m4 | 160 |
5 files changed, 4 insertions, 348 deletions
diff --git a/admin/merge-gnulib b/admin/merge-gnulib index 7e7971fe881..76918f3d34f 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib | |||
| @@ -40,7 +40,7 @@ GNULIB_MODULES=' | |||
| 40 | sig2str socklen stat-time std-gnu11 stdalign stddef stdio | 40 | sig2str socklen stat-time std-gnu11 stdalign stddef stdio |
| 41 | stpcpy strftime strtoimax strtoumax symlink sys_stat | 41 | stpcpy strftime strtoimax strtoumax symlink sys_stat |
| 42 | sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub | 42 | sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub |
| 43 | unsetenv update-copyright utimens | 43 | update-copyright utimens |
| 44 | vla warnings | 44 | vla warnings |
| 45 | ' | 45 | ' |
| 46 | 46 | ||
| @@ -97,7 +97,8 @@ test -x "$gnulib_srcdir"/gnulib-tool || { | |||
| 97 | "$gnulib_srcdir"/gnulib-tool --dir="$src" $GNULIB_TOOL_FLAGS $GNULIB_MODULES && | 97 | "$gnulib_srcdir"/gnulib-tool --dir="$src" $GNULIB_TOOL_FLAGS $GNULIB_MODULES && |
| 98 | rm -- "$src"lib/gl_openssl.h "$src"m4/fcntl-o.m4 \ | 98 | rm -- "$src"lib/gl_openssl.h "$src"m4/fcntl-o.m4 \ |
| 99 | "$src"m4/gl-openssl.m4 \ | 99 | "$src"m4/gl-openssl.m4 \ |
| 100 | "$src"m4/gnulib-cache.m4 "$src"m4/warn-on-use.m4 "$src"m4/wint_t.m4 && | 100 | "$src"m4/gnulib-cache.m4 "$src"m4/gnulib-tool.m4 \ |
| 101 | "$src"m4/warn-on-use.m4 "$src"m4/wint_t.m4 && | ||
| 101 | cp -- "$gnulib_srcdir"/build-aux/texinfo.tex "$src"doc/misc && | 102 | cp -- "$gnulib_srcdir"/build-aux/texinfo.tex "$src"doc/misc && |
| 102 | cp -- "$gnulib_srcdir"/build-aux/move-if-change "$src"build-aux && | 103 | cp -- "$gnulib_srcdir"/build-aux/move-if-change "$src"build-aux && |
| 103 | { test -z "$src" || cd "$src"; } && | 104 | { test -z "$src" || cd "$src"; } && |
diff --git a/lib/gnulib.mk b/lib/gnulib.mk index e4aa90ecac9..7a0de1b440d 100644 --- a/lib/gnulib.mk +++ b/lib/gnulib.mk | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | # the same distribution terms as the rest of that program. | 21 | # the same distribution terms as the rest of that program. |
| 22 | # | 22 | # |
| 23 | # Generated by gnulib-tool. | 23 | # Generated by gnulib-tool. |
| 24 | # Reproduce by: gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=setenv --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --avoid=unsetenv --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-leading-zeros count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode filevercmp flexmember fstatat fsync getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog ignore-value intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat sig2str socklen stat-time std-gnu11 stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub unsetenv update-copyright utimens vla warnings | 24 | # Reproduce by: gnulib-tool --import --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=setenv --avoid=sigprocmask --avoid=stdarg --avoid=stdbool --avoid=threadlib --avoid=unsetenv --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt binary-io byteswap c-ctype c-strcase careadlinkat close-stream count-leading-zeros count-one-bits count-trailing-zeros crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode filevercmp flexmember fstatat fsync getloadavg getopt-gnu gettime gettimeofday gitlog-to-changelog ignore-value intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qcopy-acl readlink readlinkat sig2str socklen stat-time std-gnu11 stdalign stddef stdio stpcpy strftime strtoimax strtoumax symlink sys_stat sys_time time time_r time_rz timegm timer-time timespec-add timespec-sub update-copyright utimens vla warnings |
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | MOSTLYCLEANFILES += core *.stackdump | 27 | MOSTLYCLEANFILES += core *.stackdump |
diff --git a/lib/unsetenv.c b/lib/unsetenv.c deleted file mode 100644 index 6d742c15964..00000000000 --- a/lib/unsetenv.c +++ /dev/null | |||
| @@ -1,128 +0,0 @@ | |||
| 1 | /* Copyright (C) 1992, 1995-2002, 2005-2017 Free Software Foundation, | ||
| 2 | Inc. | ||
| 3 | This file is part of the GNU C Library. | ||
| 4 | |||
| 5 | This program is free software: you can redistribute it and/or modify | ||
| 6 | it under the terms of the GNU General Public License as published by | ||
| 7 | the Free Software Foundation; either version 3 of the License, or | ||
| 8 | (at your option) any later version. | ||
| 9 | |||
| 10 | This program is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | GNU General Public License for more details. | ||
| 14 | |||
| 15 | You should have received a copy of the GNU General Public License | ||
| 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | ||
| 17 | |||
| 18 | /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc | ||
| 19 | optimizes away the name == NULL test below. */ | ||
| 20 | #define _GL_ARG_NONNULL(params) | ||
| 21 | |||
| 22 | #include <config.h> | ||
| 23 | |||
| 24 | /* Specification. */ | ||
| 25 | #include <stdlib.h> | ||
| 26 | |||
| 27 | #include <errno.h> | ||
| 28 | #if !_LIBC | ||
| 29 | # define __set_errno(ev) ((errno) = (ev)) | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #include <string.h> | ||
| 33 | #include <unistd.h> | ||
| 34 | |||
| 35 | #if !_LIBC | ||
| 36 | # define __environ environ | ||
| 37 | #endif | ||
| 38 | |||
| 39 | #if _LIBC | ||
| 40 | /* This lock protects against simultaneous modifications of 'environ'. */ | ||
| 41 | # include <bits/libc-lock.h> | ||
| 42 | __libc_lock_define_initialized (static, envlock) | ||
| 43 | # define LOCK __libc_lock_lock (envlock) | ||
| 44 | # define UNLOCK __libc_lock_unlock (envlock) | ||
| 45 | #else | ||
| 46 | # define LOCK | ||
| 47 | # define UNLOCK | ||
| 48 | #endif | ||
| 49 | |||
| 50 | /* In the GNU C library we must keep the namespace clean. */ | ||
| 51 | #ifdef _LIBC | ||
| 52 | # define unsetenv __unsetenv | ||
| 53 | #endif | ||
| 54 | |||
| 55 | #if _LIBC || !HAVE_UNSETENV | ||
| 56 | |||
| 57 | int | ||
| 58 | unsetenv (const char *name) | ||
| 59 | { | ||
| 60 | size_t len; | ||
| 61 | char **ep; | ||
| 62 | |||
| 63 | if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) | ||
| 64 | { | ||
| 65 | __set_errno (EINVAL); | ||
| 66 | return -1; | ||
| 67 | } | ||
| 68 | |||
| 69 | len = strlen (name); | ||
| 70 | |||
| 71 | LOCK; | ||
| 72 | |||
| 73 | ep = __environ; | ||
| 74 | while (*ep != NULL) | ||
| 75 | if (!strncmp (*ep, name, len) && (*ep)[len] == '=') | ||
| 76 | { | ||
| 77 | /* Found it. Remove this pointer by moving later ones back. */ | ||
| 78 | char **dp = ep; | ||
| 79 | |||
| 80 | do | ||
| 81 | dp[0] = dp[1]; | ||
| 82 | while (*dp++); | ||
| 83 | /* Continue the loop in case NAME appears again. */ | ||
| 84 | } | ||
| 85 | else | ||
| 86 | ++ep; | ||
| 87 | |||
| 88 | UNLOCK; | ||
| 89 | |||
| 90 | return 0; | ||
| 91 | } | ||
| 92 | |||
| 93 | #ifdef _LIBC | ||
| 94 | # undef unsetenv | ||
| 95 | weak_alias (__unsetenv, unsetenv) | ||
| 96 | #endif | ||
| 97 | |||
| 98 | #else /* HAVE_UNSETENV */ | ||
| 99 | |||
| 100 | # undef unsetenv | ||
| 101 | # if !HAVE_DECL_UNSETENV | ||
| 102 | # if VOID_UNSETENV | ||
| 103 | extern void unsetenv (const char *); | ||
| 104 | # else | ||
| 105 | extern int unsetenv (const char *); | ||
| 106 | # endif | ||
| 107 | # endif | ||
| 108 | |||
| 109 | /* Call the underlying unsetenv, in case there is hidden bookkeeping | ||
| 110 | that needs updating beyond just modifying environ. */ | ||
| 111 | int | ||
| 112 | rpl_unsetenv (const char *name) | ||
| 113 | { | ||
| 114 | int result = 0; | ||
| 115 | if (!name || !*name || strchr (name, '=')) | ||
| 116 | { | ||
| 117 | errno = EINVAL; | ||
| 118 | return -1; | ||
| 119 | } | ||
| 120 | while (getenv (name)) | ||
| 121 | # if !VOID_UNSETENV | ||
| 122 | result = | ||
| 123 | # endif | ||
| 124 | unsetenv (name); | ||
| 125 | return result; | ||
| 126 | } | ||
| 127 | |||
| 128 | #endif /* HAVE_UNSETENV */ | ||
diff --git a/m4/gnulib-tool.m4 b/m4/gnulib-tool.m4 deleted file mode 100644 index 2e2d8f6dcdd..00000000000 --- a/m4/gnulib-tool.m4 +++ /dev/null | |||
| @@ -1,57 +0,0 @@ | |||
| 1 | # gnulib-tool.m4 serial 2 | ||
| 2 | dnl Copyright (C) 2004-2005, 2009-2017 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | dnl The following macros need not be invoked explicitly. | ||
| 8 | dnl Invoking them does nothing except to declare default arguments | ||
| 9 | dnl for "gnulib-tool --import". | ||
| 10 | |||
| 11 | dnl Usage: gl_LOCAL_DIR([DIR]) | ||
| 12 | AC_DEFUN([gl_LOCAL_DIR], []) | ||
| 13 | |||
| 14 | dnl Usage: gl_MODULES([module1 module2 ...]) | ||
| 15 | AC_DEFUN([gl_MODULES], []) | ||
| 16 | |||
| 17 | dnl Usage: gl_AVOID([module1 module2 ...]) | ||
| 18 | AC_DEFUN([gl_AVOID], []) | ||
| 19 | |||
| 20 | dnl Usage: gl_SOURCE_BASE([DIR]) | ||
| 21 | AC_DEFUN([gl_SOURCE_BASE], []) | ||
| 22 | |||
| 23 | dnl Usage: gl_M4_BASE([DIR]) | ||
| 24 | AC_DEFUN([gl_M4_BASE], []) | ||
| 25 | |||
| 26 | dnl Usage: gl_PO_BASE([DIR]) | ||
| 27 | AC_DEFUN([gl_PO_BASE], []) | ||
| 28 | |||
| 29 | dnl Usage: gl_DOC_BASE([DIR]) | ||
| 30 | AC_DEFUN([gl_DOC_BASE], []) | ||
| 31 | |||
| 32 | dnl Usage: gl_TESTS_BASE([DIR]) | ||
| 33 | AC_DEFUN([gl_TESTS_BASE], []) | ||
| 34 | |||
| 35 | dnl Usage: gl_WITH_TESTS | ||
| 36 | AC_DEFUN([gl_WITH_TESTS], []) | ||
| 37 | |||
| 38 | dnl Usage: gl_LIB([LIBNAME]) | ||
| 39 | AC_DEFUN([gl_LIB], []) | ||
| 40 | |||
| 41 | dnl Usage: gl_LGPL or gl_LGPL([VERSION]) | ||
| 42 | AC_DEFUN([gl_LGPL], []) | ||
| 43 | |||
| 44 | dnl Usage: gl_MAKEFILE_NAME([FILENAME]) | ||
| 45 | AC_DEFUN([gl_MAKEFILE_NAME], []) | ||
| 46 | |||
| 47 | dnl Usage: gl_LIBTOOL | ||
| 48 | AC_DEFUN([gl_LIBTOOL], []) | ||
| 49 | |||
| 50 | dnl Usage: gl_MACRO_PREFIX([PREFIX]) | ||
| 51 | AC_DEFUN([gl_MACRO_PREFIX], []) | ||
| 52 | |||
| 53 | dnl Usage: gl_PO_DOMAIN([DOMAIN]) | ||
| 54 | AC_DEFUN([gl_PO_DOMAIN], []) | ||
| 55 | |||
| 56 | dnl Usage: gl_VC_FILES([BOOLEAN]) | ||
| 57 | AC_DEFUN([gl_VC_FILES], []) | ||
diff --git a/m4/setenv.m4 b/m4/setenv.m4 deleted file mode 100644 index 005aa8cfeda..00000000000 --- a/m4/setenv.m4 +++ /dev/null | |||
| @@ -1,160 +0,0 @@ | |||
| 1 | # setenv.m4 serial 26 | ||
| 2 | dnl Copyright (C) 2001-2004, 2006-2017 Free Software Foundation, Inc. | ||
| 3 | dnl This file is free software; the Free Software Foundation | ||
| 4 | dnl gives unlimited permission to copy and/or distribute it, | ||
| 5 | dnl with or without modifications, as long as this notice is preserved. | ||
| 6 | |||
| 7 | AC_DEFUN([gl_FUNC_SETENV], | ||
| 8 | [ | ||
| 9 | AC_REQUIRE([gl_FUNC_SETENV_SEPARATE]) | ||
| 10 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles | ||
| 11 | if test $ac_cv_func_setenv = no; then | ||
| 12 | HAVE_SETENV=0 | ||
| 13 | else | ||
| 14 | AC_CACHE_CHECK([whether setenv validates arguments], | ||
| 15 | [gl_cv_func_setenv_works], | ||
| 16 | [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ | ||
| 17 | #include <stdlib.h> | ||
| 18 | #include <errno.h> | ||
| 19 | #include <string.h> | ||
| 20 | ]], [[ | ||
| 21 | int result = 0; | ||
| 22 | { | ||
| 23 | if (setenv ("", "", 0) != -1) | ||
| 24 | result |= 1; | ||
| 25 | else if (errno != EINVAL) | ||
| 26 | result |= 2; | ||
| 27 | } | ||
| 28 | { | ||
| 29 | if (setenv ("a", "=", 1) != 0) | ||
| 30 | result |= 4; | ||
| 31 | else if (strcmp (getenv ("a"), "=") != 0) | ||
| 32 | result |= 8; | ||
| 33 | } | ||
| 34 | return result; | ||
| 35 | ]])], | ||
| 36 | [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no], | ||
| 37 | [case "$host_os" in | ||
| 38 | # Guess yes on glibc systems. | ||
| 39 | *-gnu*) gl_cv_func_setenv_works="guessing yes" ;; | ||
| 40 | # If we don't know, assume the worst. | ||
| 41 | *) gl_cv_func_setenv_works="guessing no" ;; | ||
| 42 | esac | ||
| 43 | ])]) | ||
| 44 | case "$gl_cv_func_setenv_works" in | ||
| 45 | *yes) ;; | ||
| 46 | *) | ||
| 47 | REPLACE_SETENV=1 | ||
| 48 | ;; | ||
| 49 | esac | ||
| 50 | fi | ||
| 51 | ]) | ||
| 52 | |||
| 53 | # Like gl_FUNC_SETENV, except prepare for separate compilation | ||
| 54 | # (no REPLACE_SETENV, no AC_LIBOBJ). | ||
| 55 | AC_DEFUN([gl_FUNC_SETENV_SEPARATE], | ||
| 56 | [ | ||
| 57 | AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) | ||
| 58 | AC_CHECK_DECLS_ONCE([setenv]) | ||
| 59 | if test $ac_cv_have_decl_setenv = no; then | ||
| 60 | HAVE_DECL_SETENV=0 | ||
| 61 | fi | ||
| 62 | AC_CHECK_FUNCS_ONCE([setenv]) | ||
| 63 | gl_PREREQ_SETENV | ||
| 64 | ]) | ||
| 65 | |||
| 66 | AC_DEFUN([gl_FUNC_UNSETENV], | ||
| 67 | [ | ||
| 68 | AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) | ||
| 69 | AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles | ||
| 70 | AC_CHECK_DECLS_ONCE([unsetenv]) | ||
| 71 | if test $ac_cv_have_decl_unsetenv = no; then | ||
| 72 | HAVE_DECL_UNSETENV=0 | ||
| 73 | fi | ||
| 74 | AC_CHECK_FUNCS([unsetenv]) | ||
| 75 | if test $ac_cv_func_unsetenv = no; then | ||
| 76 | HAVE_UNSETENV=0 | ||
| 77 | else | ||
| 78 | HAVE_UNSETENV=1 | ||
| 79 | dnl Some BSDs return void, failing to do error checking. | ||
| 80 | AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret], | ||
| 81 | [AC_COMPILE_IFELSE( | ||
| 82 | [AC_LANG_PROGRAM( | ||
| 83 | [[ | ||
| 84 | #undef _BSD | ||
| 85 | #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */ | ||
| 86 | #include <stdlib.h> | ||
| 87 | extern | ||
| 88 | #ifdef __cplusplus | ||
| 89 | "C" | ||
| 90 | #endif | ||
| 91 | int unsetenv (const char *name); | ||
| 92 | ]], | ||
| 93 | [[]])], | ||
| 94 | [gt_cv_func_unsetenv_ret='int'], | ||
| 95 | [gt_cv_func_unsetenv_ret='void'])]) | ||
| 96 | if test $gt_cv_func_unsetenv_ret = 'void'; then | ||
| 97 | AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void | ||
| 98 | instead of int.]) | ||
| 99 | REPLACE_UNSETENV=1 | ||
| 100 | fi | ||
| 101 | |||
| 102 | dnl Solaris 10 unsetenv does not remove all copies of a name. | ||
| 103 | dnl Haiku alpha 2 unsetenv gets confused by assignment to environ. | ||
| 104 | dnl OpenBSD 4.7 unsetenv("") does not fail. | ||
| 105 | AC_CACHE_CHECK([whether unsetenv obeys POSIX], | ||
| 106 | [gl_cv_func_unsetenv_works], | ||
| 107 | [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ | ||
| 108 | #include <stdlib.h> | ||
| 109 | #include <errno.h> | ||
| 110 | extern char **environ; | ||
| 111 | ]], [[ | ||
| 112 | char entry1[] = "a=1"; | ||
| 113 | char entry2[] = "b=2"; | ||
| 114 | char *env[] = { entry1, entry2, NULL }; | ||
| 115 | if (putenv ((char *) "a=1")) return 1; | ||
| 116 | if (putenv (entry2)) return 2; | ||
| 117 | entry2[0] = 'a'; | ||
| 118 | unsetenv ("a"); | ||
| 119 | if (getenv ("a")) return 3; | ||
| 120 | if (!unsetenv ("") || errno != EINVAL) return 4; | ||
| 121 | entry2[0] = 'b'; | ||
| 122 | environ = env; | ||
| 123 | if (!getenv ("a")) return 5; | ||
| 124 | entry2[0] = 'a'; | ||
| 125 | unsetenv ("a"); | ||
| 126 | if (getenv ("a")) return 6; | ||
| 127 | ]])], | ||
| 128 | [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no], | ||
| 129 | [case "$host_os" in | ||
| 130 | # Guess yes on glibc systems. | ||
| 131 | *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;; | ||
| 132 | # If we don't know, assume the worst. | ||
| 133 | *) gl_cv_func_unsetenv_works="guessing no" ;; | ||
| 134 | esac | ||
| 135 | ])]) | ||
| 136 | case "$gl_cv_func_unsetenv_works" in | ||
| 137 | *yes) ;; | ||
| 138 | *) | ||
| 139 | REPLACE_UNSETENV=1 | ||
| 140 | ;; | ||
| 141 | esac | ||
| 142 | fi | ||
| 143 | ]) | ||
| 144 | |||
| 145 | # Prerequisites of lib/setenv.c. | ||
| 146 | AC_DEFUN([gl_PREREQ_SETENV], | ||
| 147 | [ | ||
| 148 | AC_REQUIRE([AC_FUNC_ALLOCA]) | ||
| 149 | AC_REQUIRE([gl_ENVIRON]) | ||
| 150 | AC_CHECK_HEADERS_ONCE([unistd.h]) | ||
| 151 | AC_CHECK_HEADERS([search.h]) | ||
| 152 | AC_CHECK_FUNCS([tsearch]) | ||
| 153 | ]) | ||
| 154 | |||
| 155 | # Prerequisites of lib/unsetenv.c. | ||
| 156 | AC_DEFUN([gl_PREREQ_UNSETENV], | ||
| 157 | [ | ||
| 158 | AC_REQUIRE([gl_ENVIRON]) | ||
| 159 | AC_CHECK_HEADERS_ONCE([unistd.h]) | ||
| 160 | ]) | ||