Whamcloud - gitweb
LU-433 ldiskfs: remove jbd2-jcberr patch from kernel
[fs/lustre-release.git] / libsysio / include / xtio.h
index 5f9050d..8e67d2e 100644 (file)
@@ -86,6 +86,12 @@ struct xtvec64 {
 };
 #endif
 
+#ifdef HAVE_POSIX2008_PREADV
+#define _SYSIO_PREADV_T int
+#else
+#define _SYSIO_PREADV_T size_t
+#endif
+
 struct iovec;
 
 /*
@@ -106,7 +112,7 @@ extern ioid_t SYSIO_INTERFACE_NAME(ipreadv)(int fd,
                                            size_t count,
                                            off_t offset);
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 /*
  * Post asynch read into buffers mapped by an iovec from file at given offset.
  */
@@ -124,7 +130,7 @@ extern ioid_t SYSIO_INTERFACE_NAME(ipread)(int fd,
                                           size_t count, 
                                           off_t offset);
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 /*
  * Post asynch read into buffer from file at given offset.
  */
@@ -139,16 +145,16 @@ extern ioid_t SYSIO_INTERFACE_NAME(ipread64)(int fd,
  */
 extern ssize_t SYSIO_INTERFACE_NAME(preadv)(int fd,
                                            const struct iovec *iov,
-                                           size_t count,
+                                           _SYSIO_PREADV_T count,
                                            off_t offset);
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 /*
  * Read into buffers mapped by an iovec from file at given offset.
  */
 extern ssize_t SYSIO_INTERFACE_NAME(pread64v)(int fd,
                                              const struct iovec *iov, 
-                                             size_t count,
+                                             _SYSIO_PREADV_T count,
                                              off64_t offset);
 #endif
 
@@ -225,7 +231,7 @@ extern ioid_t SYSIO_INTERFACE_NAME(ipwritev)(int fd,
                                             const struct iovec *iov,
                                             size_t count,
                                             off_t offset);
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 /*
  * Post asynch write from buffers mapped by an iovec to file at given offset.
  */
@@ -243,7 +249,7 @@ extern ioid_t SYSIO_INTERFACE_NAME(ipwrite)(int fd,
                                            size_t count,
                                            off_t offset);
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 /*
  * Post asynch write from buffer to file at given offset.
  */
@@ -258,16 +264,16 @@ extern ioid_t SYSIO_INTERFACE_NAME(ipwrite64)(int fd,
  */
 extern ssize_t SYSIO_INTERFACE_NAME(pwritev)(int fd,
                                             const struct iovec *iov,
-                                            size_t count,
+                                            _SYSIO_PREADV_T count,
                                             off_t offset);
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 /*
  * Write from buffers mapped by an iovec to file at given offset.
  */
 extern ssize_t SYSIO_INTERFACE_NAME(pwrite64v)(int fd,
                                               const struct iovec *iov,
-                                              size_t count,
+                                              _SYSIO_PREADV_T count,
                                               off64_t offset);
 #endif