github.com/afumu/libc@v0.0.6/sys/socket/socket_linux_s390x.go (about) 1 // Code generated by 'ccgo sys/socket/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 sys/socket/socket_linux_s390x.go -pkgname socket', DO NOT EDIT. 2 3 package socket 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 AF_ALG = 38 19 AF_APPLETALK = 5 20 AF_ASH = 18 21 AF_ATMPVC = 8 22 AF_ATMSVC = 20 23 AF_AX25 = 3 24 AF_BLUETOOTH = 31 25 AF_BRIDGE = 7 26 AF_CAIF = 37 27 AF_CAN = 29 28 AF_DECnet = 12 29 AF_ECONET = 19 30 AF_FILE = 1 31 AF_IB = 27 32 AF_IEEE802154 = 36 33 AF_INET = 2 34 AF_INET6 = 10 35 AF_IPX = 4 36 AF_IRDA = 23 37 AF_ISDN = 34 38 AF_IUCV = 32 39 AF_KCM = 41 40 AF_KEY = 15 41 AF_LLC = 26 42 AF_LOCAL = 1 43 AF_MAX = 45 44 AF_MPLS = 28 45 AF_NETBEUI = 13 46 AF_NETLINK = 16 47 AF_NETROM = 6 48 AF_NFC = 39 49 AF_PACKET = 17 50 AF_PHONET = 35 51 AF_PPPOX = 24 52 AF_QIPCRTR = 42 53 AF_RDS = 21 54 AF_ROSE = 11 55 AF_ROUTE = 16 56 AF_RXRPC = 33 57 AF_SECURITY = 14 58 AF_SMC = 43 59 AF_SNA = 22 60 AF_TIPC = 30 61 AF_UNIX = 1 62 AF_UNSPEC = 0 63 AF_VSOCK = 40 64 AF_WANPIPE = 25 65 AF_X25 = 9 66 AF_XDP = 44 67 BIG_ENDIAN = 4321 68 BYTE_ORDER = 4321 69 FD_SETSIZE = 1024 70 FIOGETOWN = 0x8903 71 FIOSETOWN = 0x8901 72 LITTLE_ENDIAN = 1234 73 PDP_ENDIAN = 3412 74 PF_ALG = 38 75 PF_APPLETALK = 5 76 PF_ASH = 18 77 PF_ATMPVC = 8 78 PF_ATMSVC = 20 79 PF_AX25 = 3 80 PF_BLUETOOTH = 31 81 PF_BRIDGE = 7 82 PF_CAIF = 37 83 PF_CAN = 29 84 PF_DECnet = 12 85 PF_ECONET = 19 86 PF_FILE = 1 87 PF_IB = 27 88 PF_IEEE802154 = 36 89 PF_INET = 2 90 PF_INET6 = 10 91 PF_IPX = 4 92 PF_IRDA = 23 93 PF_ISDN = 34 94 PF_IUCV = 32 95 PF_KCM = 41 96 PF_KEY = 15 97 PF_LLC = 26 98 PF_LOCAL = 1 99 PF_MAX = 45 100 PF_MPLS = 28 101 PF_NETBEUI = 13 102 PF_NETLINK = 16 103 PF_NETROM = 6 104 PF_NFC = 39 105 PF_PACKET = 17 106 PF_PHONET = 35 107 PF_PPPOX = 24 108 PF_QIPCRTR = 42 109 PF_RDS = 21 110 PF_ROSE = 11 111 PF_ROUTE = 16 112 PF_RXRPC = 33 113 PF_SECURITY = 14 114 PF_SMC = 43 115 PF_SNA = 22 116 PF_TIPC = 30 117 PF_UNIX = 1 118 PF_UNSPEC = 0 119 PF_VSOCK = 40 120 PF_WANPIPE = 25 121 PF_X25 = 9 122 PF_XDP = 44 123 SCM_TIMESTAMP = 29 124 SCM_TIMESTAMPING = 37 125 SCM_TIMESTAMPING_OPT_STATS = 54 126 SCM_TIMESTAMPING_PKTINFO = 58 127 SCM_TIMESTAMPNS = 35 128 SCM_TXTIME = 61 129 SCM_WIFI_STATUS = 41 130 SIOCATMARK = 0x8905 131 SIOCGPGRP = 0x8904 132 SIOCGSTAMP = 0x8906 133 SIOCGSTAMPNS = 0x8907 134 SIOCSPGRP = 0x8902 135 SOL_AAL = 265 136 SOL_ALG = 279 137 SOL_ATM = 264 138 SOL_BLUETOOTH = 274 139 SOL_CAIF = 278 140 SOL_DCCP = 269 141 SOL_DECNET = 261 142 SOL_IRDA = 266 143 SOL_IUCV = 277 144 SOL_KCM = 281 145 SOL_LLC = 268 146 SOL_NETBEUI = 267 147 SOL_NETLINK = 270 148 SOL_NFC = 280 149 SOL_PACKET = 263 150 SOL_PNPIPE = 275 151 SOL_PPPOL2TP = 273 152 SOL_RAW = 255 153 SOL_RDS = 276 154 SOL_RXRPC = 272 155 SOL_SOCKET = 1 156 SOL_TIPC = 271 157 SOL_TLS = 282 158 SOL_X25 = 262 159 SOL_XDP = 283 160 SOMAXCONN = 4096 161 SO_ACCEPTCONN = 30 162 SO_ATTACH_BPF = 50 163 SO_ATTACH_FILTER = 26 164 SO_ATTACH_REUSEPORT_CBPF = 51 165 SO_ATTACH_REUSEPORT_EBPF = 52 166 SO_BINDTODEVICE = 25 167 SO_BINDTOIFINDEX = 62 168 SO_BPF_EXTENSIONS = 48 169 SO_BROADCAST = 6 170 SO_BSDCOMPAT = 14 171 SO_BUSY_POLL = 46 172 SO_CNX_ADVICE = 53 173 SO_COOKIE = 57 174 SO_DEBUG = 1 175 SO_DETACH_BPF = 27 176 SO_DETACH_FILTER = 27 177 SO_DETACH_REUSEPORT_BPF = 68 178 SO_DOMAIN = 39 179 SO_DONTROUTE = 5 180 SO_ERROR = 4 181 SO_GET_FILTER = 26 182 SO_INCOMING_CPU = 49 183 SO_INCOMING_NAPI_ID = 56 184 SO_KEEPALIVE = 9 185 SO_LINGER = 13 186 SO_LOCK_FILTER = 44 187 SO_MARK = 36 188 SO_MAX_PACING_RATE = 47 189 SO_MEMINFO = 55 190 SO_NOFCS = 43 191 SO_NO_CHECK = 11 192 SO_OOBINLINE = 10 193 SO_PASSCRED = 16 194 SO_PASSSEC = 34 195 SO_PEEK_OFF = 42 196 SO_PEERCRED = 17 197 SO_PEERGROUPS = 59 198 SO_PEERNAME = 28 199 SO_PEERSEC = 31 200 SO_PRIORITY = 12 201 SO_PROTOCOL = 38 202 SO_RCVBUF = 8 203 SO_RCVBUFFORCE = 33 204 SO_RCVLOWAT = 18 205 SO_RCVTIMEO = 20 206 SO_RCVTIMEO_NEW = 66 207 SO_RCVTIMEO_OLD = 20 208 SO_REUSEADDR = 2 209 SO_REUSEPORT = 15 210 SO_RXQ_OVFL = 40 211 SO_SECURITY_AUTHENTICATION = 22 212 SO_SECURITY_ENCRYPTION_NETWORK = 24 213 SO_SECURITY_ENCRYPTION_TRANSPORT = 23 214 SO_SELECT_ERR_QUEUE = 45 215 SO_SNDBUF = 7 216 SO_SNDBUFFORCE = 32 217 SO_SNDLOWAT = 19 218 SO_SNDTIMEO = 21 219 SO_SNDTIMEO_NEW = 67 220 SO_SNDTIMEO_OLD = 21 221 SO_TIMESTAMP = 29 222 SO_TIMESTAMPING = 37 223 SO_TIMESTAMPING_NEW = 65 224 SO_TIMESTAMPING_OLD = 37 225 SO_TIMESTAMPNS = 35 226 SO_TIMESTAMPNS_NEW = 64 227 SO_TIMESTAMPNS_OLD = 35 228 SO_TIMESTAMP_NEW = 63 229 SO_TIMESTAMP_OLD = 29 230 SO_TXTIME = 61 231 SO_TYPE = 3 232 SO_WIFI_STATUS = 41 233 SO_ZEROCOPY = 60 234 X_ATFILE_SOURCE = 1 235 X_BITS_BYTESWAP_H = 1 236 X_BITS_ENDIANNESS_H = 1 237 X_BITS_ENDIAN_H = 1 238 X_BITS_PTHREADTYPES_ARCH_H = 1 239 X_BITS_PTHREADTYPES_COMMON_H = 1 240 X_BITS_SOCKADDR_H = 1 241 X_BITS_STDINT_INTN_H = 1 242 X_BITS_TIME64_H = 1 243 X_BITS_TYPESIZES_H = 1 244 X_BITS_TYPES_H = 1 245 X_BITS_UINTN_IDENTITY_H = 1 246 X_BSD_SIZE_T_ = 0 247 X_BSD_SIZE_T_DEFINED_ = 0 248 X_DEFAULT_SOURCE = 1 249 X_ENDIAN_H = 1 250 X_FEATURES_H = 1 251 X_FILE_OFFSET_BITS = 64 252 X_GCC_SIZE_T = 0 253 X_LINUX_POSIX_TYPES_H = 0 254 X_LP64 = 1 255 X_POSIX_C_SOURCE = 200809 256 X_POSIX_SOURCE = 1 257 X_RWLOCK_INTERNAL_H = 0 258 X_SIZET_ = 0 259 X_SIZE_T = 0 260 X_SIZE_T_ = 0 261 X_SIZE_T_DECLARED = 0 262 X_SIZE_T_DEFINED = 0 263 X_SIZE_T_DEFINED_ = 0 264 X_SS_SIZE = 128 265 X_STDC_PREDEF_H = 1 266 X_STRUCT_TIMESPEC = 1 267 X_SYS_CDEFS_H = 1 268 X_SYS_SELECT_H = 1 269 X_SYS_SIZE_T_H = 0 270 X_SYS_SOCKET_H = 1 271 X_SYS_TYPES_H = 1 272 X_THREAD_MUTEX_INTERNAL_H = 1 273 X_THREAD_SHARED_TYPES_H = 1 274 X_T_SIZE = 0 275 X_T_SIZE_ = 0 276 Linux = 1 277 Unix = 1 278 ) 279 280 // Bits in the FLAGS argument to `send', `recv', et al. 281 const ( /* socket.h:200:1: */ 282 MSG_OOB = 1 // Process out-of-band data. 283 MSG_PEEK = 2 // Peek at incoming messages. 284 MSG_DONTROUTE = 4 // Don't use local routing. 285 MSG_CTRUNC = 8 // Control data lost before delivery. 286 MSG_PROXY = 16 // Supply or ask second address. 287 MSG_TRUNC = 32 288 MSG_DONTWAIT = 64 // Nonblocking IO. 289 MSG_EOR = 128 // End of record. 290 MSG_WAITALL = 256 // Wait for a full request. 291 MSG_FIN = 512 292 MSG_SYN = 1024 293 MSG_CONFIRM = 2048 // Confirm path validity. 294 MSG_RST = 4096 295 MSG_ERRQUEUE = 8192 // Fetch message from error queue. 296 MSG_NOSIGNAL = 16384 // Do not generate SIGPIPE. 297 MSG_MORE = 32768 // Sender will send more. 298 MSG_WAITFORONE = 65536 // Wait for at least one packet to return. 299 MSG_BATCH = 262144 // sendmmsg: more messages coming. 300 MSG_ZEROCOPY = 67108864 // Use user data in kernel path. 301 MSG_FASTOPEN = 536870912 // Send data in TCP SYN. 302 303 MSG_CMSG_CLOEXEC = 1073741824 304 ) 305 306 // Socket level message types. This must match the definitions in 307 // 308 // <linux/socket.h>. 309 const ( /* socket.h:332:1: */ 310 SCM_RIGHTS = 1 311 ) 312 313 // Get the architecture-dependent definition of enum __socket_type. 314 // Define enum __socket_type for generic Linux. 315 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 316 // This file is part of the GNU C Library. 317 // 318 // The GNU C Library is free software; you can redistribute it and/or 319 // modify it under the terms of the GNU Lesser General Public 320 // License as published by the Free Software Foundation; either 321 // version 2.1 of the License, or (at your option) any later version. 322 // 323 // The GNU C Library is distributed in the hope that it will be useful, 324 // but WITHOUT ANY WARRANTY; without even the implied warranty of 325 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 326 // Lesser General Public License for more details. 327 // 328 // You should have received a copy of the GNU Lesser General Public 329 // License along with the GNU C Library; if not, see 330 // <https://www.gnu.org/licenses/>. 331 332 // Types of sockets. 333 const ( /* socket_type.h:24:1: */ 334 SOCK_STREAM = 1 // Sequenced, reliable, connection-based 335 // byte streams. 336 SOCK_DGRAM = 2 // Connectionless, unreliable datagrams 337 // of fixed maximum length. 338 SOCK_RAW = 3 // Raw protocol interface. 339 SOCK_RDM = 4 // Reliably-delivered messages. 340 SOCK_SEQPACKET = 5 // Sequenced, reliable, connection-based, 341 // datagrams of fixed maximum length. 342 SOCK_DCCP = 6 // Datagram Congestion Control Protocol. 343 SOCK_PACKET = 10 // Linux specific way of getting packets 344 // at the dev level. For writing rarp and 345 // other similar things on the user level. 346 347 // Flags to be ORed into the type parameter of socket and socketpair and 348 // used for the flags parameter of paccept. 349 350 SOCK_CLOEXEC = 524288 // Atomically set close-on-exec flag for the 351 // new descriptor(s). 352 SOCK_NONBLOCK = 2048 353 ) 354 355 // The following constants should be used for the second parameter of 356 // 357 // `shutdown'. 358 const ( /* socket.h:41:1: */ 359 SHUT_RD = 0 // No more receptions. 360 SHUT_WR = 1 // No more transmissions. 361 SHUT_RDWR = 2 362 ) 363 364 type Ptrdiff_t = int64 /* <builtin>:3:26 */ 365 366 type Size_t = uint64 /* <builtin>:9:23 */ 367 368 type Wchar_t = int32 /* <builtin>:15:24 */ 369 370 type X__int128_t = struct { 371 Flo int64 372 Fhi int64 373 } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 374 type X__uint128_t = struct { 375 Flo uint64 376 Fhi uint64 377 } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 378 379 type X__builtin_va_list = uintptr /* <builtin>:46:14 */ 380 type X__float128 = float64 /* <builtin>:47:21 */ 381 382 // Wide character type. 383 // Locale-writers should change this as necessary to 384 // be big enough to hold unique values not between 0 and 127, 385 // and not (wchar_t) -1, for each defined multibyte character. 386 387 // Define this type if we are doing the whole job, 388 // or if we want this type in particular. 389 390 // A null pointer constant. 391 392 // Structure for scatter/gather I/O. 393 type Iovec = struct { 394 Fiov_base uintptr 395 Fiov_len Size_t 396 } /* struct_iovec.h:26:1 */ 397 398 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 399 // 400 // This file is part of GCC. 401 // 402 // GCC is free software; you can redistribute it and/or modify 403 // it under the terms of the GNU General Public License as published by 404 // the Free Software Foundation; either version 3, or (at your option) 405 // any later version. 406 // 407 // GCC is distributed in the hope that it will be useful, 408 // but WITHOUT ANY WARRANTY; without even the implied warranty of 409 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 410 // GNU General Public License for more details. 411 // 412 // Under Section 7 of GPL version 3, you are granted additional 413 // permissions described in the GCC Runtime Library Exception, version 414 // 3.1, as published by the Free Software Foundation. 415 // 416 // You should have received a copy of the GNU General Public License and 417 // a copy of the GCC Runtime Library Exception along with this program; 418 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 419 // <http://www.gnu.org/licenses/>. 420 421 // ISO C Standard: 7.17 Common definitions <stddef.h> 422 423 // Any one of these symbols __need_* means that GNU libc 424 // wants us just to define one data type. So don't define 425 // the symbols that indicate this file's entire job has been done. 426 427 // This avoids lossage on SunOS but only if stdtypes.h comes first. 428 // There's no way to win with the other order! Sun lossage. 429 430 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 431 // Just ignore it. 432 433 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 434 // _TYPE_size_t which will typedef size_t. fixincludes patched the 435 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 436 // not defined, and so that defining this macro defines _GCC_SIZE_T. 437 // If we find that the macros are still defined at this point, we must 438 // invoke them so that the type is defined as expected. 439 440 // In case nobody has defined these types, but we aren't running under 441 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 442 // __WCHAR_TYPE__ have reasonable values. This can happen if the 443 // parts of GCC is compiled by an older compiler, that actually 444 // include gstddef.h, such as collect2. 445 446 // Signed type of difference of two pointers. 447 448 // Define this type if we are doing the whole job, 449 // or if we want this type in particular. 450 451 // Unsigned type of `sizeof' something. 452 453 // Define this type if we are doing the whole job, 454 // or if we want this type in particular. 455 456 // Wide character type. 457 // Locale-writers should change this as necessary to 458 // be big enough to hold unique values not between 0 and 127, 459 // and not (wchar_t) -1, for each defined multibyte character. 460 461 // Define this type if we are doing the whole job, 462 // or if we want this type in particular. 463 464 // A null pointer constant. 465 466 // This operating system-specific header file defines the SOCK_*, PF_*, 467 // AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr', 468 // `struct msghdr', and `struct linger' types. 469 // System-specific socket constants and types. Linux version. 470 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 471 // This file is part of the GNU C Library. 472 // 473 // The GNU C Library is free software; you can redistribute it and/or 474 // modify it under the terms of the GNU Lesser General Public 475 // License as published by the Free Software Foundation; either 476 // version 2.1 of the License, or (at your option) any later version. 477 // 478 // The GNU C Library is distributed in the hope that it will be useful, 479 // but WITHOUT ANY WARRANTY; without even the implied warranty of 480 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 481 // Lesser General Public License for more details. 482 // 483 // You should have received a copy of the GNU Lesser General Public 484 // License along with the GNU C Library; if not, see 485 // <https://www.gnu.org/licenses/>. 486 487 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 488 // 489 // This file is part of GCC. 490 // 491 // GCC is free software; you can redistribute it and/or modify 492 // it under the terms of the GNU General Public License as published by 493 // the Free Software Foundation; either version 3, or (at your option) 494 // any later version. 495 // 496 // GCC is distributed in the hope that it will be useful, 497 // but WITHOUT ANY WARRANTY; without even the implied warranty of 498 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 499 // GNU General Public License for more details. 500 // 501 // Under Section 7 of GPL version 3, you are granted additional 502 // permissions described in the GCC Runtime Library Exception, version 503 // 3.1, as published by the Free Software Foundation. 504 // 505 // You should have received a copy of the GNU General Public License and 506 // a copy of the GCC Runtime Library Exception along with this program; 507 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 508 // <http://www.gnu.org/licenses/>. 509 510 // ISO C Standard: 7.17 Common definitions <stddef.h> 511 512 // Any one of these symbols __need_* means that GNU libc 513 // wants us just to define one data type. So don't define 514 // the symbols that indicate this file's entire job has been done. 515 516 // This avoids lossage on SunOS but only if stdtypes.h comes first. 517 // There's no way to win with the other order! Sun lossage. 518 519 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 520 // Just ignore it. 521 522 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 523 // _TYPE_size_t which will typedef size_t. fixincludes patched the 524 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 525 // not defined, and so that defining this macro defines _GCC_SIZE_T. 526 // If we find that the macros are still defined at this point, we must 527 // invoke them so that the type is defined as expected. 528 529 // In case nobody has defined these types, but we aren't running under 530 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 531 // __WCHAR_TYPE__ have reasonable values. This can happen if the 532 // parts of GCC is compiled by an older compiler, that actually 533 // include gstddef.h, such as collect2. 534 535 // Signed type of difference of two pointers. 536 537 // Define this type if we are doing the whole job, 538 // or if we want this type in particular. 539 540 // Unsigned type of `sizeof' something. 541 542 // Define this type if we are doing the whole job, 543 // or if we want this type in particular. 544 545 // Wide character type. 546 // Locale-writers should change this as necessary to 547 // be big enough to hold unique values not between 0 and 127, 548 // and not (wchar_t) -1, for each defined multibyte character. 549 550 // Define this type if we are doing the whole job, 551 // or if we want this type in particular. 552 553 // A null pointer constant. 554 555 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 556 // This file is part of the GNU C Library. 557 // 558 // The GNU C Library is free software; you can redistribute it and/or 559 // modify it under the terms of the GNU Lesser General Public 560 // License as published by the Free Software Foundation; either 561 // version 2.1 of the License, or (at your option) any later version. 562 // 563 // The GNU C Library is distributed in the hope that it will be useful, 564 // but WITHOUT ANY WARRANTY; without even the implied warranty of 565 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 566 // Lesser General Public License for more details. 567 // 568 // You should have received a copy of the GNU Lesser General Public 569 // License along with the GNU C Library; if not, see 570 // <https://www.gnu.org/licenses/>. 571 572 // POSIX Standard: 2.6 Primitive System Data Types <sys/types.h> 573 574 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 575 // This file is part of the GNU C Library. 576 // 577 // The GNU C Library is free software; you can redistribute it and/or 578 // modify it under the terms of the GNU Lesser General Public 579 // License as published by the Free Software Foundation; either 580 // version 2.1 of the License, or (at your option) any later version. 581 // 582 // The GNU C Library is distributed in the hope that it will be useful, 583 // but WITHOUT ANY WARRANTY; without even the implied warranty of 584 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 585 // Lesser General Public License for more details. 586 // 587 // You should have received a copy of the GNU Lesser General Public 588 // License along with the GNU C Library; if not, see 589 // <https://www.gnu.org/licenses/>. 590 591 // bits/types.h -- definitions of __*_t types underlying *_t types. 592 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 593 // This file is part of the GNU C Library. 594 // 595 // The GNU C Library is free software; you can redistribute it and/or 596 // modify it under the terms of the GNU Lesser General Public 597 // License as published by the Free Software Foundation; either 598 // version 2.1 of the License, or (at your option) any later version. 599 // 600 // The GNU C Library is distributed in the hope that it will be useful, 601 // but WITHOUT ANY WARRANTY; without even the implied warranty of 602 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 603 // Lesser General Public License for more details. 604 // 605 // You should have received a copy of the GNU Lesser General Public 606 // License along with the GNU C Library; if not, see 607 // <https://www.gnu.org/licenses/>. 608 609 // Never include this file directly; use <sys/types.h> instead. 610 611 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 612 // This file is part of the GNU C Library. 613 // 614 // The GNU C Library is free software; you can redistribute it and/or 615 // modify it under the terms of the GNU Lesser General Public 616 // License as published by the Free Software Foundation; either 617 // version 2.1 of the License, or (at your option) any later version. 618 // 619 // The GNU C Library is distributed in the hope that it will be useful, 620 // but WITHOUT ANY WARRANTY; without even the implied warranty of 621 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 622 // Lesser General Public License for more details. 623 // 624 // You should have received a copy of the GNU Lesser General Public 625 // License along with the GNU C Library; if not, see 626 // <https://www.gnu.org/licenses/>. 627 628 // Determine the wordsize from the preprocessor defines. 629 630 // Bit size of the time_t type at glibc build time, general case. 631 // Copyright (C) 2018-2020 Free Software Foundation, Inc. 632 // This file is part of the GNU C Library. 633 // 634 // The GNU C Library is free software; you can redistribute it and/or 635 // modify it under the terms of the GNU Lesser General Public 636 // License as published by the Free Software Foundation; either 637 // version 2.1 of the License, or (at your option) any later version. 638 // 639 // The GNU C Library is distributed in the hope that it will be useful, 640 // but WITHOUT ANY WARRANTY; without even the implied warranty of 641 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 642 // Lesser General Public License for more details. 643 // 644 // You should have received a copy of the GNU Lesser General Public 645 // License along with the GNU C Library; if not, see 646 // <https://www.gnu.org/licenses/>. 647 648 // Determine the wordsize from the preprocessor defines. 649 650 // Size in bits of the 'time_t' type of the default ABI. 651 652 // Convenience types. 653 type X__u_char = uint8 /* types.h:31:23 */ 654 type X__u_short = uint16 /* types.h:32:28 */ 655 type X__u_int = uint32 /* types.h:33:22 */ 656 type X__u_long = uint64 /* types.h:34:27 */ 657 658 // Fixed-size types, underlying types depend on word size and compiler. 659 type X__int8_t = int8 /* types.h:37:21 */ 660 type X__uint8_t = uint8 /* types.h:38:23 */ 661 type X__int16_t = int16 /* types.h:39:26 */ 662 type X__uint16_t = uint16 /* types.h:40:28 */ 663 type X__int32_t = int32 /* types.h:41:20 */ 664 type X__uint32_t = uint32 /* types.h:42:22 */ 665 type X__int64_t = int64 /* types.h:44:25 */ 666 type X__uint64_t = uint64 /* types.h:45:27 */ 667 668 // Smallest types with at least a given width. 669 type X__int_least8_t = X__int8_t /* types.h:52:18 */ 670 type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ 671 type X__int_least16_t = X__int16_t /* types.h:54:19 */ 672 type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ 673 type X__int_least32_t = X__int32_t /* types.h:56:19 */ 674 type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ 675 type X__int_least64_t = X__int64_t /* types.h:58:19 */ 676 type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ 677 678 // quad_t is also 64 bits. 679 type X__quad_t = int64 /* types.h:63:18 */ 680 type X__u_quad_t = uint64 /* types.h:64:27 */ 681 682 // Largest integral types. 683 type X__intmax_t = int64 /* types.h:72:18 */ 684 type X__uintmax_t = uint64 /* types.h:73:27 */ 685 686 // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE 687 // macros for each of the OS types we define below. The definitions 688 // of those macros must use the following macros for underlying types. 689 // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned 690 // variants of each of the following integer types on this machine. 691 // 692 // 16 -- "natural" 16-bit type (always short) 693 // 32 -- "natural" 32-bit type (always int) 694 // 64 -- "natural" 64-bit type (long or long long) 695 // LONG32 -- 32-bit type, traditionally long 696 // QUAD -- 64-bit type, traditionally long long 697 // WORD -- natural type of __WORDSIZE bits (int or long) 698 // LONGWORD -- type of __WORDSIZE bits, traditionally long 699 // 700 // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the 701 // conventional uses of `long' or `long long' type modifiers match the 702 // types we define, even when a less-adorned type would be the same size. 703 // This matters for (somewhat) portably writing printf/scanf formats for 704 // these types, where using the appropriate l or ll format modifiers can 705 // make the typedefs and the formats match up across all GNU platforms. If 706 // we used `long' when it's 64 bits where `long long' is expected, then the 707 // compiler would warn about the formats not matching the argument types, 708 // and the programmer changing them to shut up the compiler would break the 709 // program's portability. 710 // 711 // Here we assume what is presently the case in all the GCC configurations 712 // we support: long long is always 64 bits, long is always word/address size, 713 // and int is always 32 bits. 714 715 // No need to mark the typedef with __extension__. 716 // bits/typesizes.h -- underlying types for *_t. Linux/s390 version. 717 // Copyright (C) 2003-2020 Free Software Foundation, Inc. 718 // This file is part of the GNU C Library. 719 // 720 // The GNU C Library is free software; you can redistribute it and/or 721 // modify it under the terms of the GNU Lesser General Public 722 // License as published by the Free Software Foundation; either 723 // version 2.1 of the License, or (at your option) any later version. 724 // 725 // The GNU C Library is distributed in the hope that it will be useful, 726 // but WITHOUT ANY WARRANTY; without even the implied warranty of 727 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 728 // Lesser General Public License for more details. 729 // 730 // You should have received a copy of the GNU Lesser General Public 731 // License along with the GNU C Library; if not, see 732 // <https://www.gnu.org/licenses/>. 733 734 // See <bits/types.h> for the meaning of these macros. This file exists so 735 // that <bits/types.h> need not vary across different GNU platforms. 736 737 // size_t is unsigned long int on s390 -m31. 738 739 // Tell the libc code that off_t and off64_t are actually the same type 740 // for all ABI purposes, even if possibly expressed as different base types 741 // for C type-checking purposes. 742 743 // Same for ino_t and ino64_t. 744 745 // And for __rlim_t and __rlim64_t. 746 747 // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. 748 749 // Number of descriptors that can fit in an `fd_set'. 750 751 // bits/time64.h -- underlying types for __time64_t. Generic version. 752 // Copyright (C) 2018-2020 Free Software Foundation, Inc. 753 // This file is part of the GNU C Library. 754 // 755 // The GNU C Library is free software; you can redistribute it and/or 756 // modify it under the terms of the GNU Lesser General Public 757 // License as published by the Free Software Foundation; either 758 // version 2.1 of the License, or (at your option) any later version. 759 // 760 // The GNU C Library is distributed in the hope that it will be useful, 761 // but WITHOUT ANY WARRANTY; without even the implied warranty of 762 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 763 // Lesser General Public License for more details. 764 // 765 // You should have received a copy of the GNU Lesser General Public 766 // License along with the GNU C Library; if not, see 767 // <https://www.gnu.org/licenses/>. 768 769 // Define __TIME64_T_TYPE so that it is always a 64-bit type. 770 771 // If we already have 64-bit time type then use it. 772 773 type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. 774 type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. 775 type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. 776 type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. 777 type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). 778 type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. 779 type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. 780 type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. 781 type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). 782 type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. 783 type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. 784 type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. 785 type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. 786 type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). 787 type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. 788 type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. 789 type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. 790 type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. 791 792 type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. 793 type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. 794 795 // Clock ID used in clock and timer functions. 796 type X__clockid_t = int32 /* types.h:168:29 */ 797 798 // Timer ID returned by `timer_create'. 799 type X__timer_t = uintptr /* types.h:171:12 */ 800 801 // Type to represent block size. 802 type X__blksize_t = int64 /* types.h:174:29 */ 803 804 // Types from the Large File Support interface. 805 806 // Type to count number of disk blocks. 807 type X__blkcnt_t = int64 /* types.h:179:28 */ 808 type X__blkcnt64_t = int64 /* types.h:180:30 */ 809 810 // Type to count file system blocks. 811 type X__fsblkcnt_t = uint64 /* types.h:183:30 */ 812 type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ 813 814 // Type to count file system nodes. 815 type X__fsfilcnt_t = uint64 /* types.h:187:30 */ 816 type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ 817 818 // Type of miscellaneous file system fields. 819 type X__fsword_t = int64 /* types.h:191:28 */ 820 821 type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. 822 823 // Signed long type used in system calls. 824 type X__syscall_slong_t = int64 /* types.h:196:33 */ 825 // Unsigned long type used in system calls. 826 type X__syscall_ulong_t = uint64 /* types.h:198:33 */ 827 828 // These few don't really vary by system, they always correspond 829 // 830 // to one of the other defined types. 831 type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). 832 type X__caddr_t = uintptr /* types.h:203:14 */ 833 834 // Duplicates info from stdint.h but this is used in unistd.h. 835 type X__intptr_t = int64 /* types.h:206:25 */ 836 837 // Duplicate info from sys/socket.h. 838 type X__socklen_t = uint32 /* types.h:209:23 */ 839 840 // C99: An integer type that can be accessed as an atomic entity, 841 // 842 // even in the presence of asynchronous interrupts. 843 // It is not currently necessary for this to be machine-specific. 844 type X__sig_atomic_t = int32 /* types.h:214:13 */ 845 846 // Seconds since the Epoch, visible to user code when time_t is too 847 // narrow only for consistency with the old way of widening too-narrow 848 // types. User code should never use __time64_t. 849 850 type U_char = X__u_char /* types.h:33:18 */ 851 type U_short = X__u_short /* types.h:34:19 */ 852 type U_int = X__u_int /* types.h:35:17 */ 853 type U_long = X__u_long /* types.h:36:18 */ 854 type Quad_t = X__quad_t /* types.h:37:18 */ 855 type U_quad_t = X__u_quad_t /* types.h:38:20 */ 856 type Fsid_t = X__fsid_t /* types.h:39:18 */ 857 type Loff_t = X__loff_t /* types.h:42:18 */ 858 859 type Ino_t = X__ino64_t /* types.h:49:19 */ 860 861 type Dev_t = X__dev_t /* types.h:59:17 */ 862 863 type Gid_t = X__gid_t /* types.h:64:17 */ 864 865 type Mode_t = X__mode_t /* types.h:69:18 */ 866 867 type Nlink_t = X__nlink_t /* types.h:74:19 */ 868 869 type Uid_t = X__uid_t /* types.h:79:17 */ 870 871 type Off_t = X__off64_t /* types.h:87:19 */ 872 873 type Pid_t = X__pid_t /* types.h:97:17 */ 874 875 type Id_t = X__id_t /* types.h:103:16 */ 876 877 type Ssize_t = X__ssize_t /* types.h:108:19 */ 878 879 type Daddr_t = X__daddr_t /* types.h:114:19 */ 880 type Caddr_t = X__caddr_t /* types.h:115:19 */ 881 882 type Key_t = X__key_t /* types.h:121:17 */ 883 884 // bits/types.h -- definitions of __*_t types underlying *_t types. 885 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 886 // This file is part of the GNU C Library. 887 // 888 // The GNU C Library is free software; you can redistribute it and/or 889 // modify it under the terms of the GNU Lesser General Public 890 // License as published by the Free Software Foundation; either 891 // version 2.1 of the License, or (at your option) any later version. 892 // 893 // The GNU C Library is distributed in the hope that it will be useful, 894 // but WITHOUT ANY WARRANTY; without even the implied warranty of 895 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 896 // Lesser General Public License for more details. 897 // 898 // You should have received a copy of the GNU Lesser General Public 899 // License along with the GNU C Library; if not, see 900 // <https://www.gnu.org/licenses/>. 901 902 // Never include this file directly; use <sys/types.h> instead. 903 904 // Returned by `clock'. 905 type Clock_t = X__clock_t /* clock_t.h:7:19 */ 906 907 // bits/types.h -- definitions of __*_t types underlying *_t types. 908 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 909 // This file is part of the GNU C Library. 910 // 911 // The GNU C Library is free software; you can redistribute it and/or 912 // modify it under the terms of the GNU Lesser General Public 913 // License as published by the Free Software Foundation; either 914 // version 2.1 of the License, or (at your option) any later version. 915 // 916 // The GNU C Library is distributed in the hope that it will be useful, 917 // but WITHOUT ANY WARRANTY; without even the implied warranty of 918 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 919 // Lesser General Public License for more details. 920 // 921 // You should have received a copy of the GNU Lesser General Public 922 // License along with the GNU C Library; if not, see 923 // <https://www.gnu.org/licenses/>. 924 925 // Never include this file directly; use <sys/types.h> instead. 926 927 // Clock ID used in clock and timer functions. 928 type Clockid_t = X__clockid_t /* clockid_t.h:7:21 */ 929 930 // bits/types.h -- definitions of __*_t types underlying *_t types. 931 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 932 // This file is part of the GNU C Library. 933 // 934 // The GNU C Library is free software; you can redistribute it and/or 935 // modify it under the terms of the GNU Lesser General Public 936 // License as published by the Free Software Foundation; either 937 // version 2.1 of the License, or (at your option) any later version. 938 // 939 // The GNU C Library is distributed in the hope that it will be useful, 940 // but WITHOUT ANY WARRANTY; without even the implied warranty of 941 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 942 // Lesser General Public License for more details. 943 // 944 // You should have received a copy of the GNU Lesser General Public 945 // License along with the GNU C Library; if not, see 946 // <https://www.gnu.org/licenses/>. 947 948 // Never include this file directly; use <sys/types.h> instead. 949 950 // Returned by `time'. 951 type Time_t = X__time_t /* time_t.h:7:18 */ 952 953 // bits/types.h -- definitions of __*_t types underlying *_t types. 954 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 955 // This file is part of the GNU C Library. 956 // 957 // The GNU C Library is free software; you can redistribute it and/or 958 // modify it under the terms of the GNU Lesser General Public 959 // License as published by the Free Software Foundation; either 960 // version 2.1 of the License, or (at your option) any later version. 961 // 962 // The GNU C Library is distributed in the hope that it will be useful, 963 // but WITHOUT ANY WARRANTY; without even the implied warranty of 964 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 965 // Lesser General Public License for more details. 966 // 967 // You should have received a copy of the GNU Lesser General Public 968 // License along with the GNU C Library; if not, see 969 // <https://www.gnu.org/licenses/>. 970 971 // Never include this file directly; use <sys/types.h> instead. 972 973 // Timer ID returned by `timer_create'. 974 type Timer_t = X__timer_t /* timer_t.h:7:19 */ 975 976 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 977 // 978 // This file is part of GCC. 979 // 980 // GCC is free software; you can redistribute it and/or modify 981 // it under the terms of the GNU General Public License as published by 982 // the Free Software Foundation; either version 3, or (at your option) 983 // any later version. 984 // 985 // GCC is distributed in the hope that it will be useful, 986 // but WITHOUT ANY WARRANTY; without even the implied warranty of 987 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 988 // GNU General Public License for more details. 989 // 990 // Under Section 7 of GPL version 3, you are granted additional 991 // permissions described in the GCC Runtime Library Exception, version 992 // 3.1, as published by the Free Software Foundation. 993 // 994 // You should have received a copy of the GNU General Public License and 995 // a copy of the GCC Runtime Library Exception along with this program; 996 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 997 // <http://www.gnu.org/licenses/>. 998 999 // ISO C Standard: 7.17 Common definitions <stddef.h> 1000 1001 // Any one of these symbols __need_* means that GNU libc 1002 // wants us just to define one data type. So don't define 1003 // the symbols that indicate this file's entire job has been done. 1004 1005 // This avoids lossage on SunOS but only if stdtypes.h comes first. 1006 // There's no way to win with the other order! Sun lossage. 1007 1008 // Sequent's header files use _PTRDIFF_T_ in some conflicting way. 1009 // Just ignore it. 1010 1011 // On VxWorks, <type/vxTypesBase.h> may have defined macros like 1012 // _TYPE_size_t which will typedef size_t. fixincludes patched the 1013 // vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is 1014 // not defined, and so that defining this macro defines _GCC_SIZE_T. 1015 // If we find that the macros are still defined at this point, we must 1016 // invoke them so that the type is defined as expected. 1017 1018 // In case nobody has defined these types, but we aren't running under 1019 // GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and 1020 // __WCHAR_TYPE__ have reasonable values. This can happen if the 1021 // parts of GCC is compiled by an older compiler, that actually 1022 // include gstddef.h, such as collect2. 1023 1024 // Signed type of difference of two pointers. 1025 1026 // Define this type if we are doing the whole job, 1027 // or if we want this type in particular. 1028 1029 // Unsigned type of `sizeof' something. 1030 1031 // Define this type if we are doing the whole job, 1032 // or if we want this type in particular. 1033 1034 // Wide character type. 1035 // Locale-writers should change this as necessary to 1036 // be big enough to hold unique values not between 0 and 127, 1037 // and not (wchar_t) -1, for each defined multibyte character. 1038 1039 // Define this type if we are doing the whole job, 1040 // or if we want this type in particular. 1041 1042 // A null pointer constant. 1043 1044 // Old compatibility names for C types. 1045 type Ulong = uint64 /* types.h:148:27 */ 1046 type Ushort = uint16 /* types.h:149:28 */ 1047 type Uint = uint32 /* types.h:150:22 */ 1048 1049 // These size-specific names are used by some of the inet code. 1050 1051 // Define intN_t types. 1052 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 1053 // This file is part of the GNU C Library. 1054 // 1055 // The GNU C Library is free software; you can redistribute it and/or 1056 // modify it under the terms of the GNU Lesser General Public 1057 // License as published by the Free Software Foundation; either 1058 // version 2.1 of the License, or (at your option) any later version. 1059 // 1060 // The GNU C Library is distributed in the hope that it will be useful, 1061 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1062 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1063 // Lesser General Public License for more details. 1064 // 1065 // You should have received a copy of the GNU Lesser General Public 1066 // License along with the GNU C Library; if not, see 1067 // <https://www.gnu.org/licenses/>. 1068 1069 // bits/types.h -- definitions of __*_t types underlying *_t types. 1070 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 1071 // This file is part of the GNU C Library. 1072 // 1073 // The GNU C Library is free software; you can redistribute it and/or 1074 // modify it under the terms of the GNU Lesser General Public 1075 // License as published by the Free Software Foundation; either 1076 // version 2.1 of the License, or (at your option) any later version. 1077 // 1078 // The GNU C Library is distributed in the hope that it will be useful, 1079 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1080 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1081 // Lesser General Public License for more details. 1082 // 1083 // You should have received a copy of the GNU Lesser General Public 1084 // License along with the GNU C Library; if not, see 1085 // <https://www.gnu.org/licenses/>. 1086 1087 // Never include this file directly; use <sys/types.h> instead. 1088 1089 type Int8_t = X__int8_t /* stdint-intn.h:24:18 */ 1090 type Int16_t = X__int16_t /* stdint-intn.h:25:19 */ 1091 type Int32_t = X__int32_t /* stdint-intn.h:26:19 */ 1092 type Int64_t = X__int64_t /* stdint-intn.h:27:19 */ 1093 1094 // These were defined by ISO C without the first `_'. 1095 type U_int8_t = X__uint8_t /* types.h:158:19 */ 1096 type U_int16_t = X__uint16_t /* types.h:159:20 */ 1097 type U_int32_t = X__uint32_t /* types.h:160:20 */ 1098 type U_int64_t = X__uint64_t /* types.h:161:20 */ 1099 1100 type Register_t = int32 /* types.h:164:13 */ 1101 1102 // It also defines `fd_set' and the FD_* macros for `select'. 1103 // `fd_set' type and related macros, and `select'/`pselect' declarations. 1104 // Copyright (C) 1996-2020 Free Software Foundation, Inc. 1105 // This file is part of the GNU C Library. 1106 // 1107 // The GNU C Library is free software; you can redistribute it and/or 1108 // modify it under the terms of the GNU Lesser General Public 1109 // License as published by the Free Software Foundation; either 1110 // version 2.1 of the License, or (at your option) any later version. 1111 // 1112 // The GNU C Library is distributed in the hope that it will be useful, 1113 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1114 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1115 // Lesser General Public License for more details. 1116 // 1117 // You should have received a copy of the GNU Lesser General Public 1118 // License along with the GNU C Library; if not, see 1119 // <https://www.gnu.org/licenses/>. 1120 1121 // POSIX 1003.1g: 6.2 Select from File Descriptor Sets <sys/select.h> 1122 1123 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 1124 // This file is part of the GNU C Library. 1125 // 1126 // The GNU C Library is free software; you can redistribute it and/or 1127 // modify it under the terms of the GNU Lesser General Public 1128 // License as published by the Free Software Foundation; either 1129 // version 2.1 of the License, or (at your option) any later version. 1130 // 1131 // The GNU C Library is distributed in the hope that it will be useful, 1132 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1133 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1134 // Lesser General Public License for more details. 1135 // 1136 // You should have received a copy of the GNU Lesser General Public 1137 // License along with the GNU C Library; if not, see 1138 // <https://www.gnu.org/licenses/>. 1139 1140 // Get definition of needed basic types. 1141 // bits/types.h -- definitions of __*_t types underlying *_t types. 1142 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 1143 // This file is part of the GNU C Library. 1144 // 1145 // The GNU C Library is free software; you can redistribute it and/or 1146 // modify it under the terms of the GNU Lesser General Public 1147 // License as published by the Free Software Foundation; either 1148 // version 2.1 of the License, or (at your option) any later version. 1149 // 1150 // The GNU C Library is distributed in the hope that it will be useful, 1151 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1152 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1153 // Lesser General Public License for more details. 1154 // 1155 // You should have received a copy of the GNU Lesser General Public 1156 // License along with the GNU C Library; if not, see 1157 // <https://www.gnu.org/licenses/>. 1158 1159 // Never include this file directly; use <sys/types.h> instead. 1160 1161 // Get __FD_* definitions. 1162 // Copyright (C) 1997-2020 Free Software Foundation, Inc. 1163 // This file is part of the GNU C Library. 1164 // 1165 // The GNU C Library is free software; you can redistribute it and/or 1166 // modify it under the terms of the GNU Lesser General Public 1167 // License as published by the Free Software Foundation; either 1168 // version 2.1 of the License, or (at your option) any later version. 1169 // 1170 // The GNU C Library is distributed in the hope that it will be useful, 1171 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1172 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1173 // Lesser General Public License for more details. 1174 // 1175 // You should have received a copy of the GNU Lesser General Public 1176 // License along with the GNU C Library; if not, see 1177 // <https://www.gnu.org/licenses/>. 1178 1179 // We don't use `memset' because this would require a prototype and 1180 // the array isn't too big. 1181 1182 // Get sigset_t. 1183 1184 type X__sigset_t = struct{ F__val [16]uint64 } /* __sigset_t.h:8:3 */ 1185 1186 // A set of signals to be blocked, unblocked, or waited for. 1187 type Sigset_t = X__sigset_t /* sigset_t.h:7:20 */ 1188 1189 // Get definition of timer specification structures. 1190 1191 // bits/types.h -- definitions of __*_t types underlying *_t types. 1192 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 1193 // This file is part of the GNU C Library. 1194 // 1195 // The GNU C Library is free software; you can redistribute it and/or 1196 // modify it under the terms of the GNU Lesser General Public 1197 // License as published by the Free Software Foundation; either 1198 // version 2.1 of the License, or (at your option) any later version. 1199 // 1200 // The GNU C Library is distributed in the hope that it will be useful, 1201 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1202 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1203 // Lesser General Public License for more details. 1204 // 1205 // You should have received a copy of the GNU Lesser General Public 1206 // License along with the GNU C Library; if not, see 1207 // <https://www.gnu.org/licenses/>. 1208 1209 // Never include this file directly; use <sys/types.h> instead. 1210 1211 // A time value that is accurate to the nearest 1212 // 1213 // microsecond but also has a range of years. 1214 type Timeval = struct { 1215 Ftv_sec X__time_t 1216 Ftv_usec X__suseconds_t 1217 } /* struct_timeval.h:8:1 */ 1218 1219 // NB: Include guard matches what <linux/time.h> uses. 1220 1221 // bits/types.h -- definitions of __*_t types underlying *_t types. 1222 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 1223 // This file is part of the GNU C Library. 1224 // 1225 // The GNU C Library is free software; you can redistribute it and/or 1226 // modify it under the terms of the GNU Lesser General Public 1227 // License as published by the Free Software Foundation; either 1228 // version 2.1 of the License, or (at your option) any later version. 1229 // 1230 // The GNU C Library is distributed in the hope that it will be useful, 1231 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1232 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1233 // Lesser General Public License for more details. 1234 // 1235 // You should have received a copy of the GNU Lesser General Public 1236 // License along with the GNU C Library; if not, see 1237 // <https://www.gnu.org/licenses/>. 1238 1239 // Never include this file directly; use <sys/types.h> instead. 1240 1241 // Endian macros for string.h functions 1242 // Copyright (C) 1992-2020 Free Software Foundation, Inc. 1243 // This file is part of the GNU C Library. 1244 // 1245 // The GNU C Library is free software; you can redistribute it and/or 1246 // modify it under the terms of the GNU Lesser General Public 1247 // License as published by the Free Software Foundation; either 1248 // version 2.1 of the License, or (at your option) any later version. 1249 // 1250 // The GNU C Library is distributed in the hope that it will be useful, 1251 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1252 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1253 // Lesser General Public License for more details. 1254 // 1255 // You should have received a copy of the GNU Lesser General Public 1256 // License along with the GNU C Library; if not, see 1257 // <http://www.gnu.org/licenses/>. 1258 1259 // POSIX.1b structure for a time value. This is like a `struct timeval' but 1260 // 1261 // has nanoseconds instead of microseconds. 1262 type Timespec = struct { 1263 Ftv_sec X__time_t 1264 Ftv_nsec X__syscall_slong_t 1265 } /* struct_timespec.h:10:1 */ 1266 1267 type Suseconds_t = X__suseconds_t /* select.h:43:23 */ 1268 1269 // The fd_set member is required to be an array of longs. 1270 type X__fd_mask = int64 /* select.h:49:18 */ 1271 1272 // Some versions of <linux/posix_types.h> define this macros. 1273 // It's easier to assume 8-bit bytes than to get CHAR_BIT. 1274 1275 // fd_set for select and pselect. 1276 type Fd_set = struct{ F__fds_bits [16]X__fd_mask } /* select.h:70:5 */ 1277 1278 // Maximum number of file descriptors in `fd_set'. 1279 1280 // Sometimes the fd_set member is assumed to have this type. 1281 type Fd_mask = X__fd_mask /* select.h:77:19 */ 1282 1283 // Define some inlines helping to catch common problems. 1284 1285 type Blksize_t = X__blksize_t /* types.h:185:21 */ 1286 1287 // Types from the Large File Support interface. 1288 type Blkcnt_t = X__blkcnt64_t /* types.h:205:22 */ // Type to count number of disk blocks. 1289 type Fsblkcnt_t = X__fsblkcnt64_t /* types.h:209:24 */ // Type to count file system blocks. 1290 type Fsfilcnt_t = X__fsfilcnt64_t /* types.h:213:24 */ // Type to count file system inodes. 1291 1292 // Now add the thread types. 1293 // Declaration of common pthread types for all architectures. 1294 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 1295 // This file is part of the GNU C Library. 1296 // 1297 // The GNU C Library is free software; you can redistribute it and/or 1298 // modify it under the terms of the GNU Lesser General Public 1299 // License as published by the Free Software Foundation; either 1300 // version 2.1 of the License, or (at your option) any later version. 1301 // 1302 // The GNU C Library is distributed in the hope that it will be useful, 1303 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1304 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1305 // Lesser General Public License for more details. 1306 // 1307 // You should have received a copy of the GNU Lesser General Public 1308 // License along with the GNU C Library; if not, see 1309 // <https://www.gnu.org/licenses/>. 1310 1311 // For internal mutex and condition variable definitions. 1312 // Common threading primitives definitions for both POSIX and C11. 1313 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 1314 // This file is part of the GNU C Library. 1315 // 1316 // The GNU C Library is free software; you can redistribute it and/or 1317 // modify it under the terms of the GNU Lesser General Public 1318 // License as published by the Free Software Foundation; either 1319 // version 2.1 of the License, or (at your option) any later version. 1320 // 1321 // The GNU C Library is distributed in the hope that it will be useful, 1322 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1323 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1324 // Lesser General Public License for more details. 1325 // 1326 // You should have received a copy of the GNU Lesser General Public 1327 // License along with the GNU C Library; if not, see 1328 // <https://www.gnu.org/licenses/>. 1329 1330 // Arch-specific definitions. Each architecture must define the following 1331 // macros to define the expected sizes of pthread data types: 1332 // 1333 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 1334 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 1335 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 1336 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 1337 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 1338 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 1339 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 1340 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 1341 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 1342 // 1343 // The additional macro defines any constraint for the lock alignment 1344 // inside the thread structures: 1345 // 1346 // __LOCK_ALIGNMENT - for internal lock/futex usage. 1347 // 1348 // Same idea but for the once locking primitive: 1349 // 1350 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 1351 1352 // Machine-specific pthread type layouts. Generic version. 1353 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 1354 // 1355 // This file is part of the GNU C Library. 1356 // 1357 // The GNU C Library is free software; you can redistribute it and/or 1358 // modify it under the terms of the GNU Lesser General Public 1359 // License as published by the Free Software Foundation; either 1360 // version 2.1 of the License, or (at your option) any later version. 1361 // 1362 // The GNU C Library is distributed in the hope that it will be useful, 1363 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1364 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1365 // Lesser General Public License for more details. 1366 // 1367 // You should have received a copy of the GNU Lesser General Public 1368 // License along with the GNU C Library; if not, see 1369 // <http://www.gnu.org/licenses/>. 1370 1371 // Determine the wordsize from the preprocessor defines. 1372 1373 // Common definition of pthread_mutex_t. 1374 1375 type X__pthread_internal_list = struct { 1376 F__prev uintptr 1377 F__next uintptr 1378 } /* thread-shared-types.h:49:9 */ 1379 1380 // Type to count file system inodes. 1381 1382 // Now add the thread types. 1383 // Declaration of common pthread types for all architectures. 1384 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 1385 // This file is part of the GNU C Library. 1386 // 1387 // The GNU C Library is free software; you can redistribute it and/or 1388 // modify it under the terms of the GNU Lesser General Public 1389 // License as published by the Free Software Foundation; either 1390 // version 2.1 of the License, or (at your option) any later version. 1391 // 1392 // The GNU C Library is distributed in the hope that it will be useful, 1393 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1394 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1395 // Lesser General Public License for more details. 1396 // 1397 // You should have received a copy of the GNU Lesser General Public 1398 // License along with the GNU C Library; if not, see 1399 // <https://www.gnu.org/licenses/>. 1400 1401 // For internal mutex and condition variable definitions. 1402 // Common threading primitives definitions for both POSIX and C11. 1403 // Copyright (C) 2017-2020 Free Software Foundation, Inc. 1404 // This file is part of the GNU C Library. 1405 // 1406 // The GNU C Library is free software; you can redistribute it and/or 1407 // modify it under the terms of the GNU Lesser General Public 1408 // License as published by the Free Software Foundation; either 1409 // version 2.1 of the License, or (at your option) any later version. 1410 // 1411 // The GNU C Library is distributed in the hope that it will be useful, 1412 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1413 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1414 // Lesser General Public License for more details. 1415 // 1416 // You should have received a copy of the GNU Lesser General Public 1417 // License along with the GNU C Library; if not, see 1418 // <https://www.gnu.org/licenses/>. 1419 1420 // Arch-specific definitions. Each architecture must define the following 1421 // macros to define the expected sizes of pthread data types: 1422 // 1423 // __SIZEOF_PTHREAD_ATTR_T - size of pthread_attr_t. 1424 // __SIZEOF_PTHREAD_MUTEX_T - size of pthread_mutex_t. 1425 // __SIZEOF_PTHREAD_MUTEXATTR_T - size of pthread_mutexattr_t. 1426 // __SIZEOF_PTHREAD_COND_T - size of pthread_cond_t. 1427 // __SIZEOF_PTHREAD_CONDATTR_T - size of pthread_condattr_t. 1428 // __SIZEOF_PTHREAD_RWLOCK_T - size of pthread_rwlock_t. 1429 // __SIZEOF_PTHREAD_RWLOCKATTR_T - size of pthread_rwlockattr_t. 1430 // __SIZEOF_PTHREAD_BARRIER_T - size of pthread_barrier_t. 1431 // __SIZEOF_PTHREAD_BARRIERATTR_T - size of pthread_barrierattr_t. 1432 // 1433 // The additional macro defines any constraint for the lock alignment 1434 // inside the thread structures: 1435 // 1436 // __LOCK_ALIGNMENT - for internal lock/futex usage. 1437 // 1438 // Same idea but for the once locking primitive: 1439 // 1440 // __ONCE_ALIGNMENT - for pthread_once_t/once_flag definition. 1441 1442 // Machine-specific pthread type layouts. Generic version. 1443 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 1444 // 1445 // This file is part of the GNU C Library. 1446 // 1447 // The GNU C Library is free software; you can redistribute it and/or 1448 // modify it under the terms of the GNU Lesser General Public 1449 // License as published by the Free Software Foundation; either 1450 // version 2.1 of the License, or (at your option) any later version. 1451 // 1452 // The GNU C Library is distributed in the hope that it will be useful, 1453 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1454 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1455 // Lesser General Public License for more details. 1456 // 1457 // You should have received a copy of the GNU Lesser General Public 1458 // License along with the GNU C Library; if not, see 1459 // <http://www.gnu.org/licenses/>. 1460 1461 // Determine the wordsize from the preprocessor defines. 1462 1463 // Common definition of pthread_mutex_t. 1464 1465 type X__pthread_list_t = X__pthread_internal_list /* thread-shared-types.h:53:3 */ 1466 1467 type X__pthread_internal_slist = struct{ F__next uintptr } /* thread-shared-types.h:55:9 */ 1468 1469 type X__pthread_slist_t = X__pthread_internal_slist /* thread-shared-types.h:58:3 */ 1470 1471 // Arch-specific mutex definitions. A generic implementation is provided 1472 // by sysdeps/nptl/bits/struct_mutex.h. If required, an architecture 1473 // can override it by defining: 1474 // 1475 // 1. struct __pthread_mutex_s (used on both pthread_mutex_t and mtx_t 1476 // definition). It should contains at least the internal members 1477 // defined in the generic version. 1478 // 1479 // 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with 1480 // atomic operations. 1481 // 1482 // 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization. 1483 // It should initialize the mutex internal flag. 1484 1485 // S390 internal mutex struct definitions. 1486 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 1487 // This file is part of the GNU C Library. 1488 // 1489 // The GNU C Library is free software; you can redistribute it and/or 1490 // modify it under the terms of the GNU Lesser General Public 1491 // License as published by the Free Software Foundation; either 1492 // version 2.1 of the License, or (at your option) any later version. 1493 // 1494 // The GNU C Library is distributed in the hope that it will be useful, 1495 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1496 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1497 // Lesser General Public License for more details. 1498 // 1499 // You should have received a copy of the GNU Lesser General Public 1500 // License along with the GNU C Library; if not, see 1501 // <http://www.gnu.org/licenses/>. 1502 1503 type X__pthread_mutex_s = struct { 1504 F__lock int32 1505 F__count uint32 1506 F__owner int32 1507 F__nusers uint32 1508 F__kind int32 1509 F__spins int16 1510 F__elision int16 1511 F__list X__pthread_list_t 1512 } /* struct_mutex.h:22:1 */ 1513 1514 // Arch-sepecific read-write lock definitions. A generic implementation is 1515 // provided by struct_rwlock.h. If required, an architecture can override it 1516 // by defining: 1517 // 1518 // 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition). 1519 // It should contain at least the internal members defined in the 1520 // generic version. 1521 // 1522 // 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization. 1523 // It should initialize the rwlock internal type. 1524 1525 // S390 internal rwlock struct definitions. 1526 // Copyright (C) 2019-2020 Free Software Foundation, Inc. 1527 // 1528 // This file is part of the GNU C Library. 1529 // 1530 // The GNU C Library is free software; you can redistribute it and/or 1531 // modify it under the terms of the GNU Lesser General Public 1532 // License as published by the Free Software Foundation; either 1533 // version 2.1 of the License, or (at your option) any later version. 1534 // 1535 // The GNU C Library is distributed in the hope that it will be useful, 1536 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1537 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1538 // Lesser General Public License for more details. 1539 // 1540 // You should have received a copy of the GNU Lesser General Public 1541 // License along with the GNU C Library; if not, see 1542 // <http://www.gnu.org/licenses/>. 1543 1544 type X__pthread_rwlock_arch_t = struct { 1545 F__readers uint32 1546 F__writers uint32 1547 F__wrphase_futex uint32 1548 F__writers_futex uint32 1549 F__pad3 uint32 1550 F__pad4 uint32 1551 F__cur_writer int32 1552 F__shared int32 1553 F__pad1 uint64 1554 F__pad2 uint64 1555 F__flags uint32 1556 F__ccgo_pad1 [4]byte 1557 } /* struct_rwlock.h:23:1 */ 1558 1559 // Common definition of pthread_cond_t. 1560 1561 type X__pthread_cond_s = struct { 1562 F__0 struct{ F__wseq uint64 } 1563 F__8 struct{ F__g1_start uint64 } 1564 F__g_refs [2]uint32 1565 F__g_size [2]uint32 1566 F__g1_orig_size uint32 1567 F__wrefs uint32 1568 F__g_signals [2]uint32 1569 } /* thread-shared-types.h:92:1 */ 1570 1571 // Thread identifiers. The structure of the attribute type is not 1572 // 1573 // exposed on purpose. 1574 type Pthread_t = uint64 /* pthreadtypes.h:27:27 */ 1575 1576 // Data structures for mutex handling. The structure of the attribute 1577 // 1578 // type is not exposed on purpose. 1579 type Pthread_mutexattr_t = struct { 1580 F__ccgo_pad1 [0]uint32 1581 F__size [4]uint8 1582 } /* pthreadtypes.h:36:3 */ 1583 1584 // Data structure for condition variable handling. The structure of 1585 // 1586 // the attribute type is not exposed on purpose. 1587 type Pthread_condattr_t = struct { 1588 F__ccgo_pad1 [0]uint32 1589 F__size [4]uint8 1590 } /* pthreadtypes.h:45:3 */ 1591 1592 // Keys for thread-specific data 1593 type Pthread_key_t = uint32 /* pthreadtypes.h:49:22 */ 1594 1595 // Once-only execution 1596 type Pthread_once_t = int32 /* pthreadtypes.h:53:30 */ 1597 1598 type Pthread_attr_t1 = struct { 1599 F__ccgo_pad1 [0]uint64 1600 F__size [56]uint8 1601 } /* pthreadtypes.h:56:1 */ 1602 1603 type Pthread_attr_t = Pthread_attr_t1 /* pthreadtypes.h:62:30 */ 1604 1605 type Pthread_mutex_t = struct{ F__data X__pthread_mutex_s } /* pthreadtypes.h:72:3 */ 1606 1607 type Pthread_cond_t = struct{ F__data X__pthread_cond_s } /* pthreadtypes.h:80:3 */ 1608 1609 // Data structure for reader-writer lock variable handling. The 1610 // 1611 // structure of the attribute type is deliberately not exposed. 1612 type Pthread_rwlock_t = struct{ F__data X__pthread_rwlock_arch_t } /* pthreadtypes.h:91:3 */ 1613 1614 type Pthread_rwlockattr_t = struct { 1615 F__ccgo_pad1 [0]uint64 1616 F__size [8]uint8 1617 } /* pthreadtypes.h:97:3 */ 1618 1619 // POSIX spinlock data type. 1620 type Pthread_spinlock_t = int32 /* pthreadtypes.h:103:22 */ 1621 1622 // POSIX barriers data type. The structure of the type is 1623 // 1624 // deliberately not exposed. 1625 type Pthread_barrier_t = struct { 1626 F__ccgo_pad1 [0]uint64 1627 F__size [32]uint8 1628 } /* pthreadtypes.h:112:3 */ 1629 1630 type Pthread_barrierattr_t = struct { 1631 F__ccgo_pad1 [0]uint32 1632 F__size [4]uint8 1633 } /* pthreadtypes.h:118:3 */ 1634 1635 // Type for length arguments in socket calls. 1636 type Socklen_t = X__socklen_t /* socket.h:33:21 */ 1637 1638 // Protocol families. 1639 1640 // Address families. 1641 1642 // Socket level values. Others are defined in the appropriate headers. 1643 // 1644 // XXX These definitions also should go into the appropriate headers as 1645 // far as they are available. 1646 1647 // Maximum queue length specifiable by listen. 1648 1649 // Get the definition of the macro to define the common sockaddr members. 1650 // Definition of struct sockaddr_* common members and sizes, generic version. 1651 // Copyright (C) 1995-2020 Free Software Foundation, Inc. 1652 // This file is part of the GNU C Library. 1653 // 1654 // The GNU C Library is free software; you can redistribute it and/or 1655 // modify it under the terms of the GNU Lesser General Public 1656 // License as published by the Free Software Foundation; either 1657 // version 2.1 of the License, or (at your option) any later version. 1658 // 1659 // The GNU C Library is distributed in the hope that it will be useful, 1660 // but WITHOUT ANY WARRANTY; without even the implied warranty of 1661 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1662 // Lesser General Public License for more details. 1663 // 1664 // You should have received a copy of the GNU Lesser General Public 1665 // License along with the GNU C Library; if not, see 1666 // <https://www.gnu.org/licenses/>. 1667 1668 // Never include this file directly; use <sys/socket.h> instead. 1669 1670 // POSIX.1g specifies this type name for the `sa_family' member. 1671 type Sa_family_t = uint16 /* sockaddr.h:28:28 */ 1672 1673 // This macro is used to declare the initial common members 1674 // of the data types used for socket addresses, `struct sockaddr', 1675 // `struct sockaddr_in', `struct sockaddr_un', etc. 1676 1677 // Size of struct sockaddr_storage. 1678 1679 // Structure describing a generic socket address. 1680 type Sockaddr = struct { 1681 Fsa_family Sa_family_t 1682 Fsa_data [14]uint8 1683 } /* socket.h:178:1 */ 1684 1685 // Structure large enough to hold any socket address (with the historical 1686 // exception of AF_UNIX). 1687 1688 type Sockaddr_storage = struct { 1689 Fss_family Sa_family_t 1690 F__ss_padding [118]uint8 1691 F__ss_align uint64 1692 } /* socket.h:191:1 */ 1693 1694 // Structure describing messages sent by 1695 // 1696 // `sendmsg' and received by `recvmsg'. 1697 type Msghdr = struct { 1698 Fmsg_name uintptr 1699 Fmsg_namelen Socklen_t 1700 F__ccgo_pad1 [4]byte 1701 Fmsg_iov uintptr 1702 Fmsg_iovlen Size_t 1703 Fmsg_control uintptr 1704 Fmsg_controllen Size_t 1705 Fmsg_flags int32 1706 F__ccgo_pad2 [4]byte 1707 } /* socket.h:257:1 */ 1708 1709 // Structure used for storage of ancillary data object information. 1710 type Cmsghdr = struct { 1711 F__ccgo_pad1 [0]uint64 1712 Fcmsg_len Size_t 1713 Fcmsg_level int32 1714 Fcmsg_type int32 1715 } /* socket.h:275:1 */ 1716 1717 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 1718 1719 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 1720 1721 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 1722 1723 // This allows for 1024 file descriptors: if NR_OPEN is ever grown 1724 // beyond that you'll have to change this too. But 1024 fd's seem to be 1725 // enough even for such "real" unices like OSF/1, so hopefully this is 1726 // one limit that doesn't have to be changed [again]. 1727 // 1728 // Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in 1729 // <sys/time.h> (and thus <linux/time.h>) - but this is a more logical 1730 // place for them. Solved by having dummy defines in <sys/time.h>. 1731 1732 // This macro may have been defined in <gnu/types.h>. But we always 1733 // use the one here. 1734 1735 type X__kernel_fd_set = struct{ Ffds_bits [16]uint64 } /* posix_types.h:27:3 */ 1736 1737 // Type of a signal handler. 1738 type X__kernel_sighandler_t = uintptr /* posix_types.h:30:14 */ 1739 1740 // Type of a SYSV IPC key. 1741 type X__kernel_key_t = int32 /* posix_types.h:33:13 */ 1742 type X__kernel_mqd_t = int32 /* posix_types.h:34:13 */ 1743 1744 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 1745 // S390 version 1746 // 1747 1748 // This file is generally used by user-level software, so you need to 1749 // be a little careful about namespace pollution etc. Also, we cannot 1750 // assume GCC is being used. 1751 1752 type X__kernel_size_t = uint64 /* posix_types.h:16:25 */ 1753 type X__kernel_ssize_t = int64 /* posix_types.h:17:25 */ 1754 1755 type X__kernel_old_dev_t = uint16 /* posix_types.h:20:24 */ 1756 1757 type X__kernel_ino_t = uint32 /* posix_types.h:35:25 */ 1758 type X__kernel_mode_t = uint32 /* posix_types.h:36:25 */ 1759 type X__kernel_ipc_pid_t = int32 /* posix_types.h:37:25 */ 1760 type X__kernel_uid_t = uint32 /* posix_types.h:38:25 */ 1761 type X__kernel_gid_t = uint32 /* posix_types.h:39:25 */ 1762 type X__kernel_ptrdiff_t = int64 /* posix_types.h:40:25 */ 1763 type X__kernel_sigset_t = uint64 /* posix_types.h:41:25 */ // at least 32 bits 1764 1765 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 1766 1767 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 1768 1769 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 1770 1771 // There seems to be no way of detecting this automatically from user 1772 // space, so 64 bit architectures should override this in their 1773 // bitsperlong.h. In particular, an architecture that supports 1774 // both 32 and 64 bit user space must not rely on CONFIG_64BIT 1775 // to decide it, but rather check a compiler provided macro. 1776 1777 // This file is generally used by user-level software, so you need to 1778 // be a little careful about namespace pollution etc. 1779 // 1780 // First the types that are often defined in different ways across 1781 // architectures, so that you can override them. 1782 1783 type X__kernel_long_t = int64 /* posix_types.h:15:15 */ 1784 type X__kernel_ulong_t = uint64 /* posix_types.h:16:23 */ 1785 1786 type X__kernel_pid_t = int32 /* posix_types.h:28:14 */ 1787 1788 type X__kernel_suseconds_t = X__kernel_long_t /* posix_types.h:41:26 */ 1789 1790 type X__kernel_daddr_t = int32 /* posix_types.h:45:14 */ 1791 1792 type X__kernel_uid32_t = uint32 /* posix_types.h:49:22 */ 1793 type X__kernel_gid32_t = uint32 /* posix_types.h:50:22 */ 1794 1795 type X__kernel_old_uid_t = X__kernel_uid_t /* posix_types.h:54:24 */ 1796 type X__kernel_old_gid_t = X__kernel_gid_t /* posix_types.h:55:24 */ 1797 1798 // Most 32 bit architectures use "unsigned int" size_t, 1799 // and all 64 bit architectures use "unsigned long" size_t. 1800 1801 type X__kernel_fsid_t = struct{ Fval [2]int32 } /* posix_types.h:81:3 */ 1802 1803 // anything below here should be completely generic 1804 type X__kernel_off_t = X__kernel_long_t /* posix_types.h:87:25 */ 1805 type X__kernel_loff_t = int64 /* posix_types.h:88:19 */ 1806 type X__kernel_old_time_t = X__kernel_long_t /* posix_types.h:89:25 */ 1807 type X__kernel_time_t = X__kernel_long_t /* posix_types.h:90:25 */ 1808 type X__kernel_time64_t = int64 /* posix_types.h:91:19 */ 1809 type X__kernel_clock_t = X__kernel_long_t /* posix_types.h:92:25 */ 1810 type X__kernel_timer_t = int32 /* posix_types.h:93:14 */ 1811 type X__kernel_clockid_t = int32 /* posix_types.h:94:14 */ 1812 type X__kernel_caddr_t = uintptr /* posix_types.h:95:14 */ 1813 type X__kernel_uid16_t = uint16 /* posix_types.h:96:24 */ 1814 type X__kernel_gid16_t = uint16 /* posix_types.h:97:24 */ 1815 1816 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note 1817 1818 // Socket-level I/O control calls. 1819 1820 // For setsockopt(2) 1821 1822 // Security levels - as per NRL IPv6 - don't actually do anything 1823 1824 // Socket filtering 1825 1826 // Instruct lower device to use last 4-bytes of skb data as FCS 1827 1828 // on 64-bit and x32, avoid the ?: operator 1829 1830 // Structure used to manipulate the SO_LINGER option. 1831 type Linger = struct { 1832 Fl_onoff int32 1833 Fl_linger int32 1834 } /* socket.h:361:1 */ 1835 1836 // This is the 4.3 BSD `struct sockaddr' format, which is used as wire 1837 // 1838 // format in the grotty old 4.3 `talk' protocol. 1839 type Osockaddr = struct { 1840 Fsa_family uint16 1841 Fsa_data [14]uint8 1842 } /* struct_osockaddr.h:6:1 */ 1843 1844 // Define some macros helping to catch buffer overflows. 1845 1846 var _ uint8 /* gen.c:2:13: */