Subversion Repositories freemyipod

Rev

Rev 424 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
71 theseven 1
/*
2
 * stdlib.h
3
 *
4
 * Definitions for common types, variables, and functions.
5
 */
6
 
7
#ifndef _STDLIB_H_
8
#ifdef __cplusplus
9
extern "C" {
10
#endif
11
#define _STDLIB_H_
12
 
111 theseven 13
#include "../../global.h"
71 theseven 14
#include "_ansi.h"
15
 
16
#define __need_size_t
17
#define __need_wchar_t
18
#include <stddef.h>
19
 
20
#ifndef NULL
21
#define NULL ((void*)0)
22
#endif
23
 
24
#define EXIT_FAILURE 1
25
#define EXIT_SUCCESS 0
26
 
27
_VOID   _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, int(*_compar)(const _PTR, const _PTR)));
28
 
29
void *malloc(size_t);
30
void *calloc (size_t nmemb, size_t size);
31
void free(void *);
32
void *realloc(void *, size_t);
33
int  atexit(void (*)(void));
34
 
35
#define RAND_MAX INT_MAX
36
 
37
void srand(unsigned int seed);
38
int rand(void);
39
 
40
#ifndef ABS
41
#if defined(__GNUC__)
42
#define ABS(a) ({typeof (a) ___a = (a); ___a < 0 ? -___a: ___a; })
43
#else
44
#define ABS(a) (((a) < 0) ? -(a) : (a))
45
#endif /* __GNUC__ */
46
#endif
47
 
48
#define abs(x) ((int)ABS(x))
49
#define labs(x) ((long)abs(x))
50
 
51
#ifdef SIMULATOR
52
void exit(int status);
53
#endif
54
 
55
int atoi (const char *str);
56
 
57
#ifdef __cplusplus
58
}
59
#endif
60
#endif /* _STDLIB_H_ */