]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Update from gnulib.
authorBruno Haible <bruno@clisp.org>
Sat, 22 Jul 2006 13:59:01 +0000 (13:59 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:13:38 +0000 (12:13 +0200)
gettext-tools/lib/ChangeLog
gettext-tools/lib/argmatch.c
gettext-tools/lib/argmatch.h
gettext-tools/lib/atexit.c

index 1e88d54f4848e34965e3bdca4ee9054ec5837650..3d560672f1e5aaeccdb19cace74344d05a1fbd32 100644 (file)
@@ -1,3 +1,11 @@
+2006-07-22  Bruno Haible  <bruno@clisp.org>
+
+       * atexit.c: Update from gnulib.
+
+       * verify.h: New file, from gnulib.
+       * argmatch.h: Update from gnulib, keeping DLL_VARIABLE annotation.
+       * Makefile.am (libgettextlib_la_SOURCES): Add verify.h.
+
 2006-07-21  Bruno Haible  <bruno@clisp.org>
 
        * gettext-0.15 released.
index 38ec7a80df3dec5718c7bd6b6df01002d886333f..36d5845acb7812c55a908234d0a76361ad7a1922 100644 (file)
@@ -1,6 +1,7 @@
 /* argmatch.c -- find a match for a string in an array
 
-   Copyright (C) 1990, 1998-1999, 2001-2005 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1998, 1999, 2001, 2002, 2003, 2004, 2005 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
@@ -72,7 +73,7 @@ argmatch_exit_fn argmatch_die = __argmatch_die;
 
 \f
 /* If ARG is an unambiguous match for an element of the
-   null-terminated array ARGLIST, return the index in ARGLIST
+   NULL-terminated array ARGLIST, return the index in ARGLIST
    of the matched element, else -1 if it does not match any element
    or -2 if it is ambiguous (is a prefix of more than one element).
 
index 30d1139fab5010feb13f77fdaeab96d4fddc421f..d82929cc6b1010af7de313b51d82cfbe99244172 100644 (file)
@@ -1,6 +1,6 @@
 /* argmatch.h -- definitions and prototypes for argmatch.c
 
-   Copyright (C) 1990, 1998, 1999, 2001, 2002, 2004 Free Software
+   Copyright (C) 1990, 1998, 1999, 2001, 2002, 2004, 2005 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
 
 # include <stddef.h>
 
-# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
+# include "verify.h"
 
-# define ARGMATCH_CONSTRAINT(Arglist, Vallist) \
-  (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1)
+# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
 
 /* Assert there are as many real arguments as there are values
-   (argument list ends with a NULL guard).  ARGMATCH_VERIFY is
-   preferred, since it is guaranteed to be checked at compile-time.
-   ARGMATCH_ASSERT is for backward compatibility only.  */
-
-# define ARGMATCH_VERIFY(Arglist, Vallist)                               \
-  struct argmatch_verify                                                 \
-  {                                                                      \
-    char argmatch_verify[ARGMATCH_CONSTRAINT(Arglist, Vallist) ? 1 : -1]; \
-  }
-
-# define ARGMATCH_ASSERT(Arglist, Vallist) \
-  assert (ARGMATCH_CONSTRAINT (Arglist, Vallist))
+   (argument list ends with a NULL guard).  */
+
+# define ARGMATCH_VERIFY(Arglist, Vallist) \
+    verify (ARRAY_CARDINALITY (Arglist) == ARRAY_CARDINALITY (Vallist) + 1)
 
 /* Return the index of the element of ARGLIST (NULL terminated) that
    matches with ARG.  If VALLIST is not NULL, then use it to resolve
index a401b2ff8c7dafdf9edf653c916b79710f8b3b57..f4873c9ee34090e9cf293070f35d6dd2c77cfeaf 100644 (file)
@@ -1,7 +1,9 @@
 /* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */
 /* This function is in the public domain.  --Mike Stump. */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
 
 int
 atexit (void (*f) (void))