From: Steve Ellcey <sje@cup.hp.com>
To: wilson@specifixinc.com, dj@redhat.com
Cc: binutils@sources.redhat.com
Subject: Re: Another HP-UX IA64 Build patch
Date: Mon, 09 May 2005 23:28:00 -0000 [thread overview]
Message-ID: <200505092306.QAA01931@hpsje.cup.hp.com> (raw)
In-Reply-To: <200505060157.j461v1LR017215@greed.delorie.com>
> From: DJ Delorie <dj@redhat.com>
>
> No, I'm proposing that we do NOT declare basename if the application
> didn't run the HAVE_DECL test. However, to prevent applications from
> using basename() without the HAVE_DECL test (the char * return
> problem), we then add a #define to effectively poison it.
>
> Thus, we need the HAVE_DECL test if we use basename(), but if we don't
> use basename() we don't need the HAVE_DECL test.
So how about something like the following (tested on IA64 HP-UX):
include/ChangeLog:
2005-05-09 Steve Ellcey <sje@cup.hp.com>
libiberty.h: Do not define empty basename prototype.
*** src.orig/include/libiberty.h Thu May 5 10:04:07 2005
--- src/include/libiberty.h Mon May 9 16:03:12 2005
*************** extern char **dupargv (char **) ATTRIBUT
*** 97,103 ****
#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) || defined (HAVE_DECL_BASENAME)
extern char *basename (const char *);
#else
! extern char *basename ();
#endif
#endif
--- 97,106 ----
#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) || defined (HAVE_DECL_BASENAME)
extern char *basename (const char *);
#else
! /* Do not allow basename to be used if there is no prototype seen. We
! either need to use the above prototype or have one from
! autoconf which would result in HAVE_DECL_BASENAME being set. */
! #define basename basename_cannot_be_used_without_a_prototype
#endif
#endif
next prev parent reply other threads:[~2005-05-09 23:06 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-05 17:26 Steve Ellcey
2005-05-05 17:41 ` Daniel Jacobowitz
2005-05-05 17:55 ` Steve Ellcey
2005-05-05 18:12 ` James E Wilson
2005-05-05 18:16 ` Daniel Jacobowitz
2005-05-05 19:17 ` James E Wilson
2005-05-05 19:32 ` DJ Delorie
2005-05-05 19:47 ` James E Wilson
2005-05-05 21:40 ` Andreas Schwab
2005-05-05 21:43 ` DJ Delorie
2005-05-05 18:10 ` James E Wilson
2005-05-05 20:12 ` James E Wilson
2005-05-05 20:42 ` Steve Ellcey
2005-05-05 21:36 ` DJ Delorie
2005-05-05 21:41 ` James E Wilson
2005-05-05 22:46 ` DJ Delorie
2005-05-06 1:57 ` James E Wilson
2005-05-06 1:58 ` DJ Delorie
2005-05-09 23:28 ` Steve Ellcey [this message]
2005-05-09 23:33 ` DJ Delorie
2005-05-12 16:37 ` Steve Ellcey
2005-05-05 22:06 ` James E Wilson
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=200505092306.QAA01931@hpsje.cup.hp.com \
--to=sje@cup.hp.com \
--cc=binutils@sources.redhat.com \
--cc=dj@redhat.com \
--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).