summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/include
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-07-29 17:04:46 +0000
committerChristopher Faylor <me@cgf.cx>2005-07-29 17:04:46 +0000
commit7d7d09aee8fa09aab03d14b0b672a34805ce50b9 (patch)
tree1cb66c9528cb38296d698e2bbd03ad2dd68632e1 /winsup/cygwin/include
parent728b9af5c9abb690e0510916b38caf26360d4af9 (diff)
downloadcygnal-7d7d09aee8fa09aab03d14b0b672a34805ce50b9.tar.gz
cygnal-7d7d09aee8fa09aab03d14b0b672a34805ce50b9.tar.bz2
cygnal-7d7d09aee8fa09aab03d14b0b672a34805ce50b9.zip
* fhandler.h (fhandler_base::pread): Declare new function.
(fhandler_base::pwrite): Ditto. (fhandler_disk_file::pread): Ditto. (fhandler_disk_file::pwrite): Ditto. * fhandler.cc (fhandler_base::pread): Define new function. (fhandler_base::pwrite): Ditto. * fhandler_disk_file.cc (fhandler_base::pread): Ditto. (fhandler_base::pwrite): Ditto. * syscalls.cc (pread): Define new function. (pwrite): Ditto. * cygwin.din: Export pread, pwrite. * include/sys/ioctl.h: Guard some _IO* declarations to avoid conflict with socket.h.
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r--winsup/cygwin/include/cygwin/version.h3
-rw-r--r--winsup/cygwin/include/sys/ioctl.h54
2 files changed, 32 insertions, 25 deletions
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index e7f2b454e..477195fe5 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -261,12 +261,13 @@ details. */
132: Add GLOB_LIMIT flag to glob.
133: Export __getline, __getdelim.
134: Export getline, getdelim.
+ 135: Export pread, pwrite
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
#define CYGWIN_VERSION_API_MAJOR 0
-#define CYGWIN_VERSION_API_MINOR 134
+#define CYGWIN_VERSION_API_MINOR 135
/* There is also a compatibity version number associated with the
shared memory regions. It is incremented when incompatible
diff --git a/winsup/cygwin/include/sys/ioctl.h b/winsup/cygwin/include/sys/ioctl.h
index 461def6fd..3e498b77a 100644
--- a/winsup/cygwin/include/sys/ioctl.h
+++ b/winsup/cygwin/include/sys/ioctl.h
@@ -25,38 +25,44 @@ __BEGIN_DECLS
/* Some standard linux defines */
-#define _IOC_NRBITS 8
-#define _IOC_TYPEBITS 8
-#define _IOC_SIZEBITS 14
-#define _IOC_DIRBITS 2
+#define _IOC_NRBITS 8
+#define _IOC_TYPEBITS 8
+#define _IOC_SIZEBITS 14
+#define _IOC_DIRBITS 2
-#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
-#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
-#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
-#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
+#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
+#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
+#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
+#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
-#define _IOC_NRSHIFT 0
-#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
-#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
-#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
+#define _IOC_NRSHIFT 0
+#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
+#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
+#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
-#define _IOC_NONE 0U
-#define _IOC_WRITE 1U
-#define _IOC_READ 2U
+#define _IOC_NONE 0U
+#define _IOC_WRITE 1U
+#define _IOC_READ 2U
#define _IOC(dir,type,nr,size) \
- (((dir) << _IOC_DIRSHIFT) | \
- + ((type) << _IOC_TYPESHIFT) | \
- + ((nr) << _IOC_NRSHIFT) | \
- + ((size) << _IOC_SIZESHIFT))
+ (((dir) << _IOC_DIRSHIFT) | \
+ + ((type) << _IOC_TYPESHIFT) | \
+ + ((nr) << _IOC_NRSHIFT) | \
+ + ((size) << _IOC_SIZESHIFT))
-#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
-#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
-#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
-#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
+#define _LINUX_IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
+#define _LINUX_IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
+#define _LINUX_IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
+#define _LINUX_IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
+
+#ifdef __USE_LINUX_IOCTL_DEFS
+#define _IO _LINUX_IO
+#define _IOR _LINUX_IOR
+#define _IOW _LINUX_IOW
+#define _IOWR _LINUX_IOWR
+#endif /*__USE_LINUX_IOCTL_DEFS */
int __cdecl ioctl (int __fd, int __cmd, ...);
__END_DECLS
-
#endif