From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20011 invoked by alias); 5 May 2005 18:12:58 -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 19588 invoked from network); 5 May 2005 18:12:44 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 5 May 2005 18:12:44 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50 #1 (Debian)) id 1DTkq1-00050k-Q4; Thu, 05 May 2005 14:12:41 -0400 Date: Thu, 05 May 2005 18:16:00 -0000 From: Daniel Jacobowitz To: James E Wilson Cc: Steve Ellcey , binutils@sources.redhat.com Subject: Re: Another HP-UX IA64 Build patch Message-ID: <20050505181241.GA19179@nevyn.them.org> Mail-Followup-To: James E Wilson , Steve Ellcey , binutils@sources.redhat.com References: <200505051751.KAA17543@hpsje.cup.hp.com> <1115316630.8413.20.camel@aretha.corp.specifixinc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1115316630.8413.20.camel@aretha.corp.specifixinc.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-05/txt/msg00194.txt.bz2 On Thu, May 05, 2005 at 11:10:30AM -0700, James E Wilson wrote: > On Thu, 2005-05-05 at 10:51, Steve Ellcey wrote: > > I see it doesn't have the const modifier that libiberty has. I didn't > > get a warning or error presumbably because the build didn't include > > libgen.h. > > This is a libiberty bug. Try "man basename" on a linux system, and it > will tell you that there are two versions of basename. The posix one > which takes a char * argument, and a glibc _GNU_SOURCE one which takes a > const char * argument. So this probably should be something like > #if defined(_GNU_SOURCE) > extern char *basename (const char *); > #elif defined... > extern char *basename (char *); > #else > extern char *basename (); > #endif > > But it appears that nobody is including libgen.h anywhere, or we would > have caught this before. Wait, huh? What do glibc's quirks have to do with HP/UX's libgen.h? If you use on a glibc system you're going to get it without the const, no matter what _GNU_SOURCE says. -- Daniel Jacobowitz CodeSourcery, LLC