From 473b974a06b209a2c2560d6611ea40498a2c97d5 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 28 Mar 2012 09:49:48 +1100 Subject: [PATCH] build: do not use HAVE_EXPLICIT_LARGEFILE_SUPPORT and *64() fucntions any more --- lib/util/fsusage.c | 7 +- source3/include/includes.h | 48 +----------- source3/include/proto.h | 7 -- source3/lib/sendfile.c | 12 --- source3/lib/system.c | 187 +++++++++++---------------------------------- 5 files changed, 49 insertions(+), 212 deletions(-) diff --git a/lib/util/fsusage.c b/lib/util/fsusage.c index e5f2678a9f1..bf07baf0296 100644 --- a/lib/util/fsusage.c +++ b/lib/util/fsusage.c @@ -128,7 +128,7 @@ _PUBLIC_ int sys_fsusage(const char *path, uint64_t *dfree, uint64_t *dsize) #endif /* STAT_STATFS4 */ -#if defined(STAT_STATVFS) || defined(STAT_STATVFS64) /* SVR4 */ +#if defined(STAT_STATVFS) /* SVR4 */ #ifdef HAVE_FRSIZE # define CONVERT_BLOCKS(B) \ adjust_blocks ((uint64_t)(B), fsd.f_frsize ? (uint64_t)fsd.f_frsize : (uint64_t)fsd.f_bsize, (uint64_t)512) @@ -137,13 +137,8 @@ _PUBLIC_ int sys_fsusage(const char *path, uint64_t *dfree, uint64_t *dsize) adjust_blocks ((uint64_t)(B), (uint64_t)fsd.f_bsize, (uint64_t)512) #endif -#ifdef STAT_STATVFS64 - struct statvfs64 fsd; - if (statvfs64(path, &fsd) < 0) return -1; -#else struct statvfs fsd; if (statvfs(path, &fsd) < 0) return -1; -#endif /* f_frsize isn't guaranteed to be supported. */ diff --git a/source3/include/includes.h b/source3/include/includes.h index 562b64ca9a9..e321e4c9434 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -259,15 +259,11 @@ typedef sig_atomic_t volatile SIG_ATOMIC_T; */ #ifndef SMB_DEV_T -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_DEV64_T) -# define SMB_DEV_T dev64_t -# else -# define SMB_DEV_T dev_t -# endif +# define SMB_DEV_T dev_t #endif #ifndef LARGE_SMB_DEV_T -# if (defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_DEV64_T)) || (defined(SIZEOF_DEV_T) && (SIZEOF_DEV_T == 8)) +# if (defined(SIZEOF_DEV_T) && (SIZEOF_DEV_T == 8)) # define LARGE_SMB_DEV_T 1 # endif #endif @@ -285,15 +281,11 @@ typedef sig_atomic_t volatile SIG_ATOMIC_T; */ #ifndef SMB_INO_T -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_INO64_T) -# define SMB_INO_T ino64_t -# else # define SMB_INO_T ino_t -# endif #endif #ifndef LARGE_SMB_INO_T -# if (defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_INO64_T)) || (defined(SIZEOF_INO_T) && (SIZEOF_INO_T == 8)) +# if (defined(SIZEOF_INO_T) && (SIZEOF_INO_T == 8)) # define LARGE_SMB_INO_T 1 # endif #endif @@ -307,11 +299,7 @@ typedef sig_atomic_t volatile SIG_ATOMIC_T; #endif #ifndef SMB_OFF_T -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) -# define SMB_OFF_T off64_t -# else # define SMB_OFF_T off_t -# endif #endif /* TODO: remove this macros */ @@ -330,7 +318,7 @@ typedef uint64_t br_off; */ #ifndef LARGE_SMB_OFF_T -# if (defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T)) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)) +# if (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)) # define LARGE_SMB_OFF_T 1 # endif #endif @@ -396,11 +384,7 @@ typedef struct stat_ex SMB_STRUCT_STAT; */ #ifndef SMB_STRUCT_DIRENT -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_DIRENT64) -# define SMB_STRUCT_DIRENT struct dirent64 -# else # define SMB_STRUCT_DIRENT struct dirent -# endif #endif /* @@ -408,11 +392,7 @@ typedef struct stat_ex SMB_STRUCT_STAT; */ #ifndef SMB_STRUCT_DIR -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_DIR64) -# define SMB_STRUCT_DIR DIR64 -# else # define SMB_STRUCT_DIR DIR -# endif #endif /* @@ -420,35 +400,19 @@ typedef struct stat_ex SMB_STRUCT_STAT; */ #ifndef SMB_STRUCT_FLOCK -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) -# define SMB_STRUCT_FLOCK struct flock64 -# else # define SMB_STRUCT_FLOCK struct flock -# endif #endif #ifndef SMB_F_SETLKW -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) -# define SMB_F_SETLKW F_SETLKW64 -# else # define SMB_F_SETLKW F_SETLKW -# endif #endif #ifndef SMB_F_SETLK -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) -# define SMB_F_SETLK F_SETLK64 -# else # define SMB_F_SETLK F_SETLK -# endif #endif #ifndef SMB_F_GETLK -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) -# define SMB_F_GETLK F_GETLK64 -# else # define SMB_F_GETLK F_GETLK -# endif #endif /* @@ -457,11 +421,7 @@ typedef struct stat_ex SMB_STRUCT_STAT; #ifndef SMB_STRUCT_AIOCB # if defined(WITH_AIO) -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_AIOCB64) -# define SMB_STRUCT_AIOCB struct aiocb64 -# else # define SMB_STRUCT_AIOCB struct aiocb -# endif # else # define SMB_STRUCT_AIOCB int /* AIO not being used but we still need the define.... */ # endif diff --git a/source3/include/proto.h b/source3/include/proto.h index e08c175eb6f..0af512a7e46 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -394,17 +394,10 @@ int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb); int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb); int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout); -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_STAT64) -struct stat64; -void init_stat_ex_from_stat (struct stat_ex *dst, - const struct stat64 *src, - bool fake_dir_create_times); -#else struct stat; void init_stat_ex_from_stat (struct stat_ex *dst, const struct stat *src, bool fake_dir_create_times); -#endif /* The following definitions come from lib/system_smbd.c */ diff --git a/source3/lib/sendfile.c b/source3/lib/sendfile.c index c2099bc8b1b..50b522ed195 100644 --- a/source3/lib/sendfile.c +++ b/source3/lib/sendfile.c @@ -58,11 +58,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of while (total) { ssize_t nwritten; do { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_SENDFILE64) - nwritten = sendfile64(tofd, fromfd, &offset, total); -#else nwritten = sendfile(tofd, fromfd, &offset, total); -#endif #if defined(EWOULDBLOCK) } while (nwritten == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)); #else @@ -229,11 +225,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of xferred = 0; -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_SENDFILEV64) - nwritten = sendfilev64(tofd, vec, sfvcnt, &xferred); -#else nwritten = sendfilev(tofd, vec, sfvcnt, &xferred); -#endif #if defined(EWOULDBLOCK) if (nwritten == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)) { #else @@ -307,11 +299,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of */ do { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_SENDFILE64) - nwritten = sendfile64(tofd, fromfd, offset, total, &hdtrl[0], 0); -#else nwritten = sendfile(tofd, fromfd, offset, total, &hdtrl[0], 0); -#endif #if defined(EWOULDBLOCK) } while (nwritten == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)); #else diff --git a/source3/lib/system.c b/source3/lib/system.c index 238f84beeaa..feb745306ae 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -117,40 +117,32 @@ ssize_t sys_writev(int fd, const struct iovec *iov, int iovcnt) } /******************************************************************* -A pread wrapper that will deal with EINTR and 64-bit file offsets. +A pread wrapper that will deal with EINTR ********************************************************************/ -#if defined(HAVE_PREAD) || defined(HAVE_PREAD64) +#if defined(HAVE_PREAD) ssize_t sys_pread(int fd, void *buf, size_t count, SMB_OFF_T off) { ssize_t ret; do { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_PREAD64) - ret = pread64(fd, buf, count, off); -#else ret = pread(fd, buf, count, off); -#endif } while (ret == -1 && errno == EINTR); return ret; } #endif /******************************************************************* -A write wrapper that will deal with EINTR and 64-bit file offsets. +A write wrapper that will deal with EINTR ********************************************************************/ -#if defined(HAVE_PWRITE) || defined(HAVE_PWRITE64) +#if defined(HAVE_PWRITE) ssize_t sys_pwrite(int fd, const void *buf, size_t count, SMB_OFF_T off) { ssize_t ret; do { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_PWRITE64) - ret = pwrite64(fd, buf, count, off); -#else ret = pwrite(fd, buf, count, off); -#endif } while (ret == -1 && errno == EINTR); return ret; } @@ -428,15 +420,9 @@ void update_stat_ex_create_time(struct stat_ex *dst, dst->st_ex_calculated_birthtime = false; } -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_STAT64) -void init_stat_ex_from_stat (struct stat_ex *dst, - const struct stat64 *src, - bool fake_dir_create_times) -#else void init_stat_ex_from_stat (struct stat_ex *dst, const struct stat *src, bool fake_dir_create_times) -#endif { dst->st_ex_dev = src->st_dev; dst->st_ex_ino = src->st_ino; @@ -470,20 +456,15 @@ void init_stat_ex_from_stat (struct stat_ex *dst, } /******************************************************************* -A stat() wrapper that will deal with 64 bit filesizes. +A stat() wrapper. ********************************************************************/ int sys_stat(const char *fname, SMB_STRUCT_STAT *sbuf, bool fake_dir_create_times) { int ret; -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_STAT64) - struct stat64 statbuf; - ret = stat64(fname, &statbuf); -#else struct stat statbuf; ret = stat(fname, &statbuf); -#endif if (ret == 0) { /* we always want directories to appear zero size */ if (S_ISDIR(statbuf.st_mode)) { @@ -495,19 +476,14 @@ int sys_stat(const char *fname, SMB_STRUCT_STAT *sbuf, } /******************************************************************* - An fstat() wrapper that will deal with 64 bit filesizes. + An fstat() wrapper. ********************************************************************/ int sys_fstat(int fd, SMB_STRUCT_STAT *sbuf, bool fake_dir_create_times) { int ret; -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_FSTAT64) - struct stat64 statbuf; - ret = fstat64(fd, &statbuf); -#else struct stat statbuf; ret = fstat(fd, &statbuf); -#endif if (ret == 0) { /* we always want directories to appear zero size */ if (S_ISDIR(statbuf.st_mode)) { @@ -519,20 +495,15 @@ int sys_fstat(int fd, SMB_STRUCT_STAT *sbuf, bool fake_dir_create_times) } /******************************************************************* - An lstat() wrapper that will deal with 64 bit filesizes. + An lstat() wrapper. ********************************************************************/ int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf, bool fake_dir_create_times) { int ret; -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_LSTAT64) - struct stat64 statbuf; - ret = lstat64(fname, &statbuf); -#else struct stat statbuf; ret = lstat(fname, &statbuf); -#endif if (ret == 0) { /* we always want directories to appear zero size */ if (S_ISDIR(statbuf.st_mode)) { @@ -544,13 +515,11 @@ int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf, } /******************************************************************* - An posix_fallocate() wrapper that will deal with 64 bit filesizes. + An posix_fallocate() wrapper. ********************************************************************/ int sys_posix_fallocate(int fd, SMB_OFF_T offset, SMB_OFF_T len) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_POSIX_FALLOCATE64) && !defined(HAVE_BROKEN_POSIX_FALLOCATE) - return posix_fallocate64(fd, offset, len); -#elif defined(HAVE_POSIX_FALLOCATE) && !defined(HAVE_BROKEN_POSIX_FALLOCATE) +#if defined(HAVE_POSIX_FALLOCATE) && !defined(HAVE_BROKEN_POSIX_FALLOCATE) return posix_fallocate(fd, offset, len); #elif defined(F_RESVSP64) /* this handles XFS on IRIX */ @@ -605,9 +574,7 @@ int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, SMB_OF errno = EINVAL; return -1; } -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_LINUX_FALLOCATE64) - return fallocate64(fd, lmode, offset, len); -#elif defined(HAVE_LINUX_FALLOCATE) +#if defined(HAVE_LINUX_FALLOCATE) return fallocate(fd, lmode, offset, len); #endif #else @@ -618,87 +585,65 @@ int sys_fallocate(int fd, enum vfs_fallocate_mode mode, SMB_OFF_T offset, SMB_OF } /******************************************************************* - An ftruncate() wrapper that will deal with 64 bit filesizes. + An ftruncate() wrapper. ********************************************************************/ int sys_ftruncate(int fd, SMB_OFF_T offset) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_FTRUNCATE64) - return ftruncate64(fd, offset); -#else return ftruncate(fd, offset); -#endif } /******************************************************************* - An lseek() wrapper that will deal with 64 bit filesizes. + An lseek() wrapper. ********************************************************************/ SMB_OFF_T sys_lseek(int fd, SMB_OFF_T offset, int whence) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_LSEEK64) - return lseek64(fd, offset, whence); -#else return lseek(fd, offset, whence); -#endif } /******************************************************************* - An ftell() wrapper that will deal with 64 bit filesizes. + An ftell() wrapper. ********************************************************************/ SMB_OFF_T sys_ftell(FILE *fp) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(LARGE_SMB_OFF_T) && defined(HAVE_FTELL64) - return (SMB_OFF_T)ftell64(fp); -#elif defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(LARGE_SMB_OFF_T) && defined(HAVE_FTELLO64) - return (SMB_OFF_T)ftello64(fp); -#else return (SMB_OFF_T)ftell(fp); -#endif } /******************************************************************* - A creat() wrapper that will deal with 64 bit filesizes. + A creat() wrapper. ********************************************************************/ int sys_creat(const char *path, mode_t mode) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_CREAT64) - return creat64(path, mode); +#if defined(HAVE_CREAT) + return creat(path, mode); #else /* - * If creat64 isn't defined then ensure we call a potential open64. - * JRA. + * If creat isn't defined then ensure we call open with the expected flags. + * */ return sys_open(path, O_WRONLY | O_CREAT | O_TRUNC, mode); #endif } /******************************************************************* - An open() wrapper that will deal with 64 bit filesizes. + An open() wrapper. ********************************************************************/ int sys_open(const char *path, int oflag, mode_t mode) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OPEN64) - return open64(path, oflag, mode); -#else return open(path, oflag, mode); -#endif } /******************************************************************* - An fopen() wrapper that will deal with 64 bit filesizes. + An fopen() wrapper. ********************************************************************/ FILE *sys_fopen(const char *path, const char *type) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_FOPEN64) - return fopen64(path, type); -#else return fopen(path, type); -#endif } @@ -736,29 +681,23 @@ void kernel_flock(int fd, uint32 share_mode, uint32 access_mask) /******************************************************************* - An opendir wrapper that will deal with 64 bit filesizes. + An opendir wrapper. ********************************************************************/ SMB_STRUCT_DIR *sys_opendir(const char *name) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OPENDIR64) - return opendir64(name); -#else return opendir(name); -#endif } /******************************************************************* - An fdopendir wrapper that will deal with 64 bit filesizes. + An fdopendir wrapper. Ugly hack - we need dirfd for this to work correctly in the calling code.. JRA. ********************************************************************/ SMB_STRUCT_DIR *sys_fdopendir(int fd) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_FDOPENDIR64) && defined(HAVE_DIRFD) - return fdopendir64(fd); -#elif defined(HAVE_FDOPENDIR) && defined(HAVE_DIRFD) +#if defined(HAVE_FDOPENDIR) && defined(HAVE_DIRFD) return fdopendir(fd); #else errno = ENOSYS; @@ -767,82 +706,58 @@ SMB_STRUCT_DIR *sys_fdopendir(int fd) } /******************************************************************* - A readdir wrapper that will deal with 64 bit filesizes. + A readdir wrapper. ********************************************************************/ SMB_STRUCT_DIRENT *sys_readdir(SMB_STRUCT_DIR *dirp) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_READDIR64) - return readdir64(dirp); -#else return readdir(dirp); -#endif } /******************************************************************* - A seekdir wrapper that will deal with 64 bit filesizes. + A seekdir wrapper. ********************************************************************/ void sys_seekdir(SMB_STRUCT_DIR *dirp, long offset) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_SEEKDIR64) - seekdir64(dirp, offset); -#else seekdir(dirp, offset); -#endif } /******************************************************************* - A telldir wrapper that will deal with 64 bit filesizes. + A telldir wrapper. ********************************************************************/ long sys_telldir(SMB_STRUCT_DIR *dirp) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_TELLDIR64) - return (long)telldir64(dirp); -#else return (long)telldir(dirp); -#endif } /******************************************************************* - A rewinddir wrapper that will deal with 64 bit filesizes. + A rewinddir wrapper. ********************************************************************/ void sys_rewinddir(SMB_STRUCT_DIR *dirp) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_REWINDDIR64) - rewinddir64(dirp); -#else rewinddir(dirp); -#endif } /******************************************************************* - A close wrapper that will deal with 64 bit filesizes. + A close wrapper. ********************************************************************/ int sys_closedir(SMB_STRUCT_DIR *dirp) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_CLOSEDIR64) - return closedir64(dirp); -#else return closedir(dirp); -#endif } /******************************************************************* - An mknod() wrapper that will deal with 64 bit filesizes. + An mknod() wrapper. ********************************************************************/ int sys_mknod(const char *path, mode_t mode, SMB_DEV_T dev) { -#if defined(HAVE_MKNOD) || defined(HAVE_MKNOD64) -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_MKNOD64) && defined(HAVE_DEV64_T) - return mknod64(path, mode, dev); -#else +#if defined(HAVE_MKNOD) return mknod(path, mode, dev); -#endif #else /* No mknod system call. */ errno = ENOSYS; @@ -2429,14 +2344,12 @@ int sys_get_number_of_cores(void) #if defined(WITH_AIO) /******************************************************************* - An aio_read wrapper that will deal with 64-bit sizes. + An aio_read wrapper. ********************************************************************/ int sys_aio_read(SMB_STRUCT_AIOCB *aiocb) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_AIOCB64) && defined(HAVE_AIO_READ64) - return aio_read64(aiocb); -#elif defined(HAVE_AIO_READ) +#if defined(HAVE_AIO_READ) return aio_read(aiocb); #else errno = ENOSYS; @@ -2445,14 +2358,12 @@ int sys_aio_read(SMB_STRUCT_AIOCB *aiocb) } /******************************************************************* - An aio_write wrapper that will deal with 64-bit sizes. + An aio_write wrapper. ********************************************************************/ int sys_aio_write(SMB_STRUCT_AIOCB *aiocb) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_AIOCB64) && defined(HAVE_AIO_WRITE64) - return aio_write64(aiocb); -#elif defined(HAVE_AIO_WRITE) +#if defined(HAVE_AIO_WRITE) return aio_write(aiocb); #else errno = ENOSYS; @@ -2461,14 +2372,12 @@ int sys_aio_write(SMB_STRUCT_AIOCB *aiocb) } /******************************************************************* - An aio_return wrapper that will deal with 64-bit sizes. + An aio_return wrapper. ********************************************************************/ ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_AIOCB64) && defined(HAVE_AIO_RETURN64) - return aio_return64(aiocb); -#elif defined(HAVE_AIO_RETURN) +#if defined(HAVE_AIO_RETURN) return aio_return(aiocb); #else errno = ENOSYS; @@ -2477,14 +2386,12 @@ ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb) } /******************************************************************* - An aio_cancel wrapper that will deal with 64-bit sizes. + An aio_cancel wrapper. ********************************************************************/ int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_AIOCB64) && defined(HAVE_AIO_CANCEL64) - return aio_cancel64(fd, aiocb); -#elif defined(HAVE_AIO_CANCEL) +#if defined(HAVE_AIO_CANCEL) return aio_cancel(fd, aiocb); #else errno = ENOSYS; @@ -2493,14 +2400,12 @@ int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb) } /******************************************************************* - An aio_error wrapper that will deal with 64-bit sizes. + An aio_error wrapper. ********************************************************************/ int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_AIOCB64) && defined(HAVE_AIO_ERROR64) - return aio_error64(aiocb); -#elif defined(HAVE_AIO_ERROR) +#if defined(HAVE_AIO_ERROR) return aio_error(aiocb); #else errno = ENOSYS; @@ -2509,14 +2414,12 @@ int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb) } /******************************************************************* - An aio_fsync wrapper that will deal with 64-bit sizes. + An aio_fsync wrapper. ********************************************************************/ int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_AIOCB64) && defined(HAVE_AIO_FSYNC64) - return aio_fsync64(op, aiocb); -#elif defined(HAVE_AIO_FSYNC) +#if defined(HAVE_AIO_FSYNC) return aio_fsync(op, aiocb); #else errno = ENOSYS; @@ -2525,14 +2428,12 @@ int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb) } /******************************************************************* - An aio_fsync wrapper that will deal with 64-bit sizes. + An aio_fsync wrapper. ********************************************************************/ int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout) { -#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_AIOCB64) && defined(HAVE_AIO_SUSPEND64) - return aio_suspend64(cblist, n, timeout); -#elif defined(HAVE_AIO_FSYNC) +#if defined(HAVE_AIO_FSYNC) return aio_suspend(cblist, n, timeout); #else errno = ENOSYS; -- 2.11.4.GIT