Bring back the macro versions of getwc(), getwchar(), putwc() and
putwchar(), but this time avoid redundantly declaring __stdinp and __stdoutp when source files include both <stdio.h> and <wchar.h>.
This commit is contained in:
parent
812f2e1f5c
commit
e1421e9ba0
@ -134,11 +134,14 @@ typedef struct __sFILE {
|
||||
fpos_t _offset; /* current lseek offset (see WARNING) */
|
||||
} FILE;
|
||||
|
||||
#ifndef _STDSTREAM_DECLARED
|
||||
__BEGIN_DECLS
|
||||
extern FILE *__stdinp;
|
||||
extern FILE *__stdoutp;
|
||||
extern FILE *__stderrp;
|
||||
__END_DECLS
|
||||
#define _STDSTREAM_DECLARED
|
||||
#endif
|
||||
|
||||
#define __SLBF 0x0001 /* line buffered */
|
||||
#define __SNBF 0x0002 /* unbuffered */
|
||||
|
@ -171,6 +171,18 @@ wchar_t *wmemset(wchar_t *, wchar_t, size_t);
|
||||
int wprintf(const wchar_t * __restrict, ...);
|
||||
int wscanf(const wchar_t * __restrict, ...);
|
||||
|
||||
#ifndef _STDSTREAM_DECLARED
|
||||
extern struct __sFILE *__stdinp;
|
||||
extern struct __sFILE *__stdoutp;
|
||||
extern struct __sFILE *__stderrp;
|
||||
#define _STDSTREAM_DECLARED
|
||||
#endif
|
||||
|
||||
#define getwc(fp) fgetwc(fp)
|
||||
#define getwchar() fgetwc(__stdinp)
|
||||
#define putwc(wc, fp) fputwc(x, fp)
|
||||
#define putwchar(wc) fputwc(wc, __stdoutp)
|
||||
|
||||
#if __ISO_C_VISIBLE >= 1999
|
||||
int vfwscanf(struct __sFILE * __restrict, const wchar_t * __restrict,
|
||||
__va_list);
|
||||
|
Loading…
Reference in New Issue
Block a user