From: Bruno Haible Date: Tue, 11 Jan 2005 13:04:18 +0000 (+0000) Subject: Update from gnulib. X-Git-Tag: v0.14.2~189 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31ce4ce29167287b52f4cfd73c04a1f5fa9a0bc3;p=thirdparty%2Fgettext.git Update from gnulib. --- diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index 7b758adcb..761fc3879 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -2,19 +2,10 @@ * alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H. -2004-11-02 Bruno Haible - - * setenv.h (unsetenv): Define as a macro if the system's unsetenv() - function returns void. - 2003-09-08 Paul Eggert * atexit.c (atexit): Define using a prototype. -2004-08-06 Paul Eggert - - * setenv.c: Import changes from coreutils. - 2004-12-10 Bruno Haible * obstack.h: Update from current gnulib version. diff --git a/gettext-tools/lib/atexit.c b/gettext-tools/lib/atexit.c index fdc7b4308..a401b2ff8 100644 --- a/gettext-tools/lib/atexit.c +++ b/gettext-tools/lib/atexit.c @@ -1,12 +1,10 @@ /* 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. */ diff --git a/gettext-tools/m4/ChangeLog b/gettext-tools/m4/ChangeLog index f234bdcb1..5e914d23e 100644 --- a/gettext-tools/m4/ChangeLog +++ b/gettext-tools/m4/ChangeLog @@ -1,17 +1,3 @@ -2005-01-06 Bruno Haible - - * stdbool.m4: Upgrade to gnulib version. - -2004-11-02 Bruno Haible - - * setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv() - returns void. - -2004-10-04 Paul Eggert - - * unlocked-io.m4: Add copyright notice. - (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO. - 2004-06-01 Paul Eggert * quotearg.m4: Fix copyright date and/or serial number. @@ -32,15 +18,6 @@ * extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX and AC_MINIX, too, so that their extensions are available. -2003-09-10 Bruno Haible - - * xreadlink.m4 (gl_XREADLINK): Remove check. - -2003-09-10 Bruno Haible - - * setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove - and checks. - 2004-04-26 Bruno Haible * csharpcomp.m4 (gt_CSHARPCOMP): Avoid using !. diff --git a/gettext-tools/m4/allocsa.m4 b/gettext-tools/m4/allocsa.m4 index 7f97a98e3..9ec002448 100644 --- a/gettext-tools/m4/allocsa.m4 +++ b/gettext-tools/m4/allocsa.m4 @@ -1,5 +1,5 @@ -# 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 @@ -12,4 +12,6 @@ AC_DEFUN([gl_ALLOCSA], 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]) ]) diff --git a/gettext-tools/m4/extensions.m4 b/gettext-tools/m4/extensions.m4 index 7faaa833b..58bc0beb6 100644 --- a/gettext-tools/m4/extensions.m4 +++ b/gettext-tools/m4/extensions.m4 @@ -1,15 +1,29 @@ +# 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__]) ]) diff --git a/gettext-tools/m4/quotearg.m4 b/gettext-tools/m4/quotearg.m4 index aa4a3d147..877fcd9af 100644 --- a/gettext-tools/m4/quotearg.m4 +++ b/gettext-tools/m4/quotearg.m4 @@ -1,5 +1,5 @@ # 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 diff --git a/gettext-tools/m4/setenv.m4 b/gettext-tools/m4/setenv.m4 index 6c3058981..88d5e4c20 100644 --- a/gettext-tools/m4/setenv.m4 +++ b/gettext-tools/m4/setenv.m4 @@ -1,5 +1,5 @@ -# 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 @@ -14,6 +14,22 @@ AC_DEFUN([gt_FUNC_SETENV], 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 +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 ]) @@ -39,8 +55,8 @@ AC_DEFUN([gt_CHECK_VAR_DECL], # 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) @@ -50,7 +66,7 @@ AC_DEFUN([gl_PREREQ_SETENV], # 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) gt_CHECK_VAR_DECL([#include ], environ) ]) diff --git a/gettext-tools/m4/stdbool.m4 b/gettext-tools/m4/stdbool.m4 index 4bd17b726..b25b7d244 100644 --- a/gettext-tools/m4/stdbool.m4 +++ b/gettext-tools/m4/stdbool.m4 @@ -1,6 +1,6 @@ # 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 @@ -39,3 +39,57 @@ AC_DEFUN([AM_STDBOOL_H], 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 + #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]) diff --git a/gettext-tools/m4/xreadlink.m4 b/gettext-tools/m4/xreadlink.m4 index 7062fd198..5d8e47f92 100644 --- a/gettext-tools/m4/xreadlink.m4 +++ b/gettext-tools/m4/xreadlink.m4 @@ -1,4 +1,4 @@ -# 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 @@ -10,5 +10,5 @@ AC_DEFUN([gl_XREADLINK], [ 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) ])