Whamcloud - gitweb
libext2fs: remove useless test and assignment in strtohashbuf()
[tools/e2fsprogs.git] / lib / ext2fs / llseek.c
index 2730f20..922a0d5 100644 (file)
@@ -9,8 +9,12 @@
  * %End-Header%
  */
 
+#ifndef _LARGEFILE_SOURCE
 #define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
 #define _LARGEFILE64_SOURCE
+#endif
 
 #include "config.h"
 #if HAVE_SYS_TYPES_H
@@ -49,7 +53,7 @@ extern long long llseek (int fd, long long offset, int origin);
 
 #if SIZEOF_LONG == SIZEOF_LONG_LONG
 
-#define llseek lseek
+#define my_llseek lseek
 
 #else /* SIZEOF_LONG != SIZEOF_LONG_LONG */
 
@@ -83,7 +87,7 @@ static ext2_loff_t my_llseek (int fd, ext2_loff_t offset, int origin)
        return (retval == -1 ? (ext2_loff_t) retval : result);
 }
 
-#endif /* __alpha__ || __ia64__ */
+#endif /* SIZE_LONG == SIZEOF_LONG_LONG */
 
 #endif /* HAVE_LLSEEK */
 #endif /* defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE) */
@@ -91,7 +95,7 @@ static ext2_loff_t my_llseek (int fd, ext2_loff_t offset, int origin)
 ext2_loff_t ext2fs_llseek (int fd, ext2_loff_t offset, int origin)
 {
 #if SIZEOF_OFF_T >= SIZEOF_LONG_LONG
-       return lseek (fd, offset, origin);
+       return my_llseek (fd, offset, origin);
 #else
        ext2_loff_t result;
        static int do_compat = 0;