This is the mail archive of the
libc-alpha@cygnus.com
mailing list for the glibc project.
Re: __OPTIMIZE__ and str*() functions
- To: kettenis@wins.uva.nl
- Subject: Re: __OPTIMIZE__ and str*() functions
- From: Geoff Keating <geoffk@ozemail.com.au>
- Date: Thu, 28 Jan 1999 17:03:31 +1100
- CC: Torsten.Duwe@lst.de, libc-alpha@cygnus.com
- References: <m105Sbc-000OdlC@ns.lst.de> <199901271324.OAA26924@landau.wins.uva.nl>
> #ifndef strdup
> extern char *strdup (const char *s)
> #endif
>
> or use autoconf tests to check if your header files provide the
> necessary prototypes.
Even this is not good enough in general, you need to use autoconf
tests. There's a macro for this somewhere.
For instance, the header file might declare something like
extern char *strcpy __P ((char *__restrict __dest,
__const char *__restrict __src));
which may be incompatible with a plain
extern char *strcpy (char *dest, const char *src)
--
Geoffrey Keating <geoffk@ozemail.com.au>