2018-10-16 05:01:38 -04:00
|
|
|
#pragma once
|
|
|
|
|
2019-04-06 08:29:29 -04:00
|
|
|
#include <AK/Types.h>
|
2018-10-16 05:01:38 -04:00
|
|
|
|
2018-11-09 06:20:44 -05:00
|
|
|
extern "C" {
|
|
|
|
|
2019-02-22 04:23:06 -05:00
|
|
|
static_assert(sizeof(size_t) == 4);
|
|
|
|
|
|
|
|
void* memcpy(void*, const void*, size_t);
|
|
|
|
char* strcpy(char*, const char*);
|
2019-02-07 04:29:26 -05:00
|
|
|
char* strncpy(char*, const char*, size_t);
|
2018-10-17 04:55:43 -04:00
|
|
|
int strcmp(char const*, const char*);
|
2018-12-02 17:34:50 -05:00
|
|
|
size_t strlen(const char*);
|
2019-08-10 11:01:33 -04:00
|
|
|
size_t strnlen(const char*, size_t);
|
2019-02-22 04:23:06 -05:00
|
|
|
void* memset(void*, int, size_t);
|
2019-05-28 05:53:16 -04:00
|
|
|
char* strdup(const char*);
|
2018-10-17 04:55:43 -04:00
|
|
|
int memcmp(const void*, const void*, size_t);
|
2018-10-31 17:43:49 -04:00
|
|
|
char* strrchr(const char* str, int ch);
|
2019-03-23 17:03:17 -04:00
|
|
|
void* memmove(void* dest, const void* src, size_t n);
|
2018-11-09 06:20:44 -05:00
|
|
|
|
2019-07-03 15:17:35 -04:00
|
|
|
inline u16 ntohs(u16 w) { return (w & 0xff) << 8 | ((w >> 8) & 0xff); }
|
|
|
|
inline u16 htons(u16 w) { return (w & 0xff) << 8 | ((w >> 8) & 0xff); }
|
2018-11-09 06:20:44 -05:00
|
|
|
}
|