regex: updates from neatvi
[neatlibc.git] / stdlib.h
blob944fd7226c17cd8a87e51ccbb2791b376ba26b9b
1 #include <stddef.h>
3 #define RAND_MAX 0x7fffffff
5 void *malloc(long n);
6 void free(void *m);
7 void *calloc(long n, long sz);
8 void *realloc(void *v, long sz);
10 int atoi(char *s);
11 long atol(char *s);
12 long strtol(const char *s, char **endptr, int base);
13 unsigned long strtoul(const char *s, char **endptr, int base);
14 int abs(int n);
15 long labs(long n);
17 void exit(int status);
18 void abort(void);
19 int atexit(void (*func)(void));
21 char *getenv(char *name);
22 void qsort(void *a, int n, int sz, int (*cmp)(void *, void *));
23 int mkstemp(char *t);
24 int system(char *cmd);
26 void srand(unsigned int seed);
27 int rand(void);
29 /* for examining heap memory allocation */
30 #ifdef MEMTST
31 void *memtst_malloc(long n);
32 void memtst_free(void *v);
33 void *memtst_calloc(long n, long sz);
34 void *memtst_realloc(void *v, long sz);
35 #define malloc memtst_malloc
36 #define free memtst_free
37 #define calloc memtst_calloc
38 #define realloc memtst_realloc
39 #endif