meta: move photon/libc to root

This commit is contained in:
2026-02-08 20:45:25 +00:00
parent f00e74260d
commit 345a37962e
140 changed files with 0 additions and 0 deletions

14
libc/string/memcmp.c Normal file
View File

@@ -0,0 +1,14 @@
#include <stddef.h>
int memcmp(const void *a, const void *b, size_t n)
{
const unsigned char *s1 = a, *s2 = b;
for (size_t i = 0; i < n; i++) {
if (s1[i] != s2[i]) {
return ((s1[i] < s2[i]) ? -1 : 1);
}
}
return 0;
}