Clean up libsysio compiler warnings on XT3.
b=12332
i=adilger
i=walter
assert(*offset >= 0);
off = *offset;
-#if _LARGEFILE64_SOURCE && defined(SYSIO_SYS__llseek)
+#if defined(_LARGEFILE64_SOURCE) && defined(SYSIO_SYS__llseek)
{
int err;
err =
#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
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,
/*
* 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
-#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
-#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
-#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
#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
#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
-#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
-#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
#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_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
-#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 __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.
*/
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
#define _SYSIO_OFF_T off64_t
#ifdef LLONG_MAX
#define _SYSIO_OFF_T_MAX (LLONG_MAX)
* 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
* 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
* 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
struct stat;
#ifdef _HAVE_STATVFS
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
#define intnl_statvfs statvfs64
#else
#define intnl_statvfs statvfs
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);
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
extern off64_t SYSIO_INTERFACE_NAME(lseek64)(int fd, off64_t offset,
int whence);
#endif
#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,
#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);
-#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);
-#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);
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);
-#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);
-#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);
-#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);
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.
*/
size_t count,
off_t offset);
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
/*
* Post asynch read into buffer from file at given 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.
*/
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.
*/
size_t count,
off_t offset);
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
/*
* Post asynch write from buffer to file at given 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.
*/
#include "file.h"
#include "sysio-symbols.h"
-#if DEFER_INIT_CWD
+#ifdef DEFER_INIT_CWD
const char *_sysio_init_cwd = NULL;
#endif
SYSIO_INTERFACE_DISPLAY_BLOCK;
SYSIO_INTERFACE_ENTER;
-#if DEFER_INIT_CWD
+#ifdef DEFER_INIT_CWD
if (!_sysio_cwd) {
struct pnode *pno;
}
}
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;
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
struct _SYSIO_FLOCK flock64;
#endif
* 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;
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.
}
break;
#endif /* !(_LARGEFILE64_SOURCE || F_GETLK64 == F_GETLK) */
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
case F_GETLK64:
case F_SETLK64:
case F_SETLKW64:
return 0;
}
-#if ZERO_SUM_MEMORY
+#ifdef ZERO_SUM_MEMORY
void
_sysio_fd_shutdown()
{
return 0;
}
-#if ZERO_SUM_MEMORY
+#ifdef ZERO_SUM_MEMORY
static void free_oftab(oftab_t *ot)
{
if (ot->table) {
return 0;
}
-#if ZERO_SUM_MEMORY
+#ifdef ZERO_SUM_MEMORY
/*
* Shutdown
*/
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))
#define _BSD_SOURCE
#endif
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
#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>
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
#include <stdarg.h>
#endif
#include <limits.h>
#include "sysio.h"
#include "xtio.h"
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
#include "native.h"
#endif
#include "inode.h"
#include "stdfd.h"
#endif
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
/*
* Tracing callback record.
extern int _sysio_sockets_init(void);
#endif
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
/*
* Initialize tracing callback queues.
*/
_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();
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
{
struct trace_callback *tcb;
#endif
}
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
#if !(defined(_HAVE_ASPRINTF) && _HAVE_ASPRINTF)
/*
return -EINVAL;
}
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
/*
* Set/Unset tracing.
*/
if (err)
break;
}
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
if (err)
_sysio_cprintf("+NS init+ failed at expr %u (last = %s): %s\n",
count,
return err;
}
-#if DEFER_INIT_CWD
+#ifdef DEFER_INIT_CWD
/*
* Set deferred initial working directory.
*/
/*
* 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[] = {
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
{ "trace", NULL }, /* tracing? */
#endif
{ "namespace", NULL }, /* init namespace? */
-#if DEFER_INIT_CWD
+#ifdef DEFER_INIT_CWD
{ "cwd", NULL }, /* init working dir */
#endif
{ NULL, NULL }
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,
-#if DEFER_INIT_CWD
+#ifdef DEFER_INIT_CWD
_sysio_boot_cwd,
#endif
NULL /* can't happen */
*/
#define PNODES_PER_CHUNK ((8 * 1024) / sizeof(struct pnode) - 2)
-#if ZERO_SUM_MEMORY
+#ifdef ZERO_SUM_MEMORY
/*
* Allocation information for pnodes bulk allocation.
*/
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);
more_pnodes()
{
size_t n;
-#if ZERO_SUM_MEMORY
+#ifdef ZERO_SUM_MEMORY
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) {
} while (--n);
}
-#if ZERO_SUM_MEMORY
+#ifdef ZERO_SUM_MEMORY
/*
* Shutdown
*/
return pos;
}
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
#undef lseek64
extern off64_t
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
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.
parent = nd->nd_root;
}
-#if DEFER_INIT_CWD
+#ifdef DEFER_INIT_CWD
if (!parent) {
const char *icwd;
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
:
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))
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))
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))
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))
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
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
ioid_t
SYSIO_INTERFACE_NAME(ireadx)(int fd,
const struct iovec *iov, size_t iov_count,
return SYSIO_INTERFACE_NAME(iowait)(ioid);
}
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
#undef iread64x
ssize_t
SYSIO_INTERFACE_NAME(read64x)(int fd,
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))
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))
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))
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))
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
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
ioid_t
SYSIO_INTERFACE_NAME(iwritex)(int fd,
const struct iovec *iov, size_t iov_count,
return SYSIO_INTERFACE_NAME(iowait)(ioid);
}
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
#undef write64x
ssize_t
SYSIO_INTERFACE_NAME(write64x)(int fd,
#define _STAT_VER 0
#endif
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
static void
convstat(struct stat64 *st64_buf, struct stat *st_buf)
{
struct file *fil;
int err;
struct intnl_stat *buf;
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
struct stat64 st64;
#endif
SYSIO_INTERFACE_DISPLAY_BLOCK;
err = -EBADF;
goto out;
}
-#if _LARGEFILE64_SOURCE
+#ifdef _LARGEFILE64_SOURCE
buf = &st64;
#else
buf = __stat_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
* 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));
* 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));
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))
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))
err = drv_init_all();
if (err)
return err;
-#if SYSIO_TRACING
+#ifdef SYSIO_TRACING
/*
* tracing
*/
err = _sysio_boot("namespace", arg);
if (err)
return err;
-#if DEFER_INIT_CWD
+#ifdef DEFER_INIT_CWD
/*
* Current working directory.
*/