Rename codecs/dnet.c to codecs/a52_rm.c
[kugel-rb.git] / firmware / include / stdlib.h
bloba287889c6a6fc9764ac5d4adf186762b2c364dae
1 /*
2 * stdlib.h
4 * Definitions for common types, variables, and functions.
5 */
7 #ifndef _STDLIB_H_
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 #define _STDLIB_H_
13 #include "_ansi.h"
15 #define __need_size_t
16 #define __need_wchar_t
17 #include <stddef.h>
19 #ifndef NULL
20 #define NULL ((void*)0)
21 #endif
23 #define EXIT_FAILURE 1
24 #define EXIT_SUCCESS 0
26 _VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, int(*_compar)(const _PTR, const _PTR)));
28 void *malloc(size_t);
29 void *calloc (size_t nmemb, size_t size);
30 void free(void *);
31 void *realloc(void *, size_t);
33 #define RAND_MAX INT_MAX
35 void srand(unsigned int seed);
36 int rand(void);
38 #ifndef ABS
39 #if defined(__GNUC__)
40 #define ABS(a) ({typeof (a) ___a = (a); ___a < 0 ? -___a: ___a; })
41 #else
42 #define ABS(a) (((a) < 0) ? -(a) : (a))
43 #endif /* __GNUC__ */
44 #endif
46 #define abs(x) (ABS(x))
47 #define labs(x) abs(x)
49 #ifdef SIMULATOR
50 void exit(int status);
51 #endif
53 int atoi (const char *str);
55 #ifdef __cplusplus
57 #endif
58 #endif /* _STDLIB_H_ */