From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26055 invoked by alias); 12 Aug 2007 08:31:38 -0000 Received: (qmail 25987 invoked by uid 22791); 12 Aug 2007 08:31:37 -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; Sun, 12 Aug 2007 08:31:34 +0000 Received: from sunsite.mff.cuni.cz (localhost.localdomain [127.0.0.1]) by sunsite.mff.cuni.cz (8.13.8/8.13.8) with ESMTP id l7C8bCXl023669; Sun, 12 Aug 2007 10:37:12 +0200 Received: (from jakub@localhost) by sunsite.mff.cuni.cz (8.13.8/8.13.8/Submit) id l7C8bC9f023668; Sun, 12 Aug 2007 10:37:12 +0200 Date: Sun, 12 Aug 2007 08:31:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] ia64 build fixes Message-ID: <20070812083711.GI4603@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.2.2i Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00009.txt.bz2 Hi! This was needed to build glibc trunk on ia64. An obvious typo in lowlevellock.h, missing pthread_rwlock_t changes on many arches and ia64's bits/sigcontext.h including bits/sigstack.h (which needs size_t). On all other arches, bits/sigstack.h is only included from signal.h, after #define __need_size_t #include , but on ia64 it is also included from bits/sigcontext.h (not a ISO C nor POSIX violation IMHO), which is included from signal.h (but earlier than the stddef.h include - could be fixed by moving that stddef.h include earlier) but also from sys/ucontext.h (where we'd need to add __need_size_t stddef.h include too). In the patch below ia64's bits/sigcontext.h does that, as it is the only arch that needs this. 2007-08-12 Jakub Jelinek * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h: Include stddef.h with __need_size_t. nptl/ * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four byte elements. One of them is the new __shared element. [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared, adjust names of other padding elements. * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four byte elements. One of them is the new __shared element. [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared, adjust names of other padding elements. * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t): Renamed __pad1 element to __shared, adjust names of other padding elements. * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t): Likewise. * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a typo. --- libc/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h.jj 2006-02-15 12:14:34.000000000 -0500 +++ libc/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h 2007-08-11 13:19:41.000000000 -0400 @@ -1,5 +1,5 @@ /* Machine-specific pthread type layouts. SPARC version. - Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2003. @@ -160,9 +160,9 @@ typedef union unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; int __writer; - int __pad1; + int __shared; + unsigned long int __pad1; unsigned long int __pad2; - unsigned long int __pad3; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned int __flags; @@ -176,9 +176,12 @@ typedef union unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; + unsigned char __pad1; + unsigned char __pad2; + unsigned char __shared; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ - unsigned int __flags; + unsigned char __flags; int __writer; } __data; # endif --- libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h.jj 2006-02-15 12:13:30.000000000 -0500 +++ libc/nptl/sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h 2007-08-11 13:14:49.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek , 2003. @@ -126,9 +126,9 @@ typedef union unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; int __writer; - int __pad1; + int __shared; + unsigned long int __pad1; unsigned long int __pad2; - unsigned long int __pad3; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned int __flags; --- libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h.jj 2007-08-11 10:53:10.000000000 -0400 +++ libc/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h 2007-08-11 12:09:43.000000000 -0400 @@ -154,6 +154,7 @@ extern int __lll_robust_lock_wait (int * __lll_lock_wait_private (__futex); \ else \ __lll_lock_wait (__futex, private); \ + } \ })) #define lll_lock(futex, private) __lll_lock (&(futex), private) --- libc/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h.jj 2006-02-15 12:13:30.000000000 -0500 +++ libc/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h 2007-08-11 13:18:18.000000000 -0400 @@ -1,5 +1,5 @@ /* Machine-specific pthread type layouts. Alpha version. - Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -126,9 +126,9 @@ typedef union unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; int __writer; - int __pad1; + int __shared; + unsigned long int __pad1; unsigned long int __pad2; - unsigned long int __pad3; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned int __flags; --- libc/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h.jj 2006-02-15 12:14:33.000000000 -0500 +++ libc/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h 2007-08-11 13:17:31.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky , 2003. @@ -159,9 +159,9 @@ typedef union unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; int __writer; - int __pad1; + int __shared; + unsigned long int __pad1; unsigned long int __pad2; - unsigned long int __pad3; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned int __flags; @@ -175,9 +175,12 @@ typedef union unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; + unsigned char __pad1; + unsigned char __pad2; + unsigned char __shared; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ - unsigned int __flags; + unsigned char __flags; int __writer; } __data; # endif --- libc/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h.jj 2004-10-13 22:22:38.000000000 -0400 +++ libc/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h 2007-08-11 12:50:21.000000000 -0400 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 2000, 2001, 2003, 2004 +/* Copyright (C) 1996, 1997, 1998, 2000, 2001, 2003, 2004, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jes Sorensen , July 2000 @@ -25,6 +25,8 @@ #ifndef _BITS_SIGCONTEXT_H #define _BITS_SIGCONTEXT_H 1 +#define __need_size_t +#include #include struct ia64_fpreg Jakub