From a10aabfcd52f702057316018cd7847ab2bfe4aa1 Mon Sep 17 00:00:00 2001 From: Ada Christine Date: Tue, 26 May 2026 21:32:27 +0000 Subject: we're bringing kjarna back and not doing the crazy stuff with trying to have task management during efi. that was a bit extra. --- lib/libc/memcmp.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/libc/memcmp.c (limited to 'lib/libc/memcmp.c') diff --git a/lib/libc/memcmp.c b/lib/libc/memcmp.c new file mode 100644 index 0000000..2348afe --- /dev/null +++ b/lib/libc/memcmp.c @@ -0,0 +1,16 @@ +/* Public domain. */ +#include + +int +memcmp (const void *str1, const void *str2, size_t count) +{ + const unsigned char *s1 = str1; + const unsigned char *s2 = str2; + + while (count-- > 0) + { + if (*s1++ != *s2++) + return s1[-1] < s2[-1] ? -1 : 1; + } + return 0; +} -- cgit v1.3.1-1-g115d