5 * This material is provided "as is", with absolutely no warranty expressed
6 * or implied. Any use is at your own risk.
8 * Permission to use or copy this software for any purpose is hereby granted
9 * without fee, provided the above notices are retained on all copies.
10 * Permission to modify the code and to distribute modified code is granted,
11 * provided the above notices are retained, and a notice that the code was
12 * modified is included with the above copyright notice.
16 #ifndef _STLP_INTERNAL_CSTDIO
17 #define _STLP_INTERNAL_CSTDIO
19 #if defined (__Lynx__)
20 # if defined (_STLP_HAS_INCLUDE_NEXT)
21 # include_next <stdarg.h>
23 # include _STLP_NATIVE_C_HEADER(stdarg.h)
27 #if defined (_STLP_USE_NEW_C_HEADERS)
28 # if defined (_STLP_HAS_INCLUDE_NEXT)
29 # include_next <cstdio>
31 # include _STLP_NATIVE_CPP_C_HEADER(cstdio)
37 #if defined (__MWERKS__)
41 # define stdin (&_STLP_VENDOR_CSTD::__files[0])
42 # define stdout (&_STLP_VENDOR_CSTD::__files[1])
43 # define stderr (&_STLP_VENDOR_CSTD::__files[2])
46 #if defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1400) || defined (_STLP_USING_PLATFORM_SDK_COMPILER)
47 inline int vsnprintf(char *s1
, size_t n
, const char *s2
, va_list v
)
48 { return _STLP_VENDOR_CSTD::_vsnprintf(s1
, n
, s2
, v
); }
51 #if defined (_STLP_IMPORT_VENDOR_CSTD )
53 using _STLP_VENDOR_CSTD::FILE;
54 using _STLP_VENDOR_CSTD::fpos_t;
55 using _STLP_VENDOR_CSTD::size_t;
57 // undef obsolete macros
65 # if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
66 using _STLP_VENDOR_CSTD::clearerr
;
67 using _STLP_VENDOR_CSTD::fclose
;
68 using _STLP_VENDOR_CSTD::feof
;
69 using _STLP_VENDOR_CSTD::ferror
;
70 using _STLP_VENDOR_CSTD::fflush
;
71 using _STLP_VENDOR_CSTD::fgetc
;
72 using _STLP_VENDOR_CSTD::fgetpos
;
73 using _STLP_VENDOR_CSTD::fgets
;
74 using _STLP_VENDOR_CSTD::fopen
;
75 using _STLP_VENDOR_CSTD::fprintf
;
76 using _STLP_VENDOR_CSTD::fputc
;
77 using _STLP_VENDOR_CSTD::fputs
;
78 using _STLP_VENDOR_CSTD::fread
;
79 # if !defined (_WIN32_WCE) || (_WIN32_WCE < 400)
80 using _STLP_VENDOR_CSTD::freopen
;
82 using _STLP_VENDOR_CSTD::fscanf
;
83 using _STLP_VENDOR_CSTD::fseek
;
84 using _STLP_VENDOR_CSTD::fsetpos
;
85 using _STLP_VENDOR_CSTD::ftell
;
86 using _STLP_VENDOR_CSTD::fwrite
;
88 # if !(defined (__IBMCPP__) && (__IBMCPP__ >= 500))
89 # if !defined (_WIN32_WCE) || (_WIN32_WCE < 400) // Supplied as macros, TODO: use inline function to redirect to the macros?
90 using _STLP_VENDOR_CSTD::getc
;
91 using _STLP_VENDOR_CSTD::putc
;
93 using _STLP_VENDOR_CSTD::getchar
;
94 using _STLP_VENDOR_CSTD::putchar
;
97 using _STLP_VENDOR_CSTD::gets
;
98 # if !defined (_WIN32_WCE) || (_WIN32_WCE < 400)
99 using _STLP_VENDOR_CSTD::perror
;
101 using _STLP_VENDOR_CSTD::printf
;
102 using _STLP_VENDOR_CSTD::puts
;
103 # if !defined (_WIN32_WCE) || (_WIN32_WCE < 400)
104 using _STLP_VENDOR_CSTD::remove
;
105 using _STLP_VENDOR_CSTD::rename
;
106 using _STLP_VENDOR_CSTD::rewind
;
107 using _STLP_VENDOR_CSTD::setbuf
;
108 using _STLP_VENDOR_CSTD::tmpfile
;
109 using _STLP_VENDOR_CSTD::tmpnam
;
111 using _STLP_VENDOR_CSTD::scanf
;
112 using _STLP_VENDOR_CSTD::setvbuf
;
113 using _STLP_VENDOR_CSTD::sprintf
;
114 using _STLP_VENDOR_CSTD::sscanf
;
115 using _STLP_VENDOR_CSTD::ungetc
;
116 using _STLP_VENDOR_CSTD::vfprintf
;
117 using _STLP_VENDOR_CSTD::vprintf
;
118 using _STLP_VENDOR_CSTD::vsprintf
;
119 # if (defined (__MWERKS__) || (defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1400)) || \
120 (defined (__BORLANDC__)))
121 using _STLP_VENDOR_CSTD::vsnprintf
;
123 # endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
125 #endif /* _STLP_IMPORT_VENDOR_CSTD */
127 #endif /* _STLP_INTERNAL_CSTDIO */