From: John Coyle Date: Sun, 18 Oct 2015 18:37:53 +0000 (-0400) Subject: libcephfs: Improve portability by replacing loff_t type usage with off_t. 64-bit... X-Git-Tag: v10.0.0~76^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F6301%2Fhead;p=ceph.git libcephfs: Improve portability by replacing loff_t type usage with off_t. 64-bit behavior on glibc is enforced with __USE_FILE_OFFSET64 compiler error. Signed-off-by: John Coyle --- diff --git a/src/include/cephfs/libcephfs.h b/src/include/cephfs/libcephfs.h index 20830933ada5..8ce608d3ffea 100644 --- a/src/include/cephfs/libcephfs.h +++ b/src/include/cephfs/libcephfs.h @@ -23,12 +23,6 @@ #include #include -// 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, diff --git a/src/libcephfs.cc b/src/libcephfs.cc index 40cd028688a8..849b1c0a6650 100644 --- a/src/libcephfs.cc +++ b/src/libcephfs.cc @@ -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)); }