meta: move photon/libc to root
This commit is contained in:
34
libc/include/stdlib.h
Normal file
34
libc/include/stdlib.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef STDLIB_H_
|
||||
#define STDLIB_H_
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern _Noreturn void abort(void);
|
||||
extern _Noreturn void exit(int code);
|
||||
extern void *malloc(size_t sz);
|
||||
extern void *realloc(void *ptr, size_t sz);
|
||||
extern void *calloc(size_t n, size_t sz);
|
||||
extern void free(void *ptr);
|
||||
|
||||
extern int rand(void);
|
||||
extern void srand(unsigned int seed);
|
||||
|
||||
extern int atoi(const char *str);
|
||||
extern double atof(const char *str);
|
||||
extern long strtol(const char *str, char **endptr, int base);
|
||||
extern unsigned long strtoul(const char *str, char **endptr, int base);
|
||||
extern float strtof(const char *str, char **endptr);
|
||||
extern double strtod(const char *str, char **endptr);
|
||||
|
||||
extern char *getenv(const char *name);
|
||||
extern int atexit(void(*fn)(void));
|
||||
|
||||
#if defined(__cplusplus)
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user