Rev 2787 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2787 | Rev 4692 | ||
---|---|---|---|
Line 36... | Line 36... | ||
36 | #define LIBC_STDLIB_H_ |
36 | #define LIBC_STDLIB_H_ |
37 | 37 | ||
38 | #include <unistd.h> |
38 | #include <unistd.h> |
39 | #include <malloc.h> |
39 | #include <malloc.h> |
40 | 40 | ||
41 | #define abort() _exit(1) |
41 | #define abort() _exit(1) |
42 | #define exit(status) _exit((status)) |
42 | #define exit(status) _exit((status)) |
43 | 43 | ||
44 | #define RAND_MAX 714025 |
44 | #define RAND_MAX 714025 |
45 | 45 | ||
46 | extern long int random(void); |
46 | extern long int random(void); |
47 | extern void srandom(unsigned int seed); |
47 | extern void srandom(unsigned int seed); |
48 | 48 | ||
49 | static inline int rand(void) |
49 | static inline int rand(void) |
50 | { |
50 | { |
51 | return random(); |
51 | return random(); |
52 | } |
52 | } |
- | 53 | ||
53 | static inline void srand(unsigned int seed) |
54 | static inline void srand(unsigned int seed) |
54 | { |
55 | { |
55 | srandom(seed); |
56 | srandom(seed); |
56 | } |
57 | } |
57 | 58 |