summary refs log tree commit diff
path: root/libio/stdfiles.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-08-13 18:18:28 +0000
committerUlrich Drepper <drepper@redhat.com>2000-08-13 18:18:28 +0000
commit319d719d86e2278ecca219c099c5d6d343a576a1 (patch)
tree5359adefb397437feb7cf3e0c27cab895bc86cc7 /libio/stdfiles.c
parent8a82cc302401f7beea53f0395bbba2030ffe587a (diff)
downloadglibc-319d719d86e2278ecca219c099c5d6d343a576a1.tar.gz
glibc-319d719d86e2278ecca219c099c5d6d343a576a1.tar.xz
glibc-319d719d86e2278ecca219c099c5d6d343a576a1.zip
Update.
2000-08-13  Ulrich Drepper  <drepper@redhat.com>
	    Benjamin Koznik  <bkoz@redhat.com>

	* libio/fileops.c: Merge with libstdc++-v3.
	* libio/genops.c: Likewise.
	* libio/iofclose.c: Likewise.
	* libio/iofopen.c: Likewise.
	* libio/iofwide.c: Likewise.
	* libio/libio.h: Likewise.
	* libio/libioP.h: Likewise.
	* libio/stdfiles.c: Likewise.
	* libio/stdio.c: Likewise.
	* libio/wfileops.c: Likewise.
	* libio/wgenops.c: Likewise.

	* libio/Versions: Export functions needed by libstdc++-v3 in GLIBC_2.2.
Diffstat (limited to 'libio/stdfiles.c')
-rw-r--r--libio/stdfiles.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/libio/stdfiles.c b/libio/stdfiles.c
index 866746d437..b81fef8b88 100644
--- a/libio/stdfiles.c
+++ b/libio/stdfiles.c
@@ -33,20 +33,35 @@
 #include "libioP.h"
 
 #ifdef _IO_MTSAFE_IO
-#define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
+# if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+#  define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
   static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \
   static struct _IO_wide_data _IO_wide_data_##FD \
     = { ._wide_vtable = &_IO_wfile_jumps }; \
   struct _IO_FILE_plus NAME \
     = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \
        &_IO_file_jumps};
+# else
+#  define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
+  static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \
+  struct _IO_FILE_plus NAME \
+    = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, NULL), \
+       &_IO_file_jumps};
+# endif
 #else
-#define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
+# if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+#  define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
   static struct _IO_wide_data _IO_wide_data_##FD \
     = { ._wide_vtable = &_IO_wfile_jumps }; \
   struct _IO_FILE_plus NAME \
     = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \
        &_IO_file_jumps};
+# else
+#  define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
+  struct _IO_FILE_plus NAME \
+    = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, NULL), \
+       &_IO_file_jumps};
+# endif
 #endif
 
 DEF_STDFILE(_IO_2_1_stdin_, 0, 0, _IO_NO_WRITES);