]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Update from gnulib.
authorBruno Haible <bruno@clisp.org>
Tue, 11 Jan 2005 13:04:18 +0000 (13:04 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:11:59 +0000 (12:11 +0200)
gettext-tools/lib/ChangeLog
gettext-tools/lib/atexit.c
gettext-tools/m4/ChangeLog
gettext-tools/m4/allocsa.m4
gettext-tools/m4/extensions.m4
gettext-tools/m4/quotearg.m4
gettext-tools/m4/setenv.m4
gettext-tools/m4/stdbool.m4
gettext-tools/m4/xreadlink.m4

index 7b758adcbf63a31403ebe6dec597aaf1988fd0ae..761fc3879806cf3ebdeeae66f23a454e3fa8b0bf 100644 (file)
@@ -2,19 +2,10 @@
 
        * 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.
index fdc7b43088640c4290fdb46ec2ba79c09a3f36d0..a401b2ff8c7dafdf9edf653c916b79710f8b3b57 100644 (file)
@@ -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.  */
index f234bdcb13ecd51e22446dd9fbbd34b8bee178b0..5e914d23e42ff4846f9abf9df02899449bf41a0b 100644 (file)
@@ -1,17 +1,3 @@
-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 !.
index 7f97a98e3619cc5c2ca9342d27768dae736a59cd..9ec0024484dc9ebfa1114f813455fb7be8fbd8b2 100644 (file)
@@ -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])
 ])
index 7faaa833bd22f83be1d364372a86a49cb18e8d75..58bc0beb6d5b674c128208b3678c02e1e789adcc 100644 (file)
@@ -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__])
 ])
index aa4a3d14738ce411bcd6cc01098cc6a5290def37..877fcd9af1c91b822487eb8274b19e3c99304447 100644 (file)
@@ -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
index 6c3058981b157608305f7b23f3326e2eb0762f43..88d5e4c206697ed9bf98e040edfd603ec2213bf7 100644 (file)
@@ -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 <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
 ])
 
@@ -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.h>], 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.h>], errno)
   gt_CHECK_VAR_DECL([#include <unistd.h>], environ)
 ])
index 4bd17b726b2cc7680643c4f80a79684a961fd1b2..b25b7d2440b8c970f5d657d3c902ce3a4a9eaf4b 100644 (file)
@@ -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 <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])
index 7062fd1989a372c57a1e809cd4822833d82043b6..5d8e47f92e0c3373d14f7eb17a2d22ffa8cc2fcb 100644 (file)
@@ -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)
 ])