diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-11-17 00:11:08 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-11-17 00:14:07 +0100 |
commit | 9d05f6b7a797ed3424bc5d0024d21e496bb4c87b (patch) | |
tree | 03369d115ecb7e6dce30a98091cb56172e9be31a /Kernel/StdLib.cpp | |
parent | 2cf477a1512a1ca3f0571cb6de42b7a89a3a4565 (diff) | |
download | serenity-9d05f6b7a797ed3424bc5d0024d21e496bb4c87b.zip |
Make bash-2.05b build with minimal changes.
This is really neat. :^)
Diffstat (limited to 'Kernel/StdLib.cpp')
-rw-r--r-- | Kernel/StdLib.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Kernel/StdLib.cpp b/Kernel/StdLib.cpp index eb55e695bc..4af6586743 100644 --- a/Kernel/StdLib.cpp +++ b/Kernel/StdLib.cpp @@ -5,10 +5,10 @@ extern "C" { -void memcpy(void *dest, const void *src, DWORD n) +void memcpy(void *dest, const void *src, dword n) { - BYTE* bdest = (BYTE*)dest; - const BYTE* bsrc = (const BYTE*)src; + byte* bdest = (byte*)dest; + const byte* bsrc = (const byte*)src; for (; n; --n) *(bdest++) = *(bsrc++); } @@ -18,9 +18,9 @@ void strcpy(char* dest, const char *src) while ((*dest++ = *src++) != '\0'); } -void* memset(void* dest, BYTE c, DWORD n) +void* memset(void* dest, byte c, dword n) { - BYTE *bdest = (BYTE *)dest; + byte *bdest = (byte *)dest; for (; n; --n) *(bdest++) = c; return dest; @@ -37,9 +37,9 @@ char* strrchr(const char* str, int ch) return last; } -DWORD strlen(const char* str) +dword strlen(const char* str) { - DWORD len = 0; + dword len = 0; while (*(str++)) ++len; return len; @@ -51,12 +51,12 @@ int strcmp(const char *s1, const char *s2) if (*s1 == 0) return 0; } - return *(const BYTE*)s1 < *(const BYTE*)s2 ? -1 : 1; + return *(const byte*)s1 < *(const byte*)s2 ? -1 : 1; } char* strdup(const char *str) { - DWORD len = strlen(str); + dword len = strlen(str); char *s = (char*)kmalloc(len); memcpy(s, str, len); return s; |