source:
trunk/sys/dietlibc/rand.c
@
132
Last change on this file since 132 was 1, checked in by , 8 years ago | |
---|---|
File size: 245 bytes |
Line | |
---|---|
1 | #include <stdlib.h> |
2 | |
3 | static unsigned int seed=1; |
4 | |
5 | int rand(void) { |
6 | return rand_r(&seed); |
7 | } |
8 | |
9 | void srand(unsigned int i) { seed=i; } |
10 | |
11 | int random(void) __attribute__((alias("rand"))); |
12 | void srandom(unsigned int i) __attribute__((alias("srand"))); |
Note: See TracBrowser
for help on using the repository browser.