aboutsummaryrefslogtreecommitdiff
path: root/libtls-standalone/include
diff options
context:
space:
mode:
Diffstat (limited to 'libtls-standalone/include')
-rw-r--r--libtls-standalone/include/Makefile.am5
-rw-r--r--libtls-standalone/include/string.h87
2 files changed, 0 insertions, 92 deletions
diff --git a/libtls-standalone/include/Makefile.am b/libtls-standalone/include/Makefile.am
deleted file mode 100644
index 0783318..0000000
--- a/libtls-standalone/include/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
1noinst_HEADERS = stdlib.h
2noinst_HEADERS += string.h
3noinst_HEADERS += unistd.h
4
5include_HEADERS = tls.h
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
30int strcasecmp(const char *s1, const char *s2);
31int strncasecmp(const char *s1, const char *s2, size_t len);
32#endif
33
34#ifndef HAVE_STRLCPY
35size_t strlcpy(char *dst, const char *src, size_t siz);
36#endif
37
38#ifndef HAVE_STRLCAT
39size_t strlcat(char *dst, const char *src, size_t siz);
40#endif
41
42#ifndef HAVE_STRNDUP
43char * 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
46size_t strnlen(const char *str, size_t maxlen);
47#endif
48#endif
49
50#ifndef HAVE_STRSEP
51char *strsep(char **stringp, const char *delim);
52#endif
53
54#ifndef HAVE_EXPLICIT_BZERO
55void explicit_bzero(void *, size_t);
56#endif
57
58#ifndef HAVE_TIMINGSAFE_BCMP
59int timingsafe_bcmp(const void *b1, const void *b2, size_t n);
60#endif
61
62#ifndef HAVE_TIMINGSAFE_MEMCMP
63int timingsafe_memcmp(const void *b1, const void *b2, size_t len);
64#endif
65
66#ifndef HAVE_MEMMEM
67void * 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
74static inline char *
75posix_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