1 | /* sys/uio.h (emx+gcc) */
|
---|
2 |
|
---|
3 | #ifndef _SYS_UIO_H
|
---|
4 | #define _SYS_UIO_H
|
---|
5 | #define _SYS_UIO_H_ /*toolkit pollution*/
|
---|
6 |
|
---|
7 | #if defined (__cplusplus)
|
---|
8 | extern "C" {
|
---|
9 | #endif
|
---|
10 |
|
---|
11 | /* bird: standard saith these shall be definedl */
|
---|
12 | #include <sys/cdefs.h>
|
---|
13 | #include <sys/_types.h>
|
---|
14 |
|
---|
15 | #if !defined(_SIZE_T_DECLARED) && !defined(_SIZE_T) /* bird: emx */
|
---|
16 | typedef __size_t size_t;
|
---|
17 | #define _SIZE_T_DECLARED
|
---|
18 | #define _SIZE_T /* bird: emx */
|
---|
19 | #endif
|
---|
20 |
|
---|
21 | #if !defined(_SSIZE_T_DECLARED) && !defined(_SSIZE_T) /* bird: emx */
|
---|
22 | typedef __ssize_t ssize_t;
|
---|
23 | #define _SSIZE_T_DECLARED
|
---|
24 | #define _SSIZE_T /* bird: emx */
|
---|
25 | #endif
|
---|
26 |
|
---|
27 |
|
---|
28 | struct iovec
|
---|
29 | {
|
---|
30 | /* bird: standard saith void* not caddr_t. */
|
---|
31 | void * iov_base;
|
---|
32 | #if defined(__32BIT__) && !defined(TCPV40HDRS)
|
---|
33 | size_t iov_len;
|
---|
34 | #else
|
---|
35 | int iov_len;
|
---|
36 | #endif
|
---|
37 | };
|
---|
38 |
|
---|
39 |
|
---|
40 | /* needed for sys\socket.h TCPIPV4 now */
|
---|
41 | #ifdef TCPV40HDRS
|
---|
42 | #if !defined(_OFF_T_DECLARED) && !defined(_OFF_T) /* bird:emx */
|
---|
43 | typedef __off_t off_t; /* file offset */
|
---|
44 | #define _OFF_T_DECLARED
|
---|
45 | #define _OFF_T /* bird: emx */
|
---|
46 | #endif
|
---|
47 |
|
---|
48 | struct uio {
|
---|
49 | struct iovec *uio_iov;
|
---|
50 | int uio_iovcnt;
|
---|
51 | off_t uio_offset;
|
---|
52 | int uio_segflg;
|
---|
53 | unsigned int uio_resid;
|
---|
54 | };
|
---|
55 | #ifndef FREAD
|
---|
56 | #define FREAD 1
|
---|
57 | #define FWRITE 2
|
---|
58 | #endif
|
---|
59 | #endif
|
---|
60 |
|
---|
61 | enum uio_rw { UIO_READ, UIO_WRITE };
|
---|
62 |
|
---|
63 | #ifndef TCPV40HDRS
|
---|
64 | /* Segment flag values. */
|
---|
65 | enum uio_seg {
|
---|
66 | UIO_USERSPACE, /* from user data space */
|
---|
67 | UIO_SYSSPACE, /* from system space */
|
---|
68 | UIO_USERISPACE /* from user I space */
|
---|
69 | };
|
---|
70 | #endif
|
---|
71 |
|
---|
72 | /* TCPIP versions */
|
---|
73 | int TCPCALL so_readv (int, struct iovec *, int);
|
---|
74 | int TCPCALL so_writev (int, struct iovec *, int);
|
---|
75 |
|
---|
76 | /* EMX versions */
|
---|
77 | int readv (int, const struct iovec *, int);
|
---|
78 | int writev (int, const struct iovec *, int);
|
---|
79 |
|
---|
80 | #if defined (__cplusplus)
|
---|
81 | }
|
---|
82 | #endif
|
---|
83 |
|
---|
84 | #endif /* not _SYS_UIO_H */
|
---|