LibC: Don't advertise wrong functions

str{,n}casecmp is supposed to be *only* declared by strings.h, note the
trailing 's' in the filename.

We don't have any implementation for strlcat; using any strcat variants is
a bad idea anyway, given our implementation of AK::String.

TODO: Find a way to lint for declared-but-nowhere-defined functions.
This commit is contained in:
Ben Wiederhake 2020-09-12 01:05:00 +02:00 committed by Andreas Kling
parent d25860f53c
commit be1e4f28cc
Notes: sideshowbarker 2024-07-19 02:44:13 +09:00

View file

@ -36,8 +36,6 @@ size_t strnlen(const char*, size_t maxlen);
int strcmp(const char*, const char*);
int strncmp(const char*, const char*, size_t);
int strcasecmp(const char*, const char*);
int strncasecmp(const char*, const char*, size_t);
int memcmp(const void*, const void*, size_t);
void* memcpy(void*, const void*, size_t);
@ -52,10 +50,8 @@ void* memset(void*, int, size_t);
__attribute__((malloc)) char* strdup(const char*);
__attribute__((malloc)) char* strndup(const char*, size_t);
__attribute__((deprecated("use strlcpy or String::copy_characters_to_buffer")))
char* strcpy(char* dest, const char* src);
__attribute__((deprecated("use strlcpy or String::copy_characters_to_buffer")))
char* strncpy(char* dest, const char* src, size_t);
__attribute__((deprecated("use strlcpy or String::copy_characters_to_buffer"))) char* strcpy(char* dest, const char* src);
__attribute__((deprecated("use strlcpy or String::copy_characters_to_buffer"))) char* strncpy(char* dest, const char* src, size_t);
__attribute__((warn_unused_result)) size_t strlcpy(char* dest, const char* src, size_t);
char* strchr(const char*, int c);
@ -63,9 +59,8 @@ char* strchrnul(const char*, int c);
char* strstr(const char* haystack, const char* needle);
char* strrchr(const char*, int c);
__attribute__((deprecated("use strlcat"))) char* strcat(char* dest, const char* src);
__attribute__((deprecated("use strlcat"))) char* strncat(char* dest, const char* src, size_t);
__attribute__((warn_unused_result)) size_t strlcat(char* dest, const char* src, size_t);
__attribute__((deprecated("use strncat"))) char* strcat(char* dest, const char* src);
char* strncat(char* dest, const char* src, size_t);
size_t strspn(const char*, const char* accept);
size_t strcspn(const char*, const char* reject);