about summary refs log tree commit diff
path: root/libio/iofopen.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-08-31 14:07:23 +0200
committerFlorian Weimer <fweimer@redhat.com>2017-08-31 14:48:25 +0200
commit5f0704b66cea73cf2ab148ec4cff645cc301fd8c (patch)
tree13817263f75cf2e72b3bc0ce9abafa4b9b7398e8 /libio/iofopen.c
parent5129873a8e913e207e5f7b4b521c72f41a1bbf6d (diff)
downloadglibc-5f0704b66cea73cf2ab148ec4cff645cc301fd8c.tar.gz
glibc-5f0704b66cea73cf2ab148ec4cff645cc301fd8c.tar.xz
glibc-5f0704b66cea73cf2ab148ec4cff645cc301fd8c.zip
libio: Assume _LIBC, weak_alias, errno, (__set_)errno &c are defined
Do not define _POSIX_SOURCE.
Diffstat (limited to 'libio/iofopen.c')
-rw-r--r--libio/iofopen.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/libio/iofopen.c b/libio/iofopen.c
index 3d30dfd94a..62d0332994 100644
--- a/libio/iofopen.c
+++ b/libio/iofopen.c
@@ -28,11 +28,7 @@
 #include <fcntl.h>
 #include <stdlib.h>
 #include <stddef.h>
-#ifdef _LIBC
-# include <shlib-compat.h>
-#else
-# define _IO_new_fopen fopen
-#endif
+#include <shlib-compat.h>
 
 _IO_FILE *
 __fopen_maybe_mmap (_IO_FILE *fp)
@@ -73,11 +69,7 @@ __fopen_internal (const char *filename, const char *mode, int is32)
 #ifdef _IO_MTSAFE_IO
   new_f->fp.file._lock = &new_f->lock;
 #endif
-#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
   _IO_no_init (&new_f->fp.file, 0, 0, &new_f->wd, &_IO_wfile_jumps);
-#else
-  _IO_no_init (&new_f->fp.file, 1, 0, NULL, NULL);
-#endif
   _IO_JUMPS (&new_f->fp) = &_IO_file_jumps;
   _IO_new_file_init_internal (&new_f->fp);
 #if  !_IO_UNIFIED_JUMPTABLES
@@ -97,7 +89,6 @@ _IO_new_fopen (const char *filename, const char *mode)
   return __fopen_internal (filename, mode, 1);
 }
 
-#ifdef _LIBC
 strong_alias (_IO_new_fopen, __new_fopen)
 versioned_symbol (libc, _IO_new_fopen, _IO_fopen, GLIBC_2_1);
 versioned_symbol (libc, __new_fopen, fopen, GLIBC_2_1);
@@ -106,4 +97,3 @@ versioned_symbol (libc, __new_fopen, fopen, GLIBC_2_1);
 weak_alias (_IO_new_fopen, _IO_fopen64)
 weak_alias (_IO_new_fopen, fopen64)
 # endif
-#endif