]> sourceware.org Git - glibc.git/commitdiff
Clean up fopen64 for O_LARGEFILE==0.
authorRoland McGrath <roland@hack.frob.com>
Wed, 1 Aug 2012 23:30:47 +0000 (16:30 -0700)
committerRoland McGrath <roland@hack.frob.com>
Wed, 1 Aug 2012 23:30:47 +0000 (16:30 -0700)
ChangeLog
libio/iofopen.c
libio/iofopen64.c
sysdeps/wordsize-64/iofopen.c [deleted file]
sysdeps/wordsize-64/iofopen64.c [deleted file]

index 7ddd56b10d646d1a9195fe19e0a6e594c2536bc4..386eeb5d26e4f1f4f53e49250509d5ed7343af92 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-08-01  Roland McGrath  <roland@hack.frob.com>
+
+       * libio/iofopen.c: Include <fcntl.h>.
+       [_LIBC] [!defined O_LARGEFILE || O_LARGEFILE == 0]
+       (_IO_fopen64, fopen64): Define as aliases.
+       * libio/iofopen64.c: Include <fcntl.h>.
+       [!defined _LIBC || (defined O_LARGEFILE && O_LARGEFILE != 0)]:
+       Conditionalize body on this.
+       * sysdeps/wordsize-64/iofopen.c: File removed.
+       * sysdeps/wordsize-64/iofopen64.c: File removed.
+
 2012-08-01  Marek Polacek  <polacek@redhat.com>
 
        * libc/Makeconfig: Use elf in place of binfmt-subdir.
index 8edd32ebd64f17177abaff8409fb15b45f74f216..a7e69e4f5eda6d1ea42c8ccdc1873d29104cf257 100644 (file)
@@ -25,6 +25,7 @@
    in files containing the exception.  */
 
 #include "libioP.h"
+#include <fcntl.h>
 #include <stdlib.h>
 #include <stddef.h>
 #ifdef _LIBC
@@ -106,4 +107,9 @@ _IO_new_fopen (filename, mode)
 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);
+
+# if !defined O_LARGEFILE || O_LARGEFILE == 0
+weak_alias (_IO_new_fopen, _IO_fopen64)
+weak_alias (_IO_new_fopen, fopen64)
+# endif
 #endif
index 1b1a4877d6366a711e47aa846eab1638ee8e2d0a..25c79c9b386f03c00e5046dd856240ba324b8efa 100644 (file)
    in files containing the exception.  */
 
 #include "libioP.h"
+#include <fcntl.h>
 #include <stdlib.h>
 
+/* iofopen.c defines _IO_fopen64/fopen64 as aliases if O_LARGEFILE==0.  */
+#if !defined _LIBC || (defined O_LARGEFILE && O_LARGEFILE != 0)
+
 _IO_FILE *
 _IO_fopen64 (filename, mode)
      const char *filename;
@@ -43,3 +47,5 @@ _IO_fopen64 (filename, mode)
 #ifdef weak_alias
 weak_alias (_IO_fopen64, fopen64)
 #endif
+
+#endif
diff --git a/sysdeps/wordsize-64/iofopen.c b/sysdeps/wordsize-64/iofopen.c
deleted file mode 100644 (file)
index d8d92ca..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "../../libio/iofopen.c"
-
-weak_alias (_IO_new_fopen, _IO_fopen64)
-weak_alias (_IO_new_fopen, fopen64)
diff --git a/sysdeps/wordsize-64/iofopen64.c b/sysdeps/wordsize-64/iofopen64.c
deleted file mode 100644 (file)
index 68315d8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/* Defined in iofopen.c.  */
This page took 0.118304 seconds and 5 git commands to generate.