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

vda at uclibc.org vda at uclibc.org
Wed Feb 25 11:15:13 UTC 2009


Author: vda
Date: 2009-02-25 11:15:13 +0000 (Wed, 25 Feb 2009)
New Revision: 25450

Log:
reinstate __libc_foo for linuxthreads.old



Modified:
   branches/uClibc-nptl/libc/sysdeps/linux/common/close.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/read.c
   branches/uClibc-nptl/libc/sysdeps/linux/common/write.c
   branches/uClibc-nptl/libpthread/linuxthreads.old/cancel.c
   branches/uClibc-nptl/libpthread/linuxthreads.old/pthread.c
   branches/uClibc-nptl/libpthread/linuxthreads.old/wrapsyscall.c


Changeset:
Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/close.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/close.c	2009-02-25 11:06:29 UTC (rev 25449)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/close.c	2009-02-25 11:15:13 UTC (rev 25450)
@@ -11,4 +11,10 @@
 #include <unistd.h>
 
 _syscall1(int, close, int, fd)
+
+#ifndef __LINUXTHREADS_OLD__
 libc_hidden_def(close)
+#else
+libc_hidden_weak(close)
+strong_alias(close,__libc_close)
+#endif

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/llseek.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/llseek.c	2009-02-25 11:06:29 UTC (rev 25449)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/llseek.c	2009-02-25 11:15:13 UTC (rev 25450)
@@ -36,4 +36,9 @@
 
 #endif
 
+#ifndef __LINUXTHREADS_OLD__
 libc_hidden_def(lseek64)
+#else
+libc_hidden_weak(lseek64)
+strong_alias(lseek64,__libc_lseek64)
+#endif

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/lseek.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/lseek.c	2009-02-25 11:06:29 UTC (rev 25449)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/lseek.c	2009-02-25 11:15:13 UTC (rev 25450)
@@ -19,4 +19,9 @@
 	return lseek64(fildes, offset, whence);
 }
 #endif
+#ifndef __LINUXTHREADS_OLD__
 libc_hidden_def(lseek)
+#else
+libc_hidden_weak(lseek)
+strong_alias(lseek,__libc_lseek)
+#endif

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/open.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/open.c	2009-02-25 11:06:29 UTC (rev 25449)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/open.c	2009-02-25 11:15:13 UTC (rev 25450)
@@ -31,7 +31,12 @@
 
 	return __syscall_open(file, oflag, mode);
 }
+#ifndef __LINUXTHREADS_OLD__
 libc_hidden_def(open)
+#else
+libc_hidden_weak(open)
+strong_alias(open,__libc_open)
+#endif
 
 int creat(const char *file, mode_t mode)
 {

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/open64.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/open64.c	2009-02-25 11:06:29 UTC (rev 25449)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/open64.c	2009-02-25 11:15:13 UTC (rev 25450)
@@ -47,6 +47,11 @@
   return open(file, oflag | O_LARGEFILE, mode);
 #endif
 }
+#ifndef __LINUXTHREADS_OLD__
 libc_hidden_def(open64)
+#else
+libc_hidden_weak(open64)
+strong_alias(open64,__libc_open64)
+#endif
 
 #endif /* __UCLIBC_HAS_LFS__ */

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/read.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/read.c	2009-02-25 11:06:29 UTC (rev 25449)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/read.c	2009-02-25 11:15:13 UTC (rev 25450)
@@ -11,4 +11,9 @@
 #include <unistd.h>
 
 _syscall3(ssize_t, read, int, fd, __ptr_t, buf, size_t, count)
+#ifndef __LINUXTHREADS_OLD__
 libc_hidden_def(read)
+#else
+libc_hidden_weak(read)
+strong_alias(read,__libc_read)
+#endif

Modified: branches/uClibc-nptl/libc/sysdeps/linux/common/write.c
===================================================================
--- branches/uClibc-nptl/libc/sysdeps/linux/common/write.c	2009-02-25 11:06:29 UTC (rev 25449)
+++ branches/uClibc-nptl/libc/sysdeps/linux/common/write.c	2009-02-25 11:15:13 UTC (rev 25450)
@@ -11,7 +11,13 @@
 #include <unistd.h>
 
 _syscall3(ssize_t, write, int, fd, const __ptr_t, buf, size_t, count)
+#ifndef __LINUXTHREADS_OLD__
 libc_hidden_def(write)
+#else
+libc_hidden_weak(write)
+strong_alias(write,__libc_write)
+#endif
+
 #if 0
 /* Stupid libgcc.a from gcc 2.95.x uses __write in pure.o
  * which is a blatant GNU libc-ism... */

Modified: branches/uClibc-nptl/libpthread/linuxthreads.old/cancel.c
===================================================================
--- branches/uClibc-nptl/libpthread/linuxthreads.old/cancel.c	2009-02-25 11:06:29 UTC (rev 25449)
+++ branches/uClibc-nptl/libpthread/linuxthreads.old/cancel.c	2009-02-25 11:15:13 UTC (rev 25450)
@@ -215,7 +215,7 @@
 #ifndef __PIC__
 /* We need a hook to force the cancelation wrappers to be linked in when
    static libpthread is used.  */
-extern const int __pthread_provide_wrappers;
-static const int * const __pthread_require_wrappers =
+extern const char __pthread_provide_wrappers;
+static const char *const __pthread_require_wrappers =
   &__pthread_provide_wrappers;
 #endif

Modified: branches/uClibc-nptl/libpthread/linuxthreads.old/pthread.c
===================================================================
--- branches/uClibc-nptl/libpthread/linuxthreads.old/pthread.c	2009-02-25 11:06:29 UTC (rev 25449)
+++ branches/uClibc-nptl/libpthread/linuxthreads.old/pthread.c	2009-02-25 11:15:13 UTC (rev 25450)
@@ -1156,7 +1156,7 @@
 #ifndef __PIC__
 /* We need a hook to force the cancelation wrappers to be linked in when
    static libpthread is used.  */
-extern const int __pthread_provide_wrappers;
-static const int *const __pthread_require_wrappers =
+extern const char __pthread_provide_wrappers;
+static const char *const __pthread_require_wrappers =
   &__pthread_provide_wrappers;
 #endif

Modified: branches/uClibc-nptl/libpthread/linuxthreads.old/wrapsyscall.c
===================================================================
--- branches/uClibc-nptl/libpthread/linuxthreads.old/wrapsyscall.c	2009-02-25 11:06:29 UTC (rev 25449)
+++ branches/uClibc-nptl/libpthread/linuxthreads.old/wrapsyscall.c	2009-02-25 11:15:13 UTC (rev 25450)
@@ -37,12 +37,13 @@
 #ifndef __PIC__
 /* We need a hook to force this file to be linked in when static
    libpthread is used.  */
-const int __pthread_provide_wrappers = 0;
+const char __pthread_provide_wrappers = 0;
 #endif
 
-
+/* Using private interface to libc (__libc_foo) to implement
+ * cancellable versions of some libc functions */
 #define CANCELABLE_SYSCALL(res_type, name, param_list, params)			\
-res_type name param_list;							\
+res_type __libc_##name param_list;						\
 res_type									\
 __attribute__ ((weak))								\
 name param_list									\
@@ -50,13 +51,13 @@
   res_type result;								\
   int oldtype;									\
   pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);		\
-  result = name params;								\
+  result = __libc_##name params;						\
   pthread_setcanceltype (oldtype, NULL);					\
   return result;								\
 }
 
 #define CANCELABLE_SYSCALL_VA(res_type, name, param_list, params, last_arg)	\
-res_type name param_list;							\
+res_type __libc_##name param_list;						\
 res_type									\
 __attribute__ ((weak))								\
 name param_list									\
@@ -66,7 +67,7 @@
   va_list ap;									\
   pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype);		\
   va_start (ap, last_arg);							\
-  result = name params;								\
+  result = __libc_##name params;						\
   va_end (ap);									\
   pthread_setcanceltype (oldtype, NULL);					\
   return result;								\



More information about the uClibc-cvs mailing list