diff options
author | Brent Cook <busterb@gmail.com> | 2020-10-06 19:41:18 -0500 |
---|---|---|
committer | Brent Cook <busterb@gmail.com> | 2020-10-06 19:41:18 -0500 |
commit | db8b30ae510793c65681d8786f94669e40d821a1 (patch) | |
tree | a3e3d353998efdbbc28a008d3ebf9aacabcdaafb /libtls-standalone/include/string.h | |
parent | b9918fc1ecfa74d6d3d9a3c533603a9677108d24 (diff) | |
parent | 85eea94598ff4b543777df4bf34d44ef5dfc06c6 (diff) | |
download | portable-db8b30ae510793c65681d8786f94669e40d821a1.tar.gz portable-db8b30ae510793c65681d8786f94669e40d821a1.tar.bz2 portable-db8b30ae510793c65681d8786f94669e40d821a1.zip |
Land #611, remove libtls-standalone
Diffstat (limited to 'libtls-standalone/include/string.h')
-rw-r--r-- | libtls-standalone/include/string.h | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/libtls-standalone/include/string.h b/libtls-standalone/include/string.h deleted file mode 100644 index 4bf7519..0000000 --- a/libtls-standalone/include/string.h +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | /* | ||
2 | * Public domain | ||
3 | * string.h compatibility shim | ||
4 | */ | ||
5 | |||
6 | #ifndef LIBCRYPTOCOMPAT_STRING_H | ||
7 | #define LIBCRYPTOCOMPAT_STRING_H | ||
8 | |||
9 | #ifdef _MSC_VER | ||
10 | #if _MSC_VER >= 1900 | ||
11 | #include <../ucrt/string.h> | ||
12 | #else | ||
13 | #include <../include/string.h> | ||
14 | #endif | ||
15 | #else | ||
16 | #include_next <string.h> | ||
17 | #endif | ||
18 | |||
19 | #include <sys/types.h> | ||
20 | |||
21 | #if defined(__sun) || defined(_AIX) || defined(__hpux) | ||
22 | /* Some functions historically defined in string.h were placed in strings.h by | ||
23 | * SUS. Use the same hack as OS X and FreeBSD use to work around on AIX, | ||
24 | * Solaris, and HPUX. | ||
25 | */ | ||
26 | #include <strings.h> | ||
27 | #endif | ||
28 | |||
29 | #ifndef HAVE_STRCASECMP | ||
30 | int strcasecmp(const char *s1, const char *s2); | ||
31 | int strncasecmp(const char *s1, const char *s2, size_t len); | ||
32 | #endif | ||
33 | |||
34 | #ifndef HAVE_STRLCPY | ||
35 | size_t strlcpy(char *dst, const char *src, size_t siz); | ||
36 | #endif | ||
37 | |||
38 | #ifndef HAVE_STRLCAT | ||
39 | size_t strlcat(char *dst, const char *src, size_t siz); | ||
40 | #endif | ||
41 | |||
42 | #ifndef HAVE_STRNDUP | ||
43 | char * strndup(const char *str, size_t maxlen); | ||
44 | /* the only user of strnlen is strndup, so only build it if needed */ | ||
45 | #ifndef HAVE_STRNLEN | ||
46 | size_t strnlen(const char *str, size_t maxlen); | ||
47 | #endif | ||
48 | #endif | ||
49 | |||
50 | #ifndef HAVE_STRSEP | ||
51 | char *strsep(char **stringp, const char *delim); | ||
52 | #endif | ||
53 | |||
54 | #ifndef HAVE_EXPLICIT_BZERO | ||
55 | void explicit_bzero(void *, size_t); | ||
56 | #endif | ||
57 | |||
58 | #ifndef HAVE_TIMINGSAFE_BCMP | ||
59 | int timingsafe_bcmp(const void *b1, const void *b2, size_t n); | ||
60 | #endif | ||
61 | |||
62 | #ifndef HAVE_TIMINGSAFE_MEMCMP | ||
63 | int timingsafe_memcmp(const void *b1, const void *b2, size_t len); | ||
64 | #endif | ||
65 | |||
66 | #ifndef HAVE_MEMMEM | ||
67 | void * memmem(const void *big, size_t big_len, const void *little, | ||
68 | size_t little_len); | ||
69 | #endif | ||
70 | |||
71 | #ifdef _WIN32 | ||
72 | #include <errno.h> | ||
73 | |||
74 | static inline char * | ||
75 | posix_strerror(int errnum) | ||
76 | { | ||
77 | if (errnum == ECONNREFUSED) { | ||
78 | return "Connection refused"; | ||
79 | } | ||
80 | return strerror(errnum); | ||
81 | } | ||
82 | |||
83 | #define strerror(errnum) posix_strerror(errnum) | ||
84 | |||
85 | #endif | ||
86 | |||
87 | #endif | ||