changeset 17282:a4996fb12971

locale: port to Solaris 2.6 and 7 + GNU gettext * lib/locale.in.h: Just include_next <locale.h> when being invoked recursively. This prevents problems on Solaris 2.6 and 7 when combining the localename module with GNU gettext 0.18.2. Problem reported by Tom G. Christensen in <http://lists.gnu.org/archive/html/bug-gnulib/2013-01/msg00084.html>.
author Paul Eggert <eggert@cs.ucla.edu>
date Thu, 10 Jan 2013 13:24:13 -0800
parents 01978a889dad
children ccd519631b21
files ChangeLog lib/locale.in.h
diffstat 2 files changed, 26 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-01-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+	locale: port to Solaris 2.6 and 7 + GNU gettext
+	* lib/locale.in.h: Just include_next <locale.h> when
+	being invoked recursively.  This prevents problems on Solaris 2.6 and 7
+	when combining the localename module with GNU gettext 0.18.2.
+	Problem reported by Tom G. Christensen in
+	<http://lists.gnu.org/archive/html/bug-gnulib/2013-01/msg00084.html>.
+
 2013-01-09  Paul Eggert  <eggert@cs.ucla.edu>
 
 	stdlib: port to Solaris 2.6
--- a/lib/locale.in.h
+++ b/lib/locale.in.h
@@ -14,16 +14,30 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifndef _@GUARD_PREFIX@_LOCALE_H
-
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 @PRAGMA_COLUMNS@
 
+#ifdef _GL_ALREADY_INCLUDING_LOCALE_H
+
+/* Special invocation conventions to handle Solaris header files
+   (through Solaris 10) when combined with gettext's libintl.h.  */
+
+#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
+
+#else
+/* Normal invocation convention.  */
+
+#ifndef _@GUARD_PREFIX@_LOCALE_H
+
+#define _GL_ALREADY_INCLUDING_LOCALE_H
+
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_LOCALE_H@
 
+#undef _GL_ALREADY_INCLUDING_LOCALE_H
+
 #ifndef _@GUARD_PREFIX@_LOCALE_H
 #define _@GUARD_PREFIX@_LOCALE_H
 
@@ -198,4 +212,5 @@
 #endif
 
 #endif /* _@GUARD_PREFIX@_LOCALE_H */
+#endif /* ! _GL_ALREADY_INCLUDING_LOCALE_H */
 #endif /* _@GUARD_PREFIX@_LOCALE_H */