From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7955 invoked by alias); 5 May 2005 17:14:56 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 7160 invoked from network); 5 May 2005 17:14:38 -0000 Received: from unknown (HELO palrel10.hp.com) (156.153.255.245) by sourceware.org with SMTP; 5 May 2005 17:14:38 -0000 Received: from smtp1.ptp.hp.com (smtp1.ptp.hp.com [15.1.28.250]) by palrel10.hp.com (Postfix) with ESMTP id 50972B70 for ; Thu, 5 May 2005 10:14:38 -0700 (PDT) Received: from hpsje.cup.hp.com (hpsje.cup.hp.com [15.244.96.221]) by smtp1.ptp.hp.com (Postfix) with ESMTP id E343714CD9D for ; Thu, 5 May 2005 17:14:37 +0000 (UTC) Received: (from sje@localhost) by hpsje.cup.hp.com (8.9.3 (PHNE_24419+JAGae58098)/8.7.3 TIS Messaging 5.0) id KAA17413 for binutils@sources.redhat.com; Thu, 5 May 2005 10:14:37 -0700 (PDT) Date: Thu, 05 May 2005 17:26:00 -0000 From: Steve Ellcey Message-Id: <200505051714.KAA17413@hpsje.cup.hp.com> To: binutils@sources.redhat.com Subject: Another HP-UX IA64 Build patch Reply-To: sje@cup.hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2005-05/txt/msg00183.txt.bz2 Here is the second of my IA64 HP-UX build patches. This one involves the declaration of basename() in include/libiberty.h. What do people think about using the prototype version whenever we are compiling with GCC? I did that rather than checking for HP-UX because some HP-UX systems (old PA ones) cannot handle the prototype but it seems like GCC should always be able to deal with it and it is when using GCC that "-Wall -Werror" will be set so I thought it might be better to check for GCC rather than HP-UX. Does this seem reasonable to people? Maybe we could remove some of the OS checks if we checked for GCC instead. Tested on IA64 HP-UX. Steve Ellcey sje@cup.hp.com include/ChangeLog: 2005-05-05 Steve Ellcey libiberty.h: Use prototype for basename if compiling with GCC. *** src.orig/include/libiberty.h Thu May 5 10:04:07 2005 --- src/include/libiberty.h Thu May 5 10:07:44 2005 *************** extern char **dupargv (char **) ATTRIBUT *** 94,100 **** to find the declaration so provide a fully prototyped one. If it is 1, we found it so don't provide any declaration at all. */ #if !HAVE_DECL_BASENAME ! #if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) || defined (HAVE_DECL_BASENAME) extern char *basename (const char *); #else extern char *basename (); --- 94,100 ---- to find the declaration so provide a fully prototyped one. If it is 1, we found it so don't provide any declaration at all. */ #if !HAVE_DECL_BASENAME ! #if defined (__GNU_LIBRARY__ ) || defined (__GNUC__) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) || defined (HAVE_DECL_BASENAME) extern char *basename (const char *); #else extern char *basename ();