bug-gnulib
[Top][All Lists]
Advanced

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

Re: int32_t compile failure on OSF 4.0


From: Bruno Haible
Subject: Re: int32_t compile failure on OSF 4.0
Date: Fri, 26 Dec 2008 11:00:39 +0100
User-agent: KMail/1.9.9

Hi Eric,

> Nelson H. F. Beebe gave me an off-list report of a compile failure on a
> DEC Alpha machine running OSF/1 4.0.  He ran with two different compilers:
> 
> checking host system type... alphaev56-dec-osf4.0f
> 
> In file included from getopt.h:35,
>                  from
> /export/local/alpha-osf1/lib/gcc-lib/alphaev56-dec-osf4.0f/3.3.3/include/stdio.h:402,
>                  from stdio.h:35,
>                  from wchar.h:49,
>                  from stdint.h:97,
>                  from gl_linkedhash_list.c:23:
> stdlib.h:52: error: parse error before "int32_t"
> 
> 
> source='gl_linkedhash_list.c' object='gl_linkedhash_list.o' libtool=no \
>       DEPDIR=.deps depmode=tru64 /bin/ksh ../build-aux/depcomp \
>       cc -std -std  -I.   -ieee -I/usr/local/include  -ieee
> -I/usr/local/include -c -o gl_linkedhash_list.o gl_linkedhash_list.c
> cc: Error: ./stdlib.h, line 52: Missing type specifier or type qualifier.
> (missingtype)
>   int32_t *fptr;              /* Front pointer.  */
> --^
> 
> It seems like it might be a case of one system header being pulled in from
> another, but where gnulib's replacement header gets in the way

Yes. This patch should fix it.


2008-12-26  Bruno Haible  <address@hidden>

        * lib/stdint.in.h: Move the include of <wchar.h> down until after all
        the types are defined. Also conditionalize it on __STDC_LIMIT_MACROS,
        not __STDC_CONSTANT_MACROS.
        Reported by Nelson H. F. Beebe <address@hidden> via Eric Blake.

*** lib/stdint.in.h.orig        2008-12-26 10:55:38.000000000 +0100
--- lib/stdint.in.h     2008-12-26 10:55:37.000000000 +0100
***************
*** 89,103 ****
  # include <sys/bitypes.h>
  #endif
  
- #if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
- 
- /* Get WCHAR_MIN, WCHAR_MAX.  */
- # if ! (defined WCHAR_MIN && defined WCHAR_MAX)
- #  include <wchar.h>
- # endif
- 
- #endif
- 
  #undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
  
  /* Minimum and maximum values for a integer type under the usual assumption.
--- 89,94 ----
***************
*** 482,487 ****
--- 473,485 ----
  #endif
  
  /* wchar_t limits */
+ /* Get WCHAR_MIN, WCHAR_MAX.
+    This include is not on the top, above, because on OSF/1 4.0 we have a 
sequence of nested
+    includes <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the 
latter includes
+    <stdint.h> and assumes its types are already defined.  */
+ #if ! (defined WCHAR_MIN && defined WCHAR_MAX)
+ # include <wchar.h>
+ #endif
  #undef WCHAR_MIN
  #undef WCHAR_MAX
  #define WCHAR_MIN  \




reply via email to

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