Whamcloud - gitweb
Branch b1_4
authorscjody <scjody>
Wed, 9 May 2007 22:28:54 +0000 (22:28 +0000)
committerscjody <scjody>
Wed, 9 May 2007 22:28:54 +0000 (22:28 +0000)
Clean up libsysio compiler warnings on XT3.

b=12332
i=adilger
i=walter

21 files changed:
libsysio/drivers/native/fs_native.c
libsysio/include/file.h
libsysio/include/native.h
libsysio/include/sysio-cmn.h
libsysio/include/sysio.h
libsysio/include/xtio.h
libsysio/src/chdir.c
libsysio/src/fcntl.c
libsysio/src/file.c
libsysio/src/file_hack.c
libsysio/src/fs.c
libsysio/src/getdirentries.c
libsysio/src/init.c
libsysio/src/inode.c
libsysio/src/lseek.c
libsysio/src/mount.c
libsysio/src/namei.c
libsysio/src/rw.c
libsysio/src/stat.c
libsysio/src/truncate.c
libsysio/tests/startup.c

index 75ae531..1909e2e 100644 (file)
@@ -933,7 +933,7 @@ native_pos(int fd, _SYSIO_OFF_T *offset, int whence)
        assert(*offset >= 0);
 
        off = *offset;
        assert(*offset >= 0);
 
        off = *offset;
-#if _LARGEFILE64_SOURCE && defined(SYSIO_SYS__llseek)
+#if defined(_LARGEFILE64_SOURCE) && defined(SYSIO_SYS__llseek)
        {
                int     err;
                err =
        {
                int     err;
                err =
index ed5041f..d30e84e 100644 (file)
@@ -61,7 +61,7 @@
 #define _SEEK_MAX(fil) \
        (_F_LARGEFILE(fil) ? _SYSIO_OFF_T_MAX : LONG_MAX)
 
 #define _SEEK_MAX(fil) \
        (_F_LARGEFILE(fil) ? _SYSIO_OFF_T_MAX : LONG_MAX)
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #define        _SYSIO_FLOCK    flock64
 #else
 #define        _SYSIO_FLOCK    flock
 #define        _SYSIO_FLOCK    flock64
 #else
 #define        _SYSIO_FLOCK    flock
@@ -137,7 +137,7 @@ extern struct file *_sysio_fd_find(int fd);
 extern int _sysio_fd_set(struct file *fil, int fd, int force);
 extern int _sysio_fd_dup(int oldfd, int newfd, int force);
 extern int _sysio_fd_close_all(void);
 extern int _sysio_fd_set(struct file *fil, int fd, int force);
 extern int _sysio_fd_dup(int oldfd, int newfd, int force);
 extern int _sysio_fd_close_all(void);
-#if ZERO_SUM_MEMORY
+#ifdef ZERO_SUM_MEMORY
 extern void _sysio_fd_shutdown(void);
 #endif
 extern _SYSIO_OFF_T _sysio_lseek_prepare(struct file *fil,
 extern void _sysio_fd_shutdown(void);
 #endif
 extern _SYSIO_OFF_T _sysio_lseek_prepare(struct file *fil,
index 847ca03..d0c024b 100644 (file)
@@ -97,22 +97,22 @@ do {                                            \
 /*
  * System calls.
  */
 /*
  * System calls.
  */
-#if _LARGEFILE64_SOURCE && defined(SYS_lstat64)
+#if defined(_LARGEFILE64_SOURCE) && defined(SYS_lstat64)
 #define SYSIO_SYS_stat         SYS_lstat64
 #elif defined(SYS_lstat)
 #define SYSIO_SYS_stat         SYS_lstat
 #endif
 #define SYSIO_SYS_stat         SYS_lstat64
 #elif defined(SYS_lstat)
 #define SYSIO_SYS_stat         SYS_lstat
 #endif
-#if _LARGEFILE64_SOURCE && defined(SYS_fstat64)
+#if defined(_LARGEFILE64_SOURCE) && defined(SYS_fstat64)
 #define SYSIO_SYS_fstat                SYS_fstat64
 #elif defined(SYS_fstat)
 #define SYSIO_SYS_fstat                SYS_fstat
 #endif
 #define SYSIO_SYS_fstat                SYS_fstat64
 #elif defined(SYS_fstat)
 #define SYSIO_SYS_fstat                SYS_fstat
 #endif
-#if _LARGEFILE64_SOURCE && defined(SYS_truncate64)
+#if defined(_LARGEFILE64_SOURCE) && defined(SYS_truncate64)
 #define SYSIO_SYS_truncate     SYS_truncate64
 #elif defined(SYS_truncate)
 #define SYSIO_SYS_truncate     SYS_truncate
 #endif
 #define SYSIO_SYS_truncate     SYS_truncate64
 #elif defined(SYS_truncate)
 #define SYSIO_SYS_truncate     SYS_truncate
 #endif
-#if _LARGEFILE64_SOURCE && defined(SYS_ftruncate64)
+#if defined(_LARGEFILE64_SOURCE) && defined(SYS_ftruncate64)
 #define SYSIO_SYS_ftruncate    SYS_ftruncate64
 #elif defined(SYS_ftruncate)
 #define SYSIO_SYS_ftruncate    SYS_ftruncate
 #define SYSIO_SYS_ftruncate    SYS_ftruncate64
 #elif defined(SYS_ftruncate)
 #define SYSIO_SYS_ftruncate    SYS_ftruncate
@@ -123,7 +123,7 @@ do {                                            \
 #if defined(SYS_close)
 #define SYSIO_SYS_close                SYS_close
 #endif
 #if defined(SYS_close)
 #define SYSIO_SYS_close                SYS_close
 #endif
-#if _LARGEFILE64_SOURCE && defined(SYS_lseek64)
+#if defined(_LARGEFILE64_SOURCE) && defined(SYS_lseek64)
 #define SYSIO_SYS_lseek                SYS_lseek64
 #elif defined(SYS_lseek)
 #define SYSIO_SYS_lseek                SYS_lseek
 #define SYSIO_SYS_lseek                SYS_lseek64
 #elif defined(SYS_lseek)
 #define SYSIO_SYS_lseek                SYS_lseek
@@ -147,17 +147,17 @@ do {                                            \
 #if defined(SYS_writev)
 #define SYSIO_SYS_writev       SYS_writev
 #endif
 #if defined(SYS_writev)
 #define SYSIO_SYS_writev       SYS_writev
 #endif
-#if _LARGEFILE64_SOURCE && defined(SYS_pread64)
+#if defined(_LARGEFILE64_SOURCE) && defined(SYS_pread64)
 #define SYSIO_SYS_pread                SYS_pread64
 #elif defined(SYS_pread)
 #define SYSIO_SYS_pread                SYS_pread
 #endif
 #define SYSIO_SYS_pread                SYS_pread64
 #elif defined(SYS_pread)
 #define SYSIO_SYS_pread                SYS_pread
 #endif
-#if _LARGEFILE64_SOURCE && defined(SYS_pwrite64)
+#if defined(_LARGEFILE64_SOURCE) && defined(SYS_pwrite64)
 #define SYSIO_SYS_pwrite       SYS_pwrite64
 #elif defined(SYS_pwrite)
 #define SYSIO_SYS_pwrite       SYS_pwrite
 #endif
 #define SYSIO_SYS_pwrite       SYS_pwrite64
 #elif defined(SYS_pwrite)
 #define SYSIO_SYS_pwrite       SYS_pwrite
 #endif
-#if _LARGEFILE64_SOURCE && defined(SYS_fcntl64)
+#if defined(_LARGEFILE64_SOURCE) && defined(SYS_fcntl64)
 #define SYSIO_SYS_fcntl                SYS_fcntl64
 #elif defined(SYS_fcntl)
 #define SYSIO_SYS_fcntl                SYS_fcntl
 #define SYSIO_SYS_fcntl                SYS_fcntl64
 #elif defined(SYS_fcntl)
 #define SYSIO_SYS_fcntl                SYS_fcntl
@@ -165,7 +165,7 @@ do {                                            \
 #if defined(SYS_fsync)
 #define SYSIO_SYS_fsync                SYS_fsync
 #endif
 #if defined(SYS_fsync)
 #define SYSIO_SYS_fsync                SYS_fsync
 #endif
-#if ALPHA_LINUX && defined(SYS_osf_fdatasync)
+#if defined(ALPHA_LINUX) && defined(SYS_osf_fdatasync)
 #define SYSIO_SYS_fdatasync    SYS_osf_fdatasync
 #elif defined(SYS_fdatasync)
 #define SYSIO_SYS_fdatasync    SYS_fdatasync
 #define SYSIO_SYS_fdatasync    SYS_osf_fdatasync
 #elif defined(SYS_fdatasync)
 #define SYSIO_SYS_fdatasync    SYS_fdatasync
@@ -192,13 +192,13 @@ do {                                            \
 #define SYSIO_SYS_rmdir                SYS_rmdir
 #endif
 #if defined(SYS_getdirentries)
 #define SYSIO_SYS_rmdir                SYS_rmdir
 #endif
 #if defined(SYS_getdirentries)
-#if _LARGEFILE64_SOURCE && defined(SYS_getdirentries64)
+#if defined(_LARGEFILE64_SOURCE) && defined(SYS_getdirentries64)
 #define SYSIO_SYS_getdirentries        SYS_getdirentries64
 #elif defined(SYS_getdirentries)
 #define SYSIO_SYS_getdirentries        SYS_getdirentries
 #endif
 #endif
 #define SYSIO_SYS_getdirentries        SYS_getdirentries64
 #elif defined(SYS_getdirentries)
 #define SYSIO_SYS_getdirentries        SYS_getdirentries
 #endif
 #endif
-#if _LARGEFILE64_SOURCE && defined(SYS_getdents64)
+#if defined(_LARGEFILE64_SOURCE) && defined(SYS_getdents64)
 # define SYSIO_SYS_getdents64  SYS_getdents64
 #elif defined(SYS_getdents)
 # if defined (__mips64__)
 # define SYSIO_SYS_getdents64  SYS_getdents64
 #elif defined(SYS_getdents)
 # if defined (__mips64__)
index 2ada2e8..abb6ddd 100644 (file)
 #define __IS_UNUSED
 #endif
 
 #define __IS_UNUSED
 #endif
 
-#ifndef _LARGEFILE64_SOURCE
-/*
- * Not glibc I guess. Define this ourselves.
- */
-#define _LARGEFILE64_SOURCE            0
-#endif
-
 /*
  * Define internal file-offset type and it's maximum value.
  */
 /*
  * Define internal file-offset type and it's maximum value.
  */
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #define _SYSIO_OFF_T                   off64_t
 #ifdef LLONG_MAX
 #define _SYSIO_OFF_T_MAX               (LLONG_MAX)
 #define _SYSIO_OFF_T                   off64_t
 #ifdef LLONG_MAX
 #define _SYSIO_OFF_T_MAX               (LLONG_MAX)
@@ -80,7 +73,7 @@
  * Internally, all file status is carried in the 64-bit capable
  * structure.
  */
  * Internally, all file status is carried in the 64-bit capable
  * structure.
  */
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #define intnl_xtvec xtvec64
 #else
 #define intnl_xtvec xtvec
 #define intnl_xtvec xtvec64
 #else
 #define intnl_xtvec xtvec
index a8a528b..e64ead5 100644 (file)
@@ -78,7 +78,7 @@
  * Internally, all directory entries are carried in the 64-bit capable
  * structure.
  */
  * Internally, all directory entries are carried in the 64-bit capable
  * structure.
  */
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #define intnl_dirent dirent64
 #else
 #define intnl_dirent dirent
 #define intnl_dirent dirent64
 #else
 #define intnl_dirent dirent
@@ -89,7 +89,7 @@ struct dirent;
  * Internally, all file status is carried in the 64-bit capable
  * structure.
  */
  * Internally, all file status is carried in the 64-bit capable
  * structure.
  */
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #define intnl_stat stat64
 #else
 #define intnl_stat stat
 #define intnl_stat stat64
 #else
 #define intnl_stat stat
@@ -97,7 +97,7 @@ struct dirent;
 struct stat;
 
 #ifdef _HAVE_STATVFS
 struct stat;
 
 #ifdef _HAVE_STATVFS
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #define intnl_statvfs statvfs64
 #else
 #define intnl_statvfs statvfs
 #define intnl_statvfs statvfs64
 #else
 #define intnl_statvfs statvfs
@@ -177,14 +177,14 @@ extern int SYSIO_INTERFACE_NAME(dup2)(int oldfd, int newfd);
 extern int SYSIO_INTERFACE_NAME(fcntl)(int fd, int cmd, ...);
 extern int SYSIO_INTERFACE_NAME(fcntl64)(int fd, int cmd, ...);
 extern int SYSIO_INTERFACE_NAME(fstat)(int fd, struct stat *buf);
 extern int SYSIO_INTERFACE_NAME(fcntl)(int fd, int cmd, ...);
 extern int SYSIO_INTERFACE_NAME(fcntl64)(int fd, int cmd, ...);
 extern int SYSIO_INTERFACE_NAME(fstat)(int fd, struct stat *buf);
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 extern int SYSIO_INTERFACE_NAME(fstat64)(int fd, struct stat64 *buf);
 extern int SYSIO_INTERFACE_NAME(lstat64)(const char *path, struct stat64 *buf);
 #endif
 extern int SYSIO_INTERFACE_NAME(fsync)(int fd);
 extern char *SYSIO_INTERFACE_NAME(getcwd)(char *buf, size_t size);
 extern off_t SYSIO_INTERFACE_NAME(lseek)(int fd, off_t offset, int whence);
 extern int SYSIO_INTERFACE_NAME(fstat64)(int fd, struct stat64 *buf);
 extern int SYSIO_INTERFACE_NAME(lstat64)(const char *path, struct stat64 *buf);
 #endif
 extern int SYSIO_INTERFACE_NAME(fsync)(int fd);
 extern char *SYSIO_INTERFACE_NAME(getcwd)(char *buf, size_t size);
 extern off_t SYSIO_INTERFACE_NAME(lseek)(int fd, off_t offset, int whence);
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 extern off64_t SYSIO_INTERFACE_NAME(lseek64)(int fd, off64_t offset, 
                                             int whence);
 #endif
 extern off64_t SYSIO_INTERFACE_NAME(lseek64)(int fd, off64_t offset, 
                                             int whence);
 #endif
@@ -195,7 +195,7 @@ extern int SYSIO_INTERFACE_NAME(getdirentries)(int fd, char *buf, int nbytes ,
 #else
 extern ssize_t SYSIO_INTERFACE_NAME(getdirentries)(int fd, char *buf, 
                                                   size_t nbytes, off_t *basep);
 #else
 extern ssize_t SYSIO_INTERFACE_NAME(getdirentries)(int fd, char *buf, 
                                                   size_t nbytes, off_t *basep);
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 extern ssize_t SYSIO_INTERFACE_NAME(getdirentries64)(int fd,
                                                     char *buf,
                                                     size_t nbytes,
 extern ssize_t SYSIO_INTERFACE_NAME(getdirentries64)(int fd,
                                                     char *buf,
                                                     size_t nbytes,
@@ -204,15 +204,15 @@ extern ssize_t SYSIO_INTERFACE_NAME(getdirentries64)(int fd,
 #endif
 extern int SYSIO_INTERFACE_NAME(mkdir)(const char *path, mode_t mode);
 extern int SYSIO_INTERFACE_NAME(open)(const char *path, int flag, ...);
 #endif
 extern int SYSIO_INTERFACE_NAME(mkdir)(const char *path, mode_t mode);
 extern int SYSIO_INTERFACE_NAME(open)(const char *path, int flag, ...);
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 extern int SYSIO_INTERFACE_NAME(open64)(const char *path, int flag, ...);
 #endif
 extern int SYSIO_INTERFACE_NAME(creat)(const char *path, mode_t mode);
 extern int SYSIO_INTERFACE_NAME(open64)(const char *path, int flag, ...);
 #endif
 extern int SYSIO_INTERFACE_NAME(creat)(const char *path, mode_t mode);
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 extern int SYSIO_INTERFACE_NAME(creat64)(const char *path, mode_t mode);
 #endif
 extern int SYSIO_INTERFACE_NAME(stat)(const char *path, struct stat *buf);
 extern int SYSIO_INTERFACE_NAME(creat64)(const char *path, mode_t mode);
 #endif
 extern int SYSIO_INTERFACE_NAME(stat)(const char *path, struct stat *buf);
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 extern int SYSIO_INTERFACE_NAME(stat64)(const char *path, struct stat64 *buf);
 #endif
 extern ssize_t  SYSIO_INTERFACE_NAME(read)(int fd, void *buf, size_t count);
 extern int SYSIO_INTERFACE_NAME(stat64)(const char *path, struct stat64 *buf);
 #endif
 extern ssize_t  SYSIO_INTERFACE_NAME(read)(int fd, void *buf, size_t count);
@@ -233,21 +233,21 @@ extern ssize_t SYSIO_INTERFACE_NAME(writev)(int fd,
                                            int count);
 #ifdef _HAVE_STATVFS
 extern int SYSIO_INTERFACE_NAME(statvfs)(const char *path, struct statvfs *buf);
                                            int count);
 #ifdef _HAVE_STATVFS
 extern int SYSIO_INTERFACE_NAME(statvfs)(const char *path, struct statvfs *buf);
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 extern int SYSIO_INTERFACE_NAME(statvfs64)(const char *path, 
                                struct statvfs64 *buf);
 #endif
 extern int SYSIO_INTERFACE_NAME(fstatvfs)(int fd, struct statvfs *buf);
 extern int SYSIO_INTERFACE_NAME(statvfs64)(const char *path, 
                                struct statvfs64 *buf);
 #endif
 extern int SYSIO_INTERFACE_NAME(fstatvfs)(int fd, struct statvfs *buf);
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 extern int SYSIO_INTERFACE_NAME(fstatvfs64)(int fd, struct statvfs64 *buf);
 #endif
 #endif
 extern int SYSIO_INTERFACE_NAME(truncate)(const char *path, off_t length);
 extern int SYSIO_INTERFACE_NAME(fstatvfs64)(int fd, struct statvfs64 *buf);
 #endif
 #endif
 extern int SYSIO_INTERFACE_NAME(truncate)(const char *path, off_t length);
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 extern int SYSIO_INTERFACE_NAME(truncate64)(const char *path, off64_t length);
 #endif
 extern int SYSIO_INTERFACE_NAME(ftruncate)(int fd, off_t length);
 extern int SYSIO_INTERFACE_NAME(truncate64)(const char *path, off64_t length);
 #endif
 extern int SYSIO_INTERFACE_NAME(ftruncate)(int fd, off_t length);
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 extern int SYSIO_INTERFACE_NAME(ftruncate64)(int fd, off64_t length);
 #endif
 extern int SYSIO_INTERFACE_NAME(rmdir)(const char *path);
 extern int SYSIO_INTERFACE_NAME(ftruncate64)(int fd, off64_t length);
 #endif
 extern int SYSIO_INTERFACE_NAME(rmdir)(const char *path);
index 5f9050d..a5798f1 100644 (file)
@@ -106,7 +106,7 @@ extern ioid_t SYSIO_INTERFACE_NAME(ipreadv)(int fd,
                                            size_t count,
                                            off_t offset);
 
                                            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.
  */
 /*
  * Post asynch read into buffers mapped by an iovec from file at given offset.
  */
@@ -124,7 +124,7 @@ extern ioid_t SYSIO_INTERFACE_NAME(ipread)(int fd,
                                           size_t count, 
                                           off_t offset);
 
                                           size_t count, 
                                           off_t offset);
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 /*
  * Post asynch read into buffer from file at given offset.
  */
 /*
  * Post asynch read into buffer from file at given offset.
  */
@@ -142,7 +142,7 @@ extern ssize_t SYSIO_INTERFACE_NAME(preadv)(int fd,
                                            size_t count,
                                            off_t offset);
 
                                            size_t count,
                                            off_t offset);
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 /*
  * Read into buffers mapped by an iovec from file at given offset.
  */
 /*
  * Read into buffers mapped by an iovec from file at given offset.
  */
@@ -225,7 +225,7 @@ extern ioid_t SYSIO_INTERFACE_NAME(ipwritev)(int fd,
                                             const struct iovec *iov,
                                             size_t count,
                                             off_t offset);
                                             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.
  */
 /*
  * Post asynch write from buffers mapped by an iovec to file at given offset.
  */
@@ -243,7 +243,7 @@ extern ioid_t SYSIO_INTERFACE_NAME(ipwrite)(int fd,
                                            size_t count,
                                            off_t offset);
 
                                            size_t count,
                                            off_t offset);
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 /*
  * Post asynch write from buffer to file at given offset.
  */
 /*
  * Post asynch write from buffer to file at given offset.
  */
@@ -261,7 +261,7 @@ extern ssize_t SYSIO_INTERFACE_NAME(pwritev)(int fd,
                                             size_t count,
                                             off_t offset);
 
                                             size_t count,
                                             off_t offset);
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 /*
  * Write from buffers mapped by an iovec to file at given offset.
  */
 /*
  * Write from buffers mapped by an iovec to file at given offset.
  */
index f48c0fe..3f5c900 100644 (file)
@@ -79,7 +79,7 @@
 #include "file.h"
 #include "sysio-symbols.h"
 
 #include "file.h"
 #include "sysio-symbols.h"
 
-#if DEFER_INIT_CWD
+#ifdef DEFER_INIT_CWD
 const char *_sysio_init_cwd = NULL;
 #endif
 
 const char *_sysio_init_cwd = NULL;
 #endif
 
@@ -240,7 +240,7 @@ SYSIO_INTERFACE_NAME(getcwd)(char *buf, size_t size)
        SYSIO_INTERFACE_DISPLAY_BLOCK;
 
        SYSIO_INTERFACE_ENTER;
        SYSIO_INTERFACE_DISPLAY_BLOCK;
 
        SYSIO_INTERFACE_ENTER;
-#if DEFER_INIT_CWD
+#ifdef DEFER_INIT_CWD
        if (!_sysio_cwd) {
                struct pnode *pno;
 
        if (!_sysio_cwd) {
                struct pnode *pno;
 
index 703e09d..b779d70 100644 (file)
@@ -194,14 +194,14 @@ _sysio_vfcntl(int fd, int cmd, va_list ap)
                        }
                }
                break;
                        }
                }
                break;
-#if !(_LARGEFILE64_SOURCE || F_GETLK64 == F_GETLK)
+#if !(defined(_LARGEFILE64_SOURCE) || F_GETLK64 == F_GETLK)
            case F_GETLK:
            case F_SETLK:
            case F_SETLKW:
                {
                        struct intnl_stat buf;
                        struct flock *fl;
            case F_GETLK:
            case F_SETLK:
            case F_SETLKW:
                {
                        struct intnl_stat buf;
                        struct flock *fl;
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
                        struct _SYSIO_FLOCK flock64;
 #endif
 
                        struct _SYSIO_FLOCK flock64;
 #endif
 
@@ -220,7 +220,7 @@ _sysio_vfcntl(int fd, int cmd, va_list ap)
                         * Copy args to a temp and normalize.
                         */
                        fl = va_arg(ap, struct flock *);
                         * Copy args to a temp and normalize.
                         */
                        fl = va_arg(ap, struct flock *);
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
                        flock64.l_type = fl->l_type;
                        flock64.l_whence = fl->l_whence;
                        flock64.l_start = fl->l_start;
                        flock64.l_type = fl->l_type;
                        flock64.l_whence = fl->l_whence;
                        flock64.l_start = fl->l_start;
@@ -234,7 +234,7 @@ _sysio_vfcntl(int fd, int cmd, va_list ap)
                                rtn = -1;
                                break;
                        }
                                rtn = -1;
                                break;
                        }
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
                        /*
                         * Copy back. Note that the fcntl_lock call
                         * should have ensured that no overflow was possible.
                        /*
                         * Copy back. Note that the fcntl_lock call
                         * should have ensured that no overflow was possible.
@@ -251,7 +251,7 @@ _sysio_vfcntl(int fd, int cmd, va_list ap)
                }
                break;
 #endif /* !(_LARGEFILE64_SOURCE || F_GETLK64 == F_GETLK) */
                }
                break;
 #endif /* !(_LARGEFILE64_SOURCE || F_GETLK64 == F_GETLK) */
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
            case F_GETLK64:
            case F_SETLK64:
            case F_SETLKW64:
            case F_GETLK64:
            case F_SETLK64:
            case F_SETLKW64:
index fbd91d8..9ed054e 100644 (file)
@@ -149,7 +149,7 @@ fd_grow(size_t n)
        return 0;
 }
 
        return 0;
 }
 
-#if ZERO_SUM_MEMORY
+#ifdef ZERO_SUM_MEMORY
 void
 _sysio_fd_shutdown()
 {
 void
 _sysio_fd_shutdown()
 {
index c09a97d..2eb6105 100644 (file)
@@ -188,7 +188,7 @@ fd_grow(oftab_t *oftab, size_t n)
        return 0;
 }
 
        return 0;
 }
 
-#if ZERO_SUM_MEMORY
+#ifdef ZERO_SUM_MEMORY
 static void free_oftab(oftab_t *ot)
 {
        if (ot->table) {
 static void free_oftab(oftab_t *ot)
 {
        if (ot->table) {
index 579ae01..0c9bd52 100644 (file)
@@ -106,7 +106,7 @@ _sysio_fssw_register(const char *name, struct fssw_ops *ops)
        return 0;
 }
 
        return 0;
 }
 
-#if ZERO_SUM_MEMORY
+#ifdef ZERO_SUM_MEMORY
 /*
  * Shutdown
  */
 /*
  * Shutdown
  */
index 70a1a28..151829d 100644 (file)
@@ -106,7 +106,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(getdirentries64))(int fd,
        SYSIO_INTERFACE_RETURN(cc < 0 ? -1 : cc, cc < 0 ? (int )cc : 0);
 }
 
        SYSIO_INTERFACE_RETURN(cc < 0 ? -1 : cc, cc < 0 ? (int )cc : 0);
 }
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #undef getdirentries64
 sysio_sym_strong_alias(PREPEND(_, SYSIO_INTERFACE_NAME(getdirentries64)),
                       SYSIO_INTERFACE_NAME(getdirentries64))
 #undef getdirentries64
 sysio_sym_strong_alias(PREPEND(_, SYSIO_INTERFACE_NAME(getdirentries64)),
                       SYSIO_INTERFACE_NAME(getdirentries64))
index c82d601..470b5c2 100644 (file)
 #define _BSD_SOURCE
 #endif
 
 #define _BSD_SOURCE
 #endif
 
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
 #include <stdio.h>
 #endif
 #include <stdlib.h>
 #include <stdio.h>
 #endif
 #include <stdlib.h>
-#ifdef _BSD_SOURCE
+#if defined(_BSD_SOURCE) || defined(SYSIO_TRACING)
 #include <sys/syscall.h>
 #endif
 #include <unistd.h>
 #include <string.h>
 #include <errno.h>
 #include <sys/syscall.h>
 #endif
 #include <unistd.h>
 #include <string.h>
 #include <errno.h>
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
 #include <stdarg.h>
 #endif
 #include <limits.h>
 #include <stdarg.h>
 #endif
 #include <limits.h>
@@ -68,7 +68,7 @@
 
 #include "sysio.h"
 #include "xtio.h"
 
 #include "sysio.h"
 #include "xtio.h"
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
 #include "native.h"
 #endif
 #include "inode.h"
 #include "native.h"
 #endif
 #include "inode.h"
@@ -81,7 +81,7 @@
 #include "stdfd.h"
 #endif
 
 #include "stdfd.h"
 #endif
 
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
 
 /*
  * Tracing callback record.
 
 /*
  * Tracing callback record.
@@ -160,7 +160,7 @@ _sysio_init()
        extern int _sysio_sockets_init(void);
 #endif
 
        extern int _sysio_sockets_init(void);
 #endif
 
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
        /*
         * Initialize tracing callback queues.
         */
        /*
         * Initialize tracing callback queues.
         */
@@ -214,12 +214,12 @@ _sysio_shutdown()
              _sysio_unmount_all() == 0))
                        abort();
 
              _sysio_unmount_all() == 0))
                        abort();
 
-#if ZERO_SUM_MEMORY
+#ifdef ZERO_SUM_MEMORY
        _sysio_fd_shutdown();
        _sysio_i_shutdown();
        _sysio_fssw_shutdown();
        _sysio_access_shutdown();
        _sysio_fd_shutdown();
        _sysio_i_shutdown();
        _sysio_fssw_shutdown();
        _sysio_access_shutdown();
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
        {
                struct trace_callback *tcb;
 
        {
                struct trace_callback *tcb;
 
@@ -235,7 +235,7 @@ _sysio_shutdown()
 #endif
 }
 
 #endif
 }
 
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
 
 #if !(defined(_HAVE_ASPRINTF) && _HAVE_ASPRINTF)
 /*
 
 #if !(defined(_HAVE_ASPRINTF) && _HAVE_ASPRINTF)
 /*
@@ -929,7 +929,7 @@ do_command(char *buf)
        return -EINVAL;
 }
 
        return -EINVAL;
 }
 
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
 /*
  * Set/Unset tracing.
  */
 /*
  * Set/Unset tracing.
  */
@@ -1040,7 +1040,7 @@ _sysio_boot_namespace(const char *arg)
                if (err)
                        break;
        }
                if (err)
                        break;
        }
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
        if (err)
                _sysio_cprintf("+NS init+ failed at expr %u (last = %s): %s\n", 
                               count,
        if (err)
                _sysio_cprintf("+NS init+ failed at expr %u (last = %s): %s\n", 
                               count,
@@ -1051,7 +1051,7 @@ _sysio_boot_namespace(const char *arg)
        return err;
 }
 
        return err;
 }
 
-#if DEFER_INIT_CWD
+#ifdef DEFER_INIT_CWD
 /*
  * Set deferred initial working directory.
  */
 /*
  * Set deferred initial working directory.
  */
@@ -1067,15 +1067,15 @@ _sysio_boot_cwd(const char *arg)
 /*
  * Given an identifier and it's arguments, perform optional initializations.
  */
 /*
  * Given an identifier and it's arguments, perform optional initializations.
  */
-int 
+int
 _sysio_boot(const char *opt, const char *arg)
 {
        struct option_value_info vec[] = {
 _sysio_boot(const char *opt, const char *arg)
 {
        struct option_value_info vec[] = {
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
                { "trace",      NULL },                 /* tracing? */
 #endif
                { "namespace",  NULL },                 /* init namespace? */
                { "trace",      NULL },                 /* tracing? */
 #endif
                { "namespace",  NULL },                 /* init namespace? */
-#if DEFER_INIT_CWD
+#ifdef DEFER_INIT_CWD
                { "cwd",        NULL },                 /* init working dir */
 #endif
                { NULL,         NULL }
                { "cwd",        NULL },                 /* init working dir */
 #endif
                { NULL,         NULL }
@@ -1083,11 +1083,11 @@ _sysio_boot(const char *opt, const char *arg)
        struct option_value_info *v;
        unsigned u;
        static int (*f[])(const char *) = {
        struct option_value_info *v;
        unsigned u;
        static int (*f[])(const char *) = {
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
                _sysio_boot_tracing,
 #endif
                _sysio_boot_namespace,
                _sysio_boot_tracing,
 #endif
                _sysio_boot_namespace,
-#if DEFER_INIT_CWD
+#ifdef DEFER_INIT_CWD
                _sysio_boot_cwd,
 #endif
                NULL                                    /* can't happen */
                _sysio_boot_cwd,
 #endif
                NULL                                    /* can't happen */
index 8ab6236..fbe027d 100644 (file)
@@ -101,7 +101,7 @@ static size_t max_names = (2 * NAMES_TABLE_LEN);
  */
 #define PNODES_PER_CHUNK ((8 * 1024) / sizeof(struct pnode) - 2)
 
  */
 #define PNODES_PER_CHUNK ((8 * 1024) / sizeof(struct pnode) - 2)
 
-#if ZERO_SUM_MEMORY
+#ifdef ZERO_SUM_MEMORY
 /*
  * Allocation information for pnodes bulk allocation.
  */
 /*
  * Allocation information for pnodes bulk allocation.
  */
@@ -142,7 +142,7 @@ _sysio_i_init()
        for (i = 0; i < NAMES_TABLE_LEN; i++)
                LIST_INIT(&names[i]);
 
        for (i = 0; i < NAMES_TABLE_LEN; i++)
                LIST_INIT(&names[i]);
 
-#if ZERO_SUM_MEMORY
+#ifdef ZERO_SUM_MEMORY
        LIST_INIT(&pnblocks);
 #endif
        TAILQ_INIT(&_sysio_pnodes);
        LIST_INIT(&pnblocks);
 #endif
        TAILQ_INIT(&_sysio_pnodes);
@@ -465,12 +465,12 @@ static void
 more_pnodes()
 {
        size_t  n;
 more_pnodes()
 {
        size_t  n;
-#if ZERO_SUM_MEMORY
+#ifdef ZERO_SUM_MEMORY
        struct pnodes_block *pnblk;
 #endif
        struct pnode *pno;
 
        struct pnodes_block *pnblk;
 #endif
        struct pnode *pno;
 
-#if ZERO_SUM_MEMORY
+#ifdef ZERO_SUM_MEMORY
        pnblk = malloc(sizeof(struct pnodes_block));
        pno = NULL;
        if (pnblk) {
        pnblk = malloc(sizeof(struct pnodes_block));
        pno = NULL;
        if (pnblk) {
@@ -489,7 +489,7 @@ more_pnodes()
        } while (--n);
 }
 
        } while (--n);
 }
 
-#if ZERO_SUM_MEMORY
+#ifdef ZERO_SUM_MEMORY
 /*
  * Shutdown
  */
 /*
  * Shutdown
  */
index 687071b..91d865d 100644 (file)
@@ -121,7 +121,7 @@ _sysio_lseek(struct file *fil,
        return pos;
 }
 
        return pos;
 }
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #undef lseek64
 
 extern off64_t
 #undef lseek64
 
 extern off64_t
@@ -200,7 +200,7 @@ SYSIO_INTERFACE_NAME(llseek)(unsigned int fd __IS_UNUSED,
        fil = _sysio_fd_find(fd);
        if (!fil)
                SYSIO_INTERFACE_RETURN(-1, -EBADF);
        fil = _sysio_fd_find(fd);
        if (!fil)
                SYSIO_INTERFACE_RETURN(-1, -EBADF);
-#if !_LARGEFILE64_SOURCE
+#ifndef _LARGEFILE64_SOURCE
        if (offset_high) {
                /*
                 * We are using 32-bit internals. This just isn't
        if (offset_high) {
                /*
                 * We are using 32-bit internals. This just isn't
index 9e8f9ea..6fed655 100644 (file)
@@ -277,7 +277,7 @@ _sysio_mount_root(const char *source,
                return err;
 
        _sysio_root = mnt->mnt_root;
                return err;
 
        _sysio_root = mnt->mnt_root;
-#if !DEFER_INIT_CWD
+#ifndef DEFER_INIT_CWD
        /*
         * It is very annoying to have to set the current working directory.
         * So... If it isn't set, make it the root now.
        /*
         * It is very annoying to have to set the current working directory.
         * So... If it isn't set, make it the root now.
index e339f04..7f8c1e4 100644 (file)
@@ -186,7 +186,7 @@ _sysio_path_walk(struct pnode *parent, struct nameidata *nd)
                parent = nd->nd_root;
        }
 
                parent = nd->nd_root;
        }
 
-#if DEFER_INIT_CWD
+#ifdef DEFER_INIT_CWD
        if (!parent) {
                const char *icwd;
 
        if (!parent) {
                const char *icwd;
 
index 328f076..300f073 100644 (file)
@@ -118,7 +118,7 @@ _sysio_iiox(int (*f)(struct inode *, struct ioctx *),
        cc =
            _sysio_validx(xtv, xtv_count,
                          iov, iov_count,
        cc =
            _sysio_validx(xtv, xtv_count,
                          iov, iov_count,
-#if _LARGEFILE64_SOURCE && defined(O_LARGEFILE)
+#if defined(_LARGEFILE64_SOURCE) && defined(O_LARGEFILE)
                          (fil->f_flags & O_LARGEFILE) == 0
                            ? LONG_MAX
                            :
                          (fil->f_flags & O_LARGEFILE) == 0
                            ? LONG_MAX
                            :
@@ -465,7 +465,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(ipreadv))(int fd,
        SYSIO_INTERFACE_RETURN(ioctx, 0);
 }
 
        SYSIO_INTERFACE_RETURN(ioctx, 0);
 }
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #undef ipread64v
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(ipreadv)),
                     SYSIO_INTERFACE_NAME(ipread64v))
 #undef ipread64v
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(ipreadv)),
                     SYSIO_INTERFACE_NAME(ipread64v))
@@ -515,7 +515,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(preadv))(int fd,
        SYSIO_INTERFACE_RETURN(err ? -1 : cc, err);
 }
 
        SYSIO_INTERFACE_RETURN(err ? -1 : cc, err);
 }
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #undef pread64v
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(preadv)), 
                     SYSIO_INTERFACE_NAME(pread64v))
 #undef pread64v
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(preadv)), 
                     SYSIO_INTERFACE_NAME(pread64v))
@@ -579,7 +579,7 @@ error:
        SYSIO_INTERFACE_RETURN(ioctx, 0);
 }
 
        SYSIO_INTERFACE_RETURN(ioctx, 0);
 }
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #undef ipread64
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(ipread)),
                     SYSIO_INTERFACE_NAME(ipread64))
 #undef ipread64
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(ipread)),
                     SYSIO_INTERFACE_NAME(ipread64))
@@ -633,7 +633,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(pread))(int fd,
        SYSIO_INTERFACE_RETURN(err ? -1 : cc, err);
 }
 
        SYSIO_INTERFACE_RETURN(err ? -1 : cc, err);
 }
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #undef pread64
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(pread)),
                     SYSIO_INTERFACE_NAME(pread64))
 #undef pread64
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(pread)),
                     SYSIO_INTERFACE_NAME(pread64))
@@ -698,13 +698,13 @@ PREPEND(_, SYSIO_INTERFACE_NAME(ireadx))(int fd,
        SYSIO_INTERFACE_RETURN(err ? IOID_FAIL : ioctx, err);
 }
 
        SYSIO_INTERFACE_RETURN(err ? IOID_FAIL : ioctx, err);
 }
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #undef iread64x
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(ireadx)),
                     SYSIO_INTERFACE_NAME(iread64x))
 #endif
 
 #undef iread64x
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(ireadx)),
                     SYSIO_INTERFACE_NAME(iread64x))
 #endif
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 ioid_t
 SYSIO_INTERFACE_NAME(ireadx)(int fd,
                             const struct iovec *iov, size_t iov_count,
 ioid_t
 SYSIO_INTERFACE_NAME(ireadx)(int fd,
                             const struct iovec *iov, size_t iov_count,
@@ -774,7 +774,7 @@ SYSIO_INTERFACE_NAME(readx)(int fd,
        return SYSIO_INTERFACE_NAME(iowait)(ioid);
 }
 
        return SYSIO_INTERFACE_NAME(iowait)(ioid);
 }
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #undef iread64x
 ssize_t
 SYSIO_INTERFACE_NAME(read64x)(int fd,
 #undef iread64x
 ssize_t
 SYSIO_INTERFACE_NAME(read64x)(int fd,
@@ -993,7 +993,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(ipwritev))(int fd,
        SYSIO_INTERFACE_RETURN(ioctx, 0);
 }
 
        SYSIO_INTERFACE_RETURN(ioctx, 0);
 }
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #undef ipwrite64v
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(ipwritev)),
                     SYSIO_INTERFACE_NAME(ipwrite64v))
 #undef ipwrite64v
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(ipwritev)),
                     SYSIO_INTERFACE_NAME(ipwrite64v))
@@ -1043,7 +1043,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(pwritev))(int fd,
        SYSIO_INTERFACE_RETURN(err ? -1 : cc, err);
 }
 
        SYSIO_INTERFACE_RETURN(err ? -1 : cc, err);
 }
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #undef pwrite64v
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(pwritev)),
                     SYSIO_INTERFACE_NAME(pwrite64v))
 #undef pwrite64v
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(pwritev)),
                     SYSIO_INTERFACE_NAME(pwrite64v))
@@ -1107,7 +1107,7 @@ error:
        SYSIO_INTERFACE_RETURN(ioctx, 0);
 }
 
        SYSIO_INTERFACE_RETURN(ioctx, 0);
 }
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #undef ipwrite64
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(ipwrite)),
                     SYSIO_INTERFACE_NAME(ipwrite64))
 #undef ipwrite64
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(ipwrite)),
                     SYSIO_INTERFACE_NAME(ipwrite64))
@@ -1161,7 +1161,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(pwrite))(int fd,
        SYSIO_INTERFACE_RETURN(err ? -1 : cc, err);
 }
 
        SYSIO_INTERFACE_RETURN(err ? -1 : cc, err);
 }
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #undef pwrite64
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(pwrite)),
                     SYSIO_INTERFACE_NAME(pwrite64))
 #undef pwrite64
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(pwrite)),
                     SYSIO_INTERFACE_NAME(pwrite64))
@@ -1222,13 +1222,13 @@ PREPEND(_, SYSIO_INTERFACE_NAME(iwritex))(int fd,
        SYSIO_INTERFACE_RETURN(err ? IOID_FAIL : ioctx, err);
 }
 
        SYSIO_INTERFACE_RETURN(err ? IOID_FAIL : ioctx, err);
 }
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #undef iwrite64x
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(iwritex)),
                     SYSIO_INTERFACE_NAME(iwrite64x))
 #endif
 
 #undef iwrite64x
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(iwritex)),
                     SYSIO_INTERFACE_NAME(iwrite64x))
 #endif
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 ioid_t
 SYSIO_INTERFACE_NAME(iwritex)(int fd,
                              const struct iovec *iov, size_t iov_count,
 ioid_t
 SYSIO_INTERFACE_NAME(iwritex)(int fd,
                              const struct iovec *iov, size_t iov_count,
@@ -1299,7 +1299,7 @@ SYSIO_INTERFACE_NAME(writex)(int fd,
        return SYSIO_INTERFACE_NAME(iowait)(ioid);
 }
 
        return SYSIO_INTERFACE_NAME(iowait)(ioid);
 }
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #undef write64x
 ssize_t
 SYSIO_INTERFACE_NAME(write64x)(int fd,
 #undef write64x
 ssize_t
 SYSIO_INTERFACE_NAME(write64x)(int fd,
index 44a4b88..607924a 100644 (file)
@@ -68,7 +68,7 @@
 #define _STAT_VER              0
 #endif
 
 #define _STAT_VER              0
 #endif
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 static void
 convstat(struct stat64 *st64_buf, struct stat *st_buf)
 {
 static void
 convstat(struct stat64 *st64_buf, struct stat *st_buf)
 {
@@ -97,7 +97,7 @@ PREPEND(__, SYSIO_INTERFACE_NAME(fxstat))(int __ver,
        struct file *fil;
        int     err;
        struct intnl_stat *buf;
        struct file *fil;
        int     err;
        struct intnl_stat *buf;
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
        struct stat64 st64;
 #endif
        SYSIO_INTERFACE_DISPLAY_BLOCK;
        struct stat64 st64;
 #endif
        SYSIO_INTERFACE_DISPLAY_BLOCK;
@@ -114,7 +114,7 @@ PREPEND(__, SYSIO_INTERFACE_NAME(fxstat))(int __ver,
                err = -EBADF;
                goto out;
        }
                err = -EBADF;
                goto out;
        }
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
        buf = &st64;
 #else
        buf = __stat_buf;
        buf = &st64;
 #else
        buf = __stat_buf;
@@ -125,7 +125,7 @@ PREPEND(__, SYSIO_INTERFACE_NAME(fxstat))(int __ver,
         */
        err =
            fil->f_ino->i_ops.inop_getattr(NULL, fil->f_ino, buf);
         */
        err =
            fil->f_ino->i_ops.inop_getattr(NULL, fil->f_ino, buf);
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
        if (!err)
                convstat(buf, __stat_buf);
 #endif
        if (!err)
                convstat(buf, __stat_buf);
 #endif
@@ -186,7 +186,7 @@ PREPEND(__, SYSIO_INTERFACE_NAME(xstat))(int __ver,
         * the inode are always correct or refresh them in the lookup, above.
         */
        ino = pno->p_base->pb_ino;
         * the inode are always correct or refresh them in the lookup, above.
         */
        ino = pno->p_base->pb_ino;
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
        convstat(&ino->i_stbuf, __stat_buf);
 #else
        (void )memcpy(__stat_buf, &ino->i_stbuf, sizeof(struct intnl_stat));
        convstat(&ino->i_stbuf, __stat_buf);
 #else
        (void )memcpy(__stat_buf, &ino->i_stbuf, sizeof(struct intnl_stat));
@@ -250,7 +250,7 @@ PREPEND(__, SYSIO_INTERFACE_NAME(lxstat))(int __ver,
         * the inode are always correct or refresh them in the lookup, above.
         */
        ino = pno->p_base->pb_ino;
         * the inode are always correct or refresh them in the lookup, above.
         */
        ino = pno->p_base->pb_ino;
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
        convstat(&ino->i_stbuf, __stat_buf);
 #else
        (void )memcpy(__stat_buf, &ino->i_stbuf, sizeof(struct intnl_stat));
        convstat(&ino->i_stbuf, __stat_buf);
 #else
        (void )memcpy(__stat_buf, &ino->i_stbuf, sizeof(struct intnl_stat));
index 5846ad3..27ef6b6 100644 (file)
@@ -104,7 +104,7 @@ out:
        SYSIO_INTERFACE_RETURN(err ? -1 : 0, err);
 }
 
        SYSIO_INTERFACE_RETURN(err ? -1 : 0, err);
 }
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #undef truncate64
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(truncate)),
                     SYSIO_INTERFACE_NAME(truncate64))
 #undef truncate64
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(truncate)),
                     SYSIO_INTERFACE_NAME(truncate64))
@@ -145,7 +145,7 @@ out:
        SYSIO_INTERFACE_RETURN(err ? -1 : 0, err);
 }
 
        SYSIO_INTERFACE_RETURN(err ? -1 : 0, err);
 }
 
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
 #undef ftruncate64
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(ftruncate)), 
                     SYSIO_INTERFACE_NAME(ftruncate64))
 #undef ftruncate64
 sysio_sym_weak_alias(PREPEND(_, SYSIO_INTERFACE_NAME(ftruncate)), 
                     SYSIO_INTERFACE_NAME(ftruncate64))
index 764fa05..033b325 100644 (file)
@@ -21,7 +21,7 @@ _test_sysio_startup()
        err = drv_init_all();
        if (err)
                return err;
        err = drv_init_all();
        if (err)
                return err;
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
        /*
         * tracing
         */
        /*
         * tracing
         */
@@ -43,7 +43,7 @@ _test_sysio_startup()
        err = _sysio_boot("namespace", arg);
        if (err)
                return err;
        err = _sysio_boot("namespace", arg);
        if (err)
                return err;
-#if DEFER_INIT_CWD
+#ifdef DEFER_INIT_CWD
        /*
         * Current working directory.
         */
        /*
         * Current working directory.
         */