diff options
| author | June McEnroe <june@causal.agency> | 2026-06-01 14:39:52 -0400 |
|---|---|---|
| committer | June McEnroe <june@causal.agency> | 2026-06-01 14:39:52 -0400 |
| commit | 8de0a43b1db624a766efd3d78a60403e77ce39e0 (patch) | |
| tree | 630a8490c3773b78d50582691dff4d9c60a607d4 /include/compat | |
| parent | Import LibreSSL 3.8.4 (diff) | |
| download | libretls-8de0a43b1db624a766efd3d78a60403e77ce39e0.tar.gz libretls-8de0a43b1db624a766efd3d78a60403e77ce39e0.zip | |
Import LibreSSL 3.9.0
Diffstat (limited to 'include/compat')
| -rw-r--r-- | include/compat/stdio.h | 2 | ||||
| -rw-r--r-- | include/compat/stdlib.h | 10 | ||||
| -rw-r--r-- | include/compat/string.h | 11 |
3 files changed, 23 insertions, 0 deletions
diff --git a/include/compat/stdio.h b/include/compat/stdio.h index 1874aa5..2af8f3e 100644 --- a/include/compat/stdio.h +++ b/include/compat/stdio.h @@ -20,7 +20,9 @@ #ifndef HAVE_ASPRINTF #include <stdarg.h> +#define vasprintf libressl_vasprintf int vasprintf(char **str, const char *fmt, va_list ap); +#define asprintf libressl_asprintf int asprintf(char **str, const char *fmt, ...); #endif diff --git a/include/compat/stdlib.h b/include/compat/stdlib.h index 2eaea24..76dc07c 100644 --- a/include/compat/stdlib.h +++ b/include/compat/stdlib.h @@ -20,26 +20,36 @@ #include <stdint.h> #ifndef HAVE_ARC4RANDOM_BUF +#define arc4random libressl_arc4random uint32_t arc4random(void); +#define arc4random_buf libressl_arc4random_buf void arc4random_buf(void *_buf, size_t n); +#define arc4random_uniform libressl_arc4random_uniform uint32_t arc4random_uniform(uint32_t upper_bound); #endif #ifndef HAVE_FREEZERO +#define freezero libressl_freezero void freezero(void *ptr, size_t sz); #endif #ifndef HAVE_GETPROGNAME +#define getprogname libressl_getprogname const char * getprogname(void); #endif +#ifndef HAVE_REALLOCARRAY +#define reallocarray libressl_reallocarray void *reallocarray(void *, size_t, size_t); +#endif #ifndef HAVE_RECALLOCARRAY +#define recallocarray libressl_recallocarray void *recallocarray(void *, size_t, size_t, size_t); #endif #ifndef HAVE_STRTONUM +#define strtonum libressl_strtonum long long strtonum(const char *nptr, long long minval, long long maxval, const char **errstr); #endif 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 @@ #endif #ifndef HAVE_STRCASECMP +#define strcasecmp libressl_strcasecmp int strcasecmp(const char *s1, const char *s2); +#define strncasecmp libressl_strncasecmp int strncasecmp(const char *s1, const char *s2, size_t len); #endif #ifndef HAVE_STRLCPY +#define strlcpy libressl_strlcpy size_t strlcpy(char *dst, const char *src, size_t siz); #endif #ifndef HAVE_STRLCAT +#define strlcat libressl_strlcat size_t strlcat(char *dst, const char *src, size_t siz); #endif #ifndef HAVE_STRNDUP +#define strndup libressl_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 +#define strnlen libressl_strnlen size_t strnlen(const char *str, size_t maxlen); #endif #endif #ifndef HAVE_STRSEP +#define strsep libressl_strsep char *strsep(char **stringp, const char *delim); #endif #ifndef HAVE_EXPLICIT_BZERO +#define explicit_bzero libressl_explicit_bzero void explicit_bzero(void *, size_t); #endif #ifndef HAVE_TIMINGSAFE_BCMP +#define timingsafe_bcmp libressl_timingsafe_bcmp int timingsafe_bcmp(const void *b1, const void *b2, size_t n); #endif #ifndef HAVE_TIMINGSAFE_MEMCMP +#define timingsafe_memcmp libressl_timingsafe_memcmp int timingsafe_memcmp(const void *b1, const void *b2, size_t len); #endif #ifndef HAVE_MEMMEM +#define memmem libressl_memmem void * memmem(const void *big, size_t big_len, const void *little, size_t little_len); #endif |