Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/sys/rtems')
-rw-r--r--newlib/libc/sys/rtems/include/sys/ioccom.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/newlib/libc/sys/rtems/include/sys/ioccom.h b/newlib/libc/sys/rtems/include/sys/ioccom.h
index 34ea1e16d..2a8416c41 100644
--- a/newlib/libc/sys/rtems/include/sys/ioccom.h
+++ b/newlib/libc/sys/rtems/include/sys/ioccom.h
@@ -68,6 +68,10 @@ typedef unsigned long ioctl_command_t;
#define _IOW(g,n,t) _IOC(IOC_IN, (g), (n), sizeof(t))
/* this should be _IORW, but stdio got there first */
#define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t))
+/* Replace length/type in an ioctl command. */
+#define _IOC_NEWLEN(ioc, len) \
+ (((~(IOCPARM_MASK << 16)) & (ioc)) | (((len) & IOCPARM_MASK) << 16))
+#define _IOC_NEWTYPE(ioc, type) _IOC_NEWLEN((ioc), sizeof(type))
#ifdef _KERNEL