YSTest: cstdio.h 源文件

YSTest PreAlpha_b900_20201012 The YSLib Test Project

libdefect/cstdio.h
浏览该文件的文档.
1 /*
2 © 2014-2015, 2017, 2019 FrankHB.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
28 #ifndef YB_INC_libdefect_cstdio_h_
29 #define YB_INC_libdefect_cstdio_h_ 1
30
31 #include <cstdio>
32
33 #undef snprintf
34 #undef vfscanf
35 #undef vscanf
36 #undef vsnprintf
37 #undef vsscanf
38
39 #if defined(__GLIBCXX__) \
40 && (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) \
41 && !(defined(_GLIBCXX_USE_C99))
42
43 # if defined(__BIONIC__)
44 # if !(__ISO_C_VISIBLE >= 1999 || __BSD_VISIBLE)
45 extern "C"
46 {
47
48 int
49 snprintf(char *, size_t, const char *, ...)
50 __attribute__((__format__ (printf, 3, 4)))
51 __attribute__((__nonnull__ (3)));
52
53 int
54 vfscanf(FILE *, const char *, __va_list)
55 __attribute__((__format__ (scanf, 2, 0)))
56 __attribute__((__nonnull__ (2)));
57
58 int
59 vscanf(const char *, __va_list)
60 __attribute__((__format__ (scanf, 1, 0)))
61 __attribute__((__nonnull__ (1)));
62
63 int
64 vsnprintf(char *, size_t, const char *, __va_list)
65 __attribute__((__format__ (printf, 3, 0)))
66 __attribute__((__nonnull__ (3)));
67
68 int
69 vsscanf(const char *, const char *, __va_list)
70 __attribute__((__format__ (scanf, 2, 0)))
71 __attribute__((__nonnull__ (2)));
72
73 } // extern "C";
74 # endif
75 # elif defined(_NEWLIB_VERSION)
76 # if defined(__STRICT_ANSI__) && !(__STDC_VERSION__ >= 199901L) \
77 && !(__ISO_C_VISIBLE >= 1999)
78 extern "C"
79 {
80
81 int
82 _EXFUN(snprintf, (char *__restrict, size_t, const char *__restrict, ...)
83 _ATTRIBUTE((__format__(__printf__, 3, 4))));
84
85 int
86 _EXFUN(vfscanf, (FILE *__restrict, const char *__restrict, __VALIST)
87 _ATTRIBUTE((__format__(__scanf__, 2, 0))));
88
89 int
90 _EXFUN(vscanf, (const char *, __VALIST)
91 _ATTRIBUTE((__format__(__scanf__, 1, 0))));
92
93 int
94 _EXFUN(vsnprintf, (char *__restrict, size_t, const char *__restrict, __VALIST)
95 _ATTRIBUTE((__format__(__printf__, 3, 0))));
96
97 int
98 _EXFUN(vsscanf, (const char *__restrict, const char *__restrict, __VALIST)
99 _ATTRIBUTE((__format__(__scanf__, 2, 0))));
100
101 } // extern "C";
102 # endif
103 # endif
104
105 namespace std
106 {
107
108 using ::snprintf;
109 using ::vfscanf;
110 using ::vscanf;
112 using ::vsnprintf;
113 using ::vsscanf;
114
115 } // namespace std;
116
117 #endif
118
119 #endif
120
std
Definition: optional.h:982
const
const Decapsulate const Decapsulate &y ynothrow ContextNode &ctx const
Definition: NPLA1Forms.cpp:1629