diff options
-rw-r--r-- | gl/wchar.in.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gl/wchar.in.h b/gl/wchar.in.h index e069cfaa..cc436b14 100644 --- a/gl/wchar.in.h +++ b/gl/wchar.in.h | |||
@@ -30,7 +30,7 @@ | |||
30 | @PRAGMA_SYSTEM_HEADER@ | 30 | @PRAGMA_SYSTEM_HEADER@ |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | #if defined __need_mbstate_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) | 33 | #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 |
34 | /* Special invocation convention: | 34 | /* Special invocation convention: |
35 | - Inside uClibc header files. | 35 | - Inside uClibc header files. |
36 | - On HP-UX 11.00 we have a sequence of nested includes | 36 | - On HP-UX 11.00 we have a sequence of nested includes |
@@ -38,7 +38,10 @@ | |||
38 | once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h> | 38 | once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h> |
39 | and once directly. In both situations 'wint_t' is not yet defined, | 39 | and once directly. In both situations 'wint_t' is not yet defined, |
40 | therefore we cannot provide the function overrides; instead include only | 40 | therefore we cannot provide the function overrides; instead include only |
41 | the system's <wchar.h>. */ | 41 | the system's <wchar.h>. |
42 | - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and | ||
43 | the latter includes <wchar.h>. But here, we have no way to detect whether | ||
44 | <wctype.h> is completely included or is still being included. */ | ||
42 | 45 | ||
43 | #@INCLUDE_NEXT@ @NEXT_WCHAR_H@ | 46 | #@INCLUDE_NEXT@ @NEXT_WCHAR_H@ |
44 | 47 | ||
@@ -47,6 +50,8 @@ | |||
47 | 50 | ||
48 | #ifndef _GL_WCHAR_H | 51 | #ifndef _GL_WCHAR_H |
49 | 52 | ||
53 | #define _GL_ALREADY_INCLUDING_WCHAR_H | ||
54 | |||
50 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before | 55 | /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before |
51 | <wchar.h>. | 56 | <wchar.h>. |
52 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be | 57 | BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be |
@@ -62,6 +67,8 @@ | |||
62 | # @INCLUDE_NEXT@ @NEXT_WCHAR_H@ | 67 | # @INCLUDE_NEXT@ @NEXT_WCHAR_H@ |
63 | #endif | 68 | #endif |
64 | 69 | ||
70 | #undef _GL_ALREADY_INCLUDING_WCHAR_H | ||
71 | |||
65 | #ifndef _GL_WCHAR_H | 72 | #ifndef _GL_WCHAR_H |
66 | #define _GL_WCHAR_H | 73 | #define _GL_WCHAR_H |
67 | 74 | ||