This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
SPU build break (Re: [PATCH v2] math: guard BSD finite/isinf/isnan functions properly in math.h)
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: yselkowi at redhat dot com (Yaakov Selkowitz), vinschen at redhat dot com
- Cc: newlib at sourceware dot org
- Date: Wed, 6 Apr 2016 15:55:53 +0200 (CEST)
- Subject: SPU build break (Re: [PATCH v2] math: guard BSD finite/isinf/isnan functions properly in math.h)
- Authentication-results: sourceware.org; auth=none
Yaakov Selkowitz wrote:
> diff --git a/newlib/libc/include/ieeefp.h b/newlib/libc/include/ieeefp.h
> index 2ffa456..2c04284 100644
> --- a/newlib/libc/include/ieeefp.h
> +++ b/newlib/libc/include/ieeefp.h
> @@ -241,19 +241,6 @@ typedef int fp_rdi;
> fp_rdi _EXFUN(fpgetroundtoi,(void));
> fp_rdi _EXFUN(fpsetroundtoi,(fp_rdi));
>
> -#undef isnan
> -#undef isinf
> -
> -int _EXFUN(isnan, (double));
> -int _EXFUN(isinf, (double));
> -int _EXFUN(finite, (double));
It seems this caused a build break on SPU:
newlib/libm/common/s_isinf.c:17:9: error: expected identifier or '(' before 'sizeof'
_DEFUN (isinf, (x),
^
newlib/libm/common/s_isinf.c:17:9: error: expected ')' before '?' token
_DEFUN (isinf, (x),
^
because the SPU-specific #define of isinf from machine/ieeefp.h is still visible.
Since common/s_isinf.c includes <ieeefp.h>, it seems this wasn't a problem in
the past because of the above #undef that your patch removed.
Should the #undef now move somewhere else, e.g. into s_isinf.c (and presumably
s_isnan.c as well)?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com