This is the mail archive of the libc-hacker@sourceware.org mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] glibc build fixes


Hi!

With this I got glibc to build again on the 7 arches I did the build on.

2006-02-13  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/not-cancel.h (__openat_not_cancel,
	__openat64_not_cancel): Remove prototypes.
	(__openat_nocancel, __openat64_nocancel): New prototypes or defines.
	(openat_not_cancel, openat_not_cancel_3, openat64_not_cancel,
	openat64_not_cancel_3): Use them.
nptl/
	* descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
	Set robust_list.__next rather than robust_list.
	* sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
	(__pthread_list_t): New typedef.
	(pthread_mutex_t): Replace __next and __prev fields with __list.
	* sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
	(__pthread_list_t): New typedef.
	(pthread_mutex_t): Replace __next and __prev fields with __list.
	* sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
	(__pthread_list_t, __pthread_slist_t): New typedefs.
	(pthread_mutex_t): Replace __next and __prev fields with __list.
	* sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
	(__pthread_list_t, __pthread_slist_t): New typedefs.
	(pthread_mutex_t): Replace __next and __prev fields with __list.
	* sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
	(__pthread_list_t, __pthread_slist_t): New typedefs.
	(pthread_mutex_t): Replace __next and __prev fields with __list.
	* sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
	(__pthread_slist_t): New typedef.
	(pthread_mutex_t): Replace __next field with __list.

--- libc/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h	30 Jan 2006 09:29:48 -0000	1.7.2.4
+++ libc/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h	13 Feb 2006 08:18:12 -0000
@@ -43,6 +43,13 @@ typedef union
 } pthread_attr_t;
 
 
+typedef struct __pthread_internal_list
+{
+  struct __pthread_internal_list *__prev;
+  struct __pthread_internal_list *__next;
+} __pthread_list_t;
+
+
 /* Data structures for mutex handling.  The structure of the attribute
    type is deliberately not exposed.  */
 typedef union
@@ -57,8 +64,7 @@ typedef union
        binary compatibility.  */
     int __kind;
     int __spins;
-    struct __pthread_mutex_s *__next;
-    struct __pthread_mutex_s *__prev;
+    __pthread_list_t __list;
 #define __PTHREAD_MUTEX_HAVE_PREV	1
   } __data;
   char __size[__SIZEOF_PTHREAD_MUTEX_T];
--- libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h	6 Jan 2006 21:55:55 -0000	1.13.2.3
+++ libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h	13 Feb 2006 08:18:12 -0000
@@ -43,6 +43,13 @@ typedef union
 } pthread_attr_t;
 
 
+typedef struct __pthread_internal_list
+{
+  struct __pthread_internal_list *__prev;
+  struct __pthread_internal_list *__next;
+} __pthread_list_t;
+
+
 /* Data structures for mutex handling.  The structure of the attribute
    type is not exposed on purpose.  */
 typedef union
@@ -57,8 +64,7 @@ typedef union
        binary compatibility.  */
     int __kind;
     int __spins;
-    struct __pthread_mutex_s *__next;
-    struct __pthread_mutex_s *__prev;
+    __pthread_list_t __list;
 #define __PTHREAD_MUTEX_HAVE_PREV	1
   } __data;
   char __size[__SIZEOF_PTHREAD_MUTEX_T];
--- libc/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h	9 Jan 2006 21:54:59 -0000	1.14.2.4
+++ libc/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h	13 Feb 2006 08:18:12 -0000
@@ -58,6 +58,20 @@ typedef union
 } pthread_attr_t;
 
 
+#if __WORDSIZE == 64
+typedef struct __pthread_internal_list
+{
+  struct __pthread_internal_list *__prev;
+  struct __pthread_internal_list *__next;
+} __pthread_list_t;
+#else
+typedef struct __pthread_internal_slist
+{
+  struct __pthread_internal_slist *__next;
+} __pthread_slist_t;
+#endif
+
+
 /* Data structures for mutex handling.  The structure of the attribute
    type is deliberately not exposed.  */
 typedef union
@@ -75,15 +89,14 @@ typedef union
     int __kind;
 #if __WORDSIZE == 64
     int __spins;
-    struct __pthread_mutex_s *__next;
-    struct __pthread_mutex_s *__prev;
+    __pthread_list_t __list;
 # define __PTHREAD_MUTEX_HAVE_PREV	1
 #else
     unsigned int __nusers;
     __extension__ union
     {
       int __spins;
-      struct __pthread_mutex_s *__next;
+      __pthread_slist_t __list;
     };
 #endif
   } __data;
--- libc/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h	9 Jan 2006 21:54:59 -0000	1.13.2.4
+++ libc/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h	13 Feb 2006 08:18:12 -0000
@@ -57,6 +57,20 @@ typedef union
 } pthread_attr_t;
 
 
+#if __WORDSIZE == 64
+typedef struct __pthread_internal_list
+{
+  struct __pthread_internal_list *__prev;
+  struct __pthread_internal_list *__next;
+} __pthread_list_t;
+#else
+typedef struct __pthread_internal_slist
+{
+  struct __pthread_internal_slist *__next;
+} __pthread_slist_t;
+#endif
+
+
 /* Data structures for mutex handling.  The structure of the attribute
    type is not exposed on purpose.  */
 typedef union
@@ -74,15 +88,14 @@ typedef union
     int __kind;
 #if __WORDSIZE == 64
     int __spins;
-    struct __pthread_mutex_s *__next;
-    struct __pthread_mutex_s *__prev;
+    __pthread_list_t __list;
 # define __PTHREAD_MUTEX_HAVE_PREV	1
 #else
     unsigned int __nusers;
     __extension__ union
     {
       int __spins;
-      struct __pthread_mutex_s *__next;
+      __pthread_slist_t __list;
     };
 #endif
   } __data;
--- libc/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h	30 Jan 2006 09:29:48 -0000	1.10.2.4
+++ libc/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h	13 Feb 2006 08:18:12 -0000
@@ -44,6 +44,12 @@ typedef union
 } pthread_attr_t;
 
 
+typedef struct __pthread_internal_slist
+{
+  struct __pthread_internal_slist *__next;
+} __pthread_slist_t;
+
+
 /* Data structures for mutex handling.  The structure of the attribute
    type is not exposed on purpose.  */
 typedef union
@@ -60,7 +66,7 @@ typedef union
     __extension__ union
     {
       int __spins;
-      struct __pthread_mutex_s *__next;
+      __pthread_slist_t __list;
     };
   } __data;
   char __size[__SIZEOF_PTHREAD_MUTEX_T];
--- libc/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h	30 Jan 2006 09:29:48 -0000	1.7.2.4
+++ libc/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h	13 Feb 2006 08:18:12 -0000
@@ -58,6 +58,20 @@ typedef union
 } pthread_attr_t;
 
 
+#if __WORDSIZE == 64
+typedef struct __pthread_internal_list
+{
+  struct __pthread_internal_list *__prev;
+  struct __pthread_internal_list *__next;
+} __pthread_list_t;
+#else
+typedef struct __pthread_internal_slist
+{
+  struct __pthread_internal_slist *__next;
+} __pthread_slist_t;
+#endif
+
+
 /* Data structures for mutex handling.  The structure of the attribute
    type is deliberately not exposed.  */
 typedef union
@@ -75,15 +89,14 @@ typedef union
     int __kind;
 #if __WORDSIZE == 64
     int __spins;
-    struct __pthread_mutex_s *__next;
-    struct __pthread_mutex_s *__prev;
+    __pthread_list_t __list;
 # define __PTHREAD_MUTEX_HAVE_PREV	1
 #else
     unsigned int __nusers;
     __extension__ union
     {
       int __spins;
-      struct __pthread_mutex_s *__next;
+      __pthread_slist_t __list;
     };
 #endif
   } __data;
--- libc/nptl/descr.h	13 Feb 2006 07:30:04 -0000	1.23.2.10
+++ libc/nptl/descr.h	13 Feb 2006 09:52:50 -0000
@@ -166,7 +166,7 @@ struct pthread
   do {									      \
     __pthread_slist_t *runp = THREAD_GETMEM (THREAD_SELF, robust_list.__next);\
     if (runp == &mutex->__data.__list)					      \
-      THREAD_SETMEM (THREAD_SELF, robust_list, runp->__next);		      \
+      THREAD_SETMEM (THREAD_SELF, robust_list.__next, runp->__next);	      \
     else								      \
       {									      \
 	while (runp->__next != &mutex->__data.__list)			      \
--- libc/sysdeps/unix/sysv/linux/not-cancel.h	13 Feb 2006 07:30:05 -0000	1.5.2.1
+++ libc/sysdeps/unix/sysv/linux/not-cancel.h	13 Feb 2006 09:52:50 -0000
@@ -28,18 +28,26 @@
    INLINE_SYSCALL (open, 2, (const char *) (name), (flags))
 
 /* Uncancelable openat.  */
-extern int __openat_not_cancel (int fd, const char *fname, int oflag,
+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
+extern int __openat_nocancel (int fd, const char *fname, int oflag,
+			      mode_t mode) attribute_hidden;
+extern int __openat64_nocancel (int fd, const char *fname, int oflag,
 				mode_t mode) attribute_hidden;
+#else
+# define __openat_nocancel(fd, fname, oflag, mode) \
+  openat (fd, fname, oflag, mode)
+# define __openat64_nocancel(fd, fname, oflag, mode) \
+  openat64 (fd, fname, oflag, mode)
+#endif
+
 #define openat_not_cancel(fd, fname, oflag, mode) \
-  __openat_not_cancel (fd, fname, oflag, mode)
+  __openat_nocancel (fd, fname, oflag, mode)
 #define openat_not_cancel_3(fd, fname, oflag) \
-  __openat_not_cancel (fd, fname, oflag, 0)
-extern int __openat64_not_cancel (int fd, const char *fname, int oflag,
-				  mode_t mode) attribute_hidden;
+  __openat_nocancel (fd, fname, oflag, 0)
 #define openat64_not_cancel(fd, fname, oflag, mode) \
-  __openat64_not_cancel (fd, fname, oflag, mode)
+  __openat64_nocancel (fd, fname, oflag, mode)
 #define openat64_not_cancel_3(fd, fname, oflag) \
-  __openat64_not_cancel (fd, fname, oflag, 0)
+  __openat64_nocancel (fd, fname, oflag, 0)
 
 /* Uncancelable close.  */
 #define close_not_cancel(fd) \

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]