public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>, Roland McGrath <roland@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] glibc build fixes
Date: Mon, 13 Feb 2006 13:02:00 -0000	[thread overview]
Message-ID: <20060213130201.GI4625@sunsite.mff.cuni.cz> (raw)

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

             reply	other threads:[~2006-02-13 13:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-13 13:02 Jakub Jelinek [this message]
2006-02-15 17:20 ` Ulrich Drepper
2006-02-17 13:27   ` Kaz Kojima
2006-02-17 15:37     ` Ulrich Drepper
2006-02-17 16:08     ` Jakub Jelinek
2006-02-17 18:23       ` Jakub Jelinek
2006-02-17 18:51         ` Ulrich Drepper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060213130201.GI4625@sunsite.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=drepper@redhat.com \
    --cc=libc-hacker@sources.redhat.com \
    --cc=roland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).