1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

Lots of minor compat stuff while seeing if bash would build.

We're quite far from bash building, but we'll get there eventually!
This commit is contained in:
Andreas Kling 2018-11-05 16:40:48 +01:00
parent e4611248c4
commit e76312ab63
21 changed files with 172 additions and 38 deletions

View file

@ -6,7 +6,7 @@ extern "C" {
void* memset(void* dest, int c, size_t n)
{
byte* bdest = (byte*)dest;
uint8_t* bdest = (uint8_t*)dest;
for (; n; --n)
*(bdest++) = c;
return dest;
@ -57,8 +57,8 @@ int strcmp(const char* s1, const char* s2)
int memcmp(const void* v1, const void* v2, size_t n)
{
auto* s1 = (const byte*)v1;
auto* s2 = (const byte*)v2;
auto* s1 = (const uint8_t*)v1;
auto* s2 = (const uint8_t*)v2;
while (n-- > 0) {
if (*s1++ != *s2++)
return s1[-1] < s2[-1] ? -1 : 1;