Luna/libc/include/stdlib.h

74 lines
1.2 KiB
C
Raw Normal View History

#ifndef _STDLIB_H
#define _STDLIB_H
#include <bits/attrs.h>
#include <stddef.h>
typedef struct
{
int quot;
int rem;
} div_t;
typedef struct
{
long quot;
long rem;
} ldiv_t;
typedef struct
{
long long quot;
long long rem;
} lldiv_t;
#ifdef __cplusplus
extern "C"
{
#endif
int abs(int);
long labs(long);
long long llabs(long long);
div_t div(int, int);
ldiv_t ldiv(long, long);
lldiv_t lldiv(long long, long long);
void* malloc(size_t);
void* calloc(size_t, size_t);
void* realloc(void*, size_t);
void free(void*);
__noreturn void abort();
int atexit(void (*)(void));
int atoi(const char*);
long atol(const char*);
long long atoll(const char*);
double atof(const char*);
double strtod(const char*, char**);
long strtol(const char*, char**, int);
unsigned long strtoul(const char*, char**, int);
int rand();
void srand(int);
__noreturn void exit(int);
int system(const char*);
char* getenv(const char*);
void qsort(void*, size_t, size_t, int (*)(const void*, const void*));
void* bsearch(const void*, const void*, size_t, size_t, int (*)(const void*, const void*));
#ifdef __cplusplus
}
#endif
#endif