From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4488 invoked by alias); 5 May 2005 22:24:31 -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 4314 invoked from network); 5 May 2005 22:24:24 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 5 May 2005 22:24:24 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j45MOOZo012825 for ; Thu, 5 May 2005 18:24:24 -0400 Received: from post-office.corp.redhat.com (post-office.corp.redhat.com [172.16.52.227]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j45MOOO30235; Thu, 5 May 2005 18:24:24 -0400 Received: from greed.delorie.com (dj.cipe.redhat.com [10.0.0.222]) by post-office.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j45MONv27574; Thu, 5 May 2005 18:24:24 -0400 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1]) by greed.delorie.com (8.13.1/8.13.1) with ESMTP id j45MONnE019852; Thu, 5 May 2005 18:24:23 -0400 Received: (from dj@localhost) by greed.delorie.com (8.13.1/8.13.1/Submit) id j45MOH22019801; Thu, 5 May 2005 18:24:17 -0400 Date: Thu, 05 May 2005 22:46:00 -0000 Message-Id: <200505052224.j45MOH22019801@greed.delorie.com> From: DJ Delorie To: wilson@specifixinc.com CC: sje@cup.hp.com, binutils@sources.redhat.com In-reply-to: <1115329225.8413.146.camel@aretha.corp.specifixinc.com> (message from James E Wilson on Thu, 05 May 2005 14:40:25 -0700) Subject: Re: Another HP-UX IA64 Build patch References: <200505052024.NAA17735@hpsje.cup.hp.com> <200505052042.j45Kg1Po027434@greed.delorie.com> <1115329225.8413.146.camel@aretha.corp.specifixinc.com> X-SW-Source: 2005-05/txt/msg00217.txt.bz2 One option is to not allow the use of basename() without the HAVE_DECL_BASENAME test. We can do this by #definining basename() to you_forgot_the_have_decl_basename_check() in the non-prototype case in libiberty.h. I suspect that would break a *lot* of unsuspecting applications. But, we can't have a basename that's unprototyped on, for example, amd64 machines where the return type must be known (pointer vs int). But how does gcc deal with system headers that have empty prototypes for functions? If we can hook into that, that would help. But I wouldn't recommend using where "libiberty.h" is appropriate. > I suppose there is a third option which is to simplify libiberty.h > to always emit the prototype for basename. basename is different because we *can't* just emit a prototype, as it sometimes conflicts with the OS's prototype. > basename is the only function in libiberty.h for which we can emit a > non-prototype when HAVE_DECL_foo is undefined. It's the only one that doesn't return "int" so we must, or we corrupt pointers on 64-bit-pointer machines.