* %End-Header%
*/
+#ifndef _LARGEFILE_SOURCE
#define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
+#endif
#include "config.h"
#if HAVE_SYS_TYPES_H
#else /* ! HAVE_LLSEEK */
-#if SIZEOF_LONG == SIZEOF_LONG_LONG
+#if SIZEOF_LONG == SIZEOF_LONG_LONG || _FILE_OFFSET_BITS+0 == 64
-#define llseek lseek
+#define my_llseek lseek
#else /* SIZEOF_LONG != SIZEOF_LONG_LONG */
static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high,
unsigned long, offset_low,ext2_loff_t *,result,
- unsigned int, origin)
+ unsigned int, origin);
#endif
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) */
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;