]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
On non-linux systems, use lseek64() if it is present in
authorTheodore Ts'o <tytso@mit.edu>
Fri, 17 Sep 2004 21:47:12 +0000 (17:47 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 17 Sep 2004 21:47:12 +0000 (17:47 -0400)
ext2fs_llseek() and blkid_llseek().  (Addresses Debian bug #269044)

lib/blkid/ChangeLog
lib/blkid/llseek.c
lib/ext2fs/ChangeLog
lib/ext2fs/llseek.c

index 8fe0462e9c39a64e5ee85a20749d67c54f5ee069..63ca354d346499159c62e491f9cb8236a7bd9cc9 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-17  Theodore Ts'o  <tytso@mit.edu>
+
+       * llseek.c (blkid_llseek): On non-linux systems, use lseek64() if
+               it is present.  (Addresses Debian bug #269044)
+
 2004-05-12  Theodore Ts'o  <tytso@mit.edu>
 
        * read.c (blkid_read_cache): Add missing fclose() which was
index 0f4763248e39a0bf76d0b2dbe22944005cad0bdf..4f49052e535b4e03e8e0aef79bebd042410981fb 100644 (file)
@@ -125,12 +125,16 @@ blkid_loff_t blkid_llseek(int fd, blkid_loff_t offset, int whence)
 
 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 */
index 9bbf393bb3c858a393f3b7220fd5bce21b7e6c57..edf9afc0a52ea14bc909131050bd26b51cf3812f 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-17  Theodore Ts'o  <tytso@mit.edu>
+
+       * llseek.c (ext2fs_llseek): On non-linux systems, use lseek64() if
+               it is present.  (Addresses Debian bug #269044)
+
 2004-07-28  Theodore Ts'o  <tytso@mit.edu>
 
        * rw_bitmaps.c (read_bitmaps), block.c (block_iterate_ind,
index 855560f11deb12c8c84f062d66aaed43a2ece119..aa4f54d4c3589b85bdb2145ce8d96e0043d99fa2 100644 (file)
@@ -121,12 +121,16 @@ ext2_loff_t ext2fs_llseek (int fd, ext2_loff_t offset, int origin)
 
 ext2_loff_t ext2fs_llseek (int fd, ext2_loff_t offset, int origin)
 {
+#if defined(HAVE_LSEEK64) && defined(HAVE_LSEEK64_PROTOTYPE)
+       return lseek64 (fd, offset, origin);
+#else
        if ((sizeof(off_t) < sizeof(ext2_loff_t)) &&
            (offset >= ((ext2_loff_t) 1 << ((sizeof(off_t)*8) -1)))) {
                errno = EINVAL;
                return -1;
        }
        return lseek (fd, (off_t) offset, origin);
+#endif
 }
 
 #endif         /* linux */