stdlib fixes.
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
2017-09-28 NIIBE Yutaka <gniibe@fsij.org>
|
2017-09-28 NIIBE Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
|
* src/stdlib.h: Update for GNU/Linux emulation.
|
||||||
|
|
||||||
* src/Makefile: Support GNU/Linux emulation.
|
* src/Makefile: Support GNU/Linux emulation.
|
||||||
* src/configure: Support GNU/Linux emulation.
|
* src/configure: Support GNU/Linux emulation.
|
||||||
* emulation: Remove.
|
* emulation: Remove.
|
||||||
|
|||||||
13
src/stdlib.h
13
src/stdlib.h
@@ -1,8 +1,13 @@
|
|||||||
/*
|
/*
|
||||||
* stdlib.h replacement to replace malloc functions
|
* 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 */
|
#include <stddef.h> /* NULL */
|
||||||
|
|
||||||
@@ -11,3 +16,9 @@ typedef unsigned int size_t;
|
|||||||
|
|
||||||
void *gnuk_malloc (size_t);
|
void *gnuk_malloc (size_t);
|
||||||
void gnuk_free (void *);
|
void gnuk_free (void *);
|
||||||
|
|
||||||
|
#ifdef GNU_LINUX_EMULATION
|
||||||
|
long int random(void);
|
||||||
|
void srandom(unsigned int seed);
|
||||||
|
void exit(int status);
|
||||||
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user