1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/glibc/2.6.1/210-lll_lock_t.patch Tue Mar 06 21:36:10 2012 +0100
1.3 @@ -0,0 +1,237 @@
1.4 +Patch provided bu Ioannis E. VENETIS
1.5 +
1.6 +Using:
1.7 +
1.8 +typedef int lll_lock_t;
1.9 +
1.10 +creates problems during compilation. Since glibc 2.7 got rid of the 'typedef' and
1.11 +uses directly 'int', we do the same here.
1.12 +
1.13 +diff -Naur glibc-2.6.1/nptl/allocatestack.c glibc-2.6.1.new/nptl/allocatestack.c
1.14 +--- glibc-2.6.1/nptl/allocatestack.c 2006-08-23 20:39:47.000000000 +0300
1.15 ++++ glibc-2.6.1.new/nptl/allocatestack.c 2008-07-27 20:56:19.000000000 +0300
1.16 +@@ -103,7 +103,7 @@
1.17 + static size_t stack_cache_actsize;
1.18 +
1.19 + /* Mutex protecting this variable. */
1.20 +-static lll_lock_t stack_cache_lock = LLL_LOCK_INITIALIZER;
1.21 ++static int stack_cache_lock = LLL_LOCK_INITIALIZER;
1.22 +
1.23 + /* List of queued stack frames. */
1.24 + static LIST_HEAD (stack_cache);
1.25 +diff -Naur glibc-2.6.1/nptl/descr.h glibc-2.6.1.new/nptl/descr.h
1.26 +--- glibc-2.6.1/nptl/descr.h 2006-09-24 20:10:55.000000000 +0300
1.27 ++++ glibc-2.6.1.new/nptl/descr.h 2008-07-27 20:54:41.000000000 +0300
1.28 +@@ -305,10 +305,10 @@
1.29 + int parent_cancelhandling;
1.30 +
1.31 + /* Lock to synchronize access to the descriptor. */
1.32 +- lll_lock_t lock;
1.33 ++ int lock;
1.34 +
1.35 + /* Lock for synchronizing setxid calls. */
1.36 +- lll_lock_t setxid_futex;
1.37 ++ int setxid_futex;
1.38 +
1.39 + #if HP_TIMING_AVAIL
1.40 + /* Offset of the CPU clock at start thread start time. */
1.41 +diff -Naur glibc-2.6.1/nptl/pthread_attr_init.c glibc-2.6.1.new/nptl/pthread_attr_init.c
1.42 +--- glibc-2.6.1/nptl/pthread_attr_init.c 2004-03-19 01:56:31.000000000 +0200
1.43 ++++ glibc-2.6.1.new/nptl/pthread_attr_init.c 2008-07-27 20:55:03.000000000 +0300
1.44 +@@ -27,7 +27,7 @@
1.45 +
1.46 +
1.47 + struct pthread_attr *__attr_list;
1.48 +-lll_lock_t __attr_list_lock = LLL_LOCK_INITIALIZER;
1.49 ++int __attr_list_lock = LLL_LOCK_INITIALIZER;
1.50 +
1.51 +
1.52 + int
1.53 +diff -Naur glibc-2.6.1/nptl/pthreadP.h glibc-2.6.1.new/nptl/pthreadP.h
1.54 +--- glibc-2.6.1/nptl/pthreadP.h 2006-08-23 20:42:52.000000000 +0300
1.55 ++++ glibc-2.6.1.new/nptl/pthreadP.h 2008-07-27 20:56:40.000000000 +0300
1.56 +@@ -143,7 +143,7 @@
1.57 +
1.58 + /* Attribute handling. */
1.59 + extern struct pthread_attr *__attr_list attribute_hidden;
1.60 +-extern lll_lock_t __attr_list_lock attribute_hidden;
1.61 ++extern int __attr_list_lock attribute_hidden;
1.62 +
1.63 + /* First available RT signal. */
1.64 + extern int __current_sigrtmin attribute_hidden;
1.65 +diff -Naur glibc-2.6.1/nptl/semaphoreP.h glibc-2.6.1.new/nptl/semaphoreP.h
1.66 +--- glibc-2.6.1/nptl/semaphoreP.h 2006-05-11 20:08:37.000000000 +0300
1.67 ++++ glibc-2.6.1.new/nptl/semaphoreP.h 2008-07-27 20:55:42.000000000 +0300
1.68 +@@ -48,7 +48,7 @@
1.69 + extern void *__sem_mappings attribute_hidden;
1.70 +
1.71 + /* Lock to protect the search tree. */
1.72 +-extern lll_lock_t __sem_mappings_lock attribute_hidden;
1.73 ++extern int __sem_mappings_lock attribute_hidden;
1.74 +
1.75 +
1.76 + /* Initializer for mountpoint. */
1.77 +diff -Naur glibc-2.6.1/nptl/sem_open.c glibc-2.6.1.new/nptl/sem_open.c
1.78 +--- glibc-2.6.1/nptl/sem_open.c 2006-05-11 20:09:43.000000000 +0300
1.79 ++++ glibc-2.6.1.new/nptl/sem_open.c 2008-07-27 20:55:22.000000000 +0300
1.80 +@@ -147,7 +147,7 @@
1.81 + void *__sem_mappings attribute_hidden;
1.82 +
1.83 + /* Lock to protect the search tree. */
1.84 +-lll_lock_t __sem_mappings_lock attribute_hidden = LLL_LOCK_INITIALIZER;
1.85 ++int __sem_mappings_lock attribute_hidden = LLL_LOCK_INITIALIZER;
1.86 +
1.87 +
1.88 + /* Search for existing mapping and if possible add the one provided. */
1.89 +diff -Naur glibc-2.6.1/nptl/pthread_once.c glibc-2.6.1.new/nptl/pthread_once.c
1.90 +--- glibc-2.6.1/nptl/pthread_once.c 2002-11-27 00:50:31.000000000 +0200
1.91 ++++ glibc-2.6.1.new/nptl/pthread_once.c 2008-07-27 20:57:12.000000000 +0300
1.92 +@@ -22,7 +22,7 @@
1.93 +
1.94 +
1.95 +
1.96 +-static lll_lock_t once_lock = LLL_LOCK_INITIALIZER;
1.97 ++static int once_lock = LLL_LOCK_INITIALIZER;
1.98 +
1.99 +
1.100 + int
1.101 +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1.102 +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300
1.103 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h 2008-07-27 20:59:15.000000000 +0300
1.104 +@@ -230,9 +230,6 @@
1.105 + /* Our internal lock implementation is identical to the binary-compatible
1.106 + mutex implementation. */
1.107 +
1.108 +-/* Type for lock object. */
1.109 +-typedef int lll_lock_t;
1.110 +-
1.111 + /* Initializers for lock. */
1.112 + #define LLL_LOCK_INITIALIZER (0)
1.113 + #define LLL_LOCK_INITIALIZER_LOCKED (1)
1.114 +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/fork.c glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/fork.c
1.115 +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/fork.c 2003-12-21 01:37:13.000000000 +0200
1.116 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/fork.c 2008-07-27 21:00:01.000000000 +0300
1.117 +@@ -183,7 +183,7 @@
1.118 + }
1.119 +
1.120 + /* Initialize the fork lock. */
1.121 +- __fork_lock = (lll_lock_t) LLL_LOCK_INITIALIZER;
1.122 ++ __fork_lock = (int) LLL_LOCK_INITIALIZER;
1.123 + }
1.124 + else
1.125 + {
1.126 +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/fork.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/fork.h
1.127 +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/fork.h 2006-05-15 23:19:43.000000000 +0300
1.128 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/fork.h 2008-07-27 20:58:49.000000000 +0300
1.129 +@@ -26,7 +26,7 @@
1.130 + extern unsigned long int *__fork_generation_pointer attribute_hidden;
1.131 +
1.132 + /* Lock to protect allocation and deallocation of fork handlers. */
1.133 +-extern lll_lock_t __fork_lock attribute_hidden;
1.134 ++extern int __fork_lock attribute_hidden;
1.135 +
1.136 + /* Elements of the fork handler lists. */
1.137 + struct fork_handler
1.138 +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
1.139 +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2006-09-05 17:44:25.000000000 +0300
1.140 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2008-07-27 21:00:19.000000000 +0300
1.141 +@@ -436,9 +436,6 @@
1.142 + /* We have a separate internal lock implementation which is not tied
1.143 + to binary compatibility. */
1.144 +
1.145 +-/* Type for lock object. */
1.146 +-typedef int lll_lock_t;
1.147 +-
1.148 + /* Initializers for lock. */
1.149 + #define LLL_LOCK_INITIALIZER (0)
1.150 + #define LLL_LOCK_INITIALIZER_LOCKED (1)
1.151 +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
1.152 +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300
1.153 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h 2008-07-27 20:58:16.000000000 +0300
1.154 +@@ -223,9 +223,6 @@
1.155 + /* We have a separate internal lock implementation which is not tied
1.156 + to binary compatibility. We can use the lll_mutex_*. */
1.157 +
1.158 +-/* Type for lock object. */
1.159 +-typedef int lll_lock_t;
1.160 +-
1.161 + extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
1.162 +
1.163 + /* Initializers for lock. */
1.164 +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1.165 +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300
1.166 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h 2008-07-27 21:00:36.000000000 +0300
1.167 +@@ -254,9 +254,6 @@
1.168 + /* Our internal lock implementation is identical to the binary-compatible
1.169 + mutex implementation. */
1.170 +
1.171 +-/* Type for lock object. */
1.172 +-typedef int lll_lock_t;
1.173 +-
1.174 + /* Initializers for lock. */
1.175 + #define LLL_LOCK_INITIALIZER (0)
1.176 + #define LLL_LOCK_INITIALIZER_LOCKED (1)
1.177 +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/register-atfork.c glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/register-atfork.c
1.178 +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/register-atfork.c 2005-12-22 00:17:21.000000000 +0200
1.179 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/register-atfork.c 2008-07-27 21:00:55.000000000 +0300
1.180 +@@ -24,7 +24,7 @@
1.181 +
1.182 +
1.183 + /* Lock to protect allocation and deallocation of fork handlers. */
1.184 +-lll_lock_t __fork_lock = LLL_LOCK_INITIALIZER;
1.185 ++int __fork_lock = LLL_LOCK_INITIALIZER;
1.186 +
1.187 +
1.188 + /* Number of pre-allocated handler entries. */
1.189 +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
1.190 +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300
1.191 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h 2008-07-27 21:01:14.000000000 +0300
1.192 +@@ -309,9 +309,6 @@
1.193 + /* We have a separate internal lock implementation which is not tied
1.194 + to binary compatibility. We can use the lll_mutex_*. */
1.195 +
1.196 +-/* Type for lock object. */
1.197 +-typedef int lll_lock_t;
1.198 +-
1.199 + /* Initializers for lock. */
1.200 + #define LLL_LOCK_INITIALIZER (0)
1.201 + #define LLL_LOCK_INITIALIZER_LOCKED (1)
1.202 +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
1.203 +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h 2006-07-29 08:06:06.000000000 +0300
1.204 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h 2008-07-27 20:58:00.000000000 +0300
1.205 +@@ -278,9 +278,6 @@
1.206 + /* We have a separate internal lock implementation which is not tied
1.207 + to binary compatibility. */
1.208 +
1.209 +-/* Type for lock object. */
1.210 +-typedef int lll_lock_t;
1.211 +-
1.212 + /* Initializers for lock. */
1.213 + #define LLL_LOCK_INITIALIZER (0)
1.214 + #define LLL_LOCK_INITIALIZER_LOCKED (1)
1.215 +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1.216 +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h 2006-07-29 08:06:06.000000000 +0300
1.217 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h 2008-07-27 20:59:39.000000000 +0300
1.218 +@@ -237,9 +237,6 @@
1.219 + /* We have a separate internal lock implementation which is not tied
1.220 + to binary compatibility. We can use the lll_mutex_*. */
1.221 +
1.222 +-/* Type for lock object. */
1.223 +-typedef int lll_lock_t;
1.224 +-
1.225 + extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
1.226 +
1.227 + /* Initializers for lock. */
1.228 +diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1.229 +--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2006-09-05 17:45:34.000000000 +0300
1.230 ++++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2008-07-27 20:58:33.000000000 +0300
1.231 +@@ -446,9 +446,6 @@
1.232 + /* We have a separate internal lock implementation which is not tied
1.233 + to binary compatibility. */
1.234 +
1.235 +-/* Type for lock object. */
1.236 +-typedef int lll_lock_t;
1.237 +-
1.238 + /* Initializers for lock. */
1.239 + #define LLL_LOCK_INITIALIZER (0)
1.240 + #define LLL_LOCK_INITIALIZER_LOCKED (1)