]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Update after Gnulib changed
authorDaiki Ueno <ueno@gnu.org>
Thu, 19 May 2016 02:05:42 +0000 (11:05 +0900)
committerDaiki Ueno <ueno@gnu.org>
Thu, 19 May 2016 03:27:19 +0000 (12:27 +0900)
* gnulib-local/lib/gettext.h: Update from gnulib.
* gettext-runtime/m4/extern-inline.m4: Likewise.
* gettext-runtime/m4/intdiv0.m4: Likewise.

gettext-runtime/m4/extern-inline.m4
gettext-runtime/m4/intdiv0.m4
gnulib-local/lib/gettext.h

index fe282a56ca6a873f9084453bec5271b37eb4c980..1e578f3deb426f10df4f03c5948282aa989f9a89 100644 (file)
@@ -54,6 +54,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
       ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
       : (199901L <= __STDC_VERSION__ \
          && !defined __HP_cc \
+         && !defined __PGI \
          && !(defined __SUNPRO_C && __STDC__))) \
      && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
 # define _GL_INLINE inline
index a442fd5bb3720ea4c8870a14dbdda40652629a38..744b99ea8da87ca1f54ab3767030de066029c5f5 100644 (file)
@@ -38,7 +38,7 @@ static void
 sigfpe_handler (int sig)
 {
   /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
-  exit (sig != SIGFPE);
+  _exit (sig != SIGFPE);
 }
 
 int x = 1;
index 20ef0a6b4e16a761b348ad4abdd217cb10880bf6..3d4233c7242b38e5627501c16f2603e5a5c5b631 100644 (file)
@@ -1,6 +1,6 @@
 /* Convenience header for conditional use of GNU <libintl.h>.
-   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011, 2015-2016 Free
-   Software Foundation, Inc.
+   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2016 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
@@ -225,15 +225,17 @@ dcpgettext_expr (const char *domain,
   if (msg_ctxt_id != NULL)
 #endif
     {
+      int found_translation;
       memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
       msg_ctxt_id[msgctxt_len - 1] = '\004';
       memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
       translation = dcgettext (domain, msg_ctxt_id, category);
+      found_translation = (translation != msg_ctxt_id);
 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
       if (msg_ctxt_id != buf)
         free (msg_ctxt_id);
 #endif
-      if (translation != msg_ctxt_id)
+      if (found_translation)
         return translation;
     }
   return msgid;
@@ -271,15 +273,17 @@ dcnpgettext_expr (const char *domain,
   if (msg_ctxt_id != NULL)
 #endif
     {
+      int found_translation;
       memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
       msg_ctxt_id[msgctxt_len - 1] = '\004';
       memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
       translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+      found_translation = !(translation == msg_ctxt_id || translation == msgid_plural);
 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
       if (msg_ctxt_id != buf)
         free (msg_ctxt_id);
 #endif
-      if (!(translation == msg_ctxt_id || translation == msgid_plural))
+      if (found_translation)
         return translation;
     }
   return (n == 1 ? msgid : msgid_plural);