Files
photon/libc/include/stdlib.h

35 lines
835 B
C
Raw Normal View History

2020-04-17 11:24:05 +01:00
#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);
2020-04-17 11:24:05 +01:00
extern void free(void *ptr);
2021-01-03 11:52:47 +00:00
extern int rand(void);
extern void srand(unsigned int seed);
2020-07-16 14:02:51 +01:00
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);
2020-07-16 14:02:51 +01:00
extern double strtod(const char *str, char **endptr);
extern char *getenv(const char *name);
2021-01-16 21:30:06 +00:00
extern int atexit(void(*fn)(void));
2020-04-17 11:24:05 +01:00
#if defined(__cplusplus)
} /* extern "C" */
#endif
#endif