memcmp added to stdlib module

This commit is contained in:
shockrahwow 2019-01-23 23:31:51 -08:00
parent 3a5da9ce96
commit 0e697a27ae
2 changed files with 9 additions and 0 deletions

8
stl/stdlib.c Normal file
View File

@ -0,0 +1,8 @@
int memcmp(const void* left, const void* right, const unsigned length) {
for(unsigned i=0;i<length;i++) {
if(left[i] != right[i]) {
return 1;
}
}
return 0;
}

1
stl/stdlib.h Normal file
View File

@ -0,0 +1 @@
int memcmp(const void* left, const void* right, const unsigned length);