further refactoring, working libtls-standalone
This commit is contained in:
@@ -1,27 +1,5 @@
|
||||
#noinst_HEADERS = err.h
|
||||
#noinst_HEADERS += netdb.h
|
||||
#noinst_HEADERS += poll.h
|
||||
#noinst_HEADERS += pqueue.h
|
||||
#noinst_HEADERS += stdio.h
|
||||
#noinst_HEADERS += stdlib.h
|
||||
#noinst_HEADERS += string.h
|
||||
#noinst_HEADERS += syslog.h
|
||||
#noinst_HEADERS += unistd.h
|
||||
#noinst_HEADERS += win32netcompat.h
|
||||
#
|
||||
#noinst_HEADERS += arpa/inet.h
|
||||
#
|
||||
#noinst_HEADERS += machine/endian.h
|
||||
#
|
||||
#noinst_HEADERS += netinet/in.h
|
||||
#noinst_HEADERS += netinet/tcp.h
|
||||
#
|
||||
#noinst_HEADERS += sys/ioctl.h
|
||||
#noinst_HEADERS += sys/mman.h
|
||||
#noinst_HEADERS += sys/select.h
|
||||
#noinst_HEADERS += sys/socket.h
|
||||
#noinst_HEADERS += sys/times.h
|
||||
#noinst_HEADERS += sys/types.h
|
||||
#noinst_HEADERS += sys/uio.h
|
||||
noinst_HEADERS = stdlib.h
|
||||
noinst_HEADERS += string.h
|
||||
noinst_HEADERS += unistd.h
|
||||
|
||||
include_HEADERS = tls.h
|
||||
|
@@ -17,12 +17,57 @@
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_EXPLICIT_BZERO
|
||||
void explicit_bzero(void *, size_t);
|
||||
#ifndef HAVE_STRLCPY
|
||||
size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCAT
|
||||
size_t strlcat(char *dst, const char *src, size_t siz);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNDUP
|
||||
char * strndup(const char *str, size_t maxlen);
|
||||
/* the only user of strnlen is strndup, so only build it if needed */
|
||||
#ifndef HAVE_STRNLEN
|
||||
size_t strnlen(const char *str, size_t maxlen);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRSEP
|
||||
char *strsep(char **stringp, const char *delim);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_EXPLICIT_BZERO
|
||||
void explicit_bzero(void *, size_t);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_TIMINGSAFE_BCMP
|
||||
int timingsafe_bcmp(const void *b1, const void *b2, size_t n);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_TIMINGSAFE_MEMCMP
|
||||
int timingsafe_memcmp(const void *b1, const void *b2, size_t len);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MEMMEM
|
||||
void * memmem(const void *big, size_t big_len, const void *little,
|
||||
size_t little_len);
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <errno.h>
|
||||
|
||||
static inline char *
|
||||
posix_strerror(int errnum)
|
||||
{
|
||||
if (errnum == ECONNREFUSED) {
|
||||
return "Connection refused";
|
||||
}
|
||||
return strerror(errnum);
|
||||
}
|
||||
|
||||
#define strerror(errnum) posix_strerror(errnum)
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user