Remove __overloadable/__RENAME_CLANG
Now that we have a clang that supports transparent overloads, we can
kill all of this cruft, and restore our upstream sources to their
untouched glory. Woohoo!
Bug: 12231437
Test: Built aosp_marlin; no obvious patch-related aosp_mips issues.
Change-Id: I520a19d014f12137f80e43f973dccd6711c571cd
diff --git a/libc/arch-arm/generic/bionic/strlen.c b/libc/arch-arm/generic/bionic/strlen.c
index dccd564..44bd72f 100644
--- a/libc/arch-arm/generic/bionic/strlen.c
+++ b/libc/arch-arm/generic/bionic/strlen.c
@@ -29,7 +29,7 @@
#include <string.h>
#include <stdint.h>
-size_t strlen(const char *s) __overloadable
+size_t strlen(const char *s)
{
__builtin_prefetch(s);
__builtin_prefetch(s+32);
diff --git a/libc/arch-mips/string/memchr.c b/libc/arch-mips/string/memchr.c
index 6b4c8cc..bc24f79 100644
--- a/libc/arch-mips/string/memchr.c
+++ b/libc/arch-mips/string/memchr.c
@@ -100,7 +100,7 @@
}
void *
-memchr (void const *s, int c_in, size_t n) __overloadable
+memchr (void const *s, int c_in, size_t n)
{
if (n != 0) {
const unsigned char *p = (const unsigned char *) s;
diff --git a/libc/arch-mips/string/memcpy.c b/libc/arch-mips/string/memcpy.c
index 68827b6..bb0d179 100644
--- a/libc/arch-mips/string/memcpy.c
+++ b/libc/arch-mips/string/memcpy.c
@@ -286,7 +286,7 @@
}
void *
-memcpy (void *a, const void *b, size_t len) __overloadable
+memcpy (void *a, const void *b, size_t len)
{
unsigned long bytes, words;
void *ret = a;
diff --git a/libc/arch-mips/string/memmove.c b/libc/arch-mips/string/memmove.c
index fbff297..74d4cd0 100644
--- a/libc/arch-mips/string/memmove.c
+++ b/libc/arch-mips/string/memmove.c
@@ -383,7 +383,7 @@
}
void *
-memmove (void *dst0, const void *src0, size_t length) __overloadable
+memmove (void *dst0, const void *src0, size_t length)
{
unsigned long bytes, words;
void *ret = dst0;
diff --git a/libc/arch-mips/string/strchr.c b/libc/arch-mips/string/strchr.c
index c9397e7..3458f66 100644
--- a/libc/arch-mips/string/strchr.c
+++ b/libc/arch-mips/string/strchr.c
@@ -92,7 +92,7 @@
return (char *)p;
}
-char* strchr(const char* s, int c) __overloadable
+char* strchr(const char* s, int c)
{
const op_t *w;
op_t mask_1, mask_128, mask_c;
diff --git a/libc/arch-mips/string/strcpy.c b/libc/arch-mips/string/strcpy.c
index 7b5dee3..b77105e 100644
--- a/libc/arch-mips/string/strcpy.c
+++ b/libc/arch-mips/string/strcpy.c
@@ -167,7 +167,7 @@
}
char *
-strcpy (char *to, const char *from) __overloadable
+strcpy (char *to, const char *from)
{
char *ret = to;
op_t mask_1, mask_128;
diff --git a/libc/arch-mips/string/strlen.c b/libc/arch-mips/string/strlen.c
index 491efae..28463f6 100644
--- a/libc/arch-mips/string/strlen.c
+++ b/libc/arch-mips/string/strlen.c
@@ -79,7 +79,7 @@
#endif
size_t
-strlen (const char *str) __overloadable
+strlen (const char *str)
{
if (*str) {
const char *p = (const char *) str;
diff --git a/libc/bionic/getcwd.cpp b/libc/bionic/getcwd.cpp
index 50487ec..a8bbcf3 100644
--- a/libc/bionic/getcwd.cpp
+++ b/libc/bionic/getcwd.cpp
@@ -33,7 +33,7 @@
extern "C" int __getcwd(char* buf, size_t size);
-char* getcwd(char* buf, size_t size) __overloadable {
+char* getcwd(char* buf, size_t size) {
// You can't specify size 0 unless you're asking us to allocate for you.
if (buf != NULL && size == 0) {
errno = EINVAL;
diff --git a/libc/bionic/poll.cpp b/libc/bionic/poll.cpp
index 1d72fe5..1a54832 100644
--- a/libc/bionic/poll.cpp
+++ b/libc/bionic/poll.cpp
@@ -36,7 +36,7 @@
extern "C" int __ppoll(pollfd*, unsigned int, timespec*, const sigset64_t*, size_t);
extern "C" int __pselect6(int, fd_set*, fd_set*, fd_set*, timespec*, void*);
-int poll(pollfd* fds, nfds_t fd_count, int ms) __overloadable {
+int poll(pollfd* fds, nfds_t fd_count, int ms) {
timespec ts;
timespec* ts_ptr = nullptr;
if (ms >= 0) {
@@ -46,7 +46,7 @@
return __ppoll(fds, fd_count, ts_ptr, nullptr, 0);
}
-int ppoll(pollfd* fds, nfds_t fd_count, const timespec* ts, const sigset_t* ss) __overloadable {
+int ppoll(pollfd* fds, nfds_t fd_count, const timespec* ts, const sigset_t* ss) {
// The underlying `__ppoll` system call only takes `sigset64_t`.
SigSetConverter set;
sigset64_t* ss_ptr = nullptr;
diff --git a/libc/bionic/send.cpp b/libc/bionic/send.cpp
index 8f175d3..2e5d457 100644
--- a/libc/bionic/send.cpp
+++ b/libc/bionic/send.cpp
@@ -28,6 +28,6 @@
#include <sys/socket.h>
-ssize_t send(int socket, const void* buf, size_t len, int flags) __overloadable {
+ssize_t send(int socket, const void* buf, size_t len, int flags) {
return sendto(socket, buf, len, flags, NULL, 0);
}
diff --git a/libc/include/fcntl.h b/libc/include/fcntl.h
index 4852f5f..1c5d64c 100644
--- a/libc/include/fcntl.h
+++ b/libc/include/fcntl.h
@@ -71,9 +71,9 @@
int creat(const char* __path, mode_t __mode);
int creat64(const char* __path, mode_t __mode) __INTRODUCED_IN(21);
-int openat(int __dir_fd, const char* __path, int __flags, ...) __overloadable __RENAME_CLANG(openat);
+int openat(int __dir_fd, const char* __path, int __flags, ...);
int openat64(int __dir_fd, const char* __path, int __flags, ...) __INTRODUCED_IN(21);
-int open(const char* __path, int __flags, ...) __overloadable __RENAME_CLANG(open);
+int open(const char* __path, int __flags, ...);
int open64(const char* __path, int __flags, ...) __INTRODUCED_IN(21);
ssize_t splice(int __in_fd, off64_t* __in_offset, int __out_fd, off64_t* __out_offset, size_t __length, unsigned int __flags) __INTRODUCED_IN(21);
ssize_t tee(int __in_fd, int __out_fd, size_t __length, unsigned int __flags) __INTRODUCED_IN(21);
diff --git a/libc/include/poll.h b/libc/include/poll.h
index 9ca1cf8..6a8f757 100644
--- a/libc/include/poll.h
+++ b/libc/include/poll.h
@@ -38,8 +38,8 @@
typedef unsigned int nfds_t;
-int poll(struct pollfd* __fds, nfds_t __count, int __timeout_ms) __overloadable __RENAME_CLANG(poll);
-int ppoll(struct pollfd* __fds, nfds_t __count, const struct timespec* __timeout, const sigset_t* __mask) __overloadable __RENAME_CLANG(ppoll) __INTRODUCED_IN(21);
+int poll(struct pollfd* __fds, nfds_t __count, int __timeout_ms);
+int ppoll(struct pollfd* __fds, nfds_t __count, const struct timespec* __timeout, const sigset_t* __mask) __INTRODUCED_IN(21);
int ppoll64(struct pollfd* __fds, nfds_t __count, const struct timespec* __timeout, const sigset64_t* __mask) __INTRODUCED_IN(28);
#if defined(__BIONIC_INCLUDE_FORTIFY_HEADERS)
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index 2d9cc31..8bd690f 100644
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
@@ -109,13 +109,13 @@
int ferror(FILE* __fp);
int fflush(FILE* __fp);
int fgetc(FILE* __fp);
-char* fgets(char* __buf, int __size, FILE* __fp) __overloadable __RENAME_CLANG(fgets);
+char* fgets(char* __buf, int __size, FILE* __fp);
int fprintf(FILE* __fp , const char* __fmt, ...) __printflike(2, 3);
int fputc(int __ch, FILE* __fp);
int fputs(const char* __s, FILE* __fp);
-size_t fread(void* __buf, size_t __size, size_t __count, FILE* __fp) __overloadable __RENAME_CLANG(fread);
+size_t fread(void* __buf, size_t __size, size_t __count, FILE* __fp);
int fscanf(FILE* __fp, const char* __fmt, ...) __scanflike(2, 3);
-size_t fwrite(const void* __buf, size_t __size, size_t __count, FILE* __fp) __overloadable __RENAME_CLANG(fwrite);
+size_t fwrite(const void* __buf, size_t __size, size_t __count, FILE* __fp);
int getc(FILE* __fp);
int getchar(void);
ssize_t getdelim(char** __line_ptr, size_t* __line_length_ptr, int __delimiter, FILE* __fp) __INTRODUCED_IN(18);
@@ -156,11 +156,9 @@
char* gets(char* __buf) __attribute__((deprecated("gets is unsafe, use fgets instead")));
#endif
int sprintf(char* __s, const char* __fmt, ...)
- __printflike(2, 3) __warnattr_strict("sprintf is often misused; please use snprintf")
- __overloadable __RENAME_CLANG(sprintf);
+ __printflike(2, 3) __warnattr_strict("sprintf is often misused; please use snprintf");
int vsprintf(char* __s, const char* __fmt, va_list __args)
- __overloadable __printflike(2, 0) __RENAME_CLANG(vsprintf)
- __warnattr_strict("vsprintf is often misused; please use vsnprintf");
+ __printflike(2, 0) __warnattr_strict("vsprintf is often misused; please use vsnprintf");
char* tmpnam(char* __s)
__warnattr("tempnam is unsafe, use mkstemp or tmpfile instead");
#define P_tmpdir "/tmp/" /* deprecated */
@@ -218,12 +216,10 @@
FILE* tmpfile(void);
FILE* tmpfile64(void) __INTRODUCED_IN(24);
-int snprintf(char* __buf, size_t __size, const char* __fmt, ...)
- __printflike(3, 4) __overloadable __RENAME_CLANG(snprintf);
+int snprintf(char* __buf, size_t __size, const char* __fmt, ...) __printflike(3, 4);
int vfscanf(FILE* __fp, const char* __fmt, va_list __args) __scanflike(2, 0);
int vscanf(const char* __fmt , va_list __args) __scanflike(1, 0);
-int vsnprintf(char* __buf, size_t __size, const char* __fmt, va_list __args)
- __printflike(3, 0) __overloadable __RENAME_CLANG(vsnprintf);
+int vsnprintf(char* __buf, size_t __size, const char* __fmt, va_list __args) __printflike(3, 0);
int vsscanf(const char* __s, const char* __fmt, va_list __args) __scanflike(2, 0);
#define L_ctermid 1024 /* size for ctermid() */
diff --git a/libc/include/string.h b/libc/include/string.h
index 226566c..54d5e1c 100644
--- a/libc/include/string.h
+++ b/libc/include/string.h
@@ -42,24 +42,23 @@
#endif
void* memccpy(void* __dst, const void* __src, int __stop_char, size_t __n);
-void* memchr(const void* __s, int __ch, size_t __n) __attribute_pure__ __overloadable __RENAME_CLANG(memchr);
+void* memchr(const void* __s, int __ch, size_t __n) __attribute_pure__;
#if defined(__cplusplus)
extern "C++" void* memrchr(void* __s, int __ch, size_t __n) __RENAME(memrchr) __attribute_pure__;
extern "C++" const void* memrchr(const void* __s, int __ch, size_t __n) __RENAME(memrchr) __attribute_pure__;
#else
-void* memrchr(const void* __s, int __ch, size_t __n) __attribute_pure__ __overloadable __RENAME_CLANG(memrchr);
+void* memrchr(const void* __s, int __ch, size_t __n) __attribute_pure__;
#endif
int memcmp(const void* __lhs, const void* __rhs, size_t __n) __attribute_pure__;
-void* memcpy(void*, const void*, size_t)
- __overloadable __RENAME_CLANG(memcpy);
+void* memcpy(void*, const void*, size_t);
#if defined(__USE_GNU)
void* mempcpy(void* __dst, const void* __src, size_t __n) __INTRODUCED_IN(23);
#endif
-void* memmove(void* __dst, const void* __src, size_t __n) __overloadable __RENAME_CLANG(memmove);
-void* memset(void* __dst, int __ch, size_t __n) __overloadable __RENAME_CLANG(memset);
+void* memmove(void* __dst, const void* __src, size_t __n);
+void* memset(void* __dst, int __ch, size_t __n);
void* memmem(const void* __haystack, size_t __haystack_size, const void* __needle, size_t __needle_size) __attribute_pure__;
-char* strchr(const char* __s, int __ch) __attribute_pure__ __overloadable __RENAME_CLANG(strchr);
+char* strchr(const char* __s, int __ch) __attribute_pure__;
char* __strchr_chk(const char* __s, int __ch, size_t __n) __INTRODUCED_IN(18);
#if defined(__USE_GNU)
#if defined(__cplusplus)
@@ -70,16 +69,16 @@
#endif
#endif
-char* strrchr(const char* __s, int __ch) __attribute_pure__ __overloadable __RENAME_CLANG(strrchr);
+char* strrchr(const char* __s, int __ch) __attribute_pure__;
char* __strrchr_chk(const char* __s, int __ch, size_t __n) __INTRODUCED_IN(18);
-size_t strlen(const char* __s) __attribute_pure__ __overloadable __RENAME_CLANG(strlen);
+size_t strlen(const char* __s) __attribute_pure__;
size_t __strlen_chk(const char* __s, size_t __n) __INTRODUCED_IN(17);
int strcmp(const char* __lhs, const char* __rhs) __attribute_pure__;
-char* stpcpy(char* __dst, const char* __src) __overloadable __RENAME_CLANG(stpcpy) __INTRODUCED_IN(21);
-char* strcpy(char* __dst, const char* __src) __overloadable __RENAME_CLANG(strcpy);
-char* strcat(char* __dst, const char* __src) __overloadable __RENAME_CLANG(strcat);
+char* stpcpy(char* __dst, const char* __src) __INTRODUCED_IN(21);
+char* strcpy(char* __dst, const char* __src);
+char* strcat(char* __dst, const char* __src);
char* strdup(const char* __s);
char* strstr(const char* __haystack, const char* __needle) __attribute_pure__;
@@ -101,14 +100,14 @@
#endif
size_t strnlen(const char* __s, size_t __n) __attribute_pure__;
-char* strncat(char* __dst, const char* __src, size_t __n) __overloadable __RENAME_CLANG(strncat);
+char* strncat(char* __dst, const char* __src, size_t __n);
char* strndup(const char* __s, size_t __n);
int strncmp(const char* __lhs, const char* __rhs, size_t __n) __attribute_pure__;
-char* stpncpy(char* __dst, const char* __src, size_t __n) __overloadable __RENAME_CLANG(stpncpy) __INTRODUCED_IN(21);
-char* strncpy(char* __dst, const char* __src, size_t __n) __overloadable __RENAME_CLANG(strncpy);
+char* stpncpy(char* __dst, const char* __src, size_t __n) __INTRODUCED_IN(21);
+char* strncpy(char* __dst, const char* __src, size_t __n);
-size_t strlcat(char* __dst, const char* __src, size_t __n) __overloadable __RENAME_CLANG(strlcat);
-size_t strlcpy(char* __dst, const char* __src, size_t __n) __overloadable __RENAME_CLANG(strlcpy);
+size_t strlcat(char* __dst, const char* __src, size_t __n);
+size_t strlcpy(char* __dst, const char* __src, size_t __n);
size_t strcspn(const char* __s, const char* __reject) __attribute_pure__;
char* strpbrk(const char* __s, const char* __accept) __attribute_pure__;
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h
index be07007..27952b9 100644
--- a/libc/include/sys/cdefs.h
+++ b/libc/include/sys/cdefs.h
@@ -348,11 +348,8 @@
*/
#if defined(__clang__) && defined(__BIONIC_FORTIFY)
# define __overloadable __attribute__((overloadable))
-/* We don't use __RENAME directly because on gcc this could result in unnecessary renames. */
-# define __RENAME_CLANG(x) __RENAME(x)
#else
# define __overloadable
-# define __RENAME_CLANG(x)
#endif
/* Used to tag non-static symbols that are private and never exposed by the shared library. */
diff --git a/libc/include/sys/socket.h b/libc/include/sys/socket.h
index 152f39d..bbde88b 100644
--- a/libc/include/sys/socket.h
+++ b/libc/include/sys/socket.h
@@ -315,12 +315,11 @@
__socketcall int socket(int __af, int __type, int __protocol);
__socketcall int socketpair(int __af, int __type, int __protocol, int __fds[2]);
-ssize_t recv(int __fd, void* __buf, size_t __n, int __flags) __overloadable __RENAME_CLANG(recv);
-ssize_t send(int __fd, const void* __buf, size_t __n, int __flags) __overloadable __RENAME_CLANG(send);
+ssize_t recv(int __fd, void* __buf, size_t __n, int __flags);
+ssize_t send(int __fd, const void* __buf, size_t __n, int __flags);
-__socketcall ssize_t sendto(int __fd, const void* __buf, size_t __n, int __flags, const struct sockaddr* __dst_addr, socklen_t __dst_addr_length)
- __overloadable __RENAME_CLANG(sendto);
-__socketcall ssize_t recvfrom(int __fd, void* __buf, size_t __n, int __flags, struct sockaddr* __src_addr, socklen_t* __src_addr_length) __overloadable __RENAME_CLANG(recvfrom);
+__socketcall ssize_t sendto(int __fd, const void* __buf, size_t __n, int __flags, const struct sockaddr* __dst_addr, socklen_t __dst_addr_length);
+__socketcall ssize_t recvfrom(int __fd, void* __buf, size_t __n, int __flags, struct sockaddr* __src_addr, socklen_t* __src_addr_length);
#if defined(__BIONIC_INCLUDE_FORTIFY_HEADERS)
#include <bits/fortify/socket.h>
diff --git a/libc/include/sys/stat.h b/libc/include/sys/stat.h
index 14b5224..6fce0a5 100644
--- a/libc/include/sys/stat.h
+++ b/libc/include/sys/stat.h
@@ -165,7 +165,7 @@
int stat64(const char* __path, struct stat64* __buf) __INTRODUCED_IN(21);
int mknod(const char* __path, mode_t __mode, dev_t __dev);
-mode_t umask(mode_t __mask) __overloadable __RENAME_CLANG(umask);
+mode_t umask(mode_t __mask);
#if defined(__BIONIC_INCLUDE_FORTIFY_HEADERS)
#include <bits/fortify/stat.h>
diff --git a/libc/include/unistd.h b/libc/include/unistd.h
index f191028..e0f8b43 100644
--- a/libc/include/unistd.h
+++ b/libc/include/unistd.h
@@ -140,15 +140,14 @@
int chroot(const char* __path);
int symlink(const char* __old_path, const char* __new_path);
int symlinkat(const char* __old_path, int __new_dir_fd, const char* __new_path) __INTRODUCED_IN(21);
-ssize_t readlink(const char* __path, char* __buf, size_t __buf_size)
- __overloadable __RENAME_CLANG(readlink);
+ssize_t readlink(const char* __path, char* __buf, size_t __buf_size);
ssize_t readlinkat(int __dir_fd, const char* __path, char* __buf, size_t __buf_size)
- __INTRODUCED_IN(21) __overloadable __RENAME_CLANG(readlinkat);
+ __INTRODUCED_IN(21);
int chown(const char* __path, uid_t __owner, gid_t __group);
int fchown(int __fd, uid_t __owner, gid_t __group);
int fchownat(int __dir_fd, const char* __path, uid_t __owner, gid_t __group, int __flags);
int lchown(const char* __path, uid_t __owner, gid_t __group);
-char* getcwd(char* __buf, size_t __size) __overloadable __RENAME_CLANG(getcwd);
+char* getcwd(char* __buf, size_t __size);
void sync(void);
#if defined(__USE_GNU)
@@ -157,10 +156,8 @@
int close(int __fd);
-ssize_t read(int __fd, void* __buf, size_t __count) __overloadable
- __RENAME_CLANG(read);
-ssize_t write(int __fd, const void* __buf, size_t __count) __overloadable
- __RENAME_CLANG(write);
+ssize_t read(int __fd, void* __buf, size_t __count);
+ssize_t write(int __fd, const void* __buf, size_t __count);
int dup(int __old_fd);
int dup2(int __old_fd, int __new_fd);
@@ -173,26 +170,22 @@
int truncate(const char* __path, off_t __length) __RENAME(truncate64) __INTRODUCED_IN(21);
off_t lseek(int __fd, off_t __offset, int __whence) __RENAME(lseek64);
ssize_t pread(int __fd, void* __buf, size_t __count, off_t __offset)
- __overloadable __RENAME(pread64) __INTRODUCED_IN(12);
+ __RENAME(pread64) __INTRODUCED_IN(12);
ssize_t pwrite(int __fd, const void* __buf, size_t __count, off_t __offset)
- __overloadable __RENAME(pwrite64) __INTRODUCED_IN(12);
+ __RENAME(pwrite64) __INTRODUCED_IN(12);
int ftruncate(int __fd, off_t __length) __RENAME(ftruncate64) __INTRODUCED_IN(12);
#else
int truncate(const char* __path, off_t __length);
off_t lseek(int __fd, off_t __offset, int __whence);
-ssize_t pread(int __fd, void* __buf, size_t __count, off_t __offset)
- __overloadable __RENAME_CLANG(pread);
-ssize_t pwrite(int __fd, const void* __buf, size_t __count, off_t __offset)
- __overloadable __RENAME_CLANG(pwrite);
+ssize_t pread(int __fd, void* __buf, size_t __count, off_t __offset);
+ssize_t pwrite(int __fd, const void* __buf, size_t __count, off_t __offset);
int ftruncate(int __fd, off_t __length);
#endif
int truncate64(const char* __path, off64_t __length) __INTRODUCED_IN(21);
off64_t lseek64(int __fd, off64_t __offset, int __whence);
-ssize_t pread64(int __fd, void* __buf, size_t __count, off64_t __offset)
- __INTRODUCED_IN(12) __overloadable __RENAME_CLANG(pread64);
-ssize_t pwrite64(int __fd, const void* __buf, size_t __count, off64_t __offset)
- __INTRODUCED_IN(12) __overloadable __RENAME_CLANG(pwrite64);
+ssize_t pread64(int __fd, void* __buf, size_t __count, off64_t __offset) __INTRODUCED_IN(12);
+ssize_t pwrite64(int __fd, const void* __buf, size_t __count, off64_t __offset) __INTRODUCED_IN(12);
int ftruncate64(int __fd, off64_t __length) __INTRODUCED_IN(12);
int pause(void);
diff --git a/libc/stdio/stdio.cpp b/libc/stdio/stdio.cpp
index d3ac043..e066e5b 100644
--- a/libc/stdio/stdio.cpp
+++ b/libc/stdio/stdio.cpp
@@ -713,7 +713,7 @@
* Return first argument, or NULL if no characters were read.
* Do not return NULL if n == 1.
*/
-char* fgets(char* buf, int n, FILE* fp) __overloadable {
+char* fgets(char* buf, int n, FILE* fp) {
CHECK_FP(fp);
ScopedFileLock sfl(fp);
return fgets_unlocked(buf, n, fp);
@@ -1031,7 +1031,7 @@
return __sflush(fp);
}
-size_t fread(void* buf, size_t size, size_t count, FILE* fp) __overloadable {
+size_t fread(void* buf, size_t size, size_t count, FILE* fp) {
CHECK_FP(fp);
ScopedFileLock sfl(fp);
return fread_unlocked(buf, size, count, fp);
diff --git a/libc/upstream-openbsd/lib/libc/string/memchr.c b/libc/upstream-openbsd/lib/libc/string/memchr.c
index 976ed21..a6a4bd6 100644
--- a/libc/upstream-openbsd/lib/libc/string/memchr.c
+++ b/libc/upstream-openbsd/lib/libc/string/memchr.c
@@ -34,7 +34,7 @@
#include <string.h>
void *
-memchr(const void *s, int c, size_t n) __overloadable
+memchr(const void *s, int c, size_t n)
{
if (n != 0) {
const unsigned char *p = s;
diff --git a/libc/upstream-openbsd/lib/libc/string/memmove.c b/libc/upstream-openbsd/lib/libc/string/memmove.c
index 6b5db47..2f1deb2 100644
--- a/libc/upstream-openbsd/lib/libc/string/memmove.c
+++ b/libc/upstream-openbsd/lib/libc/string/memmove.c
@@ -46,7 +46,7 @@
* Copy a block of memory, handling overlap.
*/
void *
-memmove(void *dst0, const void *src0, size_t length) __overloadable
+memmove(void *dst0, const void *src0, size_t length)
{
char *dst = dst0;
const char *src = src0;
diff --git a/libc/upstream-openbsd/lib/libc/string/memrchr.c b/libc/upstream-openbsd/lib/libc/string/memrchr.c
index 4b67503..26a3399 100644
--- a/libc/upstream-openbsd/lib/libc/string/memrchr.c
+++ b/libc/upstream-openbsd/lib/libc/string/memrchr.c
@@ -23,7 +23,7 @@
* Find the last occurrence of 'c' in the buffer 's' of size 'n'.
*/
void *
-memrchr(const void *s, int c, size_t n) __overloadable
+memrchr(const void *s, int c, size_t n)
{
const unsigned char *cp;
diff --git a/libc/upstream-openbsd/lib/libc/string/stpcpy.c b/libc/upstream-openbsd/lib/libc/string/stpcpy.c
index 3ed5782..d88afac 100644
--- a/libc/upstream-openbsd/lib/libc/string/stpcpy.c
+++ b/libc/upstream-openbsd/lib/libc/string/stpcpy.c
@@ -37,7 +37,7 @@
#endif
char *
-stpcpy(char *to, const char *from) __overloadable
+stpcpy(char *to, const char *from)
{
for (; (*to = *from) != '\0'; ++from, ++to);
return(to);
diff --git a/libc/upstream-openbsd/lib/libc/string/stpncpy.c b/libc/upstream-openbsd/lib/libc/string/stpncpy.c
index f30bf15..6bdee5d 100644
--- a/libc/upstream-openbsd/lib/libc/string/stpncpy.c
+++ b/libc/upstream-openbsd/lib/libc/string/stpncpy.c
@@ -35,7 +35,7 @@
#include <string.h>
char *
-stpncpy(char *dst, const char *src, size_t n) __overloadable
+stpncpy(char *dst, const char *src, size_t n)
{
if (n != 0) {
char *d = dst;
diff --git a/libc/upstream-openbsd/lib/libc/string/strcat.c b/libc/upstream-openbsd/lib/libc/string/strcat.c
index 7872a2d..646c9c2 100644
--- a/libc/upstream-openbsd/lib/libc/string/strcat.c
+++ b/libc/upstream-openbsd/lib/libc/string/strcat.c
@@ -37,7 +37,7 @@
#endif
char *
-strcat(char *s, const char *append) __overloadable
+strcat(char *s, const char *append)
{
char *save = s;
diff --git a/libc/upstream-openbsd/lib/libc/string/strcpy.c b/libc/upstream-openbsd/lib/libc/string/strcpy.c
index 1b1169c..5a9001e 100644
--- a/libc/upstream-openbsd/lib/libc/string/strcpy.c
+++ b/libc/upstream-openbsd/lib/libc/string/strcpy.c
@@ -37,7 +37,7 @@
#endif
char *
-strcpy(char *to, const char *from) __overloadable
+strcpy(char *to, const char *from)
{
char *save = to;
diff --git a/libc/upstream-openbsd/lib/libc/string/strlcat.c b/libc/upstream-openbsd/lib/libc/string/strlcat.c
index 8a950f5..6bf2a41 100644
--- a/libc/upstream-openbsd/lib/libc/string/strlcat.c
+++ b/libc/upstream-openbsd/lib/libc/string/strlcat.c
@@ -27,7 +27,7 @@
* If retval >= dsize, truncation occurred.
*/
size_t
-strlcat(char *dst, const char *src, size_t dsize) __overloadable
+strlcat(char *dst, const char *src, size_t dsize)
{
const char *odst = dst;
const char *osrc = src;
diff --git a/libc/upstream-openbsd/lib/libc/string/strlcpy.c b/libc/upstream-openbsd/lib/libc/string/strlcpy.c
index 647b18b..3677689 100644
--- a/libc/upstream-openbsd/lib/libc/string/strlcpy.c
+++ b/libc/upstream-openbsd/lib/libc/string/strlcpy.c
@@ -25,7 +25,7 @@
* Returns strlen(src); if retval >= dsize, truncation occurred.
*/
size_t
-strlcpy(char *dst, const char *src, size_t dsize) __overloadable
+strlcpy(char *dst, const char *src, size_t dsize)
{
const char *osrc = src;
size_t nleft = dsize;
diff --git a/libc/upstream-openbsd/lib/libc/string/strncat.c b/libc/upstream-openbsd/lib/libc/string/strncat.c
index 5b07749..b3388ac 100644
--- a/libc/upstream-openbsd/lib/libc/string/strncat.c
+++ b/libc/upstream-openbsd/lib/libc/string/strncat.c
@@ -38,7 +38,7 @@
* are written at dst (at most n+1 bytes being appended). Return dst.
*/
char *
-strncat(char *dst, const char *src, size_t n) __overloadable
+strncat(char *dst, const char *src, size_t n)
{
if (n != 0) {
char *d = dst;
diff --git a/libc/upstream-openbsd/lib/libc/string/strncpy.c b/libc/upstream-openbsd/lib/libc/string/strncpy.c
index ad9dc84..d6d8647 100644
--- a/libc/upstream-openbsd/lib/libc/string/strncpy.c
+++ b/libc/upstream-openbsd/lib/libc/string/strncpy.c
@@ -39,7 +39,7 @@
* Return dst.
*/
char *
-strncpy(char *dst, const char *src, size_t n) __overloadable
+strncpy(char *dst, const char *src, size_t n)
{
if (n != 0) {
char *d = dst;