[GLIBC][PATCH v2] Remove strdup inlines

Mike Frysinger vapier@gentoo.org
Mon Dec 12 16:33:00 GMT 2016


On 12 Dec 2016 13:02, Wilco Dijkstra wrote:
> --- a/string/string.h
> +++ b/string/string.h
>  
> +#if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8     \
> +     || __GLIBC_USE (LIB_EXT2))
> +# define strdup(s) __builtin_strdup (s)
> +#endif
> +
> +#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2)
> +#define strndup(s,n) __builtin_strndup (s, n)
> +#endif

why do we need these at all ?  these seem like the sort of thing that
gcc should do automatically for us ?

2nd #define is missing an indent
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20161212/e4a6153b/attachment.sig>


More information about the Libc-alpha mailing list