__OPTIMIZE__ and str*() functions

Geoff Keating geoffk@ozemail.com.au
Thu Apr 1 00:00:00 GMT 1999


> #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>



More information about the Libc-alpha mailing list