From: Steve Ellcey <sje@cup.hp.com>
To: wilson@specifixinc.com
Cc: binutils@gcc.gnu.org
Subject: Re: Question about another IA64 HP-UX build problem
Date: Thu, 05 May 2005 23:29:00 -0000 [thread overview]
Message-ID: <200505052325.QAA18155@hpsje.cup.hp.com> (raw)
In-Reply-To: <1115322458.8413.79.camel@aretha.corp.specifixinc.com>
> getc_unlocked isn't used anywhere else in binutils simply because no one
> else has found a need for it, or perhaps, the idea of using it hasn't
> occurred to anyone else yet.
> --
> Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
Here is the patch I came up with to address the getc_unlocked problem.
The problem is that HAVE_GETC_UNLOCKED is true (because HP-UX has it)
but the declaration isn't seen because we didn't compile with
-D_REENTRENT, thus we get a no-declaration error. Tested on IA64 HP-UX.
binutils/ChangeLog:
2005-05-05 Steve Ellcey <sje@cup.hp.com>
configure.in: Check for getc_unlocked prototype.
configure: Regenerate
config.in: Regenerate
strings.c: Only call getc_unlocked if we have seen a prototype.
*** src.orig/binutils/configure.in Thu May 5 16:21:14 2005
--- src/binutils/configure.in Thu May 5 16:20:28 2005
*************** BFD_NEED_DECLARATION(strstr)
*** 217,222 ****
--- 217,223 ----
BFD_NEED_DECLARATION(sbrk)
BFD_NEED_DECLARATION(getenv)
BFD_NEED_DECLARATION(environ)
+ BFD_NEED_DECLARATION(getc_unlocked)
BFD_BINARY_FOPEN
*** src.orig/binutils/strings.c Thu May 5 16:21:08 2005
--- src/binutils/strings.c Thu May 5 16:20:33 2005
*************** get_char (FILE *stream, file_off *addres
*** 447,453 ****
{
if (stream == NULL)
return EOF;
! #ifdef HAVE_GETC_UNLOCKED
c = getc_unlocked (stream);
#else
c = getc (stream);
--- 447,453 ----
{
if (stream == NULL)
return EOF;
! #if defined(HAVE_GETC_UNLOCKED) && !defined(NEED_DECLARATION_GETC_UNLOCKED)
c = getc_unlocked (stream);
#else
c = getc (stream);
next prev parent reply other threads:[~2005-05-05 23:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-05 18:58 Steve Ellcey
2005-05-05 20:09 ` James E Wilson
2005-05-05 20:24 ` Steve Ellcey
2005-05-06 19:24 ` Hans-Peter Nilsson
2005-05-06 21:28 ` Steve Ellcey
2005-05-05 23:29 ` Steve Ellcey [this message]
2005-05-06 2:21 ` Daniel Jacobowitz
2005-05-06 15:50 ` Steve Ellcey
2005-05-22 5:43 John David Anglin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200505052325.QAA18155@hpsje.cup.hp.com \
--to=sje@cup.hp.com \
--cc=binutils@gcc.gnu.org \
--cc=wilson@specifixinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).