This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Patch to add fopen/fopen64 declarations to bfd
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: Steve Ellcey <sje at cup dot hp dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 4 Nov 2005 15:03:58 -0500
- Subject: Re: Patch to add fopen/fopen64 declarations to bfd
- References: <200511041957.LAA04430@hpsje.cup.hp.com>
On Fri, Nov 04, 2005 at 11:57:20AM -0800, Steve Ellcey wrote:
> My build of binutils recently started failing when a use of fopen64 was
> added because, while IA64 HP-UX has a fopen64 function in libc, it does
> not make the declaration visible unless _LARGEFILE64_SOURCE is defined.
> So I get an error since it uses fopen64 but it didn't see a declaration
> for fopen64.
>
> This patch fixes the problem by checking for a fopen64 declaration and
> inserting one if it doesn't find it. I also did the same change for
> fopen just to make those functions consistent.
>
> Tested on IA64 HP-UX, OK for checkin?
hppa*-*-hpux*) # HP/UX's ftello64 et.al. declarations are only
# visible when _LARGEFILE64_SOURCE is defined.
# Without those declarations, real_ftell et.al.
# get mis-compiled.
HDEFINES="-DHOST_HPPAHPUX -D_LARGEFILE64_SOURCE" ;;
Can we just do the same thing for ia64-hpux?
(And: any system which can't manage a prototype for fopen does not
deserve GNU binutils.)
--
Daniel Jacobowitz
CodeSourcery, LLC