+#elif defined(__NEWLIB_H__)
+/* I honestly don't know if there are different versions of stdio in
+ * newlibs history. Anyway, here's what's current.
+ * #define __sfeof(p) (((p)->_flags & __SEOF) != 0)
+ * #define __sferror(p) (((p)->_flags & __SERR) != 0)
+ * #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
+ */
+# define SET_FERROR_UNLOCKED(S) ((S)->_flags |= __SERR)
+