From: Steve Ellcey <sje@cup.hp.com>
To: drow@false.org
Cc: wilson@specifixinc.com, binutils@gcc.gnu.org
Subject: Re: Question about another IA64 HP-UX build problem
Date: Fri, 06 May 2005 15:50:00 -0000 [thread overview]
Message-ID: <200505061545.IAA18862@hpsje.cup.hp.com> (raw)
In-Reply-To: <20050506015844.GA4085@nevyn.them.org>
> > 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.
>
> If you're going to use BFD_NEED_DECLARATION, please use it to provide
> the declaration instead :-)
>
> --
> Daniel Jacobowitz
> CodeSourcery, LLC
I considered that, but I don't think I really want to do that. I don't
believe I should use getc_unlocked unless I have the official OS
declaration for it. If we were using a newer autoconf I would have
used 'AC_CHECK_DECLS(getc_unlocked)' and then my ifdef would have been:
#if defined(HAVE_GETC_UNLOCKED) && defined(HAVE_DECL_GETC_UNLOCKED)
which would look better but does the same thing.
The idea is to use getc_unlocked only if the OS provided a declaration
for it and not to use it if you just found it in libc but didn't see a
declaration for it.
On HP-UX the <stdio.h> header file will automatically convert getc into
getc_unlocked if you did not compile with -D_REENTRENT which tells the
compiler you are doing multithreaded stuff. Without the -D_REENTRENT
getc is unlocked anyway and the getc_unlocked declaration is not
visible.
Steve Ellcey
sje@cup.hp.com
next prev parent reply other threads:[~2005-05-06 15:45 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
2005-05-06 2:21 ` Daniel Jacobowitz
2005-05-06 15:50 ` Steve Ellcey [this message]
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=200505061545.IAA18862@hpsje.cup.hp.com \
--to=sje@cup.hp.com \
--cc=binutils@gcc.gnu.org \
--cc=drow@false.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).