modernc.org/z@v1.7.4/internal/minigzip_openbsd_amd64.go (about) 1 // Code generated by 'ccgo -lmodernc.org/z/lib -o internal/minigzip_openbsd_amd64.go -trace-translation-units /tmp/go-generate-4169310015/cdb.json minigzip64', DO NOT EDIT. 2 3 package main 4 5 import ( 6 "math" 7 "reflect" 8 "sync/atomic" 9 "unsafe" 10 11 "modernc.org/libc" 12 "modernc.org/libc/sys/types" 13 "modernc.org/z/lib" 14 ) 15 16 var _ = math.Pi 17 var _ reflect.Kind 18 var _ atomic.Value 19 var _ unsafe.Pointer 20 var _ *libc.TLS 21 var _ types.Size_t 22 23 func main() { libc.Start(main1) } 24 25 type ptrdiff_t = int64 /* <builtin>:3:26 */ 26 27 type size_t = uint64 /* <builtin>:9:23 */ 28 29 type wchar_t = int32 /* <builtin>:15:24 */ 30 31 type wint_t = int32 /* stddef.h:60:18 */ 32 33 type mbstate_t = struct { 34 _ [0]uint64 35 __mbstate8 [128]int8 36 } /* stddef.h:65:21 */ 37 38 type max_align_t = struct { 39 __max_align_ll int64 40 __max_align_ld float64 41 } /* stddef.h:80:3 */ 42 43 type z_size_t = size_t /* zconf.h:248:21 */ 44 45 // Maximum value for memLevel in deflateInit2 46 47 // Maximum value for windowBits in deflateInit2 and inflateInit2. 48 // WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files 49 // created by gzip. (Files created by minigzip can still be extracted by 50 // gzip.) 51 52 // The memory requirements for deflate are (in bytes): 53 // (1 << (windowBits+2)) + (1 << (memLevel+9)) 54 // that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) 55 // plus a few kilobytes for small objects. For example, if you want to reduce 56 // the default memory requirements from 256K to 128K, compile with 57 // make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" 58 // Of course this will generally degrade compression (there's no free lunch). 59 // 60 // The memory requirements for inflate are (in bytes) 1 << windowBits 61 // that is, 32K for windowBits=15 (default value) plus about 7 kilobytes 62 // for small objects. 63 64 // Type declarations 65 66 // The following definitions for FAR are needed only for MSDOS mixed 67 // model programming (small or medium model with some far allocations). 68 // This was tested only with MSC; for other MSDOS compilers you may have 69 // to define NO_MEMCPY in zutil.h. If you don't need the mixed model, 70 // just define FAR to be empty. 71 72 type Byte = uint8 /* zconf.h:391:24 */ // 8 bits 73 type uInt = uint32 /* zconf.h:393:24 */ // 16 bits or more 74 type uLong = uint64 /* zconf.h:394:24 */ // 32 bits or more 75 76 type Bytef = Byte /* zconf.h:400:22 */ 77 type charf = int8 /* zconf.h:402:19 */ 78 type intf = int32 /* zconf.h:403:19 */ 79 type uIntf = uInt /* zconf.h:404:19 */ 80 type uLongf = uLong /* zconf.h:405:19 */ 81 82 type voidpc = uintptr /* zconf.h:408:23 */ 83 type voidpf = uintptr /* zconf.h:409:23 */ 84 type voidp = uintptr /* zconf.h:410:23 */ 85 86 // $OpenBSD: limits.h,v 1.19 2015/01/20 22:09:50 tedu Exp $ 87 // $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd Exp $ 88 89 // Copyright (c) 1988 The Regents of the University of California. 90 // All rights reserved. 91 // 92 // Redistribution and use in source and binary forms, with or without 93 // modification, are permitted provided that the following conditions 94 // are met: 95 // 1. Redistributions of source code must retain the above copyright 96 // notice, this list of conditions and the following disclaimer. 97 // 2. Redistributions in binary form must reproduce the above copyright 98 // notice, this list of conditions and the following disclaimer in the 99 // documentation and/or other materials provided with the distribution. 100 // 3. Neither the name of the University nor the names of its contributors 101 // may be used to endorse or promote products derived from this software 102 // without specific prior written permission. 103 // 104 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 105 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 106 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 107 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 108 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 109 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 110 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 111 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 112 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 113 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 114 // SUCH DAMAGE. 115 // 116 // @(#)limits.h 5.9 (Berkeley) 4/3/91 117 118 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 119 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 120 121 // Copyright (c) 1991, 1993 122 // The Regents of the University of California. All rights reserved. 123 // 124 // This code is derived from software contributed to Berkeley by 125 // Berkeley Software Design, Inc. 126 // 127 // Redistribution and use in source and binary forms, with or without 128 // modification, are permitted provided that the following conditions 129 // are met: 130 // 1. Redistributions of source code must retain the above copyright 131 // notice, this list of conditions and the following disclaimer. 132 // 2. Redistributions in binary form must reproduce the above copyright 133 // notice, this list of conditions and the following disclaimer in the 134 // documentation and/or other materials provided with the distribution. 135 // 3. Neither the name of the University nor the names of its contributors 136 // may be used to endorse or promote products derived from this software 137 // without specific prior written permission. 138 // 139 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 140 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 141 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 142 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 143 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 144 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 145 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 146 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 147 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 148 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 149 // SUCH DAMAGE. 150 // 151 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 152 153 // $OpenBSD: limits.h,v 1.10 2012/06/30 20:21:10 guenther Exp $ 154 // Copyright (c) 2002 Marc Espie. 155 // 156 // Redistribution and use in source and binary forms, with or without 157 // modification, are permitted provided that the following conditions 158 // are met: 159 // 1. Redistributions of source code must retain the above copyright 160 // notice, this list of conditions and the following disclaimer. 161 // 2. Redistributions in binary form must reproduce the above copyright 162 // notice, this list of conditions and the following disclaimer in the 163 // documentation and/or other materials provided with the distribution. 164 // 165 // THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS 166 // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 167 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 168 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBSD 169 // PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 170 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 171 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 172 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 173 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 174 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 175 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 176 177 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 178 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 179 180 // Copyright (c) 1991, 1993 181 // The Regents of the University of California. All rights reserved. 182 // 183 // This code is derived from software contributed to Berkeley by 184 // Berkeley Software Design, Inc. 185 // 186 // Redistribution and use in source and binary forms, with or without 187 // modification, are permitted provided that the following conditions 188 // are met: 189 // 1. Redistributions of source code must retain the above copyright 190 // notice, this list of conditions and the following disclaimer. 191 // 2. Redistributions in binary form must reproduce the above copyright 192 // notice, this list of conditions and the following disclaimer in the 193 // documentation and/or other materials provided with the distribution. 194 // 3. Neither the name of the University nor the names of its contributors 195 // may be used to endorse or promote products derived from this software 196 // without specific prior written permission. 197 // 198 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 199 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 200 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 201 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 202 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 203 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 204 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 205 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 206 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 207 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 208 // SUCH DAMAGE. 209 // 210 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 211 212 // Common definitions for limits.h. 213 214 // Legacy 215 // $OpenBSD: limits.h,v 1.6 2015/04/30 13:42:08 millert Exp $ 216 217 // Copyright (c) 1988 The Regents of the University of California. 218 // All rights reserved. 219 // 220 // Redistribution and use in source and binary forms, with or without 221 // modification, are permitted provided that the following conditions 222 // are met: 223 // 1. Redistributions of source code must retain the above copyright 224 // notice, this list of conditions and the following disclaimer. 225 // 2. Redistributions in binary form must reproduce the above copyright 226 // notice, this list of conditions and the following disclaimer in the 227 // documentation and/or other materials provided with the distribution. 228 // 3. Neither the name of the University nor the names of its contributors 229 // may be used to endorse or promote products derived from this software 230 // without specific prior written permission. 231 // 232 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 233 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 234 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 235 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 236 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 237 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 238 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 239 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 240 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 241 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 242 // SUCH DAMAGE. 243 // 244 // @(#)limits.h 7.2 (Berkeley) 6/28/90 245 246 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 247 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 248 249 // Copyright (c) 1991, 1993 250 // The Regents of the University of California. All rights reserved. 251 // 252 // This code is derived from software contributed to Berkeley by 253 // Berkeley Software Design, Inc. 254 // 255 // Redistribution and use in source and binary forms, with or without 256 // modification, are permitted provided that the following conditions 257 // are met: 258 // 1. Redistributions of source code must retain the above copyright 259 // notice, this list of conditions and the following disclaimer. 260 // 2. Redistributions in binary form must reproduce the above copyright 261 // notice, this list of conditions and the following disclaimer in the 262 // documentation and/or other materials provided with the distribution. 263 // 3. Neither the name of the University nor the names of its contributors 264 // may be used to endorse or promote products derived from this software 265 // without specific prior written permission. 266 // 267 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 268 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 269 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 270 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 271 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 272 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 273 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 274 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 275 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 276 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 277 // SUCH DAMAGE. 278 // 279 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 280 281 // max value for unsigned long 282 // max value for a signed long 283 // min value for a signed long 284 285 // max value for unsigned long long 286 // max value for a signed long long 287 // min value for a signed long long 288 289 // $OpenBSD: syslimits.h,v 1.14 2020/04/02 18:00:00 deraadt Exp $ 290 // $NetBSD: syslimits.h,v 1.12 1995/10/05 05:26:19 thorpej Exp $ 291 292 // Copyright (c) 1988, 1993 293 // The Regents of the University of California. All rights reserved. 294 // 295 // Redistribution and use in source and binary forms, with or without 296 // modification, are permitted provided that the following conditions 297 // are met: 298 // 1. Redistributions of source code must retain the above copyright 299 // notice, this list of conditions and the following disclaimer. 300 // 2. Redistributions in binary form must reproduce the above copyright 301 // notice, this list of conditions and the following disclaimer in the 302 // documentation and/or other materials provided with the distribution. 303 // 3. Neither the name of the University nor the names of its contributors 304 // may be used to endorse or promote products derived from this software 305 // without specific prior written permission. 306 // 307 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 308 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 309 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 310 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 311 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 312 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 313 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 314 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 315 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 316 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 317 // SUCH DAMAGE. 318 // 319 // @(#)syslimits.h 8.1 (Berkeley) 6/2/93 320 321 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 322 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 323 324 // Copyright (c) 1991, 1993 325 // The Regents of the University of California. All rights reserved. 326 // 327 // This code is derived from software contributed to Berkeley by 328 // Berkeley Software Design, Inc. 329 // 330 // Redistribution and use in source and binary forms, with or without 331 // modification, are permitted provided that the following conditions 332 // are met: 333 // 1. Redistributions of source code must retain the above copyright 334 // notice, this list of conditions and the following disclaimer. 335 // 2. Redistributions in binary form must reproduce the above copyright 336 // notice, this list of conditions and the following disclaimer in the 337 // documentation and/or other materials provided with the distribution. 338 // 3. Neither the name of the University nor the names of its contributors 339 // may be used to endorse or promote products derived from this software 340 // without specific prior written permission. 341 // 342 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 343 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 344 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 345 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 346 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 347 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 348 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 349 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 350 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 351 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 352 // SUCH DAMAGE. 353 // 354 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 355 356 type z_crc_t = uint32 /* zconf.h:429:17 */ 357 358 // Tell sys/endian.h we have MD variants of the swap macros. 359 360 // Note that these macros evaluate their arguments several times. 361 362 // Public names 363 364 // These are specified to be function-like macros to match the spec 365 366 // POSIX names 367 368 // original BSD names 369 370 // these were exposed here before 371 372 // ancient stuff 373 374 type u_char = uint8 /* types.h:51:23 */ 375 type u_short = uint16 /* types.h:52:24 */ 376 type u_int = uint32 /* types.h:53:22 */ 377 type u_long = uint64 /* types.h:54:23 */ 378 379 type unchar = uint8 /* types.h:56:23 */ // Sys V compatibility 380 type ushort = uint16 /* types.h:57:24 */ // Sys V compatibility 381 type uint = uint32 /* types.h:58:22 */ // Sys V compatibility 382 type ulong = uint64 /* types.h:59:23 */ // Sys V compatibility 383 384 type cpuid_t = uint64 /* types.h:61:19 */ // CPU id 385 type register_t = int64 /* types.h:62:22 */ // register-sized type 386 387 // XXX The exact-width bit types should only be exposed if __BSD_VISIBLE 388 // but the rest of the includes are not ready for that yet. 389 390 type int8_t = int8 /* types.h:75:19 */ 391 392 type uint8_t = uint8 /* types.h:80:20 */ 393 394 type int16_t = int16 /* types.h:85:20 */ 395 396 type uint16_t = uint16 /* types.h:90:21 */ 397 398 type int32_t = int32 /* types.h:95:20 */ 399 400 type uint32_t = uint32 /* types.h:100:21 */ 401 402 type int64_t = int64 /* types.h:105:20 */ 403 404 type uint64_t = uint64 /* types.h:110:21 */ 405 406 // BSD-style unsigned bits types 407 type u_int8_t = uint8 /* types.h:114:19 */ 408 type u_int16_t = uint16 /* types.h:115:20 */ 409 type u_int32_t = uint32 /* types.h:116:20 */ 410 type u_int64_t = uint64 /* types.h:117:20 */ 411 412 // quads, deprecated in favor of 64 bit int types 413 type quad_t = int64 /* types.h:120:19 */ 414 type u_quad_t = uint64 /* types.h:121:20 */ 415 416 // VM system types 417 type vaddr_t = uint64 /* types.h:125:19 */ 418 type paddr_t = uint64 /* types.h:126:19 */ 419 type vsize_t = uint64 /* types.h:127:19 */ 420 type psize_t = uint64 /* types.h:128:19 */ 421 422 // Standard system types 423 type blkcnt_t = int64 /* types.h:132:20 */ // blocks allocated for file 424 type blksize_t = int32 /* types.h:133:21 */ // optimal blocksize for I/O 425 type caddr_t = uintptr /* types.h:134:14 */ // core address 426 type daddr32_t = int32 /* types.h:135:19 */ // 32-bit disk address 427 type daddr_t = int64 /* types.h:136:19 */ // 64-bit disk address 428 type dev_t = int32 /* types.h:137:18 */ // device number 429 type fixpt_t = uint32 /* types.h:138:19 */ // fixed point number 430 type gid_t = uint32 /* types.h:139:18 */ // group id 431 type id_t = uint32 /* types.h:140:17 */ // may contain pid, uid or gid 432 type ino_t = uint64 /* types.h:141:18 */ // inode number 433 type key_t = int64 /* types.h:142:18 */ // IPC key (for Sys V IPC) 434 type mode_t = uint32 /* types.h:143:18 */ // permissions 435 type nlink_t = uint32 /* types.h:144:19 */ // link count 436 type rlim_t = uint64 /* types.h:145:18 */ // resource limit 437 type segsz_t = int32 /* types.h:146:19 */ // segment size 438 type swblk_t = int32 /* types.h:147:19 */ // swap offset 439 type uid_t = uint32 /* types.h:148:18 */ // user id 440 type useconds_t = uint32 /* types.h:149:22 */ // microseconds 441 type suseconds_t = int64 /* types.h:150:23 */ // microseconds (signed) 442 type fsblkcnt_t = uint64 /* types.h:151:22 */ // file system block count 443 type fsfilcnt_t = uint64 /* types.h:152:22 */ // file system file count 444 445 // The following types may be defined in multiple header files. 446 type clock_t = int64 /* types.h:159:19 */ 447 448 type clockid_t = int32 /* types.h:164:21 */ 449 450 type pid_t = int32 /* types.h:169:18 */ 451 452 type ssize_t = int64 /* types.h:179:19 */ 453 454 type time_t = int64 /* types.h:184:18 */ 455 456 type timer_t = int32 /* types.h:189:19 */ 457 458 type off_t = int64 /* types.h:194:18 */ 459 460 // Note that the type used in va_arg is supposed to match the 461 // actual type **after default promotions**. 462 // Thus, va_arg (..., short) is not valid. 463 464 type va_list = uintptr /* stdarg.h:39:24 */ 465 466 // a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and 467 // "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even 468 // though the former does not conform to the LFS document), but considering 469 // both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as 470 // equivalently requesting no 64-bit operations 471 472 // $OpenBSD: unistd.h,v 1.106 2018/07/13 09:25:22 beck Exp $ 473 // $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ 474 475 // - 476 // Copyright (c) 1991 The Regents of the University of California. 477 // All rights reserved. 478 // 479 // Redistribution and use in source and binary forms, with or without 480 // modification, are permitted provided that the following conditions 481 // are met: 482 // 1. Redistributions of source code must retain the above copyright 483 // notice, this list of conditions and the following disclaimer. 484 // 2. Redistributions in binary form must reproduce the above copyright 485 // notice, this list of conditions and the following disclaimer in the 486 // documentation and/or other materials provided with the distribution. 487 // 3. Neither the name of the University nor the names of its contributors 488 // may be used to endorse or promote products derived from this software 489 // without specific prior written permission. 490 // 491 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 492 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 493 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 494 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 495 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 496 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 497 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 498 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 499 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 500 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 501 // SUCH DAMAGE. 502 // 503 // @(#)unistd.h 5.13 (Berkeley) 6/17/91 504 505 // $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ 506 507 // Written by Todd C. Miller, September 9, 2016 508 // Public domain. 509 510 // $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ 511 // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ 512 513 // - 514 // Copyright (c) 1982, 1986, 1991, 1993 515 // The Regents of the University of California. All rights reserved. 516 // (c) UNIX System Laboratories, Inc. 517 // All or some portions of this file are derived from material licensed 518 // to the University of California by American Telephone and Telegraph 519 // Co. or Unix System Laboratories, Inc. and are reproduced herein with 520 // the permission of UNIX System Laboratories, Inc. 521 // 522 // Redistribution and use in source and binary forms, with or without 523 // modification, are permitted provided that the following conditions 524 // are met: 525 // 1. Redistributions of source code must retain the above copyright 526 // notice, this list of conditions and the following disclaimer. 527 // 2. Redistributions in binary form must reproduce the above copyright 528 // notice, this list of conditions and the following disclaimer in the 529 // documentation and/or other materials provided with the distribution. 530 // 3. Neither the name of the University nor the names of its contributors 531 // may be used to endorse or promote products derived from this software 532 // without specific prior written permission. 533 // 534 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 535 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 536 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 537 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 538 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 539 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 540 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 541 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 542 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 543 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 544 // SUCH DAMAGE. 545 // 546 // @(#)types.h 8.4 (Berkeley) 1/21/94 547 548 // $OpenBSD: unistd.h,v 1.31 2015/07/20 00:56:10 guenther Exp $ 549 // $NetBSD: unistd.h,v 1.10 1994/06/29 06:46:06 cgd Exp $ 550 551 // Copyright (c) 1989, 1993 552 // The Regents of the University of California. All rights reserved. 553 // 554 // Redistribution and use in source and binary forms, with or without 555 // modification, are permitted provided that the following conditions 556 // are met: 557 // 1. Redistributions of source code must retain the above copyright 558 // notice, this list of conditions and the following disclaimer. 559 // 2. Redistributions in binary form must reproduce the above copyright 560 // notice, this list of conditions and the following disclaimer in the 561 // documentation and/or other materials provided with the distribution. 562 // 3. Neither the name of the University nor the names of its contributors 563 // may be used to endorse or promote products derived from this software 564 // without specific prior written permission. 565 // 566 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 567 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 568 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 569 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 570 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 571 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 572 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 573 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 574 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 575 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 576 // SUCH DAMAGE. 577 // 578 // @(#)unistd.h 8.2 (Berkeley) 1/7/94 579 580 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 581 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 582 583 // Copyright (c) 1991, 1993 584 // The Regents of the University of California. All rights reserved. 585 // 586 // This code is derived from software contributed to Berkeley by 587 // Berkeley Software Design, Inc. 588 // 589 // Redistribution and use in source and binary forms, with or without 590 // modification, are permitted provided that the following conditions 591 // are met: 592 // 1. Redistributions of source code must retain the above copyright 593 // notice, this list of conditions and the following disclaimer. 594 // 2. Redistributions in binary form must reproduce the above copyright 595 // notice, this list of conditions and the following disclaimer in the 596 // documentation and/or other materials provided with the distribution. 597 // 3. Neither the name of the University nor the names of its contributors 598 // may be used to endorse or promote products derived from this software 599 // without specific prior written permission. 600 // 601 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 602 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 603 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 604 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 605 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 606 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 607 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 608 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 609 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 610 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 611 // SUCH DAMAGE. 612 // 613 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 614 615 // Define the POSIX.1 version we target for compliance. 616 617 // access function 618 619 // whence values for lseek(2) 620 621 // old BSD whence values for lseek(2); renamed by POSIX 1003.1 622 623 // the parameters argument passed to the __tfork() syscall 624 type __tfork = struct { 625 tf_tcb uintptr 626 tf_tid uintptr 627 tf_stack uintptr 628 } /* unistd.h:66:1 */ 629 630 // the parameters argument for the kbind() syscall 631 type __kbind = struct { 632 kb_addr uintptr 633 kb_size size_t 634 } /* unistd.h:73:1 */ 635 636 // the pathconf(2) variable values are part of the ABI 637 638 // configurable pathname variables 639 640 // POSIX options and option groups we unconditionally do or don't 641 // implement. Please keep this list in alphabetical order. 642 // 643 // Anything which is defined as zero below **must** have an 644 // implementation for the corresponding sysconf() which is able to 645 // determine conclusively whether or not the feature is supported. 646 // Anything which is defined as other than -1 below **must** have 647 // complete headers, types, and function declarations as specified by 648 // the POSIX standard; however, if the relevant sysconf() function 649 // returns -1, the functions may be stubbed out. 650 651 // Define the POSIX.2 version we target for compliance. 652 653 // the sysconf(3) variable values are part of the ABI 654 655 // configurable system variables 656 657 // configurable system strings 658 659 type intptr_t = int64 /* unistd.h:320:21 */ 660 661 // MVS linker does not support external names larger than 8 bytes 662 663 // 664 // The 'zlib' compression library provides in-memory compression and 665 // decompression functions, including integrity checks of the uncompressed data. 666 // This version of the library supports only one compression method (deflation) 667 // but other algorithms will be added later and will have the same stream 668 // interface. 669 // 670 // Compression can be done in a single step if the buffers are large enough, 671 // or can be done by repeated calls of the compression function. In the latter 672 // case, the application must provide more input and/or consume the output 673 // (providing more output space) before each call. 674 // 675 // The compressed data format used by default by the in-memory functions is 676 // the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped 677 // around a deflate stream, which is itself documented in RFC 1951. 678 // 679 // The library also supports reading and writing files in gzip (.gz) format 680 // with an interface similar to that of stdio using the functions that start 681 // with "gz". The gzip format is different from the zlib format. gzip is a 682 // gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. 683 // 684 // This library can optionally read and write gzip and raw deflate streams in 685 // memory as well. 686 // 687 // The zlib format was designed to be compact and fast for use in memory 688 // and on communications channels. The gzip format was designed for single- 689 // file compression on file systems, has a larger header than zlib to maintain 690 // directory information, and uses a different, slower check method than zlib. 691 // 692 // The library does not install any signal handler. The decoder checks 693 // the consistency of the compressed data, so the library should never crash 694 // even in the case of corrupted input. 695 696 type alloc_func = uintptr /* zlib.h:81:16 */ 697 type free_func = uintptr /* zlib.h:82:16 */ 698 699 type z_stream_s = struct { 700 next_in uintptr 701 avail_in uInt 702 _ [4]byte 703 total_in uLong 704 next_out uintptr 705 avail_out uInt 706 _ [4]byte 707 total_out uLong 708 msg uintptr 709 state uintptr 710 zalloc alloc_func 711 zfree free_func 712 opaque voidpf 713 data_type int32 714 _ [4]byte 715 adler uLong 716 reserved uLong 717 } /* zlib.h:86:9 */ 718 719 type z_stream = z_stream_s /* zlib.h:106:3 */ 720 721 type z_streamp = uintptr /* zlib.h:108:22 */ 722 723 // 724 // gzip header information passed to and from zlib routines. See RFC 1952 725 // for more details on the meanings of these fields. 726 type gz_header_s = struct { 727 text int32 728 _ [4]byte 729 time uLong 730 xflags int32 731 os int32 732 extra uintptr 733 extra_len uInt 734 extra_max uInt 735 name uintptr 736 name_max uInt 737 _ [4]byte 738 comment uintptr 739 comm_max uInt 740 hcrc int32 741 done int32 742 _ [4]byte 743 } /* zlib.h:114:9 */ 744 745 // 746 // gzip header information passed to and from zlib routines. See RFC 1952 747 // for more details on the meanings of these fields. 748 type gz_header = gz_header_s /* zlib.h:129:3 */ 749 750 type gz_headerp = uintptr /* zlib.h:131:23 */ 751 // 752 // inflateGetHeader() requests that gzip header information be stored in the 753 // provided gz_header structure. inflateGetHeader() may be called after 754 // inflateInit2() or inflateReset(), and before the first call of inflate(). 755 // As inflate() processes the gzip stream, head->done is zero until the header 756 // is completed, at which time head->done is set to one. If a zlib stream is 757 // being decoded, then head->done is set to -1 to indicate that there will be 758 // no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be 759 // used to force inflate() to return immediately after header processing is 760 // complete and before any actual data is decompressed. 761 // 762 // The text, time, xflags, and os fields are filled in with the gzip header 763 // contents. hcrc is set to true if there is a header CRC. (The header CRC 764 // was valid if done is set to one.) If extra is not Z_NULL, then extra_max 765 // contains the maximum number of bytes to write to extra. Once done is true, 766 // extra_len contains the actual extra field length, and extra contains the 767 // extra field, or that field truncated if extra_max is less than extra_len. 768 // If name is not Z_NULL, then up to name_max characters are written there, 769 // terminated with a zero unless the length is greater than name_max. If 770 // comment is not Z_NULL, then up to comm_max characters are written there, 771 // terminated with a zero unless the length is greater than comm_max. When any 772 // of extra, name, or comment are not Z_NULL and the respective field is not 773 // present in the header, then that field is set to Z_NULL to signal its 774 // absence. This allows the use of deflateSetHeader() with the returned 775 // structure to duplicate the header. However if those fields are set to 776 // allocated memory, then the application will need to save those pointers 777 // elsewhere so that they can be eventually freed. 778 // 779 // If inflateGetHeader is not used, then the header information is simply 780 // discarded. The header is always checked for validity, including the header 781 // CRC if present. inflateReset() will reset the process to discard the header 782 // information. The application would need to call inflateGetHeader() again to 783 // retrieve the header from the next gzip stream. 784 // 785 // inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source 786 // stream state was inconsistent. 787 788 // 789 // ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, 790 // unsigned char FAR *window)); 791 // 792 // Initialize the internal stream state for decompression using inflateBack() 793 // calls. The fields zalloc, zfree and opaque in strm must be initialized 794 // before the call. If zalloc and zfree are Z_NULL, then the default library- 795 // derived memory allocation routines are used. windowBits is the base two 796 // logarithm of the window size, in the range 8..15. window is a caller 797 // supplied buffer of that size. Except for special applications where it is 798 // assured that deflate was used with small window sizes, windowBits must be 15 799 // and a 32K byte window must be supplied to be able to decompress general 800 // deflate streams. 801 // 802 // See inflateBack() for the usage of these routines. 803 // 804 // inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of 805 // the parameters are invalid, Z_MEM_ERROR if the internal state could not be 806 // allocated, or Z_VERSION_ERROR if the version of the library does not match 807 // the version of the header file. 808 809 type in_func = uintptr /* zlib.h:1092:18 */ 810 type out_func = uintptr /* zlib.h:1094:13 */ 811 // 812 // Same as uncompress, except that sourceLen is a pointer, where the 813 // length of the source is *sourceLen. On return, *sourceLen is the number of 814 // source bytes consumed. 815 816 // gzip file access functions 817 818 // 819 // This library supports reading and writing files in gzip (.gz) format with 820 // an interface similar to that of stdio, using the functions that start with 821 // "gz". The gzip format is different from the zlib format. gzip is a gzip 822 // wrapper, documented in RFC 1952, wrapped around a deflate stream. 823 824 type gzFile_s = struct { 825 have uint32 826 _ [4]byte 827 next uintptr 828 pos off_t 829 } /* zlib.h:1300:9 */ 830 831 // 832 // Same as uncompress, except that sourceLen is a pointer, where the 833 // length of the source is *sourceLen. On return, *sourceLen is the number of 834 // source bytes consumed. 835 836 // gzip file access functions 837 838 // 839 // This library supports reading and writing files in gzip (.gz) format with 840 // an interface similar to that of stdio, using the functions that start with 841 // "gz". The gzip format is different from the zlib format. gzip is a gzip 842 // wrapper, documented in RFC 1952, wrapped around a deflate stream. 843 844 type gzFile = uintptr /* zlib.h:1300:25 */ 845 846 // $OpenBSD: stdio.h,v 1.54 2020/09/11 17:56:41 naddy Exp $ 847 // $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ 848 849 // - 850 // Copyright (c) 1990 The Regents of the University of California. 851 // All rights reserved. 852 // 853 // This code is derived from software contributed to Berkeley by 854 // Chris Torek. 855 // 856 // Redistribution and use in source and binary forms, with or without 857 // modification, are permitted provided that the following conditions 858 // are met: 859 // 1. Redistributions of source code must retain the above copyright 860 // notice, this list of conditions and the following disclaimer. 861 // 2. Redistributions in binary form must reproduce the above copyright 862 // notice, this list of conditions and the following disclaimer in the 863 // documentation and/or other materials provided with the distribution. 864 // 3. Neither the name of the University nor the names of its contributors 865 // may be used to endorse or promote products derived from this software 866 // without specific prior written permission. 867 // 868 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 869 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 870 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 871 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 872 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 873 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 874 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 875 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 876 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 877 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 878 // SUCH DAMAGE. 879 // 880 // @(#)stdio.h 5.17 (Berkeley) 6/3/91 881 882 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 883 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 884 885 // Copyright (c) 1991, 1993 886 // The Regents of the University of California. All rights reserved. 887 // 888 // This code is derived from software contributed to Berkeley by 889 // Berkeley Software Design, Inc. 890 // 891 // Redistribution and use in source and binary forms, with or without 892 // modification, are permitted provided that the following conditions 893 // are met: 894 // 1. Redistributions of source code must retain the above copyright 895 // notice, this list of conditions and the following disclaimer. 896 // 2. Redistributions in binary form must reproduce the above copyright 897 // notice, this list of conditions and the following disclaimer in the 898 // documentation and/or other materials provided with the distribution. 899 // 3. Neither the name of the University nor the names of its contributors 900 // may be used to endorse or promote products derived from this software 901 // without specific prior written permission. 902 // 903 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 904 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 905 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 906 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 907 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 908 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 909 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 910 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 911 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 912 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 913 // SUCH DAMAGE. 914 // 915 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 916 917 // $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ 918 919 // Written by Todd C. Miller, September 9, 2016 920 // Public domain. 921 922 // $OpenBSD: _types.h,v 1.9 2014/08/22 23:05:15 krw Exp $ 923 924 // - 925 // Copyright (c) 1990, 1993 926 // The Regents of the University of California. All rights reserved. 927 // 928 // Redistribution and use in source and binary forms, with or without 929 // modification, are permitted provided that the following conditions 930 // are met: 931 // 1. Redistributions of source code must retain the above copyright 932 // notice, this list of conditions and the following disclaimer. 933 // 2. Redistributions in binary form must reproduce the above copyright 934 // notice, this list of conditions and the following disclaimer in the 935 // documentation and/or other materials provided with the distribution. 936 // 3. Neither the name of the University nor the names of its contributors 937 // may be used to endorse or promote products derived from this software 938 // without specific prior written permission. 939 // 940 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 941 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 942 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 943 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 944 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 945 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 946 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 947 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 948 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 949 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 950 // SUCH DAMAGE. 951 // 952 // @(#)types.h 8.3 (Berkeley) 1/5/94 953 954 // $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ 955 // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ 956 957 // - 958 // Copyright (c) 1982, 1986, 1991, 1993 959 // The Regents of the University of California. All rights reserved. 960 // (c) UNIX System Laboratories, Inc. 961 // All or some portions of this file are derived from material licensed 962 // to the University of California by American Telephone and Telegraph 963 // Co. or Unix System Laboratories, Inc. and are reproduced herein with 964 // the permission of UNIX System Laboratories, Inc. 965 // 966 // Redistribution and use in source and binary forms, with or without 967 // modification, are permitted provided that the following conditions 968 // are met: 969 // 1. Redistributions of source code must retain the above copyright 970 // notice, this list of conditions and the following disclaimer. 971 // 2. Redistributions in binary form must reproduce the above copyright 972 // notice, this list of conditions and the following disclaimer in the 973 // documentation and/or other materials provided with the distribution. 974 // 3. Neither the name of the University nor the names of its contributors 975 // may be used to endorse or promote products derived from this software 976 // without specific prior written permission. 977 // 978 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 979 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 980 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 981 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 982 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 983 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 984 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 985 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 986 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 987 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 988 // SUCH DAMAGE. 989 // 990 // @(#)types.h 8.4 (Berkeley) 1/21/94 991 992 type fpos_t = off_t /* stdio.h:61:15 */ // stdio file position type 993 994 // NB: to fit things in six character monocase externals, the stdio 995 // code uses the prefix `__s' for stdio objects, typically followed 996 // by a three-character attempt at a mnemonic. 997 998 // stdio buffers 999 type __sbuf = struct { 1000 _base uintptr 1001 _size int32 1002 _ [4]byte 1003 } /* stdio.h:70:1 */ 1004 1005 // stdio state variables. 1006 // 1007 // The following always hold: 1008 // 1009 // if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), 1010 // _lbfsize is -_bf._size, else _lbfsize is 0 1011 // if _flags&__SRD, _w is 0 1012 // if _flags&__SWR, _r is 0 1013 // 1014 // This ensures that the getc and putc macros (or inline functions) never 1015 // try to write or read from a file that is in `read' or `write' mode. 1016 // (Moreover, they can, and do, automatically switch from read mode to 1017 // write mode, and back, on "r+" and "w+" files.) 1018 // 1019 // _lbfsize is used only to make the inline line-buffered output stream 1020 // code as compact as possible. 1021 // 1022 // _ub, _up, and _ur are used when ungetc() pushes back more characters 1023 // than fit in the current _bf, or when ungetc() pushes back a character 1024 // that does not match the previous one in _bf. When this happens, 1025 // _ub._base becomes non-nil (i.e., a stream has ungetc() data iff 1026 // _ub._base!=NULL) and _up and _ur save the current values of _p and _r. 1027 type __sFILE = struct { 1028 _p uintptr 1029 _r int32 1030 _w int32 1031 _flags int16 1032 _file int16 1033 _ [4]byte 1034 _bf struct { 1035 _base uintptr 1036 _size int32 1037 _ [4]byte 1038 } 1039 _lbfsize int32 1040 _ [4]byte 1041 _cookie uintptr 1042 _close uintptr 1043 _read uintptr 1044 _seek uintptr 1045 _write uintptr 1046 _ext struct { 1047 _base uintptr 1048 _size int32 1049 _ [4]byte 1050 } 1051 _up uintptr 1052 _ur int32 1053 _ubuf [3]uint8 1054 _nbuf [1]uint8 1055 _lb struct { 1056 _base uintptr 1057 _size int32 1058 _ [4]byte 1059 } 1060 _blksize int32 1061 _ [4]byte 1062 _offset fpos_t 1063 } /* stdio.h:99:9 */ 1064 1065 // stdio state variables. 1066 // 1067 // The following always hold: 1068 // 1069 // if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR), 1070 // _lbfsize is -_bf._size, else _lbfsize is 0 1071 // if _flags&__SRD, _w is 0 1072 // if _flags&__SWR, _r is 0 1073 // 1074 // This ensures that the getc and putc macros (or inline functions) never 1075 // try to write or read from a file that is in `read' or `write' mode. 1076 // (Moreover, they can, and do, automatically switch from read mode to 1077 // write mode, and back, on "r+" and "w+" files.) 1078 // 1079 // _lbfsize is used only to make the inline line-buffered output stream 1080 // code as compact as possible. 1081 // 1082 // _ub, _up, and _ur are used when ungetc() pushes back more characters 1083 // than fit in the current _bf, or when ungetc() pushes back a character 1084 // that does not match the previous one in _bf. When this happens, 1085 // _ub._base becomes non-nil (i.e., a stream has ungetc() data iff 1086 // _ub._base!=NULL) and _up and _ur save the current values of _p and _r. 1087 type FILE = __sFILE /* stdio.h:131:3 */ 1088 1089 // The macro implementations of putc and putc_unlocked are not 1090 // fully POSIX compliant; they do not set errno on failure 1091 1092 // The macro implementations of putc and putc_unlocked are not 1093 // fully POSIX compliant; they do not set errno on failure 1094 1095 // $OpenBSD: string.h,v 1.32 2017/09/05 03:16:13 schwarze Exp $ 1096 // $NetBSD: string.h,v 1.6 1994/10/26 00:56:30 cgd Exp $ 1097 1098 // - 1099 // Copyright (c) 1990 The Regents of the University of California. 1100 // All rights reserved. 1101 // 1102 // Redistribution and use in source and binary forms, with or without 1103 // modification, are permitted provided that the following conditions 1104 // are met: 1105 // 1. Redistributions of source code must retain the above copyright 1106 // notice, this list of conditions and the following disclaimer. 1107 // 2. Redistributions in binary form must reproduce the above copyright 1108 // notice, this list of conditions and the following disclaimer in the 1109 // documentation and/or other materials provided with the distribution. 1110 // 3. Neither the name of the University nor the names of its contributors 1111 // may be used to endorse or promote products derived from this software 1112 // without specific prior written permission. 1113 // 1114 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1115 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1116 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1117 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1118 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1119 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1120 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1121 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1122 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1123 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1124 // SUCH DAMAGE. 1125 // 1126 // @(#)string.h 5.10 (Berkeley) 3/9/91 1127 1128 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 1129 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 1130 1131 // Copyright (c) 1991, 1993 1132 // The Regents of the University of California. All rights reserved. 1133 // 1134 // This code is derived from software contributed to Berkeley by 1135 // Berkeley Software Design, Inc. 1136 // 1137 // Redistribution and use in source and binary forms, with or without 1138 // modification, are permitted provided that the following conditions 1139 // are met: 1140 // 1. Redistributions of source code must retain the above copyright 1141 // notice, this list of conditions and the following disclaimer. 1142 // 2. Redistributions in binary form must reproduce the above copyright 1143 // notice, this list of conditions and the following disclaimer in the 1144 // documentation and/or other materials provided with the distribution. 1145 // 3. Neither the name of the University nor the names of its contributors 1146 // may be used to endorse or promote products derived from this software 1147 // without specific prior written permission. 1148 // 1149 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1150 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1151 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1152 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1153 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1154 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1155 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1156 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1157 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1158 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1159 // SUCH DAMAGE. 1160 // 1161 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 1162 1163 // $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ 1164 1165 // Written by Todd C. Miller, September 9, 2016 1166 // Public domain. 1167 1168 // $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ 1169 1170 // - 1171 // Copyright (c) 1990, 1993 1172 // The Regents of the University of California. All rights reserved. 1173 // 1174 // Redistribution and use in source and binary forms, with or without 1175 // modification, are permitted provided that the following conditions 1176 // are met: 1177 // 1. Redistributions of source code must retain the above copyright 1178 // notice, this list of conditions and the following disclaimer. 1179 // 2. Redistributions in binary form must reproduce the above copyright 1180 // notice, this list of conditions and the following disclaimer in the 1181 // documentation and/or other materials provided with the distribution. 1182 // 3. Neither the name of the University nor the names of its contributors 1183 // may be used to endorse or promote products derived from this software 1184 // without specific prior written permission. 1185 // 1186 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1187 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1188 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1189 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1190 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1191 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1192 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1193 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1194 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1195 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1196 // SUCH DAMAGE. 1197 // 1198 // @(#)types.h 8.3 (Berkeley) 1/5/94 1199 // @(#)ansi.h 8.2 (Berkeley) 1/4/94 1200 1201 // POSIX mandates that certain string functions not present in ISO C 1202 // be prototyped in strings.h. Historically, we've included them here. 1203 // $OpenBSD: strings.h,v 1.6 2017/09/10 21:50:36 schwarze Exp $ 1204 1205 // - 1206 // Copyright (c) 1990 The Regents of the University of California. 1207 // All rights reserved. 1208 // 1209 // Redistribution and use in source and binary forms, with or without 1210 // modification, are permitted provided that the following conditions 1211 // are met: 1212 // 1. Redistributions of source code must retain the above copyright 1213 // notice, this list of conditions and the following disclaimer. 1214 // 2. Redistributions in binary form must reproduce the above copyright 1215 // notice, this list of conditions and the following disclaimer in the 1216 // documentation and/or other materials provided with the distribution. 1217 // 3. Neither the name of the University nor the names of its contributors 1218 // may be used to endorse or promote products derived from this software 1219 // without specific prior written permission. 1220 // 1221 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1222 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1223 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1224 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1225 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1226 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1227 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1228 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1229 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1230 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1231 // SUCH DAMAGE. 1232 // 1233 // @(#)strings.h 5.8 (Berkeley) 5/15/90 1234 1235 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 1236 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 1237 1238 // Copyright (c) 1991, 1993 1239 // The Regents of the University of California. All rights reserved. 1240 // 1241 // This code is derived from software contributed to Berkeley by 1242 // Berkeley Software Design, Inc. 1243 // 1244 // Redistribution and use in source and binary forms, with or without 1245 // modification, are permitted provided that the following conditions 1246 // are met: 1247 // 1. Redistributions of source code must retain the above copyright 1248 // notice, this list of conditions and the following disclaimer. 1249 // 2. Redistributions in binary form must reproduce the above copyright 1250 // notice, this list of conditions and the following disclaimer in the 1251 // documentation and/or other materials provided with the distribution. 1252 // 3. Neither the name of the University nor the names of its contributors 1253 // may be used to endorse or promote products derived from this software 1254 // without specific prior written permission. 1255 // 1256 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1257 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1258 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1259 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1260 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1261 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1262 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1263 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1264 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1265 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1266 // SUCH DAMAGE. 1267 // 1268 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 1269 1270 // $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ 1271 1272 // - 1273 // Copyright (c) 1990, 1993 1274 // The Regents of the University of California. All rights reserved. 1275 // 1276 // Redistribution and use in source and binary forms, with or without 1277 // modification, are permitted provided that the following conditions 1278 // are met: 1279 // 1. Redistributions of source code must retain the above copyright 1280 // notice, this list of conditions and the following disclaimer. 1281 // 2. Redistributions in binary form must reproduce the above copyright 1282 // notice, this list of conditions and the following disclaimer in the 1283 // documentation and/or other materials provided with the distribution. 1284 // 3. Neither the name of the University nor the names of its contributors 1285 // may be used to endorse or promote products derived from this software 1286 // without specific prior written permission. 1287 // 1288 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1289 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1290 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1291 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1292 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1293 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1294 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1295 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1296 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1297 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1298 // SUCH DAMAGE. 1299 // 1300 // @(#)types.h 8.3 (Berkeley) 1/5/94 1301 // @(#)ansi.h 8.2 (Berkeley) 1/4/94 1302 1303 // POSIX mandates that certain string functions not present in ISO C 1304 // be prototyped in strings.h. 1305 1306 type locale_t = uintptr /* strings.h:53:14 */ 1307 1308 // $OpenBSD: stdlib.h,v 1.76 2019/05/10 15:03:24 otto Exp $ 1309 // $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ 1310 1311 // - 1312 // Copyright (c) 1990 The Regents of the University of California. 1313 // All rights reserved. 1314 // 1315 // Redistribution and use in source and binary forms, with or without 1316 // modification, are permitted provided that the following conditions 1317 // are met: 1318 // 1. Redistributions of source code must retain the above copyright 1319 // notice, this list of conditions and the following disclaimer. 1320 // 2. Redistributions in binary form must reproduce the above copyright 1321 // notice, this list of conditions and the following disclaimer in the 1322 // documentation and/or other materials provided with the distribution. 1323 // 3. Neither the name of the University nor the names of its contributors 1324 // may be used to endorse or promote products derived from this software 1325 // without specific prior written permission. 1326 // 1327 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1328 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1329 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1330 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1331 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1332 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1333 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1334 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1335 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1336 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1337 // SUCH DAMAGE. 1338 // 1339 // @(#)stdlib.h 5.13 (Berkeley) 6/4/91 1340 1341 // $OpenBSD: cdefs.h,v 1.43 2018/10/29 17:10:40 guenther Exp $ 1342 // $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ 1343 1344 // Copyright (c) 1991, 1993 1345 // The Regents of the University of California. All rights reserved. 1346 // 1347 // This code is derived from software contributed to Berkeley by 1348 // Berkeley Software Design, Inc. 1349 // 1350 // Redistribution and use in source and binary forms, with or without 1351 // modification, are permitted provided that the following conditions 1352 // are met: 1353 // 1. Redistributions of source code must retain the above copyright 1354 // notice, this list of conditions and the following disclaimer. 1355 // 2. Redistributions in binary form must reproduce the above copyright 1356 // notice, this list of conditions and the following disclaimer in the 1357 // documentation and/or other materials provided with the distribution. 1358 // 3. Neither the name of the University nor the names of its contributors 1359 // may be used to endorse or promote products derived from this software 1360 // without specific prior written permission. 1361 // 1362 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1363 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1364 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1365 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1366 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1367 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1368 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1369 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1370 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1371 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1372 // SUCH DAMAGE. 1373 // 1374 // @(#)cdefs.h 8.7 (Berkeley) 1/21/94 1375 1376 // $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ 1377 1378 // Written by Todd C. Miller, September 9, 2016 1379 // Public domain. 1380 1381 // $OpenBSD: _types.h,v 1.17 2018/03/05 01:15:25 deraadt Exp $ 1382 1383 // - 1384 // Copyright (c) 1990, 1993 1385 // The Regents of the University of California. All rights reserved. 1386 // 1387 // Redistribution and use in source and binary forms, with or without 1388 // modification, are permitted provided that the following conditions 1389 // are met: 1390 // 1. Redistributions of source code must retain the above copyright 1391 // notice, this list of conditions and the following disclaimer. 1392 // 2. Redistributions in binary form must reproduce the above copyright 1393 // notice, this list of conditions and the following disclaimer in the 1394 // documentation and/or other materials provided with the distribution. 1395 // 3. Neither the name of the University nor the names of its contributors 1396 // may be used to endorse or promote products derived from this software 1397 // without specific prior written permission. 1398 // 1399 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1400 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1401 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1402 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1403 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1404 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1405 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1406 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1407 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1408 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1409 // SUCH DAMAGE. 1410 // 1411 // @(#)types.h 8.3 (Berkeley) 1/5/94 1412 // @(#)ansi.h 8.2 (Berkeley) 1/4/94 1413 1414 // $OpenBSD: types.h,v 1.48 2019/02/09 04:54:11 guenther Exp $ 1415 // $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ 1416 1417 // - 1418 // Copyright (c) 1982, 1986, 1991, 1993 1419 // The Regents of the University of California. All rights reserved. 1420 // (c) UNIX System Laboratories, Inc. 1421 // All or some portions of this file are derived from material licensed 1422 // to the University of California by American Telephone and Telegraph 1423 // Co. or Unix System Laboratories, Inc. and are reproduced herein with 1424 // the permission of UNIX System Laboratories, Inc. 1425 // 1426 // Redistribution and use in source and binary forms, with or without 1427 // modification, are permitted provided that the following conditions 1428 // are met: 1429 // 1. Redistributions of source code must retain the above copyright 1430 // notice, this list of conditions and the following disclaimer. 1431 // 2. Redistributions in binary form must reproduce the above copyright 1432 // notice, this list of conditions and the following disclaimer in the 1433 // documentation and/or other materials provided with the distribution. 1434 // 3. Neither the name of the University nor the names of its contributors 1435 // may be used to endorse or promote products derived from this software 1436 // without specific prior written permission. 1437 // 1438 // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 1439 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1440 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1441 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 1442 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1443 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1444 // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 1445 // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 1446 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 1447 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1448 // SUCH DAMAGE. 1449 // 1450 // @(#)types.h 8.4 (Berkeley) 1/21/94 1451 1452 // in C++, wchar_t is a built-in type 1453 1454 type div_t = struct { 1455 quot int32 1456 rem int32 1457 } /* stdlib.h:59:3 */ 1458 1459 type ldiv_t = struct { 1460 quot int64 1461 rem int64 1462 } /* stdlib.h:64:3 */ 1463 1464 type lldiv_t = struct { 1465 quot int64 1466 rem int64 1467 } /* stdlib.h:70:3 */ 1468 1469 type qdiv_t = struct { 1470 quot quad_t 1471 rem quad_t 1472 } /* stdlib.h:77:3 */ 1473 1474 var prog uintptr /* minigzip.c:336:13: */ 1475 1476 // =========================================================================== 1477 // Display error message and exit 1478 func error(tls *libc.TLS, msg uintptr) { /* minigzip.c:351:6: */ 1479 bp := tls.Alloc(16) 1480 defer tls.Free(16) 1481 1482 libc.Xfprintf(tls, uintptr(unsafe.Pointer(&libc.X__sF))+2*152, ts, libc.VaList(bp, prog, msg)) 1483 libc.Xexit(tls, 1) 1484 } 1485 1486 // =========================================================================== 1487 // Compress input to output then close both files. 1488 1489 func gz_compress(tls *libc.TLS, in uintptr, out gzFile) { /* minigzip.c:362:6: */ 1490 bp := tls.Alloc(16388) 1491 defer tls.Free(16388) 1492 1493 // var buf [16384]int8 at bp, 16384 1494 1495 var len int32 1496 // var err int32 at bp+16384, 4 1497 1498 for { 1499 len = int32(libc.Xfread(tls, bp, uint64(1), uint64(unsafe.Sizeof([16384]int8{})), in)) 1500 if func() int32 { 1501 if !(libc.X__isthreaded != 0) { 1502 return libc.Bool32(int32((*FILE)(unsafe.Pointer(in))._flags)&0x0040 != 0) 1503 } 1504 return libc.Xferror(tls, in) 1505 }() != 0 { 1506 libc.Xperror(tls, ts+8) 1507 libc.Xexit(tls, 1) 1508 } 1509 if len == 0 { 1510 break 1511 } 1512 1513 if z.Xgzwrite(tls, out, bp, uint32(len)) != len { 1514 error(tls, z.Xgzerror(tls, out, bp+16384)) 1515 } 1516 } 1517 libc.Xfclose(tls, in) 1518 if z.Xgzclose(tls, out) != 0 { 1519 error(tls, ts+14) 1520 } 1521 } 1522 1523 // =========================================================================== 1524 // Uncompress input to output then close both files. 1525 func gz_uncompress(tls *libc.TLS, in gzFile, out uintptr) { /* minigzip.c:430:6: */ 1526 bp := tls.Alloc(16388) 1527 defer tls.Free(16388) 1528 1529 // var buf [16384]int8 at bp, 16384 1530 1531 var len int32 1532 // var err int32 at bp+16384, 4 1533 1534 for { 1535 len = z.Xgzread(tls, in, bp, uint32(unsafe.Sizeof([16384]int8{}))) 1536 if len < 0 { 1537 error(tls, z.Xgzerror(tls, in, bp+16384)) 1538 } 1539 if len == 0 { 1540 break 1541 } 1542 1543 if int32(libc.Xfwrite(tls, bp, uint64(1), uint64(uint32(len)), out)) != len { 1544 error(tls, ts+29) 1545 } 1546 } 1547 if libc.Xfclose(tls, out) != 0 { 1548 error(tls, ts+43) 1549 } 1550 1551 if z.Xgzclose(tls, in) != 0 { 1552 error(tls, ts+14) 1553 } 1554 } 1555 1556 // =========================================================================== 1557 // Compress the given file: create a corresponding .gz file and remove the 1558 // original. 1559 func file_compress(tls *libc.TLS, file uintptr, mode uintptr) { /* minigzip.c:457:6: */ 1560 bp := tls.Alloc(1064) 1561 defer tls.Free(1064) 1562 1563 // var outfile [1024]int8 at bp+40, 1024 1564 1565 var in uintptr 1566 var out gzFile 1567 1568 if libc.Xstrlen(tls, file)+libc.Xstrlen(tls, ts+57) >= size_t(unsafe.Sizeof([1024]int8{})) { 1569 libc.Xfprintf(tls, uintptr(unsafe.Pointer(&libc.X__sF))+2*152, ts+61, libc.VaList(bp, prog)) 1570 libc.Xexit(tls, 1) 1571 } 1572 1573 libc.Xsnprintf(tls, bp+40, uint64(unsafe.Sizeof([1024]int8{})), ts+84, libc.VaList(bp+8, file, ts+57)) 1574 1575 in = libc.Xfopen(tls, file, ts+89) 1576 if in == uintptr(0) { 1577 libc.Xperror(tls, file) 1578 libc.Xexit(tls, 1) 1579 } 1580 out = z.Xgzopen(tls, bp+40, mode) 1581 if out == uintptr(0) { 1582 libc.Xfprintf(tls, uintptr(unsafe.Pointer(&libc.X__sF))+2*152, ts+92, libc.VaList(bp+24, prog, bp+40)) 1583 libc.Xexit(tls, 1) 1584 } 1585 gz_compress(tls, in, out) 1586 1587 libc.Xunlink(tls, file) 1588 } 1589 1590 // =========================================================================== 1591 // Uncompress the given file and remove the original. 1592 func file_uncompress(tls *libc.TLS, file uintptr) { /* minigzip.c:496:6: */ 1593 bp := tls.Alloc(1064) 1594 defer tls.Free(1064) 1595 1596 // var buf [1024]int8 at bp+40, 1024 1597 1598 var infile uintptr 1599 var outfile uintptr 1600 var out uintptr 1601 var in gzFile 1602 var len uint32 = uint32(libc.Xstrlen(tls, file)) 1603 1604 if size_t(len)+libc.Xstrlen(tls, ts+57) >= size_t(unsafe.Sizeof([1024]int8{})) { 1605 libc.Xfprintf(tls, uintptr(unsafe.Pointer(&libc.X__sF))+2*152, ts+61, libc.VaList(bp, prog)) 1606 libc.Xexit(tls, 1) 1607 } 1608 1609 libc.Xsnprintf(tls, bp+40, uint64(unsafe.Sizeof([1024]int8{})), ts+113, libc.VaList(bp+8, file)) 1610 1611 if uint64(len) > uint64(unsafe.Sizeof([4]int8{}))-uint64(1) && libc.Xstrcmp(tls, file+uintptr(len)-uintptr(uint64(unsafe.Sizeof([4]int8{}))-uint64(1)), ts+57) == 0 { 1612 infile = file 1613 outfile = bp + 40 /* &buf[0] */ 1614 *(*int8)(unsafe.Pointer(outfile + uintptr(len-uint32(3)))) = int8(0) 1615 } else { 1616 outfile = file 1617 infile = bp + 40 /* &buf[0] */ 1618 libc.Xsnprintf(tls, bp+40+uintptr(len), uint64(unsafe.Sizeof([1024]int8{}))-uint64(len), ts+113, libc.VaList(bp+16, ts+57 /* ".gz" */)) 1619 } 1620 in = z.Xgzopen(tls, infile, ts+89) 1621 if in == uintptr(0) { 1622 libc.Xfprintf(tls, uintptr(unsafe.Pointer(&libc.X__sF))+2*152, ts+92, libc.VaList(bp+24, prog, infile)) 1623 libc.Xexit(tls, 1) 1624 } 1625 out = libc.Xfopen(tls, outfile, ts+116) 1626 if out == uintptr(0) { 1627 libc.Xperror(tls, file) 1628 libc.Xexit(tls, 1) 1629 } 1630 1631 gz_uncompress(tls, in, out) 1632 1633 libc.Xunlink(tls, infile) 1634 } 1635 1636 // =========================================================================== 1637 // Usage: minigzip [-c] [-d] [-f] [-h] [-r] [-1 to -9] [files...] 1638 // -c : write to standard output 1639 // -d : decompress 1640 // -f : compress with Z_FILTERED 1641 // -h : compress with Z_HUFFMAN_ONLY 1642 // -r : compress with Z_RLE 1643 // -1 to -9 : compression level 1644 1645 func main1(tls *libc.TLS, argc int32, argv uintptr) int32 { /* minigzip.c:556:5: */ 1646 bp := tls.Alloc(44) 1647 defer tls.Free(44) 1648 1649 var copyout int32 = 0 1650 var uncompr int32 = 0 1651 var file gzFile 1652 var bname uintptr 1653 // var outmode [20]int8 at bp+24, 20 1654 1655 libc.Xsnprintf(tls, bp+24, uint64(unsafe.Sizeof([20]int8{})), ts+113, libc.VaList(bp, ts+119)) 1656 1657 prog = *(*uintptr)(unsafe.Pointer(argv)) 1658 bname = libc.Xstrrchr(tls, *(*uintptr)(unsafe.Pointer(argv)), '/') 1659 if bname != 0 { 1660 bname++ 1661 } else { 1662 bname = *(*uintptr)(unsafe.Pointer(argv)) 1663 } 1664 argc-- 1665 argv += 8 1666 1667 if !(libc.Xstrcmp(tls, bname, ts+124) != 0) { 1668 uncompr = 1 1669 } else if !(libc.Xstrcmp(tls, bname, ts+131) != 0) { 1670 copyout = libc.AssignInt32(&uncompr, 1) 1671 } 1672 1673 for argc > 0 { 1674 if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+136) == 0 { 1675 copyout = 1 1676 } else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+139) == 0 { 1677 uncompr = 1 1678 } else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+142) == 0 { 1679 *(*int8)(unsafe.Pointer(bp + 24 + 3)) = int8('f') 1680 } else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+145) == 0 { 1681 *(*int8)(unsafe.Pointer(bp + 24 + 3)) = int8('h') 1682 } else if libc.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+148) == 0 { 1683 *(*int8)(unsafe.Pointer(bp + 24 + 3)) = int8('R') 1684 } else if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv))))) == '-' && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv)) + 1))) >= '1' && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv)) + 1))) <= '9' && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv)) + 2))) == 0 { 1685 *(*int8)(unsafe.Pointer(bp + 24 + 2)) = *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv)) + 1)) 1686 } else { 1687 break 1688 } 1689 argc-- 1690 argv += 8 1691 } 1692 if int32(*(*int8)(unsafe.Pointer(bp + 24 + 3))) == ' ' { 1693 *(*int8)(unsafe.Pointer(bp + 24 + 3)) = int8(0) 1694 } 1695 if argc == 0 { 1696 1697 if uncompr != 0 { 1698 file = z.Xgzdopen(tls, func() int32 { 1699 if !(libc.X__isthreaded != 0) { 1700 return int32((*FILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&libc.X__sF))))._file) 1701 } 1702 return libc.Xfileno(tls, uintptr(unsafe.Pointer(&libc.X__sF))) 1703 }(), ts+89) 1704 if file == uintptr(0) { 1705 error(tls, ts+151) 1706 } 1707 gz_uncompress(tls, file, uintptr(unsafe.Pointer(&libc.X__sF))+1*152) 1708 } else { 1709 file = z.Xgzdopen(tls, func() int32 { 1710 if !(libc.X__isthreaded != 0) { 1711 return int32((*FILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&libc.X__sF)) + 1*152))._file) 1712 } 1713 return libc.Xfileno(tls, uintptr(unsafe.Pointer(&libc.X__sF))+1*152) 1714 }(), bp+24) 1715 if file == uintptr(0) { 1716 error(tls, ts+171) 1717 } 1718 gz_compress(tls, uintptr(unsafe.Pointer(&libc.X__sF)), file) 1719 } 1720 } else { 1721 if copyout != 0 { 1722 1723 } 1724 for ok := true; ok; ok = func() bool { argv += 8; return libc.PreDecInt32(&argc, 1) != 0 }() { 1725 if uncompr != 0 { 1726 if copyout != 0 { 1727 file = z.Xgzopen(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+89) 1728 if file == uintptr(0) { 1729 libc.Xfprintf(tls, uintptr(unsafe.Pointer(&libc.X__sF))+2*152, ts+92, libc.VaList(bp+8, prog, *(*uintptr)(unsafe.Pointer(argv)))) 1730 } else { 1731 gz_uncompress(tls, file, uintptr(unsafe.Pointer(&libc.X__sF))+1*152) 1732 } 1733 } else { 1734 file_uncompress(tls, *(*uintptr)(unsafe.Pointer(argv))) 1735 } 1736 } else { 1737 if copyout != 0 { 1738 var in uintptr = libc.Xfopen(tls, *(*uintptr)(unsafe.Pointer(argv)), ts+89) 1739 1740 if in == uintptr(0) { 1741 libc.Xperror(tls, *(*uintptr)(unsafe.Pointer(argv))) 1742 } else { 1743 file = z.Xgzdopen(tls, func() int32 { 1744 if !(libc.X__isthreaded != 0) { 1745 return int32((*FILE)(unsafe.Pointer(uintptr(unsafe.Pointer(&libc.X__sF)) + 1*152))._file) 1746 } 1747 return libc.Xfileno(tls, uintptr(unsafe.Pointer(&libc.X__sF))+1*152) 1748 }(), bp+24) 1749 if file == uintptr(0) { 1750 error(tls, ts+171) 1751 } 1752 1753 gz_compress(tls, in, file) 1754 } 1755 1756 } else { 1757 file_compress(tls, *(*uintptr)(unsafe.Pointer(argv)), bp+24) 1758 } 1759 } 1760 } 1761 } 1762 return 0 1763 } 1764 1765 var ts1 = "%s: %s\n\x00fread\x00failed gzclose\x00failed fwrite\x00failed fclose\x00.gz\x00%s: filename too long\n\x00%s%s\x00rb\x00%s: can't gzopen %s\n\x00%s\x00wb\x00wb6 \x00gunzip\x00zcat\x00-c\x00-d\x00-f\x00-h\x00-r\x00can't gzdopen stdin\x00can't gzdopen stdout\x00" 1766 var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data