kolibri-libc

- Added srand and rand
- Added _libc_get_version 
- Update libc.obj.a binary

git-svn-id: svn://kolibrios.org@8743 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
turbocat
2021-05-25 00:16:29 +00:00
parent 5f66f54df7
commit 4bc3d82296
6 changed files with 40 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
#include <stdlib.h>
#include <stdint.h>
static uint64_t seed;
void srand(unsigned s)
{
seed = s-1;
}
int rand(void)
{
seed = 6364136223846793005ULL*seed + 1;
return seed>>33;
}