[Libsysio-commit] RedStorm: libsysio/include dev.h file.h inode.h sysio.h
Brought to you by:
lward
|
From: Lee W. <lw...@us...> - 2003-05-12 11:48:48
|
Update of /cvsroot/libsysio/libsysio/include
In directory sc8-pr-cvs1:/tmp/cvs-serv27060/include
Modified Files:
Tag: RedStorm
dev.h file.h inode.h sysio.h
Log Message:
Modifications for the Cray RedStorm compute node operating system. This is
a BSD-based libc.
Index: dev.h
===================================================================
RCS file: /cvsroot/libsysio/libsysio/include/dev.h,v
retrieving revision 1.2
retrieving revision 1.2.6.1
diff -u -w -b -B -p -r1.2 -r1.2.6.1
--- dev.h 24 Mar 2003 22:09:04 -0000 1.2
+++ dev.h 12 May 2003 11:48:45 -0000 1.2.6.1
@@ -84,7 +84,7 @@ extern const struct inode_ops _sysio_nod
(ssize_t (*)(struct inode *, \
char *, \
size_t , \
- off64_t *))_sysio_dev_e_notdir
+ _SYSIO_OFF_T *))_sysio_dev_e_notdir
#define _sysio_nodev_inop_mkdir \
(int (*)(struct pnode *, \
mode_t))_sysio_dev_e_notdir
@@ -131,10 +131,12 @@ extern const struct inode_ops _sysio_nod
(int (*)(struct pnode *, \
mode_t, \
dev_t))_sysio_dev_e_notdir
+#ifdef _HAVE_STATVFS
#define _sysio_nodev_inop_statvfs \
(int (*)(struct pnode *, \
struct inode *, \
struct intnl_statvfs *))_sysio_dev_e_inval
+#endif
#define _sysio_nodev_inop_gone \
(void (*)(struct inode *ino))_sysio_dev_noop
Index: file.h
===================================================================
RCS file: /cvsroot/libsysio/libsysio/include/file.h,v
retrieving revision 1.5
retrieving revision 1.5.6.1
diff -u -w -b -B -p -r1.5 -r1.5.6.1
--- file.h 24 Mar 2003 22:09:05 -0000 1.5
+++ file.h 12 May 2003 11:48:45 -0000 1.5.6.1
@@ -52,7 +52,7 @@
*/
struct file {
struct inode *f_ino; /* path node */
- off64_t f_pos; /* current stream pos */
+ _SYSIO_OFF_T f_pos; /* current stream pos */
unsigned f_ref; /* ref count */
int f_flags; /* open/fcntl flags */
};
Index: inode.h
===================================================================
RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v
retrieving revision 1.6
retrieving revision 1.6.4.1
diff -u -w -b -B -p -r1.6 -r1.6.4.1
--- inode.h 23 Apr 2003 19:45:51 -0000 1.6
+++ inode.h 12 May 2003 11:48:45 -0000 1.6.4.1
@@ -63,7 +63,9 @@ struct inode;
struct intent;
struct intnl_dirent;
struct intnl_stat;
+#ifdef _HAVE_STATVFS
struct intnl_statvfs;
+#endif
struct io_arguments;
struct ioctx;
@@ -87,7 +89,7 @@ struct inode_ops {
ssize_t (*inop_getdirentries)(struct inode *ino,
char *buf,
size_t nbytes,
- off64_t *basep);
+ _SYSIO_OFF_T *basep);
int (*inop_mkdir)(struct pnode *pno, mode_t mode);
int (*inop_rmdir)(struct pnode *pno);
int (*inop_symlink)(struct pnode *pno, const char *data);
@@ -107,9 +109,11 @@ struct inode_ops {
int (*inop_datasync)(struct inode *ino);
int (*inop_ioctl)(struct inode *ino, unsigned long int request, va_list ap);
int (*inop_mknod)(struct pnode *pno, mode_t mode, dev_t dev);
+#ifdef _HAVE_STATVFS
int (*inop_statvfs)(struct pnode *pno,
struct inode *ino,
struct intnl_statvfs *buf);
+#endif
void (*inop_gone)(struct inode *ino);
};
@@ -343,7 +347,7 @@ struct nameidata {
struct io_arguments {
const struct iovec *ioarg_iovec; /* io vector */
size_t ioarg_iovlen; /* iovec length */
- off64_t ioarg_offset; /* beginning offset */
+ _SYSIO_OFF_T ioarg_offset; /* beginning offset */
void (*ioarg_completion)(void *); /* callback */
void *ioarg_completion_arg; /* callback data */
};
@@ -370,7 +374,7 @@ struct ioctx {
struct inode *ioctx_ino; /* i-node */
const struct iovec *ioctx_iovec; /* scatter/gather vec */
size_t ioctx_iovlen; /* iovec length */
- off64_t ioctx_offset; /* file offset */
+ _SYSIO_OFF_T ioctx_offset; /* file offset */
ssize_t ioctx_cc; /* rtn char count */
int ioctx_errno; /* error number */
void (*ioctx_cb)(void *); /* callback */
Index: sysio.h
===================================================================
RCS file: /cvsroot/libsysio/libsysio/include/sysio.h,v
retrieving revision 1.7
retrieving revision 1.7.6.1
diff -u -w -b -B -p -r1.7 -r1.7.6.1
--- sysio.h 26 Mar 2003 00:06:04 -0000 1.7
+++ sysio.h 12 May 2003 11:48:45 -0000 1.7.6.1
@@ -80,6 +80,15 @@ typedef void *ioid_t;
#endif
/*
+ * Define internal file-offset type.
+ */
+#ifdef _LARGEFILE64_SOURCE
+#define _SYSIO_OFF_T off64_t
+#else
+#define _SYSIO_OFF_T off_t
+#endif
+
+/*
* Internally, all directory entries are carried in the 64-bit capable
* structure.
*/
@@ -101,6 +110,7 @@ struct dirent;
#endif
struct stat;
+#ifdef _HAVE_STATVFS
#ifdef _LARGEFILE64_SOURCE
#define intnl_statvfs statvfs64
#else
@@ -108,6 +118,7 @@ struct stat;
#define INTNL_STATVFS_IS_NATURAL 1
#endif
struct statvfs;
+#endif
struct iovec;
struct pnode;
@@ -140,14 +151,20 @@ extern int ftruncate(int fd, off_t lengt
extern char *getcwd(char *buf, size_t size);
extern off_t lseek(int fd, off_t offset, int whence);
extern int lstat(const char *path, struct stat *buf);
+#if defined(BSD) || defined(REDSTORM)
+extern ssize_t getdirentries(int fd, char *buf, int nbytes , long *basep);
+#else
extern ssize_t getdirentries(int fd, char *buf, size_t nbytes , off_t *basep);
+#endif
extern int mkdir(const char *path, mode_t mode);
extern int open(const char *path, int flag, ...);
extern int creat(const char *path, mode_t mode);
extern int stat(const char *path, struct stat *buf);
+#ifdef _HAVE_STATVFS
extern int statvfs(const char *path, struct statvfs *buf);
-extern int truncate(const char *path, off_t length);
extern int fstatvfs(int fd, struct statvfs *buf);
+#endif
+extern int truncate(const char *path, off_t length);
extern int rmdir(const char *path);
extern int symlink(const char *path1, const char *path2);
extern int unlink(const char *path);
|