#define _LARGEFILE_SOURCE
#define _LARGEFILE64_SOURCE
+#include "config.h"
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#else /* ! HAVE_LLSEEK */
-#if defined(__alpha__) || defined(__ia64__)
+#if SIZEOF_LONG == SIZEOF_LONG_LONG
#define llseek lseek
-#else /* !__alpha__ && !__ia64__*/
+#else /* SIZEOF_LONG != SIZEOF_LONG_LONG */
#include <linux/unistd.h>
blkid_loff_t blkid_llseek(int fd, blkid_loff_t offset, int origin)
{
+#if defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE)
+ return lseek64 (fd, offset, origin);
+#else
if ((sizeof(off_t) < sizeof(blkid_loff_t)) &&
(offset >= ((blkid_loff_t) 1 << ((sizeof(off_t)*8) - 1)))) {
errno = EOVERFLOW;
return -1;
}
return lseek(fd, (off_t) offset, origin);
+#endif
}
#endif /* linux */