[Libsysio-commit] HEAD: libsysio/include file.h fs.h inode.h native.h sysio-cmn.h sysio.h xtio.h
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2007-05-01 16:34:00
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24463/include Modified Files: file.h fs.h inode.h native.h sysio-cmn.h sysio.h xtio.h Log Message: The `C' preprocessor tests now look for definition of a symbol rather than a value. This enables some builds I'm told. Index: file.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/file.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -w -b -B -p -r1.18 -r1.19 --- file.h 30 Apr 2007 16:52:20 -0000 1.18 +++ file.h 1 May 2007 16:33:52 -0000 1.19 @@ -61,7 +61,7 @@ #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 @@ -137,7 +137,7 @@ extern struct file *_sysio_fd_find(int f 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, Index: fs.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/fs.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -b -B -p -r1.6 -r1.7 --- fs.h 30 Apr 2007 23:24:12 -0000 1.6 +++ fs.h 1 May 2007 16:33:52 -0000 1.7 @@ -167,6 +167,6 @@ extern struct filesys * _sysio_fs_new(st unsigned mask, void *private); extern void _sysio_fs_gone(struct filesys *fs); -#if ZERO_SUM_MEMORY +#ifdef ZERO_SUM_MEMORY extern void _sysio_fssw_shutdown(void); #endif Index: inode.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -w -b -B -p -r1.29 -r1.30 --- inode.h 30 Apr 2007 23:24:13 -0000 1.29 +++ inode.h 1 May 2007 16:33:52 -0000 1.30 @@ -479,7 +479,7 @@ extern TAILQ_HEAD(inodes_head, inode) _s extern TAILQ_HEAD(pnodes_head, pnode) _sysio_pnodes; extern int _sysio_i_init(void); -#if ZERO_SUM_MEMORY +#ifdef ZERO_SUM_MEMORY extern void _sysio_i_shutdown(void); #endif extern struct inode *_sysio_i_new(struct filesys *fs, Index: native.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/native.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -b -B -p -r1.3 -r1.4 --- native.h 30 Apr 2007 23:24:13 -0000 1.3 +++ native.h 1 May 2007 16:33:52 -0000 1.4 @@ -45,7 +45,7 @@ * Native file system support. */ -#if ALPHA_LINUX +#ifdef ALPHA_LINUX /* * stat struct from asm/stat.h, as returned @@ -97,22 +97,22 @@ do { /* * 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 @@ -123,7 +123,7 @@ do { #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 @@ -143,17 +143,17 @@ do { #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 @@ -161,7 +161,7 @@ do { #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 @@ -188,13 +188,13 @@ do { #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) #define SYSIO_SYS_getdents SYS_getdents @@ -220,7 +220,7 @@ do { #if defined(SYS_utime) #define SYSIO_SYS_utime SYS_utime #endif -#if _LARGEFILE64_SOURCE && defined(SYS_statfs64) +#if defined(_LARGEFILE64_SOURCE) && defined(SYS_statfs64) #define SYSIO_SYS_statfs SYS_statfs64 #define SYSIO_SYS_fstatfs SYS_fstatfs64 #elif defined(SYS_statfs) Index: sysio-cmn.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/sysio-cmn.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -w -b -B -p -r1.14 -r1.15 --- sysio-cmn.h 30 Apr 2007 23:24:13 -0000 1.14 +++ sysio-cmn.h 1 May 2007 16:33:52 -0000 1.15 @@ -51,17 +51,10 @@ #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) @@ -80,7 +73,7 @@ * 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 @@ -153,7 +146,7 @@ struct iovec; } while(0) /* Interface enter/leave hook functions */ -#if SYSIO_TRACING +#ifdef SYSIO_TRACING #define _SYSIO_TTAG(name) \ PREPEND(_SYSIO_TRACING_, name) Index: sysio.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/sysio.h,v retrieving revision 1.40 retrieving revision 1.41 diff -u -w -b -B -p -r1.40 -r1.41 --- sysio.h 30 Apr 2007 23:24:13 -0000 1.40 +++ sysio.h 1 May 2007 16:33:52 -0000 1.41 @@ -55,9 +55,7 @@ /* * Need directory access routines too. */ -#define _DECLARE_DIR_ACCESS 1 -#else -#define _DECLARE_DIR_ACCESS 0 +#define _DECLARE_DIR_ACCESS #endif #ifndef PATH_SEPARATOR @@ -78,7 +76,7 @@ * 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 @@ -89,14 +87,14 @@ struct 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 #endif struct stat; -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE #define intnl_statvfs statvfs64 #else #define intnl_statvfs statvfs @@ -110,7 +108,7 @@ struct intnl_statvfs; struct pnode; -#if DEFER_INIT_CWD +#ifdef DEFER_INIT_CWD extern const char *_sysio_init_cwd; #endif @@ -152,7 +150,7 @@ extern char * _sysio_get_args(char *buf, extern time_t _sysio_local_time(void); -#if SYSIO_TRACING +#ifdef SYSIO_TRACING extern void _sysio_cprintf(const char *fmt, ...); #endif @@ -174,14 +172,14 @@ extern int SYSIO_INTERFACE_NAME(dup2)(in 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 @@ -192,7 +190,7 @@ extern int SYSIO_INTERFACE_NAME(getdiren #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, @@ -201,15 +199,15 @@ extern ssize_t SYSIO_INTERFACE_NAME(getd #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); @@ -229,20 +227,20 @@ extern ssize_t SYSIO_INTERFACE_NAME(writ const struct iovec *iov, int count); 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 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); @@ -270,7 +268,7 @@ extern int SYSIO_INTERFACE_NAME(mount)(c unsigned long mountflags, const void *data); extern int SYSIO_INTERFACE_NAME(umount)(const char *target); -#if _DECLARE_DIR_ACCESS +#ifdef _DECLARE_DIR_ACCESS extern DIR *SYSIO_INTERFACE_NAME(opendir)(const char *name); extern int SYSIO_INTERFACE_NAME(closedir)(DIR *dir); extern struct dirent *SYSIO_INTERFACE_NAME(readdir)(DIR *dir); Index: xtio.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/xtio.h,v retrieving revision 2.2 retrieving revision 2.3 diff -u -w -b -B -p -r2.2 -r2.3 --- xtio.h 25 Jan 2005 00:37:10 -0000 2.2 +++ xtio.h 1 May 2007 16:33:52 -0000 2.3 @@ -106,7 +106,7 @@ extern ioid_t SYSIO_INTERFACE_NAME(iprea 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 +124,7 @@ extern ioid_t SYSIO_INTERFACE_NAME(iprea size_t count, off_t offset); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE /* * Post asynch read into buffer from file at given offset. */ @@ -142,7 +142,7 @@ extern ssize_t SYSIO_INTERFACE_NAME(prea size_t count, off_t offset); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE /* * Read into buffers mapped by an iovec from file at given offset. */ @@ -225,7 +225,7 @@ extern ioid_t SYSIO_INTERFACE_NAME(ipwri 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 +243,7 @@ extern ioid_t SYSIO_INTERFACE_NAME(ipwri size_t count, off_t offset); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE /* * Post asynch write from buffer to file at given offset. */ @@ -261,7 +261,7 @@ extern ssize_t SYSIO_INTERFACE_NAME(pwri size_t count, off_t offset); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE /* * Write from buffers mapped by an iovec to file at given offset. */ |