From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23776 invoked by alias); 29 Mar 2006 00:04:23 -0000 Received: (qmail 23768 invoked by uid 22791); 29 Mar 2006 00:04:23 -0000 X-Spam-Check-By: sourceware.org Received: from ip127.bb146.pacific.net.hk (HELO mailhub.stlglobal.com) (202.64.146.127) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 29 Mar 2006 00:04:21 +0000 Received: from localhost ([127.0.0.1]) by mailhub.stlglobal.com with esmtp (Exim 4.50) id 1FOOAY-0001kS-2U; Wed, 29 Mar 2006 08:04:14 +0800 Message-ID: <4429CEFE.50103@tausq.org> Date: Wed, 29 Mar 2006 00:28:00 -0000 From: Randolph Chung User-Agent: Debian Thunderbird 1.0.2 (X11/20051002) MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb-patches@sources.redhat.com Subject: Re: [hpux] Fix build problem on hpux References: <44104BCC.8060700@tausq.org> <200603091908.k29J8E67001447@elgar.sibelius.xs4all.nl> <4410C609.5090207@tausq.org> <20060310023252.GA10422@nevyn.them.org> <4410EE58.1060007@tausq.org> <20060310035929.GA12013@nevyn.them.org> <4410FF26.40509@tausq.org> <44264904.6000005@tausq.org> <20060328221800.GA11817@nevyn.them.org> In-Reply-To: <20060328221800.GA11817@nevyn.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00335.txt.bz2 Daniel Jacobowitz wrote: > On Sun, Mar 26, 2006 at 03:55:48PM +0800, Randolph Chung wrote: > >>+# When building on HPUX, we need to define _XOPEN_SOURCE_EXTENDED to get >>+# proper prototypes. >>+case $host_os in >>+hpux*) >>+ AH_VERBATIM([_XOPEN_SOURCE_EXTENDED], >>+ [/* Define to 1 if on HPUX. */ >>+#ifndef _XOPEN_SOURCE_EXTENDED >>+# undef _XOPEN_SOURCE_EXTENDED >>+#endif])dnl >>+ AC_DEFINE([_XOPEN_SOURCE_EXTENDED]) >>+ ;; >>+esac > > > I am most confused as to what you are trying to do. You should leave > _XOPEN_SOURCE_EXTENDED alone on non-HP/UX, and make sure it is > appropriately defined on HP/UX. Yes, this is exactly what I am trying to do. What is confusing. > #ifndef followed by #undef doesn't > do much. And I don't think AH_VERBATIM does what you think; it changes > the generated config.in, not the generated config.h, so it affects all > platforms. Yes, I know. Normally autoheader will generate just the #undef line; the above makes it generate the #undef inside the #ifndef. This is the same logic used to generate the _GNU_SOURCE #define in config.in. The #undef is changed into a #define by configure on hpux. On other systems, you are right that the three lines don't do anything, and that is the desired effect. The problem is that we are trying to avoid a redefinition of _XOPEN_SOURCE_EXTENDED, in case this define is by default enabled on a particular platform. randolph