This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Re: jartool.c:539: undefined reference to `strdup'
- To: aoliva at redhat dot com (Alexandre Oliva)
- Subject: Re: PATCH: Re: jartool.c:539: undefined reference to `strdup'
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Thu, 3 May 2001 13:37:47 -0400 (EDT)
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
> I don't think so. strdup() is sometimes defined as a macro, and
> sometimes it's declared to take a const char *. Better check for it
> and define it only if it's not present, or go for libiberty, which I
> think would be a better idea.
I think the simplest thing then is to rename `strdup' so there is no
conflict. It doesn't seem to make much sense to use libiberty just
for this one function. The configure stuff doesn't check for any other
functions or declarations.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)