2014-11-19 07:43:07 -06:00
|
|
|
/*
|
|
|
|
* stdlib.h compatibility shim
|
|
|
|
* Public domain
|
|
|
|
*/
|
|
|
|
|
2014-07-10 06:21:51 -05:00
|
|
|
#include_next <stdlib.h>
|
|
|
|
|
|
|
|
#ifndef LIBCRYPTOCOMPAT_STDLIB_H
|
|
|
|
#define LIBCRYPTOCOMPAT_STDLIB_H
|
|
|
|
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2014-10-29 15:44:36 -05:00
|
|
|
#ifndef HAVE_ARC4RANDOM_BUF
|
2014-07-10 06:21:51 -05:00
|
|
|
uint32_t arc4random(void);
|
|
|
|
void arc4random_buf(void *_buf, size_t n);
|
2014-07-28 12:09:38 -05:00
|
|
|
#endif
|
|
|
|
|
2014-10-29 15:44:36 -05:00
|
|
|
#ifndef HAVE_REALLOCARRAY
|
2014-07-10 06:21:51 -05:00
|
|
|
void *reallocarray(void *, size_t, size_t);
|
2014-07-28 12:09:38 -05:00
|
|
|
#endif
|
|
|
|
|
2014-10-29 15:44:36 -05:00
|
|
|
#ifndef HAVE_STRTONUM
|
2014-07-10 06:21:51 -05:00
|
|
|
long long strtonum(const char *nptr, long long minval,
|
|
|
|
long long maxval, const char **errstr);
|
2014-07-28 12:09:38 -05:00
|
|
|
#endif
|
2014-07-10 06:21:51 -05:00
|
|
|
|
|
|
|
#endif
|