ixp4xx: add Mikael Petterssons patch works for 2.6.33 & 2.6.35
[openwrt/staging/dedeckeh.git] / toolchain / uClibc / patches-0.9.32 / 100-c90-std-compatibility.patch
1 diff -ruN uClibc-0.9.32/libpthread/nptl/allocatestack.c uClibc-0.9.32/libpthread/nptl.new/allocatestack.c
2 --- uClibc-0.9.32/libpthread/nptl/allocatestack.c 2010-06-19 20:50:30.000000000 +0200
3 +++ uClibc-0.9.32/libpthread/nptl.new/allocatestack.c 2010-06-19 16:06:32.000000000 +0200
4 @@ -844,7 +844,8 @@
5
6 curp->specific_used = false;
7
8 - for (size_t cnt = 1; cnt < PTHREAD_KEY_1STLEVEL_SIZE; ++cnt)
9 + size_t cnt;
10 + for (cnt = 1; cnt < PTHREAD_KEY_1STLEVEL_SIZE; ++cnt)
11 if (curp->specific[cnt] != NULL)
12 {
13 memset (curp->specific[cnt], '\0',
14 diff -ruN uClibc-0.9.32/libpthread/nptl/pthread_key_create.c uClibc-0.9.32/libpthread/nptl.new/pthread_key_create.c
15 --- uClibc-0.9.32/libpthread/nptl/pthread_key_create.c 2010-06-19 20:50:30.000000000 +0200
16 +++ uClibc-0.9.32/libpthread/nptl.new/pthread_key_create.c 2010-06-19 16:06:59.000000000 +0200
17 @@ -29,7 +29,8 @@
18 void (*destr) (void *))
19 {
20 /* Find a slot in __pthread_kyes which is unused. */
21 - for (size_t cnt = 0; cnt < PTHREAD_KEYS_MAX; ++cnt)
22 + size_t cnt;
23 + for (cnt = 0; cnt < PTHREAD_KEYS_MAX; ++cnt)
24 {
25 uintptr_t seq = __pthread_keys[cnt].seq;
26
27 diff -ruN uClibc-0.9.32/libpthread/nptl/sysdeps/generic/dl-tls.c uClibc-0.9.32/libpthread/nptl.new/sysdeps/generic/dl-tls.c
28 --- uClibc-0.9.32/libpthread/nptl/sysdeps/generic/dl-tls.c 2010-06-19 20:50:30.000000000 +0200
29 +++ uClibc-0.9.32/libpthread/nptl.new/sysdeps/generic/dl-tls.c 2010-06-19 16:06:04.000000000 +0200
30 @@ -258,7 +258,8 @@
31 /* We simply start with zero. */
32 size_t offset = 0;
33
34 - for (size_t cnt = 0; slotinfo[cnt].map != NULL; ++cnt)
35 + size_t cnt;
36 + for (cnt = 0; slotinfo[cnt].map != NULL; ++cnt)
37 {
38 assert (cnt < GL(dl_tls_dtv_slotinfo_list)->len);
39
40 diff -ruN uClibc-0.9.32/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c uClibc-0.9.32/libpthread/nptl.new/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
41 --- uClibc-0.9.32/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c 2010-06-19 20:50:30.000000000 +0200
42 +++ uClibc-0.9.32/libpthread/nptl.new/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c 2010-06-19 16:05:38.000000000 +0200
43 @@ -38,7 +38,8 @@
44 {
45 /* Check whether there are any bits set beyond the limits
46 the user requested. */
47 - for (size_t cnt = cpusetsize; cnt < iattr->cpusetsize; ++cnt)
48 + size_t cnt;
49 + for (cnt = cpusetsize; cnt < iattr->cpusetsize; ++cnt)
50 if (((char *) iattr->cpuset)[cnt] != 0)
51 return EINVAL;
52
53 diff -ruN uClibc-0.9.32/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c uClibc-0.9.32/libpthread/nptl.new/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
54 --- uClibc-0.9.32/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c 2010-06-19 20:50:30.000000000 +0200
55 +++ uClibc-0.9.32/libpthread/nptl.new/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c 2010-06-19 16:04:46.000000000 +0200
56 @@ -57,7 +57,8 @@
57
58 /* Check whether the new bitmask has any bit set beyond the
59 last one the kernel accepts. */
60 - for (size_t cnt = __kernel_cpumask_size; cnt < cpusetsize; ++cnt)
61 + size_t cnt;
62 + for (cnt = __kernel_cpumask_size; cnt < cpusetsize; ++cnt)
63 if (((char *) cpuset)[cnt] != '\0')
64 /* Found a nonzero byte. This means the user request cannot be
65 fulfilled. */
66 diff -ruN uClibc-0.9.32/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c uClibc-0.9.32/libpthread/nptl.new/sysdeps/unix/sysv/linux/pthread_setaffinity.c
67 --- uClibc-0.9.32/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c 2010-06-19 20:50:30.000000000 +0200
68 +++ uClibc-0.9.32/libpthread/nptl.new/sysdeps/unix/sysv/linux/pthread_setaffinity.c 2010-06-19 16:05:15.000000000 +0200
69 @@ -71,7 +71,8 @@
70
71 /* We now know the size of the kernel cpumask_t. Make sure the user
72 does not request to set a bit beyond that. */
73 - for (size_t cnt = __kernel_cpumask_size; cnt < cpusetsize; ++cnt)
74 + size_t cnt;
75 + for (cnt = __kernel_cpumask_size; cnt < cpusetsize; ++cnt)
76 if (((char *) cpuset)[cnt] != '\0')
77 /* Found a nonzero byte. This means the user request cannot be
78 fulfilled. */