bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gettext] References to gnulib code


From: Daiki Ueno
Subject: Re: [bug-gettext] References to gnulib code
Date: Tue, 17 Dec 2013 13:14:24 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Reuben Thomas <address@hidden> writes:

> With gettext 0.18.3.1, "make distcheck" fails, because when it tries
> to build libintl (using --with-included-gettext, as make distcheck
> does), it finds references to symbols like _GL_INLINE_HEADER_BEGIN in
> xsize.h, which are not satisfied, as this particular project is not
> using gnulib. I can't see anything in the gettext documentation that
> tells me I must use gnulib with gettext, so either the documentation
> needs updating, or the undefined symbols need to be defined, it would
> seem.

Indeed, thanks for the report.  It seems 0.18.3.1 has missing
extern-inline.m4 in the archive, where _GL_INLINE_HEADER_BEGIN shall be
defined at configure time.  I've pushed the attached fix.

Maybe we should make another minor release.

Regards,
-- 
Daiki Ueno
>From b24163816495c1ee5dfb2ff46e6893d7ae49db2b Mon Sep 17 00:00:00 2001
From: Daiki Ueno <address@hidden>
Date: Tue, 17 Dec 2013 12:16:02 +0900
Subject: [PATCH] Add missing extern-inline.m4 into archive

Problem reported by Reuben Thomas in:
<https://lists.gnu.org/archive/html/bug-gettext/2013-12/msg00010.html>.
* gettext-runtime/m4/extern-inline.m4: New file, from gnulib.
* gettext-runtime/m4/intl.m4 (AM_INTL_SUBDIR): Require gl_EXTERN_INLINE.
* gettext-runtime/m4/Makefile.am (EXTRA_DIST): Update.
* gettext-tools/m4/Makefile.am (aclocal_DATA): Add extern-inline.m4.
* Makefile.am (distcheck-hook): Check extern-inline.m4.
---
 ChangeLog                           |  7 ++++
 Makefile.am                         |  1 +
 gettext-runtime/m4/ChangeLog        |  9 +++++
 gettext-runtime/m4/Makefile.am      |  1 +
 gettext-runtime/m4/extern-inline.m4 | 70 +++++++++++++++++++++++++++++++++++++
 gettext-runtime/m4/intl.m4          |  3 +-
 gettext-tools/m4/ChangeLog          |  7 ++++
 gettext-tools/m4/Makefile.am        |  1 +
 8 files changed, 98 insertions(+), 1 deletion(-)
 create mode 100644 gettext-runtime/m4/extern-inline.m4

diff --git a/ChangeLog b/ChangeLog
index 270d05b..69d01b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-12-17  Daiki Ueno  <address@hidden>
+
+       Add missing extern-inline.m4 into archive.
+       Problem reported by Reuben Thomas in:
+       <https://lists.gnu.org/archive/html/bug-gettext/2013-12/msg00010.html>.
+       * Makefile.am (distcheck-hook): Check extern-inline.m4.
+
 2013-08-13  Michele Locati <address@hidden>  (tiny change)
 
        * windows/gettext.rc: Update copyright year.
diff --git a/Makefile.am b/Makefile.am
index 9807288..2f1a383 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,6 +42,7 @@ distcheck-hook:
        cmp -s gettext-runtime/po/remove-potcdate.sin 
gettext-tools/po/remove-potcdate.sin
        cmp -s gettext-runtime/po/remove-potcdate.sin 
gettext-tools/examples/po/remove-potcdate.sin
        cmp -s gettext-runtime/m4/codeset.m4 gettext-tools/gnulib-m4/codeset.m4
+       cmp -s gettext-runtime/m4/extern-inline.m4 
gettext-tools/gnulib-m4/extern-inline.m4
        cmp -s gettext-runtime/m4/fcntl-o.m4 gettext-tools/gnulib-m4/fcntl-o.m4
        cmp -s gettext-runtime/m4/gettext.m4 gettext-tools/gnulib-m4/gettext.m4
        cmp -s gettext-runtime/m4/glibc2.m4 gettext-tools/gnulib-m4/glibc2.m4
diff --git a/gettext-runtime/m4/ChangeLog b/gettext-runtime/m4/ChangeLog
index a3407a4..dd96b6d 100644
--- a/gettext-runtime/m4/ChangeLog
+++ b/gettext-runtime/m4/ChangeLog
@@ -1,3 +1,12 @@
+2013-12-17  Daiki Ueno  <address@hidden>
+
+       Add missing extern-inline.m4 into archive.
+       Problem reported by Reuben Thomas in:
+       <https://lists.gnu.org/archive/html/bug-gettext/2013-12/msg00010.html>.
+       * extern-inline.m4: New file, from gnulib.
+       * intl.m4 (AM_INTL_SUBDIR): Require gl_EXTERN_INLINE.
+       * Makefile.am (EXTRA_DIST): Update.
+
 2013-08-09  Daiki Ueno  <address@hidden>
 
        * intl.m4 (AM_INTL_SUBDIR): Fix AC_CHECK_DECLS usage.
diff --git a/gettext-runtime/m4/Makefile.am b/gettext-runtime/m4/Makefile.am
index bf10c67..740e462 100644
--- a/gettext-runtime/m4/Makefile.am
+++ b/gettext-runtime/m4/Makefile.am
@@ -4,6 +4,7 @@
 # find . -type f -name '*.m4' -printf '%f\n' | sort | tr '\012' @ | sed 
's/@$/%/;s/@/ \\@/g' | tr @% '\012\012'
 EXTRA_DIST = README \
 codeset.m4 \
+extern-inline.m4 \
 fcntl-o.m4 \
 gettext.m4 \
 glibc2.m4 \
diff --git a/gettext-runtime/m4/extern-inline.m4 
b/gettext-runtime/m4/extern-inline.m4
new file mode 100644
index 0000000..c4c5e7f
--- /dev/null
+++ b/gettext-runtime/m4/extern-inline.m4
@@ -0,0 +1,70 @@
+dnl 'extern inline' a la ISO C99.
+
+dnl Copyright 2012-2013 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EXTERN_INLINE],
+[
+  AH_VERBATIM([extern_inline],
+[/* Please see the Gnulib manual for how to use these macros.
+
+   Suppress extern inline with HP-UX cc, as it appears to be broken; see
+   <http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
+
+   Suppress extern inline with Sun C in standards-conformance mode, as it
+   mishandles inline functions that call each other.  E.g., for 'inline void f
+   (void) { } inline void g (void) { f (); }', c99 incorrectly complains
+   'reference to static identifier "f" in extern inline function'.
+   This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
+
+   Suppress the use of extern inline on Apple's platforms, as Libc at least
+   through Libc-825.26 (2013-04-09) is incompatible with it; see, e.g.,
+   <http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
+   Perhaps Apple will fix this some day.  */
+#if ((__GNUC__ \
+      ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+      : (199901L <= __STDC_VERSION__ \
+         && !defined __HP_cc \
+         && !(defined __SUNPRO_C && __STDC__))) \
+     && !defined __APPLE__)
+# define _GL_INLINE inline
+# define _GL_EXTERN_INLINE extern inline
+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+       && !defined __APPLE__)
+# if __GNUC_GNU_INLINE__
+   /* __gnu_inline__ suppresses a GCC 4.2 diagnostic.  */
+#  define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
+# else
+#  define _GL_INLINE extern inline
+# endif
+# define _GL_EXTERN_INLINE extern
+#else
+# define _GL_INLINE static _GL_UNUSED
+# define _GL_EXTERN_INLINE static _GL_UNUSED
+#endif
+
+#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__)
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
+#  define _GL_INLINE_HEADER_CONST_PRAGMA
+# else
+#  define _GL_INLINE_HEADER_CONST_PRAGMA \
+     _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
+# endif
+  /* Suppress GCC's bogus "no previous prototype for 'FOO'"
+     and "no previous declaration for 'FOO'"  diagnostics,
+     when FOO is an inline function in the header; see
+     <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113>.  */
+# define _GL_INLINE_HEADER_BEGIN \
+    _Pragma ("GCC diagnostic push") \
+    _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
+    _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
+    _GL_INLINE_HEADER_CONST_PRAGMA
+# define _GL_INLINE_HEADER_END \
+    _Pragma ("GCC diagnostic pop")
+#else
+# define _GL_INLINE_HEADER_BEGIN
+# define _GL_INLINE_HEADER_END
+#endif])
+])
diff --git a/gettext-runtime/m4/intl.m4 b/gettext-runtime/m4/intl.m4
index dffcd88..67feb58 100644
--- a/gettext-runtime/m4/intl.m4
+++ b/gettext-runtime/m4/intl.m4
@@ -1,4 +1,4 @@
-# intl.m4 serial 24 (gettext-0.18.3)
+# intl.m4 serial 25 (gettext-0.18.3)
 dnl Copyright (C) 1995-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -42,6 +42,7 @@ AC_DEFUN([AM_INTL_SUBDIR],
   AC_REQUIRE([gl_XSIZE])dnl
   AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl
   AC_REQUIRE([gt_INTL_MACOSX])dnl
+  AC_REQUIRE([gl_EXTERN_INLINE])dnl
 
   dnl Support for automake's --enable-silent-rules.
   case "$enable_silent_rules" in
diff --git a/gettext-tools/m4/ChangeLog b/gettext-tools/m4/ChangeLog
index 45967b6..e2ddbaa 100644
--- a/gettext-tools/m4/ChangeLog
+++ b/gettext-tools/m4/ChangeLog
@@ -1,3 +1,10 @@
+2013-12-17  Daiki Ueno  <address@hidden>
+
+       Add missing extern-inline.m4 into archive.
+       Problem reported by Reuben Thomas in:
+       <https://lists.gnu.org/archive/html/bug-gettext/2013-12/msg00010.html>.
+       * Makefile.am (aclocal_DATA): Add extern-inline.m4.
+
 2012-12-25  Daiki Ueno  <address@hidden>
 
        * gettext-0.18.2 released.
diff --git a/gettext-tools/m4/Makefile.am b/gettext-tools/m4/Makefile.am
index b994ae5..3c4c53c 100644
--- a/gettext-tools/m4/Makefile.am
+++ b/gettext-tools/m4/Makefile.am
@@ -8,6 +8,7 @@ aclocal_DATA = \
   ../../gettext-runtime/gnulib-m4/lib-link.m4 \
   ../../gettext-runtime/gnulib-m4/lib-prefix.m4 \
   ../../gettext-runtime/m4/codeset.m4 \
+  ../../gettext-runtime/m4/extern-inline.m4 \
   ../../gettext-runtime/m4/fcntl-o.m4 \
   ../../gettext-runtime/m4/gettext.m4 \
   ../../gettext-runtime/m4/glibc2.m4 \
-- 
1.8.3.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]