stdio_linux_s390x.go (21940B)
1 // Code generated by 'ccgo stdio/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 stdio/stdio_linux_s390x.go -pkgname stdio', DO NOT EDIT. 2 3 package stdio 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 BUFSIZ = 8192 19 EOF = -1 20 FILENAME_MAX = 4096 21 FOPEN_MAX = 16 22 L_ctermid = 9 23 L_tmpnam = 20 24 P_tmpdir = "/tmp" 25 SEEK_CUR = 1 26 SEEK_END = 2 27 SEEK_SET = 0 28 TMP_MAX = 238328 29 X_ATFILE_SOURCE = 1 30 X_BITS_STDIO_LIM_H = 1 31 X_BITS_TIME64_H = 1 32 X_BITS_TYPESIZES_H = 1 33 X_BITS_TYPES_H = 1 34 X_BSD_SIZE_T_ = 0 35 X_BSD_SIZE_T_DEFINED_ = 0 36 X_DEFAULT_SOURCE = 1 37 X_FEATURES_H = 1 38 X_FILE_OFFSET_BITS = 64 39 X_GCC_SIZE_T = 0 40 X_IOFBF = 0 41 X_IOLBF = 1 42 X_IONBF = 2 43 X_IO_EOF_SEEN = 0x0010 44 X_IO_ERR_SEEN = 0x0020 45 X_IO_USER_LOCK = 0x8000 46 X_LP64 = 1 47 X_POSIX_C_SOURCE = 200809 48 X_POSIX_SOURCE = 1 49 X_SIZET_ = 0 50 X_SIZE_T = 0 51 X_SIZE_T_ = 0 52 X_SIZE_T_DECLARED = 0 53 X_SIZE_T_DEFINED = 0 54 X_SIZE_T_DEFINED_ = 0 55 X_STDC_PREDEF_H = 1 56 X_STDIO_H = 1 57 X_SYS_CDEFS_H = 1 58 X_SYS_SIZE_T_H = 0 59 X_T_SIZE = 0 60 X_T_SIZE_ = 0 61 X_VA_LIST_DEFINED = 0 62 Linux = 1 63 Unix = 1 64 ) 65 66 type Ptrdiff_t = int64 /* <builtin>:3:26 */ 67 68 type Size_t = uint64 /* <builtin>:9:23 */ 69 70 type Wchar_t = int32 /* <builtin>:15:24 */ 71 72 type X__int128_t = struct { 73 Flo int64 74 Fhi int64 75 } /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128 76 type X__uint128_t = struct { 77 Flo uint64 78 Fhi uint64 79 } /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128 80 81 type X__builtin_va_list = uintptr /* <builtin>:46:14 */ 82 type X__float128 = float64 /* <builtin>:47:21 */ 83 84 // Wide character type. 85 // Locale-writers should change this as necessary to 86 // be big enough to hold unique values not between 0 and 127, 87 // and not (wchar_t) -1, for each defined multibyte character. 88 89 // Define this type if we are doing the whole job, 90 // or if we want this type in particular. 91 92 // A null pointer constant. 93 94 // Copyright (C) 1989-2020 Free Software Foundation, Inc. 95 // 96 // This file is part of GCC. 97 // 98 // GCC is free software; you can redistribute it and/or modify 99 // it under the terms of the GNU General Public License as published by 100 // the Free Software Foundation; either version 3, or (at your option) 101 // any later version. 102 // 103 // GCC is distributed in the hope that it will be useful, 104 // but WITHOUT ANY WARRANTY; without even the implied warranty of 105 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 106 // GNU General Public License for more details. 107 // 108 // Under Section 7 of GPL version 3, you are granted additional 109 // permissions described in the GCC Runtime Library Exception, version 110 // 3.1, as published by the Free Software Foundation. 111 // 112 // You should have received a copy of the GNU General Public License and 113 // a copy of the GCC Runtime Library Exception along with this program; 114 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 115 // <http://www.gnu.org/licenses/>. 116 117 // ISO C Standard: 7.15 Variable arguments <stdarg.h> 118 119 // Define __gnuc_va_list. 120 121 type X__gnuc_va_list = X__builtin_va_list /* stdarg.h:40:27 */ 122 123 // Define the standard macros for the user, 124 // if this invocation was from the user program. 125 126 // bits/types.h -- definitions of __*_t types underlying *_t types. 127 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 128 // This file is part of the GNU C Library. 129 // 130 // The GNU C Library is free software; you can redistribute it and/or 131 // modify it under the terms of the GNU Lesser General Public 132 // License as published by the Free Software Foundation; either 133 // version 2.1 of the License, or (at your option) any later version. 134 // 135 // The GNU C Library is distributed in the hope that it will be useful, 136 // but WITHOUT ANY WARRANTY; without even the implied warranty of 137 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 138 // Lesser General Public License for more details. 139 // 140 // You should have received a copy of the GNU Lesser General Public 141 // License along with the GNU C Library; if not, see 142 // <https://www.gnu.org/licenses/>. 143 144 // Never include this file directly; use <sys/types.h> instead. 145 146 // Copyright (C) 1991-2020 Free Software Foundation, Inc. 147 // This file is part of the GNU C Library. 148 // 149 // The GNU C Library is free software; you can redistribute it and/or 150 // modify it under the terms of the GNU Lesser General Public 151 // License as published by the Free Software Foundation; either 152 // version 2.1 of the License, or (at your option) any later version. 153 // 154 // The GNU C Library is distributed in the hope that it will be useful, 155 // but WITHOUT ANY WARRANTY; without even the implied warranty of 156 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 157 // Lesser General Public License for more details. 158 // 159 // You should have received a copy of the GNU Lesser General Public 160 // License along with the GNU C Library; if not, see 161 // <https://www.gnu.org/licenses/>. 162 163 // Determine the wordsize from the preprocessor defines. 164 165 // Bit size of the time_t type at glibc build time, general case. 166 // Copyright (C) 2018-2020 Free Software Foundation, Inc. 167 // This file is part of the GNU C Library. 168 // 169 // The GNU C Library is free software; you can redistribute it and/or 170 // modify it under the terms of the GNU Lesser General Public 171 // License as published by the Free Software Foundation; either 172 // version 2.1 of the License, or (at your option) any later version. 173 // 174 // The GNU C Library is distributed in the hope that it will be useful, 175 // but WITHOUT ANY WARRANTY; without even the implied warranty of 176 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 177 // Lesser General Public License for more details. 178 // 179 // You should have received a copy of the GNU Lesser General Public 180 // License along with the GNU C Library; if not, see 181 // <https://www.gnu.org/licenses/>. 182 183 // Determine the wordsize from the preprocessor defines. 184 185 // Size in bits of the 'time_t' type of the default ABI. 186 187 // Convenience types. 188 type X__u_char = uint8 /* types.h:31:23 */ 189 type X__u_short = uint16 /* types.h:32:28 */ 190 type X__u_int = uint32 /* types.h:33:22 */ 191 type X__u_long = uint64 /* types.h:34:27 */ 192 193 // Fixed-size types, underlying types depend on word size and compiler. 194 type X__int8_t = int8 /* types.h:37:21 */ 195 type X__uint8_t = uint8 /* types.h:38:23 */ 196 type X__int16_t = int16 /* types.h:39:26 */ 197 type X__uint16_t = uint16 /* types.h:40:28 */ 198 type X__int32_t = int32 /* types.h:41:20 */ 199 type X__uint32_t = uint32 /* types.h:42:22 */ 200 type X__int64_t = int64 /* types.h:44:25 */ 201 type X__uint64_t = uint64 /* types.h:45:27 */ 202 203 // Smallest types with at least a given width. 204 type X__int_least8_t = X__int8_t /* types.h:52:18 */ 205 type X__uint_least8_t = X__uint8_t /* types.h:53:19 */ 206 type X__int_least16_t = X__int16_t /* types.h:54:19 */ 207 type X__uint_least16_t = X__uint16_t /* types.h:55:20 */ 208 type X__int_least32_t = X__int32_t /* types.h:56:19 */ 209 type X__uint_least32_t = X__uint32_t /* types.h:57:20 */ 210 type X__int_least64_t = X__int64_t /* types.h:58:19 */ 211 type X__uint_least64_t = X__uint64_t /* types.h:59:20 */ 212 213 // quad_t is also 64 bits. 214 type X__quad_t = int64 /* types.h:63:18 */ 215 type X__u_quad_t = uint64 /* types.h:64:27 */ 216 217 // Largest integral types. 218 type X__intmax_t = int64 /* types.h:72:18 */ 219 type X__uintmax_t = uint64 /* types.h:73:27 */ 220 221 // The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE 222 // macros for each of the OS types we define below. The definitions 223 // of those macros must use the following macros for underlying types. 224 // We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned 225 // variants of each of the following integer types on this machine. 226 // 227 // 16 -- "natural" 16-bit type (always short) 228 // 32 -- "natural" 32-bit type (always int) 229 // 64 -- "natural" 64-bit type (long or long long) 230 // LONG32 -- 32-bit type, traditionally long 231 // QUAD -- 64-bit type, traditionally long long 232 // WORD -- natural type of __WORDSIZE bits (int or long) 233 // LONGWORD -- type of __WORDSIZE bits, traditionally long 234 // 235 // We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the 236 // conventional uses of `long' or `long long' type modifiers match the 237 // types we define, even when a less-adorned type would be the same size. 238 // This matters for (somewhat) portably writing printf/scanf formats for 239 // these types, where using the appropriate l or ll format modifiers can 240 // make the typedefs and the formats match up across all GNU platforms. If 241 // we used `long' when it's 64 bits where `long long' is expected, then the 242 // compiler would warn about the formats not matching the argument types, 243 // and the programmer changing them to shut up the compiler would break the 244 // program's portability. 245 // 246 // Here we assume what is presently the case in all the GCC configurations 247 // we support: long long is always 64 bits, long is always word/address size, 248 // and int is always 32 bits. 249 250 // No need to mark the typedef with __extension__. 251 // bits/typesizes.h -- underlying types for *_t. Linux/s390 version. 252 // Copyright (C) 2003-2020 Free Software Foundation, Inc. 253 // This file is part of the GNU C Library. 254 // 255 // The GNU C Library is free software; you can redistribute it and/or 256 // modify it under the terms of the GNU Lesser General Public 257 // License as published by the Free Software Foundation; either 258 // version 2.1 of the License, or (at your option) any later version. 259 // 260 // The GNU C Library is distributed in the hope that it will be useful, 261 // but WITHOUT ANY WARRANTY; without even the implied warranty of 262 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 263 // Lesser General Public License for more details. 264 // 265 // You should have received a copy of the GNU Lesser General Public 266 // License along with the GNU C Library; if not, see 267 // <https://www.gnu.org/licenses/>. 268 269 // See <bits/types.h> for the meaning of these macros. This file exists so 270 // that <bits/types.h> need not vary across different GNU platforms. 271 272 // size_t is unsigned long int on s390 -m31. 273 274 // Tell the libc code that off_t and off64_t are actually the same type 275 // for all ABI purposes, even if possibly expressed as different base types 276 // for C type-checking purposes. 277 278 // Same for ino_t and ino64_t. 279 280 // And for __rlim_t and __rlim64_t. 281 282 // And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. 283 284 // Number of descriptors that can fit in an `fd_set'. 285 286 // bits/time64.h -- underlying types for __time64_t. Generic version. 287 // Copyright (C) 2018-2020 Free Software Foundation, Inc. 288 // This file is part of the GNU C Library. 289 // 290 // The GNU C Library is free software; you can redistribute it and/or 291 // modify it under the terms of the GNU Lesser General Public 292 // License as published by the Free Software Foundation; either 293 // version 2.1 of the License, or (at your option) any later version. 294 // 295 // The GNU C Library is distributed in the hope that it will be useful, 296 // but WITHOUT ANY WARRANTY; without even the implied warranty of 297 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 298 // Lesser General Public License for more details. 299 // 300 // You should have received a copy of the GNU Lesser General Public 301 // License along with the GNU C Library; if not, see 302 // <https://www.gnu.org/licenses/>. 303 304 // Define __TIME64_T_TYPE so that it is always a 64-bit type. 305 306 // If we already have 64-bit time type then use it. 307 308 type X__dev_t = uint64 /* types.h:145:25 */ // Type of device numbers. 309 type X__uid_t = uint32 /* types.h:146:25 */ // Type of user identifications. 310 type X__gid_t = uint32 /* types.h:147:25 */ // Type of group identifications. 311 type X__ino_t = uint64 /* types.h:148:25 */ // Type of file serial numbers. 312 type X__ino64_t = uint64 /* types.h:149:27 */ // Type of file serial numbers (LFS). 313 type X__mode_t = uint32 /* types.h:150:26 */ // Type of file attribute bitmasks. 314 type X__nlink_t = uint64 /* types.h:151:27 */ // Type of file link counts. 315 type X__off_t = int64 /* types.h:152:25 */ // Type of file sizes and offsets. 316 type X__off64_t = int64 /* types.h:153:27 */ // Type of file sizes and offsets (LFS). 317 type X__pid_t = int32 /* types.h:154:25 */ // Type of process identifications. 318 type X__fsid_t = struct{ F__val [2]int32 } /* types.h:155:26 */ // Type of file system IDs. 319 type X__clock_t = int64 /* types.h:156:27 */ // Type of CPU usage counts. 320 type X__rlim_t = uint64 /* types.h:157:26 */ // Type for resource measurement. 321 type X__rlim64_t = uint64 /* types.h:158:28 */ // Type for resource measurement (LFS). 322 type X__id_t = uint32 /* types.h:159:24 */ // General type for IDs. 323 type X__time_t = int64 /* types.h:160:26 */ // Seconds since the Epoch. 324 type X__useconds_t = uint32 /* types.h:161:30 */ // Count of microseconds. 325 type X__suseconds_t = int64 /* types.h:162:31 */ // Signed count of microseconds. 326 327 type X__daddr_t = int32 /* types.h:164:27 */ // The type of a disk address. 328 type X__key_t = int32 /* types.h:165:25 */ // Type of an IPC key. 329 330 // Clock ID used in clock and timer functions. 331 type X__clockid_t = int32 /* types.h:168:29 */ 332 333 // Timer ID returned by `timer_create'. 334 type X__timer_t = uintptr /* types.h:171:12 */ 335 336 // Type to represent block size. 337 type X__blksize_t = int64 /* types.h:174:29 */ 338 339 // Types from the Large File Support interface. 340 341 // Type to count number of disk blocks. 342 type X__blkcnt_t = int64 /* types.h:179:28 */ 343 type X__blkcnt64_t = int64 /* types.h:180:30 */ 344 345 // Type to count file system blocks. 346 type X__fsblkcnt_t = uint64 /* types.h:183:30 */ 347 type X__fsblkcnt64_t = uint64 /* types.h:184:32 */ 348 349 // Type to count file system nodes. 350 type X__fsfilcnt_t = uint64 /* types.h:187:30 */ 351 type X__fsfilcnt64_t = uint64 /* types.h:188:32 */ 352 353 // Type of miscellaneous file system fields. 354 type X__fsword_t = int64 /* types.h:191:28 */ 355 356 type X__ssize_t = int64 /* types.h:193:27 */ // Type of a byte count, or error. 357 358 // Signed long type used in system calls. 359 type X__syscall_slong_t = int64 /* types.h:196:33 */ 360 // Unsigned long type used in system calls. 361 type X__syscall_ulong_t = uint64 /* types.h:198:33 */ 362 363 // These few don't really vary by system, they always correspond 364 // 365 // to one of the other defined types. 366 type X__loff_t = X__off64_t /* types.h:202:19 */ // Type of file sizes and offsets (LFS). 367 type X__caddr_t = uintptr /* types.h:203:14 */ 368 369 // Duplicates info from stdint.h but this is used in unistd.h. 370 type X__intptr_t = int64 /* types.h:206:25 */ 371 372 // Duplicate info from sys/socket.h. 373 type X__socklen_t = uint32 /* types.h:209:23 */ 374 375 // C99: An integer type that can be accessed as an atomic entity, 376 // 377 // even in the presence of asynchronous interrupts. 378 // It is not currently necessary for this to be machine-specific. 379 type X__sig_atomic_t = int32 /* types.h:214:13 */ 380 381 // Seconds since the Epoch, visible to user code when time_t is too 382 // narrow only for consistency with the old way of widening too-narrow 383 // types. User code should never use __time64_t. 384 385 // bits/types.h -- definitions of __*_t types underlying *_t types. 386 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 387 // This file is part of the GNU C Library. 388 // 389 // The GNU C Library is free software; you can redistribute it and/or 390 // modify it under the terms of the GNU Lesser General Public 391 // License as published by the Free Software Foundation; either 392 // version 2.1 of the License, or (at your option) any later version. 393 // 394 // The GNU C Library is distributed in the hope that it will be useful, 395 // but WITHOUT ANY WARRANTY; without even the implied warranty of 396 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 397 // Lesser General Public License for more details. 398 // 399 // You should have received a copy of the GNU Lesser General Public 400 // License along with the GNU C Library; if not, see 401 // <https://www.gnu.org/licenses/>. 402 403 // Never include this file directly; use <sys/types.h> instead. 404 405 // Integral type unchanged by default argument promotions that can 406 // hold any value corresponding to members of the extended character 407 // set, as well as at least one value that does not correspond to any 408 // member of the extended character set. 409 410 // Conversion state information. 411 type X__mbstate_t = struct { 412 F__count int32 413 F__value struct{ F__wch uint32 } 414 } /* __mbstate_t.h:21:3 */ 415 416 // The tag name of this struct is _G_fpos_t to preserve historic 417 // 418 // C++ mangled names for functions taking fpos_t arguments. 419 // That name should not be used in new code. 420 type X_G_fpos_t = struct { 421 F__pos X__off_t 422 F__state X__mbstate_t 423 } /* __fpos_t.h:10:9 */ 424 425 // The tag name of this struct is _G_fpos_t to preserve historic 426 // 427 // C++ mangled names for functions taking fpos_t arguments. 428 // That name should not be used in new code. 429 type X__fpos_t = X_G_fpos_t /* __fpos_t.h:14:3 */ 430 431 // bits/types.h -- definitions of __*_t types underlying *_t types. 432 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 433 // This file is part of the GNU C Library. 434 // 435 // The GNU C Library is free software; you can redistribute it and/or 436 // modify it under the terms of the GNU Lesser General Public 437 // License as published by the Free Software Foundation; either 438 // version 2.1 of the License, or (at your option) any later version. 439 // 440 // The GNU C Library is distributed in the hope that it will be useful, 441 // but WITHOUT ANY WARRANTY; without even the implied warranty of 442 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 443 // Lesser General Public License for more details. 444 // 445 // You should have received a copy of the GNU Lesser General Public 446 // License along with the GNU C Library; if not, see 447 // <https://www.gnu.org/licenses/>. 448 449 // Never include this file directly; use <sys/types.h> instead. 450 451 // The tag name of this struct is _G_fpos64_t to preserve historic 452 // 453 // C++ mangled names for functions taking fpos_t and/or fpos64_t 454 // arguments. That name should not be used in new code. 455 type X_G_fpos64_t = struct { 456 F__pos X__off64_t 457 F__state X__mbstate_t 458 } /* __fpos64_t.h:10:9 */ 459 460 // bits/types.h -- definitions of __*_t types underlying *_t types. 461 // Copyright (C) 2002-2020 Free Software Foundation, Inc. 462 // This file is part of the GNU C Library. 463 // 464 // The GNU C Library is free software; you can redistribute it and/or 465 // modify it under the terms of the GNU Lesser General Public 466 // License as published by the Free Software Foundation; either 467 // version 2.1 of the License, or (at your option) any later version. 468 // 469 // The GNU C Library is distributed in the hope that it will be useful, 470 // but WITHOUT ANY WARRANTY; without even the implied warranty of 471 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 472 // Lesser General Public License for more details. 473 // 474 // You should have received a copy of the GNU Lesser General Public 475 // License along with the GNU C Library; if not, see 476 // <https://www.gnu.org/licenses/>. 477 478 // Never include this file directly; use <sys/types.h> instead. 479 480 // The tag name of this struct is _G_fpos64_t to preserve historic 481 // 482 // C++ mangled names for functions taking fpos_t and/or fpos64_t 483 // arguments. That name should not be used in new code. 484 type X__fpos64_t = X_G_fpos64_t /* __fpos64_t.h:14:3 */ 485 486 type X_IO_FILE = struct { 487 F_flags int32 488 F__ccgo_pad1 [4]byte 489 F_IO_read_ptr uintptr 490 F_IO_read_end uintptr 491 F_IO_read_base uintptr 492 F_IO_write_base uintptr 493 F_IO_write_ptr uintptr 494 F_IO_write_end uintptr 495 F_IO_buf_base uintptr 496 F_IO_buf_end uintptr 497 F_IO_save_base uintptr 498 F_IO_backup_base uintptr 499 F_IO_save_end uintptr 500 F_markers uintptr 501 F_chain uintptr 502 F_fileno int32 503 F_flags2 int32 504 F_old_offset X__off_t 505 F_cur_column uint16 506 F_vtable_offset int8 507 F_shortbuf [1]uint8 508 F__ccgo_pad2 [4]byte 509 F_lock uintptr 510 F_offset X__off64_t 511 F_codecvt uintptr 512 F_wide_data uintptr 513 F_freeres_list uintptr 514 F_freeres_buf uintptr 515 F__pad5 Size_t 516 F_mode int32 517 F_unused2 [20]uint8 518 } /* __FILE.h:4:1 */ 519 520 type X__FILE = X_IO_FILE /* __FILE.h:5:25 */ 521 522 // The opaque type of streams. This is the definition used elsewhere. 523 type FILE = X_IO_FILE /* FILE.h:7:25 */ 524 525 // These macros are used by bits/stdio.h and internal headers. 526 527 // Many more flag bits are defined internally. 528 529 type Va_list = X__gnuc_va_list /* stdio.h:52:24 */ 530 531 type Off_t = X__off64_t /* stdio.h:65:19 */ 532 533 type Ssize_t = X__ssize_t /* stdio.h:77:19 */ 534 535 // The type of the second argument to `fgetpos' and `fsetpos'. 536 type Fpos_t = X__fpos64_t /* stdio.h:86:20 */ 537 538 // If we are compiling with optimizing read this file. It contains 539 // several optimizing inline functions and macros. 540 541 var _ uint8 /* gen.c:2:13: */