Diff for /embedaddon/libiconv/srcm4/setenv.m4 between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2012/05/29 09:29:44 version 1.1.1.3, 2021/03/17 13:38:46
Line 1 Line 1
# setenv.m4 serial 24# setenv.m4 serial 28
dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc.dnl Copyright (C) 2001-2004, 2006-2019 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation  dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,  dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.  dnl with or without modifications, as long as this notice is preserved.
Line 7  dnl with or without modifications, as long as this not Line 7  dnl with or without modifications, as long as this not
 AC_DEFUN([gl_FUNC_SETENV],  AC_DEFUN([gl_FUNC_SETENV],
 [  [
   AC_REQUIRE([gl_FUNC_SETENV_SEPARATE])    AC_REQUIRE([gl_FUNC_SETENV_SEPARATE])
     AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   if test $ac_cv_func_setenv = no; then    if test $ac_cv_func_setenv = no; then
     HAVE_SETENV=0      HAVE_SETENV=0
   else    else
Line 33  AC_DEFUN([gl_FUNC_SETENV], Line 34  AC_DEFUN([gl_FUNC_SETENV],
        return result;         return result;
       ]])],        ]])],
       [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no],        [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no],
      [gl_cv_func_setenv_works="guessing no"])])      [case "$host_os" in
    if test "$gl_cv_func_setenv_works" != yes; then                        # Guess yes on glibc systems.
      REPLACE_SETENV=1         *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
    fi                        # Guess yes on musl systems.
          *-musl*)       gl_cv_func_setenv_works="guessing yes" ;;
                         # If we don't know, assume the worst.
          *)             gl_cv_func_setenv_works="guessing no" ;;
        esac
       ])])
     case "$gl_cv_func_setenv_works" in
       *yes) ;;
       *)
         REPLACE_SETENV=1
         ;;
     esac
   fi    fi
 ])  ])
   
Line 56  AC_DEFUN([gl_FUNC_SETENV_SEPARATE], Line 68  AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
 AC_DEFUN([gl_FUNC_UNSETENV],  AC_DEFUN([gl_FUNC_UNSETENV],
 [  [
   AC_REQUIRE([gl_STDLIB_H_DEFAULTS])    AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
     AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   AC_CHECK_DECLS_ONCE([unsetenv])    AC_CHECK_DECLS_ONCE([unsetenv])
   if test $ac_cv_have_decl_unsetenv = no; then    if test $ac_cv_have_decl_unsetenv = no; then
     HAVE_DECL_UNSETENV=0      HAVE_DECL_UNSETENV=0
Line 77  extern Line 90  extern
 #ifdef __cplusplus  #ifdef __cplusplus
 "C"  "C"
 #endif  #endif
 #if defined(__STDC__) || defined(__cplusplus)  
 int unsetenv (const char *name);  int unsetenv (const char *name);
 #else  
 int unsetenv();  
 #endif  
             ]],              ]],
             [[]])],              [[]])],
          [gt_cv_func_unsetenv_ret='int'],           [gt_cv_func_unsetenv_ret='int'],
Line 119  int unsetenv(); Line 128  int unsetenv();
        if (getenv ("a")) return 6;         if (getenv ("a")) return 6;
       ]])],        ]])],
       [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no],        [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no],
      [gl_cv_func_unsetenv_works="guessing no"])])      [case "$host_os" in
    if test "$gl_cv_func_unsetenv_works" != yes; then                 # Guess yes on glibc systems.
      REPLACE_UNSETENV=1         *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
    fi                 # If we don't know, assume the worst.
          *)      gl_cv_func_unsetenv_works="guessing no" ;;
        esac
       ])])
     case "$gl_cv_func_unsetenv_works" in
       *yes) ;;
       *)
         REPLACE_UNSETENV=1
         ;;
     esac
   fi    fi
 ])  ])
   

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>