meta: move photon/libc to root

This commit is contained in:
2026-02-08 20:45:25 +00:00
parent f00e74260d
commit 345a37962e
140 changed files with 0 additions and 0 deletions

34
libc/include/stdlib.h Normal file
View 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