- Timestamp:
- May 19, 2003, 1:59:07 PM (22 years ago)
- Location:
- trunk/src/emx/src/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/lib/io/ioctl.c
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r184 r185 11 11 #include <emx/syscalls.h> 12 12 13 /* Including the socket header files would be overkill. */ 13 /** Get the low word of the ioctl request number. 14 * Used to support ioctl request numbers from old and new _IOC macros. 15 */ 16 #define __IOCLW(a) ((unsigned short)(a)) 14 17 15 #define FIONBIO 0x667e16 18 17 19 int _STD(ioctl) (int handle, int request, ...) … … 32 34 rc = __ioctl2 (handle, request, arg); 33 35 if (rc >= 0 && errno == 0) 34 switch ( request)36 switch (__IOCLW(request)) 35 37 { 36 case TCSETAF:37 case TCSETAW:38 case TCSETA:38 case __IOCLW(TCSETAF): 39 case __IOCLW(TCSETAW): 40 case __IOCLW(TCSETA): 39 41 va_start (va, request); 40 42 tp = va_arg (va, const struct termio *); … … 46 48 break; 47 49 48 case _ TCSANOW:49 case _ TCSADRAIN:50 case _ TCSAFLUSH:50 case __IOCLW(_TCSANOW): 51 case __IOCLW(_TCSADRAIN): 52 case __IOCLW(_TCSAFLUSH): 51 53 *pflags |= F_TERMIO; 52 54 break; 53 55 54 case FIONREAD:56 case __IOCLW(FIONREAD): 55 57 if ((pla = _fd_lookahead (handle)) != NULL && *pla >= 0) 56 58 { … … 62 64 break; 63 65 64 case FIONBIO:66 case __IOCLW(FIONBIO): 65 67 va_start (va, request); 66 68 int_ptr = va_arg (va, int *); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/sys/__ioctl2.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r184 r185 9 9 #include "syscalls.h" 10 10 11 /** Get the low word of the ioctl request number. 12 * Used to support ioctl request numbers from old and new _IOC macros. 13 */ 14 #define __IOCLW(a) ((unsigned short)(a)) 15 11 16 int __ioctl2 (int handle, int request, int arg) 12 17 { … … 15 20 int *int_ptr; 16 21 17 switch ( request)22 switch (__IOCLW(request)) 18 23 { 19 case FGETHTYPE:24 case __IOCLW(FGETHTYPE): 20 25 int_ptr = (int *)arg; 21 26 rc = DosQueryHType (handle, &type, &flags); -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.