diff options
-rw-r--r-- | libc/inet/resolv.c | 6 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/__syscall_fcntl64.c | 10 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/close.c | 8 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/creat64.c | 10 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/getdomainname.c | 15 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/llseek.c | 20 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/lseek.c | 18 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/open.c | 23 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/open64.c | 12 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/pread_write.c | 8 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/read.c | 8 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/truncate64.c | 19 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/write.c | 12 | ||||
-rw-r--r-- | libc/sysdeps/linux/xtensa/pread_write.c | 8 |
14 files changed, 55 insertions, 122 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index f681c372f..86f189a5f 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -219,8 +219,8 @@ libc_hidden_proto(__h_errno_location) #elif defined __UCLIBC_HAS_CTYPE_TABLES__ /* libc_hidden_proto(__ctype_b) */ #endif -int __libc_getdomainname(char *name, size_t len); -libc_hidden_proto(__libc_getdomainname) +int getdomainname(char *name, size_t len); +libc_hidden_proto(getdomainname) #define MAX_RECURSE 5 @@ -1940,7 +1940,7 @@ BAD_FAM: if (h) { char *c; if ((flags & NI_NOFQDN) - && (__libc_getdomainname (domain, sizeof(domain)) == 0) + && (getdomainname (domain, sizeof(domain)) == 0) && (c = strstr (h->h_name, domain)) && (c != h->h_name) && (*(--c) == '.')) { strncpy (host, h->h_name, diff --git a/libc/sysdeps/linux/common/__syscall_fcntl64.c b/libc/sysdeps/linux/common/__syscall_fcntl64.c index cd5c59bd2..e8782e967 100644 --- a/libc/sysdeps/linux/common/__syscall_fcntl64.c +++ b/libc/sysdeps/linux/common/__syscall_fcntl64.c @@ -12,12 +12,10 @@ #include <fcntl.h> #if defined __UCLIBC_HAS_LFS__ && defined __NR_fcntl64 -extern __typeof(fcntl64) __libc_fcntl64; -libc_hidden_proto(__libc_fcntl64) #define __NR___syscall_fcntl64 __NR_fcntl64 static __inline__ _syscall3(int, __syscall_fcntl64, int, fd, int, cmd, long, arg) -int __libc_fcntl64(int fd, int cmd, ...) +int fcntl64(int fd, int cmd, ...) { long arg; va_list list; @@ -28,9 +26,5 @@ int __libc_fcntl64(int fd, int cmd, ...) return (__syscall_fcntl64(fd, cmd, arg)); } -libc_hidden_def(__libc_fcntl64) - -/* libc_hidden_proto(fcntl64) */ -strong_alias(__libc_fcntl64,fcntl64) -libc_hidden_weak(fcntl64) +libc_hidden_def(fcntl64) #endif diff --git a/libc/sysdeps/linux/common/close.c b/libc/sysdeps/linux/common/close.c index 6a160b43e..be3d2e051 100644 --- a/libc/sysdeps/linux/common/close.c +++ b/libc/sysdeps/linux/common/close.c @@ -10,9 +10,5 @@ #include <sys/syscall.h> #include <unistd.h> -extern __typeof(close) __libc_close; -#define __NR___libc_close __NR_close -_syscall1(int, __libc_close, int, fd) -/* libc_hidden_proto(close) */ -weak_alias(__libc_close,close) -libc_hidden_weak(close) +_syscall1(int, close, int, fd) +libc_hidden_def(close) diff --git a/libc/sysdeps/linux/common/creat64.c b/libc/sysdeps/linux/common/creat64.c index 6fa010545..577ad14b5 100644 --- a/libc/sysdeps/linux/common/creat64.c +++ b/libc/sysdeps/linux/common/creat64.c @@ -22,15 +22,9 @@ #include <fcntl.h> #include <sys/types.h> -extern __typeof(open64) __libc_open64; -libc_hidden_proto(__libc_open64) - -extern __typeof(creat64) __libc_creat64; - /* Create FILE with protections MODE. */ -int __libc_creat64 (const char *file, mode_t mode) +int creat64(const char *file, mode_t mode) { - return __libc_open64 (file, O_WRONLY|O_CREAT|O_TRUNC, mode); + return open64(file, O_WRONLY|O_CREAT|O_TRUNC, mode); } -weak_alias(__libc_creat64,creat64) #endif /* __UCLIBC_HAS_LFS__ */ diff --git a/libc/sysdeps/linux/common/getdomainname.c b/libc/sysdeps/linux/common/getdomainname.c index c561aa305..20b09610a 100644 --- a/libc/sysdeps/linux/common/getdomainname.c +++ b/libc/sysdeps/linux/common/getdomainname.c @@ -16,13 +16,7 @@ /* Experimentally off - libc_hidden_proto(strcpy) */ /* libc_hidden_proto(uname) */ -#if !defined __UCLIBC_BSD_SPECIFIC__ -extern int getdomainname (char *__name, size_t __len) - __THROW __nonnull ((1)) __wur; -#endif -extern __typeof(getdomainname) __libc_getdomainname; -libc_hidden_proto(__libc_getdomainname) -int __libc_getdomainname(char *name, size_t len) +int getdomainname(char *name, size_t len) { struct utsname uts; @@ -48,10 +42,5 @@ int __libc_getdomainname(char *name, size_t len) #endif return 0; } -libc_hidden_def(__libc_getdomainname) -#if defined __UCLIBC_BSD_SPECIFIC__ -/* libc_hidden_proto(getdomainname) */ -weak_alias(__libc_getdomainname,getdomainname) -libc_hidden_weak(getdomainname) -#endif /* __UCLIBC_BSD_SPECIFIC__ */ +libc_hidden_def(getdomainname) #endif diff --git a/libc/sysdeps/linux/common/llseek.c b/libc/sysdeps/linux/common/llseek.c index 1879464f7..6bb88cac5 100644 --- a/libc/sysdeps/linux/common/llseek.c +++ b/libc/sysdeps/linux/common/llseek.c @@ -11,8 +11,6 @@ #include <sys/types.h> #include <sys/syscall.h> -extern __typeof(lseek64) __libc_lseek64; - #if defined __NR__llseek && defined __UCLIBC_HAS_LFS__ # ifndef INLINE_SYSCALL @@ -22,22 +20,20 @@ static __inline__ _syscall5(int, __syscall_llseek, int, fd, off_t, offset_hi, off_t, offset_lo, loff_t *, result, int, whence) # endif -loff_t __libc_lseek64(int fd, loff_t offset, int whence) +loff_t lseek64(int fd, loff_t offset, int whence) { loff_t result; - return(loff_t)(INLINE_SYSCALL (_llseek, 5, fd, (off_t) (offset >> 32), + return (loff_t)(INLINE_SYSCALL(_llseek, 5, fd, (off_t) (offset >> 32), (off_t) (offset & 0xffffffff), &result, whence) ?: result); } + #else -extern __typeof(lseek) __libc_lseek; -/* libc_hidden_proto(__libc_lseek) */ -loff_t __libc_lseek64(int fd, loff_t offset, int whence) +loff_t lseek64(int fd, loff_t offset, int whence) { - return(loff_t)(__libc_lseek(fd, (off_t) (offset), whence)); + return (loff_t)(lseek(fd, (off_t) (offset), whence)); } + #endif -/* libc_hidden_proto(lseek64) */ -weak_alias(__libc_lseek64,lseek64) -libc_hidden_weak(lseek64) -/*strong_alias(__libc_lseek64,_llseek) */ + +libc_hidden_def(lseek64) diff --git a/libc/sysdeps/linux/common/lseek.c b/libc/sysdeps/linux/common/lseek.c index ee49c9f25..b58f75c01 100644 --- a/libc/sysdeps/linux/common/lseek.c +++ b/libc/sysdeps/linux/common/lseek.c @@ -10,23 +10,13 @@ #include <sys/syscall.h> #include <unistd.h> -extern __typeof(lseek) __libc_lseek; -libc_hidden_proto(__libc_lseek) - #ifdef __NR_lseek -#define __NR___libc_lseek __NR_lseek -_syscall3(__off_t, __libc_lseek, int, fildes, __off_t, offset, int, whence) +_syscall3(__off_t, lseek, int, fildes, __off_t, offset, int, whence) #else -extern __typeof(lseek64) __libc_lseek64; -libc_hidden_proto(__libc_lseek64) -__off_t __libc_lseek(int fildes, __off_t offset, int whence) +__off_t lseek(int fildes, __off_t offset, int whence) { - return __libc_lseek64(fildes, offset, whence); + return lseek64(fildes, offset, whence); } #endif -libc_hidden_def(__libc_lseek) - -/* libc_hidden_proto(lseek) */ -weak_alias(__libc_lseek,lseek) -libc_hidden_weak(lseek) +libc_hidden_def(lseek) diff --git a/libc/sysdeps/linux/common/open.c b/libc/sysdeps/linux/common/open.c index a39093bd1..0faf02a00 100644 --- a/libc/sysdeps/linux/common/open.c +++ b/libc/sysdeps/linux/common/open.c @@ -14,35 +14,26 @@ #include <string.h> #include <sys/param.h> -extern __typeof(open) __libc_open; -extern __typeof(creat) __libc_creat; - #define __NR___syscall_open __NR_open static __inline__ _syscall3(int, __syscall_open, const char *, file, int, flags, __kernel_mode_t, mode) -libc_hidden_proto(__libc_open) -int __libc_open(const char *file, int oflag, ...) +int open(const char *file, int oflag, ...) { mode_t mode = 0; if (oflag & O_CREAT) { va_list arg; - va_start (arg, oflag); - mode = va_arg (arg, mode_t); - va_end (arg); + va_start(arg, oflag); + mode = va_arg(arg, mode_t); + va_end(arg); } return __syscall_open(file, oflag, mode); } -libc_hidden_def(__libc_open) - -/* libc_hidden_proto(open) */ -weak_alias(__libc_open,open) -libc_hidden_weak(open) +libc_hidden_def(open) -int __libc_creat(const char *file, mode_t mode) +int creat(const char *file, mode_t mode) { - return __libc_open(file, O_WRONLY | O_CREAT | O_TRUNC, mode); + return open(file, O_WRONLY | O_CREAT | O_TRUNC, mode); } -weak_alias(__libc_creat,creat) diff --git a/libc/sysdeps/linux/common/open64.c b/libc/sysdeps/linux/common/open64.c index 2d8a3c692..7a68b4cd9 100644 --- a/libc/sysdeps/linux/common/open64.c +++ b/libc/sysdeps/linux/common/open64.c @@ -18,14 +18,9 @@ # define O_LARGEFILE 0100000 #endif -extern __typeof(open64) __libc_open64; -extern __typeof(open) __libc_open; -libc_hidden_proto(__libc_open) - /* Open FILE with access OFLAG. If OFLAG includes O_CREAT, a third argument is the file protection. */ -libc_hidden_proto(__libc_open64) -int __libc_open64 (const char *file, int oflag, ...) +int open64 (const char *file, int oflag, ...) { mode_t mode = 0; @@ -52,9 +47,6 @@ int __libc_open64 (const char *file, int oflag, ...) return __libc_open(file, oflag | O_LARGEFILE, mode); #endif } -libc_hidden_def(__libc_open64) +libc_hidden_def(open64) -/* libc_hidden_proto(open64) */ -weak_alias(__libc_open64,open64) -libc_hidden_weak(open64) #endif /* __UCLIBC_HAS_LFS__ */ diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c index cb1d83820..83d5fdfb0 100644 --- a/libc/sysdeps/linux/common/pread_write.c +++ b/libc/sysdeps/linux/common/pread_write.c @@ -42,8 +42,8 @@ weak_alias(__libc_pread,pread) # ifdef __UCLIBC_HAS_LFS__ ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset) { - uint32_t low = offset & 0xffffffff; - uint32_t high = offset >> 32; + uint32_t low = offset & 0xffffffff; + uint32_t high = offset >> 32; return __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(high, low)); } weak_alias(__libc_pread64,pread64) @@ -66,8 +66,8 @@ weak_alias(__libc_pwrite,pwrite) # ifdef __UCLIBC_HAS_LFS__ ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset) { - uint32_t low = offset & 0xffffffff; - uint32_t high = offset >> 32; + uint32_t low = offset & 0xffffffff; + uint32_t high = offset >> 32; return __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(high, low)); } weak_alias(__libc_pwrite64,pwrite64) diff --git a/libc/sysdeps/linux/common/read.c b/libc/sysdeps/linux/common/read.c index cfa857319..b380812e6 100644 --- a/libc/sysdeps/linux/common/read.c +++ b/libc/sysdeps/linux/common/read.c @@ -10,9 +10,5 @@ #include <sys/syscall.h> #include <unistd.h> -extern __typeof(read) __libc_read; -#define __NR___libc_read __NR_read -_syscall3(ssize_t, __libc_read, int, fd, __ptr_t, buf, size_t, count) -/* libc_hidden_proto(read) */ -weak_alias(__libc_read,read) -libc_hidden_weak(read) +_syscall3(ssize_t, read, int, fd, __ptr_t, buf, size_t, count) +libc_hidden_def(read) diff --git a/libc/sysdeps/linux/common/truncate64.c b/libc/sysdeps/linux/common/truncate64.c index 40989334f..d542679ce 100644 --- a/libc/sysdeps/linux/common/truncate64.c +++ b/libc/sysdeps/linux/common/truncate64.c @@ -30,7 +30,7 @@ _syscall2(int, truncate64, const char *, path, __off64_t, length) #elif __WORDSIZE == 32 #ifndef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) __syscall_truncate64 (args) +#define INLINE_SYSCALL(name, nr, args...) __syscall_truncate64(args) #define __NR___syscall_truncate64 __NR_truncate64 #if defined(__UCLIBC_TRUNCATE64_HAS_4_ARGS__) static __inline__ _syscall4(int, __syscall_truncate64, const char *, path, @@ -41,18 +41,17 @@ static __inline__ _syscall3(int, __syscall_truncate64, const char *, path, #endif #endif - /* The exported truncate64 function. */ -int truncate64 (const char * path, __off64_t length) +int truncate64(const char * path, __off64_t length) { - uint32_t low = length & 0xffffffff; - uint32_t high = length >> 32; + uint32_t low = length & 0xffffffff; + uint32_t high = length >> 32; #if defined(__UCLIBC_TRUNCATE64_HAS_4_ARGS__) - return INLINE_SYSCALL(truncate64, 4, path, 0, - __LONG_LONG_PAIR (high, low)); + return INLINE_SYSCALL(truncate64, 4, path, 0, + __LONG_LONG_PAIR(high, low)); #else - return INLINE_SYSCALL(truncate64, 3, path, - __LONG_LONG_PAIR (high, low)); + return INLINE_SYSCALL(truncate64, 3, path, + __LONG_LONG_PAIR(high, low)); #endif } @@ -64,7 +63,7 @@ int truncate64 (const char * path, __off64_t length) /* libc_hidden_proto(truncate) */ -int truncate64 (const char * path, __off64_t length) +int truncate64(const char * path, __off64_t length) { __off_t x = (__off_t) length; diff --git a/libc/sysdeps/linux/common/write.c b/libc/sysdeps/linux/common/write.c index 7776ec955..b6d71f033 100644 --- a/libc/sysdeps/linux/common/write.c +++ b/libc/sysdeps/linux/common/write.c @@ -10,14 +10,10 @@ #include <sys/syscall.h> #include <unistd.h> -extern __typeof(write) __libc_write; -#define __NR___libc_write __NR_write -_syscall3(ssize_t, __libc_write, int, fd, const __ptr_t, buf, size_t, count) -/* libc_hidden_proto(write) */ -weak_alias(__libc_write,write) -libc_hidden_weak(write) +_syscall3(ssize_t, write, int, fd, const __ptr_t, buf, size_t, count) +libc_hidden_def(write) #if 0 /* Stupid libgcc.a from gcc 2.95.x uses __write in pure.o - * which is a blatent GNU libc-ism... */ -strong_alias(__libc_write,__write) + * which is a blatant GNU libc-ism... */ +strong_alias(write,__write) #endif diff --git a/libc/sysdeps/linux/xtensa/pread_write.c b/libc/sysdeps/linux/xtensa/pread_write.c index 212a40935..bf69452d2 100644 --- a/libc/sysdeps/linux/xtensa/pread_write.c +++ b/libc/sysdeps/linux/xtensa/pread_write.c @@ -43,8 +43,8 @@ weak_alias(__libc_pread,pread) # ifdef __UCLIBC_HAS_LFS__ ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset) { - uint32_t low = offset & 0xffffffff; - uint32_t high = offset >> 32; + uint32_t low = offset & 0xffffffff; + uint32_t high = offset >> 32; return __syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR(high, low)); } weak_alias(__libc_pread64,pread64) @@ -68,8 +68,8 @@ weak_alias(__libc_pwrite,pwrite) # ifdef __UCLIBC_HAS_LFS__ ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset) { - uint32_t low = offset & 0xffffffff; - uint32_t high = offset >> 32; + uint32_t low = offset & 0xffffffff; + uint32_t high = offset >> 32; return __syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR(high, low)); } weak_alias(__libc_pwrite64,pwrite64) |