This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/9989] [HPUX 11.00, gcc 3.3] fixing of stdio.h fails


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9989



------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca  2003-06-27 17:29 -------
Subject: Re:  [HPUX 11.00, gcc 3.3] fixing of stdio.h fails

> The line reported (429) is the last #include line of the following 
> excerpt (in gcc/include/stdio.h):
> 
> -----------------------------------------------------------------------
> #   ifndef __GNUC__
> #    ifdef __hp9000s300
> #      ifndef _DUMMY_VA_LIST
> #        define _DUMMY_VA_LIST
>           typedef char *__not_va_list__;
> #      endif  /* _DUMMY_VA_LIST */
> #    endif /* __hp9000s300 */
> 
> #    ifdef __hp9000s800
> #      ifndef _DUMMY_VA_LIST
> #        define _DUMMY_VA_LIST
> _NAMESPACE_STD_START
>           typedef double *__not_va_list__;
> _NAMESPACE_STD_END
> #      endif  /* _DUMMY_VA_LIST */
> #    endif /* __hp9000s800 */
> #   else
> #    include <varargs.h>
> #   endif

Ok, I am 99.9% certain that somebody has edited /usr/include/stdio.h on
your system.  In particular, you have in /usr/include/stdio.h

#   ifndef __GNUC__
     [HP stuff]
#   else
#    include <varargs.h>
#   endif

That __GNUC__ ifndef, including the include of varargs.h, is not part
of the original HP header.  As far as I can tell, GCC's fix includes
doesn't generate such a construct.  __GNUC__ is a GCC specific compiler
define which should never appear in HP headers.  GCC's fixes to
the HP stuff appear ok.

If you want to hack headers for GCC, copy them into GCC's private
include directory and hack them there.  This is safer, although
the hacks will be lost if the same version of GCC is reinstalled.

I suggest removing the above ifndef leaving the HP stuff.  This should
allow GCC to build.  Further, go to ftp.itrc.hp.com and download the
patch catalog for HP-UX 11.X.  Then, grab the latest libc and libc header
patches for HP-UX 11.00 and install them.  There probably is an updated
version of the stdio.h header in the libc header patch.

Dave


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]