]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Update from gnulib.
authorDaiki Ueno <ueno@unixuser.org>
Sat, 8 Dec 2012 09:24:35 +0000 (18:24 +0900)
committerDaiki Ueno <ueno@unixuser.org>
Sat, 8 Dec 2012 09:24:35 +0000 (18:24 +0900)
15 files changed:
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/config.charset
gettext-runtime/intl/localcharset.c
gettext-runtime/intl/localename.c
gettext-runtime/intl/lock.c
gettext-runtime/intl/vasnprintf.c
gettext-runtime/intl/verify.h
gettext-runtime/intl/xsize.h
gettext-runtime/libasprintf/ChangeLog
gettext-runtime/libasprintf/vasnprintf.c
gettext-runtime/libasprintf/xsize.h
gettext-runtime/m4/ChangeLog
gettext-runtime/m4/fcntl-o.m4
gettext-runtime/m4/lock.m4
gettext-runtime/m4/xsize.m4

index 9d4c131e3fb035496d69d2e6108891b94ee3a1db..4e4c3bfa28fce35ee7555113788788a9b2c92ceb 100644 (file)
@@ -1,3 +1,57 @@
+2012-11-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * vasnprintf.c (MAX_ROOM_NEEDED): Now static, not static
+       inline.
+
+2012-11-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lock.c (gl_waitqueue_init)
+       (gl_waitqueue_notify_first, gl_waitqueue_notify_all):
+       Change 'static inline' to 'inline'.
+
+2012-09-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+       localename: port gl_locale_name_thread_unsafe to FreeBSD
+       * localename.c (gl_locale_name_thread_unsafe): Port to FreeBSD,
+       and use the simpler FreeBSD implementation on Mac OS X as well.
+       Original idea suggested by Ed Maste in
+       <http://lists.gnu.org/archive/html/bug-gnulib/2012-09/msg00094.html>.
+
+2012-09-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * xsize.h (XSIZE_INLINE): New macro.  Replace all uses of
+       'static inline' with them.  Use _GL_INLINE_HEADER_BEGIN,
+       _GL_INLINE_HEADER_END.
+
+2012-09-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+       misc: don't limit commentary to inline functions
+       * xsize.h: Contrast macros to functions in general, not just
+       to inline functions, when the commentary does not apply only to
+       inline functions.
+
+2012-09-16  Paul Eggert  <eggert@cs.ucla.edu>
+
+       localcharset: work around Mac OS X bug with UTF-8 and MB_CUR_MAX
+       * localcharset.c (locale_charset) [DARWIN7]:
+       Return "ASCII" if the system reports "UTF-8" and MB_CUR_MAX <= 1,
+       as these two values are incompatible.  Problem reported by Max Horn.
+       For more discussion, please see
+       <http://lists.gnu.org/archive/html/bug-gnulib/2012-09/msg00061.html>.
+
+2012-07-20  Eric Blake  <eblake@redhat.com>
+
+       verify: document conflict with -Wnested-externs
+       * verify.h: Give hint about usage when gcc warnings are enabled.
+
+2012-06-22  Bruno Haible  <bruno@clisp.org>
+
+       Write "Mac OS X" instead of "MacOS X".
+       * config.charset: Write "Mac OS X" instead of "MacOS X".
+       * localcharset.c: Likewise.
+       * localename.c: Likewise.
+       * vasnprintf.c: Likewise.
+
 2012-06-03  Jim Meyering  <jim@meyering.net>
 
        * dcigettext.c: Spelling fixes.
        * vasnprintf.c (VASNPRINTF): Update memory handling code.
        Reported by Pádraig Brady <P@draigbrady.com>.
 
+2011-01-01  Jim Meyering  <meyering@redhat.com>
+
+       maint: update almost all copyright ranges to include 2011
+       Run the new "make update-copyright" rule.
+
 2010-11-20  Bruno Haible  <bruno@clisp.org>
 
        Port to uClibc.
index 09f8287984fa889755fc4231b6eef23d9c649fdc..fdf6535dcd89d6725c799b69ea28f33baaa4fcf6 100644 (file)
@@ -29,7 +29,7 @@
 # The current list of GNU canonical charset names is as follows.
 #
 #       name              MIME?             used by which systems
-#                                    (darwin = MacOS X, woe32 = native Windows)
+#                                    (darwin = Mac OS X, woe32 = native Windows)
 #
 #   ASCII, ANSI_X3.4-1968       glibc solaris freebsd netbsd darwin cygwin
 #   ISO-8859-1              Y   glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
index 13831d61d30381348bb23a1cd7b3452d4a91d069..cd8d507e168ed47b67fcf28d3bfd476cb34d7cc7 100644 (file)
@@ -29,7 +29,7 @@
 #include <stdlib.h>
 
 #if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET
-# define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */
+# define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */
 #endif
 
 #if defined _WIN32 || defined __WIN32__
@@ -542,5 +542,12 @@ locale_charset (void)
   if (codeset[0] == '\0')
     codeset = "ASCII";
 
+#ifdef DARWIN7
+  /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8"
+     (the default codeset) does not work when MB_CUR_MAX is 1.  */
+  if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX <= 1)
+    codeset = "ASCII";
+#endif
+
   return codeset;
 }
index 3dca41154f956cf89c2476104758cbb92d637dd1..108dd6f14562b8174232d1feace8c95ff00bd0fd 100644 (file)
@@ -1,5 +1,5 @@
 /* Determine name of the currently selected locale.
-   Copyright (C) 1995-1999, 2000-2010 Free Software Foundation, Inc.
+   Copyright (C) 1995-2012 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -16,7 +16,7 @@
 
 /* Written by Ulrich Drepper <drepper@gnu.org>, 1995.  */
 /* Native Windows code written by Tor Lillqvist <tml@iki.fi>.  */
-/* MacOS X code written by Bruno Haible <bruno@clisp.org>.  */
+/* Mac OS X code written by Bruno Haible <bruno@clisp.org>.  */
 
 #include <config.h>
 
@@ -34,7 +34,7 @@
 #include <string.h>
 
 #if HAVE_USELOCALE
-/* MacOS X 10.5 defines the locale_t type in <xlocale.h>.  */
+/* Mac OS X 10.5 defines the locale_t type in <xlocale.h>.  */
 # if defined __APPLE__ && defined __MACH__
 #  include <xlocale.h>
 # endif
 
 
 #if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
-/* MacOS X 10.2 or newer */
+/* Mac OS X 10.2 or newer */
 
-/* Canonicalize a MacOS X locale name to a Unix locale name.
+/* Canonicalize a Mac OS X locale name to a Unix locale name.
    NAME is a sufficiently large buffer.
-   On input, it contains the MacOS X locale name.
+   On input, it contains the Mac OS X locale name.
    On output, it contains the Unix locale name.  */
 # if !defined IN_LIBINTL
 static
@@ -1145,9 +1145,9 @@ gl_locale_name_canonicalize (char *name)
      http://lists.apple.com/archives/carbon-dev/2005/Mar/msg00293.html */
 
   /* Convert legacy (NeXTstep inherited) English names to Unix (ISO 639 and
-     ISO 3166) names.  Prior to MacOS X 10.3, there is no API for doing this.
+     ISO 3166) names.  Prior to Mac OS X 10.3, there is no API for doing this.
      Therefore we do it ourselves, using a table based on the results of the
-     MacOS X 10.3.8 function
+     Mac OS X 10.3.8 function
      CFLocaleCreateCanonicalLocaleIdentifierFromString().  */
   typedef struct { const char legacy[21+1]; const char unixy[5+1]; }
           legacy_entry;
@@ -1290,26 +1290,26 @@ gl_locale_name_canonicalize (char *name)
   typedef struct { const char langtag[7+1]; const char unixy[12+1]; }
           langtag_entry;
   static const langtag_entry langtag_table[] = {
-    /* MacOS X has "az-Arab", "az-Cyrl", "az-Latn".
+    /* Mac OS X has "az-Arab", "az-Cyrl", "az-Latn".
        The default script for az on Unix is Latin.  */
     { "az-Latn", "az" },
-    /* MacOS X has "ga-dots".  Does not yet exist on Unix.  */
+    /* Mac OS X has "ga-dots".  Does not yet exist on Unix.  */
     { "ga-dots", "ga" },
-    /* MacOS X has "kk-Cyrl".  Does not yet exist on Unix.  */
-    /* MacOS X has "mn-Cyrl", "mn-Mong".
+    /* Mac OS X has "kk-Cyrl".  Does not yet exist on Unix.  */
+    /* Mac OS X has "mn-Cyrl", "mn-Mong".
        The default script for mn on Unix is Cyrillic.  */
     { "mn-Cyrl", "mn" },
-    /* MacOS X has "ms-Arab", "ms-Latn".
+    /* Mac OS X has "ms-Arab", "ms-Latn".
        The default script for ms on Unix is Latin.  */
     { "ms-Latn", "ms" },
-    /* MacOS X has "tg-Cyrl".
+    /* Mac OS X has "tg-Cyrl".
        The default script for tg on Unix is Cyrillic.  */
     { "tg-Cyrl", "tg" },
-    /* MacOS X has "tk-Cyrl".  Does not yet exist on Unix.  */
-    /* MacOS X has "tt-Cyrl".
+    /* Mac OS X has "tk-Cyrl".  Does not yet exist on Unix.  */
+    /* Mac OS X has "tt-Cyrl".
        The default script for tt on Unix is Cyrillic.  */
     { "tt-Cyrl", "tt" },
-    /* MacOS X has "zh-Hans", "zh-Hant".
+    /* Mac OS X has "zh-Hans", "zh-Hant".
        Country codes are used to distinguish these on Unix.  */
     { "zh-Hans", "zh_CN" },
     { "zh-Hant", "zh_TW" }
@@ -2505,7 +2505,7 @@ gl_locale_name_from_win32_LCID (LCID lcid)
 #endif
 
 
-#if HAVE_USELOCALE /* glibc or MacOS X */
+#if HAVE_USELOCALE /* glibc or Mac OS X */
 
 /* Simple hash set of strings.  We don't want to drag in lots of hash table
    code here.  */
@@ -2616,133 +2616,34 @@ gl_locale_name_thread_unsafe (int category, const char *categoryname)
              nl_langinfo (_NL_LOCALE_NAME (category)).  */
           name = thread_locale->__names[category];
         return name;
-#  endif
-#  if defined __APPLE__ && defined __MACH__ /* MacOS X */
-        /* The locale name is found deep in an undocumented data structure.
-           Since it's stored in a buffer of size 32 and newlocale() rejects
-           locale names of length > 31, we can assume that it is NUL terminated
-           in this buffer. But we need to make a copy of the locale name, of
-           indefinite extent.  */
-        struct _xlocale_part1_v0 /* used in MacOS X 10.5 */
-          {
-            int32_t __refcount;
-            void (*__free_extra)(void *);
-            __darwin_mbstate_t __mbs[10];
-            int64_t __magic;
-          };
-        struct _xlocale_part1_v1 /* used in MacOS X >= 10.6.0 */
-          {
-            int32_t __refcount;
-            void (*__free_extra)(void *);
-            __darwin_mbstate_t __mbs[10];
-            /*pthread_lock_t*/ int __lock;
-            int64_t __magic;
-          };
-        struct _xlocale_part2
-          {
-            int64_t __magic;
-            unsigned char __collate_load_error;
-            unsigned char __collate_substitute_nontrivial;
-            unsigned char _messages_using_locale;
-            unsigned char _monetary_using_locale;
-            unsigned char _numeric_using_locale;
-            unsigned char _time_using_locale;
-            unsigned char __mlocale_changed;
-            unsigned char __nlocale_changed;
-            unsigned char __numeric_fp_cvt;
-            struct __xlocale_st_collate *__lc_collate;
-            struct __xlocale_st_runelocale *__lc_ctype;
-            struct __xlocale_st_messages *__lc_messages;
-            struct __xlocale_st_monetary *__lc_monetary;
-            struct __xlocale_st_numeric *__lc_numeric;
-            struct _xlocale *__lc_numeric_loc;
-            struct __xlocale_st_time *__lc_time;
-            /* more */
-          };
-        struct __xlocale_st_collate
-          {
-            int32_t __refcount;
-            void (*__free_extra)(void *);
-            char __encoding[32];
-            /* more */
-          };
-        struct __xlocale_st_runelocale
-          {
-            int32_t __refcount;
-            void (*__free_extra)(void *);
-            char __ctype_encoding[32];
-            /* more */
-          };
-        struct __xlocale_st_messages
-          {
-            int32_t __refcount;
-            void (*__free_extra)(void *);
-            char *_messages_locale_buf;
-            /* more */
-          };
-        struct __xlocale_st_monetary
-          {
-            int32_t __refcount;
-            void (*__free_extra)(void *);
-            char *_monetary_locale_buf;
-            /* more */
-          };
-        struct __xlocale_st_numeric {
-            int32_t __refcount;
-            void (*__free_extra)(void *);
-            char *_numeric_locale_buf;
-            /* more */
-          };
-        struct __xlocale_st_time {
-            int32_t __refcount;
-            void (*__free_extra)(void *);
-            char *_time_locale_buf;
-            /* more */
-          };
-        struct _xlocale_part2 *tlp;
-        if (((struct _xlocale_part1_v0 *) thread_locale)->__magic
-            == 0x786C6F63616C6530LL)
-          /* MacOS X 10.5 */
-          tlp =
-            (struct _xlocale_part2 *)
-            &((struct _xlocale_part1_v0 *) thread_locale)->__magic;
-        else if (((struct _xlocale_part1_v1 *) thread_locale)->__magic
-                 == 0x786C6F63616C6530LL)
-          /* MacOS X >= 10.6.0 */
-          tlp =
-            (struct _xlocale_part2 *)
-            &((struct _xlocale_part1_v1 *) thread_locale)->__magic;
-        else
-          /* Unsupported version of MacOS X: The internals of 'struct _xlocale'
-             have changed again.  */
-          return "";
+#  elif defined __FreeBSD__ || (defined __APPLE__ && defined __MACH__)
+        /* FreeBSD, Mac OS X */
+        int mask;
+
         switch (category)
           {
           case LC_CTYPE:
-            return tlp->__lc_ctype->__ctype_encoding;
+            mask = LC_CTYPE_MASK;
+            break;
           case LC_NUMERIC:
-            return tlp->_numeric_using_locale
-                   ? tlp->__lc_numeric->_numeric_locale_buf
-                   : "C";
+            mask = LC_NUMERIC_MASK;
+            break;
           case LC_TIME:
-            return tlp->_time_using_locale
-                   ? tlp->__lc_time->_time_locale_buf
-                   : "C";
+            mask = LC_TIME_MASK;
+            break;
           case LC_COLLATE:
-            return !tlp->__collate_load_error
-                   ? tlp->__lc_collate->__encoding
-                   : "C";
+            mask = LC_COLLATE_MASK;
+            break;
           case LC_MONETARY:
-            return tlp->_monetary_using_locale
-                   ? tlp->__lc_monetary->_monetary_locale_buf
-                   : "C";
+            mask = LC_MONETARY_MASK;
+            break;
           case LC_MESSAGES:
-            return tlp->_messages_using_locale
-                   ? tlp->__lc_messages->_messages_locale_buf
-                   : "C";
+            mask = LC_MESSAGES_MASK;
+            break;
           default: /* We shouldn't get here.  */
             return "";
           }
+        return querylocale (mask, thread_locale);
 #  endif
       }
   }
@@ -2784,8 +2685,8 @@ gl_locale_name_posix (int category, const char *categoryname)
   /* On other systems we ignore what setlocale reports and instead look at the
      environment variables directly.  This is necessary
        1. on systems which have a facility for customizing the default locale
-          (MacOS X, native Windows, Cygwin) and where the system's setlocale()
-          function ignores this default locale (MacOS X, Cygwin), in two cases:
+          (Mac OS X, native Windows, Cygwin) and where the system's setlocale()
+          function ignores this default locale (Mac OS X, Cygwin), in two cases:
           a. when the user missed to use the setlocale() override from libintl
              (for example by not including <libintl.h>),
           b. when setlocale supports only the "C" locale, such as on Cygwin
@@ -2820,7 +2721,7 @@ gl_locale_name_environ (int category, const char *categoryname)
   if (retval != NULL && retval[0] != '\0')
     {
 #if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
-      /* MacOS X 10.2 or newer.
+      /* Mac OS X 10.2 or newer.
          Ignore invalid LANG value set by the Terminal application.  */
       if (strcmp (retval, "UTF-8") != 0)
 #endif
@@ -2847,10 +2748,10 @@ gl_locale_name_default (void)
       locale, customizing it for each location.  POSIX:2001 does not require
       such a facility.
 
-     The systems with such a facility are MacOS X and Windows: They provide a
+     The systems with such a facility are Mac OS X and Windows: They provide a
      GUI that allows the user to choose a locale.
-       - On MacOS X, by default, none of LC_* or LANG are set.  Starting with
-         MacOS X 10.4 or 10.5, LANG is set for processes launched by the
+       - On Mac OS X, by default, none of LC_* or LANG are set.  Starting with
+         Mac OS X 10.4 or 10.5, LANG is set for processes launched by the
          'Terminal' application (but sometimes to an incorrect value "UTF-8").
          When no environment variable is set, setlocale (LC_ALL, "") uses the
          "C" locale.
@@ -2880,7 +2781,7 @@ gl_locale_name_default (void)
      codeset.  */
 
 # if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE
-  /* MacOS X 10.2 or newer */
+  /* Mac OS X 10.2 or newer */
   {
     /* Cache the locale name, since CoreFoundation calls are expensive.  */
     static const char *cached_localename;
@@ -2888,7 +2789,7 @@ gl_locale_name_default (void)
     if (cached_localename == NULL)
       {
         char namebuf[256];
-#  if HAVE_CFLOCALECOPYCURRENT /* MacOS X 10.3 or newer */
+#  if HAVE_CFLOCALECOPYCURRENT /* Mac OS X 10.3 or newer */
         CFLocaleRef locale = CFLocaleCopyCurrent ();
         CFStringRef name = CFLocaleGetIdentifier (locale);
 
@@ -2899,7 +2800,7 @@ gl_locale_name_default (void)
             cached_localename = strdup (namebuf);
           }
         CFRelease (locale);
-#  elif HAVE_CFPREFERENCESCOPYAPPVALUE /* MacOS X 10.2 or newer */
+#  elif HAVE_CFPREFERENCESCOPYAPPVALUE /* Mac OS X 10.2 or newer */
         CFTypeRef value =
           CFPreferencesCopyAppValue (CFSTR ("AppleLocale"),
                                      kCFPreferencesCurrentApplication);
index 113098c187980da4e251fb3a82094e71ed427562..5c3f03f898d9638f2764ad6d8357ba57774d064b 100644 (file)
@@ -682,7 +682,7 @@ glthread_lock_destroy_func (gl_lock_t *lock)
 /* In this file, the waitqueues are implemented as circular arrays.  */
 #define gl_waitqueue_t gl_carray_waitqueue_t
 
-static inline void
+static void
 gl_waitqueue_init (gl_waitqueue_t *wq)
 {
   wq->array = NULL;
@@ -743,7 +743,7 @@ gl_waitqueue_add (gl_waitqueue_t *wq)
 }
 
 /* Notifies the first thread from a wait queue and dequeues it.  */
-static inline void
+static void
 gl_waitqueue_notify_first (gl_waitqueue_t *wq)
 {
   SetEvent (wq->array[wq->offset + 0]);
@@ -754,7 +754,7 @@ gl_waitqueue_notify_first (gl_waitqueue_t *wq)
 }
 
 /* Notifies all threads from a wait queue and dequeues them all.  */
-static inline void
+static void
 gl_waitqueue_notify_all (gl_waitqueue_t *wq)
 {
   unsigned int i;
index f8b138d890d8b1a4aa312fc1e29b64027ffdca0c..93ee955d5d500131db0c5a1c1a38f738720f9efa 100644 (file)
@@ -275,7 +275,7 @@ decimal_point_char (void)
 {
   const char *point;
   /* Determine it in a multithread-safe way.  We know nl_langinfo is
-     multithread-safe on glibc systems and MacOS X systems, but is not required
+     multithread-safe on glibc systems and Mac OS X systems, but is not required
      to be multithread-safe by POSIX.  sprintf(), however, is multithread-safe.
      localeconv() is rarely multithread-safe.  */
 #  if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__))
@@ -1530,7 +1530,7 @@ is_borderline (const char *digits, size_t precision)
 
 /* Returns the number of TCHAR_T units needed as temporary space for the result
    of sprintf or SNPRINTF of a single conversion directive.  */
-static inline size_t
+static size_t
 MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
                  arg_type type, int flags, size_t width, int has_precision,
                  size_t precision, int pad_ourselves)
index f87a08cd816297ded70042685bc06d4c1bf72507..71b30f4e666f882f196fa04355580cbe8a52a3f6 100644 (file)
        extern int (*dummy (void)) [sizeof (struct {...})];
 
    * GCC warns about duplicate declarations of the dummy function if
-     -Wredundant_decls is used.  GCC 4.3 and later have a builtin
+     -Wredundant-decls is used.  GCC 4.3 and later have a builtin
      __COUNTER__ macro that can let us generate unique identifiers for
      each dummy function, to suppress this warning.
 
      which do not support _Static_assert, also do not warn about the
      last declaration mentioned above.
 
+   * GCC warns if -Wnested-externs is enabled and verify() is used
+     within a function body; but inside a function, you can always
+     arrange to use verify_expr() instead.
+
    * In C++, any struct definition inside sizeof is invalid.
      Use a template type to work around the problem.  */
 
index 00994ca8d6f2413f462ff88b64215a4e2e1fadf4..9abe1cefd1819f53e2cff858d8d5b5c7b09baf91 100644 (file)
@@ -1,6 +1,6 @@
 /* xsize.h -- Checked size_t computations.
 
-   Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2008-2012 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
 # include <stdint.h>
 #endif
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef XSIZE_INLINE
+# define XSIZE_INLINE _GL_INLINE
+#endif
+
 /* The size of memory objects is often computed through expressions of
    type size_t. Example:
       void* p = malloc (header_size + n * element_size).
@@ -48,7 +53,7 @@
   ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
 
 /* Sum of two sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -59,7 +64,7 @@ xsum (size_t size1, size_t size2)
 }
 
 /* Sum of three sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -69,7 +74,7 @@ xsum3 (size_t size1, size_t size2, size_t size3)
 }
 
 /* Sum of four sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -79,7 +84,7 @@ xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
 }
 
 /* Maximum of two sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -92,7 +97,7 @@ xmax (size_t size1, size_t size2)
 
 /* Multiplication of a count with an element size, with overflow check.
    The count must be >= 0 and the element size must be > 0.
-   This is a macro, not an inline function, so that it works correctly even
+   This is a macro, not a function, so that it works correctly even
    when N is of a wider type and N > SIZE_MAX.  */
 #define xtimes(N, ELSIZE) \
   ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
@@ -104,4 +109,6 @@ xmax (size_t size1, size_t size2)
 #define size_in_bounds_p(SIZE) \
   ((SIZE) != SIZE_MAX)
 
+_GL_INLINE_HEADER_END
+
 #endif /* _XSIZE_H */
index d0b04660f2cf1e0aef4709f676b6745aceadc735..6addb3772df956fbdd542e5741dd777b302b049d 100644 (file)
@@ -1,3 +1,20 @@
+2012-11-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * vasnprintf.c (MAX_ROOM_NEEDED): Now static, not static
+       inline.
+
+2012-06-22  Bruno Haible  <bruno@clisp.org>
+
+       * vasnprintf.c: Write "Mac OS X" instead of "MacOS X".
+
+2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
+
+       maint: replace FSF snail-mail addresses with URLs
+       * vasnprintf.c, xsize.h:
+       Replace FSF snail mail addresses with URLs, as per GNU coding
+       standards.  See glibc bug
+       <http://sourceware.org/bugzilla/show_bug.cgi?id=13673>.
+
 2012-02-05  Paul Eggert  <eggert@cs.ucla.edu>
 
        * vasnprintf.c: Spelling fixes.
index f8b138d890d8b1a4aa312fc1e29b64027ffdca0c..93ee955d5d500131db0c5a1c1a38f738720f9efa 100644 (file)
@@ -275,7 +275,7 @@ decimal_point_char (void)
 {
   const char *point;
   /* Determine it in a multithread-safe way.  We know nl_langinfo is
-     multithread-safe on glibc systems and MacOS X systems, but is not required
+     multithread-safe on glibc systems and Mac OS X systems, but is not required
      to be multithread-safe by POSIX.  sprintf(), however, is multithread-safe.
      localeconv() is rarely multithread-safe.  */
 #  if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__))
@@ -1530,7 +1530,7 @@ is_borderline (const char *digits, size_t precision)
 
 /* Returns the number of TCHAR_T units needed as temporary space for the result
    of sprintf or SNPRINTF of a single conversion directive.  */
-static inline size_t
+static size_t
 MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
                  arg_type type, int flags, size_t width, int has_precision,
                  size_t precision, int pad_ourselves)
index 00994ca8d6f2413f462ff88b64215a4e2e1fadf4..9abe1cefd1819f53e2cff858d8d5b5c7b09baf91 100644 (file)
@@ -1,6 +1,6 @@
 /* xsize.h -- Checked size_t computations.
 
-   Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2008-2012 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
 # include <stdint.h>
 #endif
 
+_GL_INLINE_HEADER_BEGIN
+#ifndef XSIZE_INLINE
+# define XSIZE_INLINE _GL_INLINE
+#endif
+
 /* The size of memory objects is often computed through expressions of
    type size_t. Example:
       void* p = malloc (header_size + n * element_size).
@@ -48,7 +53,7 @@
   ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
 
 /* Sum of two sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -59,7 +64,7 @@ xsum (size_t size1, size_t size2)
 }
 
 /* Sum of three sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -69,7 +74,7 @@ xsum3 (size_t size1, size_t size2, size_t size3)
 }
 
 /* Sum of four sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -79,7 +84,7 @@ xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
 }
 
 /* Maximum of two sizes, with overflow check.  */
-static inline size_t
+XSIZE_INLINE size_t
 #if __GNUC__ >= 3
 __attribute__ ((__pure__))
 #endif
@@ -92,7 +97,7 @@ xmax (size_t size1, size_t size2)
 
 /* Multiplication of a count with an element size, with overflow check.
    The count must be >= 0 and the element size must be > 0.
-   This is a macro, not an inline function, so that it works correctly even
+   This is a macro, not a function, so that it works correctly even
    when N is of a wider type and N > SIZE_MAX.  */
 #define xtimes(N, ELSIZE) \
   ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
@@ -104,4 +109,6 @@ xmax (size_t size1, size_t size2)
 #define size_in_bounds_p(SIZE) \
   ((SIZE) != SIZE_MAX)
 
+_GL_INLINE_HEADER_END
+
 #endif /* _XSIZE_H */
index f47bb696b44f00781f3d74b3b4d343c324c1cceb..12baa4025536363b57e1fbf1748376a481eb8a74 100644 (file)
@@ -7,6 +7,20 @@
        Accordingly, bump requirement in AC_PREREQ to 2.60.
        * po.m4 (AM_PO_SUBDIRS): Likewise.
 
+2012-11-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lock.m4 (gl_PREREQ_LOCK): Do not require AC_C_INLINE.
+
+2012-09-22  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * xsize.m4 (gl_XSIZE): Do not require AC_C_INLINE.
+
+2012-09-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * fcntl-o.m4 (gl_FCNTL_O_FLAGS): Check for AIX 7.1 bug
+       that caused a GNU tar test failure.  Problem reported by Jez Wain; see
+       <http://lists.gnu.org/archive/html/bug-tar/2012-07/msg00018.html>.
+
 2012-06-22  Bruno Haible  <bruno@clisp.org>
 
        * gettext.m4: Write "Mac OS X" instead of "MacOS X".
index 9862741f3943c38cc2269b8a582c5c4294ddf942..740e78b681987ec062b4db9e8fe8705a3a34b149 100644 (file)
@@ -50,7 +50,18 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
             #if HAVE_SYMLINK
             {
               static char const sym[] = "conftest.sym";
-              if (symlink (".", sym) != 0)
+              if (symlink ("/dev/null", sym) != 0)
+                result |= 2;
+              else
+                {
+                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
+                  if (fd >= 0)
+                    {
+                      close (fd);
+                      result |= 4;
+                    }
+                }
+              if (unlink (sym) != 0 || symlink (".", sym) != 0)
                 result |= 2;
               else
                 {
index 19c6d459f1b8129763c2bd52d1a7898e1916f73f..83da6ccf6202e7356b775749b6f1740b88869887 100644 (file)
@@ -1,4 +1,4 @@
-# lock.m4 serial 12 (gettext-0.18.2)
+# lock.m4 serial 13 (gettext-0.18.2)
 dnl Copyright (C) 2005-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -35,7 +35,5 @@ return !x;
   gl_PREREQ_LOCK
 ])
 
-# Prerequisites of lib/lock.c.
-AC_DEFUN([gl_PREREQ_LOCK], [
-  AC_REQUIRE([AC_C_INLINE])
-])
+# Prerequisites of lib/glthread/lock.c.
+AC_DEFUN([gl_PREREQ_LOCK], [:])
index b3b7feebfae3b993cbfad5fdf0c2d1c82a495b6f..d85a5f10f835fd277686939617d645171baf3772 100644 (file)
@@ -1,4 +1,4 @@
-# xsize.m4 serial 4
+# xsize.m4 serial 5
 dnl Copyright (C) 2003-2004, 2008-2012 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,5 @@ AC_DEFUN([gl_XSIZE],
 [
   dnl Prerequisites of lib/xsize.h.
   AC_REQUIRE([gl_SIZE_MAX])
-  AC_REQUIRE([AC_C_INLINE])
   AC_CHECK_HEADERS([stdint.h])
 ])