locale: port to Solaris 2.6 and 7 + GNU gettext
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 10 Jan 2013 21:24:13 +0000 (13:24 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 12 Jan 2013 23:09:13 +0000 (15:09 -0800)
* 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>.

ChangeLog
lib/locale.in.h

index 3b34c93..732fa03 100644 (file)
--- 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
index 97926f0..264161a 100644 (file)
    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 @@ _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
 #endif
 
 #endif /* _@GUARD_PREFIX@_LOCALE_H */
+#endif /* ! _GL_ALREADY_INCLUDING_LOCALE_H */
 #endif /* _@GUARD_PREFIX@_LOCALE_H */