From 7a1ea510a9fc43ccbc257601b149a90920332e13 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 15 Jul 2016 22:39:04 +0200 Subject: Add Lua source, not compiled yet as libc/libm functions remain unimplemented --- src/lib/include/stdlib.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/lib/include/stdlib.h (limited to 'src/lib/include/stdlib.h') diff --git a/src/lib/include/stdlib.h b/src/lib/include/stdlib.h new file mode 100644 index 0000000..29d8661 --- /dev/null +++ b/src/lib/include/stdlib.h @@ -0,0 +1,29 @@ +#pragma once + +#include "malloc.h" + +#define EXIT_SUCCESS 0 +#define EXIT_FAILURE 255 + +int rand(void); +//int rand_r(unsigned int *seedp); +void srand(unsigned int seed); + +#define RAND_MAX 1 + +void abort() __attribute__((__noreturn__)); + + +double strtod(const char *nptr, char **endptr); +float strtof(const char *nptr, char **endptr); +long double strtold(const char *nptr, char **endptr); + +char *getenv(const char *name); + +int system(const char *command); + +int abs(int j); + + + +/* vim: set sts=0 ts=4 sw=4 tw=0 noet :*/ -- cgit v1.2.3