summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2004-05-25 10:42:52 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2004-05-25 10:42:52 +0000
commite7e4715db22de68a703922a64c1a91d0f5e6c523 (patch)
tree5b5f4c02fb71eb2f4f502e7d05139e9e475ceea5
parente0efc557e743a79bec43f17a42ab0b8ffc80db37 (diff)
Notes
-rw-r--r--include/wchar.h8
-rw-r--r--lib/libc/stdio/getwc.c2
-rw-r--r--lib/libc/stdio/getwchar.c2
-rw-r--r--lib/libc/stdio/putwc.c2
-rw-r--r--lib/libc/stdio/putwchar.c2
5 files changed, 16 insertions, 0 deletions
diff --git a/include/wchar.h b/include/wchar.h
index b8bb90a14a4b..ea4bd12e3362 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -171,6 +171,14 @@ wchar_t *wmemset(wchar_t *, wchar_t, size_t);
int wprintf(const wchar_t * __restrict, ...);
int wscanf(const wchar_t * __restrict, ...);
+extern struct __sFILE *__stdinp;
+extern struct __sFILE *__stdoutp;
+
+#define getwc(fp) getwc(fp)
+#define getwchar() fgetwc(__stdinp)
+#define putwc(wc, fp) fputwc(wc, fp)
+#define putwchar(wc) fputwc(wc, __stdoutp)
+
#if __ISO_C_VISIBLE >= 1999
int vfwscanf(struct __sFILE * __restrict, const wchar_t * __restrict,
__va_list);
diff --git a/lib/libc/stdio/getwc.c b/lib/libc/stdio/getwc.c
index e133868f0b9f..ba5ab6011bfd 100644
--- a/lib/libc/stdio/getwc.c
+++ b/lib/libc/stdio/getwc.c
@@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$");
#include "libc_private.h"
#include "local.h"
+#undef getwc
+
/*
* Synonym for fgetwc(). The only difference is that getwc(), if it is a
* macro, may evaluate `fp' more than once.
diff --git a/lib/libc/stdio/getwchar.c b/lib/libc/stdio/getwchar.c
index 491ff9b7ffec..79dd7bc4b33b 100644
--- a/lib/libc/stdio/getwchar.c
+++ b/lib/libc/stdio/getwchar.c
@@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$");
#include "libc_private.h"
#include "local.h"
+#undef getwchar
+
/*
* Synonym for fgetwc(stdin).
*/
diff --git a/lib/libc/stdio/putwc.c b/lib/libc/stdio/putwc.c
index e26102a663f2..8fe065bdfe32 100644
--- a/lib/libc/stdio/putwc.c
+++ b/lib/libc/stdio/putwc.c
@@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$");
#include "libc_private.h"
#include "local.h"
+#undef putwc
+
/*
* Synonym for fputwc(). The only difference is that putwc(), if it is a
* macro, may evaluate `fp' more than once.
diff --git a/lib/libc/stdio/putwchar.c b/lib/libc/stdio/putwchar.c
index 569ab92820b8..55030713c752 100644
--- a/lib/libc/stdio/putwchar.c
+++ b/lib/libc/stdio/putwchar.c
@@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$");
#include "libc_private.h"
#include "local.h"
+#undef putwchar
+
/*
* Synonym for fputwc(wc, stdout).
*/