New upstream version 2.3.4
This commit is contained in:
parent
e7bdd1c6c6
commit
de72f6f588
556 changed files with 90432 additions and 53391 deletions
|
@ -1,5 +1,5 @@
|
|||
# setenv.m4 serial 26
|
||||
dnl Copyright (C) 2001-2004, 2006-2013 Free Software Foundation, Inc.
|
||||
# setenv.m4 serial 30
|
||||
dnl Copyright (C) 2001-2004, 2006-2023 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
@ -35,10 +35,12 @@ AC_DEFUN([gl_FUNC_SETENV],
|
|||
]])],
|
||||
[gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no],
|
||||
[case "$host_os" in
|
||||
# Guess yes on glibc systems.
|
||||
*-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_setenv_works="guessing no" ;;
|
||||
# Guess yes on glibc systems.
|
||||
*-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
|
||||
# Guess yes on musl systems.
|
||||
*-musl*) gl_cv_func_setenv_works="guessing yes" ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])])
|
||||
case "$gl_cv_func_setenv_works" in
|
||||
|
@ -104,35 +106,39 @@ int unsetenv (const char *name);
|
|||
dnl OpenBSD 4.7 unsetenv("") does not fail.
|
||||
AC_CACHE_CHECK([whether unsetenv obeys POSIX],
|
||||
[gl_cv_func_unsetenv_works],
|
||||
[AC_RUN_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
extern char **environ;
|
||||
]], [[
|
||||
char entry1[] = "a=1";
|
||||
char entry2[] = "b=2";
|
||||
char *env[] = { entry1, entry2, NULL };
|
||||
if (putenv ((char *) "a=1")) return 1;
|
||||
if (putenv (entry2)) return 2;
|
||||
entry2[0] = 'a';
|
||||
unsetenv ("a");
|
||||
if (getenv ("a")) return 3;
|
||||
if (!unsetenv ("") || errno != EINVAL) return 4;
|
||||
entry2[0] = 'b';
|
||||
environ = env;
|
||||
if (!getenv ("a")) return 5;
|
||||
entry2[0] = 'a';
|
||||
unsetenv ("a");
|
||||
if (getenv ("a")) return 6;
|
||||
]])],
|
||||
[gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no],
|
||||
[case "$host_os" in
|
||||
# Guess yes on glibc systems.
|
||||
*-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_unsetenv_works="guessing no" ;;
|
||||
esac
|
||||
])])
|
||||
[AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM([[
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
extern char **environ;
|
||||
]GL_MDA_DEFINES],
|
||||
[[
|
||||
char entry1[] = "a=1";
|
||||
char entry2[] = "b=2";
|
||||
char *env[] = { entry1, entry2, NULL };
|
||||
if (putenv ((char *) "a=1")) return 1;
|
||||
if (putenv (entry2)) return 2;
|
||||
entry2[0] = 'a';
|
||||
unsetenv ("a");
|
||||
if (getenv ("a")) return 3;
|
||||
if (!unsetenv ("") || errno != EINVAL) return 4;
|
||||
entry2[0] = 'b';
|
||||
environ = env;
|
||||
if (!getenv ("a")) return 5;
|
||||
entry2[0] = 'a';
|
||||
unsetenv ("a");
|
||||
if (getenv ("a")) return 6;
|
||||
]])],
|
||||
[gl_cv_func_unsetenv_works=yes],
|
||||
[gl_cv_func_unsetenv_works=no],
|
||||
[case "$host_os" in
|
||||
# Guess yes on glibc systems.
|
||||
*-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
|
||||
# If we don't know, obey --enable-cross-guesses.
|
||||
*) gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
|
||||
esac
|
||||
])
|
||||
])
|
||||
case "$gl_cv_func_unsetenv_works" in
|
||||
*yes) ;;
|
||||
*)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue