This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Missing -D_HPUX_SOURCE from egcs-1.0 (HP-UX 10.20) specs file
- To: Graham Hudspith <ghudspit at mltsa dot uk dot lucent dot com>
- Subject: Re: Missing -D_HPUX_SOURCE from egcs-1.0 (HP-UX 10.20) specs file
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sat, 06 Dec 1997 08:37:35 -0700
- cc: egcs-bugs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <34892F4E.9F@mltsa.uk.lucent.com>you write:
> on both hppa1.1-hp-hpux10.20 and sparc-sun-sunos4.1.3_U1. Very
> clean build and install, especially with 'make bootstrap'!
Thanks.
> (1) Under the '*cpp' section, see the following:
>
> %{!mpa-risc-1-0:%{!mnosnake:%{!msoft-float:-D__hp9000s700
> -D_PA_RISC1_1}}} %{!ansi: -D_HPUX_SOURCE -D_HIUX_SOURCE}
>
> This is all complete gibberish to me, I'm afraid, but
> is -D_HIUX_SOURCE supposed to be there? Or is it a typo?
Well, it means HPUX_SOURCE & HIUX_SOURCE are only defined when the
-ansi switch is _not_ used.
> Under gcc v2.7.2.1, this section also contained a
> -D_HPUX_SOURCE.
Right. However, that was a bug.
> Using egcs WITH the '-ansi' flag, none of our source
> code compiles if it includes any of the header files
> that come with HP-UX (e.g. stdio.h) because things like
> 'caddr_t' only get defined with -D_HPUX_SOURCE set!
caddr_t is not an ANSI type. Thus it is not available when you ask
for strict ANSI (-ansi).
If you want a strict ANSI environment use -ansi
If you want ANSI + the HPUX specific namespace pollution use
-ansi -D_HPUX_SOURCE
jeff