diff options
| author | Kacper <kacper@mail.openlinux.dev> | 2025-12-07 22:22:16 +0100 |
|---|---|---|
| committer | Kacper <kacper@mail.openlinux.dev> | 2025-12-07 22:22:16 +0100 |
| commit | 8f9e448b2ef6db7cd905540c21f3c5b190e7a1e7 (patch) | |
| tree | ae0285dd15042d1e9236a5ce2e60daf65acbdca0 /lib/libc/string | |
| parent | fc00c656c96528112d05cf0edf8631bd5eaea446 (diff) | |
Add bin/true and bin/false implementations
- Added assembly implementations for `true` and `false` commands.
- Updated Kbuild files to include new binaries.
- Removed unused libraries and headers.
- Cleaned up makefile and unused code.
Diffstat (limited to 'lib/libc/string')
| -rw-r--r-- | lib/libc/string/Kbuild | 32 | ||||
| -rw-r--r-- | lib/libc/string/memcpy.c | 2 | ||||
| -rw-r--r-- | lib/libc/string/strcoll.c | 2 | ||||
| -rw-r--r-- | lib/libc/string/strerror.c | 2 | ||||
| -rw-r--r-- | lib/libc/string/strxfrm.c | 4 |
5 files changed, 37 insertions, 5 deletions
diff --git a/lib/libc/string/Kbuild b/lib/libc/string/Kbuild new file mode 100644 index 00000000..6fec9c43 --- /dev/null +++ b/lib/libc/string/Kbuild @@ -0,0 +1,32 @@ +obj-y += memccpy.o +obj-y += memchr.o +obj-y += memcmp.o +obj-y += memcpy.o +obj-y += memmem.o +obj-y += memmove.o +obj-y += memset.o +obj-y += stpcpy.o +obj-y += stpncpy.o +obj-y += strcat.o +obj-y += strchr.o +obj-y += strcmp.o +obj-y += strcoll.o +obj-y += strcpy.o +obj-y += strcspn.o +obj-y += strdup.o +obj-y += strerror.o +obj-y += strlcat.o +obj-y += strlcpy.o +obj-y += strlen.o +obj-y += strncat.o +obj-y += strncmp.o +obj-y += strncpy.o +obj-y += strndup.o +obj-y += strnlen.o +obj-y += strpbrk.o +obj-y += strrchr.o +obj-y += strspn.o +obj-y += strstr.o +obj-y += strtok_r.o +obj-y += strtok.o +obj-y += strxfrm.o diff --git a/lib/libc/string/memcpy.c b/lib/libc/string/memcpy.c index 505cc622..ecdbd602 100644 --- a/lib/libc/string/memcpy.c +++ b/lib/libc/string/memcpy.c @@ -1,7 +1,7 @@ #include <string.h> #include <features.h> -weak void *memcpy(void *restrict s1, const void *restrict s2, size_t n); +__weak void *memcpy(void *restrict s1, const void *restrict s2, size_t n); void *memcpy(void *restrict s1, const void *restrict s2, size_t n) { diff --git a/lib/libc/string/strcoll.c b/lib/libc/string/strcoll.c index 6b2e532a..6efaa3d3 100644 --- a/lib/libc/string/strcoll.c +++ b/lib/libc/string/strcoll.c @@ -7,7 +7,7 @@ int strcoll(const char *s1, const char *s2) return strcmp(s1, s2); } -weak int strcoll_l(const char *s1, const char *s2, locale_t unused locale) +__weak int strcoll_l(const char *s1, const char *s2, locale_t __unused locale) { return strcoll(s1, s2); } diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c index 1d5903cb..c091ac79 100644 --- a/lib/libc/string/strerror.c +++ b/lib/libc/string/strerror.c @@ -119,7 +119,7 @@ int strerror_r(int errnum, char *buf, size_t buflen) return 0; } -weak char *strerror_l(int errnum, locale_t unused locale) +__weak char *strerror_l(int errnum, locale_t __unused locale) { return strerror(errnum); } diff --git a/lib/libc/string/strxfrm.c b/lib/libc/string/strxfrm.c index d62d0a96..123ebfe8 100644 --- a/lib/libc/string/strxfrm.c +++ b/lib/libc/string/strxfrm.c @@ -11,8 +11,8 @@ size_t strxfrm(char *restrict s1, const char *restrict s2, size_t n) return len; } -weak size_t strxfrm_l(char *restrict s1, const char *restrict s2, size_t n, - locale_t unused locale) +__weak size_t strxfrm_l(char *restrict s1, const char *restrict s2, size_t n, + locale_t __unused locale) { return strxfrm(s1, s2, n); } |
