commit 549fa53225910f5341092d6647a1e3dd705b605f broke INLINE_SYSCALL_NOERR_NCS
Khem Raj
raj.khem at gmail.com
Fri Feb 3 19:08:18 UTC 2012
On Fri, Feb 3, 2012 at 10:55 AM, Khem Raj <raj.khem at gmail.com> wrote:
> This commit below broke ppc and mips for me
> since they assign to err specifically in
> INTERNAL_SYSCALL_NCS definitions so now
here is something that fixes it
http://git.openembedded.org/openembedded-core-contrib/tree/meta/recipes-core/uclibc/uclibc-0.9.33/0001-Declare-__err-and-pass-it-to-INTERNAL_SYSCALL_NCS-so.patch?h=kraj/misc
>
> commit 549fa53225910f5341092d6647a1e3dd705b605f
> Author: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
> Date: Thu Jan 26 15:15:23 2012 +0100
>
> *: silence some warnings
>
> warning: ISO C90 forbids mixed declarations and code
> [-Wdeclaration-after-statement]
>
> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
>
>
> this is the hunk I am talking about __err declaration has been
> commented out. Do you know Bernhard why ?
> now any functions using _syscall_noerr0 and _syscall_noerr1 wont compile anymore
> if this was just meant as a cleanup then please reinsert it since we
> really need it.
>
> diff --git a/libc/sysdeps/linux/common/bits/syscalls-common.h
> b/libc/sysdeps/linux/common/bits/syscalls-common.h
> index 1b84d9e..faebd1b 100644
> --- a/libc/sysdeps/linux/common/bits/syscalls-common.h
> +++ b/libc/sysdeps/linux/common/bits/syscalls-common.h
> @@ -40,21 +40,27 @@
> /* Just like INLINE_SYSCALL(), but take a non-constant syscall (NCS)
> argument */
> #ifndef INLINE_SYSCALL_NCS
> # define INLINE_SYSCALL_NCS(name, nr, args...) \
> -({ \
> +(__extension__ \
> + ({ \
> INTERNAL_SYSCALL_DECL(__err); \
> - long __res = INTERNAL_SYSCALL_NCS(name, __err, nr, args); \
> - if (unlikely(INTERNAL_SYSCALL_ERROR_P(__res, __err))) { \
> + (__extension__ \
> + ({ \
> + long __res = INTERNAL_SYSCALL_NCS(name, __err, nr, args); \
> + if (unlikely(INTERNAL_SYSCALL_ERROR_P(__res, __err))) { \
> __set_errno(INTERNAL_SYSCALL_ERRNO(__res, __err)); \
> __res = -1L; \
> - } \
> - __res; \
> -})
> + } \
> + __res; \
> + }) \
> + ); \
> + }) \
> +)
> #endif
> #ifndef INLINE_SYSCALL_NOERR_NCS
> # define INLINE_SYSCALL_NOERR_NCS(name, nr, args...) \
> ({ \
> - INTERNAL_SYSCALL_DECL(__err); \
> - long __res = INTERNAL_SYSCALL_NCS(name, __err, nr, args); \
> + /*INTERNAL_SYSCALL_DECL(__err);*/
> \
> + long __res = INTERNAL_SYSCALL_NCS(name, /*__err*/, nr, args); \
> __res; \
> })
> #endif
More information about the uClibc
mailing list