Skip to content

Commit

Permalink
Add memcmp() to string.h
Browse files Browse the repository at this point in the history
  • Loading branch information
maximecb committed Nov 18, 2023
1 parent ec55098 commit 7647148
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ncc/include/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
#include <stddef.h>
#include <ctype.h>

#ifndef memset
#define memset(dst, value, num_bytes) asm (dst, value, num_bytes) -> void { syscall memset; }
#endif

#ifndef memcpy
#define memcpy(dst, src, num_bytes) asm (dst, src, num_bytes) -> void { syscall memcpy; }
#endif

#ifndef memset
#define memset(dst, value, num_bytes) asm (dst, value, num_bytes) -> void { syscall memset; }
#ifndef memcmp
#define memcmp(ptr_a, ptr_b, num_bytes) asm (ptr_a, ptr_b, num_bytes) -> int { syscall memcmp; }
#endif

size_t strlen(char* p)
Expand Down

0 comments on commit 7647148

Please sign in to comment.