stdio.h patches for g++ -std=c++11

zosrothko zosrothko@orange.fr
Fri May 9 05:52:00 GMT 2014


Hi Corinna

I made a typo in my previous patch. Here the corrected one.

zos

-------------- next part --------------
Index: newlib/libc/include/stdio.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/stdio.h,v
retrieving revision 1.69
diff -u -r1.69 stdio.h
--- newlib/libc/include/stdio.h	5 May 2014 12:53:47 -0000	1.69
+++ newlib/libc/include/stdio.h	9 May 2014 05:51:03 -0000
@@ -234,6 +234,20 @@
 #endif
 #if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) || (__cplusplus >= 201103L)
 #ifndef _REENT_ONLY
+int	_EXFUN(snprintf, (char *__restrict, size_t, const char *__restrict, ...)
+               _ATTRIBUTE ((__format__ (__printf__, 3, 4))));
+int	_EXFUN(vfscanf, (FILE *__restrict, const char *__restrict, __VALIST)
+               _ATTRIBUTE ((__format__ (__scanf__, 2, 0))));
+int	_EXFUN(vscanf, (const char *, __VALIST)
+               _ATTRIBUTE ((__format__ (__scanf__, 1, 0))));
+int	_EXFUN(vsnprintf, (char *__restrict, size_t, const char *__restrict, __VALIST)
+               _ATTRIBUTE ((__format__ (__printf__, 3, 0))));
+int	_EXFUN(vsscanf, (const char *__restrict, const char *__restrict, __VALIST)
+               _ATTRIBUTE ((__format__ (__scanf__, 2, 0))));
+#endif /* !_REENT_ONLY */
+
+#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L)
+#ifndef _REENT_ONLY
 int	_EXFUN(asiprintf, (char **, const char *, ...)
                _ATTRIBUTE ((__format__ (__printf__, 2, 3))));
 char *	_EXFUN(asniprintf, (char *, size_t *, const char *, ...)
@@ -259,8 +273,6 @@
                _ATTRIBUTE ((__format__ (__printf__, 2, 3))));
 int	_EXFUN(siscanf, (const char *, const char *, ...)
                _ATTRIBUTE ((__format__ (__scanf__, 2, 3))));
-int	_EXFUN(snprintf, (char *__restrict, size_t, const char *__restrict, ...)
-               _ATTRIBUTE ((__format__ (__printf__, 3, 4))));
 int	_EXFUN(sniprintf, (char *, size_t, const char *, ...)
                _ATTRIBUTE ((__format__ (__printf__, 3, 4))));
 char *	_EXFUN(tempnam, (const char *, const char *));
@@ -278,25 +290,18 @@
                _ATTRIBUTE ((__format__ (__printf__, 2, 0))));
 int	_EXFUN(vfiscanf, (FILE *, const char *, __VALIST)
                _ATTRIBUTE ((__format__ (__scanf__, 2, 0))));
-int	_EXFUN(vfscanf, (FILE *__restrict, const char *__restrict, __VALIST)
-               _ATTRIBUTE ((__format__ (__scanf__, 2, 0))));
 int	_EXFUN(viprintf, (const char *, __VALIST)
                _ATTRIBUTE ((__format__ (__printf__, 1, 0))));
 int	_EXFUN(viscanf, (const char *, __VALIST)
                _ATTRIBUTE ((__format__ (__scanf__, 1, 0))));
-int	_EXFUN(vscanf, (const char *, __VALIST)
-               _ATTRIBUTE ((__format__ (__scanf__, 1, 0))));
 int	_EXFUN(vsiprintf, (char *, const char *, __VALIST)
                _ATTRIBUTE ((__format__ (__printf__, 2, 0))));
 int	_EXFUN(vsiscanf, (const char *, const char *, __VALIST)
                _ATTRIBUTE ((__format__ (__scanf__, 2, 0))));
 int	_EXFUN(vsniprintf, (char *, size_t, const char *, __VALIST)
                _ATTRIBUTE ((__format__ (__printf__, 3, 0))));
-int	_EXFUN(vsnprintf, (char *__restrict, size_t, const char *__restrict, __VALIST)
-               _ATTRIBUTE ((__format__ (__printf__, 3, 0))));
-int	_EXFUN(vsscanf, (const char *__restrict, const char *__restrict, __VALIST)
-               _ATTRIBUTE ((__format__ (__scanf__, 2, 0))));
 #endif /* !_REENT_ONLY */
+#endif /* !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) */
 #endif /* !__STRICT_ANSI__ */
 
 /*


More information about the Newlib mailing list