From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 462 invoked by alias); 13 Feb 2006 13:02:08 -0000 Received: (qmail 440 invoked by uid 22791); 13 Feb 2006 13:02:08 -0000 X-Spam-Check-By: sourceware.org Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 13 Feb 2006 13:02:06 +0000 Received: from sunsite.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.mff.cuni.cz (8.13.1/8.13.1) with ESMTP id k1DD21KO013838; Mon, 13 Feb 2006 14:02:01 +0100 Received: (from jj@localhost) by sunsite.mff.cuni.cz (8.13.1/8.13.1/Submit) id k1DD21xY013835; Mon, 13 Feb 2006 14:02:01 +0100 Date: Mon, 13 Feb 2006 13:02:00 -0000 From: Jakub Jelinek To: Ulrich Drepper , Roland McGrath Cc: Glibc hackers Subject: [PATCH] glibc build fixes Message-ID: <20060213130201.GI4625@sunsite.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00022.txt.bz2 Hi! With this I got glibc to build again on the 7 arches I did the build on. 2006-02-13 Jakub Jelinek * 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