]> git.saurik.com Git - apple/xnu.git/blob - libsa/libsa/stdlib.h
441b121ed72c5b613417847b39ba1a1ef037bda1
[apple/xnu.git] / libsa / libsa / stdlib.h
1 #ifndef _LIBSA_STDLIB_H_
2 #define _LIBSA_STDLIB_H_
3
4
5 #ifndef _BSD_SIZE_T_DEFINED_
6 #define _BSD_SIZE_T_DEFINED_
7 typedef __SIZE_TYPE__ size_t;
8 #endif
9
10 #ifndef NULL
11 #define NULL (0)
12 #endif
13
14
15 __private_extern__ char *kld_basefile_name;
16
17
18 __private_extern__ void * malloc(size_t size);
19 __private_extern__ void free(void * address);
20 __private_extern__ void free_all(void); // "Free" all memory blocks
21 __private_extern__ void malloc_reset(void); // Destroy all memory regions
22 __private_extern__ void * realloc(void * address, size_t new_size);
23
24
25
26 __private_extern__ void qsort(
27 void * array,
28 size_t nmembers,
29 size_t member_size,
30 int (*)(const void *, const void *));
31
32 __private_extern__ void * bsearch(
33 register const void *key,
34 const void *base0,
35 size_t nmemb,
36 register size_t size,
37 register int (*compar)(const void *, const void *));
38
39
40 /* These are defined in the kernel.
41 */
42 extern long strtol(const char *, char **, int);
43 extern unsigned long strtoul(const char *, char **, int);
44
45 #endif _LIBSA_STDLIB_H_