diff options
author | Ian Lynagh <ian@well-typed.com> | 2013-06-15 12:46:21 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-06-15 12:46:21 +0100 |
commit | 3be6101285ce4a1d8308f5a2961b1fc6122220a4 (patch) | |
tree | a4145018fa77e3aaca0a5d0f2ce740e53cac9305 /libraries/base/configure.ac | |
parent | 7fef22ab92e7caf9f02a081efefe9002817f87bc (diff) | |
download | haskell-3be6101285ce4a1d8308f5a2961b1fc6122220a4.tar.gz |
Add setEnv/unsetEnv to System.Environment; fixes #7427
Patch from Simon Hengel.
Diffstat (limited to 'libraries/base/configure.ac')
-rw-r--r-- | libraries/base/configure.ac | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libraries/base/configure.ac b/libraries/base/configure.ac index eff1e026c7..d84c3cf27f 100644 --- a/libraries/base/configure.ac +++ b/libraries/base/configure.ac @@ -69,6 +69,22 @@ if test "$ac_cv_header_poll_h" = yes -a "$ac_cv_func_poll" = yes; then AC_DEFINE([HAVE_POLL], [1], [Define if you have poll support.]) fi +# unsetenv +AC_CHECK_FUNCS([unsetenv]) + +### POSIX.1003.1 unsetenv returns 0 or -1 (EINVAL), but older implementations +### in common use return void. +AC_CACHE_CHECK([return type of unsetenv], fptools_cv_func_unsetenv_return_type, + [AC_EGREP_HEADER(changequote(<, >)<void[ ]+unsetenv>changequote([, ]), + stdlib.h, + [fptools_cv_func_unsetenv_return_type=void], + [fptools_cv_func_unsetenv_return_type=int])]) +case "$fptools_cv_func_unsetenv_return_type" in + "void" ) + AC_DEFINE([UNSETENV_RETURNS_VOID], [1], [Define if stdlib.h declares unsetenv to return void.]) + ;; +esac + dnl-------------------------------------------------------------------- dnl * Deal with arguments telling us iconv is somewhere odd dnl-------------------------------------------------------------------- |