diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-01-13 15:03:46 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-01-15 08:43:07 -0800 |
commit | 3d27f14d247b988f3a226dce0112f7e0a69f5c30 (patch) | |
tree | 71a148ddbf4f83e4a302cf0ff7bbb5dea7b89e06 /include | |
parent | f57d833a807aa443a89e54c518a64df1cdecbe77 (diff) | |
download | glibc-3d27f14d247b988f3a226dce0112f7e0a69f5c30.zip glibc-3d27f14d247b988f3a226dce0112f7e0a69f5c30.tar.gz glibc-3d27f14d247b988f3a226dce0112f7e0a69f5c30.tar.bz2 |
Avoid strdup/strndup/strsephjl/pr19463
Diffstat (limited to 'include')
-rw-r--r-- | include/string.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/string.h b/include/string.h index e145bfd..151e420 100644 --- a/include/string.h +++ b/include/string.h @@ -71,6 +71,12 @@ extern __typeof (strncasecmp_l) __strncasecmp_l; __new[__len] = '\0'; \ (char *) memcpy (__new, __old, __len); \ })) + +# ifdef __OPTIMIZE_SIZE__ +# define strdup(s) __strdup ((s)) +# define strndup(s, n) __strndup ((s), (n)) +# define strsep(s, d) __strsep ((s), (d)) +# endif #endif libc_hidden_proto (__mempcpy) @@ -99,6 +105,7 @@ libc_hidden_proto (memmem) extern __typeof (memmem) __memmem; libc_hidden_proto (__memmem) libc_hidden_proto (__ffs) +libc_hidden_proto (__strsep) libc_hidden_builtin_proto (memchr) libc_hidden_builtin_proto (memcpy) |