diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-15 18:24:54 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-15 18:24:54 +0100 |
| commit | 69e6fe89fa9baafeca3e3515bb50897cd8ee7c35 (patch) | |
| tree | 489046ce167b8b20d205f87f4ae1f4b680c19b43 /lib/libc/strings | |
| parent | 0d5bffe9d2caadc1215c875e560c52bca5161c54 (diff) | |
Add getauxval and cleanup libc startup
Diffstat (limited to 'lib/libc/strings')
| -rw-r--r-- | lib/libc/strings/strcasecmp.c | 9 | ||||
| -rw-r--r-- | lib/libc/strings/strncasecmp.c | 9 |
2 files changed, 6 insertions, 12 deletions
diff --git a/lib/libc/strings/strcasecmp.c b/lib/libc/strings/strcasecmp.c index fc38be4a..476a5d8d 100644 --- a/lib/libc/strings/strcasecmp.c +++ b/lib/libc/strings/strcasecmp.c @@ -1,8 +1,7 @@ -#include "features.h" // for __weak - #include <ctype.h> // for tolower #include <libc.h> // for __unused #include <locale.h> // for locale_t +#include <sys/cdefs.h> int strcasecmp(const char *s1, const char *s2) { @@ -17,12 +16,10 @@ int strcasecmp(const char *s1, const char *s2) s2++; } - return (unsigned char)tolower((unsigned char)*s1) - - (unsigned char)tolower((unsigned char)*s2); + return (unsigned char)tolower((unsigned char)*s1) - (unsigned char)tolower((unsigned char)*s2); } -__weak int strcasecmp_l(const char *s1, const char *s2, - locale_t __unused locale) +__weak int strcasecmp_l(const char *s1, const char *s2, locale_t __unused locale) { return strcasecmp(s1, s2); } diff --git a/lib/libc/strings/strncasecmp.c b/lib/libc/strings/strncasecmp.c index 0c46d27f..a36990cf 100644 --- a/lib/libc/strings/strncasecmp.c +++ b/lib/libc/strings/strncasecmp.c @@ -1,9 +1,8 @@ -#include "features.h" // for __weak - #include <ctype.h> // for tolower #include <libc.h> // for __unused #include <locale.h> // for locale_t #include <stddef.h> // for size_t +#include <sys/cdefs.h> int strncasecmp(const char *s1, const char *s2, size_t n) { @@ -24,12 +23,10 @@ int strncasecmp(const char *s1, const char *s2, size_t n) if (n == (size_t)-1) return 0; - return (unsigned char)tolower((unsigned char)*s1) - - (unsigned char)tolower((unsigned char)*s2); + return (unsigned char)tolower((unsigned char)*s1) - (unsigned char)tolower((unsigned char)*s2); } -__weak int strncasecmp_l(const char *s1, const char *s2, size_t n, - locale_t __unused locale) +__weak int strncasecmp_l(const char *s1, const char *s2, size_t n, locale_t __unused locale) { return strncasecmp(s1, s2, n); } |
