mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 01:47:36 +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:
parent
e4611248c4
commit
e76312ab63
21 changed files with 172 additions and 38 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue