stdlib fixes.

This commit is contained in:
NIIBE Yutaka
2017-09-28 15:09:21 +09:00
parent 6678ac28c2
commit f4b9073b11
2 changed files with 14 additions and 1 deletions

View File

@@ -1,8 +1,13 @@
/*
* stdlib.h replacement to replace malloc functions
*
* The intention is that no dependency to C library. But since RSA
* routines uses malloc/free, we provide malloc and free.
*
* For GNU/Linux emulation, we can use C library.
*/
typedef unsigned int size_t;
typedef unsigned long int size_t;
#include <stddef.h> /* NULL */
@@ -11,3 +16,9 @@ typedef unsigned int size_t;
void *gnuk_malloc (size_t);
void gnuk_free (void *);
#ifdef GNU_LINUX_EMULATION
long int random(void);
void srandom(unsigned int seed);
void exit(int status);
#endif