This is the mail archive of the
mailing list for the GCC project.
Re: Patch: tfformat.c doesn't compile under hpux 10.20
- To: law at cygnus dot com
- Subject: Re: Patch: tfformat.c doesn't compile under hpux 10.20
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Wed, 13 Sep 2000 14:21:51 -0400 (EDT)
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
> Perhaps the testsuite should be building with -ansi? That should turn
> off the HPUX extensions.
I was considering a similar approach but I think -ansi may be a bit too
restrictive. I suggest `-undef -ansi -D_XOPEN_SOURCE'. Here are
the defines from a simple module that just includes sys/stdsyms.h
under hpux 10.20:
#define __STRICT_ANSI__ 1
#define _PA_RISC1_1 1
#define __hp9000s700 1
#define __GNUC_MINOR__ 95
#define __GNUC__ 2
#define _XOPEN_SOURCE 1
This gives us includes per POSIX.2 (IEEE Standard 1003.2-1990) and
XPG4 (X/Open Portability Guide Issue 4). The defaults will vary from
somewhat from system to system. However, the result will be much better
defined than using the default namespace for each system.
I will give this a try and see what happens. The problematic defines
in stdlib.h are already wrapped in _INCLUDE_HPUX_SOURCE. Thus if the above
works, no change would be needed to the header file.
> > Does the hpux community think that this misfeature should be fixed?
> My experience is that we need to have _HPUX_SOURCE defined or the system
> is basically unusable.
This is probably true but I haven't really tried using the POSIX or XOPEN
J. David Anglin firstname.lastname@example.org
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)