svn commit: branches/uClibc-nptl/libc: inet sysdeps/linux/common sysdeps/linux/ etc...

carmelo at uclibc.org carmelo at uclibc.org
Thu Dec 11 15:59:02 UTC 2008


Author: carmelo
Date: 2008-12-11 07:59:01 -0800 (Thu, 11 Dec 2008)
New Revision: 24386

Log:
Removed some __libc_xxx fucntions as merged from trunk.

Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>



Modified:
   branches/uClibc-nptl/libc/inet/resolv.c
   branches/uClibc-nptl/libc/sysdeps/linux/common/__syscall_fcntl64.c
   branches/uClibc-nptl/libc/sysdeps/linux/common/close.c
   branches/uClibc-nptl/libc/sysdeps/linux/common/creat64.c
   branches/uClibc-nptl/libc/sysdeps/linux/common/getdomainname.c
   branches/uClibc-nptl/libc/sysdeps/linux/common/llseek.c
   branches/uClibc-nptl/libc/sysdeps/linux/common/lseek.c
   branches/uClibc-nptl/libc/sysdeps/linux/common/open.c
   branches/uClibc-nptl/libc/sysdeps/linux/common/open64.c
   branches/uClibc-nptl/libc/sysdeps/linux/common/pread_write.c
   branches/uClibc-nptl/libc/sysdeps/linux/common/read.c
   branches/uClibc-nptl/libc/sysdeps/linux/common/truncate64.c
   branches/uClibc-nptl/libc/sysdeps/linux/common/write.c
   branches/uClibc-nptl/libc/sysdeps/linux/xtensa/pread_write.c


Changeset:
Modified: branches/uClibc-nptl/libc/inet/resolv.c
===================================================================
--- branches/uClibc-nptl/libc/inet/resolv.c	2008-12-11 15:40:55 UTC (rev 24385)
+++ branches/uClibc-nptl/libc/inet/resolv.c	2008-12-11 15:59:01 UTC (rev 24386)
@@ -219,8 +219,8 @@
 #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 @@
 				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,

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/__syscall_fcntl64.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/__syscall_fcntl64.c	2008-12-11 15:40:55 UTC (rev 24385)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/__syscall_fcntl64.c	2008-12-11 15:59:01 UTC (rev 24386)
@@ -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 @@
 
 	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

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/close.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/close.c	2008-12-11 15:40:55 UTC (rev 24385)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/close.c	2008-12-11 15:59:01 UTC (rev 24386)
@@ -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)

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/creat64.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/creat64.c	2008-12-11 15:40:55 UTC (rev 24385)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/creat64.c	2008-12-11 15:59:01 UTC (rev 24386)
@@ -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__ */

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/getdomainname.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/getdomainname.c	2008-12-11 15:40:55 UTC (rev 24385)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/getdomainname.c	2008-12-11 15:59:01 UTC (rev 24386)
@@ -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 @@
 #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

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/llseek.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/llseek.c	2008-12-11 15:40:55 UTC (rev 24385)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/llseek.c	2008-12-11 15:59:01 UTC (rev 24386)
@@ -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 @@
 		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)

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/lseek.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/lseek.c	2008-12-11 15:40:55 UTC (rev 24385)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/lseek.c	2008-12-11 15:59:01 UTC (rev 24386)
@@ -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)

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/open.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/open.c	2008-12-11 15:40:55 UTC (rev 24385)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/open.c	2008-12-11 15:59:01 UTC (rev 24386)
@@ -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_def(open)
 
-/* libc_hidden_proto(open) */
-weak_alias(__libc_open,open)
-libc_hidden_weak(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)

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/open64.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/open64.c	2008-12-11 15:40:55 UTC (rev 24385)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/open64.c	2008-12-11 15:59:01 UTC (rev 24386)
@@ -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 @@
   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__ */

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/pread_write.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/pread_write.c	2008-12-11 15:40:55 UTC (rev 24385)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/pread_write.c	2008-12-11 15:59:01 UTC (rev 24386)
@@ -42,8 +42,8 @@
 # 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 @@
 # 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)

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/read.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/read.c	2008-12-11 15:40:55 UTC (rev 24385)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/read.c	2008-12-11 15:59:01 UTC (rev 24386)
@@ -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)

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/truncate64.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/truncate64.c	2008-12-11 15:40:55 UTC (rev 24385)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/truncate64.c	2008-12-11 15:59:01 UTC (rev 24386)
@@ -30,7 +30,7 @@
 #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 @@
 #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 @@
 
 /* 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;
 

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/write.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/write.c	2008-12-11 15:40:55 UTC (rev 24385)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/write.c	2008-12-11 15:59:01 UTC (rev 24386)
@@ -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

Modified: branches/uClibc-nptl/libc/sysdeps/linux/xtensa/pread_write.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/xtensa/pread_write.c	2008-12-11 15:40:55 UTC (rev 24385)
+++ branches/uClibc-nptl/libc/sysdeps/linux/xtensa/pread_write.c	2008-12-11 15:59:01 UTC (rev 24386)
@@ -43,8 +43,8 @@
 # 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 @@
 # 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)




More information about the uClibc-cvs mailing list