From c6332722d95f98c29fbdac3501464eeb816adfd2 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 11 Dec 2014 17:42:19 +0000 Subject: * libc/include/stdio.h: Fix type signature of __sfeof and __sferror (and thus feof and ferror) for C++. --- newlib/ChangeLog | 6 ++++++ newlib/libc/include/stdio.h | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 2612b2d35..8a2536d3e 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2014-12-11 Jonathan Roelofs + Corinna Vinschen + + * libc/include/stdio.h: Fix type signature of __sfeof and __sferror + for C++. + 2014-12-11 Yaakov Selkowitz * libc/include/stdio_ext.h: Rename __fwriteable to __fwritable. diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h index c7d340c5c..620bfbcf2 100644 --- a/newlib/libc/include/stdio.h +++ b/newlib/libc/include/stdio.h @@ -649,8 +649,8 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) { #endif #endif -#define __sfeof(p) (((p)->_flags & __SEOF) != 0) -#define __sferror(p) (((p)->_flags & __SERR) != 0) +#define __sfeof(p) ((int)(((p)->_flags & __SEOF) != 0)) +#define __sferror(p) ((int)(((p)->_flags & __SERR) != 0)) #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) #define __sfileno(p) ((p)->_file) -- cgit v1.2.3