Print this page
remove support for non-ANSI compilation
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/head/aio.h
+++ new/usr/src/head/aio.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, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /*
23 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 + *
23 25 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 26 * Use is subject to license terms.
25 27 */
26 28
27 29 #ifndef _AIO_H
28 30 #define _AIO_H
29 31
30 -#pragma ident "%Z%%M% %I% %E% SMI"
31 -
32 32 #include <sys/feature_tests.h>
33 33 #include <sys/types.h>
34 34 #include <sys/fcntl.h>
35 35 #include <sys/siginfo.h>
36 36 #include <sys/aiocb.h>
37 37 #include <time.h>
38 38
39 39 #ifdef __cplusplus
40 40 extern "C" {
41 41 #endif
42 42
43 43 #if (_POSIX_C_SOURCE - 0 > 0) && (_POSIX_C_SOURCE - 0 <= 2)
44 44 #error "POSIX Asynchronous I/O is not supported in POSIX.1-1990"
45 45 #endif
46 46
47 47 /* large file compilation environment setup */
48 48 #if !defined(_LP64) && _FILE_OFFSET_BITS == 64
49 49 #ifdef __PRAGMA_REDEFINE_EXTNAME
50 50 #pragma redefine_extname aio_read aio_read64
51 51 #pragma redefine_extname aio_write aio_write64
52 52 #pragma redefine_extname lio_listio lio_listio64
53 53 #pragma redefine_extname aio_error aio_error64
54 54 #pragma redefine_extname aio_return aio_return64
55 55 #pragma redefine_extname aio_cancel aio_cancel64
56 56 #pragma redefine_extname aio_suspend aio_suspend64
57 57 #pragma redefine_extname aio_fsync aio_fsync64
58 58 #pragma redefine_extname aio_waitn aio_waitn64
59 59 #else
60 60 #define aiocb aiocb64
61 61 #define aiocb_t aiocb64_t
62 62 #define aio_read aio_read64
63 63 #define aio_write aio_write64
64 64 #define lio_listio lio_listio64
65 65 #define aio_error aio_error64
66 66 #define aio_return aio_return64
67 67 #define aio_cancel aio_cancel64
68 68 #define aio_suspend aio_suspend64
69 69 #define aio_fsync aio_fsync64
70 70 #define aio_waitn aio_waitn64
71 71 #endif
72 72 #endif /* !_LP64 && _FILE_OFFSET_BITS == 64 */
73 73
74 74 #if defined(_LP64) && defined(_LARGEFILE64_SOURCE)
75 75 /*
76 76 * In the LP64 compilation environment, map the 64-bit-explicit versions
77 77 * back to the generic versions: all i/o operations are already "large file"
78 78 */
79 79 #ifdef __PRAGMA_REDEFINE_EXTNAME
80 80 #pragma redefine_extname aio_read64 aio_read
81 81 #pragma redefine_extname aio_write64 aio_write
82 82 #pragma redefine_extname lio_listio64 lio_listio
83 83 #pragma redefine_extname aio_error64 aio_error
84 84 #pragma redefine_extname aio_return64 aio_return
85 85 #pragma redefine_extname aio_cancel64 aio_cancel
86 86 #pragma redefine_extname aio_suspend64 aio_suspend
87 87 #pragma redefine_extname aio_fsync64 aio_fsync
88 88 #pragma redefine_extname aio_waitn64 aio_waitn
89 89 #else
90 90 #define aiocb64 aiocb
91 91 #define aiocb64_t aiocb_t
92 92 #define aio_read64 aio_read
93 93 #define aio_write64 aio_write
94 94 #define lio_listio64 lio_listio
95 95 #define aio_error64 aio_error
96 96 #define aio_return64 aio_return
↓ open down ↓ |
55 lines elided |
↑ open up ↑ |
97 97 #define aio_cancel64 aio_cancel
98 98 #define aio_suspend64 aio_suspend
99 99 #define aio_fsync64 aio_fsync
100 100 #define aio_waitn64 aio_waitn
101 101 #endif
102 102 #endif /* _LP64 && _LARGEFILE64_SOURCE */
103 103
104 104 /*
105 105 * function prototypes
106 106 */
107 -#if defined(__STDC__)
108 107 extern int aio_read(aiocb_t *);
109 108 extern int aio_write(aiocb_t *);
110 109 extern int lio_listio(int,
111 110 aiocb_t *_RESTRICT_KYWD const *_RESTRICT_KYWD,
112 111 int, struct sigevent *_RESTRICT_KYWD);
113 112 extern int aio_error(const aiocb_t *);
114 113 extern ssize_t aio_return(aiocb_t *);
115 114 extern int aio_cancel(int, aiocb_t *);
116 115 extern int aio_suspend(const aiocb_t *const[], int,
117 116 const struct timespec *);
118 117 extern int aio_fsync(int, aiocb_t *);
119 118 extern int aio_waitn(aiocb_t *[], uint_t, uint_t *,
120 119 const struct timespec *);
121 120
122 121
123 122 #if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
124 123 !defined(__PRAGMA_REDEFINE_EXTNAME))
125 124 extern int aio_read64(aiocb64_t *);
126 125 extern int aio_write64(aiocb64_t *);
127 126 extern int lio_listio64(int,
128 127 aiocb64_t *_RESTRICT_KYWD const *_RESTRICT_KYWD,
129 128 int, struct sigevent *_RESTRICT_KYWD);
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
130 129 extern int aio_error64(const aiocb64_t *);
131 130 extern ssize_t aio_return64(aiocb64_t *);
132 131 extern int aio_cancel64(int, aiocb64_t *);
133 132 extern int aio_suspend64(const aiocb64_t *const[], int,
134 133 const struct timespec *);
135 134 extern int aio_fsync64(int, aiocb64_t *);
136 135 extern int aio_waitn64(aiocb64_t *[], uint_t, uint_t *,
137 136 const struct timespec *);
138 137 #endif /* _LARGEFILE64_SOURCE */
139 138
140 -#else
141 -extern int aio_read();
142 -extern int aio_write();
143 -extern int lio_listio();
144 -extern int aio_error();
145 -extern ssize_t aio_return();
146 -extern int aio_cancel();
147 -extern int aio_suspend();
148 -extern int aio_fsync();
149 -extern int aio_waitn();
150 -
151 -#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
152 - !defined(__PRAGMA_REDEFINE_EXTNAME))
153 -extern int aio_read64();
154 -extern int aio_write64();
155 -extern int lio_listio64();
156 -extern int aio_error64();
157 -extern ssize_t aio_return64();
158 -extern int aio_cancel64();
159 -extern int aio_suspend64();
160 -extern int aio_fsync64();
161 -extern int aio_waitn64();
162 -#endif /* _LARGEFILE64_SOURCE */
163 -
164 -#endif /* __STDC__ */
165 -
166 139 #ifdef __cplusplus
167 140 }
168 141 #endif
169 142
170 143 #endif /* _AIO_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX