2 * This file was automatically generated by make-map from Mono.Posix.dll.
11 #endif /* ndef _GNU_SOURCE */
14 #endif /* ndef _XOPEN_SOURCE */
15 #include <sys/types.h>
19 #include <sys/mount.h>
26 int Mono_Posix_FromError (int x
, int *r
)
31 if (x
== Mono_Posix_Error_EPERM
)
33 {*r
= EPERM
; return 0;}
35 {errno
= EINVAL
; return -1;}
36 #endif /* ndef EPERM */
37 if (x
== Mono_Posix_Error_ENOENT
)
39 {*r
= ENOENT
; return 0;}
40 #else /* def ENOENT */
41 {errno
= EINVAL
; return -1;}
42 #endif /* ndef ENOENT */
43 if (x
== Mono_Posix_Error_ESRCH
)
45 {*r
= ESRCH
; return 0;}
47 {errno
= EINVAL
; return -1;}
48 #endif /* ndef ESRCH */
49 if (x
== Mono_Posix_Error_EINTR
)
51 {*r
= EINTR
; return 0;}
53 {errno
= EINVAL
; return -1;}
54 #endif /* ndef EINTR */
55 if (x
== Mono_Posix_Error_EIO
)
59 {errno
= EINVAL
; return -1;}
61 if (x
== Mono_Posix_Error_ENXIO
)
63 {*r
= ENXIO
; return 0;}
65 {errno
= EINVAL
; return -1;}
66 #endif /* ndef ENXIO */
67 if (x
== Mono_Posix_Error_E2BIG
)
69 {*r
= E2BIG
; return 0;}
71 {errno
= EINVAL
; return -1;}
72 #endif /* ndef E2BIG */
73 if (x
== Mono_Posix_Error_ENOEXEC
)
75 {*r
= ENOEXEC
; return 0;}
76 #else /* def ENOEXEC */
77 {errno
= EINVAL
; return -1;}
78 #endif /* ndef ENOEXEC */
79 if (x
== Mono_Posix_Error_EBADF
)
81 {*r
= EBADF
; return 0;}
83 {errno
= EINVAL
; return -1;}
84 #endif /* ndef EBADF */
85 if (x
== Mono_Posix_Error_ECHILD
)
87 {*r
= ECHILD
; return 0;}
88 #else /* def ECHILD */
89 {errno
= EINVAL
; return -1;}
90 #endif /* ndef ECHILD */
91 if (x
== Mono_Posix_Error_EAGAIN
)
93 {*r
= EAGAIN
; return 0;}
94 #else /* def EAGAIN */
95 {errno
= EINVAL
; return -1;}
96 #endif /* ndef EAGAIN */
97 if (x
== Mono_Posix_Error_ENOMEM
)
99 {*r
= ENOMEM
; return 0;}
100 #else /* def ENOMEM */
101 {errno
= EINVAL
; return -1;}
102 #endif /* ndef ENOMEM */
103 if (x
== Mono_Posix_Error_EACCES
)
105 {*r
= EACCES
; return 0;}
106 #else /* def EACCES */
107 {errno
= EINVAL
; return -1;}
108 #endif /* ndef EACCES */
109 if (x
== Mono_Posix_Error_EFAULT
)
111 {*r
= EFAULT
; return 0;}
112 #else /* def EFAULT */
113 {errno
= EINVAL
; return -1;}
114 #endif /* ndef EFAULT */
115 if (x
== Mono_Posix_Error_ENOTBLK
)
117 {*r
= ENOTBLK
; return 0;}
118 #else /* def ENOTBLK */
119 {errno
= EINVAL
; return -1;}
120 #endif /* ndef ENOTBLK */
121 if (x
== Mono_Posix_Error_EBUSY
)
123 {*r
= EBUSY
; return 0;}
124 #else /* def EBUSY */
125 {errno
= EINVAL
; return -1;}
126 #endif /* ndef EBUSY */
127 if (x
== Mono_Posix_Error_EEXIST
)
129 {*r
= EEXIST
; return 0;}
130 #else /* def EEXIST */
131 {errno
= EINVAL
; return -1;}
132 #endif /* ndef EEXIST */
133 if (x
== Mono_Posix_Error_EXDEV
)
135 {*r
= EXDEV
; return 0;}
136 #else /* def EXDEV */
137 {errno
= EINVAL
; return -1;}
138 #endif /* ndef EXDEV */
139 if (x
== Mono_Posix_Error_ENODEV
)
141 {*r
= ENODEV
; return 0;}
142 #else /* def ENODEV */
143 {errno
= EINVAL
; return -1;}
144 #endif /* ndef ENODEV */
145 if (x
== Mono_Posix_Error_ENOTDIR
)
147 {*r
= ENOTDIR
; return 0;}
148 #else /* def ENOTDIR */
149 {errno
= EINVAL
; return -1;}
150 #endif /* ndef ENOTDIR */
151 if (x
== Mono_Posix_Error_EISDIR
)
153 {*r
= EISDIR
; return 0;}
154 #else /* def EISDIR */
155 {errno
= EINVAL
; return -1;}
156 #endif /* ndef EISDIR */
157 if (x
== Mono_Posix_Error_EINVAL
)
159 {*r
= EINVAL
; return 0;}
160 #else /* def EINVAL */
161 {errno
= EINVAL
; return -1;}
162 #endif /* ndef EINVAL */
163 if (x
== Mono_Posix_Error_ENFILE
)
165 {*r
= ENFILE
; return 0;}
166 #else /* def ENFILE */
167 {errno
= EINVAL
; return -1;}
168 #endif /* ndef ENFILE */
169 if (x
== Mono_Posix_Error_EMFILE
)
171 {*r
= EMFILE
; return 0;}
172 #else /* def EMFILE */
173 {errno
= EINVAL
; return -1;}
174 #endif /* ndef EMFILE */
175 if (x
== Mono_Posix_Error_ENOTTY
)
177 {*r
= ENOTTY
; return 0;}
178 #else /* def ENOTTY */
179 {errno
= EINVAL
; return -1;}
180 #endif /* ndef ENOTTY */
181 if (x
== Mono_Posix_Error_ETXTBSY
)
183 {*r
= ETXTBSY
; return 0;}
184 #else /* def ETXTBSY */
185 {errno
= EINVAL
; return -1;}
186 #endif /* ndef ETXTBSY */
187 if (x
== Mono_Posix_Error_EFBIG
)
189 {*r
= EFBIG
; return 0;}
190 #else /* def EFBIG */
191 {errno
= EINVAL
; return -1;}
192 #endif /* ndef EFBIG */
193 if (x
== Mono_Posix_Error_ENOSPC
)
195 {*r
= ENOSPC
; return 0;}
196 #else /* def ENOSPC */
197 {errno
= EINVAL
; return -1;}
198 #endif /* ndef ENOSPC */
199 if (x
== Mono_Posix_Error_ESPIPE
)
201 {*r
= ESPIPE
; return 0;}
202 #else /* def ESPIPE */
203 {errno
= EINVAL
; return -1;}
204 #endif /* ndef ESPIPE */
205 if (x
== Mono_Posix_Error_EROFS
)
207 {*r
= EROFS
; return 0;}
208 #else /* def EROFS */
209 {errno
= EINVAL
; return -1;}
210 #endif /* ndef EROFS */
211 if (x
== Mono_Posix_Error_EMLINK
)
213 {*r
= EMLINK
; return 0;}
214 #else /* def EMLINK */
215 {errno
= EINVAL
; return -1;}
216 #endif /* ndef EMLINK */
217 if (x
== Mono_Posix_Error_EPIPE
)
219 {*r
= EPIPE
; return 0;}
220 #else /* def EPIPE */
221 {errno
= EINVAL
; return -1;}
222 #endif /* ndef EPIPE */
223 if (x
== Mono_Posix_Error_EDOM
)
225 {*r
= EDOM
; return 0;}
227 {errno
= EINVAL
; return -1;}
228 #endif /* ndef EDOM */
229 if (x
== Mono_Posix_Error_ERANGE
)
231 {*r
= ERANGE
; return 0;}
232 #else /* def ERANGE */
233 {errno
= EINVAL
; return -1;}
234 #endif /* ndef ERANGE */
235 if (x
== Mono_Posix_Error_EDEADLK
)
237 {*r
= EDEADLK
; return 0;}
238 #else /* def EDEADLK */
239 {errno
= EINVAL
; return -1;}
240 #endif /* ndef EDEADLK */
241 if (x
== Mono_Posix_Error_ENAMETOOLONG
)
243 {*r
= ENAMETOOLONG
; return 0;}
244 #else /* def ENAMETOOLONG */
245 {errno
= EINVAL
; return -1;}
246 #endif /* ndef ENAMETOOLONG */
247 if (x
== Mono_Posix_Error_ENOLCK
)
249 {*r
= ENOLCK
; return 0;}
250 #else /* def ENOLCK */
251 {errno
= EINVAL
; return -1;}
252 #endif /* ndef ENOLCK */
253 if (x
== Mono_Posix_Error_ENOSYS
)
255 {*r
= ENOSYS
; return 0;}
256 #else /* def ENOSYS */
257 {errno
= EINVAL
; return -1;}
258 #endif /* ndef ENOSYS */
259 if (x
== Mono_Posix_Error_ENOTEMPTY
)
261 {*r
= ENOTEMPTY
; return 0;}
262 #else /* def ENOTEMPTY */
263 {errno
= EINVAL
; return -1;}
264 #endif /* ndef ENOTEMPTY */
265 if (x
== Mono_Posix_Error_ELOOP
)
267 {*r
= ELOOP
; return 0;}
268 #else /* def ELOOP */
269 {errno
= EINVAL
; return -1;}
270 #endif /* ndef ELOOP */
271 if (x
== Mono_Posix_Error_EWOULDBLOCK
)
273 {*r
= EWOULDBLOCK
; return 0;}
274 #else /* def EWOULDBLOCK */
275 {errno
= EINVAL
; return -1;}
276 #endif /* ndef EWOULDBLOCK */
277 if (x
== Mono_Posix_Error_ENOMSG
)
279 {*r
= ENOMSG
; return 0;}
280 #else /* def ENOMSG */
281 {errno
= EINVAL
; return -1;}
282 #endif /* ndef ENOMSG */
283 if (x
== Mono_Posix_Error_EIDRM
)
285 {*r
= EIDRM
; return 0;}
286 #else /* def EIDRM */
287 {errno
= EINVAL
; return -1;}
288 #endif /* ndef EIDRM */
289 if (x
== Mono_Posix_Error_ECHRNG
)
291 {*r
= ECHRNG
; return 0;}
292 #else /* def ECHRNG */
293 {errno
= EINVAL
; return -1;}
294 #endif /* ndef ECHRNG */
295 if (x
== Mono_Posix_Error_EL2NSYNC
)
297 {*r
= EL2NSYNC
; return 0;}
298 #else /* def EL2NSYNC */
299 {errno
= EINVAL
; return -1;}
300 #endif /* ndef EL2NSYNC */
301 if (x
== Mono_Posix_Error_EL3HLT
)
303 {*r
= EL3HLT
; return 0;}
304 #else /* def EL3HLT */
305 {errno
= EINVAL
; return -1;}
306 #endif /* ndef EL3HLT */
307 if (x
== Mono_Posix_Error_EL3RST
)
309 {*r
= EL3RST
; return 0;}
310 #else /* def EL3RST */
311 {errno
= EINVAL
; return -1;}
312 #endif /* ndef EL3RST */
313 if (x
== Mono_Posix_Error_ELNRNG
)
315 {*r
= ELNRNG
; return 0;}
316 #else /* def ELNRNG */
317 {errno
= EINVAL
; return -1;}
318 #endif /* ndef ELNRNG */
319 if (x
== Mono_Posix_Error_EUNATCH
)
321 {*r
= EUNATCH
; return 0;}
322 #else /* def EUNATCH */
323 {errno
= EINVAL
; return -1;}
324 #endif /* ndef EUNATCH */
325 if (x
== Mono_Posix_Error_ENOCSI
)
327 {*r
= ENOCSI
; return 0;}
328 #else /* def ENOCSI */
329 {errno
= EINVAL
; return -1;}
330 #endif /* ndef ENOCSI */
331 if (x
== Mono_Posix_Error_EL2HLT
)
333 {*r
= EL2HLT
; return 0;}
334 #else /* def EL2HLT */
335 {errno
= EINVAL
; return -1;}
336 #endif /* ndef EL2HLT */
337 if (x
== Mono_Posix_Error_EBADE
)
339 {*r
= EBADE
; return 0;}
340 #else /* def EBADE */
341 {errno
= EINVAL
; return -1;}
342 #endif /* ndef EBADE */
343 if (x
== Mono_Posix_Error_EBADR
)
345 {*r
= EBADR
; return 0;}
346 #else /* def EBADR */
347 {errno
= EINVAL
; return -1;}
348 #endif /* ndef EBADR */
349 if (x
== Mono_Posix_Error_EXFULL
)
351 {*r
= EXFULL
; return 0;}
352 #else /* def EXFULL */
353 {errno
= EINVAL
; return -1;}
354 #endif /* ndef EXFULL */
355 if (x
== Mono_Posix_Error_ENOANO
)
357 {*r
= ENOANO
; return 0;}
358 #else /* def ENOANO */
359 {errno
= EINVAL
; return -1;}
360 #endif /* ndef ENOANO */
361 if (x
== Mono_Posix_Error_EBADRQC
)
363 {*r
= EBADRQC
; return 0;}
364 #else /* def EBADRQC */
365 {errno
= EINVAL
; return -1;}
366 #endif /* ndef EBADRQC */
367 if (x
== Mono_Posix_Error_EBADSLT
)
369 {*r
= EBADSLT
; return 0;}
370 #else /* def EBADSLT */
371 {errno
= EINVAL
; return -1;}
372 #endif /* ndef EBADSLT */
373 if (x
== Mono_Posix_Error_EDEADLOCK
)
375 {*r
= EDEADLOCK
; return 0;}
376 #else /* def EDEADLOCK */
377 {errno
= EINVAL
; return -1;}
378 #endif /* ndef EDEADLOCK */
379 if (x
== Mono_Posix_Error_EBFONT
)
381 {*r
= EBFONT
; return 0;}
382 #else /* def EBFONT */
383 {errno
= EINVAL
; return -1;}
384 #endif /* ndef EBFONT */
385 if (x
== Mono_Posix_Error_ENOSTR
)
387 {*r
= ENOSTR
; return 0;}
388 #else /* def ENOSTR */
389 {errno
= EINVAL
; return -1;}
390 #endif /* ndef ENOSTR */
391 if (x
== Mono_Posix_Error_ENODATA
)
393 {*r
= ENODATA
; return 0;}
394 #else /* def ENODATA */
395 {errno
= EINVAL
; return -1;}
396 #endif /* ndef ENODATA */
397 if (x
== Mono_Posix_Error_ETIME
)
399 {*r
= ETIME
; return 0;}
400 #else /* def ETIME */
401 {errno
= EINVAL
; return -1;}
402 #endif /* ndef ETIME */
403 if (x
== Mono_Posix_Error_ENOSR
)
405 {*r
= ENOSR
; return 0;}
406 #else /* def ENOSR */
407 {errno
= EINVAL
; return -1;}
408 #endif /* ndef ENOSR */
409 if (x
== Mono_Posix_Error_ENONET
)
411 {*r
= ENONET
; return 0;}
412 #else /* def ENONET */
413 {errno
= EINVAL
; return -1;}
414 #endif /* ndef ENONET */
415 if (x
== Mono_Posix_Error_ENOPKG
)
417 {*r
= ENOPKG
; return 0;}
418 #else /* def ENOPKG */
419 {errno
= EINVAL
; return -1;}
420 #endif /* ndef ENOPKG */
421 if (x
== Mono_Posix_Error_EREMOTE
)
423 {*r
= EREMOTE
; return 0;}
424 #else /* def EREMOTE */
425 {errno
= EINVAL
; return -1;}
426 #endif /* ndef EREMOTE */
427 if (x
== Mono_Posix_Error_ENOLINK
)
429 {*r
= ENOLINK
; return 0;}
430 #else /* def ENOLINK */
431 {errno
= EINVAL
; return -1;}
432 #endif /* ndef ENOLINK */
433 if (x
== Mono_Posix_Error_EADV
)
435 {*r
= EADV
; return 0;}
437 {errno
= EINVAL
; return -1;}
438 #endif /* ndef EADV */
439 if (x
== Mono_Posix_Error_ESRMNT
)
441 {*r
= ESRMNT
; return 0;}
442 #else /* def ESRMNT */
443 {errno
= EINVAL
; return -1;}
444 #endif /* ndef ESRMNT */
445 if (x
== Mono_Posix_Error_ECOMM
)
447 {*r
= ECOMM
; return 0;}
448 #else /* def ECOMM */
449 {errno
= EINVAL
; return -1;}
450 #endif /* ndef ECOMM */
451 if (x
== Mono_Posix_Error_EPROTO
)
453 {*r
= EPROTO
; return 0;}
454 #else /* def EPROTO */
455 {errno
= EINVAL
; return -1;}
456 #endif /* ndef EPROTO */
457 if (x
== Mono_Posix_Error_EMULTIHOP
)
459 {*r
= EMULTIHOP
; return 0;}
460 #else /* def EMULTIHOP */
461 {errno
= EINVAL
; return -1;}
462 #endif /* ndef EMULTIHOP */
463 if (x
== Mono_Posix_Error_EDOTDOT
)
465 {*r
= EDOTDOT
; return 0;}
466 #else /* def EDOTDOT */
467 {errno
= EINVAL
; return -1;}
468 #endif /* ndef EDOTDOT */
469 if (x
== Mono_Posix_Error_EBADMSG
)
471 {*r
= EBADMSG
; return 0;}
472 #else /* def EBADMSG */
473 {errno
= EINVAL
; return -1;}
474 #endif /* ndef EBADMSG */
475 if (x
== Mono_Posix_Error_EOVERFLOW
)
477 {*r
= EOVERFLOW
; return 0;}
478 #else /* def EOVERFLOW */
479 {errno
= EINVAL
; return -1;}
480 #endif /* ndef EOVERFLOW */
481 if (x
== Mono_Posix_Error_ENOTUNIQ
)
483 {*r
= ENOTUNIQ
; return 0;}
484 #else /* def ENOTUNIQ */
485 {errno
= EINVAL
; return -1;}
486 #endif /* ndef ENOTUNIQ */
487 if (x
== Mono_Posix_Error_EBADFD
)
489 {*r
= EBADFD
; return 0;}
490 #else /* def EBADFD */
491 {errno
= EINVAL
; return -1;}
492 #endif /* ndef EBADFD */
493 if (x
== Mono_Posix_Error_EREMCHG
)
495 {*r
= EREMCHG
; return 0;}
496 #else /* def EREMCHG */
497 {errno
= EINVAL
; return -1;}
498 #endif /* ndef EREMCHG */
499 if (x
== Mono_Posix_Error_ELIBACC
)
501 {*r
= ELIBACC
; return 0;}
502 #else /* def ELIBACC */
503 {errno
= EINVAL
; return -1;}
504 #endif /* ndef ELIBACC */
505 if (x
== Mono_Posix_Error_ELIBBAD
)
507 {*r
= ELIBBAD
; return 0;}
508 #else /* def ELIBBAD */
509 {errno
= EINVAL
; return -1;}
510 #endif /* ndef ELIBBAD */
511 if (x
== Mono_Posix_Error_ELIBSCN
)
513 {*r
= ELIBSCN
; return 0;}
514 #else /* def ELIBSCN */
515 {errno
= EINVAL
; return -1;}
516 #endif /* ndef ELIBSCN */
517 if (x
== Mono_Posix_Error_ELIBMAX
)
519 {*r
= ELIBMAX
; return 0;}
520 #else /* def ELIBMAX */
521 {errno
= EINVAL
; return -1;}
522 #endif /* ndef ELIBMAX */
523 if (x
== Mono_Posix_Error_ELIBEXEC
)
525 {*r
= ELIBEXEC
; return 0;}
526 #else /* def ELIBEXEC */
527 {errno
= EINVAL
; return -1;}
528 #endif /* ndef ELIBEXEC */
529 if (x
== Mono_Posix_Error_EILSEQ
)
531 {*r
= EILSEQ
; return 0;}
532 #else /* def EILSEQ */
533 {errno
= EINVAL
; return -1;}
534 #endif /* ndef EILSEQ */
535 if (x
== Mono_Posix_Error_ERESTART
)
537 {*r
= ERESTART
; return 0;}
538 #else /* def ERESTART */
539 {errno
= EINVAL
; return -1;}
540 #endif /* ndef ERESTART */
541 if (x
== Mono_Posix_Error_ESTRPIPE
)
543 {*r
= ESTRPIPE
; return 0;}
544 #else /* def ESTRPIPE */
545 {errno
= EINVAL
; return -1;}
546 #endif /* ndef ESTRPIPE */
547 if (x
== Mono_Posix_Error_EUSERS
)
549 {*r
= EUSERS
; return 0;}
550 #else /* def EUSERS */
551 {errno
= EINVAL
; return -1;}
552 #endif /* ndef EUSERS */
553 if (x
== Mono_Posix_Error_ENOTSOCK
)
555 {*r
= ENOTSOCK
; return 0;}
556 #else /* def ENOTSOCK */
557 {errno
= EINVAL
; return -1;}
558 #endif /* ndef ENOTSOCK */
559 if (x
== Mono_Posix_Error_EDESTADDRREQ
)
561 {*r
= EDESTADDRREQ
; return 0;}
562 #else /* def EDESTADDRREQ */
563 {errno
= EINVAL
; return -1;}
564 #endif /* ndef EDESTADDRREQ */
565 if (x
== Mono_Posix_Error_EMSGSIZE
)
567 {*r
= EMSGSIZE
; return 0;}
568 #else /* def EMSGSIZE */
569 {errno
= EINVAL
; return -1;}
570 #endif /* ndef EMSGSIZE */
571 if (x
== Mono_Posix_Error_EPROTOTYPE
)
573 {*r
= EPROTOTYPE
; return 0;}
574 #else /* def EPROTOTYPE */
575 {errno
= EINVAL
; return -1;}
576 #endif /* ndef EPROTOTYPE */
577 if (x
== Mono_Posix_Error_ENOPROTOOPT
)
579 {*r
= ENOPROTOOPT
; return 0;}
580 #else /* def ENOPROTOOPT */
581 {errno
= EINVAL
; return -1;}
582 #endif /* ndef ENOPROTOOPT */
583 if (x
== Mono_Posix_Error_EPROTONOSUPPORT
)
584 #ifdef EPROTONOSUPPORT
585 {*r
= EPROTONOSUPPORT
; return 0;}
586 #else /* def EPROTONOSUPPORT */
587 {errno
= EINVAL
; return -1;}
588 #endif /* ndef EPROTONOSUPPORT */
589 if (x
== Mono_Posix_Error_ESOCKTNOSUPPORT
)
590 #ifdef ESOCKTNOSUPPORT
591 {*r
= ESOCKTNOSUPPORT
; return 0;}
592 #else /* def ESOCKTNOSUPPORT */
593 {errno
= EINVAL
; return -1;}
594 #endif /* ndef ESOCKTNOSUPPORT */
595 if (x
== Mono_Posix_Error_EOPNOTSUPP
)
597 {*r
= EOPNOTSUPP
; return 0;}
598 #else /* def EOPNOTSUPP */
599 {errno
= EINVAL
; return -1;}
600 #endif /* ndef EOPNOTSUPP */
601 if (x
== Mono_Posix_Error_EPFNOSUPPORT
)
603 {*r
= EPFNOSUPPORT
; return 0;}
604 #else /* def EPFNOSUPPORT */
605 {errno
= EINVAL
; return -1;}
606 #endif /* ndef EPFNOSUPPORT */
607 if (x
== Mono_Posix_Error_EAFNOSUPPORT
)
609 {*r
= EAFNOSUPPORT
; return 0;}
610 #else /* def EAFNOSUPPORT */
611 {errno
= EINVAL
; return -1;}
612 #endif /* ndef EAFNOSUPPORT */
613 if (x
== Mono_Posix_Error_EADDRINUSE
)
615 {*r
= EADDRINUSE
; return 0;}
616 #else /* def EADDRINUSE */
617 {errno
= EINVAL
; return -1;}
618 #endif /* ndef EADDRINUSE */
619 if (x
== Mono_Posix_Error_EADDRNOTAVAIL
)
621 {*r
= EADDRNOTAVAIL
; return 0;}
622 #else /* def EADDRNOTAVAIL */
623 {errno
= EINVAL
; return -1;}
624 #endif /* ndef EADDRNOTAVAIL */
625 if (x
== Mono_Posix_Error_ENETDOWN
)
627 {*r
= ENETDOWN
; return 0;}
628 #else /* def ENETDOWN */
629 {errno
= EINVAL
; return -1;}
630 #endif /* ndef ENETDOWN */
631 if (x
== Mono_Posix_Error_ENETUNREACH
)
633 {*r
= ENETUNREACH
; return 0;}
634 #else /* def ENETUNREACH */
635 {errno
= EINVAL
; return -1;}
636 #endif /* ndef ENETUNREACH */
637 if (x
== Mono_Posix_Error_ENETRESET
)
639 {*r
= ENETRESET
; return 0;}
640 #else /* def ENETRESET */
641 {errno
= EINVAL
; return -1;}
642 #endif /* ndef ENETRESET */
643 if (x
== Mono_Posix_Error_ECONNABORTED
)
645 {*r
= ECONNABORTED
; return 0;}
646 #else /* def ECONNABORTED */
647 {errno
= EINVAL
; return -1;}
648 #endif /* ndef ECONNABORTED */
649 if (x
== Mono_Posix_Error_ECONNRESET
)
651 {*r
= ECONNRESET
; return 0;}
652 #else /* def ECONNRESET */
653 {errno
= EINVAL
; return -1;}
654 #endif /* ndef ECONNRESET */
655 if (x
== Mono_Posix_Error_ENOBUFS
)
657 {*r
= ENOBUFS
; return 0;}
658 #else /* def ENOBUFS */
659 {errno
= EINVAL
; return -1;}
660 #endif /* ndef ENOBUFS */
661 if (x
== Mono_Posix_Error_EISCONN
)
663 {*r
= EISCONN
; return 0;}
664 #else /* def EISCONN */
665 {errno
= EINVAL
; return -1;}
666 #endif /* ndef EISCONN */
667 if (x
== Mono_Posix_Error_ENOTCONN
)
669 {*r
= ENOTCONN
; return 0;}
670 #else /* def ENOTCONN */
671 {errno
= EINVAL
; return -1;}
672 #endif /* ndef ENOTCONN */
673 if (x
== Mono_Posix_Error_ESHUTDOWN
)
675 {*r
= ESHUTDOWN
; return 0;}
676 #else /* def ESHUTDOWN */
677 {errno
= EINVAL
; return -1;}
678 #endif /* ndef ESHUTDOWN */
679 if (x
== Mono_Posix_Error_ETOOMANYREFS
)
681 {*r
= ETOOMANYREFS
; return 0;}
682 #else /* def ETOOMANYREFS */
683 {errno
= EINVAL
; return -1;}
684 #endif /* ndef ETOOMANYREFS */
685 if (x
== Mono_Posix_Error_ETIMEDOUT
)
687 {*r
= ETIMEDOUT
; return 0;}
688 #else /* def ETIMEDOUT */
689 {errno
= EINVAL
; return -1;}
690 #endif /* ndef ETIMEDOUT */
691 if (x
== Mono_Posix_Error_ECONNREFUSED
)
693 {*r
= ECONNREFUSED
; return 0;}
694 #else /* def ECONNREFUSED */
695 {errno
= EINVAL
; return -1;}
696 #endif /* ndef ECONNREFUSED */
697 if (x
== Mono_Posix_Error_EHOSTDOWN
)
699 {*r
= EHOSTDOWN
; return 0;}
700 #else /* def EHOSTDOWN */
701 {errno
= EINVAL
; return -1;}
702 #endif /* ndef EHOSTDOWN */
703 if (x
== Mono_Posix_Error_EHOSTUNREACH
)
705 {*r
= EHOSTUNREACH
; return 0;}
706 #else /* def EHOSTUNREACH */
707 {errno
= EINVAL
; return -1;}
708 #endif /* ndef EHOSTUNREACH */
709 if (x
== Mono_Posix_Error_EALREADY
)
711 {*r
= EALREADY
; return 0;}
712 #else /* def EALREADY */
713 {errno
= EINVAL
; return -1;}
714 #endif /* ndef EALREADY */
715 if (x
== Mono_Posix_Error_EINPROGRESS
)
717 {*r
= EINPROGRESS
; return 0;}
718 #else /* def EINPROGRESS */
719 {errno
= EINVAL
; return -1;}
720 #endif /* ndef EINPROGRESS */
721 if (x
== Mono_Posix_Error_ESTALE
)
723 {*r
= ESTALE
; return 0;}
724 #else /* def ESTALE */
725 {errno
= EINVAL
; return -1;}
726 #endif /* ndef ESTALE */
727 if (x
== Mono_Posix_Error_EUCLEAN
)
729 {*r
= EUCLEAN
; return 0;}
730 #else /* def EUCLEAN */
731 {errno
= EINVAL
; return -1;}
732 #endif /* ndef EUCLEAN */
733 if (x
== Mono_Posix_Error_ENOTNAM
)
735 {*r
= ENOTNAM
; return 0;}
736 #else /* def ENOTNAM */
737 {errno
= EINVAL
; return -1;}
738 #endif /* ndef ENOTNAM */
739 if (x
== Mono_Posix_Error_ENAVAIL
)
741 {*r
= ENAVAIL
; return 0;}
742 #else /* def ENAVAIL */
743 {errno
= EINVAL
; return -1;}
744 #endif /* ndef ENAVAIL */
745 if (x
== Mono_Posix_Error_EISNAM
)
747 {*r
= EISNAM
; return 0;}
748 #else /* def EISNAM */
749 {errno
= EINVAL
; return -1;}
750 #endif /* ndef EISNAM */
751 if (x
== Mono_Posix_Error_EREMOTEIO
)
753 {*r
= EREMOTEIO
; return 0;}
754 #else /* def EREMOTEIO */
755 {errno
= EINVAL
; return -1;}
756 #endif /* ndef EREMOTEIO */
757 if (x
== Mono_Posix_Error_EDQUOT
)
759 {*r
= EDQUOT
; return 0;}
760 #else /* def EDQUOT */
761 {errno
= EINVAL
; return -1;}
762 #endif /* ndef EDQUOT */
763 if (x
== Mono_Posix_Error_ENOMEDIUM
)
765 {*r
= ENOMEDIUM
; return 0;}
766 #else /* def ENOMEDIUM */
767 {errno
= EINVAL
; return -1;}
768 #endif /* ndef ENOMEDIUM */
769 if (x
== Mono_Posix_Error_EMEDIUMTYPE
)
771 {*r
= EMEDIUMTYPE
; return 0;}
772 #else /* def EMEDIUMTYPE */
773 {errno
= EINVAL
; return -1;}
774 #endif /* ndef EMEDIUMTYPE */
775 errno
= EINVAL
; return -1;
778 int Mono_Posix_ToError (int x
, int *r
)
785 {*r
= Mono_Posix_Error_EPERM
; return 0;}
786 #endif /* ndef EPERM */
789 {*r
= Mono_Posix_Error_ENOENT
; return 0;}
790 #endif /* ndef ENOENT */
793 {*r
= Mono_Posix_Error_ESRCH
; return 0;}
794 #endif /* ndef ESRCH */
797 {*r
= Mono_Posix_Error_EINTR
; return 0;}
798 #endif /* ndef EINTR */
801 {*r
= Mono_Posix_Error_EIO
; return 0;}
802 #endif /* ndef EIO */
805 {*r
= Mono_Posix_Error_ENXIO
; return 0;}
806 #endif /* ndef ENXIO */
809 {*r
= Mono_Posix_Error_E2BIG
; return 0;}
810 #endif /* ndef E2BIG */
813 {*r
= Mono_Posix_Error_ENOEXEC
; return 0;}
814 #endif /* ndef ENOEXEC */
817 {*r
= Mono_Posix_Error_EBADF
; return 0;}
818 #endif /* ndef EBADF */
821 {*r
= Mono_Posix_Error_ECHILD
; return 0;}
822 #endif /* ndef ECHILD */
825 {*r
= Mono_Posix_Error_EAGAIN
; return 0;}
826 #endif /* ndef EAGAIN */
829 {*r
= Mono_Posix_Error_ENOMEM
; return 0;}
830 #endif /* ndef ENOMEM */
833 {*r
= Mono_Posix_Error_EACCES
; return 0;}
834 #endif /* ndef EACCES */
837 {*r
= Mono_Posix_Error_EFAULT
; return 0;}
838 #endif /* ndef EFAULT */
841 {*r
= Mono_Posix_Error_ENOTBLK
; return 0;}
842 #endif /* ndef ENOTBLK */
845 {*r
= Mono_Posix_Error_EBUSY
; return 0;}
846 #endif /* ndef EBUSY */
849 {*r
= Mono_Posix_Error_EEXIST
; return 0;}
850 #endif /* ndef EEXIST */
853 {*r
= Mono_Posix_Error_EXDEV
; return 0;}
854 #endif /* ndef EXDEV */
857 {*r
= Mono_Posix_Error_ENODEV
; return 0;}
858 #endif /* ndef ENODEV */
861 {*r
= Mono_Posix_Error_ENOTDIR
; return 0;}
862 #endif /* ndef ENOTDIR */
865 {*r
= Mono_Posix_Error_EISDIR
; return 0;}
866 #endif /* ndef EISDIR */
869 {*r
= Mono_Posix_Error_EINVAL
; return 0;}
870 #endif /* ndef EINVAL */
873 {*r
= Mono_Posix_Error_ENFILE
; return 0;}
874 #endif /* ndef ENFILE */
877 {*r
= Mono_Posix_Error_EMFILE
; return 0;}
878 #endif /* ndef EMFILE */
881 {*r
= Mono_Posix_Error_ENOTTY
; return 0;}
882 #endif /* ndef ENOTTY */
885 {*r
= Mono_Posix_Error_ETXTBSY
; return 0;}
886 #endif /* ndef ETXTBSY */
889 {*r
= Mono_Posix_Error_EFBIG
; return 0;}
890 #endif /* ndef EFBIG */
893 {*r
= Mono_Posix_Error_ENOSPC
; return 0;}
894 #endif /* ndef ENOSPC */
897 {*r
= Mono_Posix_Error_ESPIPE
; return 0;}
898 #endif /* ndef ESPIPE */
901 {*r
= Mono_Posix_Error_EROFS
; return 0;}
902 #endif /* ndef EROFS */
905 {*r
= Mono_Posix_Error_EMLINK
; return 0;}
906 #endif /* ndef EMLINK */
909 {*r
= Mono_Posix_Error_EPIPE
; return 0;}
910 #endif /* ndef EPIPE */
913 {*r
= Mono_Posix_Error_EDOM
; return 0;}
914 #endif /* ndef EDOM */
917 {*r
= Mono_Posix_Error_ERANGE
; return 0;}
918 #endif /* ndef ERANGE */
921 {*r
= Mono_Posix_Error_EDEADLK
; return 0;}
922 #endif /* ndef EDEADLK */
924 if (x
== ENAMETOOLONG
)
925 {*r
= Mono_Posix_Error_ENAMETOOLONG
; return 0;}
926 #endif /* ndef ENAMETOOLONG */
929 {*r
= Mono_Posix_Error_ENOLCK
; return 0;}
930 #endif /* ndef ENOLCK */
933 {*r
= Mono_Posix_Error_ENOSYS
; return 0;}
934 #endif /* ndef ENOSYS */
937 {*r
= Mono_Posix_Error_ENOTEMPTY
; return 0;}
938 #endif /* ndef ENOTEMPTY */
941 {*r
= Mono_Posix_Error_ELOOP
; return 0;}
942 #endif /* ndef ELOOP */
944 if (x
== EWOULDBLOCK
)
945 {*r
= Mono_Posix_Error_EWOULDBLOCK
; return 0;}
946 #endif /* ndef EWOULDBLOCK */
949 {*r
= Mono_Posix_Error_ENOMSG
; return 0;}
950 #endif /* ndef ENOMSG */
953 {*r
= Mono_Posix_Error_EIDRM
; return 0;}
954 #endif /* ndef EIDRM */
957 {*r
= Mono_Posix_Error_ECHRNG
; return 0;}
958 #endif /* ndef ECHRNG */
961 {*r
= Mono_Posix_Error_EL2NSYNC
; return 0;}
962 #endif /* ndef EL2NSYNC */
965 {*r
= Mono_Posix_Error_EL3HLT
; return 0;}
966 #endif /* ndef EL3HLT */
969 {*r
= Mono_Posix_Error_EL3RST
; return 0;}
970 #endif /* ndef EL3RST */
973 {*r
= Mono_Posix_Error_ELNRNG
; return 0;}
974 #endif /* ndef ELNRNG */
977 {*r
= Mono_Posix_Error_EUNATCH
; return 0;}
978 #endif /* ndef EUNATCH */
981 {*r
= Mono_Posix_Error_ENOCSI
; return 0;}
982 #endif /* ndef ENOCSI */
985 {*r
= Mono_Posix_Error_EL2HLT
; return 0;}
986 #endif /* ndef EL2HLT */
989 {*r
= Mono_Posix_Error_EBADE
; return 0;}
990 #endif /* ndef EBADE */
993 {*r
= Mono_Posix_Error_EBADR
; return 0;}
994 #endif /* ndef EBADR */
997 {*r
= Mono_Posix_Error_EXFULL
; return 0;}
998 #endif /* ndef EXFULL */
1001 {*r
= Mono_Posix_Error_ENOANO
; return 0;}
1002 #endif /* ndef ENOANO */
1005 {*r
= Mono_Posix_Error_EBADRQC
; return 0;}
1006 #endif /* ndef EBADRQC */
1009 {*r
= Mono_Posix_Error_EBADSLT
; return 0;}
1010 #endif /* ndef EBADSLT */
1013 {*r
= Mono_Posix_Error_EDEADLOCK
; return 0;}
1014 #endif /* ndef EDEADLOCK */
1017 {*r
= Mono_Posix_Error_EBFONT
; return 0;}
1018 #endif /* ndef EBFONT */
1021 {*r
= Mono_Posix_Error_ENOSTR
; return 0;}
1022 #endif /* ndef ENOSTR */
1025 {*r
= Mono_Posix_Error_ENODATA
; return 0;}
1026 #endif /* ndef ENODATA */
1029 {*r
= Mono_Posix_Error_ETIME
; return 0;}
1030 #endif /* ndef ETIME */
1033 {*r
= Mono_Posix_Error_ENOSR
; return 0;}
1034 #endif /* ndef ENOSR */
1037 {*r
= Mono_Posix_Error_ENONET
; return 0;}
1038 #endif /* ndef ENONET */
1041 {*r
= Mono_Posix_Error_ENOPKG
; return 0;}
1042 #endif /* ndef ENOPKG */
1045 {*r
= Mono_Posix_Error_EREMOTE
; return 0;}
1046 #endif /* ndef EREMOTE */
1049 {*r
= Mono_Posix_Error_ENOLINK
; return 0;}
1050 #endif /* ndef ENOLINK */
1053 {*r
= Mono_Posix_Error_EADV
; return 0;}
1054 #endif /* ndef EADV */
1057 {*r
= Mono_Posix_Error_ESRMNT
; return 0;}
1058 #endif /* ndef ESRMNT */
1061 {*r
= Mono_Posix_Error_ECOMM
; return 0;}
1062 #endif /* ndef ECOMM */
1065 {*r
= Mono_Posix_Error_EPROTO
; return 0;}
1066 #endif /* ndef EPROTO */
1069 {*r
= Mono_Posix_Error_EMULTIHOP
; return 0;}
1070 #endif /* ndef EMULTIHOP */
1073 {*r
= Mono_Posix_Error_EDOTDOT
; return 0;}
1074 #endif /* ndef EDOTDOT */
1077 {*r
= Mono_Posix_Error_EBADMSG
; return 0;}
1078 #endif /* ndef EBADMSG */
1081 {*r
= Mono_Posix_Error_EOVERFLOW
; return 0;}
1082 #endif /* ndef EOVERFLOW */
1085 {*r
= Mono_Posix_Error_ENOTUNIQ
; return 0;}
1086 #endif /* ndef ENOTUNIQ */
1089 {*r
= Mono_Posix_Error_EBADFD
; return 0;}
1090 #endif /* ndef EBADFD */
1093 {*r
= Mono_Posix_Error_EREMCHG
; return 0;}
1094 #endif /* ndef EREMCHG */
1097 {*r
= Mono_Posix_Error_ELIBACC
; return 0;}
1098 #endif /* ndef ELIBACC */
1101 {*r
= Mono_Posix_Error_ELIBBAD
; return 0;}
1102 #endif /* ndef ELIBBAD */
1105 {*r
= Mono_Posix_Error_ELIBSCN
; return 0;}
1106 #endif /* ndef ELIBSCN */
1109 {*r
= Mono_Posix_Error_ELIBMAX
; return 0;}
1110 #endif /* ndef ELIBMAX */
1113 {*r
= Mono_Posix_Error_ELIBEXEC
; return 0;}
1114 #endif /* ndef ELIBEXEC */
1117 {*r
= Mono_Posix_Error_EILSEQ
; return 0;}
1118 #endif /* ndef EILSEQ */
1121 {*r
= Mono_Posix_Error_ERESTART
; return 0;}
1122 #endif /* ndef ERESTART */
1125 {*r
= Mono_Posix_Error_ESTRPIPE
; return 0;}
1126 #endif /* ndef ESTRPIPE */
1129 {*r
= Mono_Posix_Error_EUSERS
; return 0;}
1130 #endif /* ndef EUSERS */
1133 {*r
= Mono_Posix_Error_ENOTSOCK
; return 0;}
1134 #endif /* ndef ENOTSOCK */
1136 if (x
== EDESTADDRREQ
)
1137 {*r
= Mono_Posix_Error_EDESTADDRREQ
; return 0;}
1138 #endif /* ndef EDESTADDRREQ */
1141 {*r
= Mono_Posix_Error_EMSGSIZE
; return 0;}
1142 #endif /* ndef EMSGSIZE */
1144 if (x
== EPROTOTYPE
)
1145 {*r
= Mono_Posix_Error_EPROTOTYPE
; return 0;}
1146 #endif /* ndef EPROTOTYPE */
1148 if (x
== ENOPROTOOPT
)
1149 {*r
= Mono_Posix_Error_ENOPROTOOPT
; return 0;}
1150 #endif /* ndef ENOPROTOOPT */
1151 #ifdef EPROTONOSUPPORT
1152 if (x
== EPROTONOSUPPORT
)
1153 {*r
= Mono_Posix_Error_EPROTONOSUPPORT
; return 0;}
1154 #endif /* ndef EPROTONOSUPPORT */
1155 #ifdef ESOCKTNOSUPPORT
1156 if (x
== ESOCKTNOSUPPORT
)
1157 {*r
= Mono_Posix_Error_ESOCKTNOSUPPORT
; return 0;}
1158 #endif /* ndef ESOCKTNOSUPPORT */
1160 if (x
== EOPNOTSUPP
)
1161 {*r
= Mono_Posix_Error_EOPNOTSUPP
; return 0;}
1162 #endif /* ndef EOPNOTSUPP */
1164 if (x
== EPFNOSUPPORT
)
1165 {*r
= Mono_Posix_Error_EPFNOSUPPORT
; return 0;}
1166 #endif /* ndef EPFNOSUPPORT */
1168 if (x
== EAFNOSUPPORT
)
1169 {*r
= Mono_Posix_Error_EAFNOSUPPORT
; return 0;}
1170 #endif /* ndef EAFNOSUPPORT */
1172 if (x
== EADDRINUSE
)
1173 {*r
= Mono_Posix_Error_EADDRINUSE
; return 0;}
1174 #endif /* ndef EADDRINUSE */
1175 #ifdef EADDRNOTAVAIL
1176 if (x
== EADDRNOTAVAIL
)
1177 {*r
= Mono_Posix_Error_EADDRNOTAVAIL
; return 0;}
1178 #endif /* ndef EADDRNOTAVAIL */
1181 {*r
= Mono_Posix_Error_ENETDOWN
; return 0;}
1182 #endif /* ndef ENETDOWN */
1184 if (x
== ENETUNREACH
)
1185 {*r
= Mono_Posix_Error_ENETUNREACH
; return 0;}
1186 #endif /* ndef ENETUNREACH */
1189 {*r
= Mono_Posix_Error_ENETRESET
; return 0;}
1190 #endif /* ndef ENETRESET */
1192 if (x
== ECONNABORTED
)
1193 {*r
= Mono_Posix_Error_ECONNABORTED
; return 0;}
1194 #endif /* ndef ECONNABORTED */
1196 if (x
== ECONNRESET
)
1197 {*r
= Mono_Posix_Error_ECONNRESET
; return 0;}
1198 #endif /* ndef ECONNRESET */
1201 {*r
= Mono_Posix_Error_ENOBUFS
; return 0;}
1202 #endif /* ndef ENOBUFS */
1205 {*r
= Mono_Posix_Error_EISCONN
; return 0;}
1206 #endif /* ndef EISCONN */
1209 {*r
= Mono_Posix_Error_ENOTCONN
; return 0;}
1210 #endif /* ndef ENOTCONN */
1213 {*r
= Mono_Posix_Error_ESHUTDOWN
; return 0;}
1214 #endif /* ndef ESHUTDOWN */
1216 if (x
== ETOOMANYREFS
)
1217 {*r
= Mono_Posix_Error_ETOOMANYREFS
; return 0;}
1218 #endif /* ndef ETOOMANYREFS */
1221 {*r
= Mono_Posix_Error_ETIMEDOUT
; return 0;}
1222 #endif /* ndef ETIMEDOUT */
1224 if (x
== ECONNREFUSED
)
1225 {*r
= Mono_Posix_Error_ECONNREFUSED
; return 0;}
1226 #endif /* ndef ECONNREFUSED */
1229 {*r
= Mono_Posix_Error_EHOSTDOWN
; return 0;}
1230 #endif /* ndef EHOSTDOWN */
1232 if (x
== EHOSTUNREACH
)
1233 {*r
= Mono_Posix_Error_EHOSTUNREACH
; return 0;}
1234 #endif /* ndef EHOSTUNREACH */
1237 {*r
= Mono_Posix_Error_EALREADY
; return 0;}
1238 #endif /* ndef EALREADY */
1240 if (x
== EINPROGRESS
)
1241 {*r
= Mono_Posix_Error_EINPROGRESS
; return 0;}
1242 #endif /* ndef EINPROGRESS */
1245 {*r
= Mono_Posix_Error_ESTALE
; return 0;}
1246 #endif /* ndef ESTALE */
1249 {*r
= Mono_Posix_Error_EUCLEAN
; return 0;}
1250 #endif /* ndef EUCLEAN */
1253 {*r
= Mono_Posix_Error_ENOTNAM
; return 0;}
1254 #endif /* ndef ENOTNAM */
1257 {*r
= Mono_Posix_Error_ENAVAIL
; return 0;}
1258 #endif /* ndef ENAVAIL */
1261 {*r
= Mono_Posix_Error_EISNAM
; return 0;}
1262 #endif /* ndef EISNAM */
1265 {*r
= Mono_Posix_Error_EREMOTEIO
; return 0;}
1266 #endif /* ndef EREMOTEIO */
1269 {*r
= Mono_Posix_Error_EDQUOT
; return 0;}
1270 #endif /* ndef EDQUOT */
1273 {*r
= Mono_Posix_Error_ENOMEDIUM
; return 0;}
1274 #endif /* ndef ENOMEDIUM */
1276 if (x
== EMEDIUMTYPE
)
1277 {*r
= Mono_Posix_Error_EMEDIUMTYPE
; return 0;}
1278 #endif /* ndef EMEDIUMTYPE */
1279 errno
= EINVAL
; return -1;
1282 int Mono_Posix_FromOpenFlags (int x
, int *r
)
1287 if ((x
& Mono_Posix_OpenFlags_O_RDONLY
) == Mono_Posix_OpenFlags_O_RDONLY
)
1290 #else /* def O_RDONLY */
1291 {errno
= EINVAL
; return -1;}
1292 #endif /* ndef O_RDONLY */
1293 if ((x
& Mono_Posix_OpenFlags_O_WRONLY
) == Mono_Posix_OpenFlags_O_WRONLY
)
1296 #else /* def O_WRONLY */
1297 {errno
= EINVAL
; return -1;}
1298 #endif /* ndef O_WRONLY */
1299 if ((x
& Mono_Posix_OpenFlags_O_RDWR
) == Mono_Posix_OpenFlags_O_RDWR
)
1302 #else /* def O_RDWR */
1303 {errno
= EINVAL
; return -1;}
1304 #endif /* ndef O_RDWR */
1305 if ((x
& Mono_Posix_OpenFlags_O_CREAT
) == Mono_Posix_OpenFlags_O_CREAT
)
1308 #else /* def O_CREAT */
1309 {errno
= EINVAL
; return -1;}
1310 #endif /* ndef O_CREAT */
1311 if ((x
& Mono_Posix_OpenFlags_O_EXCL
) == Mono_Posix_OpenFlags_O_EXCL
)
1314 #else /* def O_EXCL */
1315 {errno
= EINVAL
; return -1;}
1316 #endif /* ndef O_EXCL */
1317 if ((x
& Mono_Posix_OpenFlags_O_NOCTTY
) == Mono_Posix_OpenFlags_O_NOCTTY
)
1320 #else /* def O_NOCTTY */
1321 {errno
= EINVAL
; return -1;}
1322 #endif /* ndef O_NOCTTY */
1323 if ((x
& Mono_Posix_OpenFlags_O_TRUNC
) == Mono_Posix_OpenFlags_O_TRUNC
)
1326 #else /* def O_TRUNC */
1327 {errno
= EINVAL
; return -1;}
1328 #endif /* ndef O_TRUNC */
1329 if ((x
& Mono_Posix_OpenFlags_O_APPEND
) == Mono_Posix_OpenFlags_O_APPEND
)
1332 #else /* def O_APPEND */
1333 {errno
= EINVAL
; return -1;}
1334 #endif /* ndef O_APPEND */
1335 if ((x
& Mono_Posix_OpenFlags_O_NONBLOCK
) == Mono_Posix_OpenFlags_O_NONBLOCK
)
1338 #else /* def O_NONBLOCK */
1339 {errno
= EINVAL
; return -1;}
1340 #endif /* ndef O_NONBLOCK */
1341 if ((x
& Mono_Posix_OpenFlags_O_SYNC
) == Mono_Posix_OpenFlags_O_SYNC
)
1344 #else /* def O_SYNC */
1345 {errno
= EINVAL
; return -1;}
1346 #endif /* ndef O_SYNC */
1347 if ((x
& Mono_Posix_OpenFlags_O_NOFOLLOW
) == Mono_Posix_OpenFlags_O_NOFOLLOW
)
1350 #else /* def O_NOFOLLOW */
1351 {errno
= EINVAL
; return -1;}
1352 #endif /* ndef O_NOFOLLOW */
1353 if ((x
& Mono_Posix_OpenFlags_O_DIRECTORY
) == Mono_Posix_OpenFlags_O_DIRECTORY
)
1356 #else /* def O_DIRECTORY */
1357 {errno
= EINVAL
; return -1;}
1358 #endif /* ndef O_DIRECTORY */
1359 if ((x
& Mono_Posix_OpenFlags_O_DIRECT
) == Mono_Posix_OpenFlags_O_DIRECT
)
1362 #else /* def O_DIRECT */
1363 {errno
= EINVAL
; return -1;}
1364 #endif /* ndef O_DIRECT */
1365 if ((x
& Mono_Posix_OpenFlags_O_ASYNC
) == Mono_Posix_OpenFlags_O_ASYNC
)
1368 #else /* def O_ASYNC */
1369 {errno
= EINVAL
; return -1;}
1370 #endif /* ndef O_ASYNC */
1371 if ((x
& Mono_Posix_OpenFlags_O_LARGEFILE
) == Mono_Posix_OpenFlags_O_LARGEFILE
)
1374 #else /* def O_LARGEFILE */
1375 {errno
= EINVAL
; return -1;}
1376 #endif /* ndef O_LARGEFILE */
1380 int Mono_Posix_ToOpenFlags (int x
, int *r
)
1386 if ((x
& O_RDONLY
) == O_RDONLY
)
1387 *r
|= Mono_Posix_OpenFlags_O_RDONLY
;
1388 #endif /* ndef O_RDONLY */
1390 if ((x
& O_WRONLY
) == O_WRONLY
)
1391 *r
|= Mono_Posix_OpenFlags_O_WRONLY
;
1392 #endif /* ndef O_WRONLY */
1394 if ((x
& O_RDWR
) == O_RDWR
)
1395 *r
|= Mono_Posix_OpenFlags_O_RDWR
;
1396 #endif /* ndef O_RDWR */
1398 if ((x
& O_CREAT
) == O_CREAT
)
1399 *r
|= Mono_Posix_OpenFlags_O_CREAT
;
1400 #endif /* ndef O_CREAT */
1402 if ((x
& O_EXCL
) == O_EXCL
)
1403 *r
|= Mono_Posix_OpenFlags_O_EXCL
;
1404 #endif /* ndef O_EXCL */
1406 if ((x
& O_NOCTTY
) == O_NOCTTY
)
1407 *r
|= Mono_Posix_OpenFlags_O_NOCTTY
;
1408 #endif /* ndef O_NOCTTY */
1410 if ((x
& O_TRUNC
) == O_TRUNC
)
1411 *r
|= Mono_Posix_OpenFlags_O_TRUNC
;
1412 #endif /* ndef O_TRUNC */
1414 if ((x
& O_APPEND
) == O_APPEND
)
1415 *r
|= Mono_Posix_OpenFlags_O_APPEND
;
1416 #endif /* ndef O_APPEND */
1418 if ((x
& O_NONBLOCK
) == O_NONBLOCK
)
1419 *r
|= Mono_Posix_OpenFlags_O_NONBLOCK
;
1420 #endif /* ndef O_NONBLOCK */
1422 if ((x
& O_SYNC
) == O_SYNC
)
1423 *r
|= Mono_Posix_OpenFlags_O_SYNC
;
1424 #endif /* ndef O_SYNC */
1426 if ((x
& O_NOFOLLOW
) == O_NOFOLLOW
)
1427 *r
|= Mono_Posix_OpenFlags_O_NOFOLLOW
;
1428 #endif /* ndef O_NOFOLLOW */
1430 if ((x
& O_DIRECTORY
) == O_DIRECTORY
)
1431 *r
|= Mono_Posix_OpenFlags_O_DIRECTORY
;
1432 #endif /* ndef O_DIRECTORY */
1434 if ((x
& O_DIRECT
) == O_DIRECT
)
1435 *r
|= Mono_Posix_OpenFlags_O_DIRECT
;
1436 #endif /* ndef O_DIRECT */
1438 if ((x
& O_ASYNC
) == O_ASYNC
)
1439 *r
|= Mono_Posix_OpenFlags_O_ASYNC
;
1440 #endif /* ndef O_ASYNC */
1442 if ((x
& O_LARGEFILE
) == O_LARGEFILE
)
1443 *r
|= Mono_Posix_OpenFlags_O_LARGEFILE
;
1444 #endif /* ndef O_LARGEFILE */
1448 int Mono_Posix_FromFilePermissions (unsigned int x
, unsigned int *r
)
1453 if ((x
& Mono_Posix_FilePermissions_S_ISUID
) == Mono_Posix_FilePermissions_S_ISUID
)
1456 #else /* def S_ISUID */
1457 {errno
= EINVAL
; return -1;}
1458 #endif /* ndef S_ISUID */
1459 if ((x
& Mono_Posix_FilePermissions_S_ISGID
) == Mono_Posix_FilePermissions_S_ISGID
)
1462 #else /* def S_ISGID */
1463 {errno
= EINVAL
; return -1;}
1464 #endif /* ndef S_ISGID */
1465 if ((x
& Mono_Posix_FilePermissions_S_ISVTX
) == Mono_Posix_FilePermissions_S_ISVTX
)
1468 #else /* def S_ISVTX */
1469 {errno
= EINVAL
; return -1;}
1470 #endif /* ndef S_ISVTX */
1471 if ((x
& Mono_Posix_FilePermissions_S_IRUSR
) == Mono_Posix_FilePermissions_S_IRUSR
)
1474 #else /* def S_IRUSR */
1475 {errno
= EINVAL
; return -1;}
1476 #endif /* ndef S_IRUSR */
1477 if ((x
& Mono_Posix_FilePermissions_S_IWUSR
) == Mono_Posix_FilePermissions_S_IWUSR
)
1480 #else /* def S_IWUSR */
1481 {errno
= EINVAL
; return -1;}
1482 #endif /* ndef S_IWUSR */
1483 if ((x
& Mono_Posix_FilePermissions_S_IXUSR
) == Mono_Posix_FilePermissions_S_IXUSR
)
1486 #else /* def S_IXUSR */
1487 {errno
= EINVAL
; return -1;}
1488 #endif /* ndef S_IXUSR */
1489 if ((x
& Mono_Posix_FilePermissions_S_IRGRP
) == Mono_Posix_FilePermissions_S_IRGRP
)
1492 #else /* def S_IRGRP */
1493 {errno
= EINVAL
; return -1;}
1494 #endif /* ndef S_IRGRP */
1495 if ((x
& Mono_Posix_FilePermissions_S_IWGRP
) == Mono_Posix_FilePermissions_S_IWGRP
)
1498 #else /* def S_IWGRP */
1499 {errno
= EINVAL
; return -1;}
1500 #endif /* ndef S_IWGRP */
1501 if ((x
& Mono_Posix_FilePermissions_S_IXGRP
) == Mono_Posix_FilePermissions_S_IXGRP
)
1504 #else /* def S_IXGRP */
1505 {errno
= EINVAL
; return -1;}
1506 #endif /* ndef S_IXGRP */
1507 if ((x
& Mono_Posix_FilePermissions_S_IROTH
) == Mono_Posix_FilePermissions_S_IROTH
)
1510 #else /* def S_IROTH */
1511 {errno
= EINVAL
; return -1;}
1512 #endif /* ndef S_IROTH */
1513 if ((x
& Mono_Posix_FilePermissions_S_IWOTH
) == Mono_Posix_FilePermissions_S_IWOTH
)
1516 #else /* def S_IWOTH */
1517 {errno
= EINVAL
; return -1;}
1518 #endif /* ndef S_IWOTH */
1519 if ((x
& Mono_Posix_FilePermissions_S_IXOTH
) == Mono_Posix_FilePermissions_S_IXOTH
)
1522 #else /* def S_IXOTH */
1523 {errno
= EINVAL
; return -1;}
1524 #endif /* ndef S_IXOTH */
1525 if ((x
& Mono_Posix_FilePermissions_S_IRWXG
) == Mono_Posix_FilePermissions_S_IRWXG
)
1528 #else /* def S_IRWXG */
1529 {errno
= EINVAL
; return -1;}
1530 #endif /* ndef S_IRWXG */
1531 if ((x
& Mono_Posix_FilePermissions_S_IRWXU
) == Mono_Posix_FilePermissions_S_IRWXU
)
1534 #else /* def S_IRWXU */
1535 {errno
= EINVAL
; return -1;}
1536 #endif /* ndef S_IRWXU */
1537 if ((x
& Mono_Posix_FilePermissions_S_IRWXO
) == Mono_Posix_FilePermissions_S_IRWXO
)
1540 #else /* def S_IRWXO */
1541 {errno
= EINVAL
; return -1;}
1542 #endif /* ndef S_IRWXO */
1543 if ((x
& Mono_Posix_FilePermissions_ACCESSPERMS
) == Mono_Posix_FilePermissions_ACCESSPERMS
)
1546 #else /* def ACCESSPERMS */
1547 {errno
= EINVAL
; return -1;}
1548 #endif /* ndef ACCESSPERMS */
1549 if ((x
& Mono_Posix_FilePermissions_ALLPERMS
) == Mono_Posix_FilePermissions_ALLPERMS
)
1552 #else /* def ALLPERMS */
1553 {errno
= EINVAL
; return -1;}
1554 #endif /* ndef ALLPERMS */
1555 if ((x
& Mono_Posix_FilePermissions_DEFFILEMODE
) == Mono_Posix_FilePermissions_DEFFILEMODE
)
1558 #else /* def DEFFILEMODE */
1559 {errno
= EINVAL
; return -1;}
1560 #endif /* ndef DEFFILEMODE */
1561 if ((x
& Mono_Posix_FilePermissions_S_IFMT
) == Mono_Posix_FilePermissions_S_IFMT
)
1564 #else /* def S_IFMT */
1565 {errno
= EINVAL
; return -1;}
1566 #endif /* ndef S_IFMT */
1567 if ((x
& Mono_Posix_FilePermissions_S_IFDIR
) == Mono_Posix_FilePermissions_S_IFDIR
)
1570 #else /* def S_IFDIR */
1571 {errno
= EINVAL
; return -1;}
1572 #endif /* ndef S_IFDIR */
1573 if ((x
& Mono_Posix_FilePermissions_S_IFCHR
) == Mono_Posix_FilePermissions_S_IFCHR
)
1576 #else /* def S_IFCHR */
1577 {errno
= EINVAL
; return -1;}
1578 #endif /* ndef S_IFCHR */
1579 if ((x
& Mono_Posix_FilePermissions_S_IFBLK
) == Mono_Posix_FilePermissions_S_IFBLK
)
1582 #else /* def S_IFBLK */
1583 {errno
= EINVAL
; return -1;}
1584 #endif /* ndef S_IFBLK */
1585 if ((x
& Mono_Posix_FilePermissions_S_IFREG
) == Mono_Posix_FilePermissions_S_IFREG
)
1588 #else /* def S_IFREG */
1589 {errno
= EINVAL
; return -1;}
1590 #endif /* ndef S_IFREG */
1591 if ((x
& Mono_Posix_FilePermissions_S_IFIFO
) == Mono_Posix_FilePermissions_S_IFIFO
)
1594 #else /* def S_IFIFO */
1595 {errno
= EINVAL
; return -1;}
1596 #endif /* ndef S_IFIFO */
1597 if ((x
& Mono_Posix_FilePermissions_S_IFLNK
) == Mono_Posix_FilePermissions_S_IFLNK
)
1600 #else /* def S_IFLNK */
1601 {errno
= EINVAL
; return -1;}
1602 #endif /* ndef S_IFLNK */
1603 if ((x
& Mono_Posix_FilePermissions_S_IFSOCK
) == Mono_Posix_FilePermissions_S_IFSOCK
)
1606 #else /* def S_IFSOCK */
1607 {errno
= EINVAL
; return -1;}
1608 #endif /* ndef S_IFSOCK */
1612 int Mono_Posix_ToFilePermissions (unsigned int x
, unsigned int *r
)
1618 if ((x
& S_ISUID
) == S_ISUID
)
1619 *r
|= Mono_Posix_FilePermissions_S_ISUID
;
1620 #endif /* ndef S_ISUID */
1622 if ((x
& S_ISGID
) == S_ISGID
)
1623 *r
|= Mono_Posix_FilePermissions_S_ISGID
;
1624 #endif /* ndef S_ISGID */
1626 if ((x
& S_ISVTX
) == S_ISVTX
)
1627 *r
|= Mono_Posix_FilePermissions_S_ISVTX
;
1628 #endif /* ndef S_ISVTX */
1630 if ((x
& S_IRUSR
) == S_IRUSR
)
1631 *r
|= Mono_Posix_FilePermissions_S_IRUSR
;
1632 #endif /* ndef S_IRUSR */
1634 if ((x
& S_IWUSR
) == S_IWUSR
)
1635 *r
|= Mono_Posix_FilePermissions_S_IWUSR
;
1636 #endif /* ndef S_IWUSR */
1638 if ((x
& S_IXUSR
) == S_IXUSR
)
1639 *r
|= Mono_Posix_FilePermissions_S_IXUSR
;
1640 #endif /* ndef S_IXUSR */
1642 if ((x
& S_IRGRP
) == S_IRGRP
)
1643 *r
|= Mono_Posix_FilePermissions_S_IRGRP
;
1644 #endif /* ndef S_IRGRP */
1646 if ((x
& S_IWGRP
) == S_IWGRP
)
1647 *r
|= Mono_Posix_FilePermissions_S_IWGRP
;
1648 #endif /* ndef S_IWGRP */
1650 if ((x
& S_IXGRP
) == S_IXGRP
)
1651 *r
|= Mono_Posix_FilePermissions_S_IXGRP
;
1652 #endif /* ndef S_IXGRP */
1654 if ((x
& S_IROTH
) == S_IROTH
)
1655 *r
|= Mono_Posix_FilePermissions_S_IROTH
;
1656 #endif /* ndef S_IROTH */
1658 if ((x
& S_IWOTH
) == S_IWOTH
)
1659 *r
|= Mono_Posix_FilePermissions_S_IWOTH
;
1660 #endif /* ndef S_IWOTH */
1662 if ((x
& S_IXOTH
) == S_IXOTH
)
1663 *r
|= Mono_Posix_FilePermissions_S_IXOTH
;
1664 #endif /* ndef S_IXOTH */
1666 if ((x
& S_IRWXG
) == S_IRWXG
)
1667 *r
|= Mono_Posix_FilePermissions_S_IRWXG
;
1668 #endif /* ndef S_IRWXG */
1670 if ((x
& S_IRWXU
) == S_IRWXU
)
1671 *r
|= Mono_Posix_FilePermissions_S_IRWXU
;
1672 #endif /* ndef S_IRWXU */
1674 if ((x
& S_IRWXO
) == S_IRWXO
)
1675 *r
|= Mono_Posix_FilePermissions_S_IRWXO
;
1676 #endif /* ndef S_IRWXO */
1678 if ((x
& ACCESSPERMS
) == ACCESSPERMS
)
1679 *r
|= Mono_Posix_FilePermissions_ACCESSPERMS
;
1680 #endif /* ndef ACCESSPERMS */
1682 if ((x
& ALLPERMS
) == ALLPERMS
)
1683 *r
|= Mono_Posix_FilePermissions_ALLPERMS
;
1684 #endif /* ndef ALLPERMS */
1686 if ((x
& DEFFILEMODE
) == DEFFILEMODE
)
1687 *r
|= Mono_Posix_FilePermissions_DEFFILEMODE
;
1688 #endif /* ndef DEFFILEMODE */
1690 if ((x
& S_IFMT
) == S_IFMT
)
1691 *r
|= Mono_Posix_FilePermissions_S_IFMT
;
1692 #endif /* ndef S_IFMT */
1694 if ((x
& S_IFDIR
) == S_IFDIR
)
1695 *r
|= Mono_Posix_FilePermissions_S_IFDIR
;
1696 #endif /* ndef S_IFDIR */
1698 if ((x
& S_IFCHR
) == S_IFCHR
)
1699 *r
|= Mono_Posix_FilePermissions_S_IFCHR
;
1700 #endif /* ndef S_IFCHR */
1702 if ((x
& S_IFBLK
) == S_IFBLK
)
1703 *r
|= Mono_Posix_FilePermissions_S_IFBLK
;
1704 #endif /* ndef S_IFBLK */
1706 if ((x
& S_IFREG
) == S_IFREG
)
1707 *r
|= Mono_Posix_FilePermissions_S_IFREG
;
1708 #endif /* ndef S_IFREG */
1710 if ((x
& S_IFIFO
) == S_IFIFO
)
1711 *r
|= Mono_Posix_FilePermissions_S_IFIFO
;
1712 #endif /* ndef S_IFIFO */
1714 if ((x
& S_IFLNK
) == S_IFLNK
)
1715 *r
|= Mono_Posix_FilePermissions_S_IFLNK
;
1716 #endif /* ndef S_IFLNK */
1718 if ((x
& S_IFSOCK
) == S_IFSOCK
)
1719 *r
|= Mono_Posix_FilePermissions_S_IFSOCK
;
1720 #endif /* ndef S_IFSOCK */
1724 int Mono_Posix_FromFcntlCommand (int x
, int *r
)
1729 if (x
== Mono_Posix_FcntlCommand_F_DUPFD
)
1731 {*r
= F_DUPFD
; return 0;}
1732 #else /* def F_DUPFD */
1733 {errno
= EINVAL
; return -1;}
1734 #endif /* ndef F_DUPFD */
1735 if (x
== Mono_Posix_FcntlCommand_F_GETFD
)
1737 {*r
= F_GETFD
; return 0;}
1738 #else /* def F_GETFD */
1739 {errno
= EINVAL
; return -1;}
1740 #endif /* ndef F_GETFD */
1741 if (x
== Mono_Posix_FcntlCommand_F_SETFD
)
1743 {*r
= F_SETFD
; return 0;}
1744 #else /* def F_SETFD */
1745 {errno
= EINVAL
; return -1;}
1746 #endif /* ndef F_SETFD */
1747 if (x
== Mono_Posix_FcntlCommand_F_GETFL
)
1749 {*r
= F_GETFL
; return 0;}
1750 #else /* def F_GETFL */
1751 {errno
= EINVAL
; return -1;}
1752 #endif /* ndef F_GETFL */
1753 if (x
== Mono_Posix_FcntlCommand_F_SETFL
)
1755 {*r
= F_SETFL
; return 0;}
1756 #else /* def F_SETFL */
1757 {errno
= EINVAL
; return -1;}
1758 #endif /* ndef F_SETFL */
1759 if (x
== Mono_Posix_FcntlCommand_F_GETLK
)
1761 {*r
= F_GETLK
; return 0;}
1762 #else /* def F_GETLK */
1763 {errno
= EINVAL
; return -1;}
1764 #endif /* ndef F_GETLK */
1765 if (x
== Mono_Posix_FcntlCommand_F_SETLK
)
1767 {*r
= F_SETLK
; return 0;}
1768 #else /* def F_SETLK */
1769 {errno
= EINVAL
; return -1;}
1770 #endif /* ndef F_SETLK */
1771 if (x
== Mono_Posix_FcntlCommand_F_SETLKW
)
1773 {*r
= F_SETLKW
; return 0;}
1774 #else /* def F_SETLKW */
1775 {errno
= EINVAL
; return -1;}
1776 #endif /* ndef F_SETLKW */
1777 if (x
== Mono_Posix_FcntlCommand_F_SETOWN
)
1779 {*r
= F_SETOWN
; return 0;}
1780 #else /* def F_SETOWN */
1781 {errno
= EINVAL
; return -1;}
1782 #endif /* ndef F_SETOWN */
1783 if (x
== Mono_Posix_FcntlCommand_F_GETOWN
)
1785 {*r
= F_GETOWN
; return 0;}
1786 #else /* def F_GETOWN */
1787 {errno
= EINVAL
; return -1;}
1788 #endif /* ndef F_GETOWN */
1789 if (x
== Mono_Posix_FcntlCommand_F_SETSIG
)
1791 {*r
= F_SETSIG
; return 0;}
1792 #else /* def F_SETSIG */
1793 {errno
= EINVAL
; return -1;}
1794 #endif /* ndef F_SETSIG */
1795 if (x
== Mono_Posix_FcntlCommand_F_GETSIG
)
1797 {*r
= F_GETSIG
; return 0;}
1798 #else /* def F_GETSIG */
1799 {errno
= EINVAL
; return -1;}
1800 #endif /* ndef F_GETSIG */
1801 if (x
== Mono_Posix_FcntlCommand_F_SETLEASE
)
1803 {*r
= F_SETLEASE
; return 0;}
1804 #else /* def F_SETLEASE */
1805 {errno
= EINVAL
; return -1;}
1806 #endif /* ndef F_SETLEASE */
1807 if (x
== Mono_Posix_FcntlCommand_F_GETLEASE
)
1809 {*r
= F_GETLEASE
; return 0;}
1810 #else /* def F_GETLEASE */
1811 {errno
= EINVAL
; return -1;}
1812 #endif /* ndef F_GETLEASE */
1813 if (x
== Mono_Posix_FcntlCommand_F_NOTIFY
)
1815 {*r
= F_NOTIFY
; return 0;}
1816 #else /* def F_NOTIFY */
1817 {errno
= EINVAL
; return -1;}
1818 #endif /* ndef F_NOTIFY */
1819 errno
= EINVAL
; return -1;
1822 int Mono_Posix_ToFcntlCommand (int x
, int *r
)
1829 {*r
= Mono_Posix_FcntlCommand_F_DUPFD
; return 0;}
1830 #endif /* ndef F_DUPFD */
1833 {*r
= Mono_Posix_FcntlCommand_F_GETFD
; return 0;}
1834 #endif /* ndef F_GETFD */
1837 {*r
= Mono_Posix_FcntlCommand_F_SETFD
; return 0;}
1838 #endif /* ndef F_SETFD */
1841 {*r
= Mono_Posix_FcntlCommand_F_GETFL
; return 0;}
1842 #endif /* ndef F_GETFL */
1845 {*r
= Mono_Posix_FcntlCommand_F_SETFL
; return 0;}
1846 #endif /* ndef F_SETFL */
1849 {*r
= Mono_Posix_FcntlCommand_F_GETLK
; return 0;}
1850 #endif /* ndef F_GETLK */
1853 {*r
= Mono_Posix_FcntlCommand_F_SETLK
; return 0;}
1854 #endif /* ndef F_SETLK */
1857 {*r
= Mono_Posix_FcntlCommand_F_SETLKW
; return 0;}
1858 #endif /* ndef F_SETLKW */
1861 {*r
= Mono_Posix_FcntlCommand_F_SETOWN
; return 0;}
1862 #endif /* ndef F_SETOWN */
1865 {*r
= Mono_Posix_FcntlCommand_F_GETOWN
; return 0;}
1866 #endif /* ndef F_GETOWN */
1869 {*r
= Mono_Posix_FcntlCommand_F_SETSIG
; return 0;}
1870 #endif /* ndef F_SETSIG */
1873 {*r
= Mono_Posix_FcntlCommand_F_GETSIG
; return 0;}
1874 #endif /* ndef F_GETSIG */
1876 if (x
== F_SETLEASE
)
1877 {*r
= Mono_Posix_FcntlCommand_F_SETLEASE
; return 0;}
1878 #endif /* ndef F_SETLEASE */
1880 if (x
== F_GETLEASE
)
1881 {*r
= Mono_Posix_FcntlCommand_F_GETLEASE
; return 0;}
1882 #endif /* ndef F_GETLEASE */
1885 {*r
= Mono_Posix_FcntlCommand_F_NOTIFY
; return 0;}
1886 #endif /* ndef F_NOTIFY */
1887 errno
= EINVAL
; return -1;
1890 int Mono_Posix_FromLockType (short x
, short *r
)
1895 if (x
== Mono_Posix_LockType_F_RDLCK
)
1897 {*r
= F_RDLCK
; return 0;}
1898 #else /* def F_RDLCK */
1899 {errno
= EINVAL
; return -1;}
1900 #endif /* ndef F_RDLCK */
1901 if (x
== Mono_Posix_LockType_F_WRLCK
)
1903 {*r
= F_WRLCK
; return 0;}
1904 #else /* def F_WRLCK */
1905 {errno
= EINVAL
; return -1;}
1906 #endif /* ndef F_WRLCK */
1907 if (x
== Mono_Posix_LockType_F_UNLCK
)
1909 {*r
= F_UNLCK
; return 0;}
1910 #else /* def F_UNLCK */
1911 {errno
= EINVAL
; return -1;}
1912 #endif /* ndef F_UNLCK */
1913 errno
= EINVAL
; return -1;
1916 int Mono_Posix_ToLockType (short x
, short *r
)
1923 {*r
= Mono_Posix_LockType_F_RDLCK
; return 0;}
1924 #endif /* ndef F_RDLCK */
1927 {*r
= Mono_Posix_LockType_F_WRLCK
; return 0;}
1928 #endif /* ndef F_WRLCK */
1931 {*r
= Mono_Posix_LockType_F_UNLCK
; return 0;}
1932 #endif /* ndef F_UNLCK */
1933 errno
= EINVAL
; return -1;
1936 int Mono_Posix_FromSeekFlags (short x
, short *r
)
1941 if (x
== Mono_Posix_SeekFlags_SEEK_SET
)
1943 {*r
= SEEK_SET
; return 0;}
1944 #else /* def SEEK_SET */
1945 {errno
= EINVAL
; return -1;}
1946 #endif /* ndef SEEK_SET */
1947 if (x
== Mono_Posix_SeekFlags_SEEK_CUR
)
1949 {*r
= SEEK_CUR
; return 0;}
1950 #else /* def SEEK_CUR */
1951 {errno
= EINVAL
; return -1;}
1952 #endif /* ndef SEEK_CUR */
1953 if (x
== Mono_Posix_SeekFlags_SEEK_END
)
1955 {*r
= SEEK_END
; return 0;}
1956 #else /* def SEEK_END */
1957 {errno
= EINVAL
; return -1;}
1958 #endif /* ndef SEEK_END */
1959 if (x
== Mono_Posix_SeekFlags_L_SET
)
1961 {*r
= L_SET
; return 0;}
1962 #else /* def L_SET */
1963 {errno
= EINVAL
; return -1;}
1964 #endif /* ndef L_SET */
1965 if (x
== Mono_Posix_SeekFlags_L_INCR
)
1967 {*r
= L_INCR
; return 0;}
1968 #else /* def L_INCR */
1969 {errno
= EINVAL
; return -1;}
1970 #endif /* ndef L_INCR */
1971 if (x
== Mono_Posix_SeekFlags_L_XTND
)
1973 {*r
= L_XTND
; return 0;}
1974 #else /* def L_XTND */
1975 {errno
= EINVAL
; return -1;}
1976 #endif /* ndef L_XTND */
1977 errno
= EINVAL
; return -1;
1980 int Mono_Posix_ToSeekFlags (short x
, short *r
)
1987 {*r
= Mono_Posix_SeekFlags_SEEK_SET
; return 0;}
1988 #endif /* ndef SEEK_SET */
1991 {*r
= Mono_Posix_SeekFlags_SEEK_CUR
; return 0;}
1992 #endif /* ndef SEEK_CUR */
1995 {*r
= Mono_Posix_SeekFlags_SEEK_END
; return 0;}
1996 #endif /* ndef SEEK_END */
1999 {*r
= Mono_Posix_SeekFlags_L_SET
; return 0;}
2000 #endif /* ndef L_SET */
2003 {*r
= Mono_Posix_SeekFlags_L_INCR
; return 0;}
2004 #endif /* ndef L_INCR */
2007 {*r
= Mono_Posix_SeekFlags_L_XTND
; return 0;}
2008 #endif /* ndef L_XTND */
2009 errno
= EINVAL
; return -1;
2012 int Mono_Posix_FromDirectoryNotifyFlags (int x
, int *r
)
2017 if ((x
& Mono_Posix_DirectoryNotifyFlags_DN_ACCESS
) == Mono_Posix_DirectoryNotifyFlags_DN_ACCESS
)
2020 #else /* def DN_ACCESS */
2021 {errno
= EINVAL
; return -1;}
2022 #endif /* ndef DN_ACCESS */
2023 if ((x
& Mono_Posix_DirectoryNotifyFlags_DN_MODIFY
) == Mono_Posix_DirectoryNotifyFlags_DN_MODIFY
)
2026 #else /* def DN_MODIFY */
2027 {errno
= EINVAL
; return -1;}
2028 #endif /* ndef DN_MODIFY */
2029 if ((x
& Mono_Posix_DirectoryNotifyFlags_DN_CREATE
) == Mono_Posix_DirectoryNotifyFlags_DN_CREATE
)
2032 #else /* def DN_CREATE */
2033 {errno
= EINVAL
; return -1;}
2034 #endif /* ndef DN_CREATE */
2035 if ((x
& Mono_Posix_DirectoryNotifyFlags_DN_DELETE
) == Mono_Posix_DirectoryNotifyFlags_DN_DELETE
)
2038 #else /* def DN_DELETE */
2039 {errno
= EINVAL
; return -1;}
2040 #endif /* ndef DN_DELETE */
2041 if ((x
& Mono_Posix_DirectoryNotifyFlags_DN_RENAME
) == Mono_Posix_DirectoryNotifyFlags_DN_RENAME
)
2044 #else /* def DN_RENAME */
2045 {errno
= EINVAL
; return -1;}
2046 #endif /* ndef DN_RENAME */
2047 if ((x
& Mono_Posix_DirectoryNotifyFlags_DN_ATTRIB
) == Mono_Posix_DirectoryNotifyFlags_DN_ATTRIB
)
2050 #else /* def DN_ATTRIB */
2051 {errno
= EINVAL
; return -1;}
2052 #endif /* ndef DN_ATTRIB */
2053 if ((x
& Mono_Posix_DirectoryNotifyFlags_DN_MULTISHOT
) == Mono_Posix_DirectoryNotifyFlags_DN_MULTISHOT
)
2056 #else /* def DN_MULTISHOT */
2057 {errno
= EINVAL
; return -1;}
2058 #endif /* ndef DN_MULTISHOT */
2062 int Mono_Posix_ToDirectoryNotifyFlags (int x
, int *r
)
2068 if ((x
& DN_ACCESS
) == DN_ACCESS
)
2069 *r
|= Mono_Posix_DirectoryNotifyFlags_DN_ACCESS
;
2070 #endif /* ndef DN_ACCESS */
2072 if ((x
& DN_MODIFY
) == DN_MODIFY
)
2073 *r
|= Mono_Posix_DirectoryNotifyFlags_DN_MODIFY
;
2074 #endif /* ndef DN_MODIFY */
2076 if ((x
& DN_CREATE
) == DN_CREATE
)
2077 *r
|= Mono_Posix_DirectoryNotifyFlags_DN_CREATE
;
2078 #endif /* ndef DN_CREATE */
2080 if ((x
& DN_DELETE
) == DN_DELETE
)
2081 *r
|= Mono_Posix_DirectoryNotifyFlags_DN_DELETE
;
2082 #endif /* ndef DN_DELETE */
2084 if ((x
& DN_RENAME
) == DN_RENAME
)
2085 *r
|= Mono_Posix_DirectoryNotifyFlags_DN_RENAME
;
2086 #endif /* ndef DN_RENAME */
2088 if ((x
& DN_ATTRIB
) == DN_ATTRIB
)
2089 *r
|= Mono_Posix_DirectoryNotifyFlags_DN_ATTRIB
;
2090 #endif /* ndef DN_ATTRIB */
2092 if ((x
& DN_MULTISHOT
) == DN_MULTISHOT
)
2093 *r
|= Mono_Posix_DirectoryNotifyFlags_DN_MULTISHOT
;
2094 #endif /* ndef DN_MULTISHOT */
2098 int Mono_Posix_FromPosixFadviseAdvice (int x
, int *r
)
2103 if (x
== Mono_Posix_PosixFadviseAdvice_POSIX_FADV_NORMAL
)
2104 #ifdef POSIX_FADV_NORMAL
2105 {*r
= POSIX_FADV_NORMAL
; return 0;}
2106 #else /* def POSIX_FADV_NORMAL */
2107 {errno
= EINVAL
; return -1;}
2108 #endif /* ndef POSIX_FADV_NORMAL */
2109 if (x
== Mono_Posix_PosixFadviseAdvice_POSIX_FADV_RANDOM
)
2110 #ifdef POSIX_FADV_RANDOM
2111 {*r
= POSIX_FADV_RANDOM
; return 0;}
2112 #else /* def POSIX_FADV_RANDOM */
2113 {errno
= EINVAL
; return -1;}
2114 #endif /* ndef POSIX_FADV_RANDOM */
2115 if (x
== Mono_Posix_PosixFadviseAdvice_POSIX_FADV_SEQUENTIAL
)
2116 #ifdef POSIX_FADV_SEQUENTIAL
2117 {*r
= POSIX_FADV_SEQUENTIAL
; return 0;}
2118 #else /* def POSIX_FADV_SEQUENTIAL */
2119 {errno
= EINVAL
; return -1;}
2120 #endif /* ndef POSIX_FADV_SEQUENTIAL */
2121 if (x
== Mono_Posix_PosixFadviseAdvice_POSIX_FADV_WILLNEED
)
2122 #ifdef POSIX_FADV_WILLNEED
2123 {*r
= POSIX_FADV_WILLNEED
; return 0;}
2124 #else /* def POSIX_FADV_WILLNEED */
2125 {errno
= EINVAL
; return -1;}
2126 #endif /* ndef POSIX_FADV_WILLNEED */
2127 if (x
== Mono_Posix_PosixFadviseAdvice_POSIX_FADV_DONTNEED
)
2128 #ifdef POSIX_FADV_DONTNEED
2129 {*r
= POSIX_FADV_DONTNEED
; return 0;}
2130 #else /* def POSIX_FADV_DONTNEED */
2131 {errno
= EINVAL
; return -1;}
2132 #endif /* ndef POSIX_FADV_DONTNEED */
2133 if (x
== Mono_Posix_PosixFadviseAdvice_POSIX_FADV_NOREUSE
)
2134 #ifdef POSIX_FADV_NOREUSE
2135 {*r
= POSIX_FADV_NOREUSE
; return 0;}
2136 #else /* def POSIX_FADV_NOREUSE */
2137 {errno
= EINVAL
; return -1;}
2138 #endif /* ndef POSIX_FADV_NOREUSE */
2139 errno
= EINVAL
; return -1;
2142 int Mono_Posix_ToPosixFadviseAdvice (int x
, int *r
)
2147 #ifdef POSIX_FADV_NORMAL
2148 if (x
== POSIX_FADV_NORMAL
)
2149 {*r
= Mono_Posix_PosixFadviseAdvice_POSIX_FADV_NORMAL
; return 0;}
2150 #endif /* ndef POSIX_FADV_NORMAL */
2151 #ifdef POSIX_FADV_RANDOM
2152 if (x
== POSIX_FADV_RANDOM
)
2153 {*r
= Mono_Posix_PosixFadviseAdvice_POSIX_FADV_RANDOM
; return 0;}
2154 #endif /* ndef POSIX_FADV_RANDOM */
2155 #ifdef POSIX_FADV_SEQUENTIAL
2156 if (x
== POSIX_FADV_SEQUENTIAL
)
2157 {*r
= Mono_Posix_PosixFadviseAdvice_POSIX_FADV_SEQUENTIAL
; return 0;}
2158 #endif /* ndef POSIX_FADV_SEQUENTIAL */
2159 #ifdef POSIX_FADV_WILLNEED
2160 if (x
== POSIX_FADV_WILLNEED
)
2161 {*r
= Mono_Posix_PosixFadviseAdvice_POSIX_FADV_WILLNEED
; return 0;}
2162 #endif /* ndef POSIX_FADV_WILLNEED */
2163 #ifdef POSIX_FADV_DONTNEED
2164 if (x
== POSIX_FADV_DONTNEED
)
2165 {*r
= Mono_Posix_PosixFadviseAdvice_POSIX_FADV_DONTNEED
; return 0;}
2166 #endif /* ndef POSIX_FADV_DONTNEED */
2167 #ifdef POSIX_FADV_NOREUSE
2168 if (x
== POSIX_FADV_NOREUSE
)
2169 {*r
= Mono_Posix_PosixFadviseAdvice_POSIX_FADV_NOREUSE
; return 0;}
2170 #endif /* ndef POSIX_FADV_NOREUSE */
2171 errno
= EINVAL
; return -1;
2174 int Mono_Posix_FromPosixMadviseAdvice (int x
, int *r
)
2179 if (x
== Mono_Posix_PosixMadviseAdvice_POSIX_MADV_NORMAL
)
2180 #ifdef POSIX_MADV_NORMAL
2181 {*r
= POSIX_MADV_NORMAL
; return 0;}
2182 #else /* def POSIX_MADV_NORMAL */
2183 {errno
= EINVAL
; return -1;}
2184 #endif /* ndef POSIX_MADV_NORMAL */
2185 if (x
== Mono_Posix_PosixMadviseAdvice_POSIX_MADV_RANDOM
)
2186 #ifdef POSIX_MADV_RANDOM
2187 {*r
= POSIX_MADV_RANDOM
; return 0;}
2188 #else /* def POSIX_MADV_RANDOM */
2189 {errno
= EINVAL
; return -1;}
2190 #endif /* ndef POSIX_MADV_RANDOM */
2191 if (x
== Mono_Posix_PosixMadviseAdvice_POSIX_MADV_SEQUENTIAL
)
2192 #ifdef POSIX_MADV_SEQUENTIAL
2193 {*r
= POSIX_MADV_SEQUENTIAL
; return 0;}
2194 #else /* def POSIX_MADV_SEQUENTIAL */
2195 {errno
= EINVAL
; return -1;}
2196 #endif /* ndef POSIX_MADV_SEQUENTIAL */
2197 if (x
== Mono_Posix_PosixMadviseAdvice_POSIX_MADV_WILLNEED
)
2198 #ifdef POSIX_MADV_WILLNEED
2199 {*r
= POSIX_MADV_WILLNEED
; return 0;}
2200 #else /* def POSIX_MADV_WILLNEED */
2201 {errno
= EINVAL
; return -1;}
2202 #endif /* ndef POSIX_MADV_WILLNEED */
2203 if (x
== Mono_Posix_PosixMadviseAdvice_POSIX_MADV_DONTNEED
)
2204 #ifdef POSIX_MADV_DONTNEED
2205 {*r
= POSIX_MADV_DONTNEED
; return 0;}
2206 #else /* def POSIX_MADV_DONTNEED */
2207 {errno
= EINVAL
; return -1;}
2208 #endif /* ndef POSIX_MADV_DONTNEED */
2209 errno
= EINVAL
; return -1;
2212 int Mono_Posix_ToPosixMadviseAdvice (int x
, int *r
)
2217 #ifdef POSIX_MADV_NORMAL
2218 if (x
== POSIX_MADV_NORMAL
)
2219 {*r
= Mono_Posix_PosixMadviseAdvice_POSIX_MADV_NORMAL
; return 0;}
2220 #endif /* ndef POSIX_MADV_NORMAL */
2221 #ifdef POSIX_MADV_RANDOM
2222 if (x
== POSIX_MADV_RANDOM
)
2223 {*r
= Mono_Posix_PosixMadviseAdvice_POSIX_MADV_RANDOM
; return 0;}
2224 #endif /* ndef POSIX_MADV_RANDOM */
2225 #ifdef POSIX_MADV_SEQUENTIAL
2226 if (x
== POSIX_MADV_SEQUENTIAL
)
2227 {*r
= Mono_Posix_PosixMadviseAdvice_POSIX_MADV_SEQUENTIAL
; return 0;}
2228 #endif /* ndef POSIX_MADV_SEQUENTIAL */
2229 #ifdef POSIX_MADV_WILLNEED
2230 if (x
== POSIX_MADV_WILLNEED
)
2231 {*r
= Mono_Posix_PosixMadviseAdvice_POSIX_MADV_WILLNEED
; return 0;}
2232 #endif /* ndef POSIX_MADV_WILLNEED */
2233 #ifdef POSIX_MADV_DONTNEED
2234 if (x
== POSIX_MADV_DONTNEED
)
2235 {*r
= Mono_Posix_PosixMadviseAdvice_POSIX_MADV_DONTNEED
; return 0;}
2236 #endif /* ndef POSIX_MADV_DONTNEED */
2237 errno
= EINVAL
; return -1;
2240 int Mono_Posix_FromSignum (int x
, int *r
)
2245 if (x
== Mono_Posix_Signum_SIGHUP
)
2247 {*r
= SIGHUP
; return 0;}
2248 #else /* def SIGHUP */
2249 {errno
= EINVAL
; return -1;}
2250 #endif /* ndef SIGHUP */
2251 if (x
== Mono_Posix_Signum_SIGINT
)
2253 {*r
= SIGINT
; return 0;}
2254 #else /* def SIGINT */
2255 {errno
= EINVAL
; return -1;}
2256 #endif /* ndef SIGINT */
2257 if (x
== Mono_Posix_Signum_SIGQUIT
)
2259 {*r
= SIGQUIT
; return 0;}
2260 #else /* def SIGQUIT */
2261 {errno
= EINVAL
; return -1;}
2262 #endif /* ndef SIGQUIT */
2263 if (x
== Mono_Posix_Signum_SIGILL
)
2265 {*r
= SIGILL
; return 0;}
2266 #else /* def SIGILL */
2267 {errno
= EINVAL
; return -1;}
2268 #endif /* ndef SIGILL */
2269 if (x
== Mono_Posix_Signum_SIGTRAP
)
2271 {*r
= SIGTRAP
; return 0;}
2272 #else /* def SIGTRAP */
2273 {errno
= EINVAL
; return -1;}
2274 #endif /* ndef SIGTRAP */
2275 if (x
== Mono_Posix_Signum_SIGABRT
)
2277 {*r
= SIGABRT
; return 0;}
2278 #else /* def SIGABRT */
2279 {errno
= EINVAL
; return -1;}
2280 #endif /* ndef SIGABRT */
2281 if (x
== Mono_Posix_Signum_SIGIOT
)
2283 {*r
= SIGIOT
; return 0;}
2284 #else /* def SIGIOT */
2285 {errno
= EINVAL
; return -1;}
2286 #endif /* ndef SIGIOT */
2287 if (x
== Mono_Posix_Signum_SIGBUS
)
2289 {*r
= SIGBUS
; return 0;}
2290 #else /* def SIGBUS */
2291 {errno
= EINVAL
; return -1;}
2292 #endif /* ndef SIGBUS */
2293 if (x
== Mono_Posix_Signum_SIGFPE
)
2295 {*r
= SIGFPE
; return 0;}
2296 #else /* def SIGFPE */
2297 {errno
= EINVAL
; return -1;}
2298 #endif /* ndef SIGFPE */
2299 if (x
== Mono_Posix_Signum_SIGKILL
)
2301 {*r
= SIGKILL
; return 0;}
2302 #else /* def SIGKILL */
2303 {errno
= EINVAL
; return -1;}
2304 #endif /* ndef SIGKILL */
2305 if (x
== Mono_Posix_Signum_SIGUSR1
)
2307 {*r
= SIGUSR1
; return 0;}
2308 #else /* def SIGUSR1 */
2309 {errno
= EINVAL
; return -1;}
2310 #endif /* ndef SIGUSR1 */
2311 if (x
== Mono_Posix_Signum_SIGSEGV
)
2313 {*r
= SIGSEGV
; return 0;}
2314 #else /* def SIGSEGV */
2315 {errno
= EINVAL
; return -1;}
2316 #endif /* ndef SIGSEGV */
2317 if (x
== Mono_Posix_Signum_SIGUSR2
)
2319 {*r
= SIGUSR2
; return 0;}
2320 #else /* def SIGUSR2 */
2321 {errno
= EINVAL
; return -1;}
2322 #endif /* ndef SIGUSR2 */
2323 if (x
== Mono_Posix_Signum_SIGPIPE
)
2325 {*r
= SIGPIPE
; return 0;}
2326 #else /* def SIGPIPE */
2327 {errno
= EINVAL
; return -1;}
2328 #endif /* ndef SIGPIPE */
2329 if (x
== Mono_Posix_Signum_SIGALRM
)
2331 {*r
= SIGALRM
; return 0;}
2332 #else /* def SIGALRM */
2333 {errno
= EINVAL
; return -1;}
2334 #endif /* ndef SIGALRM */
2335 if (x
== Mono_Posix_Signum_SIGTERM
)
2337 {*r
= SIGTERM
; return 0;}
2338 #else /* def SIGTERM */
2339 {errno
= EINVAL
; return -1;}
2340 #endif /* ndef SIGTERM */
2341 if (x
== Mono_Posix_Signum_SIGSTKFLT
)
2343 {*r
= SIGSTKFLT
; return 0;}
2344 #else /* def SIGSTKFLT */
2345 {errno
= EINVAL
; return -1;}
2346 #endif /* ndef SIGSTKFLT */
2347 if (x
== Mono_Posix_Signum_SIGCHLD
)
2349 {*r
= SIGCHLD
; return 0;}
2350 #else /* def SIGCHLD */
2351 {errno
= EINVAL
; return -1;}
2352 #endif /* ndef SIGCHLD */
2353 if (x
== Mono_Posix_Signum_SIGCLD
)
2355 {*r
= SIGCLD
; return 0;}
2356 #else /* def SIGCLD */
2357 {errno
= EINVAL
; return -1;}
2358 #endif /* ndef SIGCLD */
2359 if (x
== Mono_Posix_Signum_SIGCONT
)
2361 {*r
= SIGCONT
; return 0;}
2362 #else /* def SIGCONT */
2363 {errno
= EINVAL
; return -1;}
2364 #endif /* ndef SIGCONT */
2365 if (x
== Mono_Posix_Signum_SIGSTOP
)
2367 {*r
= SIGSTOP
; return 0;}
2368 #else /* def SIGSTOP */
2369 {errno
= EINVAL
; return -1;}
2370 #endif /* ndef SIGSTOP */
2371 if (x
== Mono_Posix_Signum_SIGTSTP
)
2373 {*r
= SIGTSTP
; return 0;}
2374 #else /* def SIGTSTP */
2375 {errno
= EINVAL
; return -1;}
2376 #endif /* ndef SIGTSTP */
2377 if (x
== Mono_Posix_Signum_SIGTTIN
)
2379 {*r
= SIGTTIN
; return 0;}
2380 #else /* def SIGTTIN */
2381 {errno
= EINVAL
; return -1;}
2382 #endif /* ndef SIGTTIN */
2383 if (x
== Mono_Posix_Signum_SIGTTOU
)
2385 {*r
= SIGTTOU
; return 0;}
2386 #else /* def SIGTTOU */
2387 {errno
= EINVAL
; return -1;}
2388 #endif /* ndef SIGTTOU */
2389 if (x
== Mono_Posix_Signum_SIGURG
)
2391 {*r
= SIGURG
; return 0;}
2392 #else /* def SIGURG */
2393 {errno
= EINVAL
; return -1;}
2394 #endif /* ndef SIGURG */
2395 if (x
== Mono_Posix_Signum_SIGXCPU
)
2397 {*r
= SIGXCPU
; return 0;}
2398 #else /* def SIGXCPU */
2399 {errno
= EINVAL
; return -1;}
2400 #endif /* ndef SIGXCPU */
2401 if (x
== Mono_Posix_Signum_SIGXFSZ
)
2403 {*r
= SIGXFSZ
; return 0;}
2404 #else /* def SIGXFSZ */
2405 {errno
= EINVAL
; return -1;}
2406 #endif /* ndef SIGXFSZ */
2407 if (x
== Mono_Posix_Signum_SIGVTALRM
)
2409 {*r
= SIGVTALRM
; return 0;}
2410 #else /* def SIGVTALRM */
2411 {errno
= EINVAL
; return -1;}
2412 #endif /* ndef SIGVTALRM */
2413 if (x
== Mono_Posix_Signum_SIGPROF
)
2415 {*r
= SIGPROF
; return 0;}
2416 #else /* def SIGPROF */
2417 {errno
= EINVAL
; return -1;}
2418 #endif /* ndef SIGPROF */
2419 if (x
== Mono_Posix_Signum_SIGWINCH
)
2421 {*r
= SIGWINCH
; return 0;}
2422 #else /* def SIGWINCH */
2423 {errno
= EINVAL
; return -1;}
2424 #endif /* ndef SIGWINCH */
2425 if (x
== Mono_Posix_Signum_SIGIO
)
2427 {*r
= SIGIO
; return 0;}
2428 #else /* def SIGIO */
2429 {errno
= EINVAL
; return -1;}
2430 #endif /* ndef SIGIO */
2431 if (x
== Mono_Posix_Signum_SIGPOLL
)
2433 {*r
= SIGPOLL
; return 0;}
2434 #else /* def SIGPOLL */
2435 {errno
= EINVAL
; return -1;}
2436 #endif /* ndef SIGPOLL */
2437 if (x
== Mono_Posix_Signum_SIGPWR
)
2439 {*r
= SIGPWR
; return 0;}
2440 #else /* def SIGPWR */
2441 {errno
= EINVAL
; return -1;}
2442 #endif /* ndef SIGPWR */
2443 if (x
== Mono_Posix_Signum_SIGSYS
)
2445 {*r
= SIGSYS
; return 0;}
2446 #else /* def SIGSYS */
2447 {errno
= EINVAL
; return -1;}
2448 #endif /* ndef SIGSYS */
2449 if (x
== Mono_Posix_Signum_SIGUNUSED
)
2451 {*r
= SIGUNUSED
; return 0;}
2452 #else /* def SIGUNUSED */
2453 {errno
= EINVAL
; return -1;}
2454 #endif /* ndef SIGUNUSED */
2455 errno
= EINVAL
; return -1;
2458 int Mono_Posix_ToSignum (int x
, int *r
)
2465 {*r
= Mono_Posix_Signum_SIGHUP
; return 0;}
2466 #endif /* ndef SIGHUP */
2469 {*r
= Mono_Posix_Signum_SIGINT
; return 0;}
2470 #endif /* ndef SIGINT */
2473 {*r
= Mono_Posix_Signum_SIGQUIT
; return 0;}
2474 #endif /* ndef SIGQUIT */
2477 {*r
= Mono_Posix_Signum_SIGILL
; return 0;}
2478 #endif /* ndef SIGILL */
2481 {*r
= Mono_Posix_Signum_SIGTRAP
; return 0;}
2482 #endif /* ndef SIGTRAP */
2485 {*r
= Mono_Posix_Signum_SIGABRT
; return 0;}
2486 #endif /* ndef SIGABRT */
2489 {*r
= Mono_Posix_Signum_SIGIOT
; return 0;}
2490 #endif /* ndef SIGIOT */
2493 {*r
= Mono_Posix_Signum_SIGBUS
; return 0;}
2494 #endif /* ndef SIGBUS */
2497 {*r
= Mono_Posix_Signum_SIGFPE
; return 0;}
2498 #endif /* ndef SIGFPE */
2501 {*r
= Mono_Posix_Signum_SIGKILL
; return 0;}
2502 #endif /* ndef SIGKILL */
2505 {*r
= Mono_Posix_Signum_SIGUSR1
; return 0;}
2506 #endif /* ndef SIGUSR1 */
2509 {*r
= Mono_Posix_Signum_SIGSEGV
; return 0;}
2510 #endif /* ndef SIGSEGV */
2513 {*r
= Mono_Posix_Signum_SIGUSR2
; return 0;}
2514 #endif /* ndef SIGUSR2 */
2517 {*r
= Mono_Posix_Signum_SIGPIPE
; return 0;}
2518 #endif /* ndef SIGPIPE */
2521 {*r
= Mono_Posix_Signum_SIGALRM
; return 0;}
2522 #endif /* ndef SIGALRM */
2525 {*r
= Mono_Posix_Signum_SIGTERM
; return 0;}
2526 #endif /* ndef SIGTERM */
2529 {*r
= Mono_Posix_Signum_SIGSTKFLT
; return 0;}
2530 #endif /* ndef SIGSTKFLT */
2533 {*r
= Mono_Posix_Signum_SIGCHLD
; return 0;}
2534 #endif /* ndef SIGCHLD */
2537 {*r
= Mono_Posix_Signum_SIGCLD
; return 0;}
2538 #endif /* ndef SIGCLD */
2541 {*r
= Mono_Posix_Signum_SIGCONT
; return 0;}
2542 #endif /* ndef SIGCONT */
2545 {*r
= Mono_Posix_Signum_SIGSTOP
; return 0;}
2546 #endif /* ndef SIGSTOP */
2549 {*r
= Mono_Posix_Signum_SIGTSTP
; return 0;}
2550 #endif /* ndef SIGTSTP */
2553 {*r
= Mono_Posix_Signum_SIGTTIN
; return 0;}
2554 #endif /* ndef SIGTTIN */
2557 {*r
= Mono_Posix_Signum_SIGTTOU
; return 0;}
2558 #endif /* ndef SIGTTOU */
2561 {*r
= Mono_Posix_Signum_SIGURG
; return 0;}
2562 #endif /* ndef SIGURG */
2565 {*r
= Mono_Posix_Signum_SIGXCPU
; return 0;}
2566 #endif /* ndef SIGXCPU */
2569 {*r
= Mono_Posix_Signum_SIGXFSZ
; return 0;}
2570 #endif /* ndef SIGXFSZ */
2573 {*r
= Mono_Posix_Signum_SIGVTALRM
; return 0;}
2574 #endif /* ndef SIGVTALRM */
2577 {*r
= Mono_Posix_Signum_SIGPROF
; return 0;}
2578 #endif /* ndef SIGPROF */
2581 {*r
= Mono_Posix_Signum_SIGWINCH
; return 0;}
2582 #endif /* ndef SIGWINCH */
2585 {*r
= Mono_Posix_Signum_SIGIO
; return 0;}
2586 #endif /* ndef SIGIO */
2589 {*r
= Mono_Posix_Signum_SIGPOLL
; return 0;}
2590 #endif /* ndef SIGPOLL */
2593 {*r
= Mono_Posix_Signum_SIGPWR
; return 0;}
2594 #endif /* ndef SIGPWR */
2597 {*r
= Mono_Posix_Signum_SIGSYS
; return 0;}
2598 #endif /* ndef SIGSYS */
2601 {*r
= Mono_Posix_Signum_SIGUNUSED
; return 0;}
2602 #endif /* ndef SIGUNUSED */
2603 errno
= EINVAL
; return -1;
2606 int Mono_Posix_FromMountFlags (guint64 x
, guint64
*r
)
2611 if ((x
& Mono_Posix_MountFlags_MS_RDONLY
) == Mono_Posix_MountFlags_MS_RDONLY
)
2614 #else /* def MS_RDONLY */
2615 {errno
= EINVAL
; return -1;}
2616 #endif /* ndef MS_RDONLY */
2617 if ((x
& Mono_Posix_MountFlags_MS_NOSUID
) == Mono_Posix_MountFlags_MS_NOSUID
)
2620 #else /* def MS_NOSUID */
2621 {errno
= EINVAL
; return -1;}
2622 #endif /* ndef MS_NOSUID */
2623 if ((x
& Mono_Posix_MountFlags_MS_NODEV
) == Mono_Posix_MountFlags_MS_NODEV
)
2626 #else /* def MS_NODEV */
2627 {errno
= EINVAL
; return -1;}
2628 #endif /* ndef MS_NODEV */
2629 if ((x
& Mono_Posix_MountFlags_MS_NOEXEC
) == Mono_Posix_MountFlags_MS_NOEXEC
)
2632 #else /* def MS_NOEXEC */
2633 {errno
= EINVAL
; return -1;}
2634 #endif /* ndef MS_NOEXEC */
2635 if ((x
& Mono_Posix_MountFlags_MS_SYNCHRONOUS
) == Mono_Posix_MountFlags_MS_SYNCHRONOUS
)
2636 #ifdef MS_SYNCHRONOUS
2637 *r
|= MS_SYNCHRONOUS
;
2638 #else /* def MS_SYNCHRONOUS */
2639 {errno
= EINVAL
; return -1;}
2640 #endif /* ndef MS_SYNCHRONOUS */
2641 if ((x
& Mono_Posix_MountFlags_MS_REMOUNT
) == Mono_Posix_MountFlags_MS_REMOUNT
)
2644 #else /* def MS_REMOUNT */
2645 {errno
= EINVAL
; return -1;}
2646 #endif /* ndef MS_REMOUNT */
2647 if ((x
& Mono_Posix_MountFlags_MS_MANDLOCK
) == Mono_Posix_MountFlags_MS_MANDLOCK
)
2650 #else /* def MS_MANDLOCK */
2651 {errno
= EINVAL
; return -1;}
2652 #endif /* ndef MS_MANDLOCK */
2653 if ((x
& Mono_Posix_MountFlags_S_WRITE
) == Mono_Posix_MountFlags_S_WRITE
)
2656 #else /* def S_WRITE */
2657 {errno
= EINVAL
; return -1;}
2658 #endif /* ndef S_WRITE */
2659 if ((x
& Mono_Posix_MountFlags_S_APPEND
) == Mono_Posix_MountFlags_S_APPEND
)
2662 #else /* def S_APPEND */
2663 {errno
= EINVAL
; return -1;}
2664 #endif /* ndef S_APPEND */
2665 if ((x
& Mono_Posix_MountFlags_S_IMMUTABLE
) == Mono_Posix_MountFlags_S_IMMUTABLE
)
2668 #else /* def S_IMMUTABLE */
2669 {errno
= EINVAL
; return -1;}
2670 #endif /* ndef S_IMMUTABLE */
2671 if ((x
& Mono_Posix_MountFlags_MS_NOATIME
) == Mono_Posix_MountFlags_MS_NOATIME
)
2674 #else /* def MS_NOATIME */
2675 {errno
= EINVAL
; return -1;}
2676 #endif /* ndef MS_NOATIME */
2677 if ((x
& Mono_Posix_MountFlags_MS_NODIRATIME
) == Mono_Posix_MountFlags_MS_NODIRATIME
)
2678 #ifdef MS_NODIRATIME
2679 *r
|= MS_NODIRATIME
;
2680 #else /* def MS_NODIRATIME */
2681 {errno
= EINVAL
; return -1;}
2682 #endif /* ndef MS_NODIRATIME */
2683 if ((x
& Mono_Posix_MountFlags_MS_BIND
) == Mono_Posix_MountFlags_MS_BIND
)
2686 #else /* def MS_BIND */
2687 {errno
= EINVAL
; return -1;}
2688 #endif /* ndef MS_BIND */
2689 if ((x
& Mono_Posix_MountFlags_MS_RMT_MASK
) == Mono_Posix_MountFlags_MS_RMT_MASK
)
2692 #else /* def MS_RMT_MASK */
2693 {errno
= EINVAL
; return -1;}
2694 #endif /* ndef MS_RMT_MASK */
2695 if ((x
& Mono_Posix_MountFlags_MS_MGC_VAL
) == Mono_Posix_MountFlags_MS_MGC_VAL
)
2698 #else /* def MS_MGC_VAL */
2699 {errno
= EINVAL
; return -1;}
2700 #endif /* ndef MS_MGC_VAL */
2701 if ((x
& Mono_Posix_MountFlags_MS_MGC_MSK
) == Mono_Posix_MountFlags_MS_MGC_MSK
)
2704 #else /* def MS_MGC_MSK */
2705 {errno
= EINVAL
; return -1;}
2706 #endif /* ndef MS_MGC_MSK */
2710 int Mono_Posix_ToMountFlags (guint64 x
, guint64
*r
)
2716 if ((x
& MS_RDONLY
) == MS_RDONLY
)
2717 *r
|= Mono_Posix_MountFlags_MS_RDONLY
;
2718 #endif /* ndef MS_RDONLY */
2720 if ((x
& MS_NOSUID
) == MS_NOSUID
)
2721 *r
|= Mono_Posix_MountFlags_MS_NOSUID
;
2722 #endif /* ndef MS_NOSUID */
2724 if ((x
& MS_NODEV
) == MS_NODEV
)
2725 *r
|= Mono_Posix_MountFlags_MS_NODEV
;
2726 #endif /* ndef MS_NODEV */
2728 if ((x
& MS_NOEXEC
) == MS_NOEXEC
)
2729 *r
|= Mono_Posix_MountFlags_MS_NOEXEC
;
2730 #endif /* ndef MS_NOEXEC */
2731 #ifdef MS_SYNCHRONOUS
2732 if ((x
& MS_SYNCHRONOUS
) == MS_SYNCHRONOUS
)
2733 *r
|= Mono_Posix_MountFlags_MS_SYNCHRONOUS
;
2734 #endif /* ndef MS_SYNCHRONOUS */
2736 if ((x
& MS_REMOUNT
) == MS_REMOUNT
)
2737 *r
|= Mono_Posix_MountFlags_MS_REMOUNT
;
2738 #endif /* ndef MS_REMOUNT */
2740 if ((x
& MS_MANDLOCK
) == MS_MANDLOCK
)
2741 *r
|= Mono_Posix_MountFlags_MS_MANDLOCK
;
2742 #endif /* ndef MS_MANDLOCK */
2744 if ((x
& S_WRITE
) == S_WRITE
)
2745 *r
|= Mono_Posix_MountFlags_S_WRITE
;
2746 #endif /* ndef S_WRITE */
2748 if ((x
& S_APPEND
) == S_APPEND
)
2749 *r
|= Mono_Posix_MountFlags_S_APPEND
;
2750 #endif /* ndef S_APPEND */
2752 if ((x
& S_IMMUTABLE
) == S_IMMUTABLE
)
2753 *r
|= Mono_Posix_MountFlags_S_IMMUTABLE
;
2754 #endif /* ndef S_IMMUTABLE */
2756 if ((x
& MS_NOATIME
) == MS_NOATIME
)
2757 *r
|= Mono_Posix_MountFlags_MS_NOATIME
;
2758 #endif /* ndef MS_NOATIME */
2759 #ifdef MS_NODIRATIME
2760 if ((x
& MS_NODIRATIME
) == MS_NODIRATIME
)
2761 *r
|= Mono_Posix_MountFlags_MS_NODIRATIME
;
2762 #endif /* ndef MS_NODIRATIME */
2764 if ((x
& MS_BIND
) == MS_BIND
)
2765 *r
|= Mono_Posix_MountFlags_MS_BIND
;
2766 #endif /* ndef MS_BIND */
2768 if ((x
& MS_RMT_MASK
) == MS_RMT_MASK
)
2769 *r
|= Mono_Posix_MountFlags_MS_RMT_MASK
;
2770 #endif /* ndef MS_RMT_MASK */
2772 if ((x
& MS_MGC_VAL
) == MS_MGC_VAL
)
2773 *r
|= Mono_Posix_MountFlags_MS_MGC_VAL
;
2774 #endif /* ndef MS_MGC_VAL */
2776 if ((x
& MS_MGC_MSK
) == MS_MGC_MSK
)
2777 *r
|= Mono_Posix_MountFlags_MS_MGC_MSK
;
2778 #endif /* ndef MS_MGC_MSK */
2782 int Mono_Posix_FromUmountFlags (int x
, int *r
)
2787 if ((x
& Mono_Posix_UmountFlags_MNT_FORCE
) == Mono_Posix_UmountFlags_MNT_FORCE
)
2790 #else /* def MNT_FORCE */
2791 {errno
= EINVAL
; return -1;}
2792 #endif /* ndef MNT_FORCE */
2793 if ((x
& Mono_Posix_UmountFlags_MNT_DETACH
) == Mono_Posix_UmountFlags_MNT_DETACH
)
2796 #else /* def MNT_DETACH */
2797 {errno
= EINVAL
; return -1;}
2798 #endif /* ndef MNT_DETACH */
2802 int Mono_Posix_ToUmountFlags (int x
, int *r
)
2808 if ((x
& MNT_FORCE
) == MNT_FORCE
)
2809 *r
|= Mono_Posix_UmountFlags_MNT_FORCE
;
2810 #endif /* ndef MNT_FORCE */
2812 if ((x
& MNT_DETACH
) == MNT_DETACH
)
2813 *r
|= Mono_Posix_UmountFlags_MNT_DETACH
;
2814 #endif /* ndef MNT_DETACH */
2818 int Mono_Posix_FromWaitOptions (int x
, int *r
)
2823 if ((x
& Mono_Posix_WaitOptions_WNOHANG
) == Mono_Posix_WaitOptions_WNOHANG
)
2826 #else /* def WNOHANG */
2827 {errno
= EINVAL
; return -1;}
2828 #endif /* ndef WNOHANG */
2829 if ((x
& Mono_Posix_WaitOptions_WUNTRACED
) == Mono_Posix_WaitOptions_WUNTRACED
)
2832 #else /* def WUNTRACED */
2833 {errno
= EINVAL
; return -1;}
2834 #endif /* ndef WUNTRACED */
2838 int Mono_Posix_ToWaitOptions (int x
, int *r
)
2844 if ((x
& WNOHANG
) == WNOHANG
)
2845 *r
|= Mono_Posix_WaitOptions_WNOHANG
;
2846 #endif /* ndef WNOHANG */
2848 if ((x
& WUNTRACED
) == WUNTRACED
)
2849 *r
|= Mono_Posix_WaitOptions_WUNTRACED
;
2850 #endif /* ndef WUNTRACED */
2854 int Mono_Posix_FromAccessMode (int x
, int *r
)
2859 if ((x
& Mono_Posix_AccessMode_R_OK
) == Mono_Posix_AccessMode_R_OK
)
2862 #else /* def R_OK */
2863 {errno
= EINVAL
; return -1;}
2864 #endif /* ndef R_OK */
2865 if ((x
& Mono_Posix_AccessMode_W_OK
) == Mono_Posix_AccessMode_W_OK
)
2868 #else /* def W_OK */
2869 {errno
= EINVAL
; return -1;}
2870 #endif /* ndef W_OK */
2871 if ((x
& Mono_Posix_AccessMode_X_OK
) == Mono_Posix_AccessMode_X_OK
)
2874 #else /* def X_OK */
2875 {errno
= EINVAL
; return -1;}
2876 #endif /* ndef X_OK */
2877 if ((x
& Mono_Posix_AccessMode_F_OK
) == Mono_Posix_AccessMode_F_OK
)
2880 #else /* def F_OK */
2881 {errno
= EINVAL
; return -1;}
2882 #endif /* ndef F_OK */
2886 int Mono_Posix_ToAccessMode (int x
, int *r
)
2892 if ((x
& R_OK
) == R_OK
)
2893 *r
|= Mono_Posix_AccessMode_R_OK
;
2894 #endif /* ndef R_OK */
2896 if ((x
& W_OK
) == W_OK
)
2897 *r
|= Mono_Posix_AccessMode_W_OK
;
2898 #endif /* ndef W_OK */
2900 if ((x
& X_OK
) == X_OK
)
2901 *r
|= Mono_Posix_AccessMode_X_OK
;
2902 #endif /* ndef X_OK */
2904 if ((x
& F_OK
) == F_OK
)
2905 *r
|= Mono_Posix_AccessMode_F_OK
;
2906 #endif /* ndef F_OK */
2910 int Mono_Posix_FromPathConf (int x
, int *r
)
2915 if (x
== Mono_Posix_PathConf__PC_LINK_MAX
)
2917 {*r
= _PC_LINK_MAX
; return 0;}
2918 #else /* def _PC_LINK_MAX */
2919 {errno
= EINVAL
; return -1;}
2920 #endif /* ndef _PC_LINK_MAX */
2921 if (x
== Mono_Posix_PathConf__PC_MAX_CANON
)
2922 #ifdef _PC_MAX_CANON
2923 {*r
= _PC_MAX_CANON
; return 0;}
2924 #else /* def _PC_MAX_CANON */
2925 {errno
= EINVAL
; return -1;}
2926 #endif /* ndef _PC_MAX_CANON */
2927 if (x
== Mono_Posix_PathConf__PC_MAX_INPUT
)
2928 #ifdef _PC_MAX_INPUT
2929 {*r
= _PC_MAX_INPUT
; return 0;}
2930 #else /* def _PC_MAX_INPUT */
2931 {errno
= EINVAL
; return -1;}
2932 #endif /* ndef _PC_MAX_INPUT */
2933 if (x
== Mono_Posix_PathConf__PC_NAME_MAX
)
2935 {*r
= _PC_NAME_MAX
; return 0;}
2936 #else /* def _PC_NAME_MAX */
2937 {errno
= EINVAL
; return -1;}
2938 #endif /* ndef _PC_NAME_MAX */
2939 if (x
== Mono_Posix_PathConf__PC_PATH_MAX
)
2941 {*r
= _PC_PATH_MAX
; return 0;}
2942 #else /* def _PC_PATH_MAX */
2943 {errno
= EINVAL
; return -1;}
2944 #endif /* ndef _PC_PATH_MAX */
2945 if (x
== Mono_Posix_PathConf__PC_PIPE_BUF
)
2947 {*r
= _PC_PIPE_BUF
; return 0;}
2948 #else /* def _PC_PIPE_BUF */
2949 {errno
= EINVAL
; return -1;}
2950 #endif /* ndef _PC_PIPE_BUF */
2951 if (x
== Mono_Posix_PathConf__PC_CHOWN_RESTRICTED
)
2952 #ifdef _PC_CHOWN_RESTRICTED
2953 {*r
= _PC_CHOWN_RESTRICTED
; return 0;}
2954 #else /* def _PC_CHOWN_RESTRICTED */
2955 {errno
= EINVAL
; return -1;}
2956 #endif /* ndef _PC_CHOWN_RESTRICTED */
2957 if (x
== Mono_Posix_PathConf__PC_NO_TRUNC
)
2959 {*r
= _PC_NO_TRUNC
; return 0;}
2960 #else /* def _PC_NO_TRUNC */
2961 {errno
= EINVAL
; return -1;}
2962 #endif /* ndef _PC_NO_TRUNC */
2963 if (x
== Mono_Posix_PathConf__PC_VDISABLE
)
2965 {*r
= _PC_VDISABLE
; return 0;}
2966 #else /* def _PC_VDISABLE */
2967 {errno
= EINVAL
; return -1;}
2968 #endif /* ndef _PC_VDISABLE */
2969 if (x
== Mono_Posix_PathConf__PC_SYNC_IO
)
2971 {*r
= _PC_SYNC_IO
; return 0;}
2972 #else /* def _PC_SYNC_IO */
2973 {errno
= EINVAL
; return -1;}
2974 #endif /* ndef _PC_SYNC_IO */
2975 if (x
== Mono_Posix_PathConf__PC_ASYNC_IO
)
2977 {*r
= _PC_ASYNC_IO
; return 0;}
2978 #else /* def _PC_ASYNC_IO */
2979 {errno
= EINVAL
; return -1;}
2980 #endif /* ndef _PC_ASYNC_IO */
2981 if (x
== Mono_Posix_PathConf__PC_PRIO_IO
)
2983 {*r
= _PC_PRIO_IO
; return 0;}
2984 #else /* def _PC_PRIO_IO */
2985 {errno
= EINVAL
; return -1;}
2986 #endif /* ndef _PC_PRIO_IO */
2987 if (x
== Mono_Posix_PathConf__PC_SOCK_MAXBUF
)
2988 #ifdef _PC_SOCK_MAXBUF
2989 {*r
= _PC_SOCK_MAXBUF
; return 0;}
2990 #else /* def _PC_SOCK_MAXBUF */
2991 {errno
= EINVAL
; return -1;}
2992 #endif /* ndef _PC_SOCK_MAXBUF */
2993 if (x
== Mono_Posix_PathConf__PC_FILESIZEBITS
)
2994 #ifdef _PC_FILESIZEBITS
2995 {*r
= _PC_FILESIZEBITS
; return 0;}
2996 #else /* def _PC_FILESIZEBITS */
2997 {errno
= EINVAL
; return -1;}
2998 #endif /* ndef _PC_FILESIZEBITS */
2999 if (x
== Mono_Posix_PathConf__PC_REC_INCR_XFER_SIZE
)
3000 #ifdef _PC_REC_INCR_XFER_SIZE
3001 {*r
= _PC_REC_INCR_XFER_SIZE
; return 0;}
3002 #else /* def _PC_REC_INCR_XFER_SIZE */
3003 {errno
= EINVAL
; return -1;}
3004 #endif /* ndef _PC_REC_INCR_XFER_SIZE */
3005 if (x
== Mono_Posix_PathConf__PC_REC_MAX_XFER_SIZE
)
3006 #ifdef _PC_REC_MAX_XFER_SIZE
3007 {*r
= _PC_REC_MAX_XFER_SIZE
; return 0;}
3008 #else /* def _PC_REC_MAX_XFER_SIZE */
3009 {errno
= EINVAL
; return -1;}
3010 #endif /* ndef _PC_REC_MAX_XFER_SIZE */
3011 if (x
== Mono_Posix_PathConf__PC_REC_MIN_XFER_SIZE
)
3012 #ifdef _PC_REC_MIN_XFER_SIZE
3013 {*r
= _PC_REC_MIN_XFER_SIZE
; return 0;}
3014 #else /* def _PC_REC_MIN_XFER_SIZE */
3015 {errno
= EINVAL
; return -1;}
3016 #endif /* ndef _PC_REC_MIN_XFER_SIZE */
3017 if (x
== Mono_Posix_PathConf__PC_REC_XFER_ALIGN
)
3018 #ifdef _PC_REC_XFER_ALIGN
3019 {*r
= _PC_REC_XFER_ALIGN
; return 0;}
3020 #else /* def _PC_REC_XFER_ALIGN */
3021 {errno
= EINVAL
; return -1;}
3022 #endif /* ndef _PC_REC_XFER_ALIGN */
3023 if (x
== Mono_Posix_PathConf__PC_ALLOC_SIZE_MIN
)
3024 #ifdef _PC_ALLOC_SIZE_MIN
3025 {*r
= _PC_ALLOC_SIZE_MIN
; return 0;}
3026 #else /* def _PC_ALLOC_SIZE_MIN */
3027 {errno
= EINVAL
; return -1;}
3028 #endif /* ndef _PC_ALLOC_SIZE_MIN */
3029 if (x
== Mono_Posix_PathConf__PC_SYMLINK_MAX
)
3030 #ifdef _PC_SYMLINK_MAX
3031 {*r
= _PC_SYMLINK_MAX
; return 0;}
3032 #else /* def _PC_SYMLINK_MAX */
3033 {errno
= EINVAL
; return -1;}
3034 #endif /* ndef _PC_SYMLINK_MAX */
3035 if (x
== Mono_Posix_PathConf__PC_2_SYMLINKS
)
3036 #ifdef _PC_2_SYMLINKS
3037 {*r
= _PC_2_SYMLINKS
; return 0;}
3038 #else /* def _PC_2_SYMLINKS */
3039 {errno
= EINVAL
; return -1;}
3040 #endif /* ndef _PC_2_SYMLINKS */
3041 errno
= EINVAL
; return -1;
3044 int Mono_Posix_ToPathConf (int x
, int *r
)
3050 if (x
== _PC_LINK_MAX
)
3051 {*r
= Mono_Posix_PathConf__PC_LINK_MAX
; return 0;}
3052 #endif /* ndef _PC_LINK_MAX */
3053 #ifdef _PC_MAX_CANON
3054 if (x
== _PC_MAX_CANON
)
3055 {*r
= Mono_Posix_PathConf__PC_MAX_CANON
; return 0;}
3056 #endif /* ndef _PC_MAX_CANON */
3057 #ifdef _PC_MAX_INPUT
3058 if (x
== _PC_MAX_INPUT
)
3059 {*r
= Mono_Posix_PathConf__PC_MAX_INPUT
; return 0;}
3060 #endif /* ndef _PC_MAX_INPUT */
3062 if (x
== _PC_NAME_MAX
)
3063 {*r
= Mono_Posix_PathConf__PC_NAME_MAX
; return 0;}
3064 #endif /* ndef _PC_NAME_MAX */
3066 if (x
== _PC_PATH_MAX
)
3067 {*r
= Mono_Posix_PathConf__PC_PATH_MAX
; return 0;}
3068 #endif /* ndef _PC_PATH_MAX */
3070 if (x
== _PC_PIPE_BUF
)
3071 {*r
= Mono_Posix_PathConf__PC_PIPE_BUF
; return 0;}
3072 #endif /* ndef _PC_PIPE_BUF */
3073 #ifdef _PC_CHOWN_RESTRICTED
3074 if (x
== _PC_CHOWN_RESTRICTED
)
3075 {*r
= Mono_Posix_PathConf__PC_CHOWN_RESTRICTED
; return 0;}
3076 #endif /* ndef _PC_CHOWN_RESTRICTED */
3078 if (x
== _PC_NO_TRUNC
)
3079 {*r
= Mono_Posix_PathConf__PC_NO_TRUNC
; return 0;}
3080 #endif /* ndef _PC_NO_TRUNC */
3082 if (x
== _PC_VDISABLE
)
3083 {*r
= Mono_Posix_PathConf__PC_VDISABLE
; return 0;}
3084 #endif /* ndef _PC_VDISABLE */
3086 if (x
== _PC_SYNC_IO
)
3087 {*r
= Mono_Posix_PathConf__PC_SYNC_IO
; return 0;}
3088 #endif /* ndef _PC_SYNC_IO */
3090 if (x
== _PC_ASYNC_IO
)
3091 {*r
= Mono_Posix_PathConf__PC_ASYNC_IO
; return 0;}
3092 #endif /* ndef _PC_ASYNC_IO */
3094 if (x
== _PC_PRIO_IO
)
3095 {*r
= Mono_Posix_PathConf__PC_PRIO_IO
; return 0;}
3096 #endif /* ndef _PC_PRIO_IO */
3097 #ifdef _PC_SOCK_MAXBUF
3098 if (x
== _PC_SOCK_MAXBUF
)
3099 {*r
= Mono_Posix_PathConf__PC_SOCK_MAXBUF
; return 0;}
3100 #endif /* ndef _PC_SOCK_MAXBUF */
3101 #ifdef _PC_FILESIZEBITS
3102 if (x
== _PC_FILESIZEBITS
)
3103 {*r
= Mono_Posix_PathConf__PC_FILESIZEBITS
; return 0;}
3104 #endif /* ndef _PC_FILESIZEBITS */
3105 #ifdef _PC_REC_INCR_XFER_SIZE
3106 if (x
== _PC_REC_INCR_XFER_SIZE
)
3107 {*r
= Mono_Posix_PathConf__PC_REC_INCR_XFER_SIZE
; return 0;}
3108 #endif /* ndef _PC_REC_INCR_XFER_SIZE */
3109 #ifdef _PC_REC_MAX_XFER_SIZE
3110 if (x
== _PC_REC_MAX_XFER_SIZE
)
3111 {*r
= Mono_Posix_PathConf__PC_REC_MAX_XFER_SIZE
; return 0;}
3112 #endif /* ndef _PC_REC_MAX_XFER_SIZE */
3113 #ifdef _PC_REC_MIN_XFER_SIZE
3114 if (x
== _PC_REC_MIN_XFER_SIZE
)
3115 {*r
= Mono_Posix_PathConf__PC_REC_MIN_XFER_SIZE
; return 0;}
3116 #endif /* ndef _PC_REC_MIN_XFER_SIZE */
3117 #ifdef _PC_REC_XFER_ALIGN
3118 if (x
== _PC_REC_XFER_ALIGN
)
3119 {*r
= Mono_Posix_PathConf__PC_REC_XFER_ALIGN
; return 0;}
3120 #endif /* ndef _PC_REC_XFER_ALIGN */
3121 #ifdef _PC_ALLOC_SIZE_MIN
3122 if (x
== _PC_ALLOC_SIZE_MIN
)
3123 {*r
= Mono_Posix_PathConf__PC_ALLOC_SIZE_MIN
; return 0;}
3124 #endif /* ndef _PC_ALLOC_SIZE_MIN */
3125 #ifdef _PC_SYMLINK_MAX
3126 if (x
== _PC_SYMLINK_MAX
)
3127 {*r
= Mono_Posix_PathConf__PC_SYMLINK_MAX
; return 0;}
3128 #endif /* ndef _PC_SYMLINK_MAX */
3129 #ifdef _PC_2_SYMLINKS
3130 if (x
== _PC_2_SYMLINKS
)
3131 {*r
= Mono_Posix_PathConf__PC_2_SYMLINKS
; return 0;}
3132 #endif /* ndef _PC_2_SYMLINKS */
3133 errno
= EINVAL
; return -1;
3136 int Mono_Posix_FromSysConf (int x
, int *r
)
3141 if (x
== Mono_Posix_SysConf__SC_ARG_MAX
)
3143 {*r
= _SC_ARG_MAX
; return 0;}
3144 #else /* def _SC_ARG_MAX */
3145 {errno
= EINVAL
; return -1;}
3146 #endif /* ndef _SC_ARG_MAX */
3147 if (x
== Mono_Posix_SysConf__SC_CHILD_MAX
)
3148 #ifdef _SC_CHILD_MAX
3149 {*r
= _SC_CHILD_MAX
; return 0;}
3150 #else /* def _SC_CHILD_MAX */
3151 {errno
= EINVAL
; return -1;}
3152 #endif /* ndef _SC_CHILD_MAX */
3153 if (x
== Mono_Posix_SysConf__SC_CLK_TCK
)
3155 {*r
= _SC_CLK_TCK
; return 0;}
3156 #else /* def _SC_CLK_TCK */
3157 {errno
= EINVAL
; return -1;}
3158 #endif /* ndef _SC_CLK_TCK */
3159 if (x
== Mono_Posix_SysConf__SC_NGROUPS_MAX
)
3160 #ifdef _SC_NGROUPS_MAX
3161 {*r
= _SC_NGROUPS_MAX
; return 0;}
3162 #else /* def _SC_NGROUPS_MAX */
3163 {errno
= EINVAL
; return -1;}
3164 #endif /* ndef _SC_NGROUPS_MAX */
3165 if (x
== Mono_Posix_SysConf__SC_OPEN_MAX
)
3167 {*r
= _SC_OPEN_MAX
; return 0;}
3168 #else /* def _SC_OPEN_MAX */
3169 {errno
= EINVAL
; return -1;}
3170 #endif /* ndef _SC_OPEN_MAX */
3171 if (x
== Mono_Posix_SysConf__SC_STREAM_MAX
)
3172 #ifdef _SC_STREAM_MAX
3173 {*r
= _SC_STREAM_MAX
; return 0;}
3174 #else /* def _SC_STREAM_MAX */
3175 {errno
= EINVAL
; return -1;}
3176 #endif /* ndef _SC_STREAM_MAX */
3177 if (x
== Mono_Posix_SysConf__SC_TZNAME_MAX
)
3178 #ifdef _SC_TZNAME_MAX
3179 {*r
= _SC_TZNAME_MAX
; return 0;}
3180 #else /* def _SC_TZNAME_MAX */
3181 {errno
= EINVAL
; return -1;}
3182 #endif /* ndef _SC_TZNAME_MAX */
3183 if (x
== Mono_Posix_SysConf__SC_JOB_CONTROL
)
3184 #ifdef _SC_JOB_CONTROL
3185 {*r
= _SC_JOB_CONTROL
; return 0;}
3186 #else /* def _SC_JOB_CONTROL */
3187 {errno
= EINVAL
; return -1;}
3188 #endif /* ndef _SC_JOB_CONTROL */
3189 if (x
== Mono_Posix_SysConf__SC_SAVED_IDS
)
3190 #ifdef _SC_SAVED_IDS
3191 {*r
= _SC_SAVED_IDS
; return 0;}
3192 #else /* def _SC_SAVED_IDS */
3193 {errno
= EINVAL
; return -1;}
3194 #endif /* ndef _SC_SAVED_IDS */
3195 if (x
== Mono_Posix_SysConf__SC_REALTIME_SIGNALS
)
3196 #ifdef _SC_REALTIME_SIGNALS
3197 {*r
= _SC_REALTIME_SIGNALS
; return 0;}
3198 #else /* def _SC_REALTIME_SIGNALS */
3199 {errno
= EINVAL
; return -1;}
3200 #endif /* ndef _SC_REALTIME_SIGNALS */
3201 if (x
== Mono_Posix_SysConf__SC_PRIORITY_SCHEDULING
)
3202 #ifdef _SC_PRIORITY_SCHEDULING
3203 {*r
= _SC_PRIORITY_SCHEDULING
; return 0;}
3204 #else /* def _SC_PRIORITY_SCHEDULING */
3205 {errno
= EINVAL
; return -1;}
3206 #endif /* ndef _SC_PRIORITY_SCHEDULING */
3207 if (x
== Mono_Posix_SysConf__SC_TIMERS
)
3209 {*r
= _SC_TIMERS
; return 0;}
3210 #else /* def _SC_TIMERS */
3211 {errno
= EINVAL
; return -1;}
3212 #endif /* ndef _SC_TIMERS */
3213 if (x
== Mono_Posix_SysConf__SC_ASYNCHRONOUS_IO
)
3214 #ifdef _SC_ASYNCHRONOUS_IO
3215 {*r
= _SC_ASYNCHRONOUS_IO
; return 0;}
3216 #else /* def _SC_ASYNCHRONOUS_IO */
3217 {errno
= EINVAL
; return -1;}
3218 #endif /* ndef _SC_ASYNCHRONOUS_IO */
3219 if (x
== Mono_Posix_SysConf__SC_PRIORITIZED_IO
)
3220 #ifdef _SC_PRIORITIZED_IO
3221 {*r
= _SC_PRIORITIZED_IO
; return 0;}
3222 #else /* def _SC_PRIORITIZED_IO */
3223 {errno
= EINVAL
; return -1;}
3224 #endif /* ndef _SC_PRIORITIZED_IO */
3225 if (x
== Mono_Posix_SysConf__SC_SYNCHRONIZED_IO
)
3226 #ifdef _SC_SYNCHRONIZED_IO
3227 {*r
= _SC_SYNCHRONIZED_IO
; return 0;}
3228 #else /* def _SC_SYNCHRONIZED_IO */
3229 {errno
= EINVAL
; return -1;}
3230 #endif /* ndef _SC_SYNCHRONIZED_IO */
3231 if (x
== Mono_Posix_SysConf__SC_FSYNC
)
3233 {*r
= _SC_FSYNC
; return 0;}
3234 #else /* def _SC_FSYNC */
3235 {errno
= EINVAL
; return -1;}
3236 #endif /* ndef _SC_FSYNC */
3237 if (x
== Mono_Posix_SysConf__SC_MAPPED_FILES
)
3238 #ifdef _SC_MAPPED_FILES
3239 {*r
= _SC_MAPPED_FILES
; return 0;}
3240 #else /* def _SC_MAPPED_FILES */
3241 {errno
= EINVAL
; return -1;}
3242 #endif /* ndef _SC_MAPPED_FILES */
3243 if (x
== Mono_Posix_SysConf__SC_MEMLOCK
)
3245 {*r
= _SC_MEMLOCK
; return 0;}
3246 #else /* def _SC_MEMLOCK */
3247 {errno
= EINVAL
; return -1;}
3248 #endif /* ndef _SC_MEMLOCK */
3249 if (x
== Mono_Posix_SysConf__SC_MEMLOCK_RANGE
)
3250 #ifdef _SC_MEMLOCK_RANGE
3251 {*r
= _SC_MEMLOCK_RANGE
; return 0;}
3252 #else /* def _SC_MEMLOCK_RANGE */
3253 {errno
= EINVAL
; return -1;}
3254 #endif /* ndef _SC_MEMLOCK_RANGE */
3255 if (x
== Mono_Posix_SysConf__SC_MEMORY_PROTECTION
)
3256 #ifdef _SC_MEMORY_PROTECTION
3257 {*r
= _SC_MEMORY_PROTECTION
; return 0;}
3258 #else /* def _SC_MEMORY_PROTECTION */
3259 {errno
= EINVAL
; return -1;}
3260 #endif /* ndef _SC_MEMORY_PROTECTION */
3261 if (x
== Mono_Posix_SysConf__SC_MESSAGE_PASSING
)
3262 #ifdef _SC_MESSAGE_PASSING
3263 {*r
= _SC_MESSAGE_PASSING
; return 0;}
3264 #else /* def _SC_MESSAGE_PASSING */
3265 {errno
= EINVAL
; return -1;}
3266 #endif /* ndef _SC_MESSAGE_PASSING */
3267 if (x
== Mono_Posix_SysConf__SC_SEMAPHORES
)
3268 #ifdef _SC_SEMAPHORES
3269 {*r
= _SC_SEMAPHORES
; return 0;}
3270 #else /* def _SC_SEMAPHORES */
3271 {errno
= EINVAL
; return -1;}
3272 #endif /* ndef _SC_SEMAPHORES */
3273 if (x
== Mono_Posix_SysConf__SC_SHARED_MEMORY_OBJECTS
)
3274 #ifdef _SC_SHARED_MEMORY_OBJECTS
3275 {*r
= _SC_SHARED_MEMORY_OBJECTS
; return 0;}
3276 #else /* def _SC_SHARED_MEMORY_OBJECTS */
3277 {errno
= EINVAL
; return -1;}
3278 #endif /* ndef _SC_SHARED_MEMORY_OBJECTS */
3279 if (x
== Mono_Posix_SysConf__SC_AIO_LISTIO_MAX
)
3280 #ifdef _SC_AIO_LISTIO_MAX
3281 {*r
= _SC_AIO_LISTIO_MAX
; return 0;}
3282 #else /* def _SC_AIO_LISTIO_MAX */
3283 {errno
= EINVAL
; return -1;}
3284 #endif /* ndef _SC_AIO_LISTIO_MAX */
3285 if (x
== Mono_Posix_SysConf__SC_AIO_MAX
)
3287 {*r
= _SC_AIO_MAX
; return 0;}
3288 #else /* def _SC_AIO_MAX */
3289 {errno
= EINVAL
; return -1;}
3290 #endif /* ndef _SC_AIO_MAX */
3291 if (x
== Mono_Posix_SysConf__SC_AIO_PRIO_DELTA_MAX
)
3292 #ifdef _SC_AIO_PRIO_DELTA_MAX
3293 {*r
= _SC_AIO_PRIO_DELTA_MAX
; return 0;}
3294 #else /* def _SC_AIO_PRIO_DELTA_MAX */
3295 {errno
= EINVAL
; return -1;}
3296 #endif /* ndef _SC_AIO_PRIO_DELTA_MAX */
3297 if (x
== Mono_Posix_SysConf__SC_DELAYTIMER_MAX
)
3298 #ifdef _SC_DELAYTIMER_MAX
3299 {*r
= _SC_DELAYTIMER_MAX
; return 0;}
3300 #else /* def _SC_DELAYTIMER_MAX */
3301 {errno
= EINVAL
; return -1;}
3302 #endif /* ndef _SC_DELAYTIMER_MAX */
3303 if (x
== Mono_Posix_SysConf__SC_MQ_OPEN_MAX
)
3304 #ifdef _SC_MQ_OPEN_MAX
3305 {*r
= _SC_MQ_OPEN_MAX
; return 0;}
3306 #else /* def _SC_MQ_OPEN_MAX */
3307 {errno
= EINVAL
; return -1;}
3308 #endif /* ndef _SC_MQ_OPEN_MAX */
3309 if (x
== Mono_Posix_SysConf__SC_MQ_PRIO_MAX
)
3310 #ifdef _SC_MQ_PRIO_MAX
3311 {*r
= _SC_MQ_PRIO_MAX
; return 0;}
3312 #else /* def _SC_MQ_PRIO_MAX */
3313 {errno
= EINVAL
; return -1;}
3314 #endif /* ndef _SC_MQ_PRIO_MAX */
3315 if (x
== Mono_Posix_SysConf__SC_VERSION
)
3317 {*r
= _SC_VERSION
; return 0;}
3318 #else /* def _SC_VERSION */
3319 {errno
= EINVAL
; return -1;}
3320 #endif /* ndef _SC_VERSION */
3321 if (x
== Mono_Posix_SysConf__SC_PAGESIZE
)
3323 {*r
= _SC_PAGESIZE
; return 0;}
3324 #else /* def _SC_PAGESIZE */
3325 {errno
= EINVAL
; return -1;}
3326 #endif /* ndef _SC_PAGESIZE */
3327 if (x
== Mono_Posix_SysConf__SC_RTSIG_MAX
)
3328 #ifdef _SC_RTSIG_MAX
3329 {*r
= _SC_RTSIG_MAX
; return 0;}
3330 #else /* def _SC_RTSIG_MAX */
3331 {errno
= EINVAL
; return -1;}
3332 #endif /* ndef _SC_RTSIG_MAX */
3333 if (x
== Mono_Posix_SysConf__SC_SEM_NSEMS_MAX
)
3334 #ifdef _SC_SEM_NSEMS_MAX
3335 {*r
= _SC_SEM_NSEMS_MAX
; return 0;}
3336 #else /* def _SC_SEM_NSEMS_MAX */
3337 {errno
= EINVAL
; return -1;}
3338 #endif /* ndef _SC_SEM_NSEMS_MAX */
3339 if (x
== Mono_Posix_SysConf__SC_SEM_VALUE_MAX
)
3340 #ifdef _SC_SEM_VALUE_MAX
3341 {*r
= _SC_SEM_VALUE_MAX
; return 0;}
3342 #else /* def _SC_SEM_VALUE_MAX */
3343 {errno
= EINVAL
; return -1;}
3344 #endif /* ndef _SC_SEM_VALUE_MAX */
3345 if (x
== Mono_Posix_SysConf__SC_SIGQUEUE_MAX
)
3346 #ifdef _SC_SIGQUEUE_MAX
3347 {*r
= _SC_SIGQUEUE_MAX
; return 0;}
3348 #else /* def _SC_SIGQUEUE_MAX */
3349 {errno
= EINVAL
; return -1;}
3350 #endif /* ndef _SC_SIGQUEUE_MAX */
3351 if (x
== Mono_Posix_SysConf__SC_TIMER_MAX
)
3352 #ifdef _SC_TIMER_MAX
3353 {*r
= _SC_TIMER_MAX
; return 0;}
3354 #else /* def _SC_TIMER_MAX */
3355 {errno
= EINVAL
; return -1;}
3356 #endif /* ndef _SC_TIMER_MAX */
3357 if (x
== Mono_Posix_SysConf__SC_BC_BASE_MAX
)
3358 #ifdef _SC_BC_BASE_MAX
3359 {*r
= _SC_BC_BASE_MAX
; return 0;}
3360 #else /* def _SC_BC_BASE_MAX */
3361 {errno
= EINVAL
; return -1;}
3362 #endif /* ndef _SC_BC_BASE_MAX */
3363 if (x
== Mono_Posix_SysConf__SC_BC_DIM_MAX
)
3364 #ifdef _SC_BC_DIM_MAX
3365 {*r
= _SC_BC_DIM_MAX
; return 0;}
3366 #else /* def _SC_BC_DIM_MAX */
3367 {errno
= EINVAL
; return -1;}
3368 #endif /* ndef _SC_BC_DIM_MAX */
3369 if (x
== Mono_Posix_SysConf__SC_BC_SCALE_MAX
)
3370 #ifdef _SC_BC_SCALE_MAX
3371 {*r
= _SC_BC_SCALE_MAX
; return 0;}
3372 #else /* def _SC_BC_SCALE_MAX */
3373 {errno
= EINVAL
; return -1;}
3374 #endif /* ndef _SC_BC_SCALE_MAX */
3375 if (x
== Mono_Posix_SysConf__SC_BC_STRING_MAX
)
3376 #ifdef _SC_BC_STRING_MAX
3377 {*r
= _SC_BC_STRING_MAX
; return 0;}
3378 #else /* def _SC_BC_STRING_MAX */
3379 {errno
= EINVAL
; return -1;}
3380 #endif /* ndef _SC_BC_STRING_MAX */
3381 if (x
== Mono_Posix_SysConf__SC_COLL_WEIGHTS_MAX
)
3382 #ifdef _SC_COLL_WEIGHTS_MAX
3383 {*r
= _SC_COLL_WEIGHTS_MAX
; return 0;}
3384 #else /* def _SC_COLL_WEIGHTS_MAX */
3385 {errno
= EINVAL
; return -1;}
3386 #endif /* ndef _SC_COLL_WEIGHTS_MAX */
3387 if (x
== Mono_Posix_SysConf__SC_EQUIV_CLASS_MAX
)
3388 #ifdef _SC_EQUIV_CLASS_MAX
3389 {*r
= _SC_EQUIV_CLASS_MAX
; return 0;}
3390 #else /* def _SC_EQUIV_CLASS_MAX */
3391 {errno
= EINVAL
; return -1;}
3392 #endif /* ndef _SC_EQUIV_CLASS_MAX */
3393 if (x
== Mono_Posix_SysConf__SC_EXPR_NEST_MAX
)
3394 #ifdef _SC_EXPR_NEST_MAX
3395 {*r
= _SC_EXPR_NEST_MAX
; return 0;}
3396 #else /* def _SC_EXPR_NEST_MAX */
3397 {errno
= EINVAL
; return -1;}
3398 #endif /* ndef _SC_EXPR_NEST_MAX */
3399 if (x
== Mono_Posix_SysConf__SC_LINE_MAX
)
3401 {*r
= _SC_LINE_MAX
; return 0;}
3402 #else /* def _SC_LINE_MAX */
3403 {errno
= EINVAL
; return -1;}
3404 #endif /* ndef _SC_LINE_MAX */
3405 if (x
== Mono_Posix_SysConf__SC_RE_DUP_MAX
)
3406 #ifdef _SC_RE_DUP_MAX
3407 {*r
= _SC_RE_DUP_MAX
; return 0;}
3408 #else /* def _SC_RE_DUP_MAX */
3409 {errno
= EINVAL
; return -1;}
3410 #endif /* ndef _SC_RE_DUP_MAX */
3411 if (x
== Mono_Posix_SysConf__SC_CHARCLASS_NAME_MAX
)
3412 #ifdef _SC_CHARCLASS_NAME_MAX
3413 {*r
= _SC_CHARCLASS_NAME_MAX
; return 0;}
3414 #else /* def _SC_CHARCLASS_NAME_MAX */
3415 {errno
= EINVAL
; return -1;}
3416 #endif /* ndef _SC_CHARCLASS_NAME_MAX */
3417 if (x
== Mono_Posix_SysConf__SC_2_VERSION
)
3418 #ifdef _SC_2_VERSION
3419 {*r
= _SC_2_VERSION
; return 0;}
3420 #else /* def _SC_2_VERSION */
3421 {errno
= EINVAL
; return -1;}
3422 #endif /* ndef _SC_2_VERSION */
3423 if (x
== Mono_Posix_SysConf__SC_2_C_BIND
)
3425 {*r
= _SC_2_C_BIND
; return 0;}
3426 #else /* def _SC_2_C_BIND */
3427 {errno
= EINVAL
; return -1;}
3428 #endif /* ndef _SC_2_C_BIND */
3429 if (x
== Mono_Posix_SysConf__SC_2_C_DEV
)
3431 {*r
= _SC_2_C_DEV
; return 0;}
3432 #else /* def _SC_2_C_DEV */
3433 {errno
= EINVAL
; return -1;}
3434 #endif /* ndef _SC_2_C_DEV */
3435 if (x
== Mono_Posix_SysConf__SC_2_FORT_DEV
)
3436 #ifdef _SC_2_FORT_DEV
3437 {*r
= _SC_2_FORT_DEV
; return 0;}
3438 #else /* def _SC_2_FORT_DEV */
3439 {errno
= EINVAL
; return -1;}
3440 #endif /* ndef _SC_2_FORT_DEV */
3441 if (x
== Mono_Posix_SysConf__SC_2_FORT_RUN
)
3442 #ifdef _SC_2_FORT_RUN
3443 {*r
= _SC_2_FORT_RUN
; return 0;}
3444 #else /* def _SC_2_FORT_RUN */
3445 {errno
= EINVAL
; return -1;}
3446 #endif /* ndef _SC_2_FORT_RUN */
3447 if (x
== Mono_Posix_SysConf__SC_2_SW_DEV
)
3449 {*r
= _SC_2_SW_DEV
; return 0;}
3450 #else /* def _SC_2_SW_DEV */
3451 {errno
= EINVAL
; return -1;}
3452 #endif /* ndef _SC_2_SW_DEV */
3453 if (x
== Mono_Posix_SysConf__SC_2_LOCALEDEF
)
3454 #ifdef _SC_2_LOCALEDEF
3455 {*r
= _SC_2_LOCALEDEF
; return 0;}
3456 #else /* def _SC_2_LOCALEDEF */
3457 {errno
= EINVAL
; return -1;}
3458 #endif /* ndef _SC_2_LOCALEDEF */
3459 if (x
== Mono_Posix_SysConf__SC_PII
)
3461 {*r
= _SC_PII
; return 0;}
3462 #else /* def _SC_PII */
3463 {errno
= EINVAL
; return -1;}
3464 #endif /* ndef _SC_PII */
3465 if (x
== Mono_Posix_SysConf__SC_PII_XTI
)
3467 {*r
= _SC_PII_XTI
; return 0;}
3468 #else /* def _SC_PII_XTI */
3469 {errno
= EINVAL
; return -1;}
3470 #endif /* ndef _SC_PII_XTI */
3471 if (x
== Mono_Posix_SysConf__SC_PII_SOCKET
)
3472 #ifdef _SC_PII_SOCKET
3473 {*r
= _SC_PII_SOCKET
; return 0;}
3474 #else /* def _SC_PII_SOCKET */
3475 {errno
= EINVAL
; return -1;}
3476 #endif /* ndef _SC_PII_SOCKET */
3477 if (x
== Mono_Posix_SysConf__SC_PII_INTERNET
)
3478 #ifdef _SC_PII_INTERNET
3479 {*r
= _SC_PII_INTERNET
; return 0;}
3480 #else /* def _SC_PII_INTERNET */
3481 {errno
= EINVAL
; return -1;}
3482 #endif /* ndef _SC_PII_INTERNET */
3483 if (x
== Mono_Posix_SysConf__SC_PII_OSI
)
3485 {*r
= _SC_PII_OSI
; return 0;}
3486 #else /* def _SC_PII_OSI */
3487 {errno
= EINVAL
; return -1;}
3488 #endif /* ndef _SC_PII_OSI */
3489 if (x
== Mono_Posix_SysConf__SC_POLL
)
3491 {*r
= _SC_POLL
; return 0;}
3492 #else /* def _SC_POLL */
3493 {errno
= EINVAL
; return -1;}
3494 #endif /* ndef _SC_POLL */
3495 if (x
== Mono_Posix_SysConf__SC_SELECT
)
3497 {*r
= _SC_SELECT
; return 0;}
3498 #else /* def _SC_SELECT */
3499 {errno
= EINVAL
; return -1;}
3500 #endif /* ndef _SC_SELECT */
3501 if (x
== Mono_Posix_SysConf__SC_UIO_MAXIOV
)
3502 #ifdef _SC_UIO_MAXIOV
3503 {*r
= _SC_UIO_MAXIOV
; return 0;}
3504 #else /* def _SC_UIO_MAXIOV */
3505 {errno
= EINVAL
; return -1;}
3506 #endif /* ndef _SC_UIO_MAXIOV */
3507 if (x
== Mono_Posix_SysConf__SC_IOV_MAX
)
3509 {*r
= _SC_IOV_MAX
; return 0;}
3510 #else /* def _SC_IOV_MAX */
3511 {errno
= EINVAL
; return -1;}
3512 #endif /* ndef _SC_IOV_MAX */
3513 if (x
== Mono_Posix_SysConf__SC_PII_INTERNET_STREAM
)
3514 #ifdef _SC_PII_INTERNET_STREAM
3515 {*r
= _SC_PII_INTERNET_STREAM
; return 0;}
3516 #else /* def _SC_PII_INTERNET_STREAM */
3517 {errno
= EINVAL
; return -1;}
3518 #endif /* ndef _SC_PII_INTERNET_STREAM */
3519 if (x
== Mono_Posix_SysConf__SC_PII_INTERNET_DGRAM
)
3520 #ifdef _SC_PII_INTERNET_DGRAM
3521 {*r
= _SC_PII_INTERNET_DGRAM
; return 0;}
3522 #else /* def _SC_PII_INTERNET_DGRAM */
3523 {errno
= EINVAL
; return -1;}
3524 #endif /* ndef _SC_PII_INTERNET_DGRAM */
3525 if (x
== Mono_Posix_SysConf__SC_PII_OSI_COTS
)
3526 #ifdef _SC_PII_OSI_COTS
3527 {*r
= _SC_PII_OSI_COTS
; return 0;}
3528 #else /* def _SC_PII_OSI_COTS */
3529 {errno
= EINVAL
; return -1;}
3530 #endif /* ndef _SC_PII_OSI_COTS */
3531 if (x
== Mono_Posix_SysConf__SC_PII_OSI_CLTS
)
3532 #ifdef _SC_PII_OSI_CLTS
3533 {*r
= _SC_PII_OSI_CLTS
; return 0;}
3534 #else /* def _SC_PII_OSI_CLTS */
3535 {errno
= EINVAL
; return -1;}
3536 #endif /* ndef _SC_PII_OSI_CLTS */
3537 if (x
== Mono_Posix_SysConf__SC_PII_OSI_M
)
3538 #ifdef _SC_PII_OSI_M
3539 {*r
= _SC_PII_OSI_M
; return 0;}
3540 #else /* def _SC_PII_OSI_M */
3541 {errno
= EINVAL
; return -1;}
3542 #endif /* ndef _SC_PII_OSI_M */
3543 if (x
== Mono_Posix_SysConf__SC_T_IOV_MAX
)
3544 #ifdef _SC_T_IOV_MAX
3545 {*r
= _SC_T_IOV_MAX
; return 0;}
3546 #else /* def _SC_T_IOV_MAX */
3547 {errno
= EINVAL
; return -1;}
3548 #endif /* ndef _SC_T_IOV_MAX */
3549 if (x
== Mono_Posix_SysConf__SC_THREADS
)
3551 {*r
= _SC_THREADS
; return 0;}
3552 #else /* def _SC_THREADS */
3553 {errno
= EINVAL
; return -1;}
3554 #endif /* ndef _SC_THREADS */
3555 if (x
== Mono_Posix_SysConf__SC_THREAD_SAFE_FUNCTIONS
)
3556 #ifdef _SC_THREAD_SAFE_FUNCTIONS
3557 {*r
= _SC_THREAD_SAFE_FUNCTIONS
; return 0;}
3558 #else /* def _SC_THREAD_SAFE_FUNCTIONS */
3559 {errno
= EINVAL
; return -1;}
3560 #endif /* ndef _SC_THREAD_SAFE_FUNCTIONS */
3561 if (x
== Mono_Posix_SysConf__SC_GETGR_R_SIZE_MAX
)
3562 #ifdef _SC_GETGR_R_SIZE_MAX
3563 {*r
= _SC_GETGR_R_SIZE_MAX
; return 0;}
3564 #else /* def _SC_GETGR_R_SIZE_MAX */
3565 {errno
= EINVAL
; return -1;}
3566 #endif /* ndef _SC_GETGR_R_SIZE_MAX */
3567 if (x
== Mono_Posix_SysConf__SC_GETPW_R_SIZE_MAX
)
3568 #ifdef _SC_GETPW_R_SIZE_MAX
3569 {*r
= _SC_GETPW_R_SIZE_MAX
; return 0;}
3570 #else /* def _SC_GETPW_R_SIZE_MAX */
3571 {errno
= EINVAL
; return -1;}
3572 #endif /* ndef _SC_GETPW_R_SIZE_MAX */
3573 if (x
== Mono_Posix_SysConf__SC_LOGIN_NAME_MAX
)
3574 #ifdef _SC_LOGIN_NAME_MAX
3575 {*r
= _SC_LOGIN_NAME_MAX
; return 0;}
3576 #else /* def _SC_LOGIN_NAME_MAX */
3577 {errno
= EINVAL
; return -1;}
3578 #endif /* ndef _SC_LOGIN_NAME_MAX */
3579 if (x
== Mono_Posix_SysConf__SC_TTY_NAME_MAX
)
3580 #ifdef _SC_TTY_NAME_MAX
3581 {*r
= _SC_TTY_NAME_MAX
; return 0;}
3582 #else /* def _SC_TTY_NAME_MAX */
3583 {errno
= EINVAL
; return -1;}
3584 #endif /* ndef _SC_TTY_NAME_MAX */
3585 if (x
== Mono_Posix_SysConf__SC_THREAD_DESTRUCTOR_ITERATIONS
)
3586 #ifdef _SC_THREAD_DESTRUCTOR_ITERATIONS
3587 {*r
= _SC_THREAD_DESTRUCTOR_ITERATIONS
; return 0;}
3588 #else /* def _SC_THREAD_DESTRUCTOR_ITERATIONS */
3589 {errno
= EINVAL
; return -1;}
3590 #endif /* ndef _SC_THREAD_DESTRUCTOR_ITERATIONS */
3591 if (x
== Mono_Posix_SysConf__SC_THREAD_KEYS_MAX
)
3592 #ifdef _SC_THREAD_KEYS_MAX
3593 {*r
= _SC_THREAD_KEYS_MAX
; return 0;}
3594 #else /* def _SC_THREAD_KEYS_MAX */
3595 {errno
= EINVAL
; return -1;}
3596 #endif /* ndef _SC_THREAD_KEYS_MAX */
3597 if (x
== Mono_Posix_SysConf__SC_THREAD_STACK_MIN
)
3598 #ifdef _SC_THREAD_STACK_MIN
3599 {*r
= _SC_THREAD_STACK_MIN
; return 0;}
3600 #else /* def _SC_THREAD_STACK_MIN */
3601 {errno
= EINVAL
; return -1;}
3602 #endif /* ndef _SC_THREAD_STACK_MIN */
3603 if (x
== Mono_Posix_SysConf__SC_THREAD_THREADS_MAX
)
3604 #ifdef _SC_THREAD_THREADS_MAX
3605 {*r
= _SC_THREAD_THREADS_MAX
; return 0;}
3606 #else /* def _SC_THREAD_THREADS_MAX */
3607 {errno
= EINVAL
; return -1;}
3608 #endif /* ndef _SC_THREAD_THREADS_MAX */
3609 if (x
== Mono_Posix_SysConf__SC_THREAD_ATTR_STACKADDR
)
3610 #ifdef _SC_THREAD_ATTR_STACKADDR
3611 {*r
= _SC_THREAD_ATTR_STACKADDR
; return 0;}
3612 #else /* def _SC_THREAD_ATTR_STACKADDR */
3613 {errno
= EINVAL
; return -1;}
3614 #endif /* ndef _SC_THREAD_ATTR_STACKADDR */
3615 if (x
== Mono_Posix_SysConf__SC_THREAD_ATTR_STACKSIZE
)
3616 #ifdef _SC_THREAD_ATTR_STACKSIZE
3617 {*r
= _SC_THREAD_ATTR_STACKSIZE
; return 0;}
3618 #else /* def _SC_THREAD_ATTR_STACKSIZE */
3619 {errno
= EINVAL
; return -1;}
3620 #endif /* ndef _SC_THREAD_ATTR_STACKSIZE */
3621 if (x
== Mono_Posix_SysConf__SC_THREAD_PRIORITY_SCHEDULING
)
3622 #ifdef _SC_THREAD_PRIORITY_SCHEDULING
3623 {*r
= _SC_THREAD_PRIORITY_SCHEDULING
; return 0;}
3624 #else /* def _SC_THREAD_PRIORITY_SCHEDULING */
3625 {errno
= EINVAL
; return -1;}
3626 #endif /* ndef _SC_THREAD_PRIORITY_SCHEDULING */
3627 if (x
== Mono_Posix_SysConf__SC_THREAD_PRIO_INHERIT
)
3628 #ifdef _SC_THREAD_PRIO_INHERIT
3629 {*r
= _SC_THREAD_PRIO_INHERIT
; return 0;}
3630 #else /* def _SC_THREAD_PRIO_INHERIT */
3631 {errno
= EINVAL
; return -1;}
3632 #endif /* ndef _SC_THREAD_PRIO_INHERIT */
3633 if (x
== Mono_Posix_SysConf__SC_THREAD_PRIO_PROTECT
)
3634 #ifdef _SC_THREAD_PRIO_PROTECT
3635 {*r
= _SC_THREAD_PRIO_PROTECT
; return 0;}
3636 #else /* def _SC_THREAD_PRIO_PROTECT */
3637 {errno
= EINVAL
; return -1;}
3638 #endif /* ndef _SC_THREAD_PRIO_PROTECT */
3639 if (x
== Mono_Posix_SysConf__SC_THREAD_PROCESS_SHARED
)
3640 #ifdef _SC_THREAD_PROCESS_SHARED
3641 {*r
= _SC_THREAD_PROCESS_SHARED
; return 0;}
3642 #else /* def _SC_THREAD_PROCESS_SHARED */
3643 {errno
= EINVAL
; return -1;}
3644 #endif /* ndef _SC_THREAD_PROCESS_SHARED */
3645 if (x
== Mono_Posix_SysConf__SC_NPROCESSORS_CONF
)
3646 #ifdef _SC_NPROCESSORS_CONF
3647 {*r
= _SC_NPROCESSORS_CONF
; return 0;}
3648 #else /* def _SC_NPROCESSORS_CONF */
3649 {errno
= EINVAL
; return -1;}
3650 #endif /* ndef _SC_NPROCESSORS_CONF */
3651 if (x
== Mono_Posix_SysConf__SC_NPROCESSORS_ONLN
)
3652 #ifdef _SC_NPROCESSORS_ONLN
3653 {*r
= _SC_NPROCESSORS_ONLN
; return 0;}
3654 #else /* def _SC_NPROCESSORS_ONLN */
3655 {errno
= EINVAL
; return -1;}
3656 #endif /* ndef _SC_NPROCESSORS_ONLN */
3657 if (x
== Mono_Posix_SysConf__SC_PHYS_PAGES
)
3658 #ifdef _SC_PHYS_PAGES
3659 {*r
= _SC_PHYS_PAGES
; return 0;}
3660 #else /* def _SC_PHYS_PAGES */
3661 {errno
= EINVAL
; return -1;}
3662 #endif /* ndef _SC_PHYS_PAGES */
3663 if (x
== Mono_Posix_SysConf__SC_AVPHYS_PAGES
)
3664 #ifdef _SC_AVPHYS_PAGES
3665 {*r
= _SC_AVPHYS_PAGES
; return 0;}
3666 #else /* def _SC_AVPHYS_PAGES */
3667 {errno
= EINVAL
; return -1;}
3668 #endif /* ndef _SC_AVPHYS_PAGES */
3669 if (x
== Mono_Posix_SysConf__SC_ATEXIT_MAX
)
3670 #ifdef _SC_ATEXIT_MAX
3671 {*r
= _SC_ATEXIT_MAX
; return 0;}
3672 #else /* def _SC_ATEXIT_MAX */
3673 {errno
= EINVAL
; return -1;}
3674 #endif /* ndef _SC_ATEXIT_MAX */
3675 if (x
== Mono_Posix_SysConf__SC_PASS_MAX
)
3677 {*r
= _SC_PASS_MAX
; return 0;}
3678 #else /* def _SC_PASS_MAX */
3679 {errno
= EINVAL
; return -1;}
3680 #endif /* ndef _SC_PASS_MAX */
3681 if (x
== Mono_Posix_SysConf__SC_XOPEN_VERSION
)
3682 #ifdef _SC_XOPEN_VERSION
3683 {*r
= _SC_XOPEN_VERSION
; return 0;}
3684 #else /* def _SC_XOPEN_VERSION */
3685 {errno
= EINVAL
; return -1;}
3686 #endif /* ndef _SC_XOPEN_VERSION */
3687 if (x
== Mono_Posix_SysConf__SC_XOPEN_XCU_VERSION
)
3688 #ifdef _SC_XOPEN_XCU_VERSION
3689 {*r
= _SC_XOPEN_XCU_VERSION
; return 0;}
3690 #else /* def _SC_XOPEN_XCU_VERSION */
3691 {errno
= EINVAL
; return -1;}
3692 #endif /* ndef _SC_XOPEN_XCU_VERSION */
3693 if (x
== Mono_Posix_SysConf__SC_XOPEN_UNIX
)
3694 #ifdef _SC_XOPEN_UNIX
3695 {*r
= _SC_XOPEN_UNIX
; return 0;}
3696 #else /* def _SC_XOPEN_UNIX */
3697 {errno
= EINVAL
; return -1;}
3698 #endif /* ndef _SC_XOPEN_UNIX */
3699 if (x
== Mono_Posix_SysConf__SC_XOPEN_CRYPT
)
3700 #ifdef _SC_XOPEN_CRYPT
3701 {*r
= _SC_XOPEN_CRYPT
; return 0;}
3702 #else /* def _SC_XOPEN_CRYPT */
3703 {errno
= EINVAL
; return -1;}
3704 #endif /* ndef _SC_XOPEN_CRYPT */
3705 if (x
== Mono_Posix_SysConf__SC_XOPEN_ENH_I18N
)
3706 #ifdef _SC_XOPEN_ENH_I18N
3707 {*r
= _SC_XOPEN_ENH_I18N
; return 0;}
3708 #else /* def _SC_XOPEN_ENH_I18N */
3709 {errno
= EINVAL
; return -1;}
3710 #endif /* ndef _SC_XOPEN_ENH_I18N */
3711 if (x
== Mono_Posix_SysConf__SC_XOPEN_SHM
)
3712 #ifdef _SC_XOPEN_SHM
3713 {*r
= _SC_XOPEN_SHM
; return 0;}
3714 #else /* def _SC_XOPEN_SHM */
3715 {errno
= EINVAL
; return -1;}
3716 #endif /* ndef _SC_XOPEN_SHM */
3717 if (x
== Mono_Posix_SysConf__SC_2_CHAR_TERM
)
3718 #ifdef _SC_2_CHAR_TERM
3719 {*r
= _SC_2_CHAR_TERM
; return 0;}
3720 #else /* def _SC_2_CHAR_TERM */
3721 {errno
= EINVAL
; return -1;}
3722 #endif /* ndef _SC_2_CHAR_TERM */
3723 if (x
== Mono_Posix_SysConf__SC_2_C_VERSION
)
3724 #ifdef _SC_2_C_VERSION
3725 {*r
= _SC_2_C_VERSION
; return 0;}
3726 #else /* def _SC_2_C_VERSION */
3727 {errno
= EINVAL
; return -1;}
3728 #endif /* ndef _SC_2_C_VERSION */
3729 if (x
== Mono_Posix_SysConf__SC_2_UPE
)
3731 {*r
= _SC_2_UPE
; return 0;}
3732 #else /* def _SC_2_UPE */
3733 {errno
= EINVAL
; return -1;}
3734 #endif /* ndef _SC_2_UPE */
3735 if (x
== Mono_Posix_SysConf__SC_XOPEN_XPG2
)
3736 #ifdef _SC_XOPEN_XPG2
3737 {*r
= _SC_XOPEN_XPG2
; return 0;}
3738 #else /* def _SC_XOPEN_XPG2 */
3739 {errno
= EINVAL
; return -1;}
3740 #endif /* ndef _SC_XOPEN_XPG2 */
3741 if (x
== Mono_Posix_SysConf__SC_XOPEN_XPG3
)
3742 #ifdef _SC_XOPEN_XPG3
3743 {*r
= _SC_XOPEN_XPG3
; return 0;}
3744 #else /* def _SC_XOPEN_XPG3 */
3745 {errno
= EINVAL
; return -1;}
3746 #endif /* ndef _SC_XOPEN_XPG3 */
3747 if (x
== Mono_Posix_SysConf__SC_XOPEN_XPG4
)
3748 #ifdef _SC_XOPEN_XPG4
3749 {*r
= _SC_XOPEN_XPG4
; return 0;}
3750 #else /* def _SC_XOPEN_XPG4 */
3751 {errno
= EINVAL
; return -1;}
3752 #endif /* ndef _SC_XOPEN_XPG4 */
3753 if (x
== Mono_Posix_SysConf__SC_CHAR_BIT
)
3755 {*r
= _SC_CHAR_BIT
; return 0;}
3756 #else /* def _SC_CHAR_BIT */
3757 {errno
= EINVAL
; return -1;}
3758 #endif /* ndef _SC_CHAR_BIT */
3759 if (x
== Mono_Posix_SysConf__SC_CHAR_MAX
)
3761 {*r
= _SC_CHAR_MAX
; return 0;}
3762 #else /* def _SC_CHAR_MAX */
3763 {errno
= EINVAL
; return -1;}
3764 #endif /* ndef _SC_CHAR_MAX */
3765 if (x
== Mono_Posix_SysConf__SC_CHAR_MIN
)
3767 {*r
= _SC_CHAR_MIN
; return 0;}
3768 #else /* def _SC_CHAR_MIN */
3769 {errno
= EINVAL
; return -1;}
3770 #endif /* ndef _SC_CHAR_MIN */
3771 if (x
== Mono_Posix_SysConf__SC_INT_MAX
)
3773 {*r
= _SC_INT_MAX
; return 0;}
3774 #else /* def _SC_INT_MAX */
3775 {errno
= EINVAL
; return -1;}
3776 #endif /* ndef _SC_INT_MAX */
3777 if (x
== Mono_Posix_SysConf__SC_INT_MIN
)
3779 {*r
= _SC_INT_MIN
; return 0;}
3780 #else /* def _SC_INT_MIN */
3781 {errno
= EINVAL
; return -1;}
3782 #endif /* ndef _SC_INT_MIN */
3783 if (x
== Mono_Posix_SysConf__SC_LONG_BIT
)
3785 {*r
= _SC_LONG_BIT
; return 0;}
3786 #else /* def _SC_LONG_BIT */
3787 {errno
= EINVAL
; return -1;}
3788 #endif /* ndef _SC_LONG_BIT */
3789 if (x
== Mono_Posix_SysConf__SC_WORD_BIT
)
3791 {*r
= _SC_WORD_BIT
; return 0;}
3792 #else /* def _SC_WORD_BIT */
3793 {errno
= EINVAL
; return -1;}
3794 #endif /* ndef _SC_WORD_BIT */
3795 if (x
== Mono_Posix_SysConf__SC_MB_LEN_MAX
)
3796 #ifdef _SC_MB_LEN_MAX
3797 {*r
= _SC_MB_LEN_MAX
; return 0;}
3798 #else /* def _SC_MB_LEN_MAX */
3799 {errno
= EINVAL
; return -1;}
3800 #endif /* ndef _SC_MB_LEN_MAX */
3801 if (x
== Mono_Posix_SysConf__SC_NZERO
)
3803 {*r
= _SC_NZERO
; return 0;}
3804 #else /* def _SC_NZERO */
3805 {errno
= EINVAL
; return -1;}
3806 #endif /* ndef _SC_NZERO */
3807 if (x
== Mono_Posix_SysConf__SC_SSIZE_MAX
)
3808 #ifdef _SC_SSIZE_MAX
3809 {*r
= _SC_SSIZE_MAX
; return 0;}
3810 #else /* def _SC_SSIZE_MAX */
3811 {errno
= EINVAL
; return -1;}
3812 #endif /* ndef _SC_SSIZE_MAX */
3813 if (x
== Mono_Posix_SysConf__SC_SCHAR_MAX
)
3814 #ifdef _SC_SCHAR_MAX
3815 {*r
= _SC_SCHAR_MAX
; return 0;}
3816 #else /* def _SC_SCHAR_MAX */
3817 {errno
= EINVAL
; return -1;}
3818 #endif /* ndef _SC_SCHAR_MAX */
3819 if (x
== Mono_Posix_SysConf__SC_SCHAR_MIN
)
3820 #ifdef _SC_SCHAR_MIN
3821 {*r
= _SC_SCHAR_MIN
; return 0;}
3822 #else /* def _SC_SCHAR_MIN */
3823 {errno
= EINVAL
; return -1;}
3824 #endif /* ndef _SC_SCHAR_MIN */
3825 if (x
== Mono_Posix_SysConf__SC_SHRT_MAX
)
3827 {*r
= _SC_SHRT_MAX
; return 0;}
3828 #else /* def _SC_SHRT_MAX */
3829 {errno
= EINVAL
; return -1;}
3830 #endif /* ndef _SC_SHRT_MAX */
3831 if (x
== Mono_Posix_SysConf__SC_SHRT_MIN
)
3833 {*r
= _SC_SHRT_MIN
; return 0;}
3834 #else /* def _SC_SHRT_MIN */
3835 {errno
= EINVAL
; return -1;}
3836 #endif /* ndef _SC_SHRT_MIN */
3837 if (x
== Mono_Posix_SysConf__SC_UCHAR_MAX
)
3838 #ifdef _SC_UCHAR_MAX
3839 {*r
= _SC_UCHAR_MAX
; return 0;}
3840 #else /* def _SC_UCHAR_MAX */
3841 {errno
= EINVAL
; return -1;}
3842 #endif /* ndef _SC_UCHAR_MAX */
3843 if (x
== Mono_Posix_SysConf__SC_UINT_MAX
)
3845 {*r
= _SC_UINT_MAX
; return 0;}
3846 #else /* def _SC_UINT_MAX */
3847 {errno
= EINVAL
; return -1;}
3848 #endif /* ndef _SC_UINT_MAX */
3849 if (x
== Mono_Posix_SysConf__SC_ULONG_MAX
)
3850 #ifdef _SC_ULONG_MAX
3851 {*r
= _SC_ULONG_MAX
; return 0;}
3852 #else /* def _SC_ULONG_MAX */
3853 {errno
= EINVAL
; return -1;}
3854 #endif /* ndef _SC_ULONG_MAX */
3855 if (x
== Mono_Posix_SysConf__SC_USHRT_MAX
)
3856 #ifdef _SC_USHRT_MAX
3857 {*r
= _SC_USHRT_MAX
; return 0;}
3858 #else /* def _SC_USHRT_MAX */
3859 {errno
= EINVAL
; return -1;}
3860 #endif /* ndef _SC_USHRT_MAX */
3861 if (x
== Mono_Posix_SysConf__SC_NL_ARGMAX
)
3862 #ifdef _SC_NL_ARGMAX
3863 {*r
= _SC_NL_ARGMAX
; return 0;}
3864 #else /* def _SC_NL_ARGMAX */
3865 {errno
= EINVAL
; return -1;}
3866 #endif /* ndef _SC_NL_ARGMAX */
3867 if (x
== Mono_Posix_SysConf__SC_NL_LANGMAX
)
3868 #ifdef _SC_NL_LANGMAX
3869 {*r
= _SC_NL_LANGMAX
; return 0;}
3870 #else /* def _SC_NL_LANGMAX */
3871 {errno
= EINVAL
; return -1;}
3872 #endif /* ndef _SC_NL_LANGMAX */
3873 if (x
== Mono_Posix_SysConf__SC_NL_MSGMAX
)
3874 #ifdef _SC_NL_MSGMAX
3875 {*r
= _SC_NL_MSGMAX
; return 0;}
3876 #else /* def _SC_NL_MSGMAX */
3877 {errno
= EINVAL
; return -1;}
3878 #endif /* ndef _SC_NL_MSGMAX */
3879 if (x
== Mono_Posix_SysConf__SC_NL_NMAX
)
3881 {*r
= _SC_NL_NMAX
; return 0;}
3882 #else /* def _SC_NL_NMAX */
3883 {errno
= EINVAL
; return -1;}
3884 #endif /* ndef _SC_NL_NMAX */
3885 if (x
== Mono_Posix_SysConf__SC_NL_SETMAX
)
3886 #ifdef _SC_NL_SETMAX
3887 {*r
= _SC_NL_SETMAX
; return 0;}
3888 #else /* def _SC_NL_SETMAX */
3889 {errno
= EINVAL
; return -1;}
3890 #endif /* ndef _SC_NL_SETMAX */
3891 if (x
== Mono_Posix_SysConf__SC_NL_TEXTMAX
)
3892 #ifdef _SC_NL_TEXTMAX
3893 {*r
= _SC_NL_TEXTMAX
; return 0;}
3894 #else /* def _SC_NL_TEXTMAX */
3895 {errno
= EINVAL
; return -1;}
3896 #endif /* ndef _SC_NL_TEXTMAX */
3897 if (x
== Mono_Posix_SysConf__SC_XBS5_ILP32_OFF32
)
3898 #ifdef _SC_XBS5_ILP32_OFF32
3899 {*r
= _SC_XBS5_ILP32_OFF32
; return 0;}
3900 #else /* def _SC_XBS5_ILP32_OFF32 */
3901 {errno
= EINVAL
; return -1;}
3902 #endif /* ndef _SC_XBS5_ILP32_OFF32 */
3903 if (x
== Mono_Posix_SysConf__SC_XBS5_ILP32_OFFBIG
)
3904 #ifdef _SC_XBS5_ILP32_OFFBIG
3905 {*r
= _SC_XBS5_ILP32_OFFBIG
; return 0;}
3906 #else /* def _SC_XBS5_ILP32_OFFBIG */
3907 {errno
= EINVAL
; return -1;}
3908 #endif /* ndef _SC_XBS5_ILP32_OFFBIG */
3909 if (x
== Mono_Posix_SysConf__SC_XBS5_LP64_OFF64
)
3910 #ifdef _SC_XBS5_LP64_OFF64
3911 {*r
= _SC_XBS5_LP64_OFF64
; return 0;}
3912 #else /* def _SC_XBS5_LP64_OFF64 */
3913 {errno
= EINVAL
; return -1;}
3914 #endif /* ndef _SC_XBS5_LP64_OFF64 */
3915 if (x
== Mono_Posix_SysConf__SC_XBS5_LPBIG_OFFBIG
)
3916 #ifdef _SC_XBS5_LPBIG_OFFBIG
3917 {*r
= _SC_XBS5_LPBIG_OFFBIG
; return 0;}
3918 #else /* def _SC_XBS5_LPBIG_OFFBIG */
3919 {errno
= EINVAL
; return -1;}
3920 #endif /* ndef _SC_XBS5_LPBIG_OFFBIG */
3921 if (x
== Mono_Posix_SysConf__SC_XOPEN_LEGACY
)
3922 #ifdef _SC_XOPEN_LEGACY
3923 {*r
= _SC_XOPEN_LEGACY
; return 0;}
3924 #else /* def _SC_XOPEN_LEGACY */
3925 {errno
= EINVAL
; return -1;}
3926 #endif /* ndef _SC_XOPEN_LEGACY */
3927 if (x
== Mono_Posix_SysConf__SC_XOPEN_REALTIME
)
3928 #ifdef _SC_XOPEN_REALTIME
3929 {*r
= _SC_XOPEN_REALTIME
; return 0;}
3930 #else /* def _SC_XOPEN_REALTIME */
3931 {errno
= EINVAL
; return -1;}
3932 #endif /* ndef _SC_XOPEN_REALTIME */
3933 if (x
== Mono_Posix_SysConf__SC_XOPEN_REALTIME_THREADS
)
3934 #ifdef _SC_XOPEN_REALTIME_THREADS
3935 {*r
= _SC_XOPEN_REALTIME_THREADS
; return 0;}
3936 #else /* def _SC_XOPEN_REALTIME_THREADS */
3937 {errno
= EINVAL
; return -1;}
3938 #endif /* ndef _SC_XOPEN_REALTIME_THREADS */
3939 if (x
== Mono_Posix_SysConf__SC_ADVISORY_INFO
)
3940 #ifdef _SC_ADVISORY_INFO
3941 {*r
= _SC_ADVISORY_INFO
; return 0;}
3942 #else /* def _SC_ADVISORY_INFO */
3943 {errno
= EINVAL
; return -1;}
3944 #endif /* ndef _SC_ADVISORY_INFO */
3945 if (x
== Mono_Posix_SysConf__SC_BARRIERS
)
3947 {*r
= _SC_BARRIERS
; return 0;}
3948 #else /* def _SC_BARRIERS */
3949 {errno
= EINVAL
; return -1;}
3950 #endif /* ndef _SC_BARRIERS */
3951 if (x
== Mono_Posix_SysConf__SC_BASE
)
3953 {*r
= _SC_BASE
; return 0;}
3954 #else /* def _SC_BASE */
3955 {errno
= EINVAL
; return -1;}
3956 #endif /* ndef _SC_BASE */
3957 if (x
== Mono_Posix_SysConf__SC_C_LANG_SUPPORT
)
3958 #ifdef _SC_C_LANG_SUPPORT
3959 {*r
= _SC_C_LANG_SUPPORT
; return 0;}
3960 #else /* def _SC_C_LANG_SUPPORT */
3961 {errno
= EINVAL
; return -1;}
3962 #endif /* ndef _SC_C_LANG_SUPPORT */
3963 if (x
== Mono_Posix_SysConf__SC_C_LANG_SUPPORT_R
)
3964 #ifdef _SC_C_LANG_SUPPORT_R
3965 {*r
= _SC_C_LANG_SUPPORT_R
; return 0;}
3966 #else /* def _SC_C_LANG_SUPPORT_R */
3967 {errno
= EINVAL
; return -1;}
3968 #endif /* ndef _SC_C_LANG_SUPPORT_R */
3969 if (x
== Mono_Posix_SysConf__SC_CLOCK_SELECTION
)
3970 #ifdef _SC_CLOCK_SELECTION
3971 {*r
= _SC_CLOCK_SELECTION
; return 0;}
3972 #else /* def _SC_CLOCK_SELECTION */
3973 {errno
= EINVAL
; return -1;}
3974 #endif /* ndef _SC_CLOCK_SELECTION */
3975 if (x
== Mono_Posix_SysConf__SC_CPUTIME
)
3977 {*r
= _SC_CPUTIME
; return 0;}
3978 #else /* def _SC_CPUTIME */
3979 {errno
= EINVAL
; return -1;}
3980 #endif /* ndef _SC_CPUTIME */
3981 if (x
== Mono_Posix_SysConf__SC_THREAD_CPUTIME
)
3982 #ifdef _SC_THREAD_CPUTIME
3983 {*r
= _SC_THREAD_CPUTIME
; return 0;}
3984 #else /* def _SC_THREAD_CPUTIME */
3985 {errno
= EINVAL
; return -1;}
3986 #endif /* ndef _SC_THREAD_CPUTIME */
3987 if (x
== Mono_Posix_SysConf__SC_DEVICE_IO
)
3988 #ifdef _SC_DEVICE_IO
3989 {*r
= _SC_DEVICE_IO
; return 0;}
3990 #else /* def _SC_DEVICE_IO */
3991 {errno
= EINVAL
; return -1;}
3992 #endif /* ndef _SC_DEVICE_IO */
3993 if (x
== Mono_Posix_SysConf__SC_DEVICE_SPECIFIC
)
3994 #ifdef _SC_DEVICE_SPECIFIC
3995 {*r
= _SC_DEVICE_SPECIFIC
; return 0;}
3996 #else /* def _SC_DEVICE_SPECIFIC */
3997 {errno
= EINVAL
; return -1;}
3998 #endif /* ndef _SC_DEVICE_SPECIFIC */
3999 if (x
== Mono_Posix_SysConf__SC_DEVICE_SPECIFIC_R
)
4000 #ifdef _SC_DEVICE_SPECIFIC_R
4001 {*r
= _SC_DEVICE_SPECIFIC_R
; return 0;}
4002 #else /* def _SC_DEVICE_SPECIFIC_R */
4003 {errno
= EINVAL
; return -1;}
4004 #endif /* ndef _SC_DEVICE_SPECIFIC_R */
4005 if (x
== Mono_Posix_SysConf__SC_FD_MGMT
)
4007 {*r
= _SC_FD_MGMT
; return 0;}
4008 #else /* def _SC_FD_MGMT */
4009 {errno
= EINVAL
; return -1;}
4010 #endif /* ndef _SC_FD_MGMT */
4011 if (x
== Mono_Posix_SysConf__SC_FIFO
)
4013 {*r
= _SC_FIFO
; return 0;}
4014 #else /* def _SC_FIFO */
4015 {errno
= EINVAL
; return -1;}
4016 #endif /* ndef _SC_FIFO */
4017 if (x
== Mono_Posix_SysConf__SC_PIPE
)
4019 {*r
= _SC_PIPE
; return 0;}
4020 #else /* def _SC_PIPE */
4021 {errno
= EINVAL
; return -1;}
4022 #endif /* ndef _SC_PIPE */
4023 if (x
== Mono_Posix_SysConf__SC_FILE_ATTRIBUTES
)
4024 #ifdef _SC_FILE_ATTRIBUTES
4025 {*r
= _SC_FILE_ATTRIBUTES
; return 0;}
4026 #else /* def _SC_FILE_ATTRIBUTES */
4027 {errno
= EINVAL
; return -1;}
4028 #endif /* ndef _SC_FILE_ATTRIBUTES */
4029 if (x
== Mono_Posix_SysConf__SC_FILE_LOCKING
)
4030 #ifdef _SC_FILE_LOCKING
4031 {*r
= _SC_FILE_LOCKING
; return 0;}
4032 #else /* def _SC_FILE_LOCKING */
4033 {errno
= EINVAL
; return -1;}
4034 #endif /* ndef _SC_FILE_LOCKING */
4035 if (x
== Mono_Posix_SysConf__SC_FILE_SYSTEM
)
4036 #ifdef _SC_FILE_SYSTEM
4037 {*r
= _SC_FILE_SYSTEM
; return 0;}
4038 #else /* def _SC_FILE_SYSTEM */
4039 {errno
= EINVAL
; return -1;}
4040 #endif /* ndef _SC_FILE_SYSTEM */
4041 if (x
== Mono_Posix_SysConf__SC_MONOTONIC_CLOCK
)
4042 #ifdef _SC_MONOTONIC_CLOCK
4043 {*r
= _SC_MONOTONIC_CLOCK
; return 0;}
4044 #else /* def _SC_MONOTONIC_CLOCK */
4045 {errno
= EINVAL
; return -1;}
4046 #endif /* ndef _SC_MONOTONIC_CLOCK */
4047 if (x
== Mono_Posix_SysConf__SC_MULTI_PROCESS
)
4048 #ifdef _SC_MULTI_PROCESS
4049 {*r
= _SC_MULTI_PROCESS
; return 0;}
4050 #else /* def _SC_MULTI_PROCESS */
4051 {errno
= EINVAL
; return -1;}
4052 #endif /* ndef _SC_MULTI_PROCESS */
4053 if (x
== Mono_Posix_SysConf__SC_SINGLE_PROCESS
)
4054 #ifdef _SC_SINGLE_PROCESS
4055 {*r
= _SC_SINGLE_PROCESS
; return 0;}
4056 #else /* def _SC_SINGLE_PROCESS */
4057 {errno
= EINVAL
; return -1;}
4058 #endif /* ndef _SC_SINGLE_PROCESS */
4059 if (x
== Mono_Posix_SysConf__SC_NETWORKING
)
4060 #ifdef _SC_NETWORKING
4061 {*r
= _SC_NETWORKING
; return 0;}
4062 #else /* def _SC_NETWORKING */
4063 {errno
= EINVAL
; return -1;}
4064 #endif /* ndef _SC_NETWORKING */
4065 if (x
== Mono_Posix_SysConf__SC_READER_WRITER_LOCKS
)
4066 #ifdef _SC_READER_WRITER_LOCKS
4067 {*r
= _SC_READER_WRITER_LOCKS
; return 0;}
4068 #else /* def _SC_READER_WRITER_LOCKS */
4069 {errno
= EINVAL
; return -1;}
4070 #endif /* ndef _SC_READER_WRITER_LOCKS */
4071 if (x
== Mono_Posix_SysConf__SC_SPIN_LOCKS
)
4072 #ifdef _SC_SPIN_LOCKS
4073 {*r
= _SC_SPIN_LOCKS
; return 0;}
4074 #else /* def _SC_SPIN_LOCKS */
4075 {errno
= EINVAL
; return -1;}
4076 #endif /* ndef _SC_SPIN_LOCKS */
4077 if (x
== Mono_Posix_SysConf__SC_REGEXP
)
4079 {*r
= _SC_REGEXP
; return 0;}
4080 #else /* def _SC_REGEXP */
4081 {errno
= EINVAL
; return -1;}
4082 #endif /* ndef _SC_REGEXP */
4083 if (x
== Mono_Posix_SysConf__SC_REGEX_VERSION
)
4084 #ifdef _SC_REGEX_VERSION
4085 {*r
= _SC_REGEX_VERSION
; return 0;}
4086 #else /* def _SC_REGEX_VERSION */
4087 {errno
= EINVAL
; return -1;}
4088 #endif /* ndef _SC_REGEX_VERSION */
4089 if (x
== Mono_Posix_SysConf__SC_SHELL
)
4091 {*r
= _SC_SHELL
; return 0;}
4092 #else /* def _SC_SHELL */
4093 {errno
= EINVAL
; return -1;}
4094 #endif /* ndef _SC_SHELL */
4095 if (x
== Mono_Posix_SysConf__SC_SIGNALS
)
4097 {*r
= _SC_SIGNALS
; return 0;}
4098 #else /* def _SC_SIGNALS */
4099 {errno
= EINVAL
; return -1;}
4100 #endif /* ndef _SC_SIGNALS */
4101 if (x
== Mono_Posix_SysConf__SC_SPAWN
)
4103 {*r
= _SC_SPAWN
; return 0;}
4104 #else /* def _SC_SPAWN */
4105 {errno
= EINVAL
; return -1;}
4106 #endif /* ndef _SC_SPAWN */
4107 if (x
== Mono_Posix_SysConf__SC_SPORADIC_SERVER
)
4108 #ifdef _SC_SPORADIC_SERVER
4109 {*r
= _SC_SPORADIC_SERVER
; return 0;}
4110 #else /* def _SC_SPORADIC_SERVER */
4111 {errno
= EINVAL
; return -1;}
4112 #endif /* ndef _SC_SPORADIC_SERVER */
4113 if (x
== Mono_Posix_SysConf__SC_THREAD_SPORADIC_SERVER
)
4114 #ifdef _SC_THREAD_SPORADIC_SERVER
4115 {*r
= _SC_THREAD_SPORADIC_SERVER
; return 0;}
4116 #else /* def _SC_THREAD_SPORADIC_SERVER */
4117 {errno
= EINVAL
; return -1;}
4118 #endif /* ndef _SC_THREAD_SPORADIC_SERVER */
4119 if (x
== Mono_Posix_SysConf__SC_SYSTEM_DATABASE
)
4120 #ifdef _SC_SYSTEM_DATABASE
4121 {*r
= _SC_SYSTEM_DATABASE
; return 0;}
4122 #else /* def _SC_SYSTEM_DATABASE */
4123 {errno
= EINVAL
; return -1;}
4124 #endif /* ndef _SC_SYSTEM_DATABASE */
4125 if (x
== Mono_Posix_SysConf__SC_SYSTEM_DATABASE_R
)
4126 #ifdef _SC_SYSTEM_DATABASE_R
4127 {*r
= _SC_SYSTEM_DATABASE_R
; return 0;}
4128 #else /* def _SC_SYSTEM_DATABASE_R */
4129 {errno
= EINVAL
; return -1;}
4130 #endif /* ndef _SC_SYSTEM_DATABASE_R */
4131 if (x
== Mono_Posix_SysConf__SC_TIMEOUTS
)
4133 {*r
= _SC_TIMEOUTS
; return 0;}
4134 #else /* def _SC_TIMEOUTS */
4135 {errno
= EINVAL
; return -1;}
4136 #endif /* ndef _SC_TIMEOUTS */
4137 if (x
== Mono_Posix_SysConf__SC_TYPED_MEMORY_OBJECTS
)
4138 #ifdef _SC_TYPED_MEMORY_OBJECTS
4139 {*r
= _SC_TYPED_MEMORY_OBJECTS
; return 0;}
4140 #else /* def _SC_TYPED_MEMORY_OBJECTS */
4141 {errno
= EINVAL
; return -1;}
4142 #endif /* ndef _SC_TYPED_MEMORY_OBJECTS */
4143 if (x
== Mono_Posix_SysConf__SC_USER_GROUPS
)
4144 #ifdef _SC_USER_GROUPS
4145 {*r
= _SC_USER_GROUPS
; return 0;}
4146 #else /* def _SC_USER_GROUPS */
4147 {errno
= EINVAL
; return -1;}
4148 #endif /* ndef _SC_USER_GROUPS */
4149 if (x
== Mono_Posix_SysConf__SC_USER_GROUPS_R
)
4150 #ifdef _SC_USER_GROUPS_R
4151 {*r
= _SC_USER_GROUPS_R
; return 0;}
4152 #else /* def _SC_USER_GROUPS_R */
4153 {errno
= EINVAL
; return -1;}
4154 #endif /* ndef _SC_USER_GROUPS_R */
4155 if (x
== Mono_Posix_SysConf__SC_2_PBS
)
4157 {*r
= _SC_2_PBS
; return 0;}
4158 #else /* def _SC_2_PBS */
4159 {errno
= EINVAL
; return -1;}
4160 #endif /* ndef _SC_2_PBS */
4161 if (x
== Mono_Posix_SysConf__SC_2_PBS_ACCOUNTING
)
4162 #ifdef _SC_2_PBS_ACCOUNTING
4163 {*r
= _SC_2_PBS_ACCOUNTING
; return 0;}
4164 #else /* def _SC_2_PBS_ACCOUNTING */
4165 {errno
= EINVAL
; return -1;}
4166 #endif /* ndef _SC_2_PBS_ACCOUNTING */
4167 if (x
== Mono_Posix_SysConf__SC_2_PBS_LOCATE
)
4168 #ifdef _SC_2_PBS_LOCATE
4169 {*r
= _SC_2_PBS_LOCATE
; return 0;}
4170 #else /* def _SC_2_PBS_LOCATE */
4171 {errno
= EINVAL
; return -1;}
4172 #endif /* ndef _SC_2_PBS_LOCATE */
4173 if (x
== Mono_Posix_SysConf__SC_2_PBS_MESSAGE
)
4174 #ifdef _SC_2_PBS_MESSAGE
4175 {*r
= _SC_2_PBS_MESSAGE
; return 0;}
4176 #else /* def _SC_2_PBS_MESSAGE */
4177 {errno
= EINVAL
; return -1;}
4178 #endif /* ndef _SC_2_PBS_MESSAGE */
4179 if (x
== Mono_Posix_SysConf__SC_2_PBS_TRACK
)
4180 #ifdef _SC_2_PBS_TRACK
4181 {*r
= _SC_2_PBS_TRACK
; return 0;}
4182 #else /* def _SC_2_PBS_TRACK */
4183 {errno
= EINVAL
; return -1;}
4184 #endif /* ndef _SC_2_PBS_TRACK */
4185 if (x
== Mono_Posix_SysConf__SC_SYMLOOP_MAX
)
4186 #ifdef _SC_SYMLOOP_MAX
4187 {*r
= _SC_SYMLOOP_MAX
; return 0;}
4188 #else /* def _SC_SYMLOOP_MAX */
4189 {errno
= EINVAL
; return -1;}
4190 #endif /* ndef _SC_SYMLOOP_MAX */
4191 if (x
== Mono_Posix_SysConf__SC_STREAMS
)
4193 {*r
= _SC_STREAMS
; return 0;}
4194 #else /* def _SC_STREAMS */
4195 {errno
= EINVAL
; return -1;}
4196 #endif /* ndef _SC_STREAMS */
4197 if (x
== Mono_Posix_SysConf__SC_2_PBS_CHECKPOINT
)
4198 #ifdef _SC_2_PBS_CHECKPOINT
4199 {*r
= _SC_2_PBS_CHECKPOINT
; return 0;}
4200 #else /* def _SC_2_PBS_CHECKPOINT */
4201 {errno
= EINVAL
; return -1;}
4202 #endif /* ndef _SC_2_PBS_CHECKPOINT */
4203 if (x
== Mono_Posix_SysConf__SC_V6_ILP32_OFF32
)
4204 #ifdef _SC_V6_ILP32_OFF32
4205 {*r
= _SC_V6_ILP32_OFF32
; return 0;}
4206 #else /* def _SC_V6_ILP32_OFF32 */
4207 {errno
= EINVAL
; return -1;}
4208 #endif /* ndef _SC_V6_ILP32_OFF32 */
4209 if (x
== Mono_Posix_SysConf__SC_V6_ILP32_OFFBIG
)
4210 #ifdef _SC_V6_ILP32_OFFBIG
4211 {*r
= _SC_V6_ILP32_OFFBIG
; return 0;}
4212 #else /* def _SC_V6_ILP32_OFFBIG */
4213 {errno
= EINVAL
; return -1;}
4214 #endif /* ndef _SC_V6_ILP32_OFFBIG */
4215 if (x
== Mono_Posix_SysConf__SC_V6_LP64_OFF64
)
4216 #ifdef _SC_V6_LP64_OFF64
4217 {*r
= _SC_V6_LP64_OFF64
; return 0;}
4218 #else /* def _SC_V6_LP64_OFF64 */
4219 {errno
= EINVAL
; return -1;}
4220 #endif /* ndef _SC_V6_LP64_OFF64 */
4221 if (x
== Mono_Posix_SysConf__SC_V6_LPBIG_OFFBIG
)
4222 #ifdef _SC_V6_LPBIG_OFFBIG
4223 {*r
= _SC_V6_LPBIG_OFFBIG
; return 0;}
4224 #else /* def _SC_V6_LPBIG_OFFBIG */
4225 {errno
= EINVAL
; return -1;}
4226 #endif /* ndef _SC_V6_LPBIG_OFFBIG */
4227 if (x
== Mono_Posix_SysConf__SC_HOST_NAME_MAX
)
4228 #ifdef _SC_HOST_NAME_MAX
4229 {*r
= _SC_HOST_NAME_MAX
; return 0;}
4230 #else /* def _SC_HOST_NAME_MAX */
4231 {errno
= EINVAL
; return -1;}
4232 #endif /* ndef _SC_HOST_NAME_MAX */
4233 if (x
== Mono_Posix_SysConf__SC_TRACE
)
4235 {*r
= _SC_TRACE
; return 0;}
4236 #else /* def _SC_TRACE */
4237 {errno
= EINVAL
; return -1;}
4238 #endif /* ndef _SC_TRACE */
4239 if (x
== Mono_Posix_SysConf__SC_TRACE_EVENT_FILTER
)
4240 #ifdef _SC_TRACE_EVENT_FILTER
4241 {*r
= _SC_TRACE_EVENT_FILTER
; return 0;}
4242 #else /* def _SC_TRACE_EVENT_FILTER */
4243 {errno
= EINVAL
; return -1;}
4244 #endif /* ndef _SC_TRACE_EVENT_FILTER */
4245 if (x
== Mono_Posix_SysConf__SC_TRACE_INHERIT
)
4246 #ifdef _SC_TRACE_INHERIT
4247 {*r
= _SC_TRACE_INHERIT
; return 0;}
4248 #else /* def _SC_TRACE_INHERIT */
4249 {errno
= EINVAL
; return -1;}
4250 #endif /* ndef _SC_TRACE_INHERIT */
4251 if (x
== Mono_Posix_SysConf__SC_TRACE_LOG
)
4252 #ifdef _SC_TRACE_LOG
4253 {*r
= _SC_TRACE_LOG
; return 0;}
4254 #else /* def _SC_TRACE_LOG */
4255 {errno
= EINVAL
; return -1;}
4256 #endif /* ndef _SC_TRACE_LOG */
4257 if (x
== Mono_Posix_SysConf__SC_LEVEL1_ICACHE_SIZE
)
4258 #ifdef _SC_LEVEL1_ICACHE_SIZE
4259 {*r
= _SC_LEVEL1_ICACHE_SIZE
; return 0;}
4260 #else /* def _SC_LEVEL1_ICACHE_SIZE */
4261 {errno
= EINVAL
; return -1;}
4262 #endif /* ndef _SC_LEVEL1_ICACHE_SIZE */
4263 if (x
== Mono_Posix_SysConf__SC_LEVEL1_ICACHE_ASSOC
)
4264 #ifdef _SC_LEVEL1_ICACHE_ASSOC
4265 {*r
= _SC_LEVEL1_ICACHE_ASSOC
; return 0;}
4266 #else /* def _SC_LEVEL1_ICACHE_ASSOC */
4267 {errno
= EINVAL
; return -1;}
4268 #endif /* ndef _SC_LEVEL1_ICACHE_ASSOC */
4269 if (x
== Mono_Posix_SysConf__SC_LEVEL1_ICACHE_LINESIZE
)
4270 #ifdef _SC_LEVEL1_ICACHE_LINESIZE
4271 {*r
= _SC_LEVEL1_ICACHE_LINESIZE
; return 0;}
4272 #else /* def _SC_LEVEL1_ICACHE_LINESIZE */
4273 {errno
= EINVAL
; return -1;}
4274 #endif /* ndef _SC_LEVEL1_ICACHE_LINESIZE */
4275 if (x
== Mono_Posix_SysConf__SC_LEVEL1_DCACHE_SIZE
)
4276 #ifdef _SC_LEVEL1_DCACHE_SIZE
4277 {*r
= _SC_LEVEL1_DCACHE_SIZE
; return 0;}
4278 #else /* def _SC_LEVEL1_DCACHE_SIZE */
4279 {errno
= EINVAL
; return -1;}
4280 #endif /* ndef _SC_LEVEL1_DCACHE_SIZE */
4281 if (x
== Mono_Posix_SysConf__SC_LEVEL1_DCACHE_ASSOC
)
4282 #ifdef _SC_LEVEL1_DCACHE_ASSOC
4283 {*r
= _SC_LEVEL1_DCACHE_ASSOC
; return 0;}
4284 #else /* def _SC_LEVEL1_DCACHE_ASSOC */
4285 {errno
= EINVAL
; return -1;}
4286 #endif /* ndef _SC_LEVEL1_DCACHE_ASSOC */
4287 if (x
== Mono_Posix_SysConf__SC_LEVEL1_DCACHE_LINESIZE
)
4288 #ifdef _SC_LEVEL1_DCACHE_LINESIZE
4289 {*r
= _SC_LEVEL1_DCACHE_LINESIZE
; return 0;}
4290 #else /* def _SC_LEVEL1_DCACHE_LINESIZE */
4291 {errno
= EINVAL
; return -1;}
4292 #endif /* ndef _SC_LEVEL1_DCACHE_LINESIZE */
4293 if (x
== Mono_Posix_SysConf__SC_LEVEL2_CACHE_SIZE
)
4294 #ifdef _SC_LEVEL2_CACHE_SIZE
4295 {*r
= _SC_LEVEL2_CACHE_SIZE
; return 0;}
4296 #else /* def _SC_LEVEL2_CACHE_SIZE */
4297 {errno
= EINVAL
; return -1;}
4298 #endif /* ndef _SC_LEVEL2_CACHE_SIZE */
4299 if (x
== Mono_Posix_SysConf__SC_LEVEL2_CACHE_ASSOC
)
4300 #ifdef _SC_LEVEL2_CACHE_ASSOC
4301 {*r
= _SC_LEVEL2_CACHE_ASSOC
; return 0;}
4302 #else /* def _SC_LEVEL2_CACHE_ASSOC */
4303 {errno
= EINVAL
; return -1;}
4304 #endif /* ndef _SC_LEVEL2_CACHE_ASSOC */
4305 if (x
== Mono_Posix_SysConf__SC_LEVEL2_CACHE_LINESIZE
)
4306 #ifdef _SC_LEVEL2_CACHE_LINESIZE
4307 {*r
= _SC_LEVEL2_CACHE_LINESIZE
; return 0;}
4308 #else /* def _SC_LEVEL2_CACHE_LINESIZE */
4309 {errno
= EINVAL
; return -1;}
4310 #endif /* ndef _SC_LEVEL2_CACHE_LINESIZE */
4311 if (x
== Mono_Posix_SysConf__SC_LEVEL3_CACHE_SIZE
)
4312 #ifdef _SC_LEVEL3_CACHE_SIZE
4313 {*r
= _SC_LEVEL3_CACHE_SIZE
; return 0;}
4314 #else /* def _SC_LEVEL3_CACHE_SIZE */
4315 {errno
= EINVAL
; return -1;}
4316 #endif /* ndef _SC_LEVEL3_CACHE_SIZE */
4317 if (x
== Mono_Posix_SysConf__SC_LEVEL3_CACHE_ASSOC
)
4318 #ifdef _SC_LEVEL3_CACHE_ASSOC
4319 {*r
= _SC_LEVEL3_CACHE_ASSOC
; return 0;}
4320 #else /* def _SC_LEVEL3_CACHE_ASSOC */
4321 {errno
= EINVAL
; return -1;}
4322 #endif /* ndef _SC_LEVEL3_CACHE_ASSOC */
4323 if (x
== Mono_Posix_SysConf__SC_LEVEL3_CACHE_LINESIZE
)
4324 #ifdef _SC_LEVEL3_CACHE_LINESIZE
4325 {*r
= _SC_LEVEL3_CACHE_LINESIZE
; return 0;}
4326 #else /* def _SC_LEVEL3_CACHE_LINESIZE */
4327 {errno
= EINVAL
; return -1;}
4328 #endif /* ndef _SC_LEVEL3_CACHE_LINESIZE */
4329 if (x
== Mono_Posix_SysConf__SC_LEVEL4_CACHE_SIZE
)
4330 #ifdef _SC_LEVEL4_CACHE_SIZE
4331 {*r
= _SC_LEVEL4_CACHE_SIZE
; return 0;}
4332 #else /* def _SC_LEVEL4_CACHE_SIZE */
4333 {errno
= EINVAL
; return -1;}
4334 #endif /* ndef _SC_LEVEL4_CACHE_SIZE */
4335 if (x
== Mono_Posix_SysConf__SC_LEVEL4_CACHE_ASSOC
)
4336 #ifdef _SC_LEVEL4_CACHE_ASSOC
4337 {*r
= _SC_LEVEL4_CACHE_ASSOC
; return 0;}
4338 #else /* def _SC_LEVEL4_CACHE_ASSOC */
4339 {errno
= EINVAL
; return -1;}
4340 #endif /* ndef _SC_LEVEL4_CACHE_ASSOC */
4341 if (x
== Mono_Posix_SysConf__SC_LEVEL4_CACHE_LINESIZE
)
4342 #ifdef _SC_LEVEL4_CACHE_LINESIZE
4343 {*r
= _SC_LEVEL4_CACHE_LINESIZE
; return 0;}
4344 #else /* def _SC_LEVEL4_CACHE_LINESIZE */
4345 {errno
= EINVAL
; return -1;}
4346 #endif /* ndef _SC_LEVEL4_CACHE_LINESIZE */
4347 errno
= EINVAL
; return -1;
4350 int Mono_Posix_ToSysConf (int x
, int *r
)
4356 if (x
== _SC_ARG_MAX
)
4357 {*r
= Mono_Posix_SysConf__SC_ARG_MAX
; return 0;}
4358 #endif /* ndef _SC_ARG_MAX */
4359 #ifdef _SC_CHILD_MAX
4360 if (x
== _SC_CHILD_MAX
)
4361 {*r
= Mono_Posix_SysConf__SC_CHILD_MAX
; return 0;}
4362 #endif /* ndef _SC_CHILD_MAX */
4364 if (x
== _SC_CLK_TCK
)
4365 {*r
= Mono_Posix_SysConf__SC_CLK_TCK
; return 0;}
4366 #endif /* ndef _SC_CLK_TCK */
4367 #ifdef _SC_NGROUPS_MAX
4368 if (x
== _SC_NGROUPS_MAX
)
4369 {*r
= Mono_Posix_SysConf__SC_NGROUPS_MAX
; return 0;}
4370 #endif /* ndef _SC_NGROUPS_MAX */
4372 if (x
== _SC_OPEN_MAX
)
4373 {*r
= Mono_Posix_SysConf__SC_OPEN_MAX
; return 0;}
4374 #endif /* ndef _SC_OPEN_MAX */
4375 #ifdef _SC_STREAM_MAX
4376 if (x
== _SC_STREAM_MAX
)
4377 {*r
= Mono_Posix_SysConf__SC_STREAM_MAX
; return 0;}
4378 #endif /* ndef _SC_STREAM_MAX */
4379 #ifdef _SC_TZNAME_MAX
4380 if (x
== _SC_TZNAME_MAX
)
4381 {*r
= Mono_Posix_SysConf__SC_TZNAME_MAX
; return 0;}
4382 #endif /* ndef _SC_TZNAME_MAX */
4383 #ifdef _SC_JOB_CONTROL
4384 if (x
== _SC_JOB_CONTROL
)
4385 {*r
= Mono_Posix_SysConf__SC_JOB_CONTROL
; return 0;}
4386 #endif /* ndef _SC_JOB_CONTROL */
4387 #ifdef _SC_SAVED_IDS
4388 if (x
== _SC_SAVED_IDS
)
4389 {*r
= Mono_Posix_SysConf__SC_SAVED_IDS
; return 0;}
4390 #endif /* ndef _SC_SAVED_IDS */
4391 #ifdef _SC_REALTIME_SIGNALS
4392 if (x
== _SC_REALTIME_SIGNALS
)
4393 {*r
= Mono_Posix_SysConf__SC_REALTIME_SIGNALS
; return 0;}
4394 #endif /* ndef _SC_REALTIME_SIGNALS */
4395 #ifdef _SC_PRIORITY_SCHEDULING
4396 if (x
== _SC_PRIORITY_SCHEDULING
)
4397 {*r
= Mono_Posix_SysConf__SC_PRIORITY_SCHEDULING
; return 0;}
4398 #endif /* ndef _SC_PRIORITY_SCHEDULING */
4400 if (x
== _SC_TIMERS
)
4401 {*r
= Mono_Posix_SysConf__SC_TIMERS
; return 0;}
4402 #endif /* ndef _SC_TIMERS */
4403 #ifdef _SC_ASYNCHRONOUS_IO
4404 if (x
== _SC_ASYNCHRONOUS_IO
)
4405 {*r
= Mono_Posix_SysConf__SC_ASYNCHRONOUS_IO
; return 0;}
4406 #endif /* ndef _SC_ASYNCHRONOUS_IO */
4407 #ifdef _SC_PRIORITIZED_IO
4408 if (x
== _SC_PRIORITIZED_IO
)
4409 {*r
= Mono_Posix_SysConf__SC_PRIORITIZED_IO
; return 0;}
4410 #endif /* ndef _SC_PRIORITIZED_IO */
4411 #ifdef _SC_SYNCHRONIZED_IO
4412 if (x
== _SC_SYNCHRONIZED_IO
)
4413 {*r
= Mono_Posix_SysConf__SC_SYNCHRONIZED_IO
; return 0;}
4414 #endif /* ndef _SC_SYNCHRONIZED_IO */
4417 {*r
= Mono_Posix_SysConf__SC_FSYNC
; return 0;}
4418 #endif /* ndef _SC_FSYNC */
4419 #ifdef _SC_MAPPED_FILES
4420 if (x
== _SC_MAPPED_FILES
)
4421 {*r
= Mono_Posix_SysConf__SC_MAPPED_FILES
; return 0;}
4422 #endif /* ndef _SC_MAPPED_FILES */
4424 if (x
== _SC_MEMLOCK
)
4425 {*r
= Mono_Posix_SysConf__SC_MEMLOCK
; return 0;}
4426 #endif /* ndef _SC_MEMLOCK */
4427 #ifdef _SC_MEMLOCK_RANGE
4428 if (x
== _SC_MEMLOCK_RANGE
)
4429 {*r
= Mono_Posix_SysConf__SC_MEMLOCK_RANGE
; return 0;}
4430 #endif /* ndef _SC_MEMLOCK_RANGE */
4431 #ifdef _SC_MEMORY_PROTECTION
4432 if (x
== _SC_MEMORY_PROTECTION
)
4433 {*r
= Mono_Posix_SysConf__SC_MEMORY_PROTECTION
; return 0;}
4434 #endif /* ndef _SC_MEMORY_PROTECTION */
4435 #ifdef _SC_MESSAGE_PASSING
4436 if (x
== _SC_MESSAGE_PASSING
)
4437 {*r
= Mono_Posix_SysConf__SC_MESSAGE_PASSING
; return 0;}
4438 #endif /* ndef _SC_MESSAGE_PASSING */
4439 #ifdef _SC_SEMAPHORES
4440 if (x
== _SC_SEMAPHORES
)
4441 {*r
= Mono_Posix_SysConf__SC_SEMAPHORES
; return 0;}
4442 #endif /* ndef _SC_SEMAPHORES */
4443 #ifdef _SC_SHARED_MEMORY_OBJECTS
4444 if (x
== _SC_SHARED_MEMORY_OBJECTS
)
4445 {*r
= Mono_Posix_SysConf__SC_SHARED_MEMORY_OBJECTS
; return 0;}
4446 #endif /* ndef _SC_SHARED_MEMORY_OBJECTS */
4447 #ifdef _SC_AIO_LISTIO_MAX
4448 if (x
== _SC_AIO_LISTIO_MAX
)
4449 {*r
= Mono_Posix_SysConf__SC_AIO_LISTIO_MAX
; return 0;}
4450 #endif /* ndef _SC_AIO_LISTIO_MAX */
4452 if (x
== _SC_AIO_MAX
)
4453 {*r
= Mono_Posix_SysConf__SC_AIO_MAX
; return 0;}
4454 #endif /* ndef _SC_AIO_MAX */
4455 #ifdef _SC_AIO_PRIO_DELTA_MAX
4456 if (x
== _SC_AIO_PRIO_DELTA_MAX
)
4457 {*r
= Mono_Posix_SysConf__SC_AIO_PRIO_DELTA_MAX
; return 0;}
4458 #endif /* ndef _SC_AIO_PRIO_DELTA_MAX */
4459 #ifdef _SC_DELAYTIMER_MAX
4460 if (x
== _SC_DELAYTIMER_MAX
)
4461 {*r
= Mono_Posix_SysConf__SC_DELAYTIMER_MAX
; return 0;}
4462 #endif /* ndef _SC_DELAYTIMER_MAX */
4463 #ifdef _SC_MQ_OPEN_MAX
4464 if (x
== _SC_MQ_OPEN_MAX
)
4465 {*r
= Mono_Posix_SysConf__SC_MQ_OPEN_MAX
; return 0;}
4466 #endif /* ndef _SC_MQ_OPEN_MAX */
4467 #ifdef _SC_MQ_PRIO_MAX
4468 if (x
== _SC_MQ_PRIO_MAX
)
4469 {*r
= Mono_Posix_SysConf__SC_MQ_PRIO_MAX
; return 0;}
4470 #endif /* ndef _SC_MQ_PRIO_MAX */
4472 if (x
== _SC_VERSION
)
4473 {*r
= Mono_Posix_SysConf__SC_VERSION
; return 0;}
4474 #endif /* ndef _SC_VERSION */
4476 if (x
== _SC_PAGESIZE
)
4477 {*r
= Mono_Posix_SysConf__SC_PAGESIZE
; return 0;}
4478 #endif /* ndef _SC_PAGESIZE */
4479 #ifdef _SC_RTSIG_MAX
4480 if (x
== _SC_RTSIG_MAX
)
4481 {*r
= Mono_Posix_SysConf__SC_RTSIG_MAX
; return 0;}
4482 #endif /* ndef _SC_RTSIG_MAX */
4483 #ifdef _SC_SEM_NSEMS_MAX
4484 if (x
== _SC_SEM_NSEMS_MAX
)
4485 {*r
= Mono_Posix_SysConf__SC_SEM_NSEMS_MAX
; return 0;}
4486 #endif /* ndef _SC_SEM_NSEMS_MAX */
4487 #ifdef _SC_SEM_VALUE_MAX
4488 if (x
== _SC_SEM_VALUE_MAX
)
4489 {*r
= Mono_Posix_SysConf__SC_SEM_VALUE_MAX
; return 0;}
4490 #endif /* ndef _SC_SEM_VALUE_MAX */
4491 #ifdef _SC_SIGQUEUE_MAX
4492 if (x
== _SC_SIGQUEUE_MAX
)
4493 {*r
= Mono_Posix_SysConf__SC_SIGQUEUE_MAX
; return 0;}
4494 #endif /* ndef _SC_SIGQUEUE_MAX */
4495 #ifdef _SC_TIMER_MAX
4496 if (x
== _SC_TIMER_MAX
)
4497 {*r
= Mono_Posix_SysConf__SC_TIMER_MAX
; return 0;}
4498 #endif /* ndef _SC_TIMER_MAX */
4499 #ifdef _SC_BC_BASE_MAX
4500 if (x
== _SC_BC_BASE_MAX
)
4501 {*r
= Mono_Posix_SysConf__SC_BC_BASE_MAX
; return 0;}
4502 #endif /* ndef _SC_BC_BASE_MAX */
4503 #ifdef _SC_BC_DIM_MAX
4504 if (x
== _SC_BC_DIM_MAX
)
4505 {*r
= Mono_Posix_SysConf__SC_BC_DIM_MAX
; return 0;}
4506 #endif /* ndef _SC_BC_DIM_MAX */
4507 #ifdef _SC_BC_SCALE_MAX
4508 if (x
== _SC_BC_SCALE_MAX
)
4509 {*r
= Mono_Posix_SysConf__SC_BC_SCALE_MAX
; return 0;}
4510 #endif /* ndef _SC_BC_SCALE_MAX */
4511 #ifdef _SC_BC_STRING_MAX
4512 if (x
== _SC_BC_STRING_MAX
)
4513 {*r
= Mono_Posix_SysConf__SC_BC_STRING_MAX
; return 0;}
4514 #endif /* ndef _SC_BC_STRING_MAX */
4515 #ifdef _SC_COLL_WEIGHTS_MAX
4516 if (x
== _SC_COLL_WEIGHTS_MAX
)
4517 {*r
= Mono_Posix_SysConf__SC_COLL_WEIGHTS_MAX
; return 0;}
4518 #endif /* ndef _SC_COLL_WEIGHTS_MAX */
4519 #ifdef _SC_EQUIV_CLASS_MAX
4520 if (x
== _SC_EQUIV_CLASS_MAX
)
4521 {*r
= Mono_Posix_SysConf__SC_EQUIV_CLASS_MAX
; return 0;}
4522 #endif /* ndef _SC_EQUIV_CLASS_MAX */
4523 #ifdef _SC_EXPR_NEST_MAX
4524 if (x
== _SC_EXPR_NEST_MAX
)
4525 {*r
= Mono_Posix_SysConf__SC_EXPR_NEST_MAX
; return 0;}
4526 #endif /* ndef _SC_EXPR_NEST_MAX */
4528 if (x
== _SC_LINE_MAX
)
4529 {*r
= Mono_Posix_SysConf__SC_LINE_MAX
; return 0;}
4530 #endif /* ndef _SC_LINE_MAX */
4531 #ifdef _SC_RE_DUP_MAX
4532 if (x
== _SC_RE_DUP_MAX
)
4533 {*r
= Mono_Posix_SysConf__SC_RE_DUP_MAX
; return 0;}
4534 #endif /* ndef _SC_RE_DUP_MAX */
4535 #ifdef _SC_CHARCLASS_NAME_MAX
4536 if (x
== _SC_CHARCLASS_NAME_MAX
)
4537 {*r
= Mono_Posix_SysConf__SC_CHARCLASS_NAME_MAX
; return 0;}
4538 #endif /* ndef _SC_CHARCLASS_NAME_MAX */
4539 #ifdef _SC_2_VERSION
4540 if (x
== _SC_2_VERSION
)
4541 {*r
= Mono_Posix_SysConf__SC_2_VERSION
; return 0;}
4542 #endif /* ndef _SC_2_VERSION */
4544 if (x
== _SC_2_C_BIND
)
4545 {*r
= Mono_Posix_SysConf__SC_2_C_BIND
; return 0;}
4546 #endif /* ndef _SC_2_C_BIND */
4548 if (x
== _SC_2_C_DEV
)
4549 {*r
= Mono_Posix_SysConf__SC_2_C_DEV
; return 0;}
4550 #endif /* ndef _SC_2_C_DEV */
4551 #ifdef _SC_2_FORT_DEV
4552 if (x
== _SC_2_FORT_DEV
)
4553 {*r
= Mono_Posix_SysConf__SC_2_FORT_DEV
; return 0;}
4554 #endif /* ndef _SC_2_FORT_DEV */
4555 #ifdef _SC_2_FORT_RUN
4556 if (x
== _SC_2_FORT_RUN
)
4557 {*r
= Mono_Posix_SysConf__SC_2_FORT_RUN
; return 0;}
4558 #endif /* ndef _SC_2_FORT_RUN */
4560 if (x
== _SC_2_SW_DEV
)
4561 {*r
= Mono_Posix_SysConf__SC_2_SW_DEV
; return 0;}
4562 #endif /* ndef _SC_2_SW_DEV */
4563 #ifdef _SC_2_LOCALEDEF
4564 if (x
== _SC_2_LOCALEDEF
)
4565 {*r
= Mono_Posix_SysConf__SC_2_LOCALEDEF
; return 0;}
4566 #endif /* ndef _SC_2_LOCALEDEF */
4569 {*r
= Mono_Posix_SysConf__SC_PII
; return 0;}
4570 #endif /* ndef _SC_PII */
4572 if (x
== _SC_PII_XTI
)
4573 {*r
= Mono_Posix_SysConf__SC_PII_XTI
; return 0;}
4574 #endif /* ndef _SC_PII_XTI */
4575 #ifdef _SC_PII_SOCKET
4576 if (x
== _SC_PII_SOCKET
)
4577 {*r
= Mono_Posix_SysConf__SC_PII_SOCKET
; return 0;}
4578 #endif /* ndef _SC_PII_SOCKET */
4579 #ifdef _SC_PII_INTERNET
4580 if (x
== _SC_PII_INTERNET
)
4581 {*r
= Mono_Posix_SysConf__SC_PII_INTERNET
; return 0;}
4582 #endif /* ndef _SC_PII_INTERNET */
4584 if (x
== _SC_PII_OSI
)
4585 {*r
= Mono_Posix_SysConf__SC_PII_OSI
; return 0;}
4586 #endif /* ndef _SC_PII_OSI */
4589 {*r
= Mono_Posix_SysConf__SC_POLL
; return 0;}
4590 #endif /* ndef _SC_POLL */
4592 if (x
== _SC_SELECT
)
4593 {*r
= Mono_Posix_SysConf__SC_SELECT
; return 0;}
4594 #endif /* ndef _SC_SELECT */
4595 #ifdef _SC_UIO_MAXIOV
4596 if (x
== _SC_UIO_MAXIOV
)
4597 {*r
= Mono_Posix_SysConf__SC_UIO_MAXIOV
; return 0;}
4598 #endif /* ndef _SC_UIO_MAXIOV */
4600 if (x
== _SC_IOV_MAX
)
4601 {*r
= Mono_Posix_SysConf__SC_IOV_MAX
; return 0;}
4602 #endif /* ndef _SC_IOV_MAX */
4603 #ifdef _SC_PII_INTERNET_STREAM
4604 if (x
== _SC_PII_INTERNET_STREAM
)
4605 {*r
= Mono_Posix_SysConf__SC_PII_INTERNET_STREAM
; return 0;}
4606 #endif /* ndef _SC_PII_INTERNET_STREAM */
4607 #ifdef _SC_PII_INTERNET_DGRAM
4608 if (x
== _SC_PII_INTERNET_DGRAM
)
4609 {*r
= Mono_Posix_SysConf__SC_PII_INTERNET_DGRAM
; return 0;}
4610 #endif /* ndef _SC_PII_INTERNET_DGRAM */
4611 #ifdef _SC_PII_OSI_COTS
4612 if (x
== _SC_PII_OSI_COTS
)
4613 {*r
= Mono_Posix_SysConf__SC_PII_OSI_COTS
; return 0;}
4614 #endif /* ndef _SC_PII_OSI_COTS */
4615 #ifdef _SC_PII_OSI_CLTS
4616 if (x
== _SC_PII_OSI_CLTS
)
4617 {*r
= Mono_Posix_SysConf__SC_PII_OSI_CLTS
; return 0;}
4618 #endif /* ndef _SC_PII_OSI_CLTS */
4619 #ifdef _SC_PII_OSI_M
4620 if (x
== _SC_PII_OSI_M
)
4621 {*r
= Mono_Posix_SysConf__SC_PII_OSI_M
; return 0;}
4622 #endif /* ndef _SC_PII_OSI_M */
4623 #ifdef _SC_T_IOV_MAX
4624 if (x
== _SC_T_IOV_MAX
)
4625 {*r
= Mono_Posix_SysConf__SC_T_IOV_MAX
; return 0;}
4626 #endif /* ndef _SC_T_IOV_MAX */
4628 if (x
== _SC_THREADS
)
4629 {*r
= Mono_Posix_SysConf__SC_THREADS
; return 0;}
4630 #endif /* ndef _SC_THREADS */
4631 #ifdef _SC_THREAD_SAFE_FUNCTIONS
4632 if (x
== _SC_THREAD_SAFE_FUNCTIONS
)
4633 {*r
= Mono_Posix_SysConf__SC_THREAD_SAFE_FUNCTIONS
; return 0;}
4634 #endif /* ndef _SC_THREAD_SAFE_FUNCTIONS */
4635 #ifdef _SC_GETGR_R_SIZE_MAX
4636 if (x
== _SC_GETGR_R_SIZE_MAX
)
4637 {*r
= Mono_Posix_SysConf__SC_GETGR_R_SIZE_MAX
; return 0;}
4638 #endif /* ndef _SC_GETGR_R_SIZE_MAX */
4639 #ifdef _SC_GETPW_R_SIZE_MAX
4640 if (x
== _SC_GETPW_R_SIZE_MAX
)
4641 {*r
= Mono_Posix_SysConf__SC_GETPW_R_SIZE_MAX
; return 0;}
4642 #endif /* ndef _SC_GETPW_R_SIZE_MAX */
4643 #ifdef _SC_LOGIN_NAME_MAX
4644 if (x
== _SC_LOGIN_NAME_MAX
)
4645 {*r
= Mono_Posix_SysConf__SC_LOGIN_NAME_MAX
; return 0;}
4646 #endif /* ndef _SC_LOGIN_NAME_MAX */
4647 #ifdef _SC_TTY_NAME_MAX
4648 if (x
== _SC_TTY_NAME_MAX
)
4649 {*r
= Mono_Posix_SysConf__SC_TTY_NAME_MAX
; return 0;}
4650 #endif /* ndef _SC_TTY_NAME_MAX */
4651 #ifdef _SC_THREAD_DESTRUCTOR_ITERATIONS
4652 if (x
== _SC_THREAD_DESTRUCTOR_ITERATIONS
)
4653 {*r
= Mono_Posix_SysConf__SC_THREAD_DESTRUCTOR_ITERATIONS
; return 0;}
4654 #endif /* ndef _SC_THREAD_DESTRUCTOR_ITERATIONS */
4655 #ifdef _SC_THREAD_KEYS_MAX
4656 if (x
== _SC_THREAD_KEYS_MAX
)
4657 {*r
= Mono_Posix_SysConf__SC_THREAD_KEYS_MAX
; return 0;}
4658 #endif /* ndef _SC_THREAD_KEYS_MAX */
4659 #ifdef _SC_THREAD_STACK_MIN
4660 if (x
== _SC_THREAD_STACK_MIN
)
4661 {*r
= Mono_Posix_SysConf__SC_THREAD_STACK_MIN
; return 0;}
4662 #endif /* ndef _SC_THREAD_STACK_MIN */
4663 #ifdef _SC_THREAD_THREADS_MAX
4664 if (x
== _SC_THREAD_THREADS_MAX
)
4665 {*r
= Mono_Posix_SysConf__SC_THREAD_THREADS_MAX
; return 0;}
4666 #endif /* ndef _SC_THREAD_THREADS_MAX */
4667 #ifdef _SC_THREAD_ATTR_STACKADDR
4668 if (x
== _SC_THREAD_ATTR_STACKADDR
)
4669 {*r
= Mono_Posix_SysConf__SC_THREAD_ATTR_STACKADDR
; return 0;}
4670 #endif /* ndef _SC_THREAD_ATTR_STACKADDR */
4671 #ifdef _SC_THREAD_ATTR_STACKSIZE
4672 if (x
== _SC_THREAD_ATTR_STACKSIZE
)
4673 {*r
= Mono_Posix_SysConf__SC_THREAD_ATTR_STACKSIZE
; return 0;}
4674 #endif /* ndef _SC_THREAD_ATTR_STACKSIZE */
4675 #ifdef _SC_THREAD_PRIORITY_SCHEDULING
4676 if (x
== _SC_THREAD_PRIORITY_SCHEDULING
)
4677 {*r
= Mono_Posix_SysConf__SC_THREAD_PRIORITY_SCHEDULING
; return 0;}
4678 #endif /* ndef _SC_THREAD_PRIORITY_SCHEDULING */
4679 #ifdef _SC_THREAD_PRIO_INHERIT
4680 if (x
== _SC_THREAD_PRIO_INHERIT
)
4681 {*r
= Mono_Posix_SysConf__SC_THREAD_PRIO_INHERIT
; return 0;}
4682 #endif /* ndef _SC_THREAD_PRIO_INHERIT */
4683 #ifdef _SC_THREAD_PRIO_PROTECT
4684 if (x
== _SC_THREAD_PRIO_PROTECT
)
4685 {*r
= Mono_Posix_SysConf__SC_THREAD_PRIO_PROTECT
; return 0;}
4686 #endif /* ndef _SC_THREAD_PRIO_PROTECT */
4687 #ifdef _SC_THREAD_PROCESS_SHARED
4688 if (x
== _SC_THREAD_PROCESS_SHARED
)
4689 {*r
= Mono_Posix_SysConf__SC_THREAD_PROCESS_SHARED
; return 0;}
4690 #endif /* ndef _SC_THREAD_PROCESS_SHARED */
4691 #ifdef _SC_NPROCESSORS_CONF
4692 if (x
== _SC_NPROCESSORS_CONF
)
4693 {*r
= Mono_Posix_SysConf__SC_NPROCESSORS_CONF
; return 0;}
4694 #endif /* ndef _SC_NPROCESSORS_CONF */
4695 #ifdef _SC_NPROCESSORS_ONLN
4696 if (x
== _SC_NPROCESSORS_ONLN
)
4697 {*r
= Mono_Posix_SysConf__SC_NPROCESSORS_ONLN
; return 0;}
4698 #endif /* ndef _SC_NPROCESSORS_ONLN */
4699 #ifdef _SC_PHYS_PAGES
4700 if (x
== _SC_PHYS_PAGES
)
4701 {*r
= Mono_Posix_SysConf__SC_PHYS_PAGES
; return 0;}
4702 #endif /* ndef _SC_PHYS_PAGES */
4703 #ifdef _SC_AVPHYS_PAGES
4704 if (x
== _SC_AVPHYS_PAGES
)
4705 {*r
= Mono_Posix_SysConf__SC_AVPHYS_PAGES
; return 0;}
4706 #endif /* ndef _SC_AVPHYS_PAGES */
4707 #ifdef _SC_ATEXIT_MAX
4708 if (x
== _SC_ATEXIT_MAX
)
4709 {*r
= Mono_Posix_SysConf__SC_ATEXIT_MAX
; return 0;}
4710 #endif /* ndef _SC_ATEXIT_MAX */
4712 if (x
== _SC_PASS_MAX
)
4713 {*r
= Mono_Posix_SysConf__SC_PASS_MAX
; return 0;}
4714 #endif /* ndef _SC_PASS_MAX */
4715 #ifdef _SC_XOPEN_VERSION
4716 if (x
== _SC_XOPEN_VERSION
)
4717 {*r
= Mono_Posix_SysConf__SC_XOPEN_VERSION
; return 0;}
4718 #endif /* ndef _SC_XOPEN_VERSION */
4719 #ifdef _SC_XOPEN_XCU_VERSION
4720 if (x
== _SC_XOPEN_XCU_VERSION
)
4721 {*r
= Mono_Posix_SysConf__SC_XOPEN_XCU_VERSION
; return 0;}
4722 #endif /* ndef _SC_XOPEN_XCU_VERSION */
4723 #ifdef _SC_XOPEN_UNIX
4724 if (x
== _SC_XOPEN_UNIX
)
4725 {*r
= Mono_Posix_SysConf__SC_XOPEN_UNIX
; return 0;}
4726 #endif /* ndef _SC_XOPEN_UNIX */
4727 #ifdef _SC_XOPEN_CRYPT
4728 if (x
== _SC_XOPEN_CRYPT
)
4729 {*r
= Mono_Posix_SysConf__SC_XOPEN_CRYPT
; return 0;}
4730 #endif /* ndef _SC_XOPEN_CRYPT */
4731 #ifdef _SC_XOPEN_ENH_I18N
4732 if (x
== _SC_XOPEN_ENH_I18N
)
4733 {*r
= Mono_Posix_SysConf__SC_XOPEN_ENH_I18N
; return 0;}
4734 #endif /* ndef _SC_XOPEN_ENH_I18N */
4735 #ifdef _SC_XOPEN_SHM
4736 if (x
== _SC_XOPEN_SHM
)
4737 {*r
= Mono_Posix_SysConf__SC_XOPEN_SHM
; return 0;}
4738 #endif /* ndef _SC_XOPEN_SHM */
4739 #ifdef _SC_2_CHAR_TERM
4740 if (x
== _SC_2_CHAR_TERM
)
4741 {*r
= Mono_Posix_SysConf__SC_2_CHAR_TERM
; return 0;}
4742 #endif /* ndef _SC_2_CHAR_TERM */
4743 #ifdef _SC_2_C_VERSION
4744 if (x
== _SC_2_C_VERSION
)
4745 {*r
= Mono_Posix_SysConf__SC_2_C_VERSION
; return 0;}
4746 #endif /* ndef _SC_2_C_VERSION */
4749 {*r
= Mono_Posix_SysConf__SC_2_UPE
; return 0;}
4750 #endif /* ndef _SC_2_UPE */
4751 #ifdef _SC_XOPEN_XPG2
4752 if (x
== _SC_XOPEN_XPG2
)
4753 {*r
= Mono_Posix_SysConf__SC_XOPEN_XPG2
; return 0;}
4754 #endif /* ndef _SC_XOPEN_XPG2 */
4755 #ifdef _SC_XOPEN_XPG3
4756 if (x
== _SC_XOPEN_XPG3
)
4757 {*r
= Mono_Posix_SysConf__SC_XOPEN_XPG3
; return 0;}
4758 #endif /* ndef _SC_XOPEN_XPG3 */
4759 #ifdef _SC_XOPEN_XPG4
4760 if (x
== _SC_XOPEN_XPG4
)
4761 {*r
= Mono_Posix_SysConf__SC_XOPEN_XPG4
; return 0;}
4762 #endif /* ndef _SC_XOPEN_XPG4 */
4764 if (x
== _SC_CHAR_BIT
)
4765 {*r
= Mono_Posix_SysConf__SC_CHAR_BIT
; return 0;}
4766 #endif /* ndef _SC_CHAR_BIT */
4768 if (x
== _SC_CHAR_MAX
)
4769 {*r
= Mono_Posix_SysConf__SC_CHAR_MAX
; return 0;}
4770 #endif /* ndef _SC_CHAR_MAX */
4772 if (x
== _SC_CHAR_MIN
)
4773 {*r
= Mono_Posix_SysConf__SC_CHAR_MIN
; return 0;}
4774 #endif /* ndef _SC_CHAR_MIN */
4776 if (x
== _SC_INT_MAX
)
4777 {*r
= Mono_Posix_SysConf__SC_INT_MAX
; return 0;}
4778 #endif /* ndef _SC_INT_MAX */
4780 if (x
== _SC_INT_MIN
)
4781 {*r
= Mono_Posix_SysConf__SC_INT_MIN
; return 0;}
4782 #endif /* ndef _SC_INT_MIN */
4784 if (x
== _SC_LONG_BIT
)
4785 {*r
= Mono_Posix_SysConf__SC_LONG_BIT
; return 0;}
4786 #endif /* ndef _SC_LONG_BIT */
4788 if (x
== _SC_WORD_BIT
)
4789 {*r
= Mono_Posix_SysConf__SC_WORD_BIT
; return 0;}
4790 #endif /* ndef _SC_WORD_BIT */
4791 #ifdef _SC_MB_LEN_MAX
4792 if (x
== _SC_MB_LEN_MAX
)
4793 {*r
= Mono_Posix_SysConf__SC_MB_LEN_MAX
; return 0;}
4794 #endif /* ndef _SC_MB_LEN_MAX */
4797 {*r
= Mono_Posix_SysConf__SC_NZERO
; return 0;}
4798 #endif /* ndef _SC_NZERO */
4799 #ifdef _SC_SSIZE_MAX
4800 if (x
== _SC_SSIZE_MAX
)
4801 {*r
= Mono_Posix_SysConf__SC_SSIZE_MAX
; return 0;}
4802 #endif /* ndef _SC_SSIZE_MAX */
4803 #ifdef _SC_SCHAR_MAX
4804 if (x
== _SC_SCHAR_MAX
)
4805 {*r
= Mono_Posix_SysConf__SC_SCHAR_MAX
; return 0;}
4806 #endif /* ndef _SC_SCHAR_MAX */
4807 #ifdef _SC_SCHAR_MIN
4808 if (x
== _SC_SCHAR_MIN
)
4809 {*r
= Mono_Posix_SysConf__SC_SCHAR_MIN
; return 0;}
4810 #endif /* ndef _SC_SCHAR_MIN */
4812 if (x
== _SC_SHRT_MAX
)
4813 {*r
= Mono_Posix_SysConf__SC_SHRT_MAX
; return 0;}
4814 #endif /* ndef _SC_SHRT_MAX */
4816 if (x
== _SC_SHRT_MIN
)
4817 {*r
= Mono_Posix_SysConf__SC_SHRT_MIN
; return 0;}
4818 #endif /* ndef _SC_SHRT_MIN */
4819 #ifdef _SC_UCHAR_MAX
4820 if (x
== _SC_UCHAR_MAX
)
4821 {*r
= Mono_Posix_SysConf__SC_UCHAR_MAX
; return 0;}
4822 #endif /* ndef _SC_UCHAR_MAX */
4824 if (x
== _SC_UINT_MAX
)
4825 {*r
= Mono_Posix_SysConf__SC_UINT_MAX
; return 0;}
4826 #endif /* ndef _SC_UINT_MAX */
4827 #ifdef _SC_ULONG_MAX
4828 if (x
== _SC_ULONG_MAX
)
4829 {*r
= Mono_Posix_SysConf__SC_ULONG_MAX
; return 0;}
4830 #endif /* ndef _SC_ULONG_MAX */
4831 #ifdef _SC_USHRT_MAX
4832 if (x
== _SC_USHRT_MAX
)
4833 {*r
= Mono_Posix_SysConf__SC_USHRT_MAX
; return 0;}
4834 #endif /* ndef _SC_USHRT_MAX */
4835 #ifdef _SC_NL_ARGMAX
4836 if (x
== _SC_NL_ARGMAX
)
4837 {*r
= Mono_Posix_SysConf__SC_NL_ARGMAX
; return 0;}
4838 #endif /* ndef _SC_NL_ARGMAX */
4839 #ifdef _SC_NL_LANGMAX
4840 if (x
== _SC_NL_LANGMAX
)
4841 {*r
= Mono_Posix_SysConf__SC_NL_LANGMAX
; return 0;}
4842 #endif /* ndef _SC_NL_LANGMAX */
4843 #ifdef _SC_NL_MSGMAX
4844 if (x
== _SC_NL_MSGMAX
)
4845 {*r
= Mono_Posix_SysConf__SC_NL_MSGMAX
; return 0;}
4846 #endif /* ndef _SC_NL_MSGMAX */
4848 if (x
== _SC_NL_NMAX
)
4849 {*r
= Mono_Posix_SysConf__SC_NL_NMAX
; return 0;}
4850 #endif /* ndef _SC_NL_NMAX */
4851 #ifdef _SC_NL_SETMAX
4852 if (x
== _SC_NL_SETMAX
)
4853 {*r
= Mono_Posix_SysConf__SC_NL_SETMAX
; return 0;}
4854 #endif /* ndef _SC_NL_SETMAX */
4855 #ifdef _SC_NL_TEXTMAX
4856 if (x
== _SC_NL_TEXTMAX
)
4857 {*r
= Mono_Posix_SysConf__SC_NL_TEXTMAX
; return 0;}
4858 #endif /* ndef _SC_NL_TEXTMAX */
4859 #ifdef _SC_XBS5_ILP32_OFF32
4860 if (x
== _SC_XBS5_ILP32_OFF32
)
4861 {*r
= Mono_Posix_SysConf__SC_XBS5_ILP32_OFF32
; return 0;}
4862 #endif /* ndef _SC_XBS5_ILP32_OFF32 */
4863 #ifdef _SC_XBS5_ILP32_OFFBIG
4864 if (x
== _SC_XBS5_ILP32_OFFBIG
)
4865 {*r
= Mono_Posix_SysConf__SC_XBS5_ILP32_OFFBIG
; return 0;}
4866 #endif /* ndef _SC_XBS5_ILP32_OFFBIG */
4867 #ifdef _SC_XBS5_LP64_OFF64
4868 if (x
== _SC_XBS5_LP64_OFF64
)
4869 {*r
= Mono_Posix_SysConf__SC_XBS5_LP64_OFF64
; return 0;}
4870 #endif /* ndef _SC_XBS5_LP64_OFF64 */
4871 #ifdef _SC_XBS5_LPBIG_OFFBIG
4872 if (x
== _SC_XBS5_LPBIG_OFFBIG
)
4873 {*r
= Mono_Posix_SysConf__SC_XBS5_LPBIG_OFFBIG
; return 0;}
4874 #endif /* ndef _SC_XBS5_LPBIG_OFFBIG */
4875 #ifdef _SC_XOPEN_LEGACY
4876 if (x
== _SC_XOPEN_LEGACY
)
4877 {*r
= Mono_Posix_SysConf__SC_XOPEN_LEGACY
; return 0;}
4878 #endif /* ndef _SC_XOPEN_LEGACY */
4879 #ifdef _SC_XOPEN_REALTIME
4880 if (x
== _SC_XOPEN_REALTIME
)
4881 {*r
= Mono_Posix_SysConf__SC_XOPEN_REALTIME
; return 0;}
4882 #endif /* ndef _SC_XOPEN_REALTIME */
4883 #ifdef _SC_XOPEN_REALTIME_THREADS
4884 if (x
== _SC_XOPEN_REALTIME_THREADS
)
4885 {*r
= Mono_Posix_SysConf__SC_XOPEN_REALTIME_THREADS
; return 0;}
4886 #endif /* ndef _SC_XOPEN_REALTIME_THREADS */
4887 #ifdef _SC_ADVISORY_INFO
4888 if (x
== _SC_ADVISORY_INFO
)
4889 {*r
= Mono_Posix_SysConf__SC_ADVISORY_INFO
; return 0;}
4890 #endif /* ndef _SC_ADVISORY_INFO */
4892 if (x
== _SC_BARRIERS
)
4893 {*r
= Mono_Posix_SysConf__SC_BARRIERS
; return 0;}
4894 #endif /* ndef _SC_BARRIERS */
4897 {*r
= Mono_Posix_SysConf__SC_BASE
; return 0;}
4898 #endif /* ndef _SC_BASE */
4899 #ifdef _SC_C_LANG_SUPPORT
4900 if (x
== _SC_C_LANG_SUPPORT
)
4901 {*r
= Mono_Posix_SysConf__SC_C_LANG_SUPPORT
; return 0;}
4902 #endif /* ndef _SC_C_LANG_SUPPORT */
4903 #ifdef _SC_C_LANG_SUPPORT_R
4904 if (x
== _SC_C_LANG_SUPPORT_R
)
4905 {*r
= Mono_Posix_SysConf__SC_C_LANG_SUPPORT_R
; return 0;}
4906 #endif /* ndef _SC_C_LANG_SUPPORT_R */
4907 #ifdef _SC_CLOCK_SELECTION
4908 if (x
== _SC_CLOCK_SELECTION
)
4909 {*r
= Mono_Posix_SysConf__SC_CLOCK_SELECTION
; return 0;}
4910 #endif /* ndef _SC_CLOCK_SELECTION */
4912 if (x
== _SC_CPUTIME
)
4913 {*r
= Mono_Posix_SysConf__SC_CPUTIME
; return 0;}
4914 #endif /* ndef _SC_CPUTIME */
4915 #ifdef _SC_THREAD_CPUTIME
4916 if (x
== _SC_THREAD_CPUTIME
)
4917 {*r
= Mono_Posix_SysConf__SC_THREAD_CPUTIME
; return 0;}
4918 #endif /* ndef _SC_THREAD_CPUTIME */
4919 #ifdef _SC_DEVICE_IO
4920 if (x
== _SC_DEVICE_IO
)
4921 {*r
= Mono_Posix_SysConf__SC_DEVICE_IO
; return 0;}
4922 #endif /* ndef _SC_DEVICE_IO */
4923 #ifdef _SC_DEVICE_SPECIFIC
4924 if (x
== _SC_DEVICE_SPECIFIC
)
4925 {*r
= Mono_Posix_SysConf__SC_DEVICE_SPECIFIC
; return 0;}
4926 #endif /* ndef _SC_DEVICE_SPECIFIC */
4927 #ifdef _SC_DEVICE_SPECIFIC_R
4928 if (x
== _SC_DEVICE_SPECIFIC_R
)
4929 {*r
= Mono_Posix_SysConf__SC_DEVICE_SPECIFIC_R
; return 0;}
4930 #endif /* ndef _SC_DEVICE_SPECIFIC_R */
4932 if (x
== _SC_FD_MGMT
)
4933 {*r
= Mono_Posix_SysConf__SC_FD_MGMT
; return 0;}
4934 #endif /* ndef _SC_FD_MGMT */
4937 {*r
= Mono_Posix_SysConf__SC_FIFO
; return 0;}
4938 #endif /* ndef _SC_FIFO */
4941 {*r
= Mono_Posix_SysConf__SC_PIPE
; return 0;}
4942 #endif /* ndef _SC_PIPE */
4943 #ifdef _SC_FILE_ATTRIBUTES
4944 if (x
== _SC_FILE_ATTRIBUTES
)
4945 {*r
= Mono_Posix_SysConf__SC_FILE_ATTRIBUTES
; return 0;}
4946 #endif /* ndef _SC_FILE_ATTRIBUTES */
4947 #ifdef _SC_FILE_LOCKING
4948 if (x
== _SC_FILE_LOCKING
)
4949 {*r
= Mono_Posix_SysConf__SC_FILE_LOCKING
; return 0;}
4950 #endif /* ndef _SC_FILE_LOCKING */
4951 #ifdef _SC_FILE_SYSTEM
4952 if (x
== _SC_FILE_SYSTEM
)
4953 {*r
= Mono_Posix_SysConf__SC_FILE_SYSTEM
; return 0;}
4954 #endif /* ndef _SC_FILE_SYSTEM */
4955 #ifdef _SC_MONOTONIC_CLOCK
4956 if (x
== _SC_MONOTONIC_CLOCK
)
4957 {*r
= Mono_Posix_SysConf__SC_MONOTONIC_CLOCK
; return 0;}
4958 #endif /* ndef _SC_MONOTONIC_CLOCK */
4959 #ifdef _SC_MULTI_PROCESS
4960 if (x
== _SC_MULTI_PROCESS
)
4961 {*r
= Mono_Posix_SysConf__SC_MULTI_PROCESS
; return 0;}
4962 #endif /* ndef _SC_MULTI_PROCESS */
4963 #ifdef _SC_SINGLE_PROCESS
4964 if (x
== _SC_SINGLE_PROCESS
)
4965 {*r
= Mono_Posix_SysConf__SC_SINGLE_PROCESS
; return 0;}
4966 #endif /* ndef _SC_SINGLE_PROCESS */
4967 #ifdef _SC_NETWORKING
4968 if (x
== _SC_NETWORKING
)
4969 {*r
= Mono_Posix_SysConf__SC_NETWORKING
; return 0;}
4970 #endif /* ndef _SC_NETWORKING */
4971 #ifdef _SC_READER_WRITER_LOCKS
4972 if (x
== _SC_READER_WRITER_LOCKS
)
4973 {*r
= Mono_Posix_SysConf__SC_READER_WRITER_LOCKS
; return 0;}
4974 #endif /* ndef _SC_READER_WRITER_LOCKS */
4975 #ifdef _SC_SPIN_LOCKS
4976 if (x
== _SC_SPIN_LOCKS
)
4977 {*r
= Mono_Posix_SysConf__SC_SPIN_LOCKS
; return 0;}
4978 #endif /* ndef _SC_SPIN_LOCKS */
4980 if (x
== _SC_REGEXP
)
4981 {*r
= Mono_Posix_SysConf__SC_REGEXP
; return 0;}
4982 #endif /* ndef _SC_REGEXP */
4983 #ifdef _SC_REGEX_VERSION
4984 if (x
== _SC_REGEX_VERSION
)
4985 {*r
= Mono_Posix_SysConf__SC_REGEX_VERSION
; return 0;}
4986 #endif /* ndef _SC_REGEX_VERSION */
4989 {*r
= Mono_Posix_SysConf__SC_SHELL
; return 0;}
4990 #endif /* ndef _SC_SHELL */
4992 if (x
== _SC_SIGNALS
)
4993 {*r
= Mono_Posix_SysConf__SC_SIGNALS
; return 0;}
4994 #endif /* ndef _SC_SIGNALS */
4997 {*r
= Mono_Posix_SysConf__SC_SPAWN
; return 0;}
4998 #endif /* ndef _SC_SPAWN */
4999 #ifdef _SC_SPORADIC_SERVER
5000 if (x
== _SC_SPORADIC_SERVER
)
5001 {*r
= Mono_Posix_SysConf__SC_SPORADIC_SERVER
; return 0;}
5002 #endif /* ndef _SC_SPORADIC_SERVER */
5003 #ifdef _SC_THREAD_SPORADIC_SERVER
5004 if (x
== _SC_THREAD_SPORADIC_SERVER
)
5005 {*r
= Mono_Posix_SysConf__SC_THREAD_SPORADIC_SERVER
; return 0;}
5006 #endif /* ndef _SC_THREAD_SPORADIC_SERVER */
5007 #ifdef _SC_SYSTEM_DATABASE
5008 if (x
== _SC_SYSTEM_DATABASE
)
5009 {*r
= Mono_Posix_SysConf__SC_SYSTEM_DATABASE
; return 0;}
5010 #endif /* ndef _SC_SYSTEM_DATABASE */
5011 #ifdef _SC_SYSTEM_DATABASE_R
5012 if (x
== _SC_SYSTEM_DATABASE_R
)
5013 {*r
= Mono_Posix_SysConf__SC_SYSTEM_DATABASE_R
; return 0;}
5014 #endif /* ndef _SC_SYSTEM_DATABASE_R */
5016 if (x
== _SC_TIMEOUTS
)
5017 {*r
= Mono_Posix_SysConf__SC_TIMEOUTS
; return 0;}
5018 #endif /* ndef _SC_TIMEOUTS */
5019 #ifdef _SC_TYPED_MEMORY_OBJECTS
5020 if (x
== _SC_TYPED_MEMORY_OBJECTS
)
5021 {*r
= Mono_Posix_SysConf__SC_TYPED_MEMORY_OBJECTS
; return 0;}
5022 #endif /* ndef _SC_TYPED_MEMORY_OBJECTS */
5023 #ifdef _SC_USER_GROUPS
5024 if (x
== _SC_USER_GROUPS
)
5025 {*r
= Mono_Posix_SysConf__SC_USER_GROUPS
; return 0;}
5026 #endif /* ndef _SC_USER_GROUPS */
5027 #ifdef _SC_USER_GROUPS_R
5028 if (x
== _SC_USER_GROUPS_R
)
5029 {*r
= Mono_Posix_SysConf__SC_USER_GROUPS_R
; return 0;}
5030 #endif /* ndef _SC_USER_GROUPS_R */
5033 {*r
= Mono_Posix_SysConf__SC_2_PBS
; return 0;}
5034 #endif /* ndef _SC_2_PBS */
5035 #ifdef _SC_2_PBS_ACCOUNTING
5036 if (x
== _SC_2_PBS_ACCOUNTING
)
5037 {*r
= Mono_Posix_SysConf__SC_2_PBS_ACCOUNTING
; return 0;}
5038 #endif /* ndef _SC_2_PBS_ACCOUNTING */
5039 #ifdef _SC_2_PBS_LOCATE
5040 if (x
== _SC_2_PBS_LOCATE
)
5041 {*r
= Mono_Posix_SysConf__SC_2_PBS_LOCATE
; return 0;}
5042 #endif /* ndef _SC_2_PBS_LOCATE */
5043 #ifdef _SC_2_PBS_MESSAGE
5044 if (x
== _SC_2_PBS_MESSAGE
)
5045 {*r
= Mono_Posix_SysConf__SC_2_PBS_MESSAGE
; return 0;}
5046 #endif /* ndef _SC_2_PBS_MESSAGE */
5047 #ifdef _SC_2_PBS_TRACK
5048 if (x
== _SC_2_PBS_TRACK
)
5049 {*r
= Mono_Posix_SysConf__SC_2_PBS_TRACK
; return 0;}
5050 #endif /* ndef _SC_2_PBS_TRACK */
5051 #ifdef _SC_SYMLOOP_MAX
5052 if (x
== _SC_SYMLOOP_MAX
)
5053 {*r
= Mono_Posix_SysConf__SC_SYMLOOP_MAX
; return 0;}
5054 #endif /* ndef _SC_SYMLOOP_MAX */
5056 if (x
== _SC_STREAMS
)
5057 {*r
= Mono_Posix_SysConf__SC_STREAMS
; return 0;}
5058 #endif /* ndef _SC_STREAMS */
5059 #ifdef _SC_2_PBS_CHECKPOINT
5060 if (x
== _SC_2_PBS_CHECKPOINT
)
5061 {*r
= Mono_Posix_SysConf__SC_2_PBS_CHECKPOINT
; return 0;}
5062 #endif /* ndef _SC_2_PBS_CHECKPOINT */
5063 #ifdef _SC_V6_ILP32_OFF32
5064 if (x
== _SC_V6_ILP32_OFF32
)
5065 {*r
= Mono_Posix_SysConf__SC_V6_ILP32_OFF32
; return 0;}
5066 #endif /* ndef _SC_V6_ILP32_OFF32 */
5067 #ifdef _SC_V6_ILP32_OFFBIG
5068 if (x
== _SC_V6_ILP32_OFFBIG
)
5069 {*r
= Mono_Posix_SysConf__SC_V6_ILP32_OFFBIG
; return 0;}
5070 #endif /* ndef _SC_V6_ILP32_OFFBIG */
5071 #ifdef _SC_V6_LP64_OFF64
5072 if (x
== _SC_V6_LP64_OFF64
)
5073 {*r
= Mono_Posix_SysConf__SC_V6_LP64_OFF64
; return 0;}
5074 #endif /* ndef _SC_V6_LP64_OFF64 */
5075 #ifdef _SC_V6_LPBIG_OFFBIG
5076 if (x
== _SC_V6_LPBIG_OFFBIG
)
5077 {*r
= Mono_Posix_SysConf__SC_V6_LPBIG_OFFBIG
; return 0;}
5078 #endif /* ndef _SC_V6_LPBIG_OFFBIG */
5079 #ifdef _SC_HOST_NAME_MAX
5080 if (x
== _SC_HOST_NAME_MAX
)
5081 {*r
= Mono_Posix_SysConf__SC_HOST_NAME_MAX
; return 0;}
5082 #endif /* ndef _SC_HOST_NAME_MAX */
5085 {*r
= Mono_Posix_SysConf__SC_TRACE
; return 0;}
5086 #endif /* ndef _SC_TRACE */
5087 #ifdef _SC_TRACE_EVENT_FILTER
5088 if (x
== _SC_TRACE_EVENT_FILTER
)
5089 {*r
= Mono_Posix_SysConf__SC_TRACE_EVENT_FILTER
; return 0;}
5090 #endif /* ndef _SC_TRACE_EVENT_FILTER */
5091 #ifdef _SC_TRACE_INHERIT
5092 if (x
== _SC_TRACE_INHERIT
)
5093 {*r
= Mono_Posix_SysConf__SC_TRACE_INHERIT
; return 0;}
5094 #endif /* ndef _SC_TRACE_INHERIT */
5095 #ifdef _SC_TRACE_LOG
5096 if (x
== _SC_TRACE_LOG
)
5097 {*r
= Mono_Posix_SysConf__SC_TRACE_LOG
; return 0;}
5098 #endif /* ndef _SC_TRACE_LOG */
5099 #ifdef _SC_LEVEL1_ICACHE_SIZE
5100 if (x
== _SC_LEVEL1_ICACHE_SIZE
)
5101 {*r
= Mono_Posix_SysConf__SC_LEVEL1_ICACHE_SIZE
; return 0;}
5102 #endif /* ndef _SC_LEVEL1_ICACHE_SIZE */
5103 #ifdef _SC_LEVEL1_ICACHE_ASSOC
5104 if (x
== _SC_LEVEL1_ICACHE_ASSOC
)
5105 {*r
= Mono_Posix_SysConf__SC_LEVEL1_ICACHE_ASSOC
; return 0;}
5106 #endif /* ndef _SC_LEVEL1_ICACHE_ASSOC */
5107 #ifdef _SC_LEVEL1_ICACHE_LINESIZE
5108 if (x
== _SC_LEVEL1_ICACHE_LINESIZE
)
5109 {*r
= Mono_Posix_SysConf__SC_LEVEL1_ICACHE_LINESIZE
; return 0;}
5110 #endif /* ndef _SC_LEVEL1_ICACHE_LINESIZE */
5111 #ifdef _SC_LEVEL1_DCACHE_SIZE
5112 if (x
== _SC_LEVEL1_DCACHE_SIZE
)
5113 {*r
= Mono_Posix_SysConf__SC_LEVEL1_DCACHE_SIZE
; return 0;}
5114 #endif /* ndef _SC_LEVEL1_DCACHE_SIZE */
5115 #ifdef _SC_LEVEL1_DCACHE_ASSOC
5116 if (x
== _SC_LEVEL1_DCACHE_ASSOC
)
5117 {*r
= Mono_Posix_SysConf__SC_LEVEL1_DCACHE_ASSOC
; return 0;}
5118 #endif /* ndef _SC_LEVEL1_DCACHE_ASSOC */
5119 #ifdef _SC_LEVEL1_DCACHE_LINESIZE
5120 if (x
== _SC_LEVEL1_DCACHE_LINESIZE
)
5121 {*r
= Mono_Posix_SysConf__SC_LEVEL1_DCACHE_LINESIZE
; return 0;}
5122 #endif /* ndef _SC_LEVEL1_DCACHE_LINESIZE */
5123 #ifdef _SC_LEVEL2_CACHE_SIZE
5124 if (x
== _SC_LEVEL2_CACHE_SIZE
)
5125 {*r
= Mono_Posix_SysConf__SC_LEVEL2_CACHE_SIZE
; return 0;}
5126 #endif /* ndef _SC_LEVEL2_CACHE_SIZE */
5127 #ifdef _SC_LEVEL2_CACHE_ASSOC
5128 if (x
== _SC_LEVEL2_CACHE_ASSOC
)
5129 {*r
= Mono_Posix_SysConf__SC_LEVEL2_CACHE_ASSOC
; return 0;}
5130 #endif /* ndef _SC_LEVEL2_CACHE_ASSOC */
5131 #ifdef _SC_LEVEL2_CACHE_LINESIZE
5132 if (x
== _SC_LEVEL2_CACHE_LINESIZE
)
5133 {*r
= Mono_Posix_SysConf__SC_LEVEL2_CACHE_LINESIZE
; return 0;}
5134 #endif /* ndef _SC_LEVEL2_CACHE_LINESIZE */
5135 #ifdef _SC_LEVEL3_CACHE_SIZE
5136 if (x
== _SC_LEVEL3_CACHE_SIZE
)
5137 {*r
= Mono_Posix_SysConf__SC_LEVEL3_CACHE_SIZE
; return 0;}
5138 #endif /* ndef _SC_LEVEL3_CACHE_SIZE */
5139 #ifdef _SC_LEVEL3_CACHE_ASSOC
5140 if (x
== _SC_LEVEL3_CACHE_ASSOC
)
5141 {*r
= Mono_Posix_SysConf__SC_LEVEL3_CACHE_ASSOC
; return 0;}
5142 #endif /* ndef _SC_LEVEL3_CACHE_ASSOC */
5143 #ifdef _SC_LEVEL3_CACHE_LINESIZE
5144 if (x
== _SC_LEVEL3_CACHE_LINESIZE
)
5145 {*r
= Mono_Posix_SysConf__SC_LEVEL3_CACHE_LINESIZE
; return 0;}
5146 #endif /* ndef _SC_LEVEL3_CACHE_LINESIZE */
5147 #ifdef _SC_LEVEL4_CACHE_SIZE
5148 if (x
== _SC_LEVEL4_CACHE_SIZE
)
5149 {*r
= Mono_Posix_SysConf__SC_LEVEL4_CACHE_SIZE
; return 0;}
5150 #endif /* ndef _SC_LEVEL4_CACHE_SIZE */
5151 #ifdef _SC_LEVEL4_CACHE_ASSOC
5152 if (x
== _SC_LEVEL4_CACHE_ASSOC
)
5153 {*r
= Mono_Posix_SysConf__SC_LEVEL4_CACHE_ASSOC
; return 0;}
5154 #endif /* ndef _SC_LEVEL4_CACHE_ASSOC */
5155 #ifdef _SC_LEVEL4_CACHE_LINESIZE
5156 if (x
== _SC_LEVEL4_CACHE_LINESIZE
)
5157 {*r
= Mono_Posix_SysConf__SC_LEVEL4_CACHE_LINESIZE
; return 0;}
5158 #endif /* ndef _SC_LEVEL4_CACHE_LINESIZE */
5159 errno
= EINVAL
; return -1;
5162 int Mono_Posix_FromConfStr (int x
, int *r
)
5167 if (x
== Mono_Posix_ConfStr__CS_PATH
)
5169 {*r
= _CS_PATH
; return 0;}
5170 #else /* def _CS_PATH */
5171 {errno
= EINVAL
; return -1;}
5172 #endif /* ndef _CS_PATH */
5173 if (x
== Mono_Posix_ConfStr__CS_V6_WIDTH_RESTRICTED_ENVS
)
5174 #ifdef _CS_V6_WIDTH_RESTRICTED_ENVS
5175 {*r
= _CS_V6_WIDTH_RESTRICTED_ENVS
; return 0;}
5176 #else /* def _CS_V6_WIDTH_RESTRICTED_ENVS */
5177 {errno
= EINVAL
; return -1;}
5178 #endif /* ndef _CS_V6_WIDTH_RESTRICTED_ENVS */
5179 if (x
== Mono_Posix_ConfStr__CS_GNU_LIBC_VERSION
)
5180 #ifdef _CS_GNU_LIBC_VERSION
5181 {*r
= _CS_GNU_LIBC_VERSION
; return 0;}
5182 #else /* def _CS_GNU_LIBC_VERSION */
5183 {errno
= EINVAL
; return -1;}
5184 #endif /* ndef _CS_GNU_LIBC_VERSION */
5185 if (x
== Mono_Posix_ConfStr__CS_GNU_LIBPTHREAD_VERSION
)
5186 #ifdef _CS_GNU_LIBPTHREAD_VERSION
5187 {*r
= _CS_GNU_LIBPTHREAD_VERSION
; return 0;}
5188 #else /* def _CS_GNU_LIBPTHREAD_VERSION */
5189 {errno
= EINVAL
; return -1;}
5190 #endif /* ndef _CS_GNU_LIBPTHREAD_VERSION */
5191 if (x
== Mono_Posix_ConfStr__CS_LFS_CFLAGS
)
5192 #ifdef _CS_LFS_CFLAGS
5193 {*r
= _CS_LFS_CFLAGS
; return 0;}
5194 #else /* def _CS_LFS_CFLAGS */
5195 {errno
= EINVAL
; return -1;}
5196 #endif /* ndef _CS_LFS_CFLAGS */
5197 if (x
== Mono_Posix_ConfStr__CS_LFS_LDFLAGS
)
5198 #ifdef _CS_LFS_LDFLAGS
5199 {*r
= _CS_LFS_LDFLAGS
; return 0;}
5200 #else /* def _CS_LFS_LDFLAGS */
5201 {errno
= EINVAL
; return -1;}
5202 #endif /* ndef _CS_LFS_LDFLAGS */
5203 if (x
== Mono_Posix_ConfStr__CS_LFS_LIBS
)
5205 {*r
= _CS_LFS_LIBS
; return 0;}
5206 #else /* def _CS_LFS_LIBS */
5207 {errno
= EINVAL
; return -1;}
5208 #endif /* ndef _CS_LFS_LIBS */
5209 if (x
== Mono_Posix_ConfStr__CS_LFS_LINTFLAGS
)
5210 #ifdef _CS_LFS_LINTFLAGS
5211 {*r
= _CS_LFS_LINTFLAGS
; return 0;}
5212 #else /* def _CS_LFS_LINTFLAGS */
5213 {errno
= EINVAL
; return -1;}
5214 #endif /* ndef _CS_LFS_LINTFLAGS */
5215 if (x
== Mono_Posix_ConfStr__CS_LFS64_CFLAGS
)
5216 #ifdef _CS_LFS64_CFLAGS
5217 {*r
= _CS_LFS64_CFLAGS
; return 0;}
5218 #else /* def _CS_LFS64_CFLAGS */
5219 {errno
= EINVAL
; return -1;}
5220 #endif /* ndef _CS_LFS64_CFLAGS */
5221 if (x
== Mono_Posix_ConfStr__CS_LFS64_LDFLAGS
)
5222 #ifdef _CS_LFS64_LDFLAGS
5223 {*r
= _CS_LFS64_LDFLAGS
; return 0;}
5224 #else /* def _CS_LFS64_LDFLAGS */
5225 {errno
= EINVAL
; return -1;}
5226 #endif /* ndef _CS_LFS64_LDFLAGS */
5227 if (x
== Mono_Posix_ConfStr__CS_LFS64_LIBS
)
5228 #ifdef _CS_LFS64_LIBS
5229 {*r
= _CS_LFS64_LIBS
; return 0;}
5230 #else /* def _CS_LFS64_LIBS */
5231 {errno
= EINVAL
; return -1;}
5232 #endif /* ndef _CS_LFS64_LIBS */
5233 if (x
== Mono_Posix_ConfStr__CS_LFS64_LINTFLAGS
)
5234 #ifdef _CS_LFS64_LINTFLAGS
5235 {*r
= _CS_LFS64_LINTFLAGS
; return 0;}
5236 #else /* def _CS_LFS64_LINTFLAGS */
5237 {errno
= EINVAL
; return -1;}
5238 #endif /* ndef _CS_LFS64_LINTFLAGS */
5239 if (x
== Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_CFLAGS
)
5240 #ifdef _CS_XBS5_ILP32_OFF32_CFLAGS
5241 {*r
= _CS_XBS5_ILP32_OFF32_CFLAGS
; return 0;}
5242 #else /* def _CS_XBS5_ILP32_OFF32_CFLAGS */
5243 {errno
= EINVAL
; return -1;}
5244 #endif /* ndef _CS_XBS5_ILP32_OFF32_CFLAGS */
5245 if (x
== Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LDFLAGS
)
5246 #ifdef _CS_XBS5_ILP32_OFF32_LDFLAGS
5247 {*r
= _CS_XBS5_ILP32_OFF32_LDFLAGS
; return 0;}
5248 #else /* def _CS_XBS5_ILP32_OFF32_LDFLAGS */
5249 {errno
= EINVAL
; return -1;}
5250 #endif /* ndef _CS_XBS5_ILP32_OFF32_LDFLAGS */
5251 if (x
== Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LIBS
)
5252 #ifdef _CS_XBS5_ILP32_OFF32_LIBS
5253 {*r
= _CS_XBS5_ILP32_OFF32_LIBS
; return 0;}
5254 #else /* def _CS_XBS5_ILP32_OFF32_LIBS */
5255 {errno
= EINVAL
; return -1;}
5256 #endif /* ndef _CS_XBS5_ILP32_OFF32_LIBS */
5257 if (x
== Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LINTFLAGS
)
5258 #ifdef _CS_XBS5_ILP32_OFF32_LINTFLAGS
5259 {*r
= _CS_XBS5_ILP32_OFF32_LINTFLAGS
; return 0;}
5260 #else /* def _CS_XBS5_ILP32_OFF32_LINTFLAGS */
5261 {errno
= EINVAL
; return -1;}
5262 #endif /* ndef _CS_XBS5_ILP32_OFF32_LINTFLAGS */
5263 if (x
== Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_CFLAGS
)
5264 #ifdef _CS_XBS5_ILP32_OFFBIG_CFLAGS
5265 {*r
= _CS_XBS5_ILP32_OFFBIG_CFLAGS
; return 0;}
5266 #else /* def _CS_XBS5_ILP32_OFFBIG_CFLAGS */
5267 {errno
= EINVAL
; return -1;}
5268 #endif /* ndef _CS_XBS5_ILP32_OFFBIG_CFLAGS */
5269 if (x
== Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LDFLAGS
)
5270 #ifdef _CS_XBS5_ILP32_OFFBIG_LDFLAGS
5271 {*r
= _CS_XBS5_ILP32_OFFBIG_LDFLAGS
; return 0;}
5272 #else /* def _CS_XBS5_ILP32_OFFBIG_LDFLAGS */
5273 {errno
= EINVAL
; return -1;}
5274 #endif /* ndef _CS_XBS5_ILP32_OFFBIG_LDFLAGS */
5275 if (x
== Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LIBS
)
5276 #ifdef _CS_XBS5_ILP32_OFFBIG_LIBS
5277 {*r
= _CS_XBS5_ILP32_OFFBIG_LIBS
; return 0;}
5278 #else /* def _CS_XBS5_ILP32_OFFBIG_LIBS */
5279 {errno
= EINVAL
; return -1;}
5280 #endif /* ndef _CS_XBS5_ILP32_OFFBIG_LIBS */
5281 if (x
== Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LINTFLAGS
)
5282 #ifdef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
5283 {*r
= _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
; return 0;}
5284 #else /* def _CS_XBS5_ILP32_OFFBIG_LINTFLAGS */
5285 {errno
= EINVAL
; return -1;}
5286 #endif /* ndef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS */
5287 if (x
== Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_CFLAGS
)
5288 #ifdef _CS_XBS5_LP64_OFF64_CFLAGS
5289 {*r
= _CS_XBS5_LP64_OFF64_CFLAGS
; return 0;}
5290 #else /* def _CS_XBS5_LP64_OFF64_CFLAGS */
5291 {errno
= EINVAL
; return -1;}
5292 #endif /* ndef _CS_XBS5_LP64_OFF64_CFLAGS */
5293 if (x
== Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LDFLAGS
)
5294 #ifdef _CS_XBS5_LP64_OFF64_LDFLAGS
5295 {*r
= _CS_XBS5_LP64_OFF64_LDFLAGS
; return 0;}
5296 #else /* def _CS_XBS5_LP64_OFF64_LDFLAGS */
5297 {errno
= EINVAL
; return -1;}
5298 #endif /* ndef _CS_XBS5_LP64_OFF64_LDFLAGS */
5299 if (x
== Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LIBS
)
5300 #ifdef _CS_XBS5_LP64_OFF64_LIBS
5301 {*r
= _CS_XBS5_LP64_OFF64_LIBS
; return 0;}
5302 #else /* def _CS_XBS5_LP64_OFF64_LIBS */
5303 {errno
= EINVAL
; return -1;}
5304 #endif /* ndef _CS_XBS5_LP64_OFF64_LIBS */
5305 if (x
== Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LINTFLAGS
)
5306 #ifdef _CS_XBS5_LP64_OFF64_LINTFLAGS
5307 {*r
= _CS_XBS5_LP64_OFF64_LINTFLAGS
; return 0;}
5308 #else /* def _CS_XBS5_LP64_OFF64_LINTFLAGS */
5309 {errno
= EINVAL
; return -1;}
5310 #endif /* ndef _CS_XBS5_LP64_OFF64_LINTFLAGS */
5311 if (x
== Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_CFLAGS
)
5312 #ifdef _CS_XBS5_LPBIG_OFFBIG_CFLAGS
5313 {*r
= _CS_XBS5_LPBIG_OFFBIG_CFLAGS
; return 0;}
5314 #else /* def _CS_XBS5_LPBIG_OFFBIG_CFLAGS */
5315 {errno
= EINVAL
; return -1;}
5316 #endif /* ndef _CS_XBS5_LPBIG_OFFBIG_CFLAGS */
5317 if (x
== Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LDFLAGS
)
5318 #ifdef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
5319 {*r
= _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
; return 0;}
5320 #else /* def _CS_XBS5_LPBIG_OFFBIG_LDFLAGS */
5321 {errno
= EINVAL
; return -1;}
5322 #endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS */
5323 if (x
== Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LIBS
)
5324 #ifdef _CS_XBS5_LPBIG_OFFBIG_LIBS
5325 {*r
= _CS_XBS5_LPBIG_OFFBIG_LIBS
; return 0;}
5326 #else /* def _CS_XBS5_LPBIG_OFFBIG_LIBS */
5327 {errno
= EINVAL
; return -1;}
5328 #endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LIBS */
5329 if (x
== Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
)
5330 #ifdef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
5331 {*r
= _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
; return 0;}
5332 #else /* def _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS */
5333 {errno
= EINVAL
; return -1;}
5334 #endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS */
5335 if (x
== Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_CFLAGS
)
5336 #ifdef _CS_POSIX_V6_ILP32_OFF32_CFLAGS
5337 {*r
= _CS_POSIX_V6_ILP32_OFF32_CFLAGS
; return 0;}
5338 #else /* def _CS_POSIX_V6_ILP32_OFF32_CFLAGS */
5339 {errno
= EINVAL
; return -1;}
5340 #endif /* ndef _CS_POSIX_V6_ILP32_OFF32_CFLAGS */
5341 if (x
== Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LDFLAGS
)
5342 #ifdef _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
5343 {*r
= _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
; return 0;}
5344 #else /* def _CS_POSIX_V6_ILP32_OFF32_LDFLAGS */
5345 {errno
= EINVAL
; return -1;}
5346 #endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LDFLAGS */
5347 if (x
== Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LIBS
)
5348 #ifdef _CS_POSIX_V6_ILP32_OFF32_LIBS
5349 {*r
= _CS_POSIX_V6_ILP32_OFF32_LIBS
; return 0;}
5350 #else /* def _CS_POSIX_V6_ILP32_OFF32_LIBS */
5351 {errno
= EINVAL
; return -1;}
5352 #endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LIBS */
5353 if (x
== Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
)
5354 #ifdef _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
5355 {*r
= _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
; return 0;}
5356 #else /* def _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS */
5357 {errno
= EINVAL
; return -1;}
5358 #endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS */
5359 if (x
== Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
)
5360 #ifdef _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
5361 {*r
= _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
; return 0;}
5362 #else /* def _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS */
5363 {errno
= EINVAL
; return -1;}
5364 #endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS */
5365 if (x
== Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
)
5366 #ifdef _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
5367 {*r
= _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
; return 0;}
5368 #else /* def _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS */
5369 {errno
= EINVAL
; return -1;}
5370 #endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS */
5371 if (x
== Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LIBS
)
5372 #ifdef _CS_POSIX_V6_ILP32_OFFBIG_LIBS
5373 {*r
= _CS_POSIX_V6_ILP32_OFFBIG_LIBS
; return 0;}
5374 #else /* def _CS_POSIX_V6_ILP32_OFFBIG_LIBS */
5375 {errno
= EINVAL
; return -1;}
5376 #endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LIBS */
5377 if (x
== Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
)
5378 #ifdef _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
5379 {*r
= _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
; return 0;}
5380 #else /* def _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS */
5381 {errno
= EINVAL
; return -1;}
5382 #endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS */
5383 if (x
== Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_CFLAGS
)
5384 #ifdef _CS_POSIX_V6_LP64_OFF64_CFLAGS
5385 {*r
= _CS_POSIX_V6_LP64_OFF64_CFLAGS
; return 0;}
5386 #else /* def _CS_POSIX_V6_LP64_OFF64_CFLAGS */
5387 {errno
= EINVAL
; return -1;}
5388 #endif /* ndef _CS_POSIX_V6_LP64_OFF64_CFLAGS */
5389 if (x
== Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LDFLAGS
)
5390 #ifdef _CS_POSIX_V6_LP64_OFF64_LDFLAGS
5391 {*r
= _CS_POSIX_V6_LP64_OFF64_LDFLAGS
; return 0;}
5392 #else /* def _CS_POSIX_V6_LP64_OFF64_LDFLAGS */
5393 {errno
= EINVAL
; return -1;}
5394 #endif /* ndef _CS_POSIX_V6_LP64_OFF64_LDFLAGS */
5395 if (x
== Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LIBS
)
5396 #ifdef _CS_POSIX_V6_LP64_OFF64_LIBS
5397 {*r
= _CS_POSIX_V6_LP64_OFF64_LIBS
; return 0;}
5398 #else /* def _CS_POSIX_V6_LP64_OFF64_LIBS */
5399 {errno
= EINVAL
; return -1;}
5400 #endif /* ndef _CS_POSIX_V6_LP64_OFF64_LIBS */
5401 if (x
== Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LINTFLAGS
)
5402 #ifdef _CS_POSIX_V6_LP64_OFF64_LINTFLAGS
5403 {*r
= _CS_POSIX_V6_LP64_OFF64_LINTFLAGS
; return 0;}
5404 #else /* def _CS_POSIX_V6_LP64_OFF64_LINTFLAGS */
5405 {errno
= EINVAL
; return -1;}
5406 #endif /* ndef _CS_POSIX_V6_LP64_OFF64_LINTFLAGS */
5407 if (x
== Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
)
5408 #ifdef _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
5409 {*r
= _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
; return 0;}
5410 #else /* def _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS */
5411 {errno
= EINVAL
; return -1;}
5412 #endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS */
5413 if (x
== Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
)
5414 #ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
5415 {*r
= _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
; return 0;}
5416 #else /* def _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS */
5417 {errno
= EINVAL
; return -1;}
5418 #endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS */
5419 if (x
== Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LIBS
)
5420 #ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
5421 {*r
= _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
; return 0;}
5422 #else /* def _CS_POSIX_V6_LPBIG_OFFBIG_LIBS */
5423 {errno
= EINVAL
; return -1;}
5424 #endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LIBS */
5425 if (x
== Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
)
5426 #ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
5427 {*r
= _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
; return 0;}
5428 #else /* def _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS */
5429 {errno
= EINVAL
; return -1;}
5430 #endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS */
5431 errno
= EINVAL
; return -1;
5434 int Mono_Posix_ToConfStr (int x
, int *r
)
5441 {*r
= Mono_Posix_ConfStr__CS_PATH
; return 0;}
5442 #endif /* ndef _CS_PATH */
5443 #ifdef _CS_V6_WIDTH_RESTRICTED_ENVS
5444 if (x
== _CS_V6_WIDTH_RESTRICTED_ENVS
)
5445 {*r
= Mono_Posix_ConfStr__CS_V6_WIDTH_RESTRICTED_ENVS
; return 0;}
5446 #endif /* ndef _CS_V6_WIDTH_RESTRICTED_ENVS */
5447 #ifdef _CS_GNU_LIBC_VERSION
5448 if (x
== _CS_GNU_LIBC_VERSION
)
5449 {*r
= Mono_Posix_ConfStr__CS_GNU_LIBC_VERSION
; return 0;}
5450 #endif /* ndef _CS_GNU_LIBC_VERSION */
5451 #ifdef _CS_GNU_LIBPTHREAD_VERSION
5452 if (x
== _CS_GNU_LIBPTHREAD_VERSION
)
5453 {*r
= Mono_Posix_ConfStr__CS_GNU_LIBPTHREAD_VERSION
; return 0;}
5454 #endif /* ndef _CS_GNU_LIBPTHREAD_VERSION */
5455 #ifdef _CS_LFS_CFLAGS
5456 if (x
== _CS_LFS_CFLAGS
)
5457 {*r
= Mono_Posix_ConfStr__CS_LFS_CFLAGS
; return 0;}
5458 #endif /* ndef _CS_LFS_CFLAGS */
5459 #ifdef _CS_LFS_LDFLAGS
5460 if (x
== _CS_LFS_LDFLAGS
)
5461 {*r
= Mono_Posix_ConfStr__CS_LFS_LDFLAGS
; return 0;}
5462 #endif /* ndef _CS_LFS_LDFLAGS */
5464 if (x
== _CS_LFS_LIBS
)
5465 {*r
= Mono_Posix_ConfStr__CS_LFS_LIBS
; return 0;}
5466 #endif /* ndef _CS_LFS_LIBS */
5467 #ifdef _CS_LFS_LINTFLAGS
5468 if (x
== _CS_LFS_LINTFLAGS
)
5469 {*r
= Mono_Posix_ConfStr__CS_LFS_LINTFLAGS
; return 0;}
5470 #endif /* ndef _CS_LFS_LINTFLAGS */
5471 #ifdef _CS_LFS64_CFLAGS
5472 if (x
== _CS_LFS64_CFLAGS
)
5473 {*r
= Mono_Posix_ConfStr__CS_LFS64_CFLAGS
; return 0;}
5474 #endif /* ndef _CS_LFS64_CFLAGS */
5475 #ifdef _CS_LFS64_LDFLAGS
5476 if (x
== _CS_LFS64_LDFLAGS
)
5477 {*r
= Mono_Posix_ConfStr__CS_LFS64_LDFLAGS
; return 0;}
5478 #endif /* ndef _CS_LFS64_LDFLAGS */
5479 #ifdef _CS_LFS64_LIBS
5480 if (x
== _CS_LFS64_LIBS
)
5481 {*r
= Mono_Posix_ConfStr__CS_LFS64_LIBS
; return 0;}
5482 #endif /* ndef _CS_LFS64_LIBS */
5483 #ifdef _CS_LFS64_LINTFLAGS
5484 if (x
== _CS_LFS64_LINTFLAGS
)
5485 {*r
= Mono_Posix_ConfStr__CS_LFS64_LINTFLAGS
; return 0;}
5486 #endif /* ndef _CS_LFS64_LINTFLAGS */
5487 #ifdef _CS_XBS5_ILP32_OFF32_CFLAGS
5488 if (x
== _CS_XBS5_ILP32_OFF32_CFLAGS
)
5489 {*r
= Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_CFLAGS
; return 0;}
5490 #endif /* ndef _CS_XBS5_ILP32_OFF32_CFLAGS */
5491 #ifdef _CS_XBS5_ILP32_OFF32_LDFLAGS
5492 if (x
== _CS_XBS5_ILP32_OFF32_LDFLAGS
)
5493 {*r
= Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LDFLAGS
; return 0;}
5494 #endif /* ndef _CS_XBS5_ILP32_OFF32_LDFLAGS */
5495 #ifdef _CS_XBS5_ILP32_OFF32_LIBS
5496 if (x
== _CS_XBS5_ILP32_OFF32_LIBS
)
5497 {*r
= Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LIBS
; return 0;}
5498 #endif /* ndef _CS_XBS5_ILP32_OFF32_LIBS */
5499 #ifdef _CS_XBS5_ILP32_OFF32_LINTFLAGS
5500 if (x
== _CS_XBS5_ILP32_OFF32_LINTFLAGS
)
5501 {*r
= Mono_Posix_ConfStr__CS_XBS5_ILP32_OFF32_LINTFLAGS
; return 0;}
5502 #endif /* ndef _CS_XBS5_ILP32_OFF32_LINTFLAGS */
5503 #ifdef _CS_XBS5_ILP32_OFFBIG_CFLAGS
5504 if (x
== _CS_XBS5_ILP32_OFFBIG_CFLAGS
)
5505 {*r
= Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_CFLAGS
; return 0;}
5506 #endif /* ndef _CS_XBS5_ILP32_OFFBIG_CFLAGS */
5507 #ifdef _CS_XBS5_ILP32_OFFBIG_LDFLAGS
5508 if (x
== _CS_XBS5_ILP32_OFFBIG_LDFLAGS
)
5509 {*r
= Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LDFLAGS
; return 0;}
5510 #endif /* ndef _CS_XBS5_ILP32_OFFBIG_LDFLAGS */
5511 #ifdef _CS_XBS5_ILP32_OFFBIG_LIBS
5512 if (x
== _CS_XBS5_ILP32_OFFBIG_LIBS
)
5513 {*r
= Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LIBS
; return 0;}
5514 #endif /* ndef _CS_XBS5_ILP32_OFFBIG_LIBS */
5515 #ifdef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
5516 if (x
== _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
)
5517 {*r
= Mono_Posix_ConfStr__CS_XBS5_ILP32_OFFBIG_LINTFLAGS
; return 0;}
5518 #endif /* ndef _CS_XBS5_ILP32_OFFBIG_LINTFLAGS */
5519 #ifdef _CS_XBS5_LP64_OFF64_CFLAGS
5520 if (x
== _CS_XBS5_LP64_OFF64_CFLAGS
)
5521 {*r
= Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_CFLAGS
; return 0;}
5522 #endif /* ndef _CS_XBS5_LP64_OFF64_CFLAGS */
5523 #ifdef _CS_XBS5_LP64_OFF64_LDFLAGS
5524 if (x
== _CS_XBS5_LP64_OFF64_LDFLAGS
)
5525 {*r
= Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LDFLAGS
; return 0;}
5526 #endif /* ndef _CS_XBS5_LP64_OFF64_LDFLAGS */
5527 #ifdef _CS_XBS5_LP64_OFF64_LIBS
5528 if (x
== _CS_XBS5_LP64_OFF64_LIBS
)
5529 {*r
= Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LIBS
; return 0;}
5530 #endif /* ndef _CS_XBS5_LP64_OFF64_LIBS */
5531 #ifdef _CS_XBS5_LP64_OFF64_LINTFLAGS
5532 if (x
== _CS_XBS5_LP64_OFF64_LINTFLAGS
)
5533 {*r
= Mono_Posix_ConfStr__CS_XBS5_LP64_OFF64_LINTFLAGS
; return 0;}
5534 #endif /* ndef _CS_XBS5_LP64_OFF64_LINTFLAGS */
5535 #ifdef _CS_XBS5_LPBIG_OFFBIG_CFLAGS
5536 if (x
== _CS_XBS5_LPBIG_OFFBIG_CFLAGS
)
5537 {*r
= Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_CFLAGS
; return 0;}
5538 #endif /* ndef _CS_XBS5_LPBIG_OFFBIG_CFLAGS */
5539 #ifdef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
5540 if (x
== _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
)
5541 {*r
= Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LDFLAGS
; return 0;}
5542 #endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LDFLAGS */
5543 #ifdef _CS_XBS5_LPBIG_OFFBIG_LIBS
5544 if (x
== _CS_XBS5_LPBIG_OFFBIG_LIBS
)
5545 {*r
= Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LIBS
; return 0;}
5546 #endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LIBS */
5547 #ifdef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
5548 if (x
== _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
)
5549 {*r
= Mono_Posix_ConfStr__CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
; return 0;}
5550 #endif /* ndef _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS */
5551 #ifdef _CS_POSIX_V6_ILP32_OFF32_CFLAGS
5552 if (x
== _CS_POSIX_V6_ILP32_OFF32_CFLAGS
)
5553 {*r
= Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_CFLAGS
; return 0;}
5554 #endif /* ndef _CS_POSIX_V6_ILP32_OFF32_CFLAGS */
5555 #ifdef _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
5556 if (x
== _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
)
5557 {*r
= Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LDFLAGS
; return 0;}
5558 #endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LDFLAGS */
5559 #ifdef _CS_POSIX_V6_ILP32_OFF32_LIBS
5560 if (x
== _CS_POSIX_V6_ILP32_OFF32_LIBS
)
5561 {*r
= Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LIBS
; return 0;}
5562 #endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LIBS */
5563 #ifdef _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
5564 if (x
== _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
)
5565 {*r
= Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
; return 0;}
5566 #endif /* ndef _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS */
5567 #ifdef _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
5568 if (x
== _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
)
5569 {*r
= Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
; return 0;}
5570 #endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS */
5571 #ifdef _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
5572 if (x
== _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
)
5573 {*r
= Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
; return 0;}
5574 #endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS */
5575 #ifdef _CS_POSIX_V6_ILP32_OFFBIG_LIBS
5576 if (x
== _CS_POSIX_V6_ILP32_OFFBIG_LIBS
)
5577 {*r
= Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LIBS
; return 0;}
5578 #endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LIBS */
5579 #ifdef _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
5580 if (x
== _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
)
5581 {*r
= Mono_Posix_ConfStr__CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
; return 0;}
5582 #endif /* ndef _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS */
5583 #ifdef _CS_POSIX_V6_LP64_OFF64_CFLAGS
5584 if (x
== _CS_POSIX_V6_LP64_OFF64_CFLAGS
)
5585 {*r
= Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_CFLAGS
; return 0;}
5586 #endif /* ndef _CS_POSIX_V6_LP64_OFF64_CFLAGS */
5587 #ifdef _CS_POSIX_V6_LP64_OFF64_LDFLAGS
5588 if (x
== _CS_POSIX_V6_LP64_OFF64_LDFLAGS
)
5589 {*r
= Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LDFLAGS
; return 0;}
5590 #endif /* ndef _CS_POSIX_V6_LP64_OFF64_LDFLAGS */
5591 #ifdef _CS_POSIX_V6_LP64_OFF64_LIBS
5592 if (x
== _CS_POSIX_V6_LP64_OFF64_LIBS
)
5593 {*r
= Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LIBS
; return 0;}
5594 #endif /* ndef _CS_POSIX_V6_LP64_OFF64_LIBS */
5595 #ifdef _CS_POSIX_V6_LP64_OFF64_LINTFLAGS
5596 if (x
== _CS_POSIX_V6_LP64_OFF64_LINTFLAGS
)
5597 {*r
= Mono_Posix_ConfStr__CS_POSIX_V6_LP64_OFF64_LINTFLAGS
; return 0;}
5598 #endif /* ndef _CS_POSIX_V6_LP64_OFF64_LINTFLAGS */
5599 #ifdef _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
5600 if (x
== _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
)
5601 {*r
= Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
; return 0;}
5602 #endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS */
5603 #ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
5604 if (x
== _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
)
5605 {*r
= Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
; return 0;}
5606 #endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS */
5607 #ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
5608 if (x
== _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
)
5609 {*r
= Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LIBS
; return 0;}
5610 #endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LIBS */
5611 #ifdef _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
5612 if (x
== _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
)
5613 {*r
= Mono_Posix_ConfStr__CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
; return 0;}
5614 #endif /* ndef _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS */
5615 errno
= EINVAL
; return -1;
5618 int Mono_Posix_FromLockFlags (int x
, int *r
)
5623 if (x
== Mono_Posix_LockFlags_F_ULOCK
)
5625 {*r
= F_ULOCK
; return 0;}
5626 #else /* def F_ULOCK */
5627 {errno
= EINVAL
; return -1;}
5628 #endif /* ndef F_ULOCK */
5629 if (x
== Mono_Posix_LockFlags_F_LOCK
)
5631 {*r
= F_LOCK
; return 0;}
5632 #else /* def F_LOCK */
5633 {errno
= EINVAL
; return -1;}
5634 #endif /* ndef F_LOCK */
5635 if (x
== Mono_Posix_LockFlags_F_TLOCK
)
5637 {*r
= F_TLOCK
; return 0;}
5638 #else /* def F_TLOCK */
5639 {errno
= EINVAL
; return -1;}
5640 #endif /* ndef F_TLOCK */
5641 if (x
== Mono_Posix_LockFlags_F_TEST
)
5643 {*r
= F_TEST
; return 0;}
5644 #else /* def F_TEST */
5645 {errno
= EINVAL
; return -1;}
5646 #endif /* ndef F_TEST */
5647 errno
= EINVAL
; return -1;
5650 int Mono_Posix_ToLockFlags (int x
, int *r
)
5657 {*r
= Mono_Posix_LockFlags_F_ULOCK
; return 0;}
5658 #endif /* ndef F_ULOCK */
5661 {*r
= Mono_Posix_LockFlags_F_LOCK
; return 0;}
5662 #endif /* ndef F_LOCK */
5665 {*r
= Mono_Posix_LockFlags_F_TLOCK
; return 0;}
5666 #endif /* ndef F_TLOCK */
5669 {*r
= Mono_Posix_LockFlags_F_TEST
; return 0;}
5670 #endif /* ndef F_TEST */
5671 errno
= EINVAL
; return -1;
5674 int Mono_Posix_FromPollEvents (short x
, short *r
)
5679 if ((x
& Mono_Posix_PollEvents_POLLIN
) == Mono_Posix_PollEvents_POLLIN
)
5682 #else /* def POLLIN */
5683 {errno
= EINVAL
; return -1;}
5684 #endif /* ndef POLLIN */
5685 if ((x
& Mono_Posix_PollEvents_POLLPRI
) == Mono_Posix_PollEvents_POLLPRI
)
5688 #else /* def POLLPRI */
5689 {errno
= EINVAL
; return -1;}
5690 #endif /* ndef POLLPRI */
5691 if ((x
& Mono_Posix_PollEvents_POLLOUT
) == Mono_Posix_PollEvents_POLLOUT
)
5694 #else /* def POLLOUT */
5695 {errno
= EINVAL
; return -1;}
5696 #endif /* ndef POLLOUT */
5697 if ((x
& Mono_Posix_PollEvents_POLLERR
) == Mono_Posix_PollEvents_POLLERR
)
5700 #else /* def POLLERR */
5701 {errno
= EINVAL
; return -1;}
5702 #endif /* ndef POLLERR */
5703 if ((x
& Mono_Posix_PollEvents_POLLHUP
) == Mono_Posix_PollEvents_POLLHUP
)
5706 #else /* def POLLHUP */
5707 {errno
= EINVAL
; return -1;}
5708 #endif /* ndef POLLHUP */
5709 if ((x
& Mono_Posix_PollEvents_POLLNVAL
) == Mono_Posix_PollEvents_POLLNVAL
)
5712 #else /* def POLLNVAL */
5713 {errno
= EINVAL
; return -1;}
5714 #endif /* ndef POLLNVAL */
5715 if ((x
& Mono_Posix_PollEvents_POLLRDNORM
) == Mono_Posix_PollEvents_POLLRDNORM
)
5718 #else /* def POLLRDNORM */
5719 {errno
= EINVAL
; return -1;}
5720 #endif /* ndef POLLRDNORM */
5721 if ((x
& Mono_Posix_PollEvents_POLLRDBAND
) == Mono_Posix_PollEvents_POLLRDBAND
)
5724 #else /* def POLLRDBAND */
5725 {errno
= EINVAL
; return -1;}
5726 #endif /* ndef POLLRDBAND */
5727 if ((x
& Mono_Posix_PollEvents_POLLWRNORM
) == Mono_Posix_PollEvents_POLLWRNORM
)
5730 #else /* def POLLWRNORM */
5731 {errno
= EINVAL
; return -1;}
5732 #endif /* ndef POLLWRNORM */
5733 if ((x
& Mono_Posix_PollEvents_POLLWRBAND
) == Mono_Posix_PollEvents_POLLWRBAND
)
5736 #else /* def POLLWRBAND */
5737 {errno
= EINVAL
; return -1;}
5738 #endif /* ndef POLLWRBAND */
5742 int Mono_Posix_ToPollEvents (short x
, short *r
)
5748 if ((x
& POLLIN
) == POLLIN
)
5749 *r
|= Mono_Posix_PollEvents_POLLIN
;
5750 #endif /* ndef POLLIN */
5752 if ((x
& POLLPRI
) == POLLPRI
)
5753 *r
|= Mono_Posix_PollEvents_POLLPRI
;
5754 #endif /* ndef POLLPRI */
5756 if ((x
& POLLOUT
) == POLLOUT
)
5757 *r
|= Mono_Posix_PollEvents_POLLOUT
;
5758 #endif /* ndef POLLOUT */
5760 if ((x
& POLLERR
) == POLLERR
)
5761 *r
|= Mono_Posix_PollEvents_POLLERR
;
5762 #endif /* ndef POLLERR */
5764 if ((x
& POLLHUP
) == POLLHUP
)
5765 *r
|= Mono_Posix_PollEvents_POLLHUP
;
5766 #endif /* ndef POLLHUP */
5768 if ((x
& POLLNVAL
) == POLLNVAL
)
5769 *r
|= Mono_Posix_PollEvents_POLLNVAL
;
5770 #endif /* ndef POLLNVAL */
5772 if ((x
& POLLRDNORM
) == POLLRDNORM
)
5773 *r
|= Mono_Posix_PollEvents_POLLRDNORM
;
5774 #endif /* ndef POLLRDNORM */
5776 if ((x
& POLLRDBAND
) == POLLRDBAND
)
5777 *r
|= Mono_Posix_PollEvents_POLLRDBAND
;
5778 #endif /* ndef POLLRDBAND */
5780 if ((x
& POLLWRNORM
) == POLLWRNORM
)
5781 *r
|= Mono_Posix_PollEvents_POLLWRNORM
;
5782 #endif /* ndef POLLWRNORM */
5784 if ((x
& POLLWRBAND
) == POLLWRBAND
)
5785 *r
|= Mono_Posix_PollEvents_POLLWRBAND
;
5786 #endif /* ndef POLLWRBAND */