Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/aiocb.h
+++ new/usr/src/uts/common/sys/aiocb.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 + *
23 25 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 26 * Use is subject to license terms.
25 27 */
26 28
27 29 #ifndef _SYS_AIOCB_H
28 30 #define _SYS_AIOCB_H
29 31
30 -#pragma ident "%Z%%M% %I% %E% SMI"
31 -
32 32 #include <sys/types.h>
33 33 #include <sys/fcntl.h>
34 34 #include <sys/siginfo.h>
35 35 #include <sys/aio.h>
36 36
37 37 #ifdef __cplusplus
38 38 extern "C" {
39 39 #endif
40 40
41 41 typedef struct aiocb {
42 42 int aio_fildes;
43 -#if defined(__STDC__)
44 43 volatile void *aio_buf; /* buffer location */
45 -#else
46 - void *aio_buf; /* buffer location */
47 -#endif
48 44 size_t aio_nbytes; /* length of transfer */
49 45 off_t aio_offset; /* file offset */
50 46 int aio_reqprio; /* request priority offset */
51 47 struct sigevent aio_sigevent; /* notification type */
52 48 int aio_lio_opcode; /* listio operation */
53 49 aio_result_t aio_resultp; /* results */
54 50 int aio_state; /* state flag for List I/O */
55 51 int aio__pad[1]; /* extension padding */
56 52 } aiocb_t;
57 53
58 54 #ifdef _LARGEFILE64_SOURCE
59 55 #if !defined(_KERNEL)
60 56 typedef struct aiocb64 {
61 57 int aio_fildes;
62 -#if defined(__STDC__)
63 58 volatile void *aio_buf; /* buffer location */
64 -#else
65 - void *aio_buf; /* buffer location */
66 -#endif
67 59 size_t aio_nbytes; /* length of transfer */
68 60 off64_t aio_offset; /* file offset */
69 61 int aio_reqprio; /* request priority offset */
70 62 struct sigevent aio_sigevent; /* notification type */
71 63 int aio_lio_opcode; /* listio operation */
72 64 aio_result_t aio_resultp; /* results */
73 65 int aio_state; /* state flag for List I/O */
74 66 int aio__pad[1]; /* extension padding */
75 67 } aiocb64_t;
76 68 #else
77 69
78 70 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
79 71 #pragma pack(4)
80 72 #endif
81 73
82 74 typedef struct aiocb64_32 {
83 75 int aio_fildes;
84 76 caddr32_t aio_buf; /* buffer location */
85 77 uint32_t aio_nbytes; /* length of transfer */
86 78 off64_t aio_offset; /* file offset */
87 79 int aio_reqprio; /* request priority offset */
88 80 struct sigevent32 aio_sigevent; /* notification type */
89 81 int aio_lio_opcode; /* listio operation */
90 82 aio_result32_t aio_resultp; /* results */
91 83 int aio_state; /* state flag for List I/O */
92 84 int aio__pad[1]; /* extension padding */
93 85 } aiocb64_32_t;
94 86
95 87 #if _LONG_LONG_ALIGNMENT == 8 && _LONG_LONG_ALIGNMENT_32 == 4
96 88 #pragma pack()
97 89 #endif
98 90
99 91 #endif /* !defined(_KERNEL) */
100 92 #endif /* _LARGEFILE64_SOURCE */
101 93
102 94 #ifdef _SYSCALL32
103 95 typedef struct aiocb32 {
104 96 int aio_fildes;
105 97 caddr32_t aio_buf; /* buffer location */
106 98 uint32_t aio_nbytes; /* length of transfer */
107 99 uint32_t aio_offset; /* file offset */
108 100 int aio_reqprio; /* request priority offset */
109 101 struct sigevent32 aio_sigevent; /* notification type */
110 102 int aio_lio_opcode; /* listio operation */
111 103 aio_result32_t aio_resultp; /* results */
112 104 int aio_state; /* state flag for List I/O */
113 105 int aio__pad[1]; /* extension padding */
114 106 } aiocb32_t;
115 107
116 108 #endif /* _SYSCALL32 */
117 109 /*
118 110 * return values for aiocancel()
119 111 */
120 112 #define AIO_CANCELED 0
121 113 #define AIO_ALLDONE 1
122 114 #define AIO_NOTCANCELED 2
123 115
124 116 /*
125 117 * mode values for lio_listio()
126 118 */
127 119 #define LIO_NOWAIT 0
128 120 #define LIO_WAIT 1
129 121
130 122
131 123 /*
132 124 * listio operation codes
133 125 *
134 126 * LIO_READ and LIO_WRITE were previously defined as FREAD and FWRITE as
135 127 * defined in <sys/file.h>. However, inclusion of <sys/file.h> results
136 128 * in X/Open namespace pollution and as such is no longer included in
137 129 * this header. The values of LIO_READ and LIO_WRITE must be identical
138 130 * to the values of FREAD and FWRITE in <sys/file.h>. Any change to one
139 131 * will require a change to the other.
140 132 */
141 133
142 134 #define LIO_NOP 0
143 135 #define LIO_READ 0x01 /* Must match value of FREAD in sys/file.h */
144 136 #define LIO_WRITE 0x02 /* Must match value of FWRITE in sys/file.h */
145 137
146 138 #ifdef __cplusplus
147 139 }
148 140 #endif
149 141
150 142 #endif /* _SYS_AIOCB_H */
↓ open down ↓ |
74 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX