mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 08:13:00 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
29
sdk/lib/crt/math/rand_nt.c
Normal file
29
sdk/lib/crt/math/rand_nt.c
Normal file
|
@ -0,0 +1,29 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#if defined(__GNUC__)
|
||||
static unsigned long long next = 0;
|
||||
#else
|
||||
static unsigned __int64 next = 0;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int __cdecl rand(void)
|
||||
{
|
||||
#if defined(__GNUC__)
|
||||
next = next * 0x5deece66dLL + 11;
|
||||
#else
|
||||
next = next * 0x5deece66di64 + 11;
|
||||
#endif
|
||||
return (int)((next >> 16) & RAND_MAX);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
void __cdecl srand(unsigned seed)
|
||||
{
|
||||
next = seed;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue