3 #define RAND_MAX 0x7fffffff
7 void *calloc(long n
, long sz
);
8 void *realloc(void *v
, long sz
);
12 long strtol(const char *s
, char **endptr
, int base
);
13 unsigned long strtoul(const char *s
, char **endptr
, int base
);
17 void exit(int status
);
19 int atexit(void (*func
)(void));
21 char *getenv(char *name
);
22 void qsort(void *a
, int n
, int sz
, int (*cmp
)(void *, void *));
24 int system(char *cmd
);
26 void srand(unsigned int seed
);
29 /* for examining heap memory allocation */
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