Question about another IA64 HP-UX build problem
Steve Ellcey
sje@cup.hp.com
Thu May 5 18:58:00 GMT 2005
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
More information about the Binutils
mailing list