Hey, I hit some more - patch is attached.
mirko On Mon, 2010-06-21 at 09:59 -0700, Austin Foxley wrote: > On 06/21/2010 03:39 AM, Gianluigi Tiesi wrote: > > While compiling uClibc inside openwrt build system I have somehow the > > compiler > > without -std=c99 flash (since adding id causes me some troubles) > > > > Attached patch makes the declaration non c99 > > Applied. Is that the only c99 usage you hit? > > Please send future patches in standard git format with a Signed-off-by line. > > Thanks! > -Austin > _______________________________________________ > uClibc mailing list > [email protected] > http://lists.busybox.net/mailman/listinfo/uclibc -- This email address is used for mailinglist purposes only. Non-mailinglist emails will be dropped automatically. If you want to get in contact with me personally, please mail to: mirko.vogt <at> nanl <dot> de
>From ed8cfc9b16f1283a1f881b3bfe67ab23187793f0 Mon Sep 17 00:00:00 2001 From: Mirko Vogt <[email protected]> Date: Mon, 21 Jun 2010 20:23:14 +0200 Subject: [PATCH] avoid using c99 syntax --- libpthread/nptl/allocatestack.c | 3 ++- libpthread/nptl/pthread_key_create.c | 3 ++- libpthread/nptl/sysdeps/generic/dl-tls.c | 3 ++- .../unix/sysv/linux/pthread_attr_getaffinity.c | 3 ++- .../unix/sysv/linux/pthread_attr_setaffinity.c | 3 ++- .../sysdeps/unix/sysv/linux/pthread_setaffinity.c | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/libpthread/nptl/allocatestack.c b/libpthread/nptl/allocatestack.c index 7d4f9fd..9ffa7e7 100644 --- a/libpthread/nptl/allocatestack.c +++ b/libpthread/nptl/allocatestack.c @@ -844,7 +844,8 @@ __reclaim_stacks (void) curp->specific_used = false; - for (size_t cnt = 1; cnt < PTHREAD_KEY_1STLEVEL_SIZE; ++cnt) + size_t cnt; + for (cnt = 1; cnt < PTHREAD_KEY_1STLEVEL_SIZE; ++cnt) if (curp->specific[cnt] != NULL) { memset (curp->specific[cnt], '\0', diff --git a/libpthread/nptl/pthread_key_create.c b/libpthread/nptl/pthread_key_create.c index d3c1d26..be32517 100644 --- a/libpthread/nptl/pthread_key_create.c +++ b/libpthread/nptl/pthread_key_create.c @@ -29,7 +29,8 @@ __pthread_key_create ( void (*destr) (void *)) { /* Find a slot in __pthread_kyes which is unused. */ - for (size_t cnt = 0; cnt < PTHREAD_KEYS_MAX; ++cnt) + size_t cnt; + for (cnt = 0; cnt < PTHREAD_KEYS_MAX; ++cnt) { uintptr_t seq = __pthread_keys[cnt].seq; diff --git a/libpthread/nptl/sysdeps/generic/dl-tls.c b/libpthread/nptl/sysdeps/generic/dl-tls.c index da6ebbd..b65608f 100644 --- a/libpthread/nptl/sysdeps/generic/dl-tls.c +++ b/libpthread/nptl/sysdeps/generic/dl-tls.c @@ -258,7 +258,8 @@ _dl_determine_tlsoffset (void) /* We simply start with zero. */ size_t offset = 0; - for (size_t cnt = 0; slotinfo[cnt].map != NULL; ++cnt) + size_t cnt; + for (cnt = 0; slotinfo[cnt].map != NULL; ++cnt) { assert (cnt < GL(dl_tls_dtv_slotinfo_list)->len); diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c b/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c index 2ec2f3d..01fd031 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c @@ -38,7 +38,8 @@ pthread_attr_getaffinity_np(const pthread_attr_t *attr, size_t cpusetsize, { /* Check whether there are any bits set beyond the limits the user requested. */ - for (size_t cnt = cpusetsize; cnt < iattr->cpusetsize; ++cnt) + size_t cnt; + for (cnt = cpusetsize; cnt < iattr->cpusetsize; ++cnt) if (((char *) iattr->cpuset)[cnt] != 0) return EINVAL; diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c b/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c index 609ee2a..744d55a 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c @@ -57,7 +57,8 @@ pthread_attr_setaffinity_np (pthread_attr_t *attr, size_t cpusetsize, /* Check whether the new bitmask has any bit set beyond the last one the kernel accepts. */ - for (size_t cnt = __kernel_cpumask_size; cnt < cpusetsize; ++cnt) + size_t cnt; + for (cnt = __kernel_cpumask_size; cnt < cpusetsize; ++cnt) if (((char *) cpuset)[cnt] != '\0') /* Found a nonzero byte. This means the user request cannot be fulfilled. */ diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c b/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c index 467e8ec..73a21ed 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c @@ -71,7 +71,8 @@ pthread_setaffinity_np (pthread_t th, size_t cpusetsize, /* We now know the size of the kernel cpumask_t. Make sure the user does not request to set a bit beyond that. */ - for (size_t cnt = __kernel_cpumask_size; cnt < cpusetsize; ++cnt) + size_t cnt; + for (cnt = __kernel_cpumask_size; cnt < cpusetsize; ++cnt) if (((char *) cpuset)[cnt] != '\0') /* Found a nonzero byte. This means the user request cannot be fulfilled. */ -- 1.6.3.3
_______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
