diff options
Diffstat (limited to '')
-rw-r--r-- | include/compat/stdlib.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 @@ | |||
20 | #include <stdint.h> | 20 | #include <stdint.h> |
21 | 21 | ||
22 | #ifndef HAVE_ARC4RANDOM_BUF | 22 | #ifndef HAVE_ARC4RANDOM_BUF |
23 | #define arc4random libressl_arc4random | ||
23 | uint32_t arc4random(void); | 24 | uint32_t arc4random(void); |
25 | #define arc4random_buf libressl_arc4random_buf | ||
24 | void arc4random_buf(void *_buf, size_t n); | 26 | void arc4random_buf(void *_buf, size_t n); |
27 | #define arc4random_uniform libressl_arc4random_uniform | ||
25 | uint32_t arc4random_uniform(uint32_t upper_bound); | 28 | uint32_t arc4random_uniform(uint32_t upper_bound); |
26 | #endif | 29 | #endif |
27 | 30 | ||
28 | #ifndef HAVE_FREEZERO | 31 | #ifndef HAVE_FREEZERO |
32 | #define freezero libressl_freezero | ||
29 | void freezero(void *ptr, size_t sz); | 33 | void freezero(void *ptr, size_t sz); |
30 | #endif | 34 | #endif |
31 | 35 | ||
32 | #ifndef HAVE_GETPROGNAME | 36 | #ifndef HAVE_GETPROGNAME |
37 | #define getprogname libressl_getprogname | ||
33 | const char * getprogname(void); | 38 | const char * getprogname(void); |
34 | #endif | 39 | #endif |
35 | 40 | ||
41 | #ifndef HAVE_REALLOCARRAY | ||
42 | #define reallocarray libressl_reallocarray | ||
36 | void *reallocarray(void *, size_t, size_t); | 43 | void *reallocarray(void *, size_t, size_t); |
44 | #endif | ||
37 | 45 | ||
38 | #ifndef HAVE_RECALLOCARRAY | 46 | #ifndef HAVE_RECALLOCARRAY |
47 | #define recallocarray libressl_recallocarray | ||
39 | void *recallocarray(void *, size_t, size_t, size_t); | 48 | void *recallocarray(void *, size_t, size_t, size_t); |
40 | #endif | 49 | #endif |
41 | 50 | ||
42 | #ifndef HAVE_STRTONUM | 51 | #ifndef HAVE_STRTONUM |
52 | #define strtonum libressl_strtonum | ||
43 | long long strtonum(const char *nptr, long long minval, | 53 | long long strtonum(const char *nptr, long long minval, |
44 | long long maxval, const char **errstr); | 54 | long long maxval, const char **errstr); |
45 | #endif | 55 | #endif |