Re: [hpux] Fix build problem on hpux

Mark Kettenis
2006-03-09T19:08:29Z

> Date: Thu, 09 Mar 2006 23:37:48 +0800
> From: Randolph Chung <randolph@tausq.org>
>
> This fixes the build problem on HPUX reported recently by Dave Anglin
> (PR/2097). Thanks to Dave for debugging the problem :)
>
> I'll check this in in a few days unless I hear objections.
>
> Index: config/pa/hppahpux.mt
> ===================================================================
> RCS file: /cvs/src/src/gdb/config/pa/hppahpux.mt,v
> retrieving revision 1.7
> diff -u -p -r1.7 hppahpux.mt
> --- config/pa/hppahpux.mt 13 Dec 2004 04:06:16 -0000 1.7
> +++ config/pa/hppahpux.mt 9 Mar 2006 15:28:16 -0000
> @@ -1,4 +1,4 @@
> # Target: HP PA-RISC running hpux
> -MT_CFLAGS = -DPA_SOM_ONLY=1
> +MT_CFLAGS = -DPA_SOM_ONLY=1 -D_XOPEN_SOURCE_EXTENDED
> TDEPFILES= hppa-tdep.o hppa-hpux-tdep.o corelow.o somread.o hpread.o solib-som.o solib-pa64.o solib.o
> DEPRECATED_TM_FILE= tm-hppah.h

This can't be right. The point is to add -D_XOPEN_SOURCE_EXTENDED
whenever we compile *on* HP-UX, not whenever we're targeting HP-UX.
This should be handled using autoconf, much in the same way as we do
for _GNU_SOURCE, since it affects the functionality made available by
the OS.

The other bit of the patch is ok of course, so you might as well check
that bit in.

Mark