about summary refs log tree commit diff
path: root/libio
diff options
context:
space:
mode:
Diffstat (limited to 'libio')
-rw-r--r--libio/fileops.c53
-rw-r--r--libio/freopen64.c5
-rw-r--r--libio/fseeko64.c5
-rw-r--r--libio/ftello64.c5
-rw-r--r--libio/iofgetpos64.c5
-rw-r--r--libio/iofopen64.c5
-rw-r--r--libio/iofsetpos64.c5
-rw-r--r--libio/oldiofgetpos64.c8
-rw-r--r--libio/oldiofsetpos64.c8
9 files changed, 12 insertions, 87 deletions
diff --git a/libio/fileops.c b/libio/fileops.c
index 5367ea9517..6aabadc644 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -671,13 +671,8 @@ mmap_remap_check (_IO_FILE *fp)
 #else
 	  (void) __munmap (fp->_IO_buf_base,
 			   fp->_IO_buf_end - fp->_IO_buf_base);
-# ifdef _G_MMAP64
-	  p = _G_MMAP64 (NULL, st.st_size, PROT_READ, MAP_SHARED,
-			 fp->_fileno, 0);
-# else
-	  p = __mmap (NULL, st.st_size, PROT_READ, MAP_SHARED,
-		      fp->_fileno, 0);
-# endif
+	  p = __mmap64 (NULL, st.st_size, PROT_READ, MAP_SHARED,
+			fp->_fileno, 0);
 	  if (p == MAP_FAILED)
 	    goto punt;
 #endif
@@ -704,13 +699,8 @@ mmap_remap_check (_IO_FILE *fp)
 
       if (fp->_offset < fp->_IO_buf_end - fp->_IO_buf_base)
 	{
-	  if (
-# ifdef _G_LSEEK64
-	      _G_LSEEK64
-# else
-	      __lseek
-# endif
-	      (fp->_fileno, fp->_IO_buf_end - fp->_IO_buf_base, SEEK_SET)
+	  if (__lseek64 (fp->_fileno, fp->_IO_buf_end - fp->_IO_buf_base,
+			 SEEK_SET)
 	      != fp->_IO_buf_end - fp->_IO_buf_base)
 	    fp->_flags |= _IO_ERR_SEEN;
 	  else
@@ -775,24 +765,14 @@ decide_maybe_mmap (_IO_FILE *fp)
       /* Try to map the file.  */
       void *p;
 
-# ifdef _G_MMAP64
-      p = _G_MMAP64 (NULL, st.st_size, PROT_READ, MAP_SHARED, fp->_fileno, 0);
-# else
-      p = __mmap (NULL, st.st_size, PROT_READ, MAP_SHARED, fp->_fileno, 0);
-# endif
+      p = __mmap64 (NULL, st.st_size, PROT_READ, MAP_SHARED, fp->_fileno, 0);
       if (p != MAP_FAILED)
 	{
 	  /* OK, we managed to map the file.  Set the buffer up and use a
 	     special jump table with simplified underflow functions which
 	     never tries to read anything from the file.  */
 
-	  if (
-# ifdef _G_LSEEK64
-	      _G_LSEEK64
-# else
-	      __lseek
-# endif
-	      (fp->_fileno, st.st_size, SEEK_SET) != st.st_size)
+	  if (__lseek64 (fp->_fileno, st.st_size, SEEK_SET) != st.st_size)
 	    {
 	      (void) __munmap (p, st.st_size);
 	      fp->_offset = _IO_pos_BAD;
@@ -944,13 +924,8 @@ _IO_file_sync_mmap (_IO_FILE *fp)
       if (_IO_in_backup (fp))
 	delta -= eGptr () - Gbase ();
 #endif
-      if (
-# ifdef _G_LSEEK64
-	  _G_LSEEK64
-# else
-	  __lseek
-# endif
-	  (fp->_fileno, fp->_IO_read_ptr - fp->_IO_buf_base, SEEK_SET)
+      if (__lseek64 (fp->_fileno, fp->_IO_read_ptr - fp->_IO_buf_base,
+		     SEEK_SET)
 	  != fp->_IO_read_ptr - fp->_IO_buf_base)
 	{
 	  fp->_flags |= _IO_ERR_SEEN;
@@ -1236,11 +1211,7 @@ _IO_file_seek (fp, offset, dir)
      _IO_off64_t offset;
      int dir;
 {
-#ifdef _G_LSEEK64
-  return _G_LSEEK64 (fp->_fileno, offset, dir);
-#else
-  return lseek (fp->_fileno, offset, dir);
-#endif
+  return __lseek64 (fp->_fileno, offset, dir);
 }
 libc_hidden_def (_IO_file_seek)
 
@@ -1249,11 +1220,7 @@ _IO_file_stat (fp, st)
      _IO_FILE *fp;
      void *st;
 {
-#ifdef _G_FSTAT64
-  return _G_FSTAT64 (fp->_fileno, (struct stat64 *) st);
-#else
-  return fstat (fp->_fileno, (struct stat *) st);
-#endif
+  return __fxstat64 (_STAT_VER, fp->_fileno, (struct stat64 *) st);
 }
 libc_hidden_def (_IO_file_stat)
 
diff --git a/libio/freopen64.c b/libio/freopen64.c
index 135049ff77..e47f965e86 100644
--- a/libio/freopen64.c
+++ b/libio/freopen64.c
@@ -40,7 +40,6 @@ freopen64 (filename, mode, fp)
      const char* mode;
      FILE *fp;
 {
-#ifdef _G_OPEN64
   FILE *result;
   CHECK_FILE (fp, NULL);
   if (!(fp->_flags & _IO_IS_FILEBUF))
@@ -101,8 +100,4 @@ freopen64 (filename, mode, fp)
     free ((char *) gfilename);
   _IO_release_lock (fp);
   return result;
-#else
-  __set_errno (ENOSYS);
-  return NULL;
-#endif
 }
diff --git a/libio/fseeko64.c b/libio/fseeko64.c
index 9fbe308c56..70dc3703c8 100644
--- a/libio/fseeko64.c
+++ b/libio/fseeko64.c
@@ -37,17 +37,12 @@ fseeko64 (fp, offset, whence)
      __off64_t offset;
      int whence;
 {
-#ifdef _G_LSEEK64
   int result;
   CHECK_FILE (fp, -1);
   _IO_acquire_lock (fp);
   result = _IO_fseek (fp, offset, whence);
   _IO_release_lock (fp);
   return result;
-#else
-  __set_errno (ENOSYS);
-  return -1;
-#endif
 }
 
 #endif
diff --git a/libio/ftello64.c b/libio/ftello64.c
index 852ef71ebf..9502f2518f 100644
--- a/libio/ftello64.c
+++ b/libio/ftello64.c
@@ -35,7 +35,6 @@ off64_t
 ftello64 (fp)
      _IO_FILE *fp;
 {
-#ifdef _G_LSEEK64
   _IO_off64_t pos;
   CHECK_FILE (fp, -1L);
   _IO_acquire_lock (fp);
@@ -55,10 +54,6 @@ ftello64 (fp)
       return -1L;
     }
   return pos;
-#else
-  __set_errno (ENOSYS);
-  return -1;
-#endif
 }
 
 #endif
diff --git a/libio/iofgetpos64.c b/libio/iofgetpos64.c
index 9755c32734..0d0a2aa26b 100644
--- a/libio/iofgetpos64.c
+++ b/libio/iofgetpos64.c
@@ -35,7 +35,6 @@ _IO_new_fgetpos64 (fp, posp)
      _IO_FILE *fp;
      _IO_fpos64_t *posp;
 {
-#ifdef _G_LSEEK64
   _IO_off64_t pos;
   int result = 0;
   CHECK_FILE (fp, EOF);
@@ -66,10 +65,6 @@ _IO_new_fgetpos64 (fp, posp)
     }
   _IO_release_lock (fp);
   return result;
-#else
-  __set_errno (ENOSYS);
-  return EOF;
-#endif
 }
 
 strong_alias (_IO_new_fgetpos64, __new_fgetpos64)
diff --git a/libio/iofopen64.c b/libio/iofopen64.c
index 25c79c9b38..159d04ee67 100644
--- a/libio/iofopen64.c
+++ b/libio/iofopen64.c
@@ -36,12 +36,7 @@ _IO_fopen64 (filename, mode)
      const char *filename;
      const char *mode;
 {
-#ifdef _G_OPEN64
   return __fopen_internal (filename, mode, 0);
-#else
-  __set_errno (ENOSYS);
-  return NULL;
-#endif
 }
 
 #ifdef weak_alias
diff --git a/libio/iofsetpos64.c b/libio/iofsetpos64.c
index 20edd8dd65..f751255a66 100644
--- a/libio/iofsetpos64.c
+++ b/libio/iofsetpos64.c
@@ -35,7 +35,6 @@ _IO_new_fsetpos64 (fp, posp)
      _IO_FILE *fp;
      const _IO_fpos64_t *posp;
 {
-#ifdef _G_LSEEK64
   int result;
   CHECK_FILE (fp, EOF);
   _IO_acquire_lock (fp);
@@ -60,10 +59,6 @@ _IO_new_fsetpos64 (fp, posp)
     }
   _IO_release_lock (fp);
   return result;
-#else
-  __set_errno (ENOSYS);
-  return EOF;
-#endif
 }
 
 strong_alias (_IO_new_fsetpos64, __new_fsetpos64)
diff --git a/libio/oldiofgetpos64.c b/libio/oldiofgetpos64.c
index c5a35e7917..bef8bc45ea 100644
--- a/libio/oldiofgetpos64.c
+++ b/libio/oldiofgetpos64.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004
-   Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -37,7 +36,6 @@ _IO_old_fgetpos64 (fp, posp)
      _IO_FILE *fp;
      _IO_fpos64_t *posp;
 {
-#ifdef _G_LSEEK64
   _IO_off64_t pos;
   CHECK_FILE (fp, EOF);
   _IO_acquire_lock (fp);
@@ -57,10 +55,6 @@ _IO_old_fgetpos64 (fp, posp)
     }
   posp->__pos = pos;
   return 0;
-#else
-  __set_errno (ENOSYS);
-  return EOF;
-#endif
 }
 
 #ifdef weak_alias
diff --git a/libio/oldiofsetpos64.c b/libio/oldiofsetpos64.c
index 039318aed1..23cb693d3a 100644
--- a/libio/oldiofsetpos64.c
+++ b/libio/oldiofsetpos64.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1993, 1995, 1997, 1998, 1999, 2000, 2002, 2003, 2004
-   Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -37,7 +36,6 @@ _IO_old_fsetpos64 (fp, posp)
      _IO_FILE *fp;
      const _IO_fpos64_t *posp;
 {
-#ifdef _G_LSEEK64
   int result;
   CHECK_FILE (fp, EOF);
   _IO_acquire_lock (fp);
@@ -56,10 +54,6 @@ _IO_old_fsetpos64 (fp, posp)
     result = 0;
   _IO_release_lock (fp);
   return result;
-#else
-  __set_errno (ENOSYS);
-  return EOF;
-#endif
 }
 
 #ifdef weak_alias