mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-03 16:30:29 +00:00
Added inline wrapper for random() and srandom() (that call into the existing rand/srand)
This commit is contained in:
parent
83d0c3b870
commit
cb5d02e9f2
1 changed files with 10 additions and 0 deletions
|
@ -26,6 +26,16 @@ uint64_t rdrand(void);
|
|||
uint64_t rdseed(void);
|
||||
float randf(void);
|
||||
|
||||
/* alias for rand() */
|
||||
forceinline int random(void) {
|
||||
return rand();
|
||||
}
|
||||
|
||||
/* alias for srand() */
|
||||
forceinline void srandom(unsigned int seed) {
|
||||
srand(seed);
|
||||
}
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_RAND_RAND_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue