1 #ifndef _LIBSA_STDLIB_H_
2 #define _LIBSA_STDLIB_H_
3
4 #include <sys/cdefs.h>
5 #include <sys/_types.h>
6
7 #ifndef _SIZE_T
8 #define _SIZE_T
9 typedef __darwin_size_t size_t;
10 #endif
11
12 #ifndef NULL
13 #define NULL (0)
14 #endif
15
16
17 __private_extern__ char *kld_basefile_name;
18
19
20 __BEGIN_DECLS
21
22
23 __private_extern__ void * malloc(size_t size);
24 __private_extern__ void free(void * address);
25 __private_extern__ void free_all(void); // "Free" all memory blocks
26 __private_extern__ void malloc_reset(void); // Destroy all memory regions
27 __private_extern__ void * realloc(void * address, size_t new_size);
28
29 __private_extern__ char * strrchr(const char *cp, int ch);
30
31 __private_extern__ void qsort(
32 void * array,
33 size_t nmembers,
34 size_t member_size,
35 int (*)(const void *, const void *));
36
37 __private_extern__ void * bsearch(
38 register const void *key,
39 const void *base0,
40 size_t nmemb,
41 register size_t size,
42 register int (*compar)(const void *, const void *));
43
44
45 /* These are defined in the kernel.
46 */
47 extern long strtol(const char *, char **, int);
48 extern unsigned long strtoul(const char *, char **, int);
49
50 __END_DECLS
51
52 #endif /* _LIBSA_STDLIB_H_ */
Cache object: ab9be611aee9ba21ecfe84b8539cbac4
|