bug-gnulib
[Top][All Lists]
Advanced

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

Re: #ifndef _GL_WCHAR_H in lib/wchar.in.h


From: Bruno Haible
Subject: Re: #ifndef _GL_WCHAR_H in lib/wchar.in.h
Date: Sat, 17 Jan 2009 14:10:57 +0100
User-agent: KMail/1.9.9

> >   $ cd gllib
> >   $ cc -DHAVE_CONFIG_H -I. -I.. -I../intl -g -E getdate.c | \
> >   grep mbstate_t | head -2
> >   extern size_t rpl_wcrtomb (char *s, wchar_t wc, mbstate_t *ps);
> >           typedef char    mbstate_t;
> 
> Thanks for reporting this. Can you send me the complete output of
> "cc -DHAVE_CONFIG_H -I. -I.. -I../intl -g -E getdate.c", please,
> together with a copy of the system include files that are involved?

Thanks for this data. I'm committing this, in an attempt to fix the
problem. Please let me know if it does not fix the problem (and in
that case, please provide the output of
"cc -DHAVE_CONFIG_H -I. -I.. -I../intl -g -E getdate.c" again).


2009-01-17  Bruno Haible  <address@hidden>

        * lib/wchar.in.h: In another particular situation, include only the
        system's <wchar.h> file.
        (_GL_ALREADY_INCLUDING_WCHAR_H): New macro.
        Reported by Albert Chin-A-Young <address@hidden>
        and Thomas Guyot-Sionnest <address@hidden>.

--- lib/wchar.in.h.orig 2009-01-17 14:03:53.000000000 +0100
+++ lib/wchar.in.h      2009-01-17 14:02:23.000000000 +0100
@@ -30,7 +30,7 @@
 @PRAGMA_SYSTEM_HEADER@
 #endif
 
-#if defined __need_mbstate_t || (defined __hpux && ((defined 
_INTTYPES_INCLUDED && !defined strtoimax) || defined 
_GL_JUST_INCLUDE_SYSTEM_WCHAR_H))
+#if defined __need_mbstate_t || (defined __hpux && ((defined 
_INTTYPES_INCLUDED && !defined strtoimax) || defined 
_GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
 /* Special invocation convention:
    - Inside uClibc header files.
    - On HP-UX 11.00 we have a sequence of nested includes
@@ -38,7 +38,10 @@
      once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
      and once directly.  In both situations 'wint_t' is not yet defined,
      therefore we cannot provide the function overrides; instead include only
-     the system's <wchar.h>.  */
+     the system's <wchar.h>.
+   - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
+     the latter includes <wchar.h>.  But here, we have no way to detect whether
+     <wctype.h> is completely included or is still being included.  */
 
 address@hidden@ @NEXT_WCHAR_H@
 
@@ -47,6 +50,8 @@
 
 #ifndef _GL_WCHAR_H
 
+#define _GL_ALREADY_INCLUDING_WCHAR_H
+
 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
    <wchar.h>.
    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
@@ -62,6 +67,8 @@
 # @INCLUDE_NEXT@ @NEXT_WCHAR_H@
 #endif
 
+#undef _GL_ALREADY_INCLUDING_WCHAR_H
+
 #ifndef _GL_WCHAR_H
 #define _GL_WCHAR_H
 




reply via email to

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