* alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
-2004-11-02 Bruno Haible <bruno@clisp.org>
-
- * setenv.h (unsetenv): Define as a macro if the system's unsetenv()
- function returns void.
-
2003-09-08 Paul Eggert <eggert@twinsun.com>
* atexit.c (atexit): Define using a prototype.
-2004-08-06 Paul Eggert <eggert@cs.ucla.edu>
-
- * setenv.c: Import changes from coreutils.
-
2004-12-10 Bruno Haible <bruno@clisp.org>
* obstack.h: Update from current gnulib version.
/* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */
/* This function is in the public domain. --Mike Stump. */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "config.h"
int
-atexit (void (*f)())
+atexit (void (*f) (void))
{
/* If the system doesn't provide a definition for atexit, use on_exit
if the system provides that. */
-2005-01-06 Bruno Haible <bruno@clisp.org>
-
- * stdbool.m4: Upgrade to gnulib version.
-
-2004-11-02 Bruno Haible <bruno@clisp.org>
-
- * setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
- returns void.
-
-2004-10-04 Paul Eggert <eggert@cs.ucla.edu>
-
- * unlocked-io.m4: Add copyright notice.
- (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
-
2004-06-01 Paul Eggert <eggert@cs.ucla.edu>
* quotearg.m4: Fix copyright date and/or serial number.
* extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
and AC_MINIX, too, so that their extensions are available.
-2003-09-10 Bruno Haible <bruno@clisp.org>
-
- * xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
-
-2003-09-10 Bruno Haible <bruno@clisp.org>
-
- * setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
- <stdlib.h> and <string.h> checks.
-
2004-04-26 Bruno Haible <bruno@clisp.org>
* csharpcomp.m4 (gt_CSHARPCOMP): Avoid using !.
-# allocsa.m4 serial 1
-dnl Copyright (C) 2003 Free Software Foundation, Inc.
+# allocsa.m4 serial 3
+dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl @ALLOCA@ and @LTALLOCA@.
AC_REQUIRE([gl_FUNC_ALLOCA])
AC_REQUIRE([gl_EEMALLOC])
+ AC_REQUIRE([gl_AC_TYPE_LONG_LONG])
+ AC_REQUIRE([gt_TYPE_LONGDOUBLE])
])
+# Enable extensions on systems that normally disable them.
+
+# Copyright (C) 2003 Free Software Foundation, Inc.
+
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+
# gl_USE_SYSTEM_EXTENSIONS
# ------------------------
# Enable extensions on systems that normally disable them,
# typically due to standards-conformance issues.
AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS], [
+ AC_BEFORE([$0], [AC_COMPILE_IFELSE])
+ AC_BEFORE([$0], [AC_RUN_IFELSE])
+
AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([AC_AIX])
+ AC_REQUIRE([AC_MINIX])
+
AH_VERBATIM([__EXTENSIONS__],
[/* Enable extensions on Solaris. */
#ifndef __EXTENSIONS__
# undef __EXTENSIONS__
#endif])
- AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
- AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
AC_DEFINE([__EXTENSIONS__])
])
# quotearg.m4 serial 2
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
-# setenv.m4 serial 4
-dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
+# setenv.m4 serial 5
+dnl Copyright (C) 2001-2004 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
fi
if test $ac_cv_func_unsetenv = no; then
gl_PREREQ_UNSETENV
+ else
+ AC_CACHE_CHECK([for unsetenv() return type], gt_cv_func_unsetenv_ret,
+ [AC_TRY_COMPILE([#include <stdlib.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+int unsetenv (const char *name);
+#else
+int unsetenv();
+#endif
+], , gt_cv_func_unsetenv_ret='int', gt_cv_func_unsetenv_ret='void')])
+ if test $gt_cv_func_unsetenv_ret = 'void'; then
+ AC_DEFINE(VOID_UNSETENV, 1, [Define if unsetenv() returns void, not int.])
+ fi
fi
])
# Prerequisites of lib/setenv.c.
AC_DEFUN([gl_PREREQ_SETENV],
[
- AC_REQUIRE([gl_ALLOCSA])
- AC_CHECK_HEADERS_ONCE(stdlib.h string.h unistd.h)
+ AC_REQUIRE([AC_FUNC_ALLOCA])
+ AC_CHECK_HEADERS_ONCE(unistd.h)
AC_CHECK_HEADERS(search.h)
AC_CHECK_FUNCS(tsearch)
gt_CHECK_VAR_DECL([#include <errno.h>], errno)
# Prerequisites of lib/unsetenv.c.
AC_DEFUN([gl_PREREQ_UNSETENV],
[
- AC_CHECK_HEADERS_ONCE(stdlib.h string.h unistd.h)
+ AC_CHECK_HEADERS_ONCE(unistd.h)
gt_CHECK_VAR_DECL([#include <errno.h>], errno)
gt_CHECK_VAR_DECL([#include <unistd.h>], environ)
])
# Check for stdbool.h that conforms to C99.
-# Copyright (C) 2002-2003 Free Software Foundation, Inc.
+# Copyright (C) 2002-2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
fi
AC_SUBST([HAVE__BOOL])
])
+
+# This macro is only needed in autoconf <= 2.59. Newer versions of autoconf
+# have this macro built-in.
+
+AC_DEFUN([AC_HEADER_STDBOOL],
+ [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
+ [ac_cv_header_stdbool_h],
+ [AC_TRY_COMPILE(
+ [
+ #include <stdbool.h>
+ #ifndef bool
+ "error: bool is not defined"
+ #endif
+ #ifndef false
+ "error: false is not defined"
+ #endif
+ #if false
+ "error: false is not 0"
+ #endif
+ #ifndef true
+ "error: true is not defined"
+ #endif
+ #if true != 1
+ "error: true is not 1"
+ #endif
+ #ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+ #endif
+
+ struct s { _Bool s: 1; _Bool t; } s;
+
+ char a[true == 1 ? 1 : -1];
+ char b[false == 0 ? 1 : -1];
+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+ char d[(bool) -0.5 == true ? 1 : -1];
+ bool e = &s;
+ char f[(_Bool) -0.0 == false ? 1 : -1];
+ char g[true];
+ char h[sizeof (_Bool)];
+ char i[sizeof s.t];
+ enum { j = false, k = true, l = false * true, m = true * 256 };
+ _Bool n[m];
+ char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+ ],
+ [
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k + !l
+ + !m + !n + !o);
+ ],
+ [ac_cv_header_stdbool_h=yes],
+ [ac_cv_header_stdbool_h=no])])
+ AC_CHECK_TYPES([_Bool])
+ if test $ac_cv_header_stdbool_h = yes; then
+ AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
+ fi])
-# xreadlink.m4 serial 3
+# xreadlink.m4 serial 4
dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
[
dnl Prerequisites of lib/xreadlink.c.
AC_REQUIRE([gt_TYPE_SSIZE_T])
- AC_CHECK_HEADERS_ONCE(stdlib.h unistd.h)
+ AC_CHECK_HEADERS_ONCE(unistd.h)
])