This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Question about another IA64 HP-UX build problem


OK, I thought I had found all the IA64 HP-UX build problems but I was
just building gas and not binutils.  When building binutils I ran into a
problem with src/binutils/strings.c, this code has:

#ifdef HAVE_GETC_UNLOCKED
          c = getc_unlocked (stream);
#else
          c = getc (stream);
#endif

Now, on HP-UX the macro HAVE_GETC_UNLOCKED is defined but I only see the
declaration when compiling with -D_REENTRENT.  This is off by default so
I get an 'implicit declaration' error.

My question is, why is this the only use of getc_unlocked in binutils?

I see other uses of getc in nlmheader.y, readelf.c, resrc.c, sysdump.c,
and windres.c, but none of them have this ifdef structure.  Is there
a reason for this?  It looks like GCC has a way to handle this and I
can probably fix it with the same mechanism but I first wanted to find
out if there is a reason for having getc_unlocked in the first place.
Is it a performance issue?

Steve Ellcey
sje@cup.hp.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]