Update of /cvsroot/libsysio/libsysio/src
In directory sc8-pr-cvs1:/tmp/cvs-serv29635/src
Modified Files:
Tag: b_lustre
Makefile.am fcntl.c ioctl.c read.c statvfs.c write.c
Log Message:
fixes for build libsysio under Cygwin:
- add include/cygwin-defs.h
- disable _LARGEFILE64_SOURCE
- autoconf test for host_os "cygwin"
- exclude getdentries.c, bypass.c, stat64.c for cygwin build
- don't include <syscall.h>, <statvfs.h>
Index: Makefile.am
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/Makefile.am,v
retrieving revision 1.5.4.2
retrieving revision 1.5.4.3
diff -u -w -b -B -p -r1.5.4.2 -r1.5.4.3
--- Makefile.am 15 Aug 2003 07:43:15 -0000 1.5.4.2
+++ Makefile.am 18 Aug 2003 13:56:04 -0000 1.5.4.3
@@ -1,10 +1,17 @@
lib_LIBRARIES = libsysio.a
+if CYGWIN
+libsysio_a_SOURCES = chdir.c chmod.c chown.c dev.c dup.c fcntl.c file.c fs.c \
+ fsync.c init.c inode.c ioctl.c ioctx.c iowait.c \
+ lseek.c mkdir.c mknod.c mount.c namei.c open.c read.c rmdir.c stat.c \
+ statvfs.c symlink.c truncate.c unlink.c write.c access.c
+else
libsysio_a_SOURCES = chdir.c chmod.c chown.c dev.c dup.c fcntl.c file.c fs.c \
fsync.c getdirentries.c init.c inode.c ioctl.c ioctx.c iowait.c \
lseek.c mkdir.c mknod.c mount.c namei.c open.c read.c rmdir.c stat.c \
stat64.c statvfs.c symlink.c truncate.c unlink.c write.c access.c \
bypass.c
+endif
include $(top_srcdir)/Rules.make
Index: fcntl.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/fcntl.c,v
retrieving revision 1.3.2.5
retrieving revision 1.3.2.6
diff -u -w -b -B -p -r1.3.2.5 -r1.3.2.6
--- fcntl.c 15 Aug 2003 07:43:15 -0000 1.3.2.5
+++ fcntl.c 18 Aug 2003 13:56:04 -0000 1.3.2.6
@@ -46,7 +46,10 @@
#include <sys/types.h>
#include <fcntl.h>
#include <sys/queue.h>
+
+#ifndef __CYGWIN__
#include <syscall.h>
+#endif
#include "sysio.h"
#include "inode.h"
Index: ioctl.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/ioctl.c,v
retrieving revision 1.1.1.1.12.2
retrieving revision 1.1.1.1.12.3
diff -u -w -b -B -p -r1.1.1.1.12.2 -r1.1.1.1.12.3
--- ioctl.c 15 Aug 2003 07:43:15 -0000 1.1.1.1.12.2
+++ ioctl.c 18 Aug 2003 13:56:04 -0000 1.1.1.1.12.3
@@ -50,8 +50,13 @@
#include "inode.h"
#include "file.h"
+#ifdef __CYGWIN__
+int
+ioctl(int fd, int request, ...)
+#else
int
ioctl(int fd, unsigned long request, ...)
+#endif
{
int err;
struct file *fil;
Index: read.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/read.c,v
retrieving revision 1.2.8.5
retrieving revision 1.2.8.6
diff -u -w -b -B -p -r1.2.8.5 -r1.2.8.6
--- read.c 15 Aug 2003 10:03:29 -0000 1.2.8.5
+++ read.c 18 Aug 2003 13:56:04 -0000 1.2.8.6
@@ -48,7 +48,10 @@
#include <fcntl.h>
#include <sys/uio.h>
#include <sys/queue.h>
+
+#ifndef __CYGWIN__
#include <syscall.h>
+#endif
#include "sysio.h"
#include "file.h"
Index: statvfs.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/statvfs.c,v
retrieving revision 1.3.4.1
retrieving revision 1.3.4.2
diff -u -w -b -B -p -r1.3.4.1 -r1.3.4.2
--- statvfs.c 29 Jun 2003 10:15:32 -0000 1.3.4.1
+++ statvfs.c 18 Aug 2003 13:56:04 -0000 1.3.4.2
@@ -44,9 +44,13 @@
#include <unistd.h>
#include <errno.h>
#include <assert.h>
-#include <sys/statvfs.h>
#include <sys/types.h>
#include <sys/queue.h>
+#ifndef __CYGWIN__
+#include <sys/statvfs.h>
+#else
+#include <sys/statfs.h>
+#endif
#include "sysio.h"
#include "inode.h"
Index: write.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/write.c,v
retrieving revision 1.2.10.5
retrieving revision 1.2.10.6
diff -u -w -b -B -p -r1.2.10.5 -r1.2.10.6
--- write.c 15 Aug 2003 10:03:29 -0000 1.2.10.5
+++ write.c 18 Aug 2003 13:56:04 -0000 1.2.10.6
@@ -48,7 +48,9 @@
#include <fcntl.h>
#include <sys/uio.h>
#include <sys/queue.h>
+#ifndef __CYGWIN__
#include <syscall.h>
+#endif
#include "sysio.h"
#include "file.h"
|