This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Missing -D_HPUX_SOURCE from egcs-1.0 (HP-UX 10.20) specs file
- To: egcs-bugs at cygnus dot com
- Subject: Missing -D_HPUX_SOURCE from egcs-1.0 (HP-UX 10.20) specs file
- From: Graham Hudspith <ghudspit at mltsa dot uk dot lucent dot com>
- Date: Sat, 06 Dec 1997 10:56:14 +0000
- Organization: Lucent Technologies
Dear EGCS,
Built and installed:
gcc version egcs-2.90.21 971202 (egcs-1.00 release)
on both hppa1.1-hp-hpux10.20 and sparc-sun-sunos4.1.3_U1. Very
clean build and install, especially with 'make bootstrap'!
Anyway, noticed a couple of funnies in the 'specs' file
compared with gcc v2.7.2.1:
(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?
(2) Under the '*predefines' section, see the following:
-Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux
-Dunix -Asystem(unix) -Asystem(hpux) -Acpu(hppa)
-Amachine(hppa)
Under gcc v2.7.2.1, this section also contained a
-D_HPUX_SOURCE.
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!
For example, the following compiles when -ansi is NOT
specified, and fails to compile when it IS:
#include <stdio.h>
int main ()
{
caddr_t c1;
return 0;
}
Of course, I'm quite happy to manually add -D_HPUX_SOURCE
to our spec files when I install, but would like to
know why I have to do this and whether this is a good
idea or not.
Regards,
Graham.
--
Graham Hudspith, Transmission Dev Group, | Email:
graham.hudspith@lucent.com
Lucent Technologies Network Systems (UK),|
Swindon Road, Malmesbury, |
Wiltshire SN16 9NA, UK. | Phone: +44 1666 832372/822861