Remove masking macros for getwc(), putwc(), putwchar() and getwchar().

Although there was nothing wrong with getwc() and putwc(), getwchar()
and putwchar() assumed that <stdio.h> had been included before <wchar.h>,
which is not allowed by the standard.
This commit is contained in:
Tim J. Robbins 2002-09-28 07:43:44 +00:00
parent ee38d590ff
commit 3619568a64
5 changed files with 4 additions and 17 deletions

View File

@ -186,9 +186,4 @@ size_t wcslcpy(wchar_t *, const wchar_t *, size_t);
#endif
__END_DECLS
#define getwc(fp) fgetwc(fp)
#define getwchar() fgetwc(stdin)
#define putwc(wc, fp) fputwc((wc), (fp))
#define putwchar(wc) fputwc((wc), stdout)
#endif /* !_WCHAR_H_ */

View File

@ -36,10 +36,8 @@ __FBSDID("$FreeBSD$");
/*
* Synonym for fgetwc(). The only difference is that getwc(), if it is a
* macro, may evaluate `fp' more than once. Function call overhead is not
* an issue here: wchar.h #define's getwc to fgetwc.
* macro, may evaluate `fp' more than once.
*/
#undef getwc
wint_t
getwc(FILE *fp)
{

View File

@ -35,10 +35,8 @@ __FBSDID("$FreeBSD$");
#include "local.h"
/*
* Synonym for fgetwc(stdin). Function call overhead is not an issue here:
* wchar.h #define's getwchar() to fgetwc(stdin).
* Synonym for fgetwc(stdin).
*/
#undef getwchar
wint_t
getwchar(void)
{

View File

@ -36,10 +36,8 @@ __FBSDID("$FreeBSD$");
/*
* Synonym for fputwc(). The only difference is that putwc(), if it is a
* macro, may evaluate `fp' more than once. Function call overhead is not
* an issue here: wchar.h #define's putwc to fputwc.
* macro, may evaluate `fp' more than once.
*/
#undef putwc
wint_t
putwc(wchar_t wc, FILE *fp)
{

View File

@ -35,10 +35,8 @@ __FBSDID("$FreeBSD$");
#include "local.h"
/*
* Synonym for fputwc(wc, stdout). Function call overhead is not an issue here:
* wchar.h #define's putwchar(wc) to fgetwc(wc, stdout).
* Synonym for fputwc(wc, stdout).
*/
#undef putwchar
wint_t
putwchar(wchar_t wc)
{