This repository was archived by the owner on Oct 12, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +63
-4
lines changed Expand file tree Collapse file tree 2 files changed +63
-4
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,19 @@ version (CRuntime_Glibc)
63
63
}
64
64
}
65
65
}
66
+ else version (OSX )
67
+ {
68
+ struct aiocb
69
+ {
70
+ int aio_filedes;
71
+ off_t aio_offset;
72
+ void * aio_buf; // volatile
73
+ size_t aio_nbytes;
74
+ int reqprio;
75
+ sigevent aio_sigevent;
76
+ int aio_lio_opcode;
77
+ }
78
+ }
66
79
else version (FreeBSD )
67
80
{
68
81
struct __aiocb_private
@@ -127,11 +140,32 @@ else
127
140
static assert (false , " Unsupported platform" );
128
141
129
142
/* Return values of cancelation function. */
130
- enum
143
+ version ( CRuntime_Glibc )
131
144
{
132
- AIO_CANCELED ,
133
- AIO_NOTCANCELED ,
134
- AIO_ALLDONE
145
+ enum
146
+ {
147
+ AIO_CANCELED ,
148
+ AIO_NOTCANCELED ,
149
+ AIO_ALLDONE
150
+ }
151
+ }
152
+ else version (OSX )
153
+ {
154
+ enum
155
+ {
156
+ AIO_ALLDONE = 0x1 ,
157
+ AIO_CANCELED = 0x2 ,
158
+ AIO_NOTCANCELED = 0x4 ,
159
+ }
160
+ }
161
+ else version (BSD_Posix)
162
+ {
163
+ enum
164
+ {
165
+ AIO_CANCELED ,
166
+ AIO_NOTCANCELED ,
167
+ AIO_ALLDONE
168
+ }
135
169
}
136
170
137
171
/* Operation codes for `aio_lio_opcode'. */
@@ -144,6 +178,15 @@ version (CRuntime_Glibc)
144
178
LIO_NOP
145
179
}
146
180
}
181
+ else version (OSX )
182
+ {
183
+ enum
184
+ {
185
+ LIO_NOP = 0x0 ,
186
+ LIO_READ = 0x1 ,
187
+ LIO_WRITE = 0x2 ,
188
+ }
189
+ }
147
190
else version (BSD_Posix)
148
191
{
149
192
enum
@@ -163,6 +206,14 @@ version (CRuntime_Glibc)
163
206
LIO_NOWAIT
164
207
}
165
208
}
209
+ else version (OSX )
210
+ {
211
+ enum
212
+ {
213
+ LIO_NOWAIT = 0x1 ,
214
+ LIO_WAIT = 0x2 ,
215
+ }
216
+ }
166
217
else version (BSD_Posix)
167
218
{
168
219
enum
Original file line number Diff line number Diff line change @@ -3552,6 +3552,14 @@ else version (DragonFlyBSD)
3552
3552
}
3553
3553
else version (Darwin)
3554
3554
{
3555
+ struct sigevent
3556
+ {
3557
+ int sigev_notify;
3558
+ int sigev_signo;
3559
+ sigval sigev_value;
3560
+ void function (sigval) sigev_notify_function;
3561
+ pthread_attr_t * sigev_notify_attributes;
3562
+ }
3555
3563
}
3556
3564
else version (Solaris )
3557
3565
{
You can’t perform that action at this time.
0 commit comments