source: trunk/sys/dietlibc/rand.c @ 368

Last change on this file since 368 was 1, checked in by alain, 8 years ago

First import

File size: 245 bytes
Line 
1#include <stdlib.h>
2
3static unsigned int seed=1;
4
5int rand(void) {
6  return rand_r(&seed);
7}
8
9void srand(unsigned int i) { seed=i; }
10
11int random(void) __attribute__((alias("rand")));
12void srandom(unsigned int i) __attribute__((alias("srand")));
Note: See TracBrowser for help on using the repository browser.