]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
libcephfs: Improve portability by replacing loff_t type usage with off_t. 64-bit... 6301/head
authorJohn Coyle <dx9err@gmail.com>
Sun, 18 Oct 2015 18:37:53 +0000 (14:37 -0400)
committerJohn Coyle <dx9err@gmail.com>
Sun, 18 Oct 2015 18:37:53 +0000 (14:37 -0400)
Signed-off-by: John Coyle <dx9err@gmail.com>
src/include/cephfs/libcephfs.h
src/libcephfs.cc

index 20830933ada5f89addb66426b87685bdfd894662..8ce608d3ffeafb899d369e63ea0ff6188ae3e213 100644 (file)
 #include <stdint.h>
 #include <stdbool.h>
 
-// FreeBSD compatibility
-#if defined(__FreeBSD__) || defined(__APPLE__)
-typedef off_t loff_t;
-typedef off_t off64_t;
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -1387,8 +1381,8 @@ int ceph_ll_setattr(struct ceph_mount_info *cmount, struct Inode *in,
                    struct stat *st, int mask, int uid, int gid);
 int ceph_ll_open(struct ceph_mount_info *cmount, struct Inode *in, int flags,
                 struct Fh **fh, int uid, int gid);
-loff_t ceph_ll_lseek(struct ceph_mount_info *cmount, struct Fh* filehandle,
-                    loff_t offset, int whence);
+off_t ceph_ll_lseek(struct ceph_mount_info *cmount, struct Fh* filehandle,
+                    off_t offset, int whence);
 int ceph_ll_read(struct ceph_mount_info *cmount, struct Fh* filehandle,
                 int64_t off, uint64_t len, char* buf);
 int ceph_ll_fsync(struct ceph_mount_info *cmount, struct Fh *fh,
index 40cd028688a8efec76f5a2d0912291c0ec99dc5f..849b1c0a66505bb9ca040b10194083663ce97d14 100644 (file)
@@ -1453,8 +1453,8 @@ extern "C" int ceph_ll_fsync(class ceph_mount_info *cmount,
   return (cmount->get_client()->ll_fsync(fh, syncdataonly));
 }
 
-extern "C" loff_t ceph_ll_lseek(class ceph_mount_info *cmount,
-                               Fh *fh, loff_t offset, int whence)
+extern "C" off_t ceph_ll_lseek(class ceph_mount_info *cmount,
+                               Fh *fh, off_t offset, int whence)
 {
   return (cmount->get_client()->ll_lseek(fh, offset, whence));
 }