2018-10-24 10:43:52 +00:00
|
|
|
#pragma once
|
|
|
|
|
2018-10-31 01:09:11 +00:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include <sys/types.h>
|
2019-02-26 13:05:28 +00:00
|
|
|
#include <stddef.h>
|
2018-10-24 10:43:52 +00:00
|
|
|
|
2018-10-31 01:09:11 +00:00
|
|
|
__BEGIN_DECLS
|
2018-10-24 10:43:52 +00:00
|
|
|
|
2018-11-17 14:56:09 +00:00
|
|
|
#define EXIT_SUCCESS 0
|
|
|
|
#define EXIT_FAILURE 1
|
2019-02-08 01:38:21 +00:00
|
|
|
#define MB_CUR_MAX 1
|
2018-11-17 14:56:09 +00:00
|
|
|
|
2019-02-15 21:37:20 +00:00
|
|
|
__attribute__((malloc)) __attribute__((alloc_size(1))) void* malloc(size_t);
|
|
|
|
__attribute__((malloc)) __attribute__((alloc_size(1, 2))) void* calloc(size_t nmemb, size_t);
|
2018-10-24 10:43:52 +00:00
|
|
|
void free(void*);
|
2019-02-15 11:38:49 +00:00
|
|
|
void* realloc(void *ptr, size_t);
|
2018-10-31 16:50:43 +00:00
|
|
|
char* getenv(const char* name);
|
2019-02-26 11:57:02 +00:00
|
|
|
int putenv(char*);
|
2018-10-31 16:50:43 +00:00
|
|
|
int atoi(const char*);
|
2018-11-11 09:40:50 +00:00
|
|
|
long atol(const char*);
|
2019-03-14 14:18:15 +00:00
|
|
|
long long atoll(const char*);
|
2019-02-25 09:05:32 +00:00
|
|
|
double strtod(const char*, char** endptr);
|
2019-02-24 14:19:32 +00:00
|
|
|
long strtol(const char*, char** endptr, int base);
|
|
|
|
unsigned long strtoul(const char*, char** endptr, int base);
|
2019-03-09 12:33:52 +00:00
|
|
|
void qsort(void* base, size_t nmemb, size_t size, int (*compar)(const void*, const void*));
|
|
|
|
void qsort_r(void* base, size_t nmemb, size_t size, int (*compar)(const void*, const void*, void*), void* arg);
|
2019-02-25 09:05:32 +00:00
|
|
|
int atexit(void (*function)());
|
2019-02-15 21:37:20 +00:00
|
|
|
__attribute__((noreturn)) void exit(int status);
|
|
|
|
__attribute__((noreturn)) void abort();
|
2019-01-15 05:30:19 +00:00
|
|
|
char* ptsname(int fd);
|
|
|
|
int ptsname_r(int fd, char* buffer, size_t);
|
2019-01-23 05:35:34 +00:00
|
|
|
int abs(int);
|
2019-02-25 09:05:32 +00:00
|
|
|
long labs(long);
|
|
|
|
double atof(const char*);
|
2019-02-03 03:32:31 +00:00
|
|
|
int system(const char* command);
|
2019-02-08 01:38:21 +00:00
|
|
|
char* mktemp(char*);
|
|
|
|
void* bsearch(const void* key, const void* base, size_t nmemb, size_t size, int (*compar)(const void *, const void *));
|
2018-10-24 10:43:52 +00:00
|
|
|
|
2019-01-14 14:25:34 +00:00
|
|
|
#define RAND_MAX 32767
|
|
|
|
int rand();
|
|
|
|
void srand(unsigned seed);
|
|
|
|
|
2019-02-01 15:03:21 +00:00
|
|
|
long int random();
|
|
|
|
void srandom(unsigned seed);
|
|
|
|
|
2019-02-05 12:38:32 +00:00
|
|
|
typedef struct { int quot; int rem; } div_t;
|
|
|
|
div_t div(int, int);
|
|
|
|
typedef struct { long quot; long rem; } ldiv_t;
|
|
|
|
ldiv_t ldiv(long, long);
|
|
|
|
|
2018-10-31 01:09:11 +00:00
|
|
|
__END_DECLS
|
2018-10-24 10:43:52 +00:00
|
|
|
|