diff options
Diffstat (limited to 'include/compat/string.h')
-rw-r--r-- | include/compat/string.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/compat/string.h b/include/compat/string.h index 4bf7519..6a82793 100644 --- a/include/compat/string.h +++ b/include/compat/string.h | |||
@@ -27,43 +27,54 @@ | |||
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | #ifndef HAVE_STRCASECMP | 29 | #ifndef HAVE_STRCASECMP |
30 | #define strcasecmp libressl_strcasecmp | ||
30 | int strcasecmp(const char *s1, const char *s2); | 31 | int strcasecmp(const char *s1, const char *s2); |
32 | #define strncasecmp libressl_strncasecmp | ||
31 | int strncasecmp(const char *s1, const char *s2, size_t len); | 33 | int strncasecmp(const char *s1, const char *s2, size_t len); |
32 | #endif | 34 | #endif |
33 | 35 | ||
34 | #ifndef HAVE_STRLCPY | 36 | #ifndef HAVE_STRLCPY |
37 | #define strlcpy libressl_strlcpy | ||
35 | size_t strlcpy(char *dst, const char *src, size_t siz); | 38 | size_t strlcpy(char *dst, const char *src, size_t siz); |
36 | #endif | 39 | #endif |
37 | 40 | ||
38 | #ifndef HAVE_STRLCAT | 41 | #ifndef HAVE_STRLCAT |
42 | #define strlcat libressl_strlcat | ||
39 | size_t strlcat(char *dst, const char *src, size_t siz); | 43 | size_t strlcat(char *dst, const char *src, size_t siz); |
40 | #endif | 44 | #endif |
41 | 45 | ||
42 | #ifndef HAVE_STRNDUP | 46 | #ifndef HAVE_STRNDUP |
47 | #define strndup libressl_strndup | ||
43 | char * strndup(const char *str, size_t maxlen); | 48 | char * strndup(const char *str, size_t maxlen); |
44 | /* the only user of strnlen is strndup, so only build it if needed */ | 49 | /* the only user of strnlen is strndup, so only build it if needed */ |
45 | #ifndef HAVE_STRNLEN | 50 | #ifndef HAVE_STRNLEN |
51 | #define strnlen libressl_strnlen | ||
46 | size_t strnlen(const char *str, size_t maxlen); | 52 | size_t strnlen(const char *str, size_t maxlen); |
47 | #endif | 53 | #endif |
48 | #endif | 54 | #endif |
49 | 55 | ||
50 | #ifndef HAVE_STRSEP | 56 | #ifndef HAVE_STRSEP |
57 | #define strsep libressl_strsep | ||
51 | char *strsep(char **stringp, const char *delim); | 58 | char *strsep(char **stringp, const char *delim); |
52 | #endif | 59 | #endif |
53 | 60 | ||
54 | #ifndef HAVE_EXPLICIT_BZERO | 61 | #ifndef HAVE_EXPLICIT_BZERO |
62 | #define explicit_bzero libressl_explicit_bzero | ||
55 | void explicit_bzero(void *, size_t); | 63 | void explicit_bzero(void *, size_t); |
56 | #endif | 64 | #endif |
57 | 65 | ||
58 | #ifndef HAVE_TIMINGSAFE_BCMP | 66 | #ifndef HAVE_TIMINGSAFE_BCMP |
67 | #define timingsafe_bcmp libressl_timingsafe_bcmp | ||
59 | int timingsafe_bcmp(const void *b1, const void *b2, size_t n); | 68 | int timingsafe_bcmp(const void *b1, const void *b2, size_t n); |
60 | #endif | 69 | #endif |
61 | 70 | ||
62 | #ifndef HAVE_TIMINGSAFE_MEMCMP | 71 | #ifndef HAVE_TIMINGSAFE_MEMCMP |
72 | #define timingsafe_memcmp libressl_timingsafe_memcmp | ||
63 | int timingsafe_memcmp(const void *b1, const void *b2, size_t len); | 73 | int timingsafe_memcmp(const void *b1, const void *b2, size_t len); |
64 | #endif | 74 | #endif |
65 | 75 | ||
66 | #ifndef HAVE_MEMMEM | 76 | #ifndef HAVE_MEMMEM |
77 | #define memmem libressl_memmem | ||
67 | void * memmem(const void *big, size_t big_len, const void *little, | 78 | void * memmem(const void *big, size_t big_len, const void *little, |
68 | size_t little_len); | 79 | size_t little_len); |
69 | #endif | 80 | #endif |