summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2016-05-19 11:05:42 +0900
committerDaiki Ueno <ueno@gnu.org>2016-05-19 12:27:19 +0900
commit246b06a664f5f9f9dd0acca65b6b636a90bcd99b (patch)
tree114b744c06b6949d5210e4ef3481fdc7d7833922
parentaab762e6c0afa9f31c0277a60c1d27f50233bc10 (diff)
downloadexternal_gettext-246b06a664f5f9f9dd0acca65b6b636a90bcd99b.zip
external_gettext-246b06a664f5f9f9dd0acca65b6b636a90bcd99b.tar.gz
external_gettext-246b06a664f5f9f9dd0acca65b6b636a90bcd99b.tar.bz2
Update after Gnulib changed
* gnulib-local/lib/gettext.h: Update from gnulib. * gettext-runtime/m4/extern-inline.m4: Likewise. * gettext-runtime/m4/intdiv0.m4: Likewise.
-rw-r--r--gettext-runtime/m4/extern-inline.m41
-rw-r--r--gettext-runtime/m4/intdiv0.m42
-rw-r--r--gnulib-local/lib/gettext.h12
3 files changed, 10 insertions, 5 deletions
diff --git a/gettext-runtime/m4/extern-inline.m4 b/gettext-runtime/m4/extern-inline.m4
index fe282a5..1e578f3 100644
--- a/gettext-runtime/m4/extern-inline.m4
+++ b/gettext-runtime/m4/extern-inline.m4
@@ -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
diff --git a/gettext-runtime/m4/intdiv0.m4 b/gettext-runtime/m4/intdiv0.m4
index a442fd5..744b99e 100644
--- a/gettext-runtime/m4/intdiv0.m4
+++ b/gettext-runtime/m4/intdiv0.m4
@@ -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;
diff --git a/gnulib-local/lib/gettext.h b/gnulib-local/lib/gettext.h
index 20ef0a6..3d4233c 100644
--- a/gnulib-local/lib/gettext.h
+++ b/gnulib-local/lib/gettext.h
@@ -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);