stdlib.h - scc - simple c99 compiler
HTML git clone git://git.simple-cc.org/scc
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
stdlib.h (1904B)
---
1 #ifndef _STDLIB_H
2 #define _STDLIB_H
3
4 #define _NEED_NULL
5 #define _NEED_SIZET
6 #define _NEED_WCHART
7 #include <sys/cdefs.h>
8 #include <sys/stdlib.h>
9 #include <arch/cdefs.h>
10 #include <arch/stdlib.h>
11
12 #define _ATEXIT_MAX 32
13 #define MB_CUR_MAX 4
14
15 #define RAND_MAX 32767
16
17 typedef struct {
18 int quot, rem;
19 } div_t;
20
21 typedef struct {
22 long quot, rem;
23 } ldiv_t;
24
25 typedef struct {
26 long long quot, rem;
27 } lldiv_t;
28
29 double atof(const char *);
30 int atoi(const char *);
31 long int atol(const char *);
32 long long int atoll(const char *);
33 double strtod(const char *restrict, char **restrict);
34 float strtof(const char *restrict, char **restrict);
35 long double strtold(const char *restrict, char **restrict);
36 long int strtol(const char *restrict, char **restrict, int);
37 long long int strtoll(const char *restrict, char **restrict, int);
38 unsigned long int strtoul(const char *restrict, char **restrict, int);
39 unsigned long long int strtoull(const char *restrict, char **restrict,
40 int);
41 int rand(void);
42 void srand(unsigned int);
43 void *calloc(size_t, size_t);
44 void free(void *);
45 void *malloc(size_t);
46 void *realloc(void *, size_t);
47 void abort(void);
48 int atexit(void (*)(void));
49 void exit(int);
50 void _Exit(int);
51 char *getenv(const char *);
52 int system(const char *);
53 void *bsearch(const void *, const void *, size_t, size_t,
54 int (*)(const void *, const void *));
55 void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
56 int abs(int);
57 long int labs(long int);
58 long long int llabs(long long int);
59 div_t div(int, int);
60 ldiv_t ldiv(long int, long int);
61 lldiv_t lldiv(long long int, long long int);
62
63 int mblen(const char *, size_t);
64 int mbtowc(wchar_t *restrict, const char *restrict, size_t);
65 int wctomb(char *, wchar_t);
66 size_t mbstowcs(wchar_t *restrict, const char *restrict, size_t);
67 size_t wcstombs(char *restrict, const wchar_t *restrict, size_t);
68
69 #endif