Add simple versions of random() and srandom()
Prototypes also added for initstate() and setstate() but they were not implemented in the shared newlib code. * newlib/libc/include/cygwin/stdlib.h: Prototypes added. * winsup/cygwin/include/cygwin/stdlib.h: Prototypes removed. * newlib/libc/stdlib/random.c: New file. * newlib/libc/machine/epiphany/machine/stdlib.h: Removed * newlib/libc/stdlib/Makefile.am: Added random.c. * newlib/libc/stdlib/stdlib.tex: Added random.def. * newlib/libc/stdlib/Makefile.in: Regenerated.
This commit is contained in:
@ -1,17 +0,0 @@
|
||||
#ifndef __rtems__
|
||||
static __inline__ long int
|
||||
random (void)
|
||||
{
|
||||
extern int rand(void);
|
||||
|
||||
return rand ();
|
||||
}
|
||||
|
||||
static __inline__ void
|
||||
srandom (unsigned int seed)
|
||||
{
|
||||
void srand(unsigned int seed);
|
||||
|
||||
srand (seed);
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user