poll_linux_386.go (23469B)
1 // Code generated by 'ccgo poll/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -o poll/poll_linux_386.go -pkgname poll', DO NOT EDIT. 2 3 package poll 4 5 import ( 6 "math" 7 "reflect" 8 "sync/atomic" 9 "unsafe" 10 ) 11 12 var _ = math.Pi 13 var _ reflect.Kind 14 var _ atomic.Value 15 var _ unsafe.Pointer 16 17 const ( 18 POLLERR = 0x008 19 POLLHUP = 0x010 20 POLLIN = 0x001 21 POLLNVAL = 0x020 22 POLLOUT = 0x004 23 POLLPRI = 0x002 24 POLLRDBAND = 0x080 25 POLLRDNORM = 0x040 26 POLLWRBAND = 0x200 27 POLLWRNORM = 0x100 28 X_ATFILE_SOURCE = 1 29 X_DEFAULT_SOURCE = 1 30 X_FEATURES_H = 1 31 X_FILE_OFFSET_BITS = 64 32 X_ILP32 = 1 33 X_POSIX_C_SOURCE = 200809 34 X_POSIX_SOURCE = 1 35 X_STDC_PREDEF_H = 1 36 X_SYS_CDEFS_H = 1 37 X_SYS_POLL_H = 1 38 I386 = 1 39 Linux = 1 40 Unix = 1 41 ) 42 43 type Ptrdiff_t = int32 /* <builtin>:3:26 */ 44 45 type Size_t = uint32 /* <builtin>:9:23 */ 46 47 type Wchar_t = int32 /* <builtin>:15:24 */ 48 49 type X__builtin_va_list = uintptr /* <builtin>:46:14 */ 50 type X__float128 = float64 /* <builtin>:47:21 */ 51 52 // Compatibility definitions for System V `poll' interface. 53 // Copyright (C) 1994-2020 Free Software Foundation, Inc. 54 // This file is part of the GNU C Library. 55 // 56 // The GNU C Library is free software; you can redistribute it and/or 57 // modify it under the terms of the GNU Lesser General Public 58 // License as published by the Free Software Foundation; either 59 // version 2.1 of the License, or (at your option) any later version. 60 // 61 // The GNU C Library is distributed in the hope that it will be useful, 62 // but WITHOUT ANY WARRANTY; without even the implied warranty of 63 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 64 // Lesser General Public License for more details. 65 // 66 // You should have received a copy of the GNU Lesser General Public 67 // License along with the GNU C Library; if not, see 68 // <https://www.gnu.org/licenses/>. 69 70 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 71 // This file is part of the GNU C Library. 72 // 73 // The GNU C Library is free software; you can redistribute it and/or 74 // modify it under the terms of the GNU Lesser General Public 75 // License as published by the Free Software Foundation; either 76 // version 2.1 of the License, or (at your option) any later version. 77 // 78 // The GNU C Library is distributed in the hope that it will be useful, 79 // but WITHOUT ANY WARRANTY; without even the implied warranty of 80 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 81 // Lesser General Public License for more details. 82 // 83 // You should have received a copy of the GNU Lesser General Public 84 // License along with the GNU C Library; if not, see 85 // <https://www.gnu.org/licenses/>. 86 87 // These are defined by the user (or the compiler) 88 // to specify the desired environment: 89 // 90 // __STRICT_ANSI__ ISO Standard C. 91 // _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. 92 // _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. 93 // _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X. 94 // __STDC_WANT_LIB_EXT2__ 95 // Extensions to ISO C99 from TR 27431-2:2010. 96 // __STDC_WANT_IEC_60559_BFP_EXT__ 97 // Extensions to ISO C11 from TS 18661-1:2014. 98 // __STDC_WANT_IEC_60559_FUNCS_EXT__ 99 // Extensions to ISO C11 from TS 18661-4:2015. 100 // __STDC_WANT_IEC_60559_TYPES_EXT__ 101 // Extensions to ISO C11 from TS 18661-3:2015. 102 // 103 // _POSIX_SOURCE IEEE Std 1003.1. 104 // _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; 105 // if >=199309L, add IEEE Std 1003.1b-1993; 106 // if >=199506L, add IEEE Std 1003.1c-1995; 107 // if >=200112L, all of IEEE 1003.1-2004 108 // if >=200809L, all of IEEE 1003.1-2008 109 // _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if 110 // Single Unix conformance is wanted, to 600 for the 111 // sixth revision, to 700 for the seventh revision. 112 // _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. 113 // _LARGEFILE_SOURCE Some more functions for correct standard I/O. 114 // _LARGEFILE64_SOURCE Additional functionality from LFS for large files. 115 // _FILE_OFFSET_BITS=N Select default filesystem interface. 116 // _ATFILE_SOURCE Additional *at interfaces. 117 // _GNU_SOURCE All of the above, plus GNU extensions. 118 // _DEFAULT_SOURCE The default set of features (taking precedence over 119 // __STRICT_ANSI__). 120 // 121 // _FORTIFY_SOURCE Add security hardening to many library functions. 122 // Set to 1 or 2; 2 performs stricter checks than 1. 123 // 124 // _REENTRANT, _THREAD_SAFE 125 // Obsolete; equivalent to _POSIX_C_SOURCE=199506L. 126 // 127 // The `-ansi' switch to the GNU C compiler, and standards conformance 128 // options such as `-std=c99', define __STRICT_ANSI__. If none of 129 // these are defined, or if _DEFAULT_SOURCE is defined, the default is 130 // to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to 131 // 200809L, as well as enabling miscellaneous functions from BSD and 132 // SVID. If more than one of these are defined, they accumulate. For 133 // example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together 134 // give you ISO C, 1003.1, and 1003.2, but nothing else. 135 // 136 // These are defined by this file and are used by the 137 // header files to decide what to declare or define: 138 // 139 // __GLIBC_USE (F) Define things from feature set F. This is defined 140 // to 1 or 0; the subsequent macros are either defined 141 // or undefined, and those tests should be moved to 142 // __GLIBC_USE. 143 // __USE_ISOC11 Define ISO C11 things. 144 // __USE_ISOC99 Define ISO C99 things. 145 // __USE_ISOC95 Define ISO C90 AMD1 (C95) things. 146 // __USE_ISOCXX11 Define ISO C++11 things. 147 // __USE_POSIX Define IEEE Std 1003.1 things. 148 // __USE_POSIX2 Define IEEE Std 1003.2 things. 149 // __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. 150 // __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. 151 // __USE_XOPEN Define XPG things. 152 // __USE_XOPEN_EXTENDED Define X/Open Unix things. 153 // __USE_UNIX98 Define Single Unix V2 things. 154 // __USE_XOPEN2K Define XPG6 things. 155 // __USE_XOPEN2KXSI Define XPG6 XSI things. 156 // __USE_XOPEN2K8 Define XPG7 things. 157 // __USE_XOPEN2K8XSI Define XPG7 XSI things. 158 // __USE_LARGEFILE Define correct standard I/O things. 159 // __USE_LARGEFILE64 Define LFS things with separate names. 160 // __USE_FILE_OFFSET64 Define 64bit interface as default. 161 // __USE_MISC Define things from 4.3BSD or System V Unix. 162 // __USE_ATFILE Define *at interfaces and AT_* constants for them. 163 // __USE_GNU Define GNU extensions. 164 // __USE_FORTIFY_LEVEL Additional security measures used, according to level. 165 // 166 // The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are 167 // defined by this file unconditionally. `__GNU_LIBRARY__' is provided 168 // only for compatibility. All new code should use the other symbols 169 // to test for features. 170 // 171 // All macros listed above as possibly being defined by this file are 172 // explicitly undefined if they are not explicitly defined. 173 // Feature-test macros that are not defined by the user or compiler 174 // but are implied by the other feature-test macros defined (or by the 175 // lack of any definitions) are defined by the file. 176 // 177 // ISO C feature test macros depend on the definition of the macro 178 // when an affected header is included, not when the first system 179 // header is included, and so they are handled in 180 // <bits/libc-header-start.h>, which does not have a multiple include 181 // guard. Feature test macros that can be handled from the first 182 // system header included are handled here. 183 184 // Undefine everything, so we get a clean slate. 185 186 // Suppress kernel-name space pollution unless user expressedly asks 187 // for it. 188 189 // Convenience macro to test the version of gcc. 190 // Use like this: 191 // #if __GNUC_PREREQ (2,8) 192 // ... code requiring gcc 2.8 or later ... 193 // #endif 194 // Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was 195 // added in 2.0. 196 197 // Similarly for clang. Features added to GCC after version 4.2 may 198 // or may not also be available in clang, and clang's definitions of 199 // __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such 200 // features can be queried via __has_extension/__has_feature. 201 202 // Whether to use feature set F. 203 204 // _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for 205 // _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not 206 // issue a warning; the expectation is that the source is being 207 // transitioned to use the new macro. 208 209 // If _GNU_SOURCE was defined by the user, turn on all the other features. 210 211 // If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, 212 // define _DEFAULT_SOURCE. 213 214 // This is to enable the ISO C2X extension. 215 216 // This is to enable the ISO C11 extension. 217 218 // This is to enable the ISO C99 extension. 219 220 // This is to enable the ISO C90 Amendment 1:1995 extension. 221 222 // If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE 223 // is defined, use POSIX.1-2008 (or another version depending on 224 // _XOPEN_SOURCE). 225 226 // Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be 227 // defined in all multithreaded code. GNU libc has not required this 228 // for many years. We now treat them as compatibility synonyms for 229 // _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with 230 // comprehensive support for multithreaded code. Using them never 231 // lowers the selected level of POSIX conformance, only raises it. 232 233 // The function 'gets' existed in C89, but is impossible to use 234 // safely. It has been removed from ISO C11 and ISO C++14. Note: for 235 // compatibility with various implementations of <cstdio>, this test 236 // must consider only the value of __cplusplus when compiling C++. 237 238 // GNU formerly extended the scanf functions with modified format 239 // specifiers %as, %aS, and %a[...] that allocate a buffer for the 240 // input using malloc. This extension conflicts with ISO C99, which 241 // defines %a as a standalone format specifier that reads a floating- 242 // point number; moreover, POSIX.1-2008 provides the same feature 243 // using the modifier letter 'm' instead (%ms, %mS, %m[...]). 244 // 245 // We now follow C99 unless GNU extensions are active and the compiler 246 // is specifically in C89 or C++98 mode (strict or not). For 247 // instance, with GCC, -std=gnu11 will have C99-compliant scanf with 248 // or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the 249 // old extension. 250 251 // Get definitions of __STDC_* predefined macros, if the compiler has 252 // not preincluded this header automatically. 253 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 254 // This file is part of the GNU C Library. 255 // 256 // The GNU C Library is free software; you can redistribute it and/or 257 // modify it under the terms of the GNU Lesser General Public 258 // License as published by the Free Software Foundation; either 259 // version 2.1 of the License, or (at your option) any later version. 260 // 261 // The GNU C Library is distributed in the hope that it will be useful, 262 // but WITHOUT ANY WARRANTY; without even the implied warranty of 263 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 264 // Lesser General Public License for more details. 265 // 266 // You should have received a copy of the GNU Lesser General Public 267 // License along with the GNU C Library; if not, see 268 // <https://www.gnu.org/licenses/>. 269 270 // This macro indicates that the installed library is the GNU C Library. 271 // For historic reasons the value now is 6 and this will stay from now 272 // on. The use of this variable is deprecated. Use __GLIBC__ and 273 // __GLIBC_MINOR__ now (see below) when you want to test for a specific 274 // GNU C library version and use the values in <gnu/lib-names.h> to get 275 // the sonames of the shared libraries. 276 277 // Major and minor version number of the GNU C library package. Use 278 // these macros to test for features in specific releases. 279 280 // This is here only because every header file already includes this one. 281 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 282 // This file is part of the GNU C Library. 283 // 284 // The GNU C Library is free software; you can redistribute it and/or 285 // modify it under the terms of the GNU Lesser General Public 286 // License as published by the Free Software Foundation; either 287 // version 2.1 of the License, or (at your option) any later version. 288 // 289 // The GNU C Library is distributed in the hope that it will be useful, 290 // but WITHOUT ANY WARRANTY; without even the implied warranty of 291 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 292 // Lesser General Public License for more details. 293 // 294 // You should have received a copy of the GNU Lesser General Public 295 // License along with the GNU C Library; if not, see 296 // <https://www.gnu.org/licenses/>. 297 298 // We are almost always included from features.h. 299 300 // The GNU libc does not support any K&R compilers or the traditional mode 301 // of ISO C compilers anymore. Check for some of the combinations not 302 // anymore supported. 303 304 // Some user header file might have defined this before. 305 306 // All functions, except those with callbacks or those that 307 // synchronize memory, are leaf functions. 308 309 // GCC can always grok prototypes. For C++ programs we add throw() 310 // to help it optimize the function calls. But this works only with 311 // gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions 312 // as non-throwing using a function attribute since programs can use 313 // the -fexceptions options for C code as well. 314 315 // Compilers that are not clang may object to 316 // #if defined __clang__ && __has_extension(...) 317 // even though they do not need to evaluate the right-hand side of the &&. 318 319 // These two macros are not used in glibc anymore. They are kept here 320 // only because some other projects expect the macros to be defined. 321 322 // For these things, GCC behaves the ANSI way normally, 323 // and the non-ANSI way under -traditional. 324 325 // This is not a typedef so `const __ptr_t' does the right thing. 326 327 // C++ needs to know that types and declarations are C, not C++. 328 329 // Fortify support. 330 331 // Support for flexible arrays. 332 // Headers that should use flexible arrays only if they're "real" 333 // (e.g. only if they won't affect sizeof()) should test 334 // #if __glibc_c99_flexarr_available. 335 336 // __asm__ ("xyz") is used throughout the headers to rename functions 337 // at the assembly language level. This is wrapped by the __REDIRECT 338 // macro, in order to support compilers that can do this some other 339 // way. When compilers don't support asm-names at all, we have to do 340 // preprocessor tricks instead (which don't have exactly the right 341 // semantics, but it's the best we can do). 342 // 343 // Example: 344 // int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); 345 346 // 347 // #elif __SOME_OTHER_COMPILER__ 348 // 349 // # define __REDIRECT(name, proto, alias) name proto; _Pragma("let " #name " = " #alias) 350 351 // GCC has various useful declarations that can be made with the 352 // `__attribute__' syntax. All of the ways we use this do fine if 353 // they are omitted for compilers that don't understand it. 354 355 // At some point during the gcc 2.96 development the `malloc' attribute 356 // for functions was introduced. We don't want to use it unconditionally 357 // (although this would be possible) since it generates warnings. 358 359 // Tell the compiler which arguments to an allocation function 360 // indicate the size of the allocation. 361 362 // At some point during the gcc 2.96 development the `pure' attribute 363 // for functions was introduced. We don't want to use it unconditionally 364 // (although this would be possible) since it generates warnings. 365 366 // This declaration tells the compiler that the value is constant. 367 368 // At some point during the gcc 3.1 development the `used' attribute 369 // for functions was introduced. We don't want to use it unconditionally 370 // (although this would be possible) since it generates warnings. 371 372 // Since version 3.2, gcc allows marking deprecated functions. 373 374 // Since version 4.5, gcc also allows one to specify the message printed 375 // when a deprecated function is used. clang claims to be gcc 4.2, but 376 // may also support this feature. 377 378 // At some point during the gcc 2.8 development the `format_arg' attribute 379 // for functions was introduced. We don't want to use it unconditionally 380 // (although this would be possible) since it generates warnings. 381 // If several `format_arg' attributes are given for the same function, in 382 // gcc-3.0 and older, all but the last one are ignored. In newer gccs, 383 // all designated arguments are considered. 384 385 // At some point during the gcc 2.97 development the `strfmon' format 386 // attribute for functions was introduced. We don't want to use it 387 // unconditionally (although this would be possible) since it 388 // generates warnings. 389 390 // The nonull function attribute allows to mark pointer parameters which 391 // must not be NULL. 392 393 // If fortification mode, we warn about unused results of certain 394 // function calls which can lead to problems. 395 396 // Forces a function to be always inlined. 397 // The Linux kernel defines __always_inline in stddef.h (283d7573), and 398 // it conflicts with this definition. Therefore undefine it first to 399 // allow either header to be included first. 400 401 // Associate error messages with the source location of the call site rather 402 // than with the source location inside the function. 403 404 // GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 405 // inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ 406 // or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions 407 // older than 4.3 may define these macros and still not guarantee GNU inlining 408 // semantics. 409 // 410 // clang++ identifies itself as gcc-4.2, but has support for GNU inlining 411 // semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and 412 // __GNUC_GNU_INLINE__ macro definitions. 413 414 // GCC 4.3 and above allow passing all anonymous arguments of an 415 // __extern_always_inline function to some other vararg function. 416 417 // It is possible to compile containing GCC extensions even if GCC is 418 // run in pedantic mode if the uses are carefully marked using the 419 // `__extension__' keyword. But this is not generally available before 420 // version 2.8. 421 422 // __restrict is known in EGCS 1.2 and above. 423 424 // ISO C99 also allows to declare arrays as non-overlapping. The syntax is 425 // array_name[restrict] 426 // GCC 3.1 supports this. 427 428 // Describes a char array whose address can safely be passed as the first 429 // argument to strncpy and strncat, as the char array is not necessarily 430 // a NUL-terminated string. 431 432 // Undefine (also defined in libc-symbols.h). 433 // Copies attributes from the declaration or type referenced by 434 // the argument. 435 436 // Determine the wordsize from the preprocessor defines. 437 438 // Properties of long double type. ldbl-96 version. 439 // Copyright (C) 2016-2020 Free Software Foundation, Inc. 440 // This file is part of the GNU C Library. 441 // 442 // The GNU C Library is free software; you can redistribute it and/or 443 // modify it under the terms of the GNU Lesser General Public 444 // License published by the Free Software Foundation; either 445 // version 2.1 of the License, or (at your option) any later version. 446 // 447 // The GNU C Library is distributed in the hope that it will be useful, 448 // but WITHOUT ANY WARRANTY; without even the implied warranty of 449 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 450 // Lesser General Public License for more details. 451 // 452 // You should have received a copy of the GNU Lesser General Public 453 // License along with the GNU C Library; if not, see 454 // <https://www.gnu.org/licenses/>. 455 456 // long double is distinct from double, so there is nothing to 457 // define here. 458 459 // __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is 460 // intended for use in preprocessor macros. 461 // 462 // Note: MESSAGE must be a _single_ string; concatenation of string 463 // literals is not supported. 464 465 // Generic selection (ISO C11) is a C-only feature, available in GCC 466 // since version 4.9. Previous versions do not provide generic 467 // selection, even though they might set __STDC_VERSION__ to 201112L, 468 // when in -std=c11 mode. Thus, we must check for !defined __GNUC__ 469 // when testing __STDC_VERSION__ for generic selection support. 470 // On the other hand, Clang also defines __GNUC__, so a clang-specific 471 // check is required to enable the use of generic selection. 472 473 // If we don't have __REDIRECT, prototypes will be missing if 474 // __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. 475 476 // Decide whether we can define 'extern inline' functions in headers. 477 478 // This is here only because every header file already includes this one. 479 // Get the definitions of all the appropriate `__stub_FUNCTION' symbols. 480 // <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub 481 // that will always return failure (and set errno to ENOSYS). 482 // This file is automatically generated. 483 // This file selects the right generated file of `__stub_FUNCTION' macros 484 // based on the architecture being compiled for. 485 486 // This file is automatically generated. 487 // It defines a symbol `__stub_FUNCTION' for each function 488 // in the C library which is a stub, meaning it will fail 489 // every time called, usually setting errno to ENOSYS. 490 491 // Get the platform dependent bits of `poll'. 492 // Copyright (C) 1997-2020 Free Software Foundation, Inc. 493 // This file is part of the GNU C Library. 494 // 495 // The GNU C Library is free software; you can redistribute it and/or 496 // modify it under the terms of the GNU Lesser General Public 497 // License as published by the Free Software Foundation; either 498 // version 2.1 of the License, or (at your option) any later version. 499 // 500 // The GNU C Library is distributed in the hope that it will be useful, 501 // but WITHOUT ANY WARRANTY; without even the implied warranty of 502 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 503 // Lesser General Public License for more details. 504 // 505 // You should have received a copy of the GNU Lesser General Public 506 // License along with the GNU C Library; if not, see 507 // <https://www.gnu.org/licenses/>. 508 509 // Event types that can be polled for. These bits may be set in `events' 510 // to indicate the interesting event types; they will appear in `revents' 511 // to indicate the status of the file descriptor. 512 513 // These values are defined in XPG4.2. 514 515 // Event types always implicitly polled for. These bits need not be set in 516 // `events', but they will appear in `revents' to indicate the status of 517 // the file descriptor. 518 519 // Type used for the number of file descriptors. 520 type Nfds_t = uint32 /* poll.h:33:27 */ 521 522 // Data structure describing a polling request. 523 type Pollfd = struct { 524 Ffd int32 525 Fevents int16 526 Frevents int16 527 } /* poll.h:36:1 */ 528 529 // Define some inlines helping to catch common problems. 530 531 var _ int8 /* gen.c:2:13: */