diff options
Diffstat (limited to '')
-rw-r--r-- | include/string.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/string.h b/include/string.h index f092477..47ada28 100644 --- a/include/string.h +++ b/include/string.h | |||
@@ -12,34 +12,35 @@ | |||
12 | #include <strings.h> | 12 | #include <strings.h> |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | #ifdef NO_STRLCPY | 15 | #ifndef HAVE_STRLCPY |
16 | size_t strlcpy(char *dst, const char *src, size_t siz); | 16 | size_t strlcpy(char *dst, const char *src, size_t siz); |
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | #ifdef NO_STRLCAT | 19 | #ifndef HAVE_STRLCAT |
20 | size_t strlcat(char *dst, const char *src, size_t siz); | 20 | size_t strlcat(char *dst, const char *src, size_t siz); |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #ifdef NO_STRNDUP | 23 | #ifndef HAVE_STRNDUP |
24 | char * strndup(const char *str, size_t maxlen); | 24 | char * strndup(const char *str, size_t maxlen); |
25 | #ifdef NO_STRNLEN | 25 | /* the only user of strnlen is strndup, so only build it if needed */ |
26 | #ifndef HAVE_STRNLEN | ||
26 | size_t strnlen(const char *str, size_t maxlen); | 27 | size_t strnlen(const char *str, size_t maxlen); |
27 | #endif | 28 | #endif |
28 | #endif | 29 | #endif |
29 | 30 | ||
30 | #ifdef NO_EXPLICIT_BZERO | 31 | #ifndef HAVE_EXPLICIT_BZERO |
31 | void explicit_bzero(void *, size_t); | 32 | void explicit_bzero(void *, size_t); |
32 | #endif | 33 | #endif |
33 | 34 | ||
34 | #ifdef NO_TIMINGSAFE_BCMP | 35 | #ifndef HAVE_TIMINGSAFE_BCMP |
35 | int timingsafe_bcmp(const void *b1, const void *b2, size_t n); | 36 | int timingsafe_bcmp(const void *b1, const void *b2, size_t n); |
36 | #endif | 37 | #endif |
37 | 38 | ||
38 | #ifdef NO_TIMINGSAFE_MEMCMP | 39 | #ifndef HAVE_TIMINGSAFE_MEMCMP |
39 | int timingsafe_memcmp(const void *b1, const void *b2, size_t len); | 40 | int timingsafe_memcmp(const void *b1, const void *b2, size_t len); |
40 | #endif | 41 | #endif |
41 | 42 | ||
42 | #ifdef NO_MEMMEM | 43 | #ifndef HAVE_MEMMEM |
43 | void * memmem(const void *big, size_t big_len, const void *little, | 44 | void * memmem(const void *big, size_t big_len, const void *little, |
44 | size_t little_len); | 45 | size_t little_len); |
45 | #endif | 46 | #endif |