X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fputenv.m4;h=43a5dc5bee6c38b5e2a31671ea64c8a3c9c4c5dd;hb=1b9bd2b9f83a84ede12622d6a040383b6bded37d;hp=c913e27e6a715d1ff6a884ee8d9779faa771a8cc;hpb=7c3f8da8f075e3813ced160d5b53a28c6f7dfe78;p=gnulib.git diff --git a/m4/putenv.m4 b/m4/putenv.m4 index c913e27e6..43a5dc5be 100644 --- a/m4/putenv.m4 +++ b/m4/putenv.m4 @@ -1,5 +1,5 @@ -# putenv.m4 serial 10 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# putenv.m4 serial 12 +dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 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. @@ -11,25 +11,21 @@ dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that. AC_DEFUN([gl_FUNC_PUTENV], [AC_CACHE_CHECK([for SVID conformant putenv], jm_cv_func_svid_putenv, - [AC_TRY_RUN([ - int - main () - { - /* Put it in env. */ - if (putenv ("CONFTEST_putenv=val")) - exit (1); + [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[ + /* Put it in env. */ + if (putenv ("CONFTEST_putenv=val")) + return 1; - /* Try to remove it. */ - if (putenv ("CONFTEST_putenv")) - exit (1); + /* Try to remove it. */ + if (putenv ("CONFTEST_putenv")) + return 1; - /* Make sure it was deleted. */ - if (getenv ("CONFTEST_putenv") != 0) - exit (1); + /* Make sure it was deleted. */ + if (getenv ("CONFTEST_putenv") != 0) + return 1; - exit (0); - } - ], + return 0; + ])], jm_cv_func_svid_putenv=yes, jm_cv_func_svid_putenv=no, dnl When crosscompiling, assume putenv is broken.