This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

SPU build break (Re: [PATCH v2] math: guard BSD finite/isinf/isnan functions properly in math.h)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]