zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 671b3abe5d6661a8bca452a0a16dea7ae3d0e516 (tree)
parent bc24b86d82ec3b8d7d6e7e5d2d3dceb82d7b53dc
Author: Lachlan Easton <lachlan@lakebythewoods.xyz>
Date:   Tue,  1 Sep 2020 18:41:23 +1000

Merge remote-tracking branch 'ziglang/master' into fmt_indentation

Diffstat:
MREADME.md | 3++-
Mbuild.zig | 5++++-
Mci/azure/windows_msvc_script.bat | 2+-
Mdoc/langref.html.in | 2+-
Mlib/libc/glibc/abi.txt | 3957++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------
Mlib/libc/glibc/fns.txt | 225+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
Mlib/libc/glibc/vers.txt | 1+
Dlib/libc/include/aarch64-linux-gnu/bits/floatn.h | 98-------------------------------------------------------------------------------
Mlib/libc/include/aarch64-linux-gnu/bits/hwcap.h | 23+++++++++++++++++++++--
Mlib/libc/include/aarch64-linux-gnu/bits/long-double.h | 4++--
Alib/libc/include/aarch64-linux-gnu/bits/mman.h | 32++++++++++++++++++++++++++++++++
Mlib/libc/include/aarch64-linux-gnu/bits/typesizes.h | 38+++++++++++++++++++++++++++++---------
Mlib/libc/include/aarch64-linux-gnu/gnu/lib-names-lp64.h | 2--
Mlib/libc/include/aarch64-linux-gnu/gnu/stubs-lp64.h | 7++-----
Dlib/libc/include/aarch64_be-linux-gnu/bits/floatn.h | 98-------------------------------------------------------------------------------
Mlib/libc/include/aarch64_be-linux-gnu/bits/hwcap.h | 23+++++++++++++++++++++--
Mlib/libc/include/aarch64_be-linux-gnu/bits/long-double.h | 4++--
Alib/libc/include/aarch64_be-linux-gnu/bits/mman.h | 32++++++++++++++++++++++++++++++++
Mlib/libc/include/aarch64_be-linux-gnu/bits/typesizes.h | 38+++++++++++++++++++++++++++++---------
Mlib/libc/include/aarch64_be-linux-gnu/gnu/lib-names-lp64_be.h | 2--
Mlib/libc/include/aarch64_be-linux-gnu/gnu/stubs-lp64_be.h | 7++-----
Mlib/libc/include/arm-linux-gnueabi/bits/long-double.h | 17+++++++++++++++--
Dlib/libc/include/arm-linux-gnueabi/bits/semaphore.h | 35-----------------------------------
Mlib/libc/include/arm-linux-gnueabihf/bits/long-double.h | 17+++++++++++++++--
Dlib/libc/include/arm-linux-gnueabihf/bits/semaphore.h | 35-----------------------------------
Mlib/libc/include/armeb-linux-gnueabi/bits/long-double.h | 17+++++++++++++++--
Dlib/libc/include/armeb-linux-gnueabi/bits/semaphore.h | 35-----------------------------------
Mlib/libc/include/armeb-linux-gnueabihf/bits/long-double.h | 17+++++++++++++++--
Dlib/libc/include/armeb-linux-gnueabihf/bits/semaphore.h | 35-----------------------------------
Mlib/libc/include/generic-glibc/argp.h | 3++-
Mlib/libc/include/generic-glibc/bits/fcntl-linux.h | 3++-
Dlib/libc/include/generic-glibc/bits/fenvinline.h | 9---------
Mlib/libc/include/generic-glibc/bits/floatn.h | 2+-
Mlib/libc/include/generic-glibc/bits/long-double.h | 4++--
Mlib/libc/include/generic-glibc/bits/mathcalls-helper-functions.h | 18++++++++++--------
Mlib/libc/include/generic-glibc/bits/mathcalls.h | 9++++++---
Dlib/libc/include/generic-glibc/bits/mathinline.h | 13-------------
Mlib/libc/include/generic-glibc/bits/mman-shared.h | 1+
Dlib/libc/include/generic-glibc/bits/msq-pad.h | 32--------------------------------
Mlib/libc/include/generic-glibc/bits/msq.h | 39++++++---------------------------------
Mlib/libc/include/generic-glibc/bits/resource.h | 2+-
Dlib/libc/include/generic-glibc/bits/sem-pad.h | 34----------------------------------
Mlib/libc/include/generic-glibc/bits/sem.h | 26++------------------------
Mlib/libc/include/generic-glibc/bits/semaphore.h | 9++++++---
Dlib/libc/include/generic-glibc/bits/shm-pad.h | 38--------------------------------------
Mlib/libc/include/generic-glibc/bits/shm.h | 35+----------------------------------
Alib/libc/include/generic-glibc/bits/signum-arch.h | 65+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mlib/libc/include/generic-glibc/bits/signum-generic.h | 27+++------------------------
Dlib/libc/include/generic-glibc/bits/signum.h | 59-----------------------------------------------------------
Mlib/libc/include/generic-glibc/bits/socket-constants.h | 16++++++++++++++--
Mlib/libc/include/generic-glibc/bits/statx-generic.h | 1+
Mlib/libc/include/generic-glibc/bits/stdio-ldbl.h | 46+++++++++++++++++++++++++++++++---------------
Mlib/libc/include/generic-glibc/bits/stdio2.h | 25++++++++++++++++---------
Mlib/libc/include/generic-glibc/bits/stdlib-ldbl.h | 22++++++++++++++++++++++
Mlib/libc/include/generic-glibc/bits/stdlib.h | 17+++++++++++------
Mlib/libc/include/generic-glibc/bits/string_fortified.h | 5+++--
Dlib/libc/include/generic-glibc/bits/sys_errlist.h | 33---------------------------------
Mlib/libc/include/generic-glibc/bits/syscall.h | 24++++++++++++++++++++++--
Dlib/libc/include/generic-glibc/bits/sysctl.h | 2--
Mlib/libc/include/generic-glibc/bits/syslog-ldbl.h | 4++--
Mlib/libc/include/generic-glibc/bits/thread-shared-types.h | 10++++++++++
Mlib/libc/include/generic-glibc/bits/types.h | 1+
Alib/libc/include/generic-glibc/bits/types/struct_msqid_ds.h | 48++++++++++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/generic-glibc/bits/types/struct_semid_ds.h | 40++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/generic-glibc/bits/types/struct_shmid_ds.h | 46++++++++++++++++++++++++++++++++++++++++++++++
Mlib/libc/include/generic-glibc/bits/typesizes.h | 7+++++++
Mlib/libc/include/generic-glibc/bits/unistd.h | 58+++++++++++++++++++++++++++++++++++-----------------------
Mlib/libc/include/generic-glibc/bits/wchar-ldbl.h | 36++++++++++++++++++++++++++++++------
Mlib/libc/include/generic-glibc/complex.h | 29+++++++++++++++++++++++++++--
Mlib/libc/include/generic-glibc/elf.h | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
Mlib/libc/include/generic-glibc/err.h | 3++-
Mlib/libc/include/generic-glibc/error.h | 6++++--
Mlib/libc/include/generic-glibc/features.h | 2+-
Mlib/libc/include/generic-glibc/fenv.h | 4----
Mlib/libc/include/generic-glibc/gnu/lib-names-32.h | 2--
Mlib/libc/include/generic-glibc/gnu/lib-names-hard.h | 2--
Mlib/libc/include/generic-glibc/gnu/lib-names-n32_hard.h | 2--
Mlib/libc/include/generic-glibc/gnu/lib-names-n64_hard.h | 2--
Mlib/libc/include/generic-glibc/gnu/lib-names-o32_hard.h | 2--
Mlib/libc/include/generic-glibc/gnu/lib-names-soft.h | 2--
Mlib/libc/include/generic-glibc/gnu/stubs-32.h | 2--
Mlib/libc/include/generic-glibc/gnu/stubs-64.h | 2--
Mlib/libc/include/generic-glibc/gnu/stubs-hard.h | 2--
Mlib/libc/include/generic-glibc/gnu/stubs-n32_hard.h | 2--
Mlib/libc/include/generic-glibc/gnu/stubs-n64_hard.h | 2--
Mlib/libc/include/generic-glibc/gnu/stubs-o32_hard.h | 2--
Mlib/libc/include/generic-glibc/gnu/stubs-soft.h | 2--
Mlib/libc/include/generic-glibc/inttypes.h | 48++++++++++++++++++++++++------------------------
Mlib/libc/include/generic-glibc/malloc.h | 7++++---
Mlib/libc/include/generic-glibc/math.h | 88+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------
Mlib/libc/include/generic-glibc/monetary.h | 3++-
Mlib/libc/include/generic-glibc/netinet/icmp6.h | 8++++----
Mlib/libc/include/generic-glibc/netinet/in.h | 4++++
Mlib/libc/include/generic-glibc/nss.h | 203++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mlib/libc/include/generic-glibc/printf.h | 3++-
Mlib/libc/include/generic-glibc/pthread.h | 15+++++++++++++++
Mlib/libc/include/generic-glibc/signal.h | 31+++++++++++++++++--------------
Mlib/libc/include/generic-glibc/stdio.h | 27++++++++++++++-------------
Mlib/libc/include/generic-glibc/stdlib.h | 15+++++++++------
Mlib/libc/include/generic-glibc/string.h | 48++++++++++++++++++++++++++++++++++++------------
Mlib/libc/include/generic-glibc/sys/cdefs.h | 49+++++++++++++++++++++++++++++++++++++++++++++++--
Mlib/libc/include/generic-glibc/sys/random.h | 1+
Alib/libc/include/generic-glibc/sys/single_threaded.h | 34++++++++++++++++++++++++++++++++++
Dlib/libc/include/generic-glibc/sys/sysctl.h | 77-----------------------------------------------------------------------------
Mlib/libc/include/generic-glibc/sys/syslog.h | 4+++-
Mlib/libc/include/generic-glibc/threads.h | 13+++++--------
Mlib/libc/include/generic-glibc/unistd.h | 65+++++++++++++++++++++++++++++++++++++++++------------------------
Mlib/libc/include/generic-glibc/wchar.h | 14+++++++++-----
Mlib/libc/include/i386-linux-gnu/bits/fenv.h | 54------------------------------------------------------
Mlib/libc/include/i386-linux-gnu/bits/long-double.h | 4++--
Dlib/libc/include/i386-linux-gnu/bits/select.h | 64----------------------------------------------------------------
Dlib/libc/include/i386-linux-gnu/bits/sem-pad.h | 25-------------------------
Dlib/libc/include/i386-linux-gnu/bits/semaphore.h | 41-----------------------------------------
Dlib/libc/include/i386-linux-gnu/bits/sysctl.h | 21---------------------
Alib/libc/include/i386-linux-gnu/bits/types/struct_semid_ds.h | 35+++++++++++++++++++++++++++++++++++
Mlib/libc/include/i386-linux-gnu/bits/typesizes.h | 6++++++
Clib/libc/include/generic-glibc/bits/floatn.h -> lib/libc/include/mips-linux-gnu/bits/floatn.h | 0
Dlib/libc/include/mips-linux-gnu/bits/msq-pad.h | 32--------------------------------
Mlib/libc/include/mips-linux-gnu/bits/resource.h | 2+-
Dlib/libc/include/mips-linux-gnu/bits/sem-pad.h | 25-------------------------
Clib/libc/include/generic-glibc/bits/semaphore.h -> lib/libc/include/mips-linux-gnu/bits/semaphore.h | 0
Dlib/libc/include/mips-linux-gnu/bits/shm-pad.h | 27---------------------------
Alib/libc/include/mips-linux-gnu/bits/signum-arch.h | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dlib/libc/include/mips-linux-gnu/bits/signum.h | 69---------------------------------------------------------------------
Alib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h | 33+++++++++++++++++++++++++++++++++
Alib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Clib/libc/include/generic-glibc/bits/floatn.h -> lib/libc/include/mips64-linux-gnuabi64/bits/floatn.h | 0
Dlib/libc/include/mips64-linux-gnuabi64/bits/msq-pad.h | 32--------------------------------
Mlib/libc/include/mips64-linux-gnuabi64/bits/resource.h | 2+-
Dlib/libc/include/mips64-linux-gnuabi64/bits/sem-pad.h | 25-------------------------
Clib/libc/include/generic-glibc/bits/semaphore.h -> lib/libc/include/mips64-linux-gnuabi64/bits/semaphore.h | 0
Dlib/libc/include/mips64-linux-gnuabi64/bits/shm-pad.h | 27---------------------------
Alib/libc/include/mips64-linux-gnuabi64/bits/signum-arch.h | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dlib/libc/include/mips64-linux-gnuabi64/bits/signum.h | 69---------------------------------------------------------------------
Alib/libc/include/mips64-linux-gnuabi64/bits/types/struct_msqid_ds.h | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/mips64-linux-gnuabi64/bits/types/struct_semid_ds.h | 33+++++++++++++++++++++++++++++++++
Alib/libc/include/mips64-linux-gnuabi64/bits/types/struct_shmid_ds.h | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Clib/libc/include/generic-glibc/bits/floatn.h -> lib/libc/include/mips64-linux-gnuabin32/bits/floatn.h | 0
Dlib/libc/include/mips64-linux-gnuabin32/bits/msq-pad.h | 32--------------------------------
Mlib/libc/include/mips64-linux-gnuabin32/bits/resource.h | 2+-
Dlib/libc/include/mips64-linux-gnuabin32/bits/sem-pad.h | 25-------------------------
Clib/libc/include/generic-glibc/bits/semaphore.h -> lib/libc/include/mips64-linux-gnuabin32/bits/semaphore.h | 0
Dlib/libc/include/mips64-linux-gnuabin32/bits/shm-pad.h | 27---------------------------
Alib/libc/include/mips64-linux-gnuabin32/bits/signum-arch.h | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dlib/libc/include/mips64-linux-gnuabin32/bits/signum.h | 69---------------------------------------------------------------------
Alib/libc/include/mips64-linux-gnuabin32/bits/types/struct_msqid_ds.h | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/mips64-linux-gnuabin32/bits/types/struct_semid_ds.h | 33+++++++++++++++++++++++++++++++++
Alib/libc/include/mips64-linux-gnuabin32/bits/types/struct_shmid_ds.h | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Clib/libc/include/generic-glibc/bits/floatn.h -> lib/libc/include/mips64el-linux-gnuabi64/bits/floatn.h | 0
Dlib/libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h | 32--------------------------------
Mlib/libc/include/mips64el-linux-gnuabi64/bits/resource.h | 2+-
Dlib/libc/include/mips64el-linux-gnuabi64/bits/sem-pad.h | 25-------------------------
Clib/libc/include/generic-glibc/bits/semaphore.h -> lib/libc/include/mips64el-linux-gnuabi64/bits/semaphore.h | 0
Dlib/libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h | 27---------------------------
Alib/libc/include/mips64el-linux-gnuabi64/bits/signum-arch.h | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dlib/libc/include/mips64el-linux-gnuabi64/bits/signum.h | 69---------------------------------------------------------------------
Alib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_msqid_ds.h | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h | 33+++++++++++++++++++++++++++++++++
Alib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_shmid_ds.h | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Clib/libc/include/generic-glibc/bits/floatn.h -> lib/libc/include/mips64el-linux-gnuabin32/bits/floatn.h | 0
Dlib/libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h | 32--------------------------------
Mlib/libc/include/mips64el-linux-gnuabin32/bits/resource.h | 2+-
Dlib/libc/include/mips64el-linux-gnuabin32/bits/sem-pad.h | 25-------------------------
Clib/libc/include/generic-glibc/bits/semaphore.h -> lib/libc/include/mips64el-linux-gnuabin32/bits/semaphore.h | 0
Dlib/libc/include/mips64el-linux-gnuabin32/bits/shm-pad.h | 27---------------------------
Alib/libc/include/mips64el-linux-gnuabin32/bits/signum-arch.h | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dlib/libc/include/mips64el-linux-gnuabin32/bits/signum.h | 69---------------------------------------------------------------------
Alib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_msqid_ds.h | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_semid_ds.h | 33+++++++++++++++++++++++++++++++++
Alib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_shmid_ds.h | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Clib/libc/include/generic-glibc/bits/floatn.h -> lib/libc/include/mipsel-linux-gnu/bits/floatn.h | 0
Dlib/libc/include/mipsel-linux-gnu/bits/msq-pad.h | 32--------------------------------
Mlib/libc/include/mipsel-linux-gnu/bits/resource.h | 2+-
Dlib/libc/include/mipsel-linux-gnu/bits/sem-pad.h | 25-------------------------
Clib/libc/include/generic-glibc/bits/semaphore.h -> lib/libc/include/mipsel-linux-gnu/bits/semaphore.h | 0
Dlib/libc/include/mipsel-linux-gnu/bits/shm-pad.h | 27---------------------------
Alib/libc/include/mipsel-linux-gnu/bits/signum-arch.h | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dlib/libc/include/mipsel-linux-gnu/bits/signum.h | 69---------------------------------------------------------------------
Alib/libc/include/mipsel-linux-gnu/bits/types/struct_msqid_ds.h | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/mipsel-linux-gnu/bits/types/struct_semid_ds.h | 33+++++++++++++++++++++++++++++++++
Alib/libc/include/mipsel-linux-gnu/bits/types/struct_shmid_ds.h | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Dlib/libc/include/powerpc-linux-gnu/bits/fenvinline.h | 103-------------------------------------------------------------------------------
Mlib/libc/include/powerpc-linux-gnu/bits/hwcap.h | 6++++--
Mlib/libc/include/powerpc-linux-gnu/bits/iscanonical.h | 2+-
Mlib/libc/include/powerpc-linux-gnu/bits/long-double.h | 4++--
Dlib/libc/include/powerpc-linux-gnu/bits/msq-pad.h | 27---------------------------
Dlib/libc/include/powerpc-linux-gnu/bits/sem-pad.h | 27---------------------------
Dlib/libc/include/powerpc-linux-gnu/bits/semaphore.h | 41-----------------------------------------
Dlib/libc/include/powerpc-linux-gnu/bits/shm-pad.h | 29-----------------------------
Alib/libc/include/powerpc-linux-gnu/bits/types/struct_msqid_ds.h | 48++++++++++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/powerpc-linux-gnu/bits/types/struct_semid_ds.h | 40++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/powerpc-linux-gnu/bits/types/struct_shmid_ds.h | 47+++++++++++++++++++++++++++++++++++++++++++++++
Mlib/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h | 2--
Mlib/libc/include/powerpc-linux-gnu/ieee754.h | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
Dlib/libc/include/powerpc64-linux-gnu/bits/fenvinline.h | 103-------------------------------------------------------------------------------
Mlib/libc/include/powerpc64-linux-gnu/bits/hwcap.h | 6++++--
Mlib/libc/include/powerpc64-linux-gnu/bits/iscanonical.h | 2+-
Mlib/libc/include/powerpc64-linux-gnu/bits/long-double.h | 4++--
Dlib/libc/include/powerpc64-linux-gnu/bits/msq-pad.h | 27---------------------------
Dlib/libc/include/powerpc64-linux-gnu/bits/sem-pad.h | 27---------------------------
Dlib/libc/include/powerpc64-linux-gnu/bits/semaphore.h | 41-----------------------------------------
Dlib/libc/include/powerpc64-linux-gnu/bits/shm-pad.h | 29-----------------------------
Alib/libc/include/powerpc64-linux-gnu/bits/types/struct_msqid_ds.h | 48++++++++++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/powerpc64-linux-gnu/bits/types/struct_semid_ds.h | 40++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/powerpc64-linux-gnu/bits/types/struct_shmid_ds.h | 47+++++++++++++++++++++++++++++++++++++++++++++++
Mlib/libc/include/powerpc64-linux-gnu/gnu/lib-names-64-v1.h | 2--
Mlib/libc/include/powerpc64-linux-gnu/gnu/stubs-64-v1.h | 2--
Mlib/libc/include/powerpc64-linux-gnu/ieee754.h | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
Dlib/libc/include/powerpc64le-linux-gnu/bits/fenvinline.h | 103-------------------------------------------------------------------------------
Mlib/libc/include/powerpc64le-linux-gnu/bits/hwcap.h | 6++++--
Mlib/libc/include/powerpc64le-linux-gnu/bits/iscanonical.h | 2+-
Mlib/libc/include/powerpc64le-linux-gnu/bits/long-double.h | 7++++---
Dlib/libc/include/powerpc64le-linux-gnu/bits/msq-pad.h | 27---------------------------
Dlib/libc/include/powerpc64le-linux-gnu/bits/sem-pad.h | 27---------------------------
Dlib/libc/include/powerpc64le-linux-gnu/bits/semaphore.h | 41-----------------------------------------
Dlib/libc/include/powerpc64le-linux-gnu/bits/shm-pad.h | 29-----------------------------
Alib/libc/include/powerpc64le-linux-gnu/bits/types/struct_msqid_ds.h | 48++++++++++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/powerpc64le-linux-gnu/bits/types/struct_semid_ds.h | 40++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/powerpc64le-linux-gnu/bits/types/struct_shmid_ds.h | 47+++++++++++++++++++++++++++++++++++++++++++++++
Mlib/libc/include/powerpc64le-linux-gnu/gnu/lib-names-64-v2.h | 2--
Mlib/libc/include/powerpc64le-linux-gnu/gnu/stubs-64-v2.h | 2--
Mlib/libc/include/powerpc64le-linux-gnu/ieee754.h | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
Dlib/libc/include/riscv64-linux-gnu/bits/floatn.h | 98-------------------------------------------------------------------------------
Mlib/libc/include/riscv64-linux-gnu/bits/long-double.h | 4++--
Dlib/libc/include/riscv64-linux-gnu/bits/semaphore.h | 34----------------------------------
Mlib/libc/include/riscv64-linux-gnu/bits/typesizes.h | 38+++++++++++++++++++++++++++++---------
Mlib/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64.h | 2--
Mlib/libc/include/riscv64-linux-gnu/gnu/stubs-lp64.h | 7++-----
Mlib/libc/include/s390x-linux-gnu/bits/fenv.h | 4++--
Dlib/libc/include/s390x-linux-gnu/bits/floatn.h | 98-------------------------------------------------------------------------------
Mlib/libc/include/s390x-linux-gnu/bits/long-double.h | 4++--
Dlib/libc/include/s390x-linux-gnu/bits/semaphore.h | 40----------------------------------------
Mlib/libc/include/s390x-linux-gnu/bits/typesizes.h | 7+++++++
Mlib/libc/include/s390x-linux-gnu/gnu/lib-names-64.h | 2--
Mlib/libc/include/sparc-linux-gnu/bits/fenv.h | 9---------
Dlib/libc/include/sparc-linux-gnu/bits/floatn.h | 98-------------------------------------------------------------------------------
Mlib/libc/include/sparc-linux-gnu/bits/long-double.h | 4++--
Dlib/libc/include/sparc-linux-gnu/bits/msq-pad.h | 27---------------------------
Mlib/libc/include/sparc-linux-gnu/bits/resource.h | 2+-
Dlib/libc/include/sparc-linux-gnu/bits/sem-pad.h | 27---------------------------
Dlib/libc/include/sparc-linux-gnu/bits/semaphore.h | 41-----------------------------------------
Dlib/libc/include/sparc-linux-gnu/bits/shm-pad.h | 29-----------------------------
Alib/libc/include/sparc-linux-gnu/bits/signum-arch.h | 67+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dlib/libc/include/sparc-linux-gnu/bits/signum.h | 40----------------------------------------
Alib/libc/include/sparc-linux-gnu/bits/types/struct_msqid_ds.h | 48++++++++++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/sparc-linux-gnu/bits/types/struct_semid_ds.h | 40++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/sparc-linux-gnu/bits/types/struct_shmid_ds.h | 46++++++++++++++++++++++++++++++++++++++++++++++
Mlib/libc/include/sparc-linux-gnu/bits/typesizes.h | 7+++++++
Mlib/libc/include/sparc-linux-gnu/gnu/lib-names-64.h | 2--
Mlib/libc/include/sparcv9-linux-gnu/bits/fenv.h | 9---------
Dlib/libc/include/sparcv9-linux-gnu/bits/floatn.h | 98-------------------------------------------------------------------------------
Mlib/libc/include/sparcv9-linux-gnu/bits/long-double.h | 4++--
Dlib/libc/include/sparcv9-linux-gnu/bits/msq-pad.h | 27---------------------------
Mlib/libc/include/sparcv9-linux-gnu/bits/resource.h | 2+-
Dlib/libc/include/sparcv9-linux-gnu/bits/sem-pad.h | 27---------------------------
Dlib/libc/include/sparcv9-linux-gnu/bits/semaphore.h | 41-----------------------------------------
Dlib/libc/include/sparcv9-linux-gnu/bits/shm-pad.h | 29-----------------------------
Alib/libc/include/sparcv9-linux-gnu/bits/signum-arch.h | 67+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dlib/libc/include/sparcv9-linux-gnu/bits/signum.h | 40----------------------------------------
Alib/libc/include/sparcv9-linux-gnu/bits/types/struct_msqid_ds.h | 48++++++++++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/sparcv9-linux-gnu/bits/types/struct_semid_ds.h | 40++++++++++++++++++++++++++++++++++++++++
Alib/libc/include/sparcv9-linux-gnu/bits/types/struct_shmid_ds.h | 46++++++++++++++++++++++++++++++++++++++++++++++
Mlib/libc/include/sparcv9-linux-gnu/bits/typesizes.h | 7+++++++
Mlib/libc/include/x86_64-linux-gnu/bits/fenv.h | 54------------------------------------------------------
Mlib/libc/include/x86_64-linux-gnu/bits/long-double.h | 4++--
Dlib/libc/include/x86_64-linux-gnu/bits/select.h | 64----------------------------------------------------------------
Dlib/libc/include/x86_64-linux-gnu/bits/sem-pad.h | 25-------------------------
Dlib/libc/include/x86_64-linux-gnu/bits/semaphore.h | 41-----------------------------------------
Dlib/libc/include/x86_64-linux-gnu/bits/sysctl.h | 21---------------------
Alib/libc/include/x86_64-linux-gnu/bits/types/struct_semid_ds.h | 35+++++++++++++++++++++++++++++++++++
Mlib/libc/include/x86_64-linux-gnu/bits/typesizes.h | 6++++++
Mlib/libc/include/x86_64-linux-gnu/gnu/lib-names-64.h | 2--
Mlib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h | 2--
Mlib/libc/include/x86_64-linux-gnux32/bits/fenv.h | 54------------------------------------------------------
Mlib/libc/include/x86_64-linux-gnux32/bits/long-double.h | 4++--
Dlib/libc/include/x86_64-linux-gnux32/bits/select.h | 64----------------------------------------------------------------
Dlib/libc/include/x86_64-linux-gnux32/bits/sem-pad.h | 25-------------------------
Dlib/libc/include/x86_64-linux-gnux32/bits/semaphore.h | 41-----------------------------------------
Dlib/libc/include/x86_64-linux-gnux32/bits/sysctl.h | 21---------------------
Alib/libc/include/x86_64-linux-gnux32/bits/types/struct_semid_ds.h | 35+++++++++++++++++++++++++++++++++++
Mlib/libc/include/x86_64-linux-gnux32/bits/typesizes.h | 6++++++
Mlib/libc/include/x86_64-linux-gnux32/gnu/lib-names-x32.h | 2--
Mlib/libc/include/x86_64-linux-gnux32/gnu/stubs-x32.h | 2--
Mlib/std/child_process.zig | 4++--
Mlib/std/fs/test.zig | 24++++++++++++++++++++----
Mlib/std/heap/general_purpose_allocator.zig | 46++++++++++++++++++++++++++++++----------------
Mlib/std/macho.zig | 344+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mlib/std/math.zig | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
Mlib/std/meta/trailer_flags.zig | 135++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------
Mlib/std/os/test.zig | 26++++++++++++++++++++++++--
Mlib/std/os/uefi/protocols/simple_text_input_protocol.zig | 2+-
Mlib/std/os/windows.zig | 19++++++++++++++++---
Mlib/std/special/compiler_rt.zig | 4+++-
Alib/std/special/compiler_rt/floatXisf.zig | 97+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Alib/std/special/compiler_rt/floatdisf_test.zig | 37+++++++++++++++++++++++++++++++++++++
Dlib/std/special/compiler_rt/floattisf.zig | 76----------------------------------------------------------------------------
Mlib/std/special/compiler_rt/floattisf_test.zig | 2+-
Mlib/std/zig/ast.zig | 264+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------
Mlib/std/zig/render.zig | 72++++++++++++++++++++++++++++++++++++++----------------------------------
Mlib/std/zig/system.zig | 7++++---
Msrc-self-hosted/Module.zig | 46+++++++++++++++++++++++-----------------------
Msrc-self-hosted/astgen.zig | 12++++++------
Msrc-self-hosted/codegen.zig | 2+-
Msrc-self-hosted/link/Elf.zig | 4++--
Msrc-self-hosted/main.zig | 2+-
Msrc-self-hosted/translate_c.zig | 12++++++------
Msrc/all_types.hpp | 6------
Msrc/codegen.cpp | 1-
Msrc/ir.cpp | 29-----------------------------
Msrc/ir_print.cpp | 9---------
Mtest/compile_errors.zig | 2+-
Mtest/run_translated_c.zig | 17+++++++++++++++++
Mtest/stage1/behavior/type.zig | 1-
Mtools/process_headers.zig | 12++++++------
315 files changed, 8675 insertions(+), 4852 deletions(-)

diff --git a/README.md b/README.md @@ -17,7 +17,8 @@ A general-purpose programming language and toolchain for maintaining [![Build Status](https://dev.azure.com/ziglang/zig/_apis/build/status/ziglang.zig?branchName=master)](https://dev.azure.com/ziglang/zig/_build/latest?definitionId=1&branchName=master) Note that you can -[download a binary of master branch](https://ziglang.org/download/#release-master). +[download a binary of master branch](https://ziglang.org/download/#release-master) or +[install Zig from a package manager](https://github.com/ziglang/zig/wiki/Install-Zig-from-a-Package-Manager). ### Stage 1: Build Zig from C++ Source Code diff --git a/build.zig b/build.zig @@ -49,6 +49,7 @@ pub fn build(b: *Builder) !void { const skip_release_safe = b.option(bool, "skip-release-safe", "Main test suite skips release-safe builds") orelse skip_release; const skip_non_native = b.option(bool, "skip-non-native", "Main test suite skips non-native builds") orelse false; const skip_libc = b.option(bool, "skip-libc", "Main test suite skips tests that link libc") orelse false; + const skip_compile_errors = b.option(bool, "skip-compile-errors", "Main test suite skips compile error tests") orelse false; const only_install_lib_files = b.option(bool, "lib-files-only", "Only install library files") orelse false; const enable_llvm = b.option(bool, "enable-llvm", "Build self-hosted compiler with LLVM backend enabled") orelse false; @@ -184,7 +185,9 @@ pub fn build(b: *Builder) !void { test_step.dependOn(tests.addRunTranslatedCTests(b, test_filter)); // tests for this feature are disabled until we have the self-hosted compiler available // test_step.dependOn(tests.addGenHTests(b, test_filter)); - test_step.dependOn(tests.addCompileErrorTests(b, test_filter, modes)); + if (!skip_compile_errors) { + test_step.dependOn(tests.addCompileErrorTests(b, test_filter, modes)); + } test_step.dependOn(docs_step); } diff --git a/ci/azure/windows_msvc_script.bat b/ci/azure/windows_msvc_script.bat @@ -24,7 +24,7 @@ cd %ZIGBUILDDIR% cmake.exe .. -Thost=x64 -G"Visual Studio 16 2019" -A x64 "-DCMAKE_INSTALL_PREFIX=%ZIGINSTALLDIR%" "-DCMAKE_PREFIX_PATH=%ZIGPREFIXPATH%" -DCMAKE_BUILD_TYPE=Release || exit /b msbuild /maxcpucount /p:Configuration=Release INSTALL.vcxproj || exit /b -"%ZIGINSTALLDIR%\bin\zig.exe" build test || exit /b +"%ZIGINSTALLDIR%\bin\zig.exe" build test -Dskip-compile-errors || exit /b set "PATH=%CD:~0,2%\msys64\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem" SET "MSYSTEM=MINGW64" diff --git a/doc/langref.html.in b/doc/langref.html.in @@ -11394,7 +11394,7 @@ keyword &lt;- KEYWORD_align / KEYWORD_and / KEYWORD_anyframe / KEYWORD_anytype <li>Reduce the amount one must remember.</li> <li>Minimize energy spent on coding style.</li> <li>Resource deallocation must succeed.</li> - <li>Together we serve end users.</li> + <li>Together we serve the users.</li> </ul> {#header_close#} </div></div> diff --git a/lib/libc/glibc/abi.txt b/lib/libc/glibc/abi.txt @@ -200,7 +200,9 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 + 29 + 29 @@ -229,6 +231,8 @@ aarch64-linux-gnu aarch64_be-linux-gnu + + 29 29 29 @@ -237,47 +241,83 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 + + 29 29 29 + + 29 29 29 29 29 + 29 29 29 + 29 + 29 29 29 29 29 + + + + + + + + + + + + + + 29 29 + 29 29 + 29 + 29 29 29 29 + 29 + 29 29 + 29 + + + + + + + + + 29 29 @@ -301,29 +341,50 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 + + 29 29 29 29 + + + 29 + + + 29 29 + 29 29 29 + 29 29 29 + 29 35 + + + + + + + + + + 29 29 29 @@ -334,6 +395,7 @@ aarch64-linux-gnu aarch64_be-linux-gnu + 29 29 29 @@ -361,9 +423,16 @@ aarch64-linux-gnu aarch64_be-linux-gnu + + + + + + 29 29 + 29 29 29 @@ -372,6 +441,8 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 + + 29 29 @@ -381,10 +452,17 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 + + + + 29 29 + + 29 29 + 29 29 29 @@ -404,6 +482,7 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 + 29 29 29 @@ -419,7 +498,9 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 + 29 + 29 29 29 @@ -443,17 +524,29 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 + 29 + 29 + 29 + 29 + 29 + 29 + 29 + 29 + 29 + 29 + 29 + 29 29 30 @@ -481,23 +574,29 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 + 29 29 29 + 29 29 29 + 29 29 29 29 + 29 29 + + 29 29 29 @@ -513,23 +612,34 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 +42 29 29 29 + + + 29 29 + 29 + 29 29 + 29 29 + 29 + 29 29 + + 29 @@ -568,17 +678,26 @@ aarch64-linux-gnu aarch64_be-linux-gnu + 29 29 29 + 29 + 29 + + + + + + 29 @@ -691,7 +810,11 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 + + 29 + + 29 29 29 @@ -707,6 +830,7 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 + 29 29 @@ -714,7 +838,10 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 + 29 + + 29 29 29 @@ -745,6 +872,11 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 + + + + + 29 29 29 @@ -763,12 +895,17 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 + 29 + 29 29 29 29 29 + + + 29 29 29 @@ -776,7 +913,11 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 + 29 + + + 29 29 29 @@ -790,6 +931,8 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 + + 29 29 29 @@ -800,24 +943,34 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 33 + 29 29 29 + 29 29 + 29 + 29 + + 29 + + 29 29 + 29 + 29 29 29 @@ -850,6 +1003,9 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 + + + 29 29 @@ -884,6 +1040,8 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 + + 29 29 29 @@ -903,48 +1061,93 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 + + + 29 29 + + 29 + + + 29 29 29 29 + + 29 29 29 29 29 + 29 29 29 + + 29 29 29 + + 29 + + + + 29 29 + + 29 + 29 + + + 29 + + + 29 29 + + 29 + + 29 + 29 + + + 29 + + + + 29 + + + 29 29 + + 29 29 29 @@ -963,6 +1166,8 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 + + 29 29 29 @@ -984,7 +1189,10 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 + + 29 + 29 29 29 @@ -997,14 +1205,17 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 + 29 29 29 + 29 29 29 + 29 29 29 @@ -1602,7 +1813,7 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 39 29 -29 +29 42 37 37 37 @@ -2728,17 +2939,19 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 +42 29 29 29 29 +29 42 29 29 29 29 29 29 -29 +42 29 29 29 @@ -2768,8 +2981,20 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 -29 +29 42 30 +29 42 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +40 29 29 29 @@ -2781,6 +3006,23 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +40 40 29 29 @@ -2799,6 +3041,41 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 +30 +29 +29 +29 +29 +29 +29 +29 +29 42 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 29 29 29 @@ -2809,9 +3086,9 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 -40 -40 +36 29 +36 29 29 29 @@ -2820,6 +3097,7 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 +29 34 29 29 29 @@ -2828,7 +3106,6 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 -30 29 29 29 @@ -2836,6 +3113,7 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 + 29 29 29 @@ -2851,6 +3129,7 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 +36 29 29 29 @@ -2868,39 +3147,65 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 +37 +37 +37 +37 +37 29 29 29 29 29 -36 29 -36 29 +37 +37 +37 +37 +37 29 29 29 +38 + 29 29 29 29 -29 34 29 29 29 29 29 +37 +37 +37 +37 +37 29 29 29 +35 +35 +37 +37 +37 +37 +37 +35 29 +37 +37 +37 +37 +37 29 29 29 29 29 29 - 29 29 29 @@ -2910,13 +3215,51 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 +37 +37 +37 +37 +37 +29 +29 +29 +37 +37 +37 +37 +37 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +40 +29 +29 +29 29 29 29 29 29 29 -36 29 29 29 @@ -2934,11 +3277,6 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 -37 -37 -37 -37 -37 29 29 29 @@ -2946,16 +3284,9 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 -37 -37 -37 -37 -37 29 29 29 -38 - 29 29 29 @@ -2965,11 +3296,6 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 -37 -37 -37 -37 -37 29 29 29 @@ -2981,12 +3307,79 @@ aarch64-linux-gnu aarch64_be-linux-gnu 37 37 35 -29 +35 +35 37 37 37 37 37 +35 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +42 +29 +29 +29 +29 +29 +29 +42 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 +29 29 29 29 @@ -3009,6 +3402,12 @@ aarch64-linux-gnu aarch64_be-linux-gnu 37 29 29 +37 +37 +37 +37 +37 +29 29 37 37 @@ -3027,6 +3426,11 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 +37 +37 +37 +37 +37 29 29 29 @@ -3037,10 +3441,10 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 -40 29 29 29 +38 29 29 29 @@ -3063,8 +3467,19 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 +42 +42 29 29 +35 +35 +37 +37 +37 +37 +37 +35 +29 29 29 29 @@ -3086,27 +3501,16 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 -35 -35 37 37 37 37 37 -35 -35 -35 37 37 37 37 37 -35 -29 -29 -29 -29 -29 29 29 29 @@ -3176,6 +3580,7 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 + 29 29 29 @@ -3194,11 +3599,12 @@ aarch64-linux-gnu aarch64_be-linux-gnu 37 29 29 -37 -37 -37 -37 -37 +29 +29 +29 +29 +29 +29 29 29 29 @@ -3217,6 +3623,15 @@ aarch64-linux-gnu aarch64_be-linux-gnu 37 37 29 +40 +38 +38 +38 +38 +38 +38 +38 +38 29 29 29 @@ -3229,9 +3644,6 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 -38 -29 -29 29 29 29 @@ -3241,6 +3653,22 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 +35 41 +35 41 +37 41 +37 41 +37 41 +37 41 +37 41 +35 41 +35 41 +35 41 +37 41 +37 41 +37 41 +37 41 +37 41 +35 41 29 29 29 @@ -3254,46 +3682,41 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 -35 -35 37 37 37 37 37 -35 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 29 29 +38 +38 +38 +38 29 29 29 29 +40 29 29 29 +35 +35 37 37 37 37 37 +35 +35 +35 37 37 37 37 37 +35 29 29 29 @@ -3333,213 +3756,7 @@ aarch64-linux-gnu aarch64_be-linux-gnu 29 29 29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 - -29 -29 -29 -29 -37 -37 -37 -37 -37 -29 -29 -37 -37 -37 -37 -37 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -37 -37 -37 -37 -37 -29 -40 -38 -38 -38 -38 -38 -38 -38 -38 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -35 41 -35 41 -37 41 -37 41 -37 41 -37 41 -37 41 -35 41 -35 41 -35 41 -37 41 -37 41 -37 41 -37 41 -37 41 -35 41 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -37 -37 -37 -37 -37 -29 -29 -38 -38 -38 -38 -29 -29 -29 -29 -40 -29 -29 -29 -35 -35 -37 -37 -37 -37 -37 -35 -35 -35 -37 -37 -37 -37 -37 -35 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 -29 - + 29 29 29 @@ -3942,7 +4159,9 @@ s390x-linux-gnu 27 27 + 27 + 27 @@ -3971,6 +4190,8 @@ s390x-linux-gnu + + 5 5 5 @@ -3979,43 +4200,79 @@ s390x-linux-gnu 27 27 + + 27 5 16 20 + + 5 5 5 27 27 + 27 27 27 + 27 + 5 5 5 5 5 + + + + + + + + + + + + + + 5 15 + 5 5 + 5 16 + 5 5 5 16 + 5 + 27 27 + 27 + + + + + + + + + 5 5 5 @@ -4043,29 +4300,50 @@ s390x-linux-gnu 20 + + 5 5 5 5 + + + 5 + + + 27 27 + 27 27 27 + 27 27 27 + 27 35 + + + + + + + + + + 5 5 27 @@ -4075,6 +4353,7 @@ s390x-linux-gnu + 39 5 16 @@ -4103,9 +4382,16 @@ s390x-linux-gnu + + + + + + 27 27 + 27 5 5 @@ -4114,6 +4400,8 @@ s390x-linux-gnu 16 5 15 16 + + 5 5 5 @@ -4123,10 +4411,17 @@ s390x-linux-gnu 5 5 5 + + + + 5 16 + + 5 5 + 5 5 16 @@ -4146,6 +4441,7 @@ s390x-linux-gnu 16 5 5 + 5 5 15 @@ -4161,7 +4457,9 @@ s390x-linux-gnu 27 27 + 27 + 5 5 5 @@ -4185,17 +4483,29 @@ s390x-linux-gnu 5 16 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 5 5 30 @@ -4223,23 +4533,29 @@ s390x-linux-gnu 27 27 + 27 27 27 + 27 27 27 + 27 5 5 5 + 27 27 + + 27 5 5 @@ -4255,23 +4571,34 @@ s390x-linux-gnu 5 5 5 +42 5 5 5 -11 +8 11 + + + 27 27 + 27 + 27 27 + 27 27 + 27 + 27 23 31 + + 5 @@ -4310,17 +4637,26 @@ s390x-linux-gnu + 5 5 19 + 11 + 5 + + + + + + 5 16 16 @@ -4433,7 +4769,11 @@ s390x-linux-gnu 5 5 20 + + 20 + + 5 5 19 @@ -4449,6 +4789,7 @@ s390x-linux-gnu 27 27 + 27 28 @@ -4456,7 +4797,10 @@ s390x-linux-gnu 16 16 15 16 + 5 16 + + 5 5 5 @@ -4487,6 +4831,11 @@ s390x-linux-gnu 14 16 5 + + + + + 5 5 5 @@ -4505,12 +4854,17 @@ s390x-linux-gnu 27 27 + 27 + 5 5 5 5 5 + + + 8 8 8 @@ -4518,7 +4872,11 @@ s390x-linux-gnu 5 27 27 + 27 + + + 19 18 19 @@ -4532,6 +4890,8 @@ s390x-linux-gnu 5 5 5 + + 5 5 5 @@ -4542,24 +4902,34 @@ s390x-linux-gnu 16 33 + 5 31 5 5 + 27 27 + 27 + 15 16 + + 15 16 + + 27 27 + 27 + 16 5 @@ -4592,6 +4962,9 @@ s390x-linux-gnu 5 5 5 16 + + + 12 5 @@ -4626,6 +4999,8 @@ s390x-linux-gnu 5 5 + + 5 5 5 @@ -4645,48 +5020,93 @@ s390x-linux-gnu 16 + + + 5 5 16 + + 5 + + + 5 12 5 5 + + 5 5 5 5 5 + 16 5 5 + + 5 12 20 + + 20 + + + + 5 15 16 + + 5 16 + 16 + + + 15 16 + + + 5 16 15 16 + + 15 16 + + 5 16 + 16 + + + 16 + + + + 16 + + + 5 5 + + 16 16 16 @@ -4705,6 +5125,8 @@ s390x-linux-gnu 5 5 + + 5 5 5 16 @@ -4726,7 +5148,10 @@ s390x-linux-gnu 16 5 16 + + 5 + 5 5 5 @@ -4739,14 +5164,17 @@ s390x-linux-gnu 27 27 + 27 27 27 + 27 27 27 + 27 5 5 @@ -5344,7 +5772,7 @@ s390x-linux-gnu 5 5 39 5 -5 +5 42 37 37 37 @@ -6470,17 +6898,19 @@ s390x-linux-gnu 5 5 5 +42 5 5 5 5 -14 15 +14 15 42 5 5 5 5 5 5 +42 5 5 5 @@ -6510,9 +6940,9 @@ s390x-linux-gnu 5 5 5 -14 15 +14 15 42 30 -8 +8 42 5 5 24 @@ -6578,7 +7008,7 @@ s390x-linux-gnu 5 15 5 -5 +5 42 23 5 5 @@ -6883,12 +7313,14 @@ s390x-linux-gnu 5 5 5 +42 5 5 5 5 5 5 +42 5 5 5 @@ -6994,6 +7426,8 @@ s390x-linux-gnu 5 18 5 +42 +42 5 16 12 16 35 @@ -7688,6 +8122,8 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf + + 16 16 16 @@ -7713,6 +8149,8 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf + + 16 16 16 @@ -7722,8 +8160,12 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 27 + + 16 20 + + 16 16 16 @@ -7731,6 +8173,7 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 27 + 27 27 @@ -7738,22 +8181,43 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf + + 16 16 16 16 16 + + + + + + + + + + + + + + 16 16 + 16 16 + 16 + 16 16 16 16 + 16 + 27 27 @@ -7762,6 +8226,16 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf + + + + + + + + + + 16 16 @@ -7785,29 +8259,50 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 20 + + 16 16 16 16 + + + 16 + + + 27 27 + 27 27 + 27 27 + 35 + + + + + + + + + + 16 16 27 @@ -7818,6 +8313,7 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf + 16 16 16 @@ -7845,10 +8341,17 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf + + + + + + 27 27 + 16 16 16 @@ -7856,6 +8359,8 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 + + 16 16 @@ -7865,10 +8370,17 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 16 + + + + 16 16 + + 16 16 + 16 16 16 @@ -7888,6 +8400,7 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 16 + 16 16 16 @@ -7904,6 +8417,8 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 27 + + 16 16 16 @@ -7927,17 +8442,29 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 16 16 30 @@ -7966,23 +8493,29 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 27 + 27 27 + 27 27 + 16 16 16 + 27 27 + + 16 16 16 @@ -7997,23 +8530,34 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 16 +42 16 16 16 + + + 27 27 + + 27 27 + 27 + 27 + 23 + + 16 @@ -8052,17 +8596,26 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf + 16 16 19 + 16 + 16 + + + + + + 16 @@ -8175,7 +8728,11 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 20 + + 20 + + 16 16 19 @@ -8193,12 +8750,16 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 27 + 28 16 16 16 16 + 16 + + 16 16 16 @@ -8229,6 +8790,11 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 16 + + + + + 16 16 16 @@ -8248,11 +8814,16 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 27 + + 16 16 16 16 16 + + + 16 16 16 @@ -8261,6 +8832,10 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 27 27 + + + + 19 18 19 @@ -8274,6 +8849,8 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 16 + + 16 16 16 @@ -8284,24 +8861,34 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 33 + 16 16 16 + 27 27 + + 16 + + 16 + + 27 27 + + 16 16 16 @@ -8334,6 +8921,9 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 16 + + + 16 16 @@ -8368,6 +8958,8 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 + + 16 16 16 @@ -8387,48 +8979,93 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 + + + 16 16 16 + + 16 + + + 16 16 16 16 + + 16 16 16 16 16 + 16 16 16 + + 16 16 20 + + 20 + + + + 16 16 + + 16 + 16 + + + 16 + + + 16 16 + + 16 + + 16 + 16 + + + 16 + + + + 16 + + + 16 16 + + 16 16 16 @@ -8447,6 +9084,8 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 + + 16 16 16 @@ -8468,7 +9107,10 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 16 + + 16 + 16 16 16 @@ -8482,14 +9124,17 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 27 + 27 27 + 27 27 + 16 16 16 @@ -9086,7 +9731,7 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 39 16 16 -16 +42 16 37 37 @@ -10212,17 +10857,19 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 16 +42 16 16 16 16 +42 16 16 16 16 16 16 16 -16 +42 16 16 16 @@ -10252,9 +10899,9 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 16 -16 +42 16 30 -16 +42 16 16 16 24 @@ -10320,7 +10967,7 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 16 -16 +42 16 23 16 16 @@ -10625,12 +11272,14 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 16 16 +42 16 16 16 16 16 16 +42 16 16 16 @@ -10736,6 +11385,8 @@ arm-linux-gnueabi armeb-linux-gnueabi arm-linux-gnueabihf armeb-linux-gnueabihf 16 18 16 +42 +42 16 16 35 @@ -11426,7 +12077,9 @@ sparc-linux-gnu sparcel-linux-gnu 27 27 + 27 + 27 @@ -11455,6 +12108,8 @@ sparc-linux-gnu sparcel-linux-gnu + + 0 0 0 @@ -11463,43 +12118,79 @@ sparc-linux-gnu sparcel-linux-gnu 27 27 + + 27 1 16 20 + + 5 0 0 27 27 + 27 27 27 + 27 + 1 1 1 0 0 + + + + + + + + + + + + + + 0 15 + 1 1 + 1 16 + 0 0 0 16 + 0 + 27 27 + 27 + + + + + + + + + 0 5 5 @@ -11527,29 +12218,50 @@ sparc-linux-gnu sparcel-linux-gnu 20 + + 0 1 5 0 + + + 0 + + + 27 27 + 27 27 27 + 27 27 27 + 27 35 + + + + + + + + + + 5 0 27 @@ -11560,6 +12272,7 @@ sparc-linux-gnu sparcel-linux-gnu + 0 16 16 @@ -11587,9 +12300,16 @@ sparc-linux-gnu sparcel-linux-gnu + + + + + + 27 27 + 27 0 1 @@ -11598,6 +12318,8 @@ sparc-linux-gnu sparcel-linux-gnu 16 5 15 16 + + 0 5 0 @@ -11607,10 +12329,17 @@ sparc-linux-gnu sparcel-linux-gnu 5 0 1 + + + + 5 16 + + 5 5 + 0 1 5 16 @@ -11630,6 +12359,7 @@ sparc-linux-gnu sparcel-linux-gnu 16 5 0 + 0 0 15 @@ -11645,7 +12375,9 @@ sparc-linux-gnu sparcel-linux-gnu 27 27 + 27 + 1 1 1 @@ -11669,17 +12401,29 @@ sparc-linux-gnu sparcel-linux-gnu 0 16 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 1 1 30 @@ -11707,23 +12451,29 @@ sparc-linux-gnu sparcel-linux-gnu 27 27 + 27 27 27 + 27 27 27 + 27 1 1 1 + 27 27 + + 27 1 0 @@ -11739,23 +12489,34 @@ sparc-linux-gnu sparcel-linux-gnu 0 0 1 +42 1 0 0 -3 11 +3 8 11 + + + 27 27 + 27 + 27 27 + 27 27 + 27 + 27 23 + + 0 @@ -11794,17 +12555,26 @@ sparc-linux-gnu sparcel-linux-gnu + 0 0 19 + 11 + 1 + + + + + + 5 16 16 @@ -11917,7 +12687,11 @@ sparc-linux-gnu sparcel-linux-gnu 0 0 20 + + 20 + + 0 5 19 @@ -11933,6 +12707,7 @@ sparc-linux-gnu sparcel-linux-gnu 27 27 + 27 28 @@ -11940,7 +12715,10 @@ sparc-linux-gnu sparcel-linux-gnu 16 16 15 16 + 0 16 + + 0 0 0 @@ -11971,6 +12749,11 @@ sparc-linux-gnu sparcel-linux-gnu 14 16 1 5 + + + + + 1 0 0 @@ -11989,12 +12772,17 @@ sparc-linux-gnu sparcel-linux-gnu 27 27 + 27 + 5 5 5 0 5 + + + 8 8 8 @@ -12002,7 +12790,11 @@ sparc-linux-gnu sparcel-linux-gnu 0 27 27 + 27 + + + 19 18 19 @@ -12016,6 +12808,8 @@ sparc-linux-gnu sparcel-linux-gnu 0 0 5 + + 0 0 0 @@ -12026,24 +12820,34 @@ sparc-linux-gnu sparcel-linux-gnu 16 33 + 0 0 4 + 27 27 + 27 + 15 16 + + 15 16 + + 27 27 + 33 + 16 5 @@ -12076,6 +12880,9 @@ sparc-linux-gnu sparcel-linux-gnu 0 0 1 16 + + + 12 1 @@ -12110,6 +12917,8 @@ sparc-linux-gnu sparcel-linux-gnu 0 1 + + 0 2 0 @@ -12129,48 +12938,93 @@ sparc-linux-gnu sparcel-linux-gnu 16 + + + 5 5 16 + + 0 + + + 0 12 1 1 + + 1 1 1 1 1 + 16 0 0 + + 0 12 20 + + 20 + + + + 3 15 16 + + 0 16 + 16 + + + 15 16 + + + 0 16 15 16 + + 15 16 + + 0 16 + 16 + + + 16 + + + + 16 + + + 0 0 + + 16 16 16 @@ -12189,6 +13043,8 @@ sparc-linux-gnu sparcel-linux-gnu 0 1 + + 0 1 0 16 @@ -12210,7 +13066,10 @@ sparc-linux-gnu sparcel-linux-gnu 16 5 16 + + 0 + 5 5 0 @@ -12223,14 +13082,17 @@ sparc-linux-gnu sparcel-linux-gnu 27 27 + 27 27 27 + 27 27 27 + 27 1 1 @@ -12828,7 +13690,7 @@ sparc-linux-gnu sparcel-linux-gnu 0 0 39 1 -1 +1 42 37 37 37 @@ -13954,17 +14816,19 @@ sparc-linux-gnu sparcel-linux-gnu 0 0 0 +42 5 1 1 0 1 -14 15 +14 15 42 0 1 0 0 0 0 +42 5 14 1 1 14 @@ -13994,9 +14858,9 @@ sparc-linux-gnu sparcel-linux-gnu 0 0 0 -14 15 +14 15 42 30 -8 +8 42 1 5 24 @@ -14062,7 +14926,7 @@ sparc-linux-gnu sparcel-linux-gnu 0 15 0 -0 +0 42 23 5 5 @@ -14367,12 +15231,14 @@ sparc-linux-gnu sparcel-linux-gnu 0 0 0 +42 0 0 0 0 0 0 +42 0 0 0 @@ -14478,6 +15344,8 @@ sparc-linux-gnu sparcel-linux-gnu 0 18 0 +42 +42 0 16 12 16 35 @@ -15168,7 +16036,9 @@ sparcv9-linux-gnu 27 27 + 27 + 27 @@ -15197,6 +16067,8 @@ sparcv9-linux-gnu 5 5 + + 5 5 5 @@ -15205,43 +16077,79 @@ sparcv9-linux-gnu 27 27 + + 27 5 20 + + 5 5 5 27 27 + 27 27 27 + 27 + 5 5 5 5 5 + + + + + + + + + + + + + + 5 15 + 5 5 + 5 + 5 5 5 16 + 5 + 27 27 + 27 + + + + + + + + + 5 5 5 @@ -15269,29 +16177,50 @@ sparcv9-linux-gnu 20 + + 5 5 5 5 + + + 5 + + + 27 27 + 27 27 27 + 27 27 27 + 27 35 + + + + + + + + + + 5 5 27 @@ -15302,6 +16231,7 @@ sparcv9-linux-gnu + 5 16 16 @@ -15329,9 +16259,16 @@ sparcv9-linux-gnu + + + + + + 27 27 + 27 5 5 @@ -15340,6 +16277,8 @@ sparcv9-linux-gnu 5 5 15 + + 5 5 5 @@ -15349,10 +16288,17 @@ sparcv9-linux-gnu 5 5 5 + + + + 5 16 + + 5 5 + 5 5 16 @@ -15372,6 +16318,7 @@ sparcv9-linux-gnu 16 5 5 + 5 5 15 @@ -15387,7 +16334,9 @@ sparcv9-linux-gnu 27 27 + 27 + 5 5 5 @@ -15411,17 +16360,29 @@ sparcv9-linux-gnu 5 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 5 5 30 @@ -15449,23 +16410,29 @@ sparcv9-linux-gnu 27 27 + 27 27 27 + 27 27 27 + 27 5 5 5 + 27 27 + + 27 5 5 @@ -15481,23 +16448,34 @@ sparcv9-linux-gnu 5 5 5 +42 5 5 5 -11 +8 11 + + + 27 27 + 27 + 27 27 + 27 27 + 27 + 27 23 + + 5 @@ -15536,17 +16514,26 @@ sparcv9-linux-gnu + 5 5 19 + 11 + 5 + + + + + + 5 @@ -15659,7 +16646,11 @@ sparcv9-linux-gnu 5 5 20 + + 20 + + 5 5 19 @@ -15675,6 +16666,7 @@ sparcv9-linux-gnu 27 27 + 27 28 @@ -15682,7 +16674,10 @@ sparcv9-linux-gnu 16 16 15 + 5 + + 5 5 5 @@ -15713,6 +16708,11 @@ sparcv9-linux-gnu 14 16 5 + + + + + 5 5 5 @@ -15731,12 +16731,17 @@ sparcv9-linux-gnu 27 27 + 27 + 5 5 5 5 5 + + + 8 8 8 @@ -15744,7 +16749,11 @@ sparcv9-linux-gnu 5 27 27 + 27 + + + 19 18 19 @@ -15758,6 +16767,8 @@ sparcv9-linux-gnu 5 5 5 + + 5 5 5 @@ -15768,24 +16779,34 @@ sparcv9-linux-gnu 5 33 + 5 5 5 + 27 27 + 27 + 15 + + 15 + + 27 27 + 27 + 16 5 @@ -15818,6 +16839,9 @@ sparcv9-linux-gnu 5 5 5 + + + 12 5 @@ -15852,6 +16876,8 @@ sparcv9-linux-gnu 5 5 + + 5 5 5 @@ -15871,48 +16897,93 @@ sparcv9-linux-gnu 16 + + + 5 5 16 + + 5 + + + 5 12 5 5 + + 5 5 5 5 5 + 16 5 5 + + 5 12 20 + + 20 + + + + 5 15 + + 5 + 16 + + + 15 + + + 5 15 + + 15 + + 5 + 16 + + + 16 + + + + 16 + + + 5 5 + + 16 16 16 @@ -15931,6 +17002,8 @@ sparcv9-linux-gnu 5 5 + + 5 5 5 @@ -15952,7 +17025,10 @@ sparcv9-linux-gnu 16 5 16 + + 5 + 5 5 5 @@ -15965,14 +17041,17 @@ sparcv9-linux-gnu 27 27 + 27 27 27 + 27 27 27 + 27 5 5 @@ -16570,7 +17649,7 @@ sparcv9-linux-gnu 5 5 39 5 -5 +5 42 37 37 37 @@ -17696,17 +18775,19 @@ sparcv9-linux-gnu 5 5 5 +42 5 5 5 5 -14 15 +14 15 42 5 5 5 5 5 5 +42 5 14 5 5 14 @@ -17736,9 +18817,9 @@ sparcv9-linux-gnu 5 5 5 -14 15 +14 15 42 30 -8 +8 42 5 5 24 @@ -17804,7 +18885,7 @@ sparcv9-linux-gnu 5 15 5 -5 +5 42 23 5 5 @@ -18109,12 +19190,14 @@ sparcv9-linux-gnu 5 5 5 +42 5 5 5 5 5 5 +42 5 5 5 @@ -18220,6 +19303,8 @@ sparcv9-linux-gnu 5 18 5 +42 +42 5 12 35 @@ -18910,7 +19995,9 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 27 27 + 27 + 27 @@ -18939,6 +20026,8 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 + + 0 0 0 @@ -18947,43 +20036,79 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 27 27 + + 27 5 20 + + 5 0 0 27 27 + 27 27 27 + 27 + 5 5 5 0 0 + + + + + + + + + + + + + + 0 15 + 5 5 + 5 + 0 0 0 16 + 0 + 27 27 + 27 + + + + + + + + + 0 5 5 @@ -19011,29 +20136,50 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 20 + + 0 5 5 0 + + + 0 + + + 27 27 + 27 27 27 + 27 27 27 + 27 35 + + + + + + + + + + 5 0 27 @@ -19044,6 +20190,7 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 + 0 16 16 @@ -19071,9 +20218,16 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 + + + + + + 27 27 + 27 0 5 @@ -19082,6 +20236,8 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 5 5 15 + + 0 5 0 @@ -19091,10 +20247,17 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 5 0 5 + + + + 5 16 + + 5 5 + 0 5 16 @@ -19114,6 +20277,7 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 16 5 0 + 0 0 15 @@ -19129,7 +20293,9 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 27 27 + 27 + 5 5 5 @@ -19153,17 +20319,29 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 0 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 5 5 30 @@ -19191,23 +20369,29 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 27 27 + 27 27 27 + 27 27 27 + 27 5 5 5 + 27 27 + + 27 5 0 @@ -19223,23 +20407,34 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 0 0 5 +42 5 0 0 -11 +8 11 + + + 27 27 + 27 + 27 27 + 27 27 + 27 + 27 23 + + 0 @@ -19278,17 +20473,26 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 + 0 0 19 + 11 + 5 + + + + + + 5 @@ -19401,7 +20605,11 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 0 0 20 + + 20 + + 0 5 19 @@ -19417,6 +20625,7 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 27 27 + 27 28 @@ -19424,7 +20633,10 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 16 16 15 + 0 + + 0 0 0 @@ -19455,6 +20667,11 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 14 16 5 + + + + + 5 0 0 @@ -19473,12 +20690,17 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 27 27 + 27 + 5 5 5 0 5 + + + 8 8 8 @@ -19486,7 +20708,11 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 0 27 27 + 27 + + + 19 18 19 @@ -19500,6 +20726,8 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 0 0 5 + + 0 0 0 @@ -19510,24 +20738,34 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 5 33 + 0 0 5 + 27 27 + 27 + 15 + + 15 + + 27 27 + 27 + 16 16 5 @@ -19560,6 +20798,9 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 0 0 5 + + + 12 5 @@ -19594,6 +20835,8 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 0 5 + + 0 5 0 @@ -19613,48 +20856,93 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 16 + + + 5 5 16 + + 0 + + + 0 12 5 5 + + 5 5 5 5 5 + 16 0 0 + + 0 12 20 + + 20 + + + + 5 15 + + 0 + 16 + + + 15 + + + 0 15 + + 15 + + 0 + 16 + + + 16 + + + + 16 + + + 0 0 + + 16 16 16 @@ -19673,6 +20961,8 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 0 5 + + 0 5 0 @@ -19694,7 +20984,10 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 16 5 16 + + 0 + 5 5 0 @@ -19707,14 +21000,17 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 27 27 + 27 27 27 + 27 27 27 + 27 5 5 @@ -20312,7 +21608,7 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 0 0 39 5 -5 +5 42 37 37 37 @@ -21438,17 +22734,19 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 0 0 0 +42 5 5 5 0 5 -14 15 +14 15 42 0 5 0 0 0 0 +42 5 14 5 5 14 @@ -21478,9 +22776,9 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 0 0 0 -14 15 +14 15 42 30 -8 +8 42 5 5 24 @@ -21546,7 +22844,7 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 0 15 0 -0 +0 42 23 5 5 @@ -21851,12 +23149,14 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 0 0 0 +42 0 0 0 0 0 0 +42 0 0 0 @@ -21962,6 +23262,8 @@ mips64el-linux-gnuabi64 mips64-linux-gnuabi64 0 18 0 +42 +42 0 12 35 @@ -22652,7 +23954,9 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 27 27 + 27 + 27 @@ -22681,6 +23985,8 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 + + 0 0 0 @@ -22689,43 +23995,79 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 27 27 + + 27 5 20 + + 5 0 0 27 27 + 27 27 27 + 27 + 5 5 5 0 0 + + + + + + + + + + + + + + 0 15 + 5 5 + 5 + 0 0 0 16 + 0 + 27 27 + 27 + + + + + + + + + 0 5 5 @@ -22753,29 +24095,50 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 20 + + 0 5 5 0 + + + 0 + + + 27 27 + 27 27 27 + 27 27 27 + 27 35 + + + + + + + + + + 5 0 27 @@ -22786,6 +24149,7 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 + 0 16 16 @@ -22813,9 +24177,16 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 + + + + + + 27 27 + 27 0 5 @@ -22824,6 +24195,8 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 5 5 15 + + 0 5 0 @@ -22833,10 +24206,17 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 5 0 5 + + + + 5 16 + + 5 5 + 0 5 16 @@ -22856,6 +24236,7 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 16 5 0 + 0 0 15 @@ -22871,7 +24252,9 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 27 27 + 27 + 5 5 5 @@ -22895,17 +24278,29 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 0 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 5 5 30 @@ -22933,23 +24328,29 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 27 27 + 27 27 27 + 27 27 27 + 27 5 5 5 + 27 27 + + 27 5 0 @@ -22965,23 +24366,34 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 0 0 5 +42 5 0 0 -11 +8 11 + + + 27 27 + 27 + 27 27 + 27 27 + 27 + 27 23 + + 0 @@ -23020,17 +24432,26 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 + 0 0 19 + 11 + 5 + + + + + + 5 @@ -23143,7 +24564,11 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 0 0 20 + + 20 + + 0 5 19 @@ -23159,6 +24584,7 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 27 27 + 27 28 @@ -23166,7 +24592,10 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 16 16 15 + 0 + + 0 0 0 @@ -23197,6 +24626,11 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 14 16 5 + + + + + 5 0 0 @@ -23215,12 +24649,17 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 27 27 + 27 + 5 5 5 0 5 + + + 8 8 8 @@ -23228,7 +24667,11 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 0 27 27 + 27 + + + 19 18 19 @@ -23242,6 +24685,8 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 0 0 5 + + 0 0 0 @@ -23252,24 +24697,34 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 5 33 + 0 0 5 + 27 27 + 27 + 15 + + 15 + + 27 27 + 27 + 16 16 5 @@ -23302,6 +24757,9 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 0 0 5 + + + 12 5 @@ -23336,6 +24794,8 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 0 5 + + 0 5 0 @@ -23355,48 +24815,93 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 16 + + + 5 5 16 + + 0 + + + 0 12 5 5 + + 5 5 5 5 5 + 16 0 0 + + 0 12 20 + + 20 + + + + 5 15 + + 0 + 16 + + + 15 + + + 0 15 + + 15 + + 0 + 16 + + + 16 + + + + 16 + + + 0 0 + + 16 16 16 @@ -23415,6 +24920,8 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 0 5 + + 0 5 0 @@ -23436,7 +24943,10 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 16 5 16 + + 0 + 5 5 0 @@ -23449,14 +24959,17 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 27 27 + 27 27 27 + 27 27 27 + 27 5 5 @@ -24054,7 +25567,7 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 0 0 39 5 -5 +5 42 37 37 37 @@ -25180,17 +26693,19 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 0 0 0 +42 5 5 5 0 5 -14 15 +14 15 42 0 5 0 0 0 0 +42 5 14 5 5 14 @@ -25220,9 +26735,9 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 0 0 0 -14 15 +14 15 42 30 -8 +8 42 5 5 24 @@ -25288,7 +26803,7 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 0 15 0 -0 +0 42 23 5 5 @@ -25593,12 +27108,14 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 0 0 0 +42 0 0 0 0 0 0 +42 0 0 0 @@ -25704,6 +27221,8 @@ mips64el-linux-gnuabin32 mips64-linux-gnuabin32 0 18 0 +42 +42 0 12 35 @@ -26398,6 +27917,8 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf + + 0 @@ -26423,6 +27944,8 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf + + 0 0 0 @@ -26432,8 +27955,12 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 27 + + 5 20 + + 5 0 0 @@ -26441,6 +27968,7 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 27 + 27 27 @@ -26448,26 +27976,57 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf + + 5 5 5 0 0 + + + + + + + + + + + + + + 0 15 + 5 5 + 5 + 0 0 0 16 + 0 + 27 27 + + + + + + + + + + 0 5 5 @@ -26495,29 +28054,50 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 20 + + 0 5 5 0 + + + 0 + + + 27 27 + 27 27 + 27 27 + 35 + + + + + + + + + + 5 0 27 @@ -26528,6 +28108,7 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf + 0 16 16 @@ -26555,10 +28136,17 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf + + + + + + 27 27 + 0 5 5 @@ -26566,6 +28154,8 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 5 15 + + 0 5 0 @@ -26575,10 +28165,17 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 5 0 5 + + + + 5 16 + + 5 5 + 0 5 16 @@ -26598,6 +28195,7 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 16 5 0 + 0 0 15 @@ -26614,6 +28212,8 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 27 + + 5 5 5 @@ -26637,17 +28237,29 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 0 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 5 5 30 @@ -26676,23 +28288,29 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 27 + 27 27 + 27 27 + 5 5 5 + 27 27 + + 5 0 5 @@ -26707,23 +28325,34 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 0 0 5 +42 5 0 0 -11 +8 11 + + + 27 27 + + 27 27 + 27 + 27 + 23 + + 0 @@ -26762,17 +28391,26 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 30 30 + 0 0 19 + 11 + 5 + + + + + + 5 @@ -26885,7 +28523,11 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 0 0 20 + + 20 + + 0 5 19 @@ -26903,12 +28545,16 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 27 + 28 5 16 16 15 + 0 + + 0 0 0 @@ -26939,6 +28585,11 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 14 16 5 + + + + + 5 0 0 @@ -26958,11 +28609,16 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 27 + + 5 5 5 0 5 + + + 8 8 8 @@ -26971,6 +28627,10 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 27 27 + + + + 19 18 19 @@ -26984,6 +28644,8 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 0 0 5 + + 0 0 0 @@ -26994,24 +28656,34 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 33 + 0 0 5 + 27 27 + + 15 + + 15 + + 27 27 + + 16 16 5 @@ -27044,6 +28716,9 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 0 0 5 + + + 12 5 @@ -27078,6 +28753,8 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 0 5 + + 0 5 0 @@ -27097,48 +28774,93 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 16 + + + 5 5 16 + + 0 + + + 0 12 5 5 + + 5 5 5 5 5 + 16 0 0 + + 0 12 20 + + 20 + + + + 5 15 + + 0 + 16 + + + 15 + + + 0 15 + + 15 + + 0 + 16 + + + 16 + + + + 16 + + + 0 0 + + 16 16 16 @@ -27157,6 +28879,8 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 0 5 + + 0 5 0 @@ -27178,7 +28902,10 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 16 5 16 + + 0 + 5 5 0 @@ -27192,14 +28919,17 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 27 + 27 27 + 27 27 + 5 5 5 @@ -27796,7 +29526,7 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 0 0 39 5 -5 +5 42 37 37 @@ -28922,17 +30652,19 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 0 0 0 +42 5 5 5 0 5 -14 15 +14 15 42 0 5 0 0 0 0 +42 5 14 5 5 14 @@ -28962,9 +30694,9 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 0 0 0 -14 15 +14 15 42 30 -8 +8 42 5 5 24 @@ -29030,7 +30762,7 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 0 15 0 -0 +0 42 23 5 5 @@ -29335,12 +31067,14 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 0 0 0 +42 0 0 0 0 0 0 +42 0 0 0 @@ -29446,6 +31180,8 @@ mipsel-linux-gnueabihf mips-linux-gnueabihf 0 18 0 +42 +42 0 12 35 @@ -30140,6 +31876,8 @@ mipsel-linux-gnueabi mips-linux-gnueabi + + 0 @@ -30165,6 +31903,8 @@ mipsel-linux-gnueabi mips-linux-gnueabi + + 0 0 0 @@ -30174,8 +31914,12 @@ mipsel-linux-gnueabi mips-linux-gnueabi 27 + + 5 20 + + 5 0 0 @@ -30183,6 +31927,7 @@ mipsel-linux-gnueabi mips-linux-gnueabi 27 + 27 27 @@ -30190,26 +31935,57 @@ mipsel-linux-gnueabi mips-linux-gnueabi + + 5 5 5 0 0 + + + + + + + + + + + + + + 0 15 + 5 5 + 5 + 0 0 0 16 + 0 + 27 27 + + + + + + + + + + 0 5 5 @@ -30237,29 +32013,50 @@ mipsel-linux-gnueabi mips-linux-gnueabi 20 + + 0 5 5 0 + + + 0 + + + 27 27 + 27 27 + 27 27 + 35 + + + + + + + + + + 5 0 27 @@ -30270,6 +32067,7 @@ mipsel-linux-gnueabi mips-linux-gnueabi + 0 16 16 @@ -30297,10 +32095,17 @@ mipsel-linux-gnueabi mips-linux-gnueabi + + + + + + 27 27 + 0 5 5 @@ -30308,6 +32113,8 @@ mipsel-linux-gnueabi mips-linux-gnueabi 5 15 + + 0 5 0 @@ -30317,10 +32124,17 @@ mipsel-linux-gnueabi mips-linux-gnueabi 5 0 5 + + + + 5 16 + + 5 5 + 0 5 16 @@ -30340,6 +32154,7 @@ mipsel-linux-gnueabi mips-linux-gnueabi 16 5 0 + 0 0 15 @@ -30356,6 +32171,8 @@ mipsel-linux-gnueabi mips-linux-gnueabi 27 + + 5 5 5 @@ -30379,17 +32196,29 @@ mipsel-linux-gnueabi mips-linux-gnueabi 0 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 5 5 30 @@ -30418,23 +32247,29 @@ mipsel-linux-gnueabi mips-linux-gnueabi 27 + 27 27 + 27 27 + 5 5 5 + 27 27 + + 5 0 5 @@ -30449,23 +32284,34 @@ mipsel-linux-gnueabi mips-linux-gnueabi 0 0 5 +42 5 0 0 -11 +8 11 + + + 27 27 + + 27 27 + 27 + 27 + 23 + + 0 @@ -30504,17 +32350,26 @@ mipsel-linux-gnueabi mips-linux-gnueabi + 0 0 19 + 11 + 5 + + + + + + 5 @@ -30627,7 +32482,11 @@ mipsel-linux-gnueabi mips-linux-gnueabi 0 0 20 + + 20 + + 0 5 19 @@ -30645,12 +32504,16 @@ mipsel-linux-gnueabi mips-linux-gnueabi 27 + 28 5 16 16 15 + 0 + + 0 0 0 @@ -30681,6 +32544,11 @@ mipsel-linux-gnueabi mips-linux-gnueabi 14 16 5 + + + + + 5 0 0 @@ -30700,11 +32568,16 @@ mipsel-linux-gnueabi mips-linux-gnueabi 27 + + 5 5 5 0 5 + + + 8 8 8 @@ -30713,6 +32586,10 @@ mipsel-linux-gnueabi mips-linux-gnueabi 27 27 + + + + 19 18 19 @@ -30726,6 +32603,8 @@ mipsel-linux-gnueabi mips-linux-gnueabi 0 0 5 + + 0 0 0 @@ -30736,24 +32615,34 @@ mipsel-linux-gnueabi mips-linux-gnueabi 33 + 0 0 5 + 27 27 + + 15 + + 15 + + 27 27 + + 16 16 5 @@ -30786,6 +32675,9 @@ mipsel-linux-gnueabi mips-linux-gnueabi 0 0 5 + + + 12 5 @@ -30820,6 +32712,8 @@ mipsel-linux-gnueabi mips-linux-gnueabi 0 5 + + 0 5 0 @@ -30839,48 +32733,93 @@ mipsel-linux-gnueabi mips-linux-gnueabi 16 + + + 5 5 16 + + 0 + + + 0 12 5 5 + + 5 5 5 5 5 + 16 0 0 + + 0 12 20 + + 20 + + + + 5 15 + + 0 + 16 + + + 15 + + + 0 15 + + 15 + + 0 + 16 + + + 16 + + + + 16 + + + 0 0 + + 16 16 16 @@ -30899,6 +32838,8 @@ mipsel-linux-gnueabi mips-linux-gnueabi 0 5 + + 0 5 0 @@ -30920,7 +32861,10 @@ mipsel-linux-gnueabi mips-linux-gnueabi 16 5 16 + + 0 + 5 5 0 @@ -30934,14 +32878,17 @@ mipsel-linux-gnueabi mips-linux-gnueabi 27 + 27 27 + 27 27 + 5 5 5 @@ -31538,7 +33485,7 @@ mipsel-linux-gnueabi mips-linux-gnueabi 0 0 39 5 -5 +5 42 37 37 @@ -32664,17 +34611,19 @@ mipsel-linux-gnueabi mips-linux-gnueabi 0 0 0 +42 5 5 5 0 5 -14 15 +14 15 42 0 5 0 0 0 0 +42 5 14 5 5 14 @@ -32704,9 +34653,9 @@ mipsel-linux-gnueabi mips-linux-gnueabi 0 0 0 -14 15 +14 15 42 30 -8 +8 42 5 5 24 @@ -32772,7 +34721,7 @@ mipsel-linux-gnueabi mips-linux-gnueabi 0 15 0 -0 +0 42 23 5 5 @@ -33077,12 +35026,14 @@ mipsel-linux-gnueabi mips-linux-gnueabi 0 0 0 +42 0 0 0 0 0 0 +42 0 0 0 @@ -33188,6 +35139,8 @@ mipsel-linux-gnueabi mips-linux-gnueabi 0 18 0 +42 +42 0 12 35 @@ -33878,7 +35831,9 @@ x86_64-linux-gnu 27 36 27 + 27 + 27 @@ -33907,6 +35862,8 @@ x86_64-linux-gnu 10 + + 10 10 10 @@ -33915,43 +35872,79 @@ x86_64-linux-gnu 27 36 27 + + 27 10 20 + + 10 10 10 27 36 27 + 27 27 36 27 + 27 + 10 10 10 10 10 + + + + + + + + + + + + + + 10 15 + 10 10 + 10 + 10 10 10 16 + 10 + 27 36 27 + 27 + + + + + + + + + 10 10 10 @@ -33979,29 +35972,50 @@ x86_64-linux-gnu 20 + + 10 10 10 10 + + + 10 + + + 27 36 27 + 27 27 36 27 + 27 27 36 27 + 27 35 + + + + + + + + + + 10 10 27 @@ -34011,6 +36025,7 @@ x86_64-linux-gnu + 25 10 16 @@ -34039,9 +36054,16 @@ x86_64-linux-gnu + + + + + + 27 36 27 + 27 10 10 @@ -34050,6 +36072,8 @@ x86_64-linux-gnu 10 10 15 + + 10 10 @@ -34059,10 +36083,17 @@ x86_64-linux-gnu 10 10 10 + + + + 10 16 + + 10 10 + 10 10 16 @@ -34082,6 +36113,7 @@ x86_64-linux-gnu 16 10 10 + 10 10 15 @@ -34097,7 +36129,9 @@ x86_64-linux-gnu 27 36 27 + 27 + 10 10 10 @@ -34121,17 +36155,29 @@ x86_64-linux-gnu 36 10 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 10 10 30 @@ -34159,23 +36205,29 @@ x86_64-linux-gnu 27 36 27 + 27 27 36 27 + 27 27 36 27 + 27 10 10 10 + 27 36 27 + + 27 10 10 @@ -34191,23 +36243,34 @@ x86_64-linux-gnu 10 10 10 +42 10 10 10 11 + + + 27 36 27 + 27 + 27 36 27 + 27 27 + 36 27 + 27 23 + + 10 @@ -34246,17 +36309,26 @@ x86_64-linux-gnu + 10 10 19 + 11 + 10 + + + + + + 10 @@ -34369,7 +36441,11 @@ x86_64-linux-gnu 10 10 20 + + 20 + + 10 10 19 @@ -34385,6 +36461,7 @@ x86_64-linux-gnu 27 36 27 + 27 28 @@ -34392,7 +36469,10 @@ x86_64-linux-gnu 16 16 15 + 10 + + 10 10 10 @@ -34423,6 +36503,11 @@ x86_64-linux-gnu 14 16 10 + + + + + 10 10 10 @@ -34441,12 +36526,17 @@ x86_64-linux-gnu 27 36 27 + 27 + 10 10 10 10 10 + + + 10 10 10 @@ -34454,7 +36544,11 @@ x86_64-linux-gnu 10 27 27 + 27 + + + 19 18 19 @@ -34468,6 +36562,8 @@ x86_64-linux-gnu 10 10 10 + + 10 10 10 @@ -34478,24 +36574,34 @@ x86_64-linux-gnu 36 10 33 + 10 10 10 + 27 36 27 + 27 + 15 + + 15 + + 27 36 27 + 27 + 16 10 @@ -34528,6 +36634,9 @@ x86_64-linux-gnu 10 10 10 + + + 12 10 @@ -34562,6 +36671,8 @@ x86_64-linux-gnu 36 10 10 + + 10 10 10 @@ -34581,48 +36692,93 @@ x86_64-linux-gnu 16 + + + 10 10 16 + + 10 + + + 10 12 10 10 + + 10 10 10 10 10 + 16 10 10 + + 10 12 20 + + 20 + + + + 10 15 + + 10 + 16 + + + 15 + + + 10 15 + + 15 + + 10 + 16 + + + 16 + + + + 16 + + + 10 10 + + 16 16 16 @@ -34641,6 +36797,8 @@ x86_64-linux-gnu 36 10 10 + + 10 10 10 @@ -34662,7 +36820,10 @@ x86_64-linux-gnu 16 10 16 + + 10 + 10 10 10 @@ -34675,14 +36836,17 @@ x86_64-linux-gnu 27 36 27 + 27 27 36 27 + 27 27 36 27 + 27 10 10 @@ -35280,7 +37444,7 @@ x86_64-linux-gnu 10 10 39 10 -10 +10 42 36 37 37 @@ -36406,17 +38570,19 @@ x86_64-linux-gnu 10 10 10 +42 10 10 10 10 -14 15 +14 15 42 10 10 10 10 10 10 +42 10 10 10 @@ -36446,9 +38612,9 @@ x86_64-linux-gnu 10 10 10 -14 15 +14 15 42 30 -10 +10 42 10 10 24 @@ -36514,7 +38680,7 @@ x86_64-linux-gnu 10 15 10 -10 +10 42 23 10 10 @@ -36819,12 +38985,14 @@ x86_64-linux-gnu 10 10 10 +42 10 10 10 10 10 10 +42 10 10 10 @@ -36930,6 +39098,8 @@ x86_64-linux-gnu 10 18 10 +42 +42 10 12 35 @@ -37620,7 +39790,9 @@ x86_64-linux-gnux32 28 36 28 + 28 + 28 @@ -37649,6 +39821,8 @@ x86_64-linux-gnux32 28 + + 28 28 28 @@ -37657,47 +39831,83 @@ x86_64-linux-gnux32 28 36 28 + + 28 28 28 + + 28 28 28 28 36 28 + 28 28 36 28 + 28 + 28 28 28 28 28 + + + + + + + + + + + + + + 28 28 + 28 28 + 28 + 28 28 28 28 + 28 + 28 36 28 + 28 + + + + + + + + + 28 28 @@ -37721,29 +39931,50 @@ x86_64-linux-gnux32 28 + + 28 28 28 28 + + + 28 + + + 28 36 28 + 28 28 36 28 + 28 28 36 28 + 28 35 + + + + + + + + + + 28 28 28 @@ -37753,6 +39984,7 @@ x86_64-linux-gnux32 + 28 28 28 @@ -37781,9 +40013,16 @@ x86_64-linux-gnux32 + + + + + + 28 36 28 + 28 28 28 @@ -37792,6 +40031,8 @@ x86_64-linux-gnux32 28 28 28 + + 28 28 @@ -37801,10 +40042,17 @@ x86_64-linux-gnux32 28 28 28 + + + + 28 28 + + 28 28 + 28 28 28 @@ -37824,6 +40072,7 @@ x86_64-linux-gnux32 28 28 28 + 28 28 28 @@ -37839,7 +40088,9 @@ x86_64-linux-gnux32 28 36 28 + 28 + 28 28 28 @@ -37863,17 +40114,29 @@ x86_64-linux-gnux32 36 28 28 + 28 + 28 + 28 + 28 + 28 + 28 + 28 + 28 + 28 + 28 + 28 + 28 28 30 @@ -37901,23 +40164,29 @@ x86_64-linux-gnux32 28 36 28 + 28 28 36 28 + 28 28 36 28 + 28 28 28 28 + 28 36 28 + + 28 28 28 @@ -37933,23 +40202,34 @@ x86_64-linux-gnux32 28 28 28 +42 28 28 28 + + + 28 36 28 + 28 + 28 36 28 + 28 28 + 36 28 + 28 28 + + 28 @@ -37988,17 +40268,26 @@ x86_64-linux-gnux32 + 28 28 28 + 28 + 28 + + + + + + 28 @@ -38111,7 +40400,11 @@ x86_64-linux-gnux32 28 28 28 + + 28 + + 28 28 28 @@ -38127,6 +40420,7 @@ x86_64-linux-gnux32 28 36 28 + 28 28 @@ -38134,7 +40428,10 @@ x86_64-linux-gnux32 28 28 28 + 28 + + 28 28 28 @@ -38165,6 +40462,11 @@ x86_64-linux-gnux32 28 28 28 + + + + + 28 28 28 @@ -38183,12 +40485,17 @@ x86_64-linux-gnux32 28 36 28 + 28 + 28 28 28 28 28 + + + 28 28 28 @@ -38196,7 +40503,11 @@ x86_64-linux-gnux32 28 28 28 + 28 + + + 28 28 28 @@ -38210,6 +40521,8 @@ x86_64-linux-gnux32 28 28 28 + + 28 28 28 @@ -38220,24 +40533,34 @@ x86_64-linux-gnux32 36 28 33 + 28 28 28 + 28 36 28 + 28 + 28 + + 28 + + 28 36 28 + 28 + 28 28 @@ -38270,6 +40593,9 @@ x86_64-linux-gnux32 28 28 28 + + + 28 28 @@ -38304,6 +40630,8 @@ x86_64-linux-gnux32 36 28 28 + + 28 28 28 @@ -38323,48 +40651,93 @@ x86_64-linux-gnux32 28 + + + 28 28 + + 28 + + + 28 28 28 28 + + 28 28 28 28 28 + 28 28 28 + + 28 28 28 + + 28 + + + + 28 28 + + 28 + 28 + + + 28 + + + 28 28 + + 28 + + 28 + 28 + + + 28 + + + + 28 + + + 28 28 + + 28 28 28 @@ -38383,6 +40756,8 @@ x86_64-linux-gnux32 36 28 28 + + 28 28 28 @@ -38404,7 +40779,10 @@ x86_64-linux-gnux32 28 28 28 + + 28 + 28 28 28 @@ -38417,14 +40795,17 @@ x86_64-linux-gnux32 28 36 28 + 28 28 36 28 + 28 28 36 28 + 28 28 28 @@ -39022,7 +41403,7 @@ x86_64-linux-gnux32 28 28 39 28 -28 +28 42 36 37 37 @@ -40148,17 +42529,19 @@ x86_64-linux-gnux32 28 28 28 +42 28 28 28 28 +28 42 28 28 28 28 28 28 -28 +42 28 28 28 @@ -40188,9 +42571,9 @@ x86_64-linux-gnux32 28 28 28 -28 +28 42 30 -28 +28 42 28 28 28 @@ -40256,7 +42639,7 @@ x86_64-linux-gnux32 28 28 28 -28 +28 42 28 28 28 @@ -40561,12 +42944,14 @@ x86_64-linux-gnux32 28 28 28 +42 28 28 28 28 28 28 +42 28 28 28 @@ -40672,6 +43057,8 @@ x86_64-linux-gnux32 28 28 28 +42 +42 28 28 35 @@ -41362,7 +43749,9 @@ i386-linux-gnu 27 36 27 + 27 + 27 @@ -41391,6 +43780,8 @@ i386-linux-gnu + + 0 0 0 @@ -41399,43 +43790,79 @@ i386-linux-gnu 27 36 27 + + 27 1 20 + + 5 0 0 27 36 27 + 27 27 36 27 + 27 + 1 1 1 0 0 + + + + + + + + + + + + + + 0 15 + 1 1 + 1 + 0 0 0 16 + 0 + 27 36 27 + 27 + + + + + + + + + 0 5 5 @@ -41463,29 +43890,50 @@ i386-linux-gnu 0 20 + + 0 1 5 0 + + + 0 + + + 27 36 27 + 27 27 36 27 + 27 27 36 27 + 5 27 35 + 5 + + + + + + + + + 5 0 27 @@ -41495,6 +43943,7 @@ i386-linux-gnu + 25 0 16 @@ -41523,9 +43972,16 @@ i386-linux-gnu + + + + + + 27 36 27 + 27 0 1 @@ -41534,6 +43990,8 @@ i386-linux-gnu 1 5 15 + + 0 5 0 @@ -41543,10 +44001,17 @@ i386-linux-gnu 5 0 1 + + + + 5 16 + + 5 5 + 0 1 5 16 @@ -41566,6 +44031,7 @@ i386-linux-gnu 16 5 0 + 0 0 15 @@ -41581,7 +44047,9 @@ i386-linux-gnu 27 36 27 + 27 + 1 1 1 @@ -41605,17 +44073,29 @@ i386-linux-gnu 36 0 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 1 1 30 @@ -41643,23 +44123,29 @@ i386-linux-gnu 27 36 27 + 27 27 36 27 + 27 27 36 27 + 27 1 1 1 + 27 36 27 + + 27 1 0 @@ -41675,23 +44161,34 @@ i386-linux-gnu 0 0 1 +42 1 0 0 -3 11 +3 8 11 + + + 27 36 27 + 27 + 27 36 27 + 27 27 + 36 27 + 27 23 + + 0 @@ -41730,17 +44227,26 @@ i386-linux-gnu 0 + 0 0 19 + 11 + 1 + + + + + + 5 @@ -41853,7 +44359,11 @@ i386-linux-gnu 0 0 20 + + 20 + + 0 5 19 @@ -41869,6 +44379,7 @@ i386-linux-gnu 27 36 27 + 27 28 @@ -41876,7 +44387,10 @@ i386-linux-gnu 16 16 15 + 0 + + 0 0 0 @@ -41907,6 +44421,11 @@ i386-linux-gnu 14 16 1 5 + + + + + 1 0 0 @@ -41925,12 +44444,17 @@ i386-linux-gnu 27 36 27 + 27 + 5 5 5 0 5 + + + 8 8 8 @@ -41938,7 +44462,11 @@ i386-linux-gnu 0 27 27 + 27 + + + 19 18 19 @@ -41952,6 +44480,8 @@ i386-linux-gnu 0 0 5 + + 0 0 0 @@ -41962,24 +44492,34 @@ i386-linux-gnu 36 1 33 + 0 0 4 + 27 36 27 + 27 + 15 + + 15 + + 27 36 27 + 27 + 16 5 @@ -42012,6 +44552,9 @@ i386-linux-gnu 0 0 1 + + + 12 2 1 @@ -42046,6 +44589,8 @@ i386-linux-gnu 36 0 1 + + 0 2 0 @@ -42065,48 +44610,93 @@ i386-linux-gnu 16 + + + 5 5 16 + + 0 + + + 0 12 1 1 + + 1 1 1 1 1 + 16 0 0 0 + + 0 0 12 20 + + 20 + + + + 3 15 + + 0 + 16 + + + 15 + + + 0 15 + + 15 + + 0 + 16 + + + 16 + + + + 16 + + + 0 0 + + 16 16 16 @@ -42125,6 +44715,8 @@ i386-linux-gnu 36 0 1 + + 0 1 0 @@ -42146,7 +44738,10 @@ i386-linux-gnu 16 5 16 + + 0 + 5 5 0 @@ -42159,14 +44754,17 @@ i386-linux-gnu 27 36 27 + 27 27 36 27 + 27 27 36 27 + 27 1 1 @@ -42764,7 +45362,7 @@ i386-linux-gnu 0 0 39 1 -1 +1 42 36 37 37 @@ -43890,17 +46488,19 @@ i386-linux-gnu 0 0 0 +42 5 1 1 0 1 -14 15 +14 15 42 0 1 0 0 0 0 +42 5 1 1 @@ -43930,9 +46530,9 @@ i386-linux-gnu 0 0 0 -14 15 +14 15 42 30 -8 +8 42 1 5 24 @@ -43998,7 +46598,7 @@ i386-linux-gnu 0 15 0 -0 +0 42 23 5 5 @@ -44303,12 +46903,14 @@ i386-linux-gnu 0 0 0 +42 0 0 0 0 0 0 +42 0 0 0 @@ -44414,6 +47016,8 @@ i386-linux-gnu 0 18 0 +42 +42 0 12 35 @@ -45104,7 +47708,9 @@ powerpc64le-linux-gnu 29 36 29 +42 29 +42 29 @@ -45133,6 +47739,8 @@ powerpc64le-linux-gnu +42 +42 29 29 29 @@ -45141,20 +47749,27 @@ powerpc64le-linux-gnu 29 36 29 +42 +42 29 29 29 +42 +42 29 29 29 29 36 29 +42 29 29 36 29 +42 29 +42 @@ -45163,21 +47778,50 @@ powerpc64le-linux-gnu 29 29 29 +42 +42 +42 +42 +42 +42 +42 +42 +42 +42 +42 +42 +42 +42 29 29 +42 29 29 +42 29 +42 29 29 29 29 +42 29 +42 29 36 29 +42 29 +42 +42 +42 +42 +42 +42 +42 +42 +42 @@ -45205,33 +47849,55 @@ powerpc64le-linux-gnu 29 +42 +42 29 29 29 29 +42 +42 +42 29 +42 +42 +42 29 36 29 +42 29 29 36 29 +42 29 29 36 29 +42 29 35 +42 +42 +42 +42 +42 +42 +42 +42 +42 +42 29 29 29 29 +42 29 35 29 @@ -45264,10 +47930,17 @@ powerpc64le-linux-gnu +42 +42 +42 +42 +42 +42 29 36 29 +42 29 29 29 @@ -45276,6 +47949,8 @@ powerpc64le-linux-gnu 29 29 29 +42 +42 29 29 @@ -45285,10 +47960,17 @@ powerpc64le-linux-gnu 29 29 29 +42 +42 +42 +42 29 29 +42 +42 29 29 +42 29 29 29 @@ -45308,6 +47990,7 @@ powerpc64le-linux-gnu 29 29 29 +42 29 29 29 @@ -45323,7 +48006,9 @@ powerpc64le-linux-gnu 29 36 29 +42 29 +42 29 29 29 @@ -45347,17 +48032,29 @@ powerpc64le-linux-gnu 36 29 29 +42 29 +42 29 +42 29 +42 29 +42 29 +42 29 +42 29 +42 29 +42 29 +42 29 +42 29 +42 29 29 30 @@ -45385,23 +48082,29 @@ powerpc64le-linux-gnu 29 36 29 +42 29 29 36 29 +42 29 29 36 29 +42 29 29 29 29 +42 29 36 29 +42 +42 29 29 29 @@ -45417,23 +48120,34 @@ powerpc64le-linux-gnu 29 29 29 +42 29 29 29 +42 +42 +42 29 36 29 +42 29 +42 29 36 29 +42 29 29 +42 36 29 +42 29 29 +42 +42 29 @@ -45472,17 +48186,26 @@ powerpc64le-linux-gnu +42 29 29 29 +42 29 +42 29 +42 +42 +42 +42 +42 +42 29 29 29 @@ -45595,7 +48318,11 @@ powerpc64le-linux-gnu 29 29 29 +42 +42 29 +42 +42 29 29 29 @@ -45611,6 +48338,7 @@ powerpc64le-linux-gnu 29 36 29 +42 29 29 29 @@ -45618,7 +48346,10 @@ powerpc64le-linux-gnu 29 29 29 +42 29 +42 +42 29 29 29 @@ -45649,6 +48380,11 @@ powerpc64le-linux-gnu 29 29 29 +42 +42 +42 +42 +42 29 29 29 @@ -45667,12 +48403,17 @@ powerpc64le-linux-gnu 29 36 29 +42 29 +42 29 29 29 29 29 +42 +42 +42 29 29 29 @@ -45680,7 +48421,11 @@ powerpc64le-linux-gnu 29 29 29 +42 29 +42 +42 +42 29 29 29 @@ -45694,6 +48439,8 @@ powerpc64le-linux-gnu 29 29 29 +42 +42 29 29 29 @@ -45704,24 +48451,34 @@ powerpc64le-linux-gnu 36 29 33 +42 29 29 29 +42 29 36 29 +42 29 +42 29 +42 +42 29 +42 +42 29 36 29 +42 29 +42 29 29 @@ -45754,6 +48511,9 @@ powerpc64le-linux-gnu 29 29 29 +42 +42 +42 29 29 @@ -45788,6 +48548,8 @@ powerpc64le-linux-gnu 36 29 29 +42 +42 29 29 29 @@ -45807,48 +48569,93 @@ powerpc64le-linux-gnu 29 +42 +42 +42 29 29 29 +42 +42 29 +42 +42 +42 29 29 32 29 29 +42 +42 29 29 29 29 29 +42 29 29 29 +42 +42 29 29 29 +42 +42 29 +42 +42 +42 +42 29 29 +42 +42 29 +42 29 +42 +42 +42 29 +42 +42 +42 29 29 +42 +42 29 +42 +42 29 +42 29 +42 +42 +42 29 +42 +42 +42 +42 29 +42 +42 +42 29 29 +42 +42 29 29 29 @@ -45867,6 +48674,8 @@ powerpc64le-linux-gnu 36 29 29 +42 +42 29 29 29 @@ -45888,7 +48697,10 @@ powerpc64le-linux-gnu 29 29 29 +42 +42 29 +42 29 29 29 @@ -45901,14 +48713,17 @@ powerpc64le-linux-gnu 29 36 29 +42 29 29 36 29 +42 29 29 36 29 +42 29 29 29 @@ -46506,7 +49321,7 @@ powerpc64le-linux-gnu 29 29 39 29 -29 +29 42 36 37 37 @@ -47632,17 +50447,19 @@ powerpc64le-linux-gnu 29 29 29 +42 29 29 29 29 +29 42 29 29 29 29 29 29 -29 +42 29 29 29 @@ -47672,9 +50489,9 @@ powerpc64le-linux-gnu 29 29 29 -29 +29 42 30 -29 +29 42 29 29 29 @@ -47740,7 +50557,7 @@ powerpc64le-linux-gnu 29 29 29 -29 +29 42 29 29 29 @@ -48045,12 +50862,14 @@ powerpc64le-linux-gnu 29 29 29 +42 29 29 29 29 29 29 +42 29 29 29 @@ -48156,6 +50975,8 @@ powerpc64le-linux-gnu 29 29 29 +42 +42 29 29 35 @@ -48846,7 +51667,9 @@ powerpc64-linux-gnu 27 27 + 27 + 27 @@ -48875,6 +51698,8 @@ powerpc64-linux-gnu + + 12 12 12 @@ -48883,47 +51708,83 @@ powerpc64-linux-gnu 27 27 + + 27 12 16 20 + + 12 12 12 27 27 + 27 27 27 + 27 + 12 12 12 12 12 + + + + + + + + + + + + + + 12 15 + 12 12 + 12 16 + 12 12 12 16 + 12 + 27 27 + 27 + + + + + + + + + 12 12 @@ -48947,33 +51808,55 @@ powerpc64-linux-gnu 20 + + 12 12 12 12 + + + 12 + + + 27 27 + 27 27 27 + 27 27 27 + 27 35 + + + + + + + + + + 12 12 27 27 + 12 35 12 @@ -49007,9 +51890,16 @@ powerpc64-linux-gnu + + + + + + 27 27 + 27 12 12 @@ -49018,6 +51908,8 @@ powerpc64-linux-gnu 16 12 15 16 + + 12 12 @@ -49027,10 +51919,17 @@ powerpc64-linux-gnu 12 12 12 + + + + 12 16 + + 12 12 + 12 12 16 @@ -49050,6 +51949,7 @@ powerpc64-linux-gnu 16 12 12 + 12 12 15 @@ -49065,7 +51965,9 @@ powerpc64-linux-gnu 27 27 + 27 + 12 12 12 @@ -49089,17 +51991,29 @@ powerpc64-linux-gnu 12 16 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 12 12 30 @@ -49127,23 +52041,29 @@ powerpc64-linux-gnu 27 27 + 27 27 27 + 27 27 27 + 27 12 12 12 + 27 27 + + 27 12 12 @@ -49159,23 +52079,34 @@ powerpc64-linux-gnu 12 12 12 +42 12 12 12 + + + 27 27 + 27 + 27 27 + 27 27 + 27 + 27 23 + + 12 @@ -49214,17 +52145,26 @@ powerpc64-linux-gnu + 12 12 19 + 12 + 12 + + + + + + 12 16 16 @@ -49337,7 +52277,11 @@ powerpc64-linux-gnu 12 12 20 + + 20 + + 12 12 19 @@ -49353,6 +52297,7 @@ powerpc64-linux-gnu 27 27 + 27 29 28 @@ -49360,7 +52305,10 @@ powerpc64-linux-gnu 16 16 15 16 + 12 16 + + 12 12 12 @@ -49391,6 +52339,11 @@ powerpc64-linux-gnu 14 16 12 + + + + + 12 12 12 @@ -49409,12 +52362,17 @@ powerpc64-linux-gnu 27 27 + 27 + 12 12 12 12 12 + + + 12 12 12 @@ -49422,7 +52380,11 @@ powerpc64-linux-gnu 12 27 27 + 27 + + + 19 18 19 @@ -49436,6 +52398,8 @@ powerpc64-linux-gnu 12 12 12 + + 12 12 12 @@ -49446,24 +52410,34 @@ powerpc64-linux-gnu 16 33 + 12 12 15 12 + 27 27 + 27 + 15 16 + + 15 16 + + 27 27 + 27 + 16 12 @@ -49496,6 +52470,9 @@ powerpc64-linux-gnu 12 12 12 16 + + + 12 12 @@ -49530,6 +52507,8 @@ powerpc64-linux-gnu 12 12 + + 12 12 12 @@ -49549,48 +52528,93 @@ powerpc64-linux-gnu 16 + + + 12 12 16 + + 12 + + + 12 12 32 12 12 + + 12 12 12 12 12 + 16 12 12 + + 12 12 20 + + 20 + + + + 12 15 16 + + 12 16 + 16 + + + 15 16 + + + 12 16 15 16 + + 15 16 + + 12 16 + 16 + + + 16 + + + + 16 + + + 12 12 + + 16 16 16 @@ -49609,6 +52633,8 @@ powerpc64-linux-gnu 12 12 + + 12 12 12 16 @@ -49630,7 +52656,10 @@ powerpc64-linux-gnu 16 12 16 + + 12 + 12 12 12 @@ -49643,14 +52672,17 @@ powerpc64-linux-gnu 27 27 + 27 27 27 + 27 27 27 + 27 12 12 @@ -50248,7 +53280,7 @@ powerpc64-linux-gnu 12 39 12 12 -12 +12 42 37 37 @@ -51374,17 +54406,19 @@ powerpc64-linux-gnu 12 12 12 +42 12 12 12 12 -14 15 +14 15 42 12 12 12 12 12 12 +42 12 18 12 12 18 @@ -51414,9 +54448,9 @@ powerpc64-linux-gnu 12 12 12 -14 15 +14 15 42 30 -12 +12 42 12 12 24 @@ -51482,7 +54516,7 @@ powerpc64-linux-gnu 12 15 12 -12 +12 42 23 12 12 @@ -51787,12 +54821,14 @@ powerpc64-linux-gnu 12 12 12 +42 12 12 12 12 12 12 +42 12 12 12 @@ -51898,6 +54934,8 @@ powerpc64-linux-gnu 12 18 12 +42 +42 12 16 12 16 35 @@ -52588,7 +55626,9 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 27 27 + 27 + 27 13 13 @@ -52617,6 +55657,8 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf + + 0 0 0 @@ -52625,20 +55667,27 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 27 27 + + 27 1 16 20 + + 5 0 0 27 27 + 27 27 27 + 27 + 31 31 31 @@ -52647,21 +55696,50 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 1 0 0 + + + + + + + + + + + + + + 0 15 + 1 1 + 1 16 + 0 0 0 0 16 + 0 + 27 27 + 27 + + + + + + + + + 0 5 5 @@ -52689,33 +55767,55 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 13 20 + + 0 1 5 0 13 13 + + + 0 + + + 27 27 + 27 27 27 + 27 27 27 + 27 35 + 13 + + + + + + + + + 5 0 27 27 + 1 35 1 @@ -52748,10 +55848,17 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 16 16 16 + 31 + + + + + 27 27 + 27 0 1 @@ -52760,6 +55867,8 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 16 5 15 16 + + 0 5 0 @@ -52769,10 +55878,17 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 5 0 1 + + + + 5 16 + + 5 5 + 0 1 5 16 @@ -52792,6 +55908,7 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 16 5 0 + 0 0 15 @@ -52807,7 +55924,9 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 27 27 + 27 + 1 1 1 @@ -52831,17 +55950,29 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 16 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 19 + 1 1 30 @@ -52869,23 +56000,29 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 27 27 + 27 27 27 + 27 27 27 + 27 1 1 1 + 13 13 27 27 + + 27 1 0 @@ -52901,23 +56038,34 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 0 1 +42 1 0 0 -3 11 +3 8 11 + + + 27 27 + 27 + 27 27 + 27 27 + 27 + 27 23 + + 0 0 16 @@ -52956,17 +56104,26 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 + 0 0 19 13 13 + 11 + 16 13 13 16 1 + + + + + + 5 16 16 @@ -53079,7 +56236,11 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 0 20 + + 20 + + 0 5 19 @@ -53095,6 +56256,7 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 27 27 + 27 29 28 @@ -53102,7 +56264,10 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 16 16 15 16 + 0 16 + + 0 0 0 @@ -53133,6 +56298,11 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 14 16 1 5 + + + + + 1 0 0 @@ -53151,12 +56321,17 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 27 27 + 27 + 5 5 5 0 5 + + + 8 8 8 @@ -53164,7 +56339,11 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 27 27 + 27 + + + 19 18 19 @@ -53178,6 +56357,8 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 0 5 + + 0 0 0 @@ -53188,24 +56369,34 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 16 33 + 0 0 15 4 13 13 13 + 27 27 + 27 + 15 16 + + 15 16 + + 27 13 27 + 27 13 + 16 5 @@ -53238,6 +56429,9 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 0 1 16 + + + 12 1 @@ -53272,6 +56466,8 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 1 + + 0 2 0 @@ -53291,48 +56487,93 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 13 13 16 + + + 5 5 16 + + 0 + + + 0 12 32 1 1 + + 1 1 1 1 1 13 + 16 0 0 0 0 + + 0 0 16 16 12 20 + + 20 + + + + 3 15 16 + + 0 16 + 16 + + + 15 16 + + + 0 16 15 16 + + 15 16 + + 0 16 + 16 + + + 16 + + + + 16 + + + 0 0 + + 16 16 16 @@ -53351,6 +56592,8 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 1 + + 0 1 0 16 @@ -53372,7 +56615,10 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 16 5 16 + + 0 + 5 5 0 @@ -53385,14 +56631,17 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 27 27 + 27 27 27 + 27 27 27 + 27 1 1 @@ -53990,7 +57239,7 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 0 39 1 -1 +1 42 37 37 @@ -55116,17 +58365,19 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 0 0 +42 5 1 1 0 1 -14 15 +14 15 42 0 1 0 0 0 0 +42 5 18 1 1 18 @@ -55156,9 +58407,9 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 0 0 -14 15 +14 15 42 30 -8 +8 42 1 5 24 @@ -55224,7 +58475,7 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 15 0 -0 +0 42 23 5 5 @@ -55529,12 +58780,14 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 0 0 +42 0 0 0 0 0 0 +42 0 0 0 @@ -55640,6 +58893,8 @@ powerpc-linux-gnueabi powerpc-linux-gnueabihf 0 18 0 +42 +42 0 16 12 16 35 diff --git a/lib/libc/glibc/fns.txt b/lib/libc/glibc/fns.txt @@ -199,7 +199,9 @@ __acosf_finite m __acosh_finite m __acoshf128_finite m __acoshf_finite m +__acoshieee128 m __acoshl_finite m +__acosieee128 m __acosl_finite m __adddf3 c __addsf3 c @@ -228,6 +230,8 @@ __align_cpy_2 c __align_cpy_4 c __align_cpy_8 c __arch_prctl c +__argp_errorieee128 c +__argp_failureieee128 c __argz_count c __argz_next c __argz_stringify c @@ -236,20 +240,27 @@ __ashrdi3 c __asin_finite m __asinf128_finite m __asinf_finite m +__asinhieee128 m +__asinieee128 m __asinl_finite m __asprintf c __asprintf_chk c +__asprintf_chkieee128 c +__asprintfieee128 c __assert c __assert_fail c __assert_perror_fail c __atan2_finite m __atan2f128_finite m __atan2f_finite m +__atan2ieee128 m __atan2l_finite m __atanh_finite m __atanhf128_finite m __atanhf_finite m +__atanhieee128 m __atanhl_finite m +__atanieee128 m __atomic_feclearexcept c __atomic_feholdexcept c __atomic_feupdateenv c @@ -258,21 +269,50 @@ __backtrace_symbols c __backtrace_symbols_fd c __bsd_getpgrp c __bzero c +__cabsieee128 m +__cacoshieee128 m +__cacosieee128 m +__canonicalizeieee128 m +__cargieee128 m +__casinhieee128 m +__casinieee128 m +__catanhieee128 m +__catanieee128 m +__cbrtieee128 m +__ccoshieee128 m +__ccosieee128 m +__ceilieee128 m +__cexpieee128 m __check_rhosts_file c __chk_fail c +__cimagieee128 m __clog10 m __clog10f m +__clog10ieee128 m __clog10l m +__clogieee128 m __clone c __close c __cmpdi2 c __cmsg_nxthdr c __confstr_chk c +__conjieee128 m __connect c +__copysignieee128 m __cosh_finite m __coshf128_finite m __coshf_finite m +__coshieee128 m __coshl_finite m +__cosieee128 m +__cpowieee128 m +__cprojieee128 m +__crealieee128 m +__csinhieee128 m +__csinieee128 m +__csqrtieee128 m +__ctanhieee128 m +__ctanieee128 m __ctype32_b c __ctype32_tolower c __ctype32_toupper c @@ -300,33 +340,55 @@ __divdf3 c __divdi3 c __divsf3 c __dprintf_chk c +__dprintf_chkieee128 c +__dprintfieee128 c __dup2 c __duplocale c __endmntent c __environ c __eqdf2 c __eqsf2 c +__erfcieee128 m +__erfieee128 m +__errieee128 c __errno_location c +__error_at_lineieee128 c +__errorieee128 c +__errxieee128 c __exp10_finite m __exp10f128_finite m __exp10f_finite m +__exp10ieee128 m __exp10l_finite m __exp2_finite m __exp2f128_finite m __exp2f_finite m +__exp2ieee128 m __exp2l_finite m __exp_finite m __expf128_finite m __expf_finite m +__expieee128 m __expl m __expl_finite m __explicit_bzero_chk c +__expm1ieee128 m __expm1l m __extendsfdf2 c +__f32addieee128 m +__f32divieee128 m +__f32mulieee128 m +__f32subieee128 m +__f64addieee128 m +__f64divieee128 m +__f64mulieee128 m +__f64subieee128 m +__fabsieee128 m __fbufsize c __fcntl c __fdelt_chk c __fdelt_warn c +__fdimieee128 m __fe_dfl_env m __fe_dfl_mode m __fe_enabled_env m @@ -359,10 +421,17 @@ __floatundidf c __floatundisf c __floatunsidf c __floatunsisf c +__floorieee128 m __flt_rounds c +__fmaieee128 m +__fmaxieee128 m +__fmaxmagieee128 m +__fminieee128 m +__fminmagieee128 m __fmod_finite m __fmodf128_finite m __fmodf_finite m +__fmodieee128 m __fmodl_finite m __fork c __fpclassify m @@ -371,6 +440,8 @@ __fpclassifyf128 m __fpclassifyl m __fpending c __fprintf_chk c +__fprintf_chkieee128 c +__fprintfieee128 c __fpu_control c __fpurge c __frame_state_for c @@ -380,10 +451,17 @@ __freadable c __freading c __free_hook c __freelocale c +__frexpieee128 m +__fromfpieee128 m +__fromfpxieee128 m +__fscanfieee128 c __fsetlocking c __fwprintf_chk c +__fwprintf_chkieee128 c +__fwprintfieee128 c __fwritable c __fwriting c +__fwscanfieee128 c __fxstat c __fxstat64 c __fxstatat c @@ -403,6 +481,7 @@ __gethostname_chk c __getlogin_r_chk c __getmntent_r c __getpagesize c +__getpayloadieee128 m __getpgid c __getpid c __gets_chk c @@ -418,7 +497,9 @@ __h_errno_location c __hypot_finite m __hypotf128_finite m __hypotf_finite m +__hypotieee128 m __hypotl_finite m +__ilogbieee128 m __isalnum_l c __isalpha_l c __isascii_l c @@ -442,17 +523,29 @@ __isnanf c __isnanf128 m __isnanl c __isoc99_fscanf c +__isoc99_fscanfieee128 c __isoc99_fwscanf c +__isoc99_fwscanfieee128 c __isoc99_scanf c +__isoc99_scanfieee128 c __isoc99_sscanf c +__isoc99_sscanfieee128 c __isoc99_swscanf c +__isoc99_swscanfieee128 c __isoc99_vfscanf c +__isoc99_vfscanfieee128 c __isoc99_vfwscanf c +__isoc99_vfwscanfieee128 c __isoc99_vscanf c +__isoc99_vscanfieee128 c __isoc99_vsscanf c +__isoc99_vsscanfieee128 c __isoc99_vswscanf c +__isoc99_vswscanfieee128 c __isoc99_vwscanf c +__isoc99_vwscanfieee128 c __isoc99_wscanf c +__isoc99_wscanfieee128 c __isprint_l c __ispunct_l c __issignaling m @@ -480,23 +573,29 @@ __ivaliduser c __j0_finite m __j0f128_finite m __j0f_finite m +__j0ieee128 m __j0l_finite m __j1_finite m __j1f128_finite m __j1f_finite m +__j1ieee128 m __j1l_finite m __jn_finite m __jnf128_finite m __jnf_finite m +__jnieee128 m __jnl_finite m __key_decryptsession_pk_LOCAL c __key_encryptsession_pk_LOCAL c __key_gendes_LOCAL c +__ldexpieee128 m __ledf2 c __lesf2 c __lgamma_r_finite m __lgammaf128_r_finite m __lgammaf_r_finite m +__lgammaieee128 m +__lgammaieee128_r m __lgammal_r_finite m __libc_allocate_rtsig c __libc_calloc c @@ -512,23 +611,34 @@ __libc_memalign c __libc_pvalloc c __libc_realloc c __libc_sa_len c +__libc_single_threaded c __libc_stack_end ld __libc_start_main c __libc_valloc c __libpthread_version_placeholder pthread +__llogbieee128 m +__llrintieee128 m +__llroundieee128 m __log10_finite m __log10f128_finite m __log10f_finite m +__log10ieee128 m __log10l_finite m +__log1pieee128 m __log2_finite m __log2f128_finite m __log2f_finite m +__log2ieee128 m __log2l_finite m __log_finite m +__logbieee128 m __logf128_finite m __logf_finite m +__logieee128 m __logl_finite m __longjmp_chk c +__lrintieee128 m +__lroundieee128 m __lseek c __lshrdi3 c __ltdf2 c @@ -567,17 +677,26 @@ __memset_gg c __mips_fpu_getcw c __mips_fpu_setcw c __moddi3 c +__modfieee128 m __monstartup c __morecore c __mq_open_2 rt __muldf3 c __mulsf3 c +__nanieee128 m __nanosleep c +__nearbyintieee128 m __nedf2 c __negdf2 c __negsf2 c __nesf2 c __newlocale c +__nextafterieee128 m +__nextdownieee128 m +__nexttoward_to_ieee128 m +__nexttowardf_to_ieee128 m +__nexttowardieee128 m +__nextupieee128 m __nl_langinfo_l c __nldbl__IO_fprintf c __nldbl__IO_printf c @@ -690,7 +809,11 @@ __nss_hosts_lookup c __nss_next c __nss_passwd_lookup c __obstack_printf_chk c +__obstack_printf_chkieee128 c +__obstack_printfieee128 c __obstack_vprintf_chk c +__obstack_vprintf_chkieee128 c +__obstack_vprintfieee128 c __open c __open64 c __open64_2 c @@ -706,6 +829,7 @@ __posix_getopt c __pow_finite m __powf128_finite m __powf_finite m +__powieee128 m __powl_finite m __ppc_get_timebase_freq c __ppoll_chk c @@ -713,7 +837,10 @@ __pread64 c __pread64_chk c __pread_chk c __printf_chk c +__printf_chkieee128 c __printf_fp c +__printf_sizeieee128 c +__printfieee128 c __profile_frequency c __progname c __progname_full c @@ -744,6 +871,11 @@ __pthread_unregister_cancel_restore pthread __pthread_unwind_next pthread __ptsname_r_chk c __pwrite64 c +__qecvtieee128 c +__qecvtieee128_r c +__qfcvtieee128 c +__qfcvtieee128_r c +__qgcvtieee128 c __rawmemchr c __rcmd_errstr c __read c @@ -762,12 +894,17 @@ __register_frame_table c __remainder_finite m __remainderf128_finite m __remainderf_finite m +__remainderieee128 m __remainderl_finite m +__remquoieee128 m __res_init c __res_nclose c __res_ninit c __res_randomid c __res_state c +__rintieee128 m +__roundevenieee128 m +__roundieee128 m __rpc_thread_createerr c __rpc_thread_svc_fdset c __rpc_thread_svc_max_pollfd c @@ -775,7 +912,11 @@ __rpc_thread_svc_pollfd c __sbrk c __scalb_finite m __scalbf_finite m +__scalbieee128 m __scalbl_finite m +__scalblnieee128 m +__scalbnieee128 m +__scanfieee128 c __sched_cpualloc c __sched_cpucount c __sched_cpufree c @@ -789,6 +930,8 @@ __secure_getenv c __select c __send c __setmntent c +__setpayloadieee128 m +__setpayloadsigieee128 m __setpgid c __sigaction c __sigaddset c @@ -799,24 +942,34 @@ __signbitf c __signbitf128 m __signbitl c __signgam m +__significandieee128 m __sigpause c __sigsetjmp c __sigsuspend c __sim_disabled_exceptions c __sim_exceptions c __sim_round_mode c +__sincosieee128 m __sinh_finite m __sinhf128_finite m __sinhf_finite m +__sinhieee128 m __sinhl_finite m +__sinieee128 m __snprintf_chk c +__snprintf_chkieee128 c +__snprintfieee128 c __sprintf_chk c +__sprintf_chkieee128 c +__sprintfieee128 c __sqrt_finite m __sqrtdf2 c __sqrtf128_finite m __sqrtf_finite m +__sqrtieee128 m __sqrtl_finite m __sqrtsf2 c +__sscanfieee128 c __stack_chk_fail c __stack_chk_guard ld __statfs c @@ -849,6 +1002,9 @@ __strcspn_g c __strdup c __strerror_r c __strfmon_l c +__strfmon_lieee128 c +__strfmonieee128 c +__strfromieee128 c __strftime_l c __strlen_g c __strncasecmp_l c @@ -883,6 +1039,8 @@ __strtod_l c __strtof128_internal c __strtof_internal c __strtof_l c +__strtoieee128 c +__strtoieee128_l c __strtok_r c __strtok_r_1c c __strtol_internal c @@ -902,48 +1060,93 @@ __strxfrm_l c __subdf3 c __subsf3 c __swprintf_chk c +__swprintf_chkieee128 c +__swprintfieee128 c +__swscanfieee128 c __sysconf c __sysctl c __syslog_chk c +__syslog_chkieee128 c +__syslogieee128 c __sysv_signal c +__tanhieee128 m +__tanieee128 m +__tgammaieee128 m __timezone c __tls_get_addr ld __tls_get_addr_opt ld __tls_get_offset ld __toascii_l c __tolower_l c +__totalorderieee128 m +__totalordermagieee128 m __toupper_l c __towctrans c __towctrans_l c __towlower_l c __towupper_l c __truncdfsf2 c +__truncieee128 m __ttyname_r_chk c __tzname c __ucmpdi2 c __udivdi3 c __uflow c +__ufromfpieee128 m +__ufromfpxieee128 m __umoddi3 c __underflow c __unorddf2 c __unordsf2 c __uselocale c __vasprintf_chk c +__vasprintf_chkieee128 c +__vasprintfieee128 c __vdprintf_chk c +__vdprintf_chkieee128 c +__vdprintfieee128 c +__verrieee128 c +__verrxieee128 c __vfork c __vfprintf_chk c +__vfprintf_chkieee128 c +__vfprintfieee128 c __vfscanf c +__vfscanfieee128 c __vfwprintf_chk c +__vfwprintf_chkieee128 c +__vfwprintfieee128 c +__vfwscanfieee128 c __vprintf_chk c +__vprintf_chkieee128 c +__vprintfieee128 c +__vscanfieee128 c __vsnprintf c __vsnprintf_chk c +__vsnprintf_chkieee128 c +__vsnprintfieee128 c __vsprintf_chk c +__vsprintf_chkieee128 c +__vsprintfieee128 c __vsscanf c +__vsscanfieee128 c __vswprintf_chk c +__vswprintf_chkieee128 c +__vswprintfieee128 c +__vswscanfieee128 c __vsyslog_chk c +__vsyslog_chkieee128 c +__vsyslogieee128 c +__vwarnieee128 c +__vwarnxieee128 c __vwprintf_chk c +__vwprintf_chkieee128 c +__vwprintfieee128 c +__vwscanfieee128 c __wait c __waitpid c +__warnieee128 c +__warnxieee128 c __wcpcpy_chk c __wcpncpy_chk c __wcrtomb_chk c @@ -962,6 +1165,8 @@ __wcstod_l c __wcstof128_internal c __wcstof_internal c __wcstof_l c +__wcstoieee128 c +__wcstoieee128_l c __wcstol_internal c __wcstol_l c __wcstold_internal c @@ -983,7 +1188,10 @@ __wmempcpy_chk c __wmemset_chk c __woverflow c __wprintf_chk c +__wprintf_chkieee128 c +__wprintfieee128 c __write c +__wscanfieee128 c __wuflow c __wunderflow c __xmknod c @@ -996,14 +1204,17 @@ __xstat64 c __y0_finite m __y0f128_finite m __y0f_finite m +__y0ieee128 m __y0l_finite m __y1_finite m __y1f128_finite m __y1f_finite m +__y1ieee128 m __y1l_finite m __yn_finite m __ynf128_finite m __ynf_finite m +__ynieee128 m __ynl_finite m _authenticate c _dl_mcount ld @@ -2727,17 +2938,19 @@ pthread_attr_getinheritsched c pthread_attr_getschedparam c pthread_attr_getschedpolicy c pthread_attr_getscope c +pthread_attr_getsigmask_np c pthread_attr_getstack pthread pthread_attr_getstackaddr pthread pthread_attr_getstacksize pthread pthread_attr_init c -pthread_attr_setaffinity_np pthread +pthread_attr_setaffinity_np c pthread_attr_setdetachstate c pthread_attr_setguardsize pthread pthread_attr_setinheritsched c pthread_attr_setschedparam c pthread_attr_setschedpolicy c pthread_attr_setscope c +pthread_attr_setsigmask_np c pthread_attr_setstack pthread pthread_attr_setstackaddr pthread pthread_attr_setstacksize pthread @@ -2767,9 +2980,9 @@ pthread_create pthread pthread_detach pthread pthread_equal c pthread_exit c -pthread_getaffinity_np pthread +pthread_getaffinity_np c pthread_getattr_default_np pthread -pthread_getattr_np pthread +pthread_getattr_np c pthread_getconcurrency pthread pthread_getcpuclockid pthread pthread_getname_np pthread @@ -2835,7 +3048,7 @@ pthread_setname_np pthread pthread_setschedparam c pthread_setschedprio pthread pthread_setspecific pthread -pthread_sigmask pthread +pthread_sigmask c pthread_sigqueue pthread pthread_spin_destroy pthread pthread_spin_init pthread @@ -3140,12 +3353,14 @@ shmctl c shmdt c shmget c shutdown c +sigabbrev_np c sigaction c sigaddset c sigaltstack c sigandset c sigblock c sigdelset c +sigdescr_np c sigemptyset c sigfillset c siggetmask c @@ -3251,6 +3466,8 @@ strdup c strerror c strerror_l c strerror_r c +strerrordesc_np c +strerrorname_np c strfmon c strfmon_l c strfromd c diff --git a/lib/libc/glibc/vers.txt b/lib/libc/glibc/vers.txt @@ -40,3 +40,4 @@ GLIBC_2.28 GLIBC_2.29 GLIBC_2.30 GLIBC_2.31 +GLIBC_2.32 diff --git a/lib/libc/include/aarch64-linux-gnu/bits/floatn.h b/lib/libc/include/aarch64-linux-gnu/bits/floatn.h @@ -1,97 +0,0 @@ -/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. - Copyright (C) 2017-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _BITS_FLOATN_H -#define _BITS_FLOATN_H - -#include <features.h> -#include <bits/long-double.h> - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the IEEE 754 binary128 format, and this - glibc includes corresponding *f128 interfaces for it. */ -#ifndef __NO_LONG_DOUBLE_MATH -# define __HAVE_FLOAT128 1 -#else -/* glibc does not support _Float128 for platforms where long double is - normally binary128 when building with long double as binary64. - GCC's default for supported scalar modes does not support it either - in that case. */ -# define __HAVE_FLOAT128 0 -#endif - -/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct - from the default float, double and long double types in this glibc. */ -#define __HAVE_DISTINCT_FLOAT128 0 - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the right format for _Float64x, and this - glibc includes corresponding *f64x interfaces for it. */ -#define __HAVE_FLOAT64X __HAVE_FLOAT128 - -/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format - of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has - the format of _Float128, which must be different from that of long - double. */ -#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128 - -#ifndef __ASSEMBLER__ - -/* Defined to concatenate the literal suffix to be used with _Float128 - types, if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -/* The literal suffix f128 exists only since GCC 7.0. */ -# define __f128(x) x##l -# else -# define __f128(x) x##f128 -# endif -# endif - -/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -# define __CFLOAT128 _Complex long double -# else -# define __CFLOAT128 _Complex _Float128 -# endif -# endif - -/* The remaining of this file provides support for older compilers. */ -# if __HAVE_FLOAT128 - -/* The type _Float128 exists only since GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -typedef long double _Float128; -# endif - -/* Various built-in functions do not exist before GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) -# define __builtin_huge_valf128() (__builtin_huge_vall ()) -# define __builtin_inff128() (__builtin_infl ()) -# define __builtin_nanf128(x) (__builtin_nanl (x)) -# define __builtin_nansf128(x) (__builtin_nansl (x)) -# endif - -# endif - -#endif /* !__ASSEMBLER__. */ - -#include <bits/floatn-common.h> - -#endif /* _BITS_FLOATN_H */ -\ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-gnu/bits/hwcap.h b/lib/libc/include/aarch64-linux-gnu/bits/hwcap.h @@ -53,4 +53,23 @@ #define HWCAP_SSBS (1 << 28) #define HWCAP_SB (1 << 29) #define HWCAP_PACA (1 << 30) -#define HWCAP_PACG (1UL << 31) -\ No newline at end of file +#define HWCAP_PACG (1UL << 31) + +#define HWCAP2_DCPODP (1 << 0) +#define HWCAP2_SVE2 (1 << 1) +#define HWCAP2_SVEAES (1 << 2) +#define HWCAP2_SVEPMULL (1 << 3) +#define HWCAP2_SVEBITPERM (1 << 4) +#define HWCAP2_SVESHA3 (1 << 5) +#define HWCAP2_SVESM4 (1 << 6) +#define HWCAP2_FLAGM2 (1 << 7) +#define HWCAP2_FRINT (1 << 8) +#define HWCAP2_SVEI8MM (1 << 9) +#define HWCAP2_SVEF32MM (1 << 10) +#define HWCAP2_SVEF64MM (1 << 11) +#define HWCAP2_SVEBF16 (1 << 12) +#define HWCAP2_I8MM (1 << 13) +#define HWCAP2_BF16 (1 << 14) +#define HWCAP2_DGH (1 << 15) +#define HWCAP2_RNG (1 << 16) +#define HWCAP2_BTI (1 << 17) +\ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-gnu/bits/long-double.h b/lib/libc/include/aarch64-linux-gnu/bits/long-double.h @@ -18,4 +18,4 @@ /* long double is distinct from double, so there is nothing to define here. */ -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 +\ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-gnu/bits/mman.h b/lib/libc/include/aarch64-linux-gnu/bits/mman.h @@ -0,0 +1,31 @@ +/* Definitions for POSIX memory map interface. Linux/AArch64 version. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_MMAN_H +# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." +#endif + +/* AArch64 specific definitions, should be in sync with + arch/arm64/include/uapi/asm/mman.h. */ + +#define PROT_BTI 0x10 + +#include <bits/mman-map-flags-generic.h> + +/* Include generic Linux declarations. */ +#include <bits/mman-linux.h> +\ No newline at end of file diff --git a/lib/libc/include/aarch64-linux-gnu/bits/typesizes.h b/lib/libc/include/aarch64-linux-gnu/bits/typesizes.h @@ -26,31 +26,45 @@ /* See <bits/types.h> for the meaning of these macros. This file exists so that <bits/types.h> need not vary across different GNU platforms. */ +#if __TIMESIZE == 64 && __WORDSIZE == 32 +/* These are the "new" y2038 types defined for architectures added after + the 5.1 kernel. */ +# define __INO_T_TYPE __UQUAD_TYPE +# define __OFF_T_TYPE __SQUAD_TYPE +# define __RLIM_T_TYPE __UQUAD_TYPE +# define __BLKCNT_T_TYPE __SQUAD_TYPE +# define __FSBLKCNT_T_TYPE __UQUAD_TYPE +# define __FSFILCNT_T_TYPE __UQUAD_TYPE +# define __TIME_T_TYPE __SQUAD_TYPE +# define __SUSECONDS_T_TYPE __SQUAD_TYPE +#else +# define __INO_T_TYPE __ULONGWORD_TYPE +# define __OFF_T_TYPE __SLONGWORD_TYPE +# define __RLIM_T_TYPE __ULONGWORD_TYPE +# define __BLKCNT_T_TYPE __SLONGWORD_TYPE +# define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE +# define __FSFILCNT_T_TYPE __ULONGWORD_TYPE +# define __TIME_T_TYPE __SLONGWORD_TYPE +# define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#endif #define __DEV_T_TYPE __UQUAD_TYPE #define __UID_T_TYPE __U32_TYPE #define __GID_T_TYPE __U32_TYPE -#define __INO_T_TYPE __ULONGWORD_TYPE #define __INO64_T_TYPE __UQUAD_TYPE #define __MODE_T_TYPE __U32_TYPE #define __NLINK_T_TYPE __U32_TYPE -#define __OFF_T_TYPE __SLONGWORD_TYPE #define __OFF64_T_TYPE __SQUAD_TYPE #define __PID_T_TYPE __S32_TYPE -#define __RLIM_T_TYPE __ULONGWORD_TYPE #define __RLIM64_T_TYPE __UQUAD_TYPE -#define __BLKCNT_T_TYPE __SLONGWORD_TYPE #define __BLKCNT64_T_TYPE __SQUAD_TYPE -#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE #define __FSBLKCNT64_T_TYPE __UQUAD_TYPE -#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE #define __FSFILCNT64_T_TYPE __UQUAD_TYPE #define __FSWORD_T_TYPE __SWORD_TYPE #define __ID_T_TYPE __U32_TYPE #define __CLOCK_T_TYPE __SLONGWORD_TYPE -#define __TIME_T_TYPE __SLONGWORD_TYPE #define __USECONDS_T_TYPE __U32_TYPE -#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#define __SUSECONDS64_T_TYPE __SQUAD_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE @@ -62,7 +76,7 @@ #define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE #define __CPU_MASK_TYPE __ULONGWORD_TYPE -#ifdef __LP64__ +#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32) /* Tell the libc code that off_t and off64_t are actually the same type for all ABI purposes, even if possibly expressed as different base types for C type-checking purposes. */ @@ -76,11 +90,17 @@ /* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ # define __STATFS_MATCHES_STATFS64 1 + +/* And for getitimer, setitimer and rusage */ +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 (__WORDSIZE == 64) #else # define __RLIM_T_MATCHES_RLIM64_T 0 # define __STATFS_MATCHES_STATFS64 0 + +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0 #endif + /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 diff --git a/lib/libc/include/aarch64-linux-gnu/gnu/lib-names-lp64.h b/lib/libc/include/aarch64-linux-gnu/gnu/lib-names-lp64.h @@ -20,8 +20,6 @@ #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" -#define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" diff --git a/lib/libc/include/aarch64-linux-gnu/gnu/stubs-lp64.h b/lib/libc/include/aarch64-linux-gnu/gnu/stubs-lp64.h @@ -15,10 +15,7 @@ #define __stub_chflags #define __stub_fchflags #define __stub_gtty -#define __stub_lchmod #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn -#define __stub_sstk -#define __stub_stty -#define __stub_sysctl -\ No newline at end of file +#define __stub_stty +\ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/floatn.h b/lib/libc/include/aarch64_be-linux-gnu/bits/floatn.h @@ -1,97 +0,0 @@ -/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. - Copyright (C) 2017-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _BITS_FLOATN_H -#define _BITS_FLOATN_H - -#include <features.h> -#include <bits/long-double.h> - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the IEEE 754 binary128 format, and this - glibc includes corresponding *f128 interfaces for it. */ -#ifndef __NO_LONG_DOUBLE_MATH -# define __HAVE_FLOAT128 1 -#else -/* glibc does not support _Float128 for platforms where long double is - normally binary128 when building with long double as binary64. - GCC's default for supported scalar modes does not support it either - in that case. */ -# define __HAVE_FLOAT128 0 -#endif - -/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct - from the default float, double and long double types in this glibc. */ -#define __HAVE_DISTINCT_FLOAT128 0 - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the right format for _Float64x, and this - glibc includes corresponding *f64x interfaces for it. */ -#define __HAVE_FLOAT64X __HAVE_FLOAT128 - -/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format - of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has - the format of _Float128, which must be different from that of long - double. */ -#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128 - -#ifndef __ASSEMBLER__ - -/* Defined to concatenate the literal suffix to be used with _Float128 - types, if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -/* The literal suffix f128 exists only since GCC 7.0. */ -# define __f128(x) x##l -# else -# define __f128(x) x##f128 -# endif -# endif - -/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -# define __CFLOAT128 _Complex long double -# else -# define __CFLOAT128 _Complex _Float128 -# endif -# endif - -/* The remaining of this file provides support for older compilers. */ -# if __HAVE_FLOAT128 - -/* The type _Float128 exists only since GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -typedef long double _Float128; -# endif - -/* Various built-in functions do not exist before GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) -# define __builtin_huge_valf128() (__builtin_huge_vall ()) -# define __builtin_inff128() (__builtin_infl ()) -# define __builtin_nanf128(x) (__builtin_nanl (x)) -# define __builtin_nansf128(x) (__builtin_nansl (x)) -# endif - -# endif - -#endif /* !__ASSEMBLER__. */ - -#include <bits/floatn-common.h> - -#endif /* _BITS_FLOATN_H */ -\ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/hwcap.h b/lib/libc/include/aarch64_be-linux-gnu/bits/hwcap.h @@ -53,4 +53,23 @@ #define HWCAP_SSBS (1 << 28) #define HWCAP_SB (1 << 29) #define HWCAP_PACA (1 << 30) -#define HWCAP_PACG (1UL << 31) -\ No newline at end of file +#define HWCAP_PACG (1UL << 31) + +#define HWCAP2_DCPODP (1 << 0) +#define HWCAP2_SVE2 (1 << 1) +#define HWCAP2_SVEAES (1 << 2) +#define HWCAP2_SVEPMULL (1 << 3) +#define HWCAP2_SVEBITPERM (1 << 4) +#define HWCAP2_SVESHA3 (1 << 5) +#define HWCAP2_SVESM4 (1 << 6) +#define HWCAP2_FLAGM2 (1 << 7) +#define HWCAP2_FRINT (1 << 8) +#define HWCAP2_SVEI8MM (1 << 9) +#define HWCAP2_SVEF32MM (1 << 10) +#define HWCAP2_SVEF64MM (1 << 11) +#define HWCAP2_SVEBF16 (1 << 12) +#define HWCAP2_I8MM (1 << 13) +#define HWCAP2_BF16 (1 << 14) +#define HWCAP2_DGH (1 << 15) +#define HWCAP2_RNG (1 << 16) +#define HWCAP2_BTI (1 << 17) +\ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/long-double.h b/lib/libc/include/aarch64_be-linux-gnu/bits/long-double.h @@ -18,4 +18,4 @@ /* long double is distinct from double, so there is nothing to define here. */ -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 +\ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/mman.h b/lib/libc/include/aarch64_be-linux-gnu/bits/mman.h @@ -0,0 +1,31 @@ +/* Definitions for POSIX memory map interface. Linux/AArch64 version. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_MMAN_H +# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." +#endif + +/* AArch64 specific definitions, should be in sync with + arch/arm64/include/uapi/asm/mman.h. */ + +#define PROT_BTI 0x10 + +#include <bits/mman-map-flags-generic.h> + +/* Include generic Linux declarations. */ +#include <bits/mman-linux.h> +\ No newline at end of file diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/typesizes.h b/lib/libc/include/aarch64_be-linux-gnu/bits/typesizes.h @@ -26,31 +26,45 @@ /* See <bits/types.h> for the meaning of these macros. This file exists so that <bits/types.h> need not vary across different GNU platforms. */ +#if __TIMESIZE == 64 && __WORDSIZE == 32 +/* These are the "new" y2038 types defined for architectures added after + the 5.1 kernel. */ +# define __INO_T_TYPE __UQUAD_TYPE +# define __OFF_T_TYPE __SQUAD_TYPE +# define __RLIM_T_TYPE __UQUAD_TYPE +# define __BLKCNT_T_TYPE __SQUAD_TYPE +# define __FSBLKCNT_T_TYPE __UQUAD_TYPE +# define __FSFILCNT_T_TYPE __UQUAD_TYPE +# define __TIME_T_TYPE __SQUAD_TYPE +# define __SUSECONDS_T_TYPE __SQUAD_TYPE +#else +# define __INO_T_TYPE __ULONGWORD_TYPE +# define __OFF_T_TYPE __SLONGWORD_TYPE +# define __RLIM_T_TYPE __ULONGWORD_TYPE +# define __BLKCNT_T_TYPE __SLONGWORD_TYPE +# define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE +# define __FSFILCNT_T_TYPE __ULONGWORD_TYPE +# define __TIME_T_TYPE __SLONGWORD_TYPE +# define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#endif #define __DEV_T_TYPE __UQUAD_TYPE #define __UID_T_TYPE __U32_TYPE #define __GID_T_TYPE __U32_TYPE -#define __INO_T_TYPE __ULONGWORD_TYPE #define __INO64_T_TYPE __UQUAD_TYPE #define __MODE_T_TYPE __U32_TYPE #define __NLINK_T_TYPE __U32_TYPE -#define __OFF_T_TYPE __SLONGWORD_TYPE #define __OFF64_T_TYPE __SQUAD_TYPE #define __PID_T_TYPE __S32_TYPE -#define __RLIM_T_TYPE __ULONGWORD_TYPE #define __RLIM64_T_TYPE __UQUAD_TYPE -#define __BLKCNT_T_TYPE __SLONGWORD_TYPE #define __BLKCNT64_T_TYPE __SQUAD_TYPE -#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE #define __FSBLKCNT64_T_TYPE __UQUAD_TYPE -#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE #define __FSFILCNT64_T_TYPE __UQUAD_TYPE #define __FSWORD_T_TYPE __SWORD_TYPE #define __ID_T_TYPE __U32_TYPE #define __CLOCK_T_TYPE __SLONGWORD_TYPE -#define __TIME_T_TYPE __SLONGWORD_TYPE #define __USECONDS_T_TYPE __U32_TYPE -#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#define __SUSECONDS64_T_TYPE __SQUAD_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE @@ -62,7 +76,7 @@ #define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE #define __CPU_MASK_TYPE __ULONGWORD_TYPE -#ifdef __LP64__ +#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32) /* Tell the libc code that off_t and off64_t are actually the same type for all ABI purposes, even if possibly expressed as different base types for C type-checking purposes. */ @@ -76,11 +90,17 @@ /* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ # define __STATFS_MATCHES_STATFS64 1 + +/* And for getitimer, setitimer and rusage */ +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 (__WORDSIZE == 64) #else # define __RLIM_T_MATCHES_RLIM64_T 0 # define __STATFS_MATCHES_STATFS64 0 + +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0 #endif + /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 diff --git a/lib/libc/include/aarch64_be-linux-gnu/gnu/lib-names-lp64_be.h b/lib/libc/include/aarch64_be-linux-gnu/gnu/lib-names-lp64_be.h @@ -20,8 +20,6 @@ #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" -#define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" diff --git a/lib/libc/include/aarch64_be-linux-gnu/gnu/stubs-lp64_be.h b/lib/libc/include/aarch64_be-linux-gnu/gnu/stubs-lp64_be.h @@ -15,10 +15,7 @@ #define __stub_chflags #define __stub_fchflags #define __stub_gtty -#define __stub_lchmod #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn -#define __stub_sstk -#define __stub_stty -#define __stub_sysctl -\ No newline at end of file +#define __stub_stty +\ No newline at end of file diff --git a/lib/libc/include/arm-linux-gnueabi/bits/long-double.h b/lib/libc/include/arm-linux-gnueabi/bits/long-double.h @@ -37,4 +37,17 @@ #ifndef __NO_LONG_DOUBLE_MATH # define __NO_LONG_DOUBLE_MATH 1 #endif -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file + +/* The macro __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI is used to determine the + choice of the underlying ABI of long double. It will always assume + a constant value for each translation unit. + + If the value is non-zero, any API which is parameterized by the long + double type (i.e the scanf/printf family of functions or the explicitly + parameterized math.h functions) will be redirected to a compatible + implementation using _Float128 ABI via symbols suffixed with ieee128. + + The mechanism this macro uses to acquire may be a function + of architecture, or target specific options used to invoke the + compiler. */ +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 +\ No newline at end of file diff --git a/lib/libc/include/arm-linux-gnueabi/bits/semaphore.h b/lib/libc/include/arm-linux-gnueabi/bits/semaphore.h @@ -1,34 +0,0 @@ -/* Copyright (C) 2002-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SEMAPHORE_H -# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." -#endif - - -#define __SIZEOF_SEM_T 16 - - -/* Value returned if `sem_open' failed. */ -#define SEM_FAILED ((sem_t *) 0) - - -typedef union -{ - char __size[__SIZEOF_SEM_T]; - long int __align; -} sem_t; -\ No newline at end of file diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/long-double.h b/lib/libc/include/arm-linux-gnueabihf/bits/long-double.h @@ -37,4 +37,17 @@ #ifndef __NO_LONG_DOUBLE_MATH # define __NO_LONG_DOUBLE_MATH 1 #endif -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file + +/* The macro __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI is used to determine the + choice of the underlying ABI of long double. It will always assume + a constant value for each translation unit. + + If the value is non-zero, any API which is parameterized by the long + double type (i.e the scanf/printf family of functions or the explicitly + parameterized math.h functions) will be redirected to a compatible + implementation using _Float128 ABI via symbols suffixed with ieee128. + + The mechanism this macro uses to acquire may be a function + of architecture, or target specific options used to invoke the + compiler. */ +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 +\ No newline at end of file diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/semaphore.h b/lib/libc/include/arm-linux-gnueabihf/bits/semaphore.h @@ -1,34 +0,0 @@ -/* Copyright (C) 2002-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SEMAPHORE_H -# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." -#endif - - -#define __SIZEOF_SEM_T 16 - - -/* Value returned if `sem_open' failed. */ -#define SEM_FAILED ((sem_t *) 0) - - -typedef union -{ - char __size[__SIZEOF_SEM_T]; - long int __align; -} sem_t; -\ No newline at end of file diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/long-double.h b/lib/libc/include/armeb-linux-gnueabi/bits/long-double.h @@ -37,4 +37,17 @@ #ifndef __NO_LONG_DOUBLE_MATH # define __NO_LONG_DOUBLE_MATH 1 #endif -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file + +/* The macro __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI is used to determine the + choice of the underlying ABI of long double. It will always assume + a constant value for each translation unit. + + If the value is non-zero, any API which is parameterized by the long + double type (i.e the scanf/printf family of functions or the explicitly + parameterized math.h functions) will be redirected to a compatible + implementation using _Float128 ABI via symbols suffixed with ieee128. + + The mechanism this macro uses to acquire may be a function + of architecture, or target specific options used to invoke the + compiler. */ +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 +\ No newline at end of file diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/semaphore.h b/lib/libc/include/armeb-linux-gnueabi/bits/semaphore.h @@ -1,34 +0,0 @@ -/* Copyright (C) 2002-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SEMAPHORE_H -# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." -#endif - - -#define __SIZEOF_SEM_T 16 - - -/* Value returned if `sem_open' failed. */ -#define SEM_FAILED ((sem_t *) 0) - - -typedef union -{ - char __size[__SIZEOF_SEM_T]; - long int __align; -} sem_t; -\ No newline at end of file diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/long-double.h b/lib/libc/include/armeb-linux-gnueabihf/bits/long-double.h @@ -37,4 +37,17 @@ #ifndef __NO_LONG_DOUBLE_MATH # define __NO_LONG_DOUBLE_MATH 1 #endif -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file + +/* The macro __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI is used to determine the + choice of the underlying ABI of long double. It will always assume + a constant value for each translation unit. + + If the value is non-zero, any API which is parameterized by the long + double type (i.e the scanf/printf family of functions or the explicitly + parameterized math.h functions) will be redirected to a compatible + implementation using _Float128 ABI via symbols suffixed with ieee128. + + The mechanism this macro uses to acquire may be a function + of architecture, or target specific options used to invoke the + compiler. */ +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 +\ No newline at end of file diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/semaphore.h b/lib/libc/include/armeb-linux-gnueabihf/bits/semaphore.h @@ -1,34 +0,0 @@ -/* Copyright (C) 2002-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SEMAPHORE_H -# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." -#endif - - -#define __SIZEOF_SEM_T 16 - - -/* Value returned if `sem_open' failed. */ -#define SEM_FAILED ((sem_t *) 0) - - -typedef union -{ - char __size[__SIZEOF_SEM_T]; - long int __align; -} sem_t; -\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/argp.h b/lib/libc/include/generic-glibc/argp.h @@ -554,7 +554,8 @@ __NTH (__option_is_end (const struct argp_option *__opt)) # endif #endif /* Use extern inlines. */ -#ifdef __LDBL_COMPAT +#include <bits/floatn.h> +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include <bits/argp-ldbl.h> #endif diff --git a/lib/libc/include/generic-glibc/bits/fcntl-linux.h b/lib/libc/include/generic-glibc/bits/fcntl-linux.h @@ -290,7 +290,8 @@ struct f_owner_ex #ifdef __USE_GNU /* Hint values for F_{GET,SET}_RW_HINT. */ -# define RWF_WRITE_LIFE_NOT_SET 0 +# define RWH_WRITE_LIFE_NOT_SET 0 +# define RWF_WRITE_LIFE_NOT_SET RWH_WRITE_LIFE_NOT_SET # define RWH_WRITE_LIFE_NONE 1 # define RWH_WRITE_LIFE_SHORT 2 # define RWH_WRITE_LIFE_MEDIUM 3 diff --git a/lib/libc/include/generic-glibc/bits/fenvinline.h b/lib/libc/include/generic-glibc/bits/fenvinline.h @@ -1,8 +0,0 @@ -/* This file provides inline versions of floating-pint environment - handling functions. If there were any. */ - -#ifndef __NO_MATH_INLINES - -/* Here is where the code would go. */ - -#endif -\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/floatn.h b/lib/libc/include/generic-glibc/bits/floatn.h @@ -1,4 +1,4 @@ -/* Macros to control TS 18661-3 glibc features on MIPS platforms. +/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. Copyright (C) 2017-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/lib/libc/include/generic-glibc/bits/long-double.h b/lib/libc/include/generic-glibc/bits/long-double.h @@ -21,4 +21,4 @@ #if !defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _ABIO32 # define __NO_LONG_DOUBLE_MATH 1 #endif -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 +\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/mathcalls-helper-functions.h b/lib/libc/include/generic-glibc/bits/mathcalls-helper-functions.h @@ -16,28 +16,30 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ - /* Classify given number. */ -__MATHDECL_1 (int, __fpclassify,, (_Mdouble_ __value)) +__MATHDECL_ALIAS (int, __fpclassify,, (_Mdouble_ __value), fpclassify) __attribute__ ((__const__)); /* Test for negative number. */ -__MATHDECL_1 (int, __signbit,, (_Mdouble_ __value)) +__MATHDECL_ALIAS (int, __signbit,, (_Mdouble_ __value), signbit) __attribute__ ((__const__)); /* Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int, __isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); +__MATHDECL_ALIAS (int, __isinf,, (_Mdouble_ __value), isinf) + __attribute__ ((__const__)); /* Return nonzero if VALUE is finite and not NaN. Used by isfinite macro. */ -__MATHDECL_1 (int, __finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); +__MATHDECL_ALIAS (int, __finite,, (_Mdouble_ __value), finite) + __attribute__ ((__const__)); /* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int, __isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); +__MATHDECL_ALIAS (int, __isnan,, (_Mdouble_ __value), isnan) + __attribute__ ((__const__)); /* Test equality. */ -__MATHDECL_1 (int, __iseqsig,, (_Mdouble_ __x, _Mdouble_ __y)); +__MATHDECL_ALIAS (int, __iseqsig,, (_Mdouble_ __x, _Mdouble_ __y), iseqsig); /* Test for signaling NaN. */ -__MATHDECL_1 (int, __issignaling,, (_Mdouble_ __value)) +__MATHDECL_ALIAS (int, __issignaling,, (_Mdouble_ __value), issignaling) __attribute__ ((__const__)); \ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/mathcalls.h b/lib/libc/include/generic-glibc/bits/mathcalls.h @@ -174,12 +174,14 @@ __MATHCALL (fmod,, (_Mdouble_ __x, _Mdouble_ __y)); && !__MATH_DECLARING_FLOATN /* Return 0 if VALUE is finite or NaN, +1 if it is +Infinity, -1 if it is -Infinity. */ -__MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__)); +__MATHDECL_ALIAS (int,isinf,, (_Mdouble_ __value), isinf) + __attribute__ ((__const__)); # endif # if !__MATH_DECLARING_FLOATN /* Return nonzero if VALUE is finite and not NaN. */ -__MATHDECL_1 (int,finite,, (_Mdouble_ __value)) __attribute__ ((__const__)); +__MATHDECL_ALIAS (int,finite,, (_Mdouble_ __value), finite) + __attribute__ ((__const__)); /* Return the remainder of X/Y. */ __MATHCALL (drem,, (_Mdouble_ __x, _Mdouble_ __y)); @@ -208,7 +210,8 @@ __MATHCALL (nan,, (const char *__tagb)); || __MATH_DECLARING_DOUBLE == 0)) /* isnanf or isnanl don't. */ \ && !__MATH_DECLARING_FLOATN /* Return nonzero if VALUE is not a number. */ -__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__)); +__MATHDECL_ALIAS (int,isnan,, (_Mdouble_ __value), isnan) + __attribute__ ((__const__)); # endif #endif diff --git a/lib/libc/include/generic-glibc/bits/mathinline.h b/lib/libc/include/generic-glibc/bits/mathinline.h @@ -1,12 +0,0 @@ -/* This file should provide inline versions of math functions. - - Surround GCC-specific parts with #ifdef __GNUC__, and use `__extern_inline'. - - This file should define __MATH_INLINES if functions are actually defined as - inlines. */ - -#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ - -/* Here goes the real code. */ - -#endif -\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/mman-shared.h b/lib/libc/include/generic-glibc/bits/mman-shared.h @@ -24,6 +24,7 @@ /* Flags for mremap. */ # define MREMAP_MAYMOVE 1 # define MREMAP_FIXED 2 +# define MREMAP_DONTUNMAP 4 /* Flags for memfd_create. */ # ifndef MFD_CLOEXEC diff --git a/lib/libc/include/generic-glibc/bits/msq-pad.h b/lib/libc/include/generic-glibc/bits/msq-pad.h @@ -1,31 +0,0 @@ -/* Define where padding goes in struct msqid_ds. Generic version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_MSG_H -# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/timesize.h> - -/* On most architectures, padding goes after time fields for 32-bit - systems and is omitted for 64-bit systems. Some architectures pad - before time fields instead, or omit padding despite being - 32-bit. */ - -#define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32) -#define __MSQ_PAD_BEFORE_TIME 0 -\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/msq.h b/lib/libc/include/generic-glibc/bits/msq.h @@ -20,7 +20,12 @@ #endif #include <bits/types.h> -#include <bits/msq-pad.h> + +/* Types used in the MSQID_DS structure definition. */ +typedef __syscall_ulong_t msgqnum_t; +typedef __syscall_ulong_t msglen_t; + +#include <bits/types/struct_msqid_ds.h> /* Define options for message queue functions. */ #define MSG_NOERROR 010000 /* no error if message is too big */ @@ -29,38 +34,6 @@ # define MSG_COPY 040000 /* copy (not remove) all queue messages */ #endif -/* Types used in the structure definition. */ -typedef __syscall_ulong_t msgqnum_t; -typedef __syscall_ulong_t msglen_t; - -#if __MSQ_PAD_BEFORE_TIME -# define __MSQ_PAD_TIME(NAME, RES) \ - unsigned long int __glibc_reserved ## RES; __time_t NAME -#elif __MSQ_PAD_AFTER_TIME -# define __MSQ_PAD_TIME(NAME, RES) \ - __time_t NAME; unsigned long int __glibc_reserved ## RES -#else -# define __MSQ_PAD_TIME(NAME, RES) \ - __time_t NAME -#endif - -/* Structure of record for one message inside the kernel. - The type `struct msg' is opaque. */ -struct msqid_ds -{ - struct ipc_perm msg_perm; /* structure describing operation permission */ - __MSQ_PAD_TIME (msg_stime, 1); /* time of last msgsnd command */ - __MSQ_PAD_TIME (msg_rtime, 2); /* time of last msgrcv command */ - __MSQ_PAD_TIME (msg_ctime, 3); /* time of last change */ - __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */ - msgqnum_t msg_qnum; /* number of messages currently on queue */ - msglen_t msg_qbytes; /* max number of bytes allowed on queue */ - __pid_t msg_lspid; /* pid of last msgsnd() */ - __pid_t msg_lrpid; /* pid of last msgrcv() */ - __syscall_ulong_t __glibc_reserved4; - __syscall_ulong_t __glibc_reserved5; -}; - #ifdef __USE_MISC # define msg_cbytes __msg_cbytes diff --git a/lib/libc/include/generic-glibc/bits/resource.h b/lib/libc/include/generic-glibc/bits/resource.h @@ -98,7 +98,7 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - /* Maximum CPU time in µs that a process scheduled under a real-time + /* Maximum CPU time in microseconds that a process scheduled under a real-time scheduling policy may consume without making a blocking system call before being forcibly descheduled. */ __RLIMIT_RTTIME = 15, diff --git a/lib/libc/include/generic-glibc/bits/sem-pad.h b/lib/libc/include/generic-glibc/bits/sem-pad.h @@ -1,33 +0,0 @@ -/* Define where padding goes in struct semid_ds. Generic version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SEM_H -# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." -#endif - -#include <bits/timesize.h> - -/* On most architectures, padding goes after time fields for 32-bit - systems and is omitted for 64-bit systems. Some architectures pad - before time fields instead, or omit padding despite being 32-bit, - or include it despite being 64-bit. This must match the layout - used for struct semid64_ds in <asm/sembuf.h>, as glibc does not do - layout conversions for this structure. */ - -#define __SEM_PAD_AFTER_TIME (__TIMESIZE == 32) -#define __SEM_PAD_BEFORE_TIME 0 -\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/sem.h b/lib/libc/include/generic-glibc/bits/sem.h @@ -20,7 +20,8 @@ #endif #include <sys/types.h> -#include <bits/sem-pad.h> +#include <bits/timesize.h> +#include <bits/types/struct_semid_ds.h> /* Flags for `semop'. */ #define SEM_UNDO 0x1000 /* undo the operation on exit */ @@ -34,29 +35,6 @@ #define SETVAL 16 /* set semval */ #define SETALL 17 /* set all semval's */ - -#if __SEM_PAD_BEFORE_TIME -# define __SEM_PAD_TIME(NAME, RES) \ - __syscall_ulong_t __glibc_reserved ## RES; __time_t NAME -#elif __SEM_PAD_AFTER_TIME -# define __SEM_PAD_TIME(NAME, RES) \ - __time_t NAME; __syscall_ulong_t __glibc_reserved ## RES -#else -# define __SEM_PAD_TIME(NAME, RES) \ - __time_t NAME -#endif - -/* Data structure describing a set of semaphores. */ -struct semid_ds -{ - struct ipc_perm sem_perm; /* operation permission struct */ - __SEM_PAD_TIME (sem_otime, 1); /* last semop() time */ - __SEM_PAD_TIME (sem_ctime, 2); /* last time changed by semctl() */ - __syscall_ulong_t sem_nsems; /* number of semaphores in set */ - __syscall_ulong_t __glibc_reserved3; - __syscall_ulong_t __glibc_reserved4; -}; - /* The user should define a union like the following to use it for arguments for `semctl'. diff --git a/lib/libc/include/generic-glibc/bits/semaphore.h b/lib/libc/include/generic-glibc/bits/semaphore.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2002-2020 Free Software Foundation, Inc. +/* Generic POSIX semaphore type layout + Copyright (C) 1995-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -12,14 +13,16 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see + License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ #ifndef _SEMAPHORE_H # error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." #endif -#if _MIPS_SIM == _ABI64 +#include <bits/wordsize.h> + +#if __WORDSIZE == 64 # define __SIZEOF_SEM_T 32 #else # define __SIZEOF_SEM_T 16 diff --git a/lib/libc/include/generic-glibc/bits/shm-pad.h b/lib/libc/include/generic-glibc/bits/shm-pad.h @@ -1,37 +0,0 @@ -/* Define where padding goes in struct shmid_ds. Generic version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SHM_H -# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." -#endif - -#include <bits/timesize.h> - -/* On most architectures, padding goes after time fields for 32-bit - systems and is omitted for 64-bit systems. Some architectures pad - before time fields instead, or omit padding despite being 32-bit, - or include it despite being 64-bit. Furthermore, some - architectures place shm_segsz after the time fields rather than - before them, with or without padding there. This must match the - layout used for struct shmid64_ds in <asm/shmbuf.h>, as glibc does - not do layout conversions for this structure. */ - -#define __SHM_PAD_AFTER_TIME (__TIMESIZE == 32) -#define __SHM_PAD_BEFORE_TIME 0 -#define __SHM_SEGSZ_AFTER_TIME 0 -#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 -\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/shm.h b/lib/libc/include/generic-glibc/bits/shm.h @@ -22,7 +22,6 @@ #include <bits/types.h> #include <bits/wordsize.h> #include <bits/shmlba.h> -#include <bits/shm-pad.h> /* Permission flag for shmget. */ #define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */ @@ -43,39 +42,7 @@ __BEGIN_DECLS /* Type to count number of attaches. */ typedef __syscall_ulong_t shmatt_t; -#if __SHM_PAD_BEFORE_TIME -# define __SHM_PAD_TIME(NAME, RES) \ - unsigned long int __glibc_reserved ## RES; __time_t NAME -#elif __SHM_PAD_AFTER_TIME -# define __SHM_PAD_TIME(NAME, RES) \ - __time_t NAME; unsigned long int __glibc_reserved ## RES -#else -# define __SHM_PAD_TIME(NAME, RES) \ - __time_t NAME -#endif - -/* Data structure describing a shared memory segment. */ -struct shmid_ds - { - struct ipc_perm shm_perm; /* operation permission struct */ -#if !__SHM_SEGSZ_AFTER_TIME - size_t shm_segsz; /* size of segment in bytes */ -#endif - __SHM_PAD_TIME (shm_atime, 1); /* time of last shmat() */ - __SHM_PAD_TIME (shm_dtime, 2); /* time of last shmdt() */ - __SHM_PAD_TIME (shm_ctime, 3); /* time of last change by shmctl() */ -#if __SHM_PAD_BETWEEN_TIME_AND_SEGSZ - unsigned long int __glibc_reserved4; -#endif -#if __SHM_SEGSZ_AFTER_TIME - size_t shm_segsz; /* size of segment in bytes */ -#endif - __pid_t shm_cpid; /* pid of creator */ - __pid_t shm_lpid; /* pid of last shmop */ - shmatt_t shm_nattch; /* number of current attaches */ - __syscall_ulong_t __glibc_reserved5; - __syscall_ulong_t __glibc_reserved6; - }; +#include <bits/types/struct_shmid_ds.h> #ifdef __USE_MISC diff --git a/lib/libc/include/generic-glibc/bits/signum-arch.h b/lib/libc/include/generic-glibc/bits/signum-arch.h @@ -0,0 +1,64 @@ +/* Signal number definitions. Linux version. + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _BITS_SIGNUM_ARCH_H +#define _BITS_SIGNUM_ARCH_H 1 + +#ifndef _SIGNAL_H +#error "Never include <bits/signum-arch.h> directly; use <signal.h> instead." +#endif + +/* Adjustments and additions to the signal number constants for + most Linux systems. */ + +#define SIGSTKFLT 16 /* Stack fault (obsolete). */ +#define SIGPWR 30 /* Power failure imminent. */ + +/* Historical signals specified by POSIX. */ +#define SIGBUS 7 /* Bus error. */ +#define SIGSYS 31 /* Bad system call. */ + +/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */ +#define SIGURG 23 /* Urgent data is available at a socket. */ +#define SIGSTOP 19 /* Stop, unblockable. */ +#define SIGTSTP 20 /* Keyboard stop. */ +#define SIGCONT 18 /* Continue. */ +#define SIGCHLD 17 /* Child terminated or stopped. */ +#define SIGTTIN 21 /* Background read from control terminal. */ +#define SIGTTOU 22 /* Background write to control terminal. */ +#define SIGPOLL 29 /* Pollable event occurred (System V). */ +#define SIGXFSZ 25 /* File size limit exceeded. */ +#define SIGXCPU 24 /* CPU time limit exceeded. */ +#define SIGVTALRM 26 /* Virtual timer expired. */ +#define SIGPROF 27 /* Profiling timer expired. */ +#define SIGUSR1 10 /* User-defined signal 1. */ +#define SIGUSR2 12 /* User-defined signal 2. */ + +/* Nonstandard signals found in all modern POSIX systems + (including both BSD and Linux). */ +#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ + +/* Archaic names for compatibility. */ +#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ +#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */ +#define SIGCLD SIGCHLD /* Old System V name */ + +#define __SIGRTMIN 32 +#define __SIGRTMAX 64 + +#endif /* <signal.h> included. */ +\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/signum-generic.h b/lib/libc/include/generic-glibc/bits/signum-generic.h @@ -57,31 +57,9 @@ #define SIGQUIT 3 /* Quit. */ #define SIGTRAP 5 /* Trace/breakpoint trap. */ #define SIGKILL 9 /* Killed. */ -#define SIGBUS 10 /* Bus error. */ -#define SIGSYS 12 /* Bad system call. */ #define SIGPIPE 13 /* Broken pipe. */ #define SIGALRM 14 /* Alarm clock. */ -/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */ -#define SIGURG 16 /* Urgent data is available at a socket. */ -#define SIGSTOP 17 /* Stop, unblockable. */ -#define SIGTSTP 18 /* Keyboard stop. */ -#define SIGCONT 19 /* Continue. */ -#define SIGCHLD 20 /* Child terminated or stopped. */ -#define SIGTTIN 21 /* Background read from control terminal. */ -#define SIGTTOU 22 /* Background write to control terminal. */ -#define SIGPOLL 23 /* Pollable event occurred (System V). */ -#define SIGXCPU 24 /* CPU time limit exceeded. */ -#define SIGXFSZ 25 /* File size limit exceeded. */ -#define SIGVTALRM 26 /* Virtual timer expired. */ -#define SIGPROF 27 /* Profiling timer expired. */ -#define SIGUSR1 30 /* User-defined signal 1. */ -#define SIGUSR2 31 /* User-defined signal 2. */ - -/* Nonstandard signals found in all modern POSIX systems - (including both BSD and Linux). */ -#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ - /* Archaic names for compatibility. */ #define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ #define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */ @@ -93,8 +71,9 @@ but some real-time signals may be used internally by glibc. Do not use these constants in application code; use SIGRTMIN and SIGRTMAX (defined in signal.h) instead. */ -#define __SIGRTMIN 32 -#define __SIGRTMAX __SIGRTMIN + +/* Include system specific bits. */ +#include <bits/signum-arch.h> /* Biggest signal number + 1 (including real-time signals). */ #define _NSIG (__SIGRTMAX + 1) diff --git a/lib/libc/include/generic-glibc/bits/signum.h b/lib/libc/include/generic-glibc/bits/signum.h @@ -1,58 +0,0 @@ -/* Signal number definitions. Linux version. - Copyright (C) 1995-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include <bits/signum.h> directly; use <signal.h> instead." -#endif - -#include <bits/signum-generic.h> - -/* Adjustments and additions to the signal number constants for - most Linux systems. */ - -#define SIGSTKFLT 16 /* Stack fault (obsolete). */ -#define SIGPWR 30 /* Power failure imminent. */ - -#undef SIGBUS -#define SIGBUS 7 -#undef SIGUSR1 -#define SIGUSR1 10 -#undef SIGUSR2 -#define SIGUSR2 12 -#undef SIGCHLD -#define SIGCHLD 17 -#undef SIGCONT -#define SIGCONT 18 -#undef SIGSTOP -#define SIGSTOP 19 -#undef SIGTSTP -#define SIGTSTP 20 -#undef SIGURG -#define SIGURG 23 -#undef SIGPOLL -#define SIGPOLL 29 -#undef SIGSYS -#define SIGSYS 31 - -#undef __SIGRTMAX -#define __SIGRTMAX 64 - -#endif /* <signal.h> included. */ -\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/socket-constants.h b/lib/libc/include/generic-glibc/bits/socket-constants.h @@ -20,6 +20,8 @@ # error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead." #endif +#include <bits/timesize.h> + #define SOL_SOCKET 1 #define SO_ACCEPTCONN 30 #define SO_BROADCAST 6 @@ -30,9 +32,19 @@ #define SO_OOBINLINE 10 #define SO_RCVBUF 8 #define SO_RCVLOWAT 18 -#define SO_RCVTIMEO 20 +#if (__TIMESIZE == 64 && __WORDSIZE == 32 \ + && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) +# define SO_RCVTIMEO 66 +#else +# define SO_RCVTIMEO 20 +#endif #define SO_REUSEADDR 2 #define SO_SNDBUF 7 #define SO_SNDLOWAT 19 -#define SO_SNDTIMEO 21 +#if (__TIMESIZE == 64 && __WORDSIZE == 32 \ + && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) +# define SO_SNDTIMEO 67 +#else +# define SO_SNDTIMEO 21 +#endif #define SO_TYPE 3 \ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/statx-generic.h b/lib/libc/include/generic-glibc/bits/statx-generic.h @@ -48,6 +48,7 @@ # define STATX_ATTR_NODUMP 0x0040 # define STATX_ATTR_ENCRYPTED 0x0800 # define STATX_ATTR_AUTOMOUNT 0x1000 +# define STATX_ATTR_VERITY 0x100000 #endif /* !STATX_TYPE */ __BEGIN_DECLS diff --git a/lib/libc/include/generic-glibc/bits/stdio-ldbl.h b/lib/libc/include/generic-glibc/bits/stdio-ldbl.h @@ -27,9 +27,17 @@ __LDBL_REDIR_DECL (vfprintf) __LDBL_REDIR_DECL (vprintf) __LDBL_REDIR_DECL (vsprintf) #if !__GLIBC_USE (DEPRECATED_SCANF) +# if defined __LDBL_COMPAT __LDBL_REDIR1_DECL (fscanf, __nldbl___isoc99_fscanf) __LDBL_REDIR1_DECL (scanf, __nldbl___isoc99_scanf) __LDBL_REDIR1_DECL (sscanf, __nldbl___isoc99_sscanf) +# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +__LDBL_REDIR1_DECL (fscanf, __isoc99_fscanfieee128) +__LDBL_REDIR1_DECL (scanf, __isoc99_scanfieee128) +__LDBL_REDIR1_DECL (sscanf, __isoc99_sscanfieee128) +# else +# error bits/stdlib-ldbl.h included when no ldbl redirections are required. +# endif #else __LDBL_REDIR_DECL (fscanf) __LDBL_REDIR_DECL (scanf) @@ -43,9 +51,17 @@ __LDBL_REDIR_DECL (vsnprintf) #ifdef __USE_ISOC99 # if !__GLIBC_USE (DEPRECATED_SCANF) +# if defined __LDBL_COMPAT __LDBL_REDIR1_DECL (vfscanf, __nldbl___isoc99_vfscanf) __LDBL_REDIR1_DECL (vscanf, __nldbl___isoc99_vscanf) __LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc99_vsscanf) +# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +__LDBL_REDIR1_DECL (vfscanf, __isoc99_vfscanfieee128) +__LDBL_REDIR1_DECL (vscanf, __isoc99_vscanfieee128) +__LDBL_REDIR1_DECL (vsscanf, __isoc99_vsscanfieee128) +# else +# error bits/stdlib-ldbl.h included when no ldbl redirections are required. +# endif # else __LDBL_REDIR_DECL (vfscanf) __LDBL_REDIR_DECL (vsscanf) @@ -60,33 +76,33 @@ __LDBL_REDIR_DECL (dprintf) #ifdef __USE_GNU __LDBL_REDIR_DECL (vasprintf) -__LDBL_REDIR_DECL (__asprintf) +__LDBL_REDIR2_DECL (asprintf) __LDBL_REDIR_DECL (asprintf) __LDBL_REDIR_DECL (obstack_printf) __LDBL_REDIR_DECL (obstack_vprintf) #endif #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function -__LDBL_REDIR_DECL (__sprintf_chk) -__LDBL_REDIR_DECL (__vsprintf_chk) +__LDBL_REDIR2_DECL (sprintf_chk) +__LDBL_REDIR2_DECL (vsprintf_chk) # if defined __USE_ISOC99 || defined __USE_UNIX98 -__LDBL_REDIR_DECL (__snprintf_chk) -__LDBL_REDIR_DECL (__vsnprintf_chk) +__LDBL_REDIR2_DECL (snprintf_chk) +__LDBL_REDIR2_DECL (vsnprintf_chk) # endif # if __USE_FORTIFY_LEVEL > 1 -__LDBL_REDIR_DECL (__fprintf_chk) -__LDBL_REDIR_DECL (__printf_chk) -__LDBL_REDIR_DECL (__vfprintf_chk) -__LDBL_REDIR_DECL (__vprintf_chk) +__LDBL_REDIR2_DECL (fprintf_chk) +__LDBL_REDIR2_DECL (printf_chk) +__LDBL_REDIR2_DECL (vfprintf_chk) +__LDBL_REDIR2_DECL (vprintf_chk) # ifdef __USE_XOPEN2K8 -__LDBL_REDIR_DECL (__dprintf_chk) -__LDBL_REDIR_DECL (__vdprintf_chk) +__LDBL_REDIR2_DECL (dprintf_chk) +__LDBL_REDIR2_DECL (vdprintf_chk) # endif # ifdef __USE_GNU -__LDBL_REDIR_DECL (__asprintf_chk) -__LDBL_REDIR_DECL (__vasprintf_chk) -__LDBL_REDIR_DECL (__obstack_printf_chk) -__LDBL_REDIR_DECL (__obstack_vprintf_chk) +__LDBL_REDIR2_DECL (asprintf_chk) +__LDBL_REDIR2_DECL (vasprintf_chk) +__LDBL_REDIR2_DECL (obstack_printf_chk) +__LDBL_REDIR2_DECL (obstack_vprintf_chk) # endif # endif #endif \ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/stdio2.h b/lib/libc/include/generic-glibc/bits/stdio2.h @@ -24,10 +24,12 @@ #endif extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, - const char *__restrict __format, ...) __THROW; + const char *__restrict __format, ...) __THROW + __attr_access ((__write_only__, 1, 3)); extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, const char *__restrict __format, - __gnuc_va_list __ap) __THROW; + __gnuc_va_list __ap) __THROW + __attr_access ((__write_only__, 1, 3)); #ifdef __va_arg_pack __fortify_function int @@ -54,7 +56,8 @@ __NTH (vsprintf (char *__restrict __s, const char *__restrict __fmt, extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, size_t __slen, const char *__restrict __format, - ...) __THROW; + ...) __THROW + __attr_access ((__write_only__, 1, 2)); extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, size_t __slen, const char *__restrict __format, __gnuc_va_list __ap) __THROW; @@ -241,17 +244,19 @@ gets (char *__str) #endif extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, - FILE *__restrict __stream) __wur; + FILE *__restrict __stream) + __wur __attr_access ((__write_only__, 1, 3)); extern char *__REDIRECT (__fgets_alias, (char *__restrict __s, int __n, - FILE *__restrict __stream), fgets) __wur; + FILE *__restrict __stream), fgets) + __wur __attr_access ((__write_only__, 1, 2)); extern char *__REDIRECT (__fgets_chk_warn, (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream), __fgets_chk) __wur __warnattr ("fgets called with bigger size than length " "of destination buffer"); -__fortify_function __wur char * +__fortify_function __wur __attr_access ((__write_only__, 1, 2)) char * fgets (char *__restrict __s, int __n, FILE *__restrict __stream) { if (__bos (__s) != (size_t) -1) @@ -299,17 +304,19 @@ fread (void *__restrict __ptr, size_t __size, size_t __n, #ifdef __USE_GNU extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, - int __n, FILE *__restrict __stream) __wur; + int __n, FILE *__restrict __stream) + __wur __attr_access ((__write_only__, 1, 3)); extern char *__REDIRECT (__fgets_unlocked_alias, (char *__restrict __s, int __n, - FILE *__restrict __stream), fgets_unlocked) __wur; + FILE *__restrict __stream), fgets_unlocked) + __wur __attr_access ((__write_only__, 1, 2)); extern char *__REDIRECT (__fgets_unlocked_chk_warn, (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream), __fgets_unlocked_chk) __wur __warnattr ("fgets_unlocked called with bigger size than length " "of destination buffer"); -__fortify_function __wur char * +__fortify_function __wur __attr_access ((__write_only__, 1, 2)) char * fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) { if (__bos (__s) != (size_t) -1) diff --git a/lib/libc/include/generic-glibc/bits/stdlib-ldbl.h b/lib/libc/include/generic-glibc/bits/stdlib-ldbl.h @@ -21,21 +21,43 @@ #endif #ifdef __USE_ISOC99 +# ifdef __LDBL_COMPAT __LDBL_REDIR1_DECL (strtold, strtod) +# else +__LDBL_REDIR1_DECL (strtold, __strtoieee128) +# endif #endif #ifdef __USE_GNU +# ifdef __LDBL_COMPAT __LDBL_REDIR1_DECL (strtold_l, strtod_l) +# else +__LDBL_REDIR1_DECL (strtold_l, __strtoieee128_l) +# endif #endif #if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) +# ifdef __LDBL_COMPAT __LDBL_REDIR1_DECL (strfroml, strfromd) +# else +__LDBL_REDIR1_DECL (strfroml, __strfromieee128) +# endif #endif #ifdef __USE_MISC +# if defined __LDBL_COMPAT __LDBL_REDIR1_DECL (qecvt, ecvt) __LDBL_REDIR1_DECL (qfcvt, fcvt) __LDBL_REDIR1_DECL (qgcvt, gcvt) __LDBL_REDIR1_DECL (qecvt_r, ecvt_r) __LDBL_REDIR1_DECL (qfcvt_r, fcvt_r) +# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +__LDBL_REDIR1_DECL (qecvt, __qecvtieee128) +__LDBL_REDIR1_DECL (qfcvt, __qfcvtieee128) +__LDBL_REDIR1_DECL (qgcvt, __qgcvtieee128) +__LDBL_REDIR1_DECL (qecvt_r, __qecvtieee128_r) +__LDBL_REDIR1_DECL (qfcvt_r, __qfcvtieee128_r) +# else +# error bits/stdlib-ldbl.h included when no ldbl redirections are required. +# endif #endif \ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/stdlib.h b/lib/libc/include/generic-glibc/bits/stdlib.h @@ -50,10 +50,11 @@ __NTH (realpath (const char *__restrict __name, char *__restrict __resolved)) extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, - size_t __nreal) __THROW __nonnull ((2)); + size_t __nreal) __THROW __nonnull ((2)) + __attr_access ((__write_only__, 2, 3)); extern int __REDIRECT_NTH (__ptsname_r_alias, (int __fd, char *__buf, size_t __buflen), ptsname_r) - __nonnull ((2)); + __nonnull ((2)) __attr_access ((__write_only__, 2, 3)); extern int __REDIRECT_NTH (__ptsname_r_chk_warn, (int __fd, char *__buf, size_t __buflen, size_t __nreal), __ptsname_r_chk) @@ -97,11 +98,13 @@ __NTH (wctomb (char *__s, wchar_t __wchar)) extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, const char *__restrict __src, - size_t __len, size_t __dstlen) __THROW; + size_t __len, size_t __dstlen) __THROW + __attr_access ((__write_only__, 1, 3)) __attr_access ((__read_only__, 2)); extern size_t __REDIRECT_NTH (__mbstowcs_alias, (wchar_t *__restrict __dst, const char *__restrict __src, - size_t __len), mbstowcs); + size_t __len), mbstowcs) + __attr_access ((__write_only__, 1, 3)) __attr_access ((__read_only__, 2)); extern size_t __REDIRECT_NTH (__mbstowcs_chk_warn, (wchar_t *__restrict __dst, const char *__restrict __src, @@ -129,11 +132,13 @@ __NTH (mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, extern size_t __wcstombs_chk (char *__restrict __dst, const wchar_t *__restrict __src, - size_t __len, size_t __dstlen) __THROW; + size_t __len, size_t __dstlen) __THROW + __attr_access ((__write_only__, 1, 3)) __attr_access ((__read_only__, 2)); extern size_t __REDIRECT_NTH (__wcstombs_alias, (char *__restrict __dst, const wchar_t *__restrict __src, - size_t __len), wcstombs); + size_t __len), wcstombs) + __attr_access ((__write_only__, 1, 3)) __attr_access ((__read_only__, 2)); extern size_t __REDIRECT_NTH (__wcstombs_chk_warn, (char *__restrict __dst, const wchar_t *__restrict __src, diff --git a/lib/libc/include/generic-glibc/bits/string_fortified.h b/lib/libc/include/generic-glibc/bits/string_fortified.h @@ -75,7 +75,7 @@ __NTH (memset (void *__dest, int __ch, size_t __len)) # include <bits/strings_fortified.h> void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen) - __THROW __nonnull ((1)); + __THROW __nonnull ((1)) __attr_access ((__write_only__, 1, 2)); __fortify_function void __NTH (explicit_bzero (void *__dest, size_t __len)) @@ -108,7 +108,8 @@ __NTH (strncpy (char *__restrict __dest, const char *__restrict __src, /* XXX We have no corresponding builtin yet. */ extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n, - size_t __destlen) __THROW; + size_t __destlen) __THROW + __attr_access ((__write_only__, 1, 3)) __attr_access ((__read_only__, 2)); extern char *__REDIRECT_NTH (__stpncpy_alias, (char *__dest, const char *__src, size_t __n), stpncpy); diff --git a/lib/libc/include/generic-glibc/bits/sys_errlist.h b/lib/libc/include/generic-glibc/bits/sys_errlist.h @@ -1,32 +0,0 @@ -/* Declare sys_errlist and sys_nerr, or don't. Compatibility (do) version. - Copyright (C) 2002-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _STDIO_H -# error "Never include <bits/sys_errlist.h> directly; use <stdio.h> instead." -#endif - -/* sys_errlist and sys_nerr are deprecated. Use strerror instead. */ - -#ifdef __USE_MISC -extern int sys_nerr; -extern const char *const sys_errlist[]; -#endif -#ifdef __USE_GNU -extern int _sys_nerr; -extern const char *const _sys_errlist[]; -#endif -\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/syscall.h b/lib/libc/include/generic-glibc/bits/syscall.h @@ -1,11 +1,11 @@ /* Generated at libc build time from syscall list. */ -/* The system call list corresponds to kernel 5.4. */ +/* The system call list corresponds to kernel 5.7. */ #ifndef _SYSCALL_H # error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead." #endif -#define __GLIBC_LINUX_VERSION_CODE 328704 +#define __GLIBC_LINUX_VERSION_CODE 329472 #ifdef __NR_FAST_atomic_update # define SYS_FAST_atomic_update __NR_FAST_atomic_update @@ -75,6 +75,18 @@ # define SYS_alloc_hugepages __NR_alloc_hugepages #endif +#ifdef __NR_arc_gettls +# define SYS_arc_gettls __NR_arc_gettls +#endif + +#ifdef __NR_arc_settls +# define SYS_arc_settls __NR_arc_settls +#endif + +#ifdef __NR_arc_usr_cmpxchg +# define SYS_arc_usr_cmpxchg __NR_arc_usr_cmpxchg +#endif + #ifdef __NR_arch_prctl # define SYS_arch_prctl __NR_arch_prctl #endif @@ -1079,6 +1091,10 @@ # define SYS_openat __NR_openat #endif +#ifdef __NR_openat2 +# define SYS_openat2 __NR_openat2 +#endif + #ifdef __NR_osf_adjtime # define SYS_osf_adjtime __NR_osf_adjtime #endif @@ -1551,6 +1567,10 @@ # define SYS_personality __NR_personality #endif +#ifdef __NR_pidfd_getfd +# define SYS_pidfd_getfd __NR_pidfd_getfd +#endif + #ifdef __NR_pidfd_open # define SYS_pidfd_open __NR_pidfd_open #endif diff --git a/lib/libc/include/generic-glibc/bits/sysctl.h b/lib/libc/include/generic-glibc/bits/sysctl.h @@ -1 +0,0 @@ -/* Empty file. */ -\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/syslog-ldbl.h b/lib/libc/include/generic-glibc/bits/syslog-ldbl.h @@ -27,9 +27,9 @@ __LDBL_REDIR_DECL (vsyslog) #endif #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function -__LDBL_REDIR_DECL (__syslog_chk) +__LDBL_REDIR2_DECL (syslog_chk) # ifdef __USE_MISC -__LDBL_REDIR_DECL (__vsyslog_chk) +__LDBL_REDIR2_DECL (vsyslog_chk) # endif #endif \ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/thread-shared-types.h b/lib/libc/include/generic-glibc/bits/thread-shared-types.h @@ -116,4 +116,14 @@ struct __pthread_cond_s unsigned int __g_signals[2]; }; +typedef unsigned int __tss_t; +typedef unsigned long int __thrd_t; + +typedef struct +{ + int __data __ONCE_ALIGNMENT; +} __once_flag; + +#define __ONCE_FLAG_INIT { 0 } + #endif /* _THREAD_SHARED_TYPES_H */ \ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/types.h b/lib/libc/include/generic-glibc/bits/types.h @@ -160,6 +160,7 @@ __STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */ __STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */ __STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */ __STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */ +__STD_TYPE __SUSECONDS64_T_TYPE __suseconds64_t; __STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */ __STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */ diff --git a/lib/libc/include/generic-glibc/bits/types/struct_msqid_ds.h b/lib/libc/include/generic-glibc/bits/types/struct_msqid_ds.h @@ -0,0 +1,47 @@ +/* Generic implementation of the SysV message struct msqid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_MSG_H +# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." +#endif + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ +#if __TIMESIZE == 32 + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_stime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_ctime; /* time of last change */ + unsigned long int __msg_ctime_high; +#else + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgsnd command */ + __time_t msg_ctime; /* time of last change */ +#endif + __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ + __pid_t msg_lspid; /* pid of last msgsnd() */ + __pid_t msg_lrpid; /* pid of last msgrcv() */ + __syscall_ulong_t __glibc_reserved4; + __syscall_ulong_t __glibc_reserved5; +}; +\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/types/struct_semid_ds.h b/lib/libc/include/generic-glibc/bits/types/struct_semid_ds.h @@ -0,0 +1,39 @@ +/* Generic implementation of the semaphore struct semid_ds. + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SEM_H +# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ +#if __TIMESIZE == 32 + __time_t sem_otime; /* last semop() time */ + __syscall_ulong_t __sem_otime_high; + __time_t sem_ctime; /* last time changed by semctl() */ + __syscall_ulong_t __sem_ctime_high; +#else + __time_t sem_otime; + __time_t sem_ctime; +#endif + __syscall_ulong_t sem_nsems; /* number of semaphores in set */ + __syscall_ulong_t __glibc_reserved3; + __syscall_ulong_t __glibc_reserved4; +}; +\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/types/struct_shmid_ds.h b/lib/libc/include/generic-glibc/bits/types/struct_shmid_ds.h @@ -0,0 +1,45 @@ +/* Generic implementation of the shared memory struct shmid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SHM_H +# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead." +#endif + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ + size_t shm_segsz; /* size of segment in bytes */ +#if __TIMESIZE == 32 + __time_t shm_atime; /* time of last shmat() */ + unsigned long int __shm_atime_high; + __time_t shm_dtime; /* time of last shmdt() */ + unsigned long int __shm_dtime_high; + __time_t shm_ctime; /* time of last change by shmctl() */ + unsigned long int __shm_ctime_high; +#else + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#endif + __pid_t shm_cpid; /* pid of creator */ + __pid_t shm_lpid; /* pid of last shmop */ + shmatt_t shm_nattch; /* number of current attaches */ + __syscall_ulong_t __glibc_reserved5; + __syscall_ulong_t __glibc_reserved6; + }; +\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/typesizes.h b/lib/libc/include/generic-glibc/bits/typesizes.h @@ -50,6 +50,7 @@ #define __TIME_T_TYPE __SLONGWORD_TYPE #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#define __SUSECONDS64_T_TYPE __SQUAD_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE @@ -75,10 +76,16 @@ /* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ # define __STATFS_MATCHES_STATFS64 1 + +/* And for getitimer, setitimer and rusage */ +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1 #else # define __RLIM_T_MATCHES_RLIM64_T 0 # define __STATFS_MATCHES_STATFS64 0 + +/* And for getitimer, setitimer and rusage */ +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0 #endif /* Number of descriptors that can fit in an `fd_set'. */ diff --git a/lib/libc/include/generic-glibc/bits/unistd.h b/lib/libc/include/generic-glibc/bits/unistd.h @@ -21,9 +21,11 @@ #endif extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, - size_t __buflen) __wur; + size_t __buflen) + __wur __attr_access ((__write_only__, 2, 3)); extern ssize_t __REDIRECT (__read_alias, (int __fd, void *__buf, - size_t __nbytes), read) __wur; + size_t __nbytes), read) + __wur __attr_access ((__write_only__, 2, 3)); extern ssize_t __REDIRECT (__read_chk_warn, (int __fd, void *__buf, size_t __nbytes, size_t __buflen), __read_chk) @@ -46,15 +48,19 @@ read (int __fd, void *__buf, size_t __nbytes) #ifdef __USE_UNIX98 extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, - __off_t __offset, size_t __bufsize) __wur; + __off_t __offset, size_t __bufsize) + __wur __attr_access ((__write_only__, 2, 3)); extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, - __off64_t __offset, size_t __bufsize) __wur; + __off64_t __offset, size_t __bufsize) + __wur __attr_access ((__write_only__, 2, 3)); extern ssize_t __REDIRECT (__pread_alias, (int __fd, void *__buf, size_t __nbytes, - __off_t __offset), pread) __wur; + __off_t __offset), pread) + __wur __attr_access ((__write_only__, 2, 3)); extern ssize_t __REDIRECT (__pread64_alias, (int __fd, void *__buf, size_t __nbytes, - __off64_t __offset), pread64) __wur; + __off64_t __offset), pread64) + __wur __attr_access ((__write_only__, 2, 3)); extern ssize_t __REDIRECT (__pread_chk_warn, (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize), __pread_chk) @@ -123,11 +129,11 @@ pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) extern ssize_t __readlink_chk (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) - __THROW __nonnull ((1, 2)) __wur; + __THROW __nonnull ((1, 2)) __wur __attr_access ((__write_only__, 2, 3)); extern ssize_t __REDIRECT_NTH (__readlink_alias, (const char *__restrict __path, char *__restrict __buf, size_t __len), readlink) - __nonnull ((1, 2)) __wur; + __nonnull ((1, 2)) __wur __attr_access ((__write_only__, 2, 3)); extern ssize_t __REDIRECT_NTH (__readlink_chk_warn, (const char *__restrict __path, char *__restrict __buf, size_t __len, @@ -155,12 +161,12 @@ __NTH (readlink (const char *__restrict __path, char *__restrict __buf, extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) - __THROW __nonnull ((2, 3)) __wur; + __THROW __nonnull ((2, 3)) __wur __attr_access ((__write_only__, 3, 4)); extern ssize_t __REDIRECT_NTH (__readlinkat_alias, (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len), readlinkat) - __nonnull ((2, 3)) __wur; + __nonnull ((2, 3)) __wur __attr_access ((__write_only__, 3, 4)); extern ssize_t __REDIRECT_NTH (__readlinkat_chk_warn, (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, @@ -187,9 +193,10 @@ __NTH (readlinkat (int __fd, const char *__restrict __path, #endif extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) - __THROW __wur; + __THROW __wur __attr_access ((__write_only__, 1, 2)); extern char *__REDIRECT_NTH (__getcwd_alias, - (char *__buf, size_t __size), getcwd) __wur; + (char *__buf, size_t __size), getcwd) + __wur __attr_access ((__write_only__, 1, 2)); extern char *__REDIRECT_NTH (__getcwd_chk_warn, (char *__buf, size_t __size, size_t __buflen), __getcwd_chk) @@ -212,7 +219,7 @@ __NTH (getcwd (char *__buf, size_t __size)) #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED extern char *__getwd_chk (char *__buf, size_t buflen) - __THROW __nonnull ((1)) __wur; + __THROW __nonnull ((1)) __wur __attr_access ((__write_only__, 1, 2)); extern char *__REDIRECT_NTH (__getwd_warn, (char *__buf), getwd) __nonnull ((1)) __wur __warnattr ("please use getcwd instead, as getwd " "doesn't specify buffer size"); @@ -227,9 +234,11 @@ __NTH (getwd (char *__buf)) #endif extern size_t __confstr_chk (int __name, char *__buf, size_t __len, - size_t __buflen) __THROW; + size_t __buflen) __THROW + __attr_access ((__write_only__, 2, 3)); extern size_t __REDIRECT_NTH (__confstr_alias, (int __name, char *__buf, - size_t __len), confstr); + size_t __len), confstr) + __attr_access ((__write_only__, 2, 3)); extern size_t __REDIRECT_NTH (__confstr_chk_warn, (int __name, char *__buf, size_t __len, size_t __buflen), __confstr_chk) @@ -252,9 +261,9 @@ __NTH (confstr (int __name, char *__buf, size_t __len)) extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) - __THROW __wur; + __THROW __wur __attr_access ((__write_only__, 2, 1)); extern int __REDIRECT_NTH (__getgroups_alias, (int __size, __gid_t __list[]), - getgroups) __wur; + getgroups) __wur __attr_access ((__write_only__, 2, 1)); extern int __REDIRECT_NTH (__getgroups_chk_warn, (int __size, __gid_t __list[], size_t __listlen), __getgroups_chk) @@ -277,7 +286,8 @@ __NTH (getgroups (int __size, __gid_t __list[])) extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, - size_t __nreal) __THROW __nonnull ((2)); + size_t __nreal) __THROW __nonnull ((2)) + __attr_access ((__write_only__, 2, 3)); extern int __REDIRECT_NTH (__ttyname_r_alias, (int __fd, char *__buf, size_t __buflen), ttyname_r) __nonnull ((2)); @@ -304,7 +314,7 @@ __NTH (ttyname_r (int __fd, char *__buf, size_t __buflen)) #ifdef __USE_POSIX199506 extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) - __nonnull ((1)); + __nonnull ((1)) __attr_access ((__write_only__, 1, 2)); extern int __REDIRECT (__getlogin_r_alias, (char *__buf, size_t __buflen), getlogin_r) __nonnull ((1)); extern int __REDIRECT (__getlogin_r_chk_warn, @@ -331,9 +341,10 @@ getlogin_r (char *__buf, size_t __buflen) #if defined __USE_MISC || defined __USE_UNIX98 extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) - __THROW __nonnull ((1)); + __THROW __nonnull ((1)) __attr_access ((__write_only__, 1, 2)); extern int __REDIRECT_NTH (__gethostname_alias, (char *__buf, size_t __buflen), - gethostname) __nonnull ((1)); + gethostname) + __nonnull ((1)) __attr_access ((__write_only__, 1, 2)); extern int __REDIRECT_NTH (__gethostname_chk_warn, (char *__buf, size_t __buflen, size_t __nreal), __gethostname_chk) @@ -358,10 +369,11 @@ __NTH (gethostname (char *__buf, size_t __buflen)) #if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_UNIX98) extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) - __THROW __nonnull ((1)) __wur; + __THROW __nonnull ((1)) __wur __attr_access ((__write_only__, 1, 2)); extern int __REDIRECT_NTH (__getdomainname_alias, (char *__buf, size_t __buflen), - getdomainname) __nonnull ((1)) __wur; + getdomainname) __nonnull ((1)) + __wur __attr_access ((__write_only__, 1, 2)); extern int __REDIRECT_NTH (__getdomainname_chk_warn, (char *__buf, size_t __buflen, size_t __nreal), __getdomainname_chk) diff --git a/lib/libc/include/generic-glibc/bits/wchar-ldbl.h b/lib/libc/include/generic-glibc/bits/wchar-ldbl.h @@ -28,9 +28,17 @@ __LDBL_REDIR_DECL (vfwprintf); __LDBL_REDIR_DECL (vwprintf); __LDBL_REDIR_DECL (vswprintf); # if !__GLIBC_USE (DEPRECATED_SCANF) +# if defined __LDBL_COMPAT __LDBL_REDIR1_DECL (fwscanf, __nldbl___isoc99_fwscanf) __LDBL_REDIR1_DECL (wscanf, __nldbl___isoc99_wscanf) __LDBL_REDIR1_DECL (swscanf, __nldbl___isoc99_swscanf) +# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +__LDBL_REDIR1_DECL (fwscanf, __isoc99_fwscanfieee128) +__LDBL_REDIR1_DECL (wscanf, __isoc99_wscanfieee128) +__LDBL_REDIR1_DECL (swscanf, __isoc99_swscanfieee128) +# else +# error bits/stdlib-ldbl.h included when no ldbl redirections are required. +# endif # else __LDBL_REDIR_DECL (fwscanf); __LDBL_REDIR_DECL (wscanf); @@ -39,11 +47,23 @@ __LDBL_REDIR_DECL (swscanf); #endif #ifdef __USE_ISOC99 +# ifdef __LDBL_COMPAT __LDBL_REDIR1_DECL (wcstold, wcstod); +# else +__LDBL_REDIR1_DECL (wcstold, __wcstoieee128) +# endif # if !__GLIBC_USE (DEPRECATED_SCANF) +# if defined __LDBL_COMPAT __LDBL_REDIR1_DECL (vfwscanf, __nldbl___isoc99_vfwscanf) __LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc99_vwscanf) __LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc99_vswscanf) +# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +__LDBL_REDIR1_DECL (vfwscanf, __isoc99_vfwscanfieee128) +__LDBL_REDIR1_DECL (vwscanf, __isoc99_vwscanfieee128) +__LDBL_REDIR1_DECL (vswscanf, __isoc99_vswscanfieee128) +# else +# error bits/stdlib-ldbl.h included when no ldbl redirections are required. +# endif # else __LDBL_REDIR_DECL (vfwscanf); __LDBL_REDIR_DECL (vwscanf); @@ -52,16 +72,20 @@ __LDBL_REDIR_DECL (vswscanf); #endif #ifdef __USE_GNU +# ifdef __LDBL_COMPAT __LDBL_REDIR1_DECL (wcstold_l, wcstod_l); +# else +__LDBL_REDIR1_DECL (wcstold_l, __wcstoieee128_l) +# endif #endif #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function -__LDBL_REDIR_DECL (__swprintf_chk) -__LDBL_REDIR_DECL (__vswprintf_chk) +__LDBL_REDIR2_DECL (swprintf_chk) +__LDBL_REDIR2_DECL (vswprintf_chk) # if __USE_FORTIFY_LEVEL > 1 -__LDBL_REDIR_DECL (__fwprintf_chk) -__LDBL_REDIR_DECL (__wprintf_chk) -__LDBL_REDIR_DECL (__vfwprintf_chk) -__LDBL_REDIR_DECL (__vwprintf_chk) +__LDBL_REDIR2_DECL (fwprintf_chk) +__LDBL_REDIR2_DECL (wprintf_chk) +__LDBL_REDIR2_DECL (vfwprintf_chk) +__LDBL_REDIR2_DECL (vwprintf_chk) # endif #endif \ No newline at end of file diff --git a/lib/libc/include/generic-glibc/complex.h b/lib/libc/include/generic-glibc/complex.h @@ -95,11 +95,15 @@ __BEGIN_DECLS #define __MATHCALL(function, args) \ __MATHDECL (_Mdouble_complex_,function, args) -#define __MATHDECL(type, function, args) \ +#define __MATHDECL_IMPL(type, function, args) \ __MATHDECL_1(type, function, args); \ __MATHDECL_1(type, __CONCAT(__,function), args) -#define __MATHDECL_1(type, function, args) \ +#define __MATHDECL(type, function, args) \ + __MATHDECL_IMPL(type, function, args) +#define __MATHDECL_1_IMPL(type, function, args) \ extern type __MATH_PRECNAME(function) args __THROW +#define __MATHDECL_1(type, function, args) \ + __MATHDECL_1_IMPL(type, function, args) #define _Mdouble_ double #define __MATH_PRECNAME(name) name @@ -122,11 +126,31 @@ __BEGIN_DECLS # undef __MATHDECL_1 # define __MATHDECL_1(type, function, args) \ extern type __REDIRECT_NTH(__MATH_PRECNAME(function), args, function) +# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +# undef __MATHDECL_1 +# undef __MATHDECL +# define __REDIR_TO(function) \ + __ ## function ## ieee128 +# define __MATHDECL_1(type, function, alias, args) \ + extern type __REDIRECT_NTH(__MATH_PRECNAME(function), args, alias) +#define __MATHDECL(type, function, args) \ + __MATHDECL_1(type, function, __REDIR_TO(function), args); \ + __MATHDECL_1(type, __CONCAT(__,function), __REDIR_TO(function), args) # endif # define _Mdouble_ long double # define __MATH_PRECNAME(name) name##l # include <bits/cmathcalls.h> +# if defined __LDBL_COMPAT \ + || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +# undef __REDIR_TO +# undef __MATHDECL_1 +# undef __MATHDECL +#define __MATHDECL(type, function, args) \ + __MATHDECL_IMPL(type, function, args) +# define __MATHDECL_1(type, function, args) \ + __MATHDECL_1_IMPL(type, function, args) +# endif #endif #undef _Mdouble_ #undef __MATH_PRECNAME @@ -215,6 +239,7 @@ __BEGIN_DECLS # undef _Mdouble_complex_ #endif +#undef __MATHDECL_1_IMPL #undef __MATHDECL_1 #undef __MATHDECL #undef __MATHCALL diff --git a/lib/libc/include/generic-glibc/elf.h b/lib/libc/include/generic-glibc/elf.h @@ -330,7 +330,7 @@ typedef struct #define EM_CLOUDSHIELD 192 /* CloudShield */ #define EM_COREA_1ST 193 /* KIPO-KAIST Core-A 1st gen. */ #define EM_COREA_2ND 194 /* KIPO-KAIST Core-A 2nd gen. */ -#define EM_ARC_COMPACT2 195 /* Synopsys ARCompact V2 */ +#define EM_ARCV2 195 /* Synopsys ARCv2 ISA. */ #define EM_OPEN8 196 /* Open8 RISC */ #define EM_RL78 197 /* Renesas RL78 */ #define EM_VIDEOCORE5 198 /* Broadcom VideoCore V */ @@ -721,6 +721,7 @@ typedef struct #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ +#define PT_GNU_PROPERTY 0x6474e553 /* GNU property */ #define PT_LOSUNW 0x6ffffffa #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ @@ -1318,6 +1319,12 @@ typedef struct /* Application-specific semantics, hi */ #define GNU_PROPERTY_HIUSER 0xffffffff +/* AArch64 specific GNU properties. */ +#define GNU_PROPERTY_AARCH64_FEATURE_1_AND 0xc0000000 + +#define GNU_PROPERTY_AARCH64_FEATURE_1_BTI (1U << 0) +#define GNU_PROPERTY_AARCH64_FEATURE_1_PAC (1U << 1) + /* The x86 instruction sets indicated by the corresponding bits are used in program. Their support in the hardware is optional. */ #define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000 @@ -3946,8 +3953,9 @@ enum #define R_RISCV_SET16 55 #define R_RISCV_SET32 56 #define R_RISCV_32_PCREL 57 +#define R_RISCV_IRELATIVE 58 -#define R_RISCV_NUM 58 +#define R_RISCV_NUM 59 /* BPF specific declarations. */ @@ -4027,6 +4035,74 @@ enum #define R_NDS32_TLS_TPOFF 102 #define R_NDS32_TLS_DESC 119 +/* ARCompact/ARCv2 specific relocs. */ +#define R_ARC_NONE 0x0 +#define R_ARC_8 0x1 +#define R_ARC_16 0x2 +#define R_ARC_24 0x3 +#define R_ARC_32 0x4 +#define R_ARC_B26 0x5 +#define R_ARC_B22_PCREL 0x6 +#define R_ARC_H30 0x7 +#define R_ARC_N8 0x8 +#define R_ARC_N16 0x9 +#define R_ARC_N24 0xA +#define R_ARC_N32 0xB +#define R_ARC_SDA 0xC +#define R_ARC_SECTOFF 0xD +#define R_ARC_S21H_PCREL 0xE +#define R_ARC_S21W_PCREL 0xF +#define R_ARC_S25H_PCREL 0x10 +#define R_ARC_S25W_PCREL 0x11 +#define R_ARC_SDA32 0x12 +#define R_ARC_SDA_LDST 0x13 +#define R_ARC_SDA_LDST1 0x14 +#define R_ARC_SDA_LDST2 0x15 +#define R_ARC_SDA16_LD 0x16 +#define R_ARC_SDA16_LD1 0x17 +#define R_ARC_SDA16_LD2 0x18 +#define R_ARC_S13_PCREL 0x19 +#define R_ARC_W 0x1A +#define R_ARC_32_ME 0x1B +#define R_ARC_N32_ME 0x1C +#define R_ARC_SECTOFF_ME 0x1D +#define R_ARC_SDA32_ME 0x1E +#define R_ARC_W_ME 0x1F +#define R_ARC_H30_ME 0x20 +#define R_ARC_SECTOFF_U8 0x21 +#define R_ARC_SECTOFF_S9 0x22 +#define R_AC_SECTOFF_U8 0x23 +#define R_AC_SECTOFF_U8_1 0x24 +#define R_AC_SECTOFF_U8_2 0x25 +#define R_AC_SECTOFF_S9 0x26 +#define R_AC_SECTOFF_S9_1 0x27 +#define R_AC_SECTOFF_S9_2 0x28 +#define R_ARC_SECTOFF_ME_1 0x29 +#define R_ARC_SECTOFF_ME_2 0x2A +#define R_ARC_SECTOFF_1 0x2B +#define R_ARC_SECTOFF_2 0x2C +#define R_ARC_PC32 0x32 +#define R_ARC_GOTPC32 0x33 +#define R_ARC_PLT32 0x34 +#define R_ARC_COPY 0x35 +#define R_ARC_GLOB_DAT 0x36 +#define R_ARC_JUMP_SLOT 0x37 +#define R_ARC_RELATIVE 0x38 +#define R_ARC_GOTOFF 0x39 +#define R_ARC_GOTPC 0x3A +#define R_ARC_GOT32 0x3B + +#define R_ARC_TLS_DTPMOD 0x42 +#define R_ARC_TLS_DTPOFF 0x43 +#define R_ARC_TLS_TPOFF 0x44 +#define R_ARC_TLS_GD_GOT 0x45 +#define R_ARC_TLS_GD_LD 0x46 +#define R_ARC_TLS_GD_CALL 0x47 +#define R_ARC_TLS_IE_GOT 0x48 +#define R_ARC_TLS_DTPOFF_S9 0x4a +#define R_ARC_TLS_LE_S9 0x4a +#define R_ARC_TLS_LE_32 0x4b + __END_DECLS #endif /* elf.h */ \ No newline at end of file diff --git a/lib/libc/include/generic-glibc/err.h b/lib/libc/include/generic-glibc/err.h @@ -52,7 +52,8 @@ extern void errx (int __status, const char *__format, ...) extern void verrx (int __status, const char *, __gnuc_va_list) __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0))); -#ifdef __LDBL_COMPAT +#include <bits/floatn.h> +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include <bits/err-ldbl.h> #endif diff --git a/lib/libc/include/generic-glibc/error.h b/lib/libc/include/generic-glibc/error.h @@ -47,11 +47,13 @@ extern unsigned int error_message_count; variable controls whether this mode is selected or not. */ extern int error_one_per_line; -#ifdef __LDBL_COMPAT +#include <bits/floatn.h> +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include <bits/error-ldbl.h> #else /* Do not inline error and error_at_line when long double has the same - size of double, because that would invalidate the redirections to the + size of double, nor when long double reuses the float128 + implementation, because that would invalidate the redirections to the compatibility functions. */ # if defined __extern_always_inline && defined __va_arg_pack # include <bits/error.h> diff --git a/lib/libc/include/generic-glibc/features.h b/lib/libc/include/generic-glibc/features.h @@ -454,7 +454,7 @@ /* Major and minor version number of the GNU C library package. Use these macros to test for features in specific releases. */ #define __GLIBC__ 2 -#define __GLIBC_MINOR__ 31 +#define __GLIBC_MINOR__ 32 #define __GLIBC_PREREQ(maj, min) \ ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) diff --git a/lib/libc/include/generic-glibc/fenv.h b/lib/libc/include/generic-glibc/fenv.h @@ -140,10 +140,6 @@ extern int fegetmode (femode_t *__modep) __THROW; extern int fesetmode (const femode_t *__modep) __THROW; #endif -/* Include optimization. */ -#ifdef __OPTIMIZE__ -# include <bits/fenvinline.h> -#endif /* NaN support. */ diff --git a/lib/libc/include/generic-glibc/gnu/lib-names-32.h b/lib/libc/include/generic-glibc/gnu/lib-names-32.h @@ -20,8 +20,6 @@ #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" -#define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" diff --git a/lib/libc/include/generic-glibc/gnu/lib-names-hard.h b/lib/libc/include/generic-glibc/gnu/lib-names-hard.h @@ -20,8 +20,6 @@ #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" -#define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" diff --git a/lib/libc/include/generic-glibc/gnu/lib-names-n32_hard.h b/lib/libc/include/generic-glibc/gnu/lib-names-n32_hard.h @@ -19,8 +19,6 @@ #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" -#define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" diff --git a/lib/libc/include/generic-glibc/gnu/lib-names-n64_hard.h b/lib/libc/include/generic-glibc/gnu/lib-names-n64_hard.h @@ -19,8 +19,6 @@ #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" -#define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" diff --git a/lib/libc/include/generic-glibc/gnu/lib-names-o32_hard.h b/lib/libc/include/generic-glibc/gnu/lib-names-o32_hard.h @@ -19,8 +19,6 @@ #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" -#define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" diff --git a/lib/libc/include/generic-glibc/gnu/lib-names-soft.h b/lib/libc/include/generic-glibc/gnu/lib-names-soft.h @@ -20,8 +20,6 @@ #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" -#define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" diff --git a/lib/libc/include/generic-glibc/gnu/stubs-32.h b/lib/libc/include/generic-glibc/gnu/stubs-32.h @@ -10,9 +10,7 @@ #define __stub_chflags #define __stub_fchflags #define __stub_gtty -#define __stub_lchmod #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn -#define __stub_sstk #define __stub_stty \ No newline at end of file diff --git a/lib/libc/include/generic-glibc/gnu/stubs-64.h b/lib/libc/include/generic-glibc/gnu/stubs-64.h @@ -10,9 +10,7 @@ #define __stub_chflags #define __stub_fchflags #define __stub_gtty -#define __stub_lchmod #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn -#define __stub_sstk #define __stub_stty \ No newline at end of file diff --git a/lib/libc/include/generic-glibc/gnu/stubs-hard.h b/lib/libc/include/generic-glibc/gnu/stubs-hard.h @@ -13,9 +13,7 @@ #define __stub_chflags #define __stub_fchflags #define __stub_gtty -#define __stub_lchmod #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn -#define __stub_sstk #define __stub_stty \ No newline at end of file diff --git a/lib/libc/include/generic-glibc/gnu/stubs-n32_hard.h b/lib/libc/include/generic-glibc/gnu/stubs-n32_hard.h @@ -12,9 +12,7 @@ #define __stub_chflags #define __stub_fchflags #define __stub_gtty -#define __stub_lchmod #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn -#define __stub_sstk #define __stub_stty \ No newline at end of file diff --git a/lib/libc/include/generic-glibc/gnu/stubs-n64_hard.h b/lib/libc/include/generic-glibc/gnu/stubs-n64_hard.h @@ -12,9 +12,7 @@ #define __stub_chflags #define __stub_fchflags #define __stub_gtty -#define __stub_lchmod #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn -#define __stub_sstk #define __stub_stty \ No newline at end of file diff --git a/lib/libc/include/generic-glibc/gnu/stubs-o32_hard.h b/lib/libc/include/generic-glibc/gnu/stubs-o32_hard.h @@ -10,9 +10,7 @@ #define __stub_chflags #define __stub_fchflags #define __stub_gtty -#define __stub_lchmod #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn -#define __stub_sstk #define __stub_stty \ No newline at end of file diff --git a/lib/libc/include/generic-glibc/gnu/stubs-soft.h b/lib/libc/include/generic-glibc/gnu/stubs-soft.h @@ -13,9 +13,7 @@ #define __stub_chflags #define __stub_fchflags #define __stub_gtty -#define __stub_lchmod #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn -#define __stub_sstk #define __stub_stty \ No newline at end of file diff --git a/lib/libc/include/generic-glibc/inttypes.h b/lib/libc/include/generic-glibc/inttypes.h @@ -321,10 +321,10 @@ extern long int __strtol_internal (const char *__restrict __nptr, __THROW __nonnull ((1)) __wur; /* Like `strtol' but convert to `intmax_t'. */ __extern_inline intmax_t -__NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr, - int base)) +__NTH (strtoimax (const char *__restrict __nptr, char **__restrict __endptr, + int __base)) { - return __strtol_internal (nptr, endptr, base, 0); + return __strtol_internal (__nptr, __endptr, __base, 0); } extern unsigned long int __strtoul_internal (const char *__restrict __nptr, @@ -333,10 +333,10 @@ extern unsigned long int __strtoul_internal (const char *__restrict __nptr, __THROW __nonnull ((1)) __wur; /* Like `strtoul' but convert to `uintmax_t'. */ __extern_inline uintmax_t -__NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr, - int base)) +__NTH (strtoumax (const char *__restrict __nptr, char **__restrict __endptr, + int __base)) { - return __strtoul_internal (nptr, endptr, base, 0); + return __strtoul_internal (__nptr, __endptr, __base, 0); } extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr, @@ -345,10 +345,10 @@ extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr, __THROW __nonnull ((1)) __wur; /* Like `wcstol' but convert to `intmax_t'. */ __extern_inline intmax_t -__NTH (wcstoimax (const __gwchar_t *__restrict nptr, - __gwchar_t **__restrict endptr, int base)) +__NTH (wcstoimax (const __gwchar_t *__restrict __nptr, + __gwchar_t **__restrict __endptr, int __base)) { - return __wcstol_internal (nptr, endptr, base, 0); + return __wcstol_internal (__nptr, __endptr, __base, 0); } extern unsigned long int __wcstoul_internal (const __gwchar_t * @@ -359,10 +359,10 @@ extern unsigned long int __wcstoul_internal (const __gwchar_t * __THROW __nonnull ((1)) __wur; /* Like `wcstoul' but convert to `uintmax_t'. */ __extern_inline uintmax_t -__NTH (wcstoumax (const __gwchar_t *__restrict nptr, - __gwchar_t **__restrict endptr, int base)) +__NTH (wcstoumax (const __gwchar_t *__restrict __nptr, + __gwchar_t **__restrict __endptr, int __base)) { - return __wcstoul_internal (nptr, endptr, base, 0); + return __wcstoul_internal (__nptr, __endptr, __base, 0); } # else /* __WORDSIZE == 32 */ @@ -374,10 +374,10 @@ extern long long int __strtoll_internal (const char *__restrict __nptr, __THROW __nonnull ((1)) __wur; /* Like `strtol' but convert to `intmax_t'. */ __extern_inline intmax_t -__NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr, - int base)) +__NTH (strtoimax (const char *__restrict __nptr, char **__restrict __endptr, + int __base)) { - return __strtoll_internal (nptr, endptr, base, 0); + return __strtoll_internal (__nptr, __endptr, __base, 0); } __extension__ @@ -390,10 +390,10 @@ extern unsigned long long int __strtoull_internal (const char * __THROW __nonnull ((1)) __wur; /* Like `strtoul' but convert to `uintmax_t'. */ __extern_inline uintmax_t -__NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr, - int base)) +__NTH (strtoumax (const char *__restrict __nptr, char **__restrict __endptr, + int __base)) { - return __strtoull_internal (nptr, endptr, base, 0); + return __strtoull_internal (__nptr, __endptr, __base, 0); } __extension__ @@ -403,10 +403,10 @@ extern long long int __wcstoll_internal (const __gwchar_t *__restrict __nptr, __THROW __nonnull ((1)) __wur; /* Like `wcstol' but convert to `intmax_t'. */ __extern_inline intmax_t -__NTH (wcstoimax (const __gwchar_t *__restrict nptr, - __gwchar_t **__restrict endptr, int base)) +__NTH (wcstoimax (const __gwchar_t *__restrict __nptr, + __gwchar_t **__restrict __endptr, int __base)) { - return __wcstoll_internal (nptr, endptr, base, 0); + return __wcstoll_internal (__nptr, __endptr, __base, 0); } @@ -420,10 +420,10 @@ extern unsigned long long int __wcstoull_internal (const __gwchar_t * __THROW __nonnull ((1)) __wur; /* Like `wcstoul' but convert to `uintmax_t'. */ __extern_inline uintmax_t -__NTH (wcstoumax (const __gwchar_t *__restrict nptr, - __gwchar_t **__restrict endptr, int base)) +__NTH (wcstoumax (const __gwchar_t *__restrict __nptr, + __gwchar_t **__restrict __endptr, int __base)) { - return __wcstoull_internal (nptr, endptr, base, 0); + return __wcstoull_internal (__nptr, __endptr, __base, 0); } # endif /* __WORDSIZE == 32 */ diff --git a/lib/libc/include/generic-glibc/malloc.h b/lib/libc/include/generic-glibc/malloc.h @@ -75,11 +75,11 @@ extern void *pvalloc (size_t __size) __THROW __attribute_malloc__ __wur; /* Underlying allocation function; successive calls should return contiguous pieces of memory. */ -extern void *(*__morecore) (ptrdiff_t __size); +extern void *(*__morecore) (ptrdiff_t __size) __MALLOC_DEPRECATED; /* Default value of `__morecore'. */ extern void *__default_morecore (ptrdiff_t __size) -__THROW __attribute_malloc__; +__THROW __attribute_malloc__ __MALLOC_DEPRECATED; /* SVID2/XPG mallinfo structure */ @@ -156,7 +156,8 @@ extern void *(*__MALLOC_HOOK_VOLATILE __memalign_hook)(size_t __alignment, size_t __size, const void *) __MALLOC_DEPRECATED; -extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void); +extern void (*__MALLOC_HOOK_VOLATILE __after_morecore_hook) (void) + __MALLOC_DEPRECATED; __END_DECLS diff --git a/lib/libc/include/generic-glibc/math.h b/lib/libc/include/generic-glibc/math.h @@ -279,8 +279,17 @@ enum #define __MATHDECLX(type, function,suffix, args, attrib) \ __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); \ __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib) -#define __MATHDECL_1(type, function,suffix, args) \ +#define __MATHDECL_1_IMPL(type, function, suffix, args) \ extern type __MATH_PRECNAME(function,suffix) args __THROW +#define __MATHDECL_1(type, function, suffix, args) \ + __MATHDECL_1_IMPL(type, function, suffix, args) +/* Ignore the alias by default. The alias is only useful with + redirections. */ +#define __MATHDECL_ALIAS(type, function, suffix, args, alias) \ + __MATHDECL_1(type, function, suffix, args) + +#define __MATHREDIR(type, function, suffix, args, to) \ + extern type __REDIRECT_NTH (__MATH_PRECNAME (function, suffix), args, to) #define _Mdouble_ double #define __MATH_PRECNAME(name,r) __CONCAT(name,r) @@ -331,11 +340,37 @@ extern long double __REDIRECT_NTH (nexttowardl, # endif # undef __MATHDECL_1 -# define __MATHDECL_2(type, function,suffix, args, alias) \ - extern type __REDIRECT_NTH(__MATH_PRECNAME(function,suffix), \ - args, alias) # define __MATHDECL_1(type, function,suffix, args) \ - __MATHDECL_2(type, function,suffix, args, __CONCAT(function,suffix)) + __MATHREDIR(type, function, suffix, args, __CONCAT(function,suffix)) + +# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +# ifdef __REDIRECT_NTH +# ifdef __USE_ISOC99 +extern float __REDIRECT_NTH (nexttowardf, (float __x, long double __y), + __nexttowardf_to_ieee128) + __attribute__ ((__const__)); +extern double __REDIRECT_NTH (nexttoward, (double __x, long double __y), + __nexttoward_to_ieee128) + __attribute__ ((__const__)); + +#define __dremieee128 __remainderieee128 +#define __gammaieee128 __lgammaieee128 + +# endif +# endif + +# undef __MATHDECL_1 +# undef __MATHDECL_ALIAS + +# define __REDIRTO(function, suffix) \ + __ ## function ## ieee128 ## suffix +# define __REDIRTO_ALT(function, suffix) \ + __ ## function ## f128 ## suffix + +# define __MATHDECL_1(type, function, suffix, args) \ + __MATHREDIR (type, function, suffix, args, __REDIRTO (function, suffix)) +# define __MATHDECL_ALIAS(type, function, suffix, args, alias) \ + __MATHREDIR (type, function, suffix, args, __REDIRTO_ALT (alias, suffix)) # endif /* Include the file of declarations again, this time using `long double' @@ -348,11 +383,23 @@ extern long double __REDIRECT_NTH (nexttowardl, # define __MATH_DECLARE_LDOUBLE 1 # include <bits/mathcalls-helper-functions.h> # include <bits/mathcalls.h> + # undef _Mdouble_ # undef __MATH_PRECNAME # undef __MATH_DECLARING_DOUBLE # undef __MATH_DECLARING_FLOATN +# if defined __LDBL_COMPAT \ + || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +# undef __REDIRTO +# undef __REDIRTO_ALT +# undef __MATHDECL_1 +# undef __MATHDECL_ALIAS +# define __MATHDECL_1(type, function, suffix, args) \ + __MATHDECL_1_IMPL(type, function, suffix, args) +# define __MATHDECL_ALIAS(type, function, suffix, args, alias) \ + __MATHDECL_1(type, function, suffix, args) +# endif # endif /* !(__NO_LONG_DOUBLE_MATH && _LIBC) || __LDBL_COMPAT */ #endif /* Use ISO C99. */ @@ -479,7 +526,9 @@ extern long double __REDIRECT_NTH (nexttowardl, # undef __MATH_DECLARING_FLOATN #endif /* __HAVE_DISTINCT_FLOAT128X || (__HAVE_FLOAT128X && !_LIBC). */ +#undef __MATHDECL_1_IMPL #undef __MATHDECL_1 +#undef __MATHDECL_ALIAS #undef __MATHDECL #undef __MATHCALL @@ -513,12 +562,18 @@ extern long double __REDIRECT_NTH (nexttowardl, # undef __MATHCALL_NARROW # define __MATHCALL_NARROW(func, redir, nargs) \ __MATHCALL_NARROW_REDIR (func, redir, nargs) +# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +# define __MATHCALL_REDIR_NAME(name) __ ## f32 ## name ## ieee128 +# undef __MATHCALL_NARROW +# define __MATHCALL_NARROW(func, redir, nargs) \ + __MATHCALL_NARROW_REDIR (func, redir, nargs) # endif # include <bits/mathcalls-narrow.h> # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME -# ifdef __LDBL_COMPAT +# if defined __LDBL_COMPAT \ + || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # undef __MATHCALL_REDIR_NAME # undef __MATHCALL_NARROW # define __MATHCALL_NARROW(func, redir, nargs) \ @@ -533,12 +588,18 @@ extern long double __REDIRECT_NTH (nexttowardl, # undef __MATHCALL_NARROW # define __MATHCALL_NARROW(func, redir, nargs) \ __MATHCALL_NARROW_REDIR (func, redir, nargs) +# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +# define __MATHCALL_REDIR_NAME(name) __ ## f64 ## name ## ieee128 +# undef __MATHCALL_NARROW +# define __MATHCALL_NARROW(func, redir, nargs) \ + __MATHCALL_NARROW_REDIR (func, redir, nargs) # endif # include <bits/mathcalls-narrow.h> # undef _Mret_ # undef _Marg_ # undef __MATHCALL_NAME -# ifdef __LDBL_COMPAT +# if defined __LDBL_COMPAT \ + || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # undef __MATHCALL_REDIR_NAME # undef __MATHCALL_NARROW # define __MATHCALL_NARROW(func, redir, nargs) \ @@ -1196,13 +1257,6 @@ iszero (__T __val) # error "M_* values needed for _Float128x" #endif -/* When compiling in strict ISO C compatible mode we must not use the - inline functions since they, among other things, do not set the - `errno' variable correctly. */ -#if defined __STRICT_ANSI__ && !defined __NO_MATH_INLINES -# define __NO_MATH_INLINES 1 -#endif - #ifdef __USE_ISOC99 # if __GNUC_PREREQ (3, 1) /* ISO C99 defines some macros to compare number while taking care for @@ -1240,12 +1294,6 @@ iszero (__T __val) # endif #endif -/* Get machine-dependent inline versions (if there are any). */ -#ifdef __USE_EXTERN_INLINES -# include <bits/mathinline.h> -#endif - - #if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* An expression whose type has the widest of the evaluation formats of X and Y (which are of floating-point types). */ diff --git a/lib/libc/include/generic-glibc/monetary.h b/lib/libc/include/generic-glibc/monetary.h @@ -50,7 +50,8 @@ extern ssize_t strfmon_l (char *__restrict __s, size_t __maxsize, __THROW __attribute_format_strfmon__ (4, 5); #endif -#ifdef __LDBL_COMPAT +#include <bits/floatn.h> +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include <bits/monetary-ldbl.h> #endif diff --git a/lib/libc/include/generic-glibc/netinet/icmp6.h b/lib/libc/include/generic-glibc/netinet/icmp6.h @@ -85,16 +85,16 @@ struct icmp6_hdr #define ICMP6_PARAMPROB_OPTION 2 /* unrecognized IPv6 option */ #define ICMP6_FILTER_WILLPASS(type, filterp) \ - ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0) + ((((filterp)->icmp6_filt[(type) >> 5]) & (1U << ((type) & 31))) == 0) #define ICMP6_FILTER_WILLBLOCK(type, filterp) \ - ((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0) + ((((filterp)->icmp6_filt[(type) >> 5]) & (1U << ((type) & 31))) != 0) #define ICMP6_FILTER_SETPASS(type, filterp) \ - ((((filterp)->icmp6_filt[(type) >> 5]) &= ~(1 << ((type) & 31)))) + ((((filterp)->icmp6_filt[(type) >> 5]) &= ~(1U << ((type) & 31)))) #define ICMP6_FILTER_SETBLOCK(type, filterp) \ - ((((filterp)->icmp6_filt[(type) >> 5]) |= (1 << ((type) & 31)))) + ((((filterp)->icmp6_filt[(type) >> 5]) |= (1U << ((type) & 31)))) #define ICMP6_FILTER_SETPASSALL(filterp) \ memset (filterp, 0, sizeof (struct icmp6_filter)); diff --git a/lib/libc/include/generic-glibc/netinet/in.h b/lib/libc/include/generic-glibc/netinet/in.h @@ -87,8 +87,12 @@ enum #define IPPROTO_UDPLITE IPPROTO_UDPLITE IPPROTO_MPLS = 137, /* MPLS in IP. */ #define IPPROTO_MPLS IPPROTO_MPLS + IPPROTO_ETHERNET = 143, /* Ethernet-within-IPv6 Encapsulation. */ +#define IPPROTO_ETHERNET IPPROTO_ETHERNET IPPROTO_RAW = 255, /* Raw IP packets. */ #define IPPROTO_RAW IPPROTO_RAW + IPPROTO_MPTCP = 262, /* Multipath TCP connection. */ +#define IPPROTO_MPTCP IPPROTO_MPTCP IPPROTO_MAX }; diff --git a/lib/libc/include/generic-glibc/nss.h b/lib/libc/include/generic-glibc/nss.h @@ -19,10 +19,12 @@ and for implementors of new services. */ #ifndef _NSS_H -#define _NSS_H 1 +#define _NSS_H 1 #include <features.h> +#include <stddef.h> #include <stdint.h> +#include <sys/types.h> __BEGIN_DECLS @@ -56,7 +58,204 @@ struct gaih_addrtuple Attention: Using this function repeatedly will slowly eat up the whole memory since previous selection data cannot be freed. */ extern int __nss_configure_lookup (const char *__dbname, - const char *__string) __THROW; + const char *__string) __THROW; + +/* NSS-related types. */ +struct __netgrent; +struct aliasent; +struct ether_addr; +struct etherent; +struct group; +struct hostent; +struct netent; +struct passwd; +struct protoent; +struct rpcent; +struct servent; +struct sgrp; +struct spwd; +struct traced_file; + +/* Types of functions exported from NSS service modules. */ +typedef enum nss_status nss_endaliasent (void); +typedef enum nss_status nss_endetherent (void); +typedef enum nss_status nss_endgrent (void); +typedef enum nss_status nss_endhostent (void); +typedef enum nss_status nss_endnetent (void); +typedef enum nss_status nss_endnetgrent (struct __netgrent *); +typedef enum nss_status nss_endprotoent (void); +typedef enum nss_status nss_endpwent (void); +typedef enum nss_status nss_endrpcent (void); +typedef enum nss_status nss_endservent (void); +typedef enum nss_status nss_endsgent (void); +typedef enum nss_status nss_endspent (void); +typedef enum nss_status nss_getaliasbyname_r (const char *, struct aliasent *, + char *, size_t, int *); +typedef enum nss_status nss_getaliasent_r (struct aliasent *, + char *, size_t, int *); +typedef enum nss_status nss_getcanonname_r (const char *, char *, size_t, + char **, int *, int *); +typedef enum nss_status nss_getetherent_r (struct etherent *, + char *, size_t, int *); +typedef enum nss_status nss_getgrent_r (struct group *, char *, size_t, int *); +typedef enum nss_status nss_getgrgid_r (__gid_t, struct group *, + char *, size_t, int *); +typedef enum nss_status nss_getgrnam_r (const char *, struct group *, + char *, size_t, int *); +typedef enum nss_status nss_gethostbyaddr2_r (const void *, __socklen_t, int, + struct hostent *, char *, size_t, + int *, int *, int32_t *); +typedef enum nss_status nss_gethostbyaddr_r (const void *, __socklen_t, int, + struct hostent *, char *, size_t, + int *, int *); +typedef enum nss_status nss_gethostbyname2_r (const char *, int, + struct hostent *, char *, size_t, + int *, int *); +typedef enum nss_status nss_gethostbyname3_r (const char *, int, + struct hostent *, char *, size_t, + int *, int *, int32_t *, + char **); +typedef enum nss_status nss_gethostbyname4_r (const char *, + struct gaih_addrtuple **, + char *, size_t, + int *, int *, int32_t *); +typedef enum nss_status nss_gethostbyname_r (const char *, struct hostent *, + char *, size_t, int *, int *); +typedef enum nss_status nss_gethostent_r (struct hostent *, char *, size_t, + int *, int *); +typedef enum nss_status nss_gethostton_r (const char *, struct etherent *, + char *, size_t, int *); +typedef enum nss_status nss_getnetbyaddr_r (uint32_t, int, struct netent *, + char *, size_t, int *, int *); +typedef enum nss_status nss_getnetbyname_r (const char *, struct netent *, + char *, size_t, int *, int *); +typedef enum nss_status nss_getnetent_r (struct netent *, + char *, size_t, int *, int *); +typedef enum nss_status nss_getnetgrent_r (struct __netgrent *, + char *, size_t, int *); +typedef enum nss_status nss_getntohost_r (const struct ether_addr *, + struct etherent *, char *, size_t, + int *); +typedef enum nss_status nss_getprotobyname_r (const char *, struct protoent *, + char *, size_t, int *); +typedef enum nss_status nss_getprotobynumber_r (int, struct protoent *, + char *, size_t, int *); +typedef enum nss_status nss_getprotoent_r (struct protoent *, + char *, size_t, int *); +typedef enum nss_status nss_getpublickey (const char *, char *, int *); +typedef enum nss_status nss_getpwent_r (struct passwd *, + char *, size_t, int *); +typedef enum nss_status nss_getpwnam_r (const char *, struct passwd *, + char *, size_t, int *); +typedef enum nss_status nss_getpwuid_r (__uid_t, struct passwd *, + char *, size_t, int *); +typedef enum nss_status nss_getrpcbyname_r (const char *, struct rpcent *, + char *, size_t, int *); +typedef enum nss_status nss_getrpcbynumber_r (int, struct rpcent *, + char *, size_t, int *); +typedef enum nss_status nss_getrpcent_r (struct rpcent *, + char *, size_t, int *); +typedef enum nss_status nss_getsecretkey (const char *, char *, char *, int *); +typedef enum nss_status nss_getservbyname_r (const char *, const char *, + struct servent *, char *, size_t, + int *); +typedef enum nss_status nss_getservbyport_r (int, const char *, + struct servent *, char *, size_t, + int *); +typedef enum nss_status nss_getservent_r (struct servent *, char *, size_t, + int *); +typedef enum nss_status nss_getsgent_r (struct sgrp *, char *, size_t, int *); +typedef enum nss_status nss_getsgnam_r (const char *, struct sgrp *, + char *, size_t, int *); +typedef enum nss_status nss_getspent_r (struct spwd *, char *, size_t, int *); +typedef enum nss_status nss_getspnam_r (const char *, struct spwd *, + char *, size_t, int *); +typedef void nss_init (void (*) (size_t, struct traced_file *)); +typedef enum nss_status nss_initgroups_dyn (const char *, __gid_t, long int *, + long int *, __gid_t **, long int, + int *); +typedef enum nss_status nss_netname2user (char [], __uid_t *, __gid_t *, + int *, __gid_t *, int *); +typedef enum nss_status nss_setaliasent (void); +typedef enum nss_status nss_setetherent (int); +typedef enum nss_status nss_setgrent (int); +typedef enum nss_status nss_sethostent (int); +typedef enum nss_status nss_setnetent (int); +typedef enum nss_status nss_setnetgrent (const char *, struct __netgrent *); +typedef enum nss_status nss_setprotoent (int); +typedef enum nss_status nss_setpwent (int); +typedef enum nss_status nss_setrpcent (int); +typedef enum nss_status nss_setservent (int); +typedef enum nss_status nss_setsgent (int); +typedef enum nss_status nss_setspent (int); + +/* Declare all NSS functions for MODULE. */ +#define NSS_DECLARE_MODULE_FUNCTIONS(module) \ + extern nss_endaliasent _nss_##module##_endaliasent; \ + extern nss_endetherent _nss_##module##_endetherent; \ + extern nss_endgrent _nss_##module##_endgrent; \ + extern nss_endhostent _nss_##module##_endhostent; \ + extern nss_endnetent _nss_##module##_endnetent; \ + extern nss_endnetgrent _nss_##module##__endnetgrent; \ + extern nss_endprotoent _nss_##module##_endprotoent; \ + extern nss_endpwent _nss_##module##_endpwent; \ + extern nss_endrpcent _nss_##module##_endrpcent; \ + extern nss_endservent _nss_##module##_endservent; \ + extern nss_endsgent _nss_##module##_endsgent; \ + extern nss_endspent _nss_##module##_endspent; \ + extern nss_getaliasbyname_r _nss_##module##_getaliasbyname_r; \ + extern nss_getaliasent_r _nss_##module##_getaliasent_r; \ + extern nss_getcanonname_r _nss_##module##_getcanonname_r; \ + extern nss_getetherent_r _nss_##module##_getetherent_r; \ + extern nss_getgrent_r _nss_##module##_getgrent_r; \ + extern nss_getgrgid_r _nss_##module##_getgrgid_r; \ + extern nss_getgrnam_r _nss_##module##_getgrnam_r; \ + extern nss_gethostbyaddr2_r _nss_##module##_gethostbyaddr2_r; \ + extern nss_gethostbyaddr_r _nss_##module##_gethostbyaddr_r; \ + extern nss_gethostbyname2_r _nss_##module##_gethostbyname2_r; \ + extern nss_gethostbyname3_r _nss_##module##_gethostbyname3_r; \ + extern nss_gethostbyname4_r _nss_##module##_gethostbyname4_r; \ + extern nss_gethostbyname_r _nss_##module##_gethostbyname_r; \ + extern nss_gethostent_r _nss_##module##_gethostent_r; \ + extern nss_gethostton_r _nss_##module##_gethostton_r; \ + extern nss_getnetbyaddr_r _nss_##module##_getnetbyaddr_r; \ + extern nss_getnetbyname_r _nss_##module##_getnetbyname_r; \ + extern nss_getnetent_r _nss_##module##_getnetent_r; \ + extern nss_getnetgrent_r _nss_##module##_getnetgrent_r; \ + extern nss_getntohost_r _nss_##module##_getntohost_r; \ + extern nss_getprotobyname_r _nss_##module##_getprotobyname_r; \ + extern nss_getprotobynumber_r _nss_##module##_getprotobynumber_r; \ + extern nss_getprotoent_r _nss_##module##_getprotoent_r; \ + extern nss_getpublickey _nss_##module##_getpublickey; \ + extern nss_getpwent_r _nss_##module##_getpwent_r; \ + extern nss_getpwnam_r _nss_##module##_getpwnam_r; \ + extern nss_getpwuid_r _nss_##module##_getpwuid_r; \ + extern nss_getrpcbyname_r _nss_##module##_getrpcbyname_r; \ + extern nss_getrpcbynumber_r _nss_##module##_getrpcbynumber_r; \ + extern nss_getrpcent_r _nss_##module##_getrpcent_r; \ + extern nss_getsecretkey _nss_##module##_getsecretkey; \ + extern nss_getservbyname_r _nss_##module##_getservbyname_r; \ + extern nss_getservbyport_r _nss_##module##_getservbyport_r; \ + extern nss_getservent_r _nss_##module##_getservent_r; \ + extern nss_getsgent_r _nss_##module##_getsgent_r; \ + extern nss_getsgnam_r _nss_##module##_getsgnam_r; \ + extern nss_getspent_r _nss_##module##_getspent_r; \ + extern nss_getspnam_r _nss_##module##_getspnam_r; \ + extern nss_init _nss_##module##_init; \ + extern nss_initgroups_dyn _nss_##module##_initgroups_dyn; \ + extern nss_netname2user _nss_##module##_netname2user; \ + extern nss_setaliasent _nss_##module##_setaliasent; \ + extern nss_setetherent _nss_##module##_setetherent; \ + extern nss_setgrent _nss_##module##_setgrent; \ + extern nss_sethostent _nss_##module##_sethostent; \ + extern nss_setnetent _nss_##module##_setnetent; \ + extern nss_setnetgrent _nss_##module##_setnetgrent; \ + extern nss_setprotoent _nss_##module##_setprotoent; \ + extern nss_setpwent _nss_##module##_setpwent; \ + extern nss_setrpcent _nss_##module##_setrpcent; \ + extern nss_setservent _nss_##module##_setservent; \ + extern nss_setsgent _nss_##module##_setsgent; \ + extern nss_setspent _nss_##module##_setspent; \ __END_DECLS diff --git a/lib/libc/include/generic-glibc/printf.h b/lib/libc/include/generic-glibc/printf.h @@ -182,7 +182,8 @@ extern int printf_size_info (const struct printf_info *__restrict __info, size_t __n, int *__restrict __argtypes) __THROW; -#ifdef __LDBL_COMPAT +#include <bits/floatn.h> +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include <bits/printf-ldbl.h> #endif diff --git a/lib/libc/include/generic-glibc/pthread.h b/lib/libc/include/generic-glibc/pthread.h @@ -27,6 +27,7 @@ #include <bits/setjmp.h> #include <bits/wordsize.h> #include <bits/types/struct_timespec.h> +#include <bits/types/__sigset_t.h> /* Detach state. */ @@ -385,6 +386,20 @@ extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, extern int pthread_getattr_default_np (pthread_attr_t *__attr) __THROW __nonnull ((1)); +/* Store *SIGMASK as the signal mask for the new thread in *ATTR. */ +extern int pthread_attr_setsigmask_np (pthread_attr_t *__attr, + const __sigset_t *sigmask); + +/* Store the signal mask of *ATTR in *SIGMASK. If there is no signal + mask stored, return PTHREAD_ATTR_NOSIGMASK_NP. Return zero on + success. */ +extern int pthread_attr_getsigmask_np (const pthread_attr_t *__attr, + __sigset_t *sigmask); + +/* Special return value from pthread_attr_getsigmask_np if the signal + mask has not been set. */ +#define PTHREAD_ATTR_NO_SIGMASK_NP (-1) + /* Set the default attributes to be used by pthread_create in this process. */ extern int pthread_setattr_default_np (const pthread_attr_t *__attr) diff --git a/lib/libc/include/generic-glibc/signal.h b/lib/libc/include/generic-glibc/signal.h @@ -27,7 +27,7 @@ __BEGIN_DECLS #include <bits/types.h> -#include <bits/signum.h> +#include <bits/signum-generic.h> #include <bits/types/sig_atomic_t.h> @@ -148,7 +148,8 @@ extern void psiginfo (const siginfo_t *__pinfo, const char *__s); #ifdef __USE_XOPEN_EXTENDED # ifdef __GNUC__ -extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); +extern int sigpause (int __sig) __asm__ ("__xpg_sigpause") + __attribute_deprecated_msg__ ("Use the sigsuspend function instead"); # else extern int __sigpause (int __sig_or_mask, int __is_sig); /* Remove a signal from the signal mask and suspend the process. */ @@ -164,7 +165,9 @@ extern int __sigpause (int __sig_or_mask, int __is_sig); simply do not work in many situations. Use `sigprocmask' instead. */ /* Compute mask for signal SIG. */ -# define sigmask(sig) ((int)(1u << ((sig) - 1))) +# define sigmask(sig) \ + __glibc_macro_warning ("sigmask is deprecated") \ + ((int)(1u << ((sig) - 1))) /* Block signals in MASK, returning the old mask. */ extern int sigblock (int __mask) __THROW __attribute_deprecated__; @@ -281,12 +284,6 @@ extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val) #ifdef __USE_MISC -/* Names of the signals. This variable exists only for compatibility. - Use `strsignal' instead (see <string.h>). */ -extern const char *const _sys_siglist[_NSIG]; -extern const char *const sys_siglist[_NSIG]; - - /* Get machine-dependent `struct sigcontext' and signal subcodes. */ # include <bits/sigcontext.h> @@ -311,7 +308,8 @@ extern int sigreturn (struct sigcontext *__scp) __THROW; /* If INTERRUPT is nonzero, make signal SIG interrupt system calls (causing them to fail with EINTR); if INTERRUPT is zero, make system calls be restarted after signal SIG. */ -extern int siginterrupt (int __sig, int __interrupt) __THROW; +extern int siginterrupt (int __sig, int __interrupt) __THROW + __attribute_deprecated_msg__ ("Use sigaction with SA_RESTART instead"); # include <bits/sigstack.h> # include <bits/ss_flags.h> @@ -340,16 +338,21 @@ extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) /* Simplified interface for signal management. */ /* Add SIG to the calling process' signal mask. */ -extern int sighold (int __sig) __THROW; +extern int sighold (int __sig) __THROW + __attribute_deprecated_msg__ ("Use the sigprocmask function instead"); /* Remove SIG from the calling process' signal mask. */ -extern int sigrelse (int __sig) __THROW; +extern int sigrelse (int __sig) __THROW + __attribute_deprecated_msg__ ("Use the sigprocmask function instead"); /* Set the disposition of SIG to SIG_IGN. */ -extern int sigignore (int __sig) __THROW; +extern int sigignore (int __sig) __THROW + __attribute_deprecated_msg__ ("Use the signal function instead"); /* Set the disposition of SIG. */ -extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW; +extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW + __attribute_deprecated_msg__ + ("Use the signal and sigprocmask functions instead"); #endif #if defined __USE_POSIX199506 || defined __USE_UNIX98 diff --git a/lib/libc/include/generic-glibc/stdio.h b/lib/libc/include/generic-glibc/stdio.h @@ -400,9 +400,12 @@ extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __THROW; /* For historical reasons, the C99-compliant versions of the scanf - functions are at alternative names. When __LDBL_COMPAT is in - effect, this is handled in bits/stdio-ldbl.h. */ -#if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT + functions are at alternative names. When __LDBL_COMPAT or + __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI are in effect, this is handled in + bits/stdio-ldbl.h. */ +#include <bits/floatn.h> +#if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \ + && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 # ifdef __REDIRECT extern int __REDIRECT (fscanf, (FILE *__restrict __stream, const char *__restrict __format, ...), @@ -447,7 +450,8 @@ extern int vsscanf (const char *__restrict __s, /* Same redirection as above for the v*scanf family. */ # if !__GLIBC_USE (DEPRECATED_SCANF) -# if defined __REDIRECT && !defined __LDBL_COMPAT +# if defined __REDIRECT && !defined __LDBL_COMPAT \ + && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 extern int __REDIRECT (vfscanf, (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg), @@ -562,7 +566,7 @@ extern int putw (int __w, FILE *__stream); This function is a possible cancellation point and therefore not marked with __THROW. */ extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) - __wur; + __wur __attr_access ((__write_only__, 1, 2)); #if __GLIBC_USE (DEPRECATED_GETS) /* Get a newline-terminated string from stdin, removing the newline. @@ -585,7 +589,8 @@ extern char *gets (char *__s) __wur __attribute_deprecated__; or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern char *fgets_unlocked (char *__restrict __s, int __n, - FILE *__restrict __stream) __wur; + FILE *__restrict __stream) __wur + __attr_access ((__write_only__, 1, 2)); #endif @@ -774,12 +779,6 @@ extern int ferror_unlocked (FILE *__stream) __THROW __wur; marked with __THROW. */ extern void perror (const char *__s); -/* Provide the declarations for `sys_errlist' and `sys_nerr' if they - are available on this system. Even if available, these variables - should not be used directly. The `strerror' function provides - all the necessary functionality. */ -#include <bits/sys_errlist.h> - #ifdef __USE_POSIX /* Return the system file descriptor for STREAM. */ @@ -866,7 +865,9 @@ extern int __overflow (FILE *, int); #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function # include <bits/stdio2.h> #endif -#ifdef __LDBL_COMPAT + +#include <bits/floatn.h> +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include <bits/stdio-ldbl.h> #endif diff --git a/lib/libc/include/generic-glibc/stdlib.h b/lib/libc/include/generic-glibc/stdlib.h @@ -397,7 +397,7 @@ extern long int a64l (const char *__s) `initstate' and `setstate' functions are those from BSD Unices. The `rand' and `srand' functions are required by the ANSI standard. We provide both interfaces to the same random number generator. */ -/* Return a random long integer between 0 and RAND_MAX inclusive. */ +/* Return a random long integer between 0 and 2^31-1 inclusive. */ extern long int random (void) __THROW; /* Seed the random number generator with the given number. */ @@ -931,12 +931,13 @@ extern int wctomb (char *__s, wchar_t __wchar) __THROW; /* Convert a multibyte string to a wide char string. */ extern size_t mbstowcs (wchar_t *__restrict __pwcs, - const char *__restrict __s, size_t __n) __THROW; + const char *__restrict __s, size_t __n) __THROW + __attr_access ((__read_only__, 2)); /* Convert a wide char string to multibyte string. */ extern size_t wcstombs (char *__restrict __s, const wchar_t *__restrict __pwcs, size_t __n) - __THROW; - + __THROW + __attr_access ((__write_only__, 1, 3)) __attr_access ((__read_only__, 2)); #ifdef __USE_MISC /* Determine whether the string value of RESPONSE matches the affirmation @@ -990,7 +991,7 @@ extern char *ptsname (int __fd) __THROW __wur; terminal associated with the master FD is open on in BUF. Return 0 on success, otherwise an error number. */ extern int ptsname_r (int __fd, char *__buf, size_t __buflen) - __THROW __nonnull ((2)); + __THROW __nonnull ((2)) __attr_access ((__write_only__, 2, 3)); /* Open a master pseudo terminal and return its file descriptor. */ extern int getpt (void); @@ -1016,7 +1017,9 @@ extern int ttyslot (void) __THROW; #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function # include <bits/stdlib.h> #endif -#ifdef __LDBL_COMPAT + +#include <bits/floatn.h> +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include <bits/stdlib-ldbl.h> #endif diff --git a/lib/libc/include/generic-glibc/string.h b/lib/libc/include/generic-glibc/string.h @@ -53,7 +53,7 @@ extern void *memmove (void *__dest, const void *__src, size_t __n) #if defined __USE_MISC || defined __USE_XOPEN || __GLIBC_USE (ISOC2X) extern void *memccpy (void *__restrict __dest, const void *__restrict __src, int __c, size_t __n) - __THROW __nonnull ((1, 2)); + __THROW __nonnull ((1, 2)) __attr_access ((__write_only__, 1, 4)); #endif /* Misc || X/Open. */ @@ -108,12 +108,15 @@ extern void *rawmemchr (const void *__s, int __c) /* Search N bytes of S for the final occurrence of C. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" void *memrchr (void *__s, int __c, size_t __n) - __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1)); + __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1)) + __attr_access ((__read_only__, 1, 3)); extern "C++" const void *memrchr (const void *__s, int __c, size_t __n) - __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1)); + __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1)) + __attr_access ((__read_only__, 1, 3)); # else extern void *memrchr (const void *__s, int __c, size_t __n) - __THROW __attribute_pure__ __nonnull ((1)); + __THROW __attribute_pure__ __nonnull ((1)) + __attr_access ((__read_only__, 1, 3)); # endif #endif @@ -146,7 +149,7 @@ extern int strcoll (const char *__s1, const char *__s2) /* Put a transformation of SRC into no more than N bytes of DEST. */ extern size_t strxfrm (char *__restrict __dest, const char *__restrict __src, size_t __n) - __THROW __nonnull ((2)); + __THROW __nonnull ((2)) __attr_access ((__write_only__, 1, 3)); #ifdef __USE_XOPEN2K8 /* POSIX.1-2008 extended locale interface (see locale.h). */ @@ -158,7 +161,8 @@ extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l) /* Put a transformation of SRC into no more than N bytes of DEST, using sorting rules from L. */ extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, - locale_t __l) __THROW __nonnull ((2, 4)); + locale_t __l) __THROW __nonnull ((2, 4)) + __attr_access ((__write_only__, 1, 3)); #endif #if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 \ @@ -368,7 +372,9 @@ extern char *strcasestr (const char *__haystack, const char *__needle) HAYSTACK is HAYSTACKLEN bytes long. */ extern void *memmem (const void *__haystack, size_t __haystacklen, const void *__needle, size_t __needlelen) - __THROW __attribute_pure__ __nonnull ((1, 3)); + __THROW __attribute_pure__ __nonnull ((1, 3)) + __attr_access ((__read_only__, 1, 2)) + __attr_access ((__read_only__, 3, 4)); /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ @@ -409,17 +415,25 @@ extern char *strerror (int __errnum) __THROW; # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (strerror_r, (int __errnum, char *__buf, size_t __buflen), - __xpg_strerror_r) __nonnull ((2)); + __xpg_strerror_r) __nonnull ((2)) + __attr_access ((__write_only__, 2, 3)); # else extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen) - __THROW __nonnull ((2)); + __THROW __nonnull ((2)) __attr_access ((__write_only__, 2, 3)); # define strerror_r __xpg_strerror_r # endif # else /* If a temporary buffer is required, at most BUFLEN bytes of BUF will be used. */ extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) - __THROW __nonnull ((2)) __wur; + __THROW __nonnull ((2)) __wur __attr_access ((__write_only__, 2, 3)); +# endif + +# ifdef __USE_GNU +/* Return a string describing the meaning of tthe error in ERR. */ +extern const char *strerrordesc_np (int __err) __THROW; +/* Return a string with the error name in ERR. */ +extern const char *strerrorname_np (int __err) __THROW; # endif #endif @@ -433,7 +447,8 @@ extern char *strerror_l (int __errnum, locale_t __l) __THROW; /* Set N bytes of S to 0. The compiler will not delete a call to this function, even if S is dead after the call. */ -extern void explicit_bzero (void *__s, size_t __n) __THROW __nonnull ((1)); +extern void explicit_bzero (void *__s, size_t __n) __THROW __nonnull ((1)) + __attr_access ((__write_only__, 1, 2)); /* Return the next DELIM-delimited token from *STRINGP, terminating it with a '\0', and update *STRINGP to point past it. */ @@ -446,6 +461,14 @@ extern char *strsep (char **__restrict __stringp, /* Return a string describing the meaning of the signal number in SIG. */ extern char *strsignal (int __sig) __THROW; +# ifdef __USE_GNU +/* Return an abbreviation string for the signal number SIG. */ +extern const char *sigabbrev_np (int __sig) __THROW; +/* Return a string describing the meaning of the signal number in SIG, + the result is not translated. */ +extern const char *sigdescr_np (int __sig) __THROW; +# endif + /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); @@ -471,7 +494,8 @@ extern int strverscmp (const char *__s1, const char *__s2) extern char *strfry (char *__string) __THROW __nonnull ((1)); /* Frobnicate N bytes of S. */ -extern void *memfrob (void *__s, size_t __n) __THROW __nonnull ((1)); +extern void *memfrob (void *__s, size_t __n) __THROW __nonnull ((1)) + __attr_access ((__write_only__, 1, 2)); # ifndef basename /* Return the file name within directory of FILENAME. We don't diff --git a/lib/libc/include/generic-glibc/sys/cdefs.h b/lib/libc/include/generic-glibc/sys/cdefs.h @@ -452,7 +452,37 @@ #include <bits/wordsize.h> #include <bits/long-double.h> -#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH +#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +# ifdef __REDIRECT + +/* Alias name defined automatically. */ +# define __LDBL_REDIR(name, proto) ... unused__ldbl_redir +# define __LDBL_REDIR_DECL(name) \ + extern __typeof (name) name __asm (__ASMNAME ("__" #name "ieee128")); + +/* Alias name defined automatically, with leading underscores. */ +# define __LDBL_REDIR2_DECL(name) \ + extern __typeof (__##name) __##name \ + __asm (__ASMNAME ("__" #name "ieee128")); + +/* Alias name defined manually. */ +# define __LDBL_REDIR1(name, proto, alias) ... unused__ldbl_redir1 +# define __LDBL_REDIR1_DECL(name, alias) \ + extern __typeof (name) name __asm (__ASMNAME (#alias)); + +# define __LDBL_REDIR1_NTH(name, proto, alias) \ + __REDIRECT_NTH (name, proto, alias) +# define __REDIRECT_NTH_LDBL(name, proto, alias) \ + __LDBL_REDIR1_NTH (name, proto, __##alias##ieee128) + +/* Unused. */ +# define __REDIRECT_LDBL(name, proto, alias) ... unused__redirect_ldbl +# define __LDBL_REDIR_NTH(name, proto) ... unused__ldbl_redir_nth + +# else +_Static_assert (0, "IEEE 128-bits long double requires redirection on this platform"); +# endif +#elif defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH # define __LDBL_COMPAT 1 # ifdef __REDIRECT # define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias) @@ -461,6 +491,8 @@ # define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias) # define __LDBL_REDIR_NTH(name, proto) \ __LDBL_REDIR1_NTH (name, proto, __nldbl_##name) +# define __LDBL_REDIR2_DECL(name) \ + extern __typeof (__##name) __##name __asm (__ASMNAME ("__nldbl___" #name)); # define __LDBL_REDIR1_DECL(name, alias) \ extern __typeof (name) name __asm (__ASMNAME (#alias)); # define __LDBL_REDIR_DECL(name) \ @@ -471,11 +503,13 @@ __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias) # endif #endif -#if !defined __LDBL_COMPAT || !defined __REDIRECT +#if (!defined __LDBL_COMPAT && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0) \ + || !defined __REDIRECT # define __LDBL_REDIR1(name, proto, alias) name proto # define __LDBL_REDIR(name, proto) name proto # define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW # define __LDBL_REDIR_NTH(name, proto) name proto __THROW +# define __LDBL_REDIR2_DECL(name) # define __LDBL_REDIR_DECL(name) # ifdef __REDIRECT # define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias) @@ -514,4 +548,15 @@ # define __HAVE_GENERIC_SELECTION 0 #endif +#if __GNUC_PREREQ (10, 0) +/* Designates a 1-based positional argument ref-index of pointer type + that can be used to access size-index elements of the pointed-to + array according to access mode, or at least one element when + size-index is not provided: + access (access-mode, <ref-index> [, <size-index>]) */ +#define __attr_access(x) __attribute__ ((__access__ x)) +#else +# define __attr_access(x) +#endif + #endif /* sys/cdefs.h */ \ No newline at end of file diff --git a/lib/libc/include/generic-glibc/sys/random.h b/lib/libc/include/generic-glibc/sys/random.h @@ -25,6 +25,7 @@ /* Flags for use with getrandom. */ #define GRND_NONBLOCK 0x01 #define GRND_RANDOM 0x02 +#define GRND_INSECURE 0x04 __BEGIN_DECLS diff --git a/lib/libc/include/generic-glibc/sys/single_threaded.h b/lib/libc/include/generic-glibc/sys/single_threaded.h @@ -0,0 +1,33 @@ +/* Support for single-thread optimizations. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SINGLE_THREADED_H +#define _SYS_SINGLE_THREADED_H + +#include <features.h> + +__BEGIN_DECLS + +/* If this variable is non-zero, then the current thread is the only + thread in the process image. If it is zero, the process might be + multi-threaded. */ +extern char __libc_single_threaded; + +__END_DECLS + +#endif /* _SYS_SINGLE_THREADED_H */ +\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/sys/sysctl.h b/lib/libc/include/generic-glibc/sys/sysctl.h @@ -1,76 +0,0 @@ -/* Copyright (C) 1996-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SYSCTL_H -#define _SYS_SYSCTL_H 1 - -#warning "The <sys/sysctl.h> header is deprecated and will be removed." - -#include <features.h> -#define __need_size_t -#include <stddef.h> -/* Prevent more kernel headers than necessary to be included. */ -#ifndef _LINUX_KERNEL_H -# define _LINUX_KERNEL_H 1 -# define __undef_LINUX_KERNEL_H -#endif -#ifndef _LINUX_TYPES_H -# define _LINUX_TYPES_H 1 -# define __undef_LINUX_TYPES_H -#endif -#ifndef _LINUX_LIST_H -# define _LINUX_LIST_H 1 -# define __undef_LINUX_LIST_H -#endif -#ifndef __LINUX_COMPILER_H -# define __LINUX_COMPILER_H 1 -# define __user -# define __undef__LINUX_COMPILER_H -#endif - -#include <linux/sysctl.h> - -#ifdef __undef_LINUX_KERNEL_H -# undef _LINUX_KERNEL_H -# undef __undef_LINUX_KERNEL_H -#endif -#ifdef __undef_LINUX_TYPES_H -# undef _LINUX_TYPES_H -# undef __undef_LINUX_TYPES_H -#endif -#ifdef __undef_LINUX_LIST_H -# undef _LINUX_LIST_H -# undef __undef_LINUX_LIST_H -#endif -#ifdef __undef__LINUX_COMPILER_H -# undef __LINUX_COMPILER_H -# undef __user -# undef __undef__LINUX_COMPILER_H -#endif - -#include <bits/sysctl.h> - -__BEGIN_DECLS - -/* Read or write system parameters. */ -extern int sysctl (int *__name, int __nlen, void *__oldval, - size_t *__oldlenp, void *__newval, size_t __newlen) __THROW - __attribute_deprecated__; - -__END_DECLS - -#endif /* _SYS_SYSCTL_H */ -\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/sys/syslog.h b/lib/libc/include/generic-glibc/sys/syslog.h @@ -206,7 +206,9 @@ extern void vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap) #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function # include <bits/syslog.h> #endif -#ifdef __LDBL_COMPAT + +#include <bits/floatn.h> +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include <bits/syslog-ldbl.h> #endif diff --git a/lib/libc/include/generic-glibc/threads.h b/lib/libc/include/generic-glibc/threads.h @@ -24,7 +24,7 @@ __BEGIN_DECLS -#include <bits/pthreadtypes-arch.h> +#include <bits/thread-shared-types.h> #include <bits/types/struct_timespec.h> #ifndef __cplusplus @@ -32,10 +32,10 @@ __BEGIN_DECLS #endif #define TSS_DTOR_ITERATIONS 4 -typedef unsigned int tss_t; +typedef __tss_t tss_t; typedef void (*tss_dtor_t) (void*); -typedef unsigned long int thrd_t; +typedef __thrd_t thrd_t; typedef int (*thrd_start_t) (void*); /* Exit and error codes. */ @@ -56,11 +56,8 @@ enum mtx_timed = 2 }; -typedef struct -{ - int __data __ONCE_ALIGNMENT; -} once_flag; -#define ONCE_FLAG_INIT { 0 } +typedef __once_flag once_flag; +#define ONCE_FLAG_INIT __ONCE_FLAG_INIT typedef union { diff --git a/lib/libc/include/generic-glibc/unistd.h b/lib/libc/include/generic-glibc/unistd.h @@ -357,13 +357,15 @@ extern int close (int __fd); This function is a cancellation point and therefore not marked with __THROW. */ -extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur; +extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur + __attr_access ((__write_only__, 2, 3)); /* Write N bytes of BUF to FD. Return the number written, or -1. This function is a cancellation point and therefore not marked with __THROW. */ -extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur; +extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur + __attr_access ((__read_only__, 2, 3)); #if defined __USE_UNIX98 || defined __USE_XOPEN2K8 # ifndef __USE_FILE_OFFSET64 @@ -374,7 +376,8 @@ extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur; This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, - __off_t __offset) __wur; + __off_t __offset) __wur + __attr_access ((__write_only__, 2, 3)); /* Write N bytes of BUF to FD at the given position OFFSET without changing the file pointer. Return the number written, or -1. @@ -382,15 +385,19 @@ extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t pwrite (int __fd, const void *__buf, size_t __n, - __off_t __offset) __wur; + __off_t __offset) __wur + __attr_access ((__read_only__, 2, 3)); + # else # ifdef __REDIRECT extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes, __off64_t __offset), - pread64) __wur; + pread64) __wur + __attr_access ((__write_only__, 2, 3)); extern ssize_t __REDIRECT (pwrite, (int __fd, const void *__buf, size_t __nbytes, __off64_t __offset), - pwrite64) __wur; + pwrite64) __wur + __attr_access ((__read_only__, 2, 3)); # else # define pread pread64 # define pwrite pwrite64 @@ -402,11 +409,13 @@ extern ssize_t __REDIRECT (pwrite, (int __fd, const void *__buf, changing the file pointer. Return the number read, -1 for errors or 0 for EOF. */ extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, - __off64_t __offset) __wur; + __off64_t __offset) __wur + __attr_access ((__write_only__, 2, 3)); /* Write N bytes of BUF to FD at the given position OFFSET without changing the file pointer. Return the number written, or -1. */ extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n, - __off64_t __offset) __wur; + __off64_t __offset) __wur + __attr_access ((__read_only__, 2, 3)); # endif #endif @@ -508,7 +517,8 @@ extern int fchdir (int __fd) __THROW __wur; an array is allocated with `malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as necessary. */ -extern char *getcwd (char *__buf, size_t __size) __THROW __wur; +extern char *getcwd (char *__buf, size_t __size) __THROW __wur + __attr_access ((__write_only__, 1, 2)); #ifdef __USE_GNU /* Return a malloc'd string containing the current directory name. @@ -523,7 +533,8 @@ extern char *get_current_dir_name (void) __THROW; If successful, return BUF. If not, put an error message in BUF and return NULL. BUF should be at least PATH_MAX bytes long. */ extern char *getwd (char *__buf) - __THROW __nonnull ((1)) __attribute_deprecated__ __wur; + __THROW __nonnull ((1)) __attribute_deprecated__ __wur + __attr_access ((__write_only__, 1)); #endif @@ -620,7 +631,8 @@ extern long int sysconf (int __name) __THROW; #ifdef __USE_POSIX2 /* Get the value of the string-valued system variable NAME. */ -extern size_t confstr (int __name, char *__buf, size_t __len) __THROW; +extern size_t confstr (int __name, char *__buf, size_t __len) __THROW + __attr_access ((__write_only__, 2, 3)); #endif @@ -686,8 +698,8 @@ extern __gid_t getegid (void) __THROW; /* If SIZE is zero, return the number of supplementary groups the calling process is in. Otherwise, fill in the group IDs of its supplementary groups in LIST and return the number written. */ -extern int getgroups (int __size, __gid_t __list[]) __THROW __wur; - +extern int getgroups (int __size, __gid_t __list[]) __THROW __wur + __attr_access ((__write_only__, 2, 1)); #ifdef __USE_GNU /* Return nonzero iff the calling process is in group GID. */ extern int group_member (__gid_t __gid) __THROW; @@ -772,7 +784,7 @@ extern char *ttyname (int __fd) __THROW; /* Store at most BUFLEN characters of the pathname of the terminal FD is open on in BUF. Return 0 on success, otherwise an error number. */ extern int ttyname_r (int __fd, char *__buf, size_t __buflen) - __THROW __nonnull ((2)) __wur; + __THROW __nonnull ((2)) __wur __attr_access ((__write_only__, 2, 3)); /* Return 1 if FD is a valid descriptor associated with a terminal, zero if not. */ @@ -807,7 +819,8 @@ extern int symlink (const char *__from, const char *__to) Returns the number of characters read, or -1 for errors. */ extern ssize_t readlink (const char *__restrict __path, char *__restrict __buf, size_t __len) - __THROW __nonnull ((1, 2)) __wur; + __THROW __nonnull ((1, 2)) __wur __attr_access ((__write_only__, 2, 3)); + #endif /* Use POSIX.1-2001. */ #ifdef __USE_ATFILE @@ -818,7 +831,7 @@ extern int symlinkat (const char *__from, int __tofd, /* Like readlink but a relative PATH is interpreted relative to FD. */ extern ssize_t readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) - __THROW __nonnull ((2, 3)) __wur; + __THROW __nonnull ((2, 3)) __wur __attr_access ((__read_only__, 3, 4)); #endif /* Remove the link NAME. */ @@ -853,7 +866,8 @@ extern char *getlogin (void); This function is a possible cancellation point and therefore not marked with __THROW. */ -extern int getlogin_r (char *__name, size_t __name_len) __nonnull ((1)); +extern int getlogin_r (char *__name, size_t __name_len) __nonnull ((1)) + __attr_access ((__write_only__, 1, 2)); #endif #ifdef __USE_MISC @@ -874,7 +888,8 @@ extern int setlogin (const char *__name) __THROW __nonnull ((1)); /* Put the name of the current host in no more than LEN bytes of NAME. The result is null-terminated if LEN is large enough for the full name and the terminator. */ -extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1)); +extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1)) + __attr_access ((__write_only__, 1, 2)); #endif @@ -882,7 +897,7 @@ extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1)); /* Set the name of the current host to NAME, which is LEN bytes long. This call is restricted to the super-user. */ extern int sethostname (const char *__name, size_t __len) - __THROW __nonnull ((1)) __wur; + __THROW __nonnull ((1)) __wur __attr_access ((__read_only__, 1, 2)); /* Set the current machine's Internet number to ID. This call is restricted to the super-user. */ @@ -893,10 +908,9 @@ extern int sethostid (long int __id) __THROW __wur; Called just like `gethostname' and `sethostname'. The NIS domain name is usually the empty string when not using NIS. */ extern int getdomainname (char *__name, size_t __len) - __THROW __nonnull ((1)) __wur; + __THROW __nonnull ((1)) __wur __attr_access ((__write_only__, 1, 2)); extern int setdomainname (const char *__name, size_t __len) - __THROW __nonnull ((1)) __wur; - + __THROW __nonnull ((1)) __wur __attr_access ((__read_only__, 1, 2)); /* Revoke access permissions to all processes currently communicating with the control terminal, and then send a SIGHUP signal to the process @@ -1131,7 +1145,9 @@ extern char *crypt (const char *__key, const char *__salt) range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM is without partner. */ extern void swab (const void *__restrict __from, void *__restrict __to, - ssize_t __n) __THROW __nonnull ((1, 2)); + ssize_t __n) __THROW __nonnull ((1, 2)) + __attr_access ((__read_only__, 1, 3)) + __attr_access ((__write_only__, 2, 3)); #endif @@ -1158,7 +1174,8 @@ extern int pthread_atfork (void (*__prepare) (void), #ifdef __USE_MISC /* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on success or -1 on error. */ -int getentropy (void *__buffer, size_t __length) __wur; +int getentropy (void *__buffer, size_t __length) __wur + __attr_access ((__write_only__, 1, 2)); #endif /* Define some macros helping to catch buffer overflows. */ diff --git a/lib/libc/include/generic-glibc/wchar.h b/lib/libc/include/generic-glibc/wchar.h @@ -633,9 +633,11 @@ extern int swscanf (const wchar_t *__restrict __s, __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; /* For historical reasons, the C99-compliant versions of the scanf - functions are at alternative names. When __LDBL_COMPAT is in - effect, this is handled in bits/wchar-ldbl.h. */ -#if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT + functions are at alternative names. When __LDBL_COMPAT or + __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI are in effect, this is handled in + bits/wchar-ldbl.h. */ +#if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \ + && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 # ifdef __REDIRECT extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...), @@ -688,7 +690,8 @@ extern int vswscanf (const wchar_t *__restrict __s, /* Same redirection as above for the v*wscanf family. */ # if !__GLIBC_USE (DEPRECATED_SCANF) \ && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ - && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) + && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) \ + && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 # ifdef __REDIRECT extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s, const wchar_t *__restrict __format, @@ -849,7 +852,8 @@ extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, # include <bits/wchar2.h> #endif -#ifdef __LDBL_COMPAT +#include <bits/floatn.h> +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include <bits/wchar-ldbl.h> #endif diff --git a/lib/libc/include/i386-linux-gnu/bits/fenv.h b/lib/libc/include/i386-linux-gnu/bits/fenv.h @@ -113,58 +113,4 @@ femode_t; /* Default floating-point control modes. */ # define FE_DFL_MODE ((const femode_t *) -1L) -#endif - - -#ifdef __USE_EXTERN_INLINES -__BEGIN_DECLS - -/* Optimized versions. */ -#ifndef _LIBC -extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), feraiseexcept); -#endif -__extern_always_inline void -__NTH (__feraiseexcept_invalid_divbyzero (int __excepts)) -{ - if ((FE_INVALID & __excepts) != 0) - { - /* One example of an invalid operation is 0.0 / 0.0. */ - float __f = 0.0; - -# ifdef __SSE_MATH__ - __asm__ __volatile__ ("divss %0, %0 " : : "x" (__f)); -# else - __asm__ __volatile__ ("fdiv %%st, %%st(0); fwait" - : "=t" (__f) : "0" (__f)); -# endif - (void) &__f; - } - if ((FE_DIVBYZERO & __excepts) != 0) - { - float __f = 1.0; - float __g = 0.0; - -# ifdef __SSE_MATH__ - __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g)); -# else - __asm__ __volatile__ ("fdivp %%st, %%st(1); fwait" - : "=t" (__f) : "0" (__f), "u" (__g) : "st(1)"); -# endif - (void) &__f; - } -} -__extern_inline int -__NTH (feraiseexcept (int __excepts)) -{ - if (__builtin_constant_p (__excepts) - && (__excepts & ~(FE_INVALID | FE_DIVBYZERO)) == 0) - { - __feraiseexcept_invalid_divbyzero (__excepts); - return 0; - } - - return __feraiseexcept_renamed (__excepts); -} - -__END_DECLS #endif \ No newline at end of file diff --git a/lib/libc/include/i386-linux-gnu/bits/long-double.h b/lib/libc/include/i386-linux-gnu/bits/long-double.h @@ -18,4 +18,4 @@ /* long double is distinct from double, so there is nothing to define here. */ -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 +\ No newline at end of file diff --git a/lib/libc/include/i386-linux-gnu/bits/select.h b/lib/libc/include/i386-linux-gnu/bits/select.h @@ -1,63 +0,0 @@ -/* Copyright (C) 1997-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SELECT_H -# error "Never use <bits/select.h> directly; include <sys/select.h> instead." -#endif - -#include <bits/wordsize.h> - - -#if defined __GNUC__ && __GNUC__ >= 2 - -# if __WORDSIZE == 64 -# define __FD_ZERO_STOS "stosq" -# else -# define __FD_ZERO_STOS "stosl" -# endif - -# define __FD_ZERO(fdsp) \ - do { \ - int __d0, __d1; \ - __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS \ - : "=c" (__d0), "=D" (__d1) \ - : "a" (0), "0" (sizeof (fd_set) \ - / sizeof (__fd_mask)), \ - "1" (&__FDS_BITS (fdsp)[0]) \ - : "memory"); \ - } while (0) - -#else /* ! GNU CC */ - -/* We don't use `memset' because this would require a prototype and - the array isn't too big. */ -# define __FD_ZERO(set) \ - do { \ - unsigned int __i; \ - fd_set *__arr = (set); \ - for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ - __FDS_BITS (__arr)[__i] = 0; \ - } while (0) - -#endif /* GNU CC */ - -#define __FD_SET(d, set) \ - ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d))) -#define __FD_CLR(d, set) \ - ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d))) -#define __FD_ISSET(d, set) \ - ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0) -\ No newline at end of file diff --git a/lib/libc/include/i386-linux-gnu/bits/sem-pad.h b/lib/libc/include/i386-linux-gnu/bits/sem-pad.h @@ -1,24 +0,0 @@ -/* Define where padding goes in struct semid_ds. x86 version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SEM_H -# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." -#endif - -#define __SEM_PAD_AFTER_TIME 1 -#define __SEM_PAD_BEFORE_TIME 0 -\ No newline at end of file diff --git a/lib/libc/include/i386-linux-gnu/bits/semaphore.h b/lib/libc/include/i386-linux-gnu/bits/semaphore.h @@ -1,40 +0,0 @@ -/* Copyright (C) 2002-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SEMAPHORE_H -# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." -#endif - -#include <bits/wordsize.h> - -#if __WORDSIZE == 64 -# define __SIZEOF_SEM_T 32 -#else -# define __SIZEOF_SEM_T 16 -#endif - - -/* Value returned if `sem_open' failed. */ -#define SEM_FAILED ((sem_t *) 0) - - -typedef union -{ - char __size[__SIZEOF_SEM_T]; - long int __align; -} sem_t; -\ No newline at end of file diff --git a/lib/libc/include/i386-linux-gnu/bits/sysctl.h b/lib/libc/include/i386-linux-gnu/bits/sysctl.h @@ -1,20 +0,0 @@ -/* Copyright (C) 2012-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#if defined __x86_64__ && defined __ILP32__ -# error "sysctl system call is unsupported in x32 kernel" -#endif -\ No newline at end of file diff --git a/lib/libc/include/i386-linux-gnu/bits/types/struct_semid_ds.h b/lib/libc/include/i386-linux-gnu/bits/types/struct_semid_ds.h @@ -0,0 +1,34 @@ +/* x86 implementation of the semaphore struct semid_ds. + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SEM_H +# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ + __time_t sem_otime; /* last semop() time */ + __syscall_ulong_t __sem_otime_high; + __time_t sem_ctime; /* last time changed by semctl() */ + __syscall_ulong_t __sem_ctime_high; + __syscall_ulong_t sem_nsems; /* number of semaphores in set */ + __syscall_ulong_t __glibc_reserved3; + __syscall_ulong_t __glibc_reserved4; +}; +\ No newline at end of file diff --git a/lib/libc/include/i386-linux-gnu/bits/typesizes.h b/lib/libc/include/i386-linux-gnu/bits/typesizes.h @@ -64,6 +64,7 @@ #define __TIME_T_TYPE __SYSCALL_SLONG_TYPE #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE +#define __SUSECONDS64_T_TYPE __SQUAD_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE @@ -87,10 +88,15 @@ /* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ # define __STATFS_MATCHES_STATFS64 1 + +/* And for getitimer, setitimer and rusage */ +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1 #else # define __RLIM_T_MATCHES_RLIM64_T 0 # define __STATFS_MATCHES_STATFS64 0 + +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0 #endif /* Number of descriptors that can fit in an `fd_set'. */ diff --git a/lib/libc/include/generic-glibc/bits/floatn.h b/lib/libc/include/mips-linux-gnu/bits/floatn.h diff --git a/lib/libc/include/mips-linux-gnu/bits/msq-pad.h b/lib/libc/include/mips-linux-gnu/bits/msq-pad.h @@ -1,31 +0,0 @@ -/* Define where padding goes in struct msqid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_MSG_H -# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/timesize.h> - -#ifdef __MIPSEL__ -# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32) -# define __MSQ_PAD_BEFORE_TIME 0 -#else -# define __MSQ_PAD_AFTER_TIME 0 -# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) -#endif -\ No newline at end of file diff --git a/lib/libc/include/mips-linux-gnu/bits/resource.h b/lib/libc/include/mips-linux-gnu/bits/resource.h @@ -98,7 +98,7 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - /* Maximum CPU time in µs that a process scheduled under a real-time + /* Maximum CPU time in microseconds that a process scheduled under a real-time scheduling policy may consume without making a blocking system call before being forcibly descheduled. */ __RLIMIT_RTTIME = 15, diff --git a/lib/libc/include/mips-linux-gnu/bits/sem-pad.h b/lib/libc/include/mips-linux-gnu/bits/sem-pad.h @@ -1,24 +0,0 @@ -/* Define where padding goes in struct semid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SEM_H -# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." -#endif - -#define __SEM_PAD_AFTER_TIME 0 -#define __SEM_PAD_BEFORE_TIME 0 -\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/semaphore.h b/lib/libc/include/mips-linux-gnu/bits/semaphore.h diff --git a/lib/libc/include/mips-linux-gnu/bits/shm-pad.h b/lib/libc/include/mips-linux-gnu/bits/shm-pad.h @@ -1,26 +0,0 @@ -/* Define where padding goes in struct shmid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SHM_H -# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." -#endif - -#define __SHM_PAD_AFTER_TIME 0 -#define __SHM_PAD_BEFORE_TIME 0 -#define __SHM_SEGSZ_AFTER_TIME 0 -#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 -\ No newline at end of file diff --git a/lib/libc/include/mips-linux-gnu/bits/signum-arch.h b/lib/libc/include/mips-linux-gnu/bits/signum-arch.h @@ -0,0 +1,65 @@ +/* Signal number definitions. Linux/MIPS version. + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include <bits/signum.h> directly; use <signal.h> instead." +#endif + +/* Adjustments and additions to the signal number constants for + Linux/MIPS. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGPWR 19 /* Power failure imminent. */ + +/* Historical signals specified by POSIX. */ +#define SIGBUS 10 /* Bus error. */ +#define SIGSYS 12 /* Bad system call. */ + +/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */ +#define SIGURG 21 /* Urgent data is available at a socket. */ +#define SIGSTOP 23 /* Stop, unblockable. */ +#define SIGTSTP 24 /* Keyboard stop. */ +#define SIGCONT 25 /* Continue. */ +#define SIGCHLD 18 /* Child terminated or stopped. */ +#define SIGTTIN 26 /* Background read from control terminal. */ +#define SIGTTOU 27 /* Background write to control terminal. */ +#define SIGPOLL 22 /* Pollable event occurred (System V). */ +#define SIGXCPU 30 /* CPU time limit exceeded. */ +#define SIGVTALRM 28 /* Virtual timer expired. */ +#define SIGPROF 29 /* Profiling timer expired. */ +#define SIGXFSZ 31 /* File size limit exceeded. */ +#define SIGUSR1 16 /* User-defined signal 1. */ +#define SIGUSR2 17 /* User-defined signal 2. */ + +/* Nonstandard signals found in all modern POSIX systems + (including both BSD and Linux). */ +#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ + +/* Archaic names for compatibility. */ +#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ +#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */ +#define SIGCLD SIGCHLD /* Old System V name */ + +/* By default no real-time signals are supported. */ +#define __SIGRTMIN 32 +#define __SIGRTMAX 127 + +#endif /* <signal.h> included. */ +\ No newline at end of file diff --git a/lib/libc/include/mips-linux-gnu/bits/signum.h b/lib/libc/include/mips-linux-gnu/bits/signum.h @@ -1,68 +0,0 @@ -/* Signal number definitions. Linux/MIPS version. - Copyright (C) 1995-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include <bits/signum.h> directly; use <signal.h> instead." -#endif - -#include <bits/signum-generic.h> - -/* Adjustments and additions to the signal number constants for - Linux/MIPS. */ - -#define SIGEMT 7 /* Emulator trap. */ -#define SIGPWR 19 /* Power failure imminent. */ - -#undef SIGUSR1 -#define SIGUSR1 16 -#undef SIGUSR2 -#define SIGUSR2 17 -#undef SIGCHLD -#define SIGCHLD 18 -#undef SIGWINCH -#define SIGWINCH 20 -#undef SIGURG -#define SIGURG 21 -#undef SIGPOLL -#define SIGPOLL 22 -#undef SIGSTOP -#define SIGSTOP 23 -#undef SIGTSTP -#define SIGTSTP 24 -#undef SIGCONT -#define SIGCONT 25 -#undef SIGTTIN -#define SIGTTIN 26 -#undef SIGTTOU -#define SIGTTOU 27 -#undef SIGVTALRM -#define SIGVTALRM 28 -#undef SIGPROF -#define SIGPROF 29 -#undef SIGXCPU -#define SIGXCPU 30 -#undef SIGXFSZ -#define SIGXFSZ 31 - -#undef __SIGRTMAX -#define __SIGRTMAX 127 - -#endif /* <signal.h> included. */ -\ No newline at end of file diff --git a/lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h b/lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h @@ -0,0 +1,56 @@ +/* Linux/MIPS implementation of the SysV message struct msqid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_MSG_H +# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." +#endif + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ +#if __TIMESIZE == 32 +# ifdef __MIPSEL__ + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_stime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_ctime; /* time of last change */ + unsigned long int __msg_ctime_high; +# else + unsigned long int __msg_stime_high; + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_ctime_high; + __time_t msg_ctime; /* time of last change */ +# endif +#else + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgsnd command */ + __time_t msg_ctime; /* time of last change */ +#endif + __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ + __pid_t msg_lspid; /* pid of last msgsnd() */ + __pid_t msg_lrpid; /* pid of last msgrcv() */ + __syscall_ulong_t __glibc_reserved4; + __syscall_ulong_t __glibc_reserved5; +}; +\ No newline at end of file diff --git a/lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h b/lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h @@ -0,0 +1,32 @@ +/* MIPS implementation of the semaphore struct semid_ds + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SEM_H +# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ + __time_t sem_otime; /* last semop() time */ + __time_t sem_ctime; /* last time changed by semctl() */ + __syscall_ulong_t sem_nsems; /* number of semaphores in set */ + __syscall_ulong_t __sem_otime_high; + __syscall_ulong_t __sem_ctime_high; +}; +\ No newline at end of file diff --git a/lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h b/lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h @@ -0,0 +1,49 @@ +/* Linux/MIPS implementation of the shared memory struct shmid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SHM_H +# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead." +#endif + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ + size_t shm_segsz; /* size of segment in bytes */ +#if __TIMESIZE == 32 + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#else + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#endif + __pid_t shm_cpid; /* pid of creator */ + __pid_t shm_lpid; /* pid of last shmop */ + shmatt_t shm_nattch; /* number of current attaches */ +#if __TIMESIZE == 32 + unsigned short int __shm_atime_high; + unsigned short int __shm_dtime_high; + unsigned short int __shm_ctime_high; + unsigned short int __glibc_reserved4; +#else + __syscall_ulong_t __glibc_reserved5; + __syscall_ulong_t __glibc_reserved6; +#endif + }; +\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/floatn.h b/lib/libc/include/mips64-linux-gnuabi64/bits/floatn.h diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/msq-pad.h b/lib/libc/include/mips64-linux-gnuabi64/bits/msq-pad.h @@ -1,31 +0,0 @@ -/* Define where padding goes in struct msqid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_MSG_H -# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/timesize.h> - -#ifdef __MIPSEL__ -# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32) -# define __MSQ_PAD_BEFORE_TIME 0 -#else -# define __MSQ_PAD_AFTER_TIME 0 -# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) -#endif -\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/resource.h b/lib/libc/include/mips64-linux-gnuabi64/bits/resource.h @@ -98,7 +98,7 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - /* Maximum CPU time in µs that a process scheduled under a real-time + /* Maximum CPU time in microseconds that a process scheduled under a real-time scheduling policy may consume without making a blocking system call before being forcibly descheduled. */ __RLIMIT_RTTIME = 15, diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/sem-pad.h b/lib/libc/include/mips64-linux-gnuabi64/bits/sem-pad.h @@ -1,24 +0,0 @@ -/* Define where padding goes in struct semid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SEM_H -# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." -#endif - -#define __SEM_PAD_AFTER_TIME 0 -#define __SEM_PAD_BEFORE_TIME 0 -\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/semaphore.h b/lib/libc/include/mips64-linux-gnuabi64/bits/semaphore.h diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/shm-pad.h b/lib/libc/include/mips64-linux-gnuabi64/bits/shm-pad.h @@ -1,26 +0,0 @@ -/* Define where padding goes in struct shmid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SHM_H -# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." -#endif - -#define __SHM_PAD_AFTER_TIME 0 -#define __SHM_PAD_BEFORE_TIME 0 -#define __SHM_SEGSZ_AFTER_TIME 0 -#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 -\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/signum-arch.h b/lib/libc/include/mips64-linux-gnuabi64/bits/signum-arch.h @@ -0,0 +1,65 @@ +/* Signal number definitions. Linux/MIPS version. + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include <bits/signum.h> directly; use <signal.h> instead." +#endif + +/* Adjustments and additions to the signal number constants for + Linux/MIPS. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGPWR 19 /* Power failure imminent. */ + +/* Historical signals specified by POSIX. */ +#define SIGBUS 10 /* Bus error. */ +#define SIGSYS 12 /* Bad system call. */ + +/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */ +#define SIGURG 21 /* Urgent data is available at a socket. */ +#define SIGSTOP 23 /* Stop, unblockable. */ +#define SIGTSTP 24 /* Keyboard stop. */ +#define SIGCONT 25 /* Continue. */ +#define SIGCHLD 18 /* Child terminated or stopped. */ +#define SIGTTIN 26 /* Background read from control terminal. */ +#define SIGTTOU 27 /* Background write to control terminal. */ +#define SIGPOLL 22 /* Pollable event occurred (System V). */ +#define SIGXCPU 30 /* CPU time limit exceeded. */ +#define SIGVTALRM 28 /* Virtual timer expired. */ +#define SIGPROF 29 /* Profiling timer expired. */ +#define SIGXFSZ 31 /* File size limit exceeded. */ +#define SIGUSR1 16 /* User-defined signal 1. */ +#define SIGUSR2 17 /* User-defined signal 2. */ + +/* Nonstandard signals found in all modern POSIX systems + (including both BSD and Linux). */ +#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ + +/* Archaic names for compatibility. */ +#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ +#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */ +#define SIGCLD SIGCHLD /* Old System V name */ + +/* By default no real-time signals are supported. */ +#define __SIGRTMIN 32 +#define __SIGRTMAX 127 + +#endif /* <signal.h> included. */ +\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/signum.h b/lib/libc/include/mips64-linux-gnuabi64/bits/signum.h @@ -1,68 +0,0 @@ -/* Signal number definitions. Linux/MIPS version. - Copyright (C) 1995-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include <bits/signum.h> directly; use <signal.h> instead." -#endif - -#include <bits/signum-generic.h> - -/* Adjustments and additions to the signal number constants for - Linux/MIPS. */ - -#define SIGEMT 7 /* Emulator trap. */ -#define SIGPWR 19 /* Power failure imminent. */ - -#undef SIGUSR1 -#define SIGUSR1 16 -#undef SIGUSR2 -#define SIGUSR2 17 -#undef SIGCHLD -#define SIGCHLD 18 -#undef SIGWINCH -#define SIGWINCH 20 -#undef SIGURG -#define SIGURG 21 -#undef SIGPOLL -#define SIGPOLL 22 -#undef SIGSTOP -#define SIGSTOP 23 -#undef SIGTSTP -#define SIGTSTP 24 -#undef SIGCONT -#define SIGCONT 25 -#undef SIGTTIN -#define SIGTTIN 26 -#undef SIGTTOU -#define SIGTTOU 27 -#undef SIGVTALRM -#define SIGVTALRM 28 -#undef SIGPROF -#define SIGPROF 29 -#undef SIGXCPU -#define SIGXCPU 30 -#undef SIGXFSZ -#define SIGXFSZ 31 - -#undef __SIGRTMAX -#define __SIGRTMAX 127 - -#endif /* <signal.h> included. */ -\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_msqid_ds.h b/lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_msqid_ds.h @@ -0,0 +1,56 @@ +/* Linux/MIPS implementation of the SysV message struct msqid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_MSG_H +# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." +#endif + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ +#if __TIMESIZE == 32 +# ifdef __MIPSEL__ + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_stime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_ctime; /* time of last change */ + unsigned long int __msg_ctime_high; +# else + unsigned long int __msg_stime_high; + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_ctime_high; + __time_t msg_ctime; /* time of last change */ +# endif +#else + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgsnd command */ + __time_t msg_ctime; /* time of last change */ +#endif + __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ + __pid_t msg_lspid; /* pid of last msgsnd() */ + __pid_t msg_lrpid; /* pid of last msgrcv() */ + __syscall_ulong_t __glibc_reserved4; + __syscall_ulong_t __glibc_reserved5; +}; +\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_semid_ds.h b/lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_semid_ds.h @@ -0,0 +1,32 @@ +/* MIPS implementation of the semaphore struct semid_ds + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SEM_H +# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ + __time_t sem_otime; /* last semop() time */ + __time_t sem_ctime; /* last time changed by semctl() */ + __syscall_ulong_t sem_nsems; /* number of semaphores in set */ + __syscall_ulong_t __sem_otime_high; + __syscall_ulong_t __sem_ctime_high; +}; +\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_shmid_ds.h b/lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_shmid_ds.h @@ -0,0 +1,49 @@ +/* Linux/MIPS implementation of the shared memory struct shmid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SHM_H +# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead." +#endif + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ + size_t shm_segsz; /* size of segment in bytes */ +#if __TIMESIZE == 32 + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#else + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#endif + __pid_t shm_cpid; /* pid of creator */ + __pid_t shm_lpid; /* pid of last shmop */ + shmatt_t shm_nattch; /* number of current attaches */ +#if __TIMESIZE == 32 + unsigned short int __shm_atime_high; + unsigned short int __shm_dtime_high; + unsigned short int __shm_ctime_high; + unsigned short int __glibc_reserved4; +#else + __syscall_ulong_t __glibc_reserved5; + __syscall_ulong_t __glibc_reserved6; +#endif + }; +\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/floatn.h b/lib/libc/include/mips64-linux-gnuabin32/bits/floatn.h diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/msq-pad.h b/lib/libc/include/mips64-linux-gnuabin32/bits/msq-pad.h @@ -1,31 +0,0 @@ -/* Define where padding goes in struct msqid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_MSG_H -# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/timesize.h> - -#ifdef __MIPSEL__ -# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32) -# define __MSQ_PAD_BEFORE_TIME 0 -#else -# define __MSQ_PAD_AFTER_TIME 0 -# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) -#endif -\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/resource.h b/lib/libc/include/mips64-linux-gnuabin32/bits/resource.h @@ -98,7 +98,7 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - /* Maximum CPU time in µs that a process scheduled under a real-time + /* Maximum CPU time in microseconds that a process scheduled under a real-time scheduling policy may consume without making a blocking system call before being forcibly descheduled. */ __RLIMIT_RTTIME = 15, diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/sem-pad.h b/lib/libc/include/mips64-linux-gnuabin32/bits/sem-pad.h @@ -1,24 +0,0 @@ -/* Define where padding goes in struct semid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SEM_H -# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." -#endif - -#define __SEM_PAD_AFTER_TIME 0 -#define __SEM_PAD_BEFORE_TIME 0 -\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/semaphore.h b/lib/libc/include/mips64-linux-gnuabin32/bits/semaphore.h diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/shm-pad.h b/lib/libc/include/mips64-linux-gnuabin32/bits/shm-pad.h @@ -1,26 +0,0 @@ -/* Define where padding goes in struct shmid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SHM_H -# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." -#endif - -#define __SHM_PAD_AFTER_TIME 0 -#define __SHM_PAD_BEFORE_TIME 0 -#define __SHM_SEGSZ_AFTER_TIME 0 -#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 -\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/signum-arch.h b/lib/libc/include/mips64-linux-gnuabin32/bits/signum-arch.h @@ -0,0 +1,65 @@ +/* Signal number definitions. Linux/MIPS version. + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include <bits/signum.h> directly; use <signal.h> instead." +#endif + +/* Adjustments and additions to the signal number constants for + Linux/MIPS. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGPWR 19 /* Power failure imminent. */ + +/* Historical signals specified by POSIX. */ +#define SIGBUS 10 /* Bus error. */ +#define SIGSYS 12 /* Bad system call. */ + +/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */ +#define SIGURG 21 /* Urgent data is available at a socket. */ +#define SIGSTOP 23 /* Stop, unblockable. */ +#define SIGTSTP 24 /* Keyboard stop. */ +#define SIGCONT 25 /* Continue. */ +#define SIGCHLD 18 /* Child terminated or stopped. */ +#define SIGTTIN 26 /* Background read from control terminal. */ +#define SIGTTOU 27 /* Background write to control terminal. */ +#define SIGPOLL 22 /* Pollable event occurred (System V). */ +#define SIGXCPU 30 /* CPU time limit exceeded. */ +#define SIGVTALRM 28 /* Virtual timer expired. */ +#define SIGPROF 29 /* Profiling timer expired. */ +#define SIGXFSZ 31 /* File size limit exceeded. */ +#define SIGUSR1 16 /* User-defined signal 1. */ +#define SIGUSR2 17 /* User-defined signal 2. */ + +/* Nonstandard signals found in all modern POSIX systems + (including both BSD and Linux). */ +#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ + +/* Archaic names for compatibility. */ +#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ +#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */ +#define SIGCLD SIGCHLD /* Old System V name */ + +/* By default no real-time signals are supported. */ +#define __SIGRTMIN 32 +#define __SIGRTMAX 127 + +#endif /* <signal.h> included. */ +\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/signum.h b/lib/libc/include/mips64-linux-gnuabin32/bits/signum.h @@ -1,68 +0,0 @@ -/* Signal number definitions. Linux/MIPS version. - Copyright (C) 1995-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include <bits/signum.h> directly; use <signal.h> instead." -#endif - -#include <bits/signum-generic.h> - -/* Adjustments and additions to the signal number constants for - Linux/MIPS. */ - -#define SIGEMT 7 /* Emulator trap. */ -#define SIGPWR 19 /* Power failure imminent. */ - -#undef SIGUSR1 -#define SIGUSR1 16 -#undef SIGUSR2 -#define SIGUSR2 17 -#undef SIGCHLD -#define SIGCHLD 18 -#undef SIGWINCH -#define SIGWINCH 20 -#undef SIGURG -#define SIGURG 21 -#undef SIGPOLL -#define SIGPOLL 22 -#undef SIGSTOP -#define SIGSTOP 23 -#undef SIGTSTP -#define SIGTSTP 24 -#undef SIGCONT -#define SIGCONT 25 -#undef SIGTTIN -#define SIGTTIN 26 -#undef SIGTTOU -#define SIGTTOU 27 -#undef SIGVTALRM -#define SIGVTALRM 28 -#undef SIGPROF -#define SIGPROF 29 -#undef SIGXCPU -#define SIGXCPU 30 -#undef SIGXFSZ -#define SIGXFSZ 31 - -#undef __SIGRTMAX -#define __SIGRTMAX 127 - -#endif /* <signal.h> included. */ -\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_msqid_ds.h b/lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_msqid_ds.h @@ -0,0 +1,56 @@ +/* Linux/MIPS implementation of the SysV message struct msqid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_MSG_H +# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." +#endif + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ +#if __TIMESIZE == 32 +# ifdef __MIPSEL__ + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_stime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_ctime; /* time of last change */ + unsigned long int __msg_ctime_high; +# else + unsigned long int __msg_stime_high; + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_ctime_high; + __time_t msg_ctime; /* time of last change */ +# endif +#else + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgsnd command */ + __time_t msg_ctime; /* time of last change */ +#endif + __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ + __pid_t msg_lspid; /* pid of last msgsnd() */ + __pid_t msg_lrpid; /* pid of last msgrcv() */ + __syscall_ulong_t __glibc_reserved4; + __syscall_ulong_t __glibc_reserved5; +}; +\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_semid_ds.h b/lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_semid_ds.h @@ -0,0 +1,32 @@ +/* MIPS implementation of the semaphore struct semid_ds + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SEM_H +# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ + __time_t sem_otime; /* last semop() time */ + __time_t sem_ctime; /* last time changed by semctl() */ + __syscall_ulong_t sem_nsems; /* number of semaphores in set */ + __syscall_ulong_t __sem_otime_high; + __syscall_ulong_t __sem_ctime_high; +}; +\ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_shmid_ds.h b/lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_shmid_ds.h @@ -0,0 +1,49 @@ +/* Linux/MIPS implementation of the shared memory struct shmid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SHM_H +# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead." +#endif + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ + size_t shm_segsz; /* size of segment in bytes */ +#if __TIMESIZE == 32 + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#else + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#endif + __pid_t shm_cpid; /* pid of creator */ + __pid_t shm_lpid; /* pid of last shmop */ + shmatt_t shm_nattch; /* number of current attaches */ +#if __TIMESIZE == 32 + unsigned short int __shm_atime_high; + unsigned short int __shm_dtime_high; + unsigned short int __shm_ctime_high; + unsigned short int __glibc_reserved4; +#else + __syscall_ulong_t __glibc_reserved5; + __syscall_ulong_t __glibc_reserved6; +#endif + }; +\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/floatn.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/floatn.h diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h @@ -1,31 +0,0 @@ -/* Define where padding goes in struct msqid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_MSG_H -# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/timesize.h> - -#ifdef __MIPSEL__ -# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32) -# define __MSQ_PAD_BEFORE_TIME 0 -#else -# define __MSQ_PAD_AFTER_TIME 0 -# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) -#endif -\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/resource.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/resource.h @@ -98,7 +98,7 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - /* Maximum CPU time in µs that a process scheduled under a real-time + /* Maximum CPU time in microseconds that a process scheduled under a real-time scheduling policy may consume without making a blocking system call before being forcibly descheduled. */ __RLIMIT_RTTIME = 15, diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/sem-pad.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/sem-pad.h @@ -1,24 +0,0 @@ -/* Define where padding goes in struct semid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SEM_H -# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." -#endif - -#define __SEM_PAD_AFTER_TIME 0 -#define __SEM_PAD_BEFORE_TIME 0 -\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/semaphore.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/semaphore.h diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h @@ -1,26 +0,0 @@ -/* Define where padding goes in struct shmid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SHM_H -# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." -#endif - -#define __SHM_PAD_AFTER_TIME 0 -#define __SHM_PAD_BEFORE_TIME 0 -#define __SHM_SEGSZ_AFTER_TIME 0 -#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 -\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/signum-arch.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/signum-arch.h @@ -0,0 +1,65 @@ +/* Signal number definitions. Linux/MIPS version. + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include <bits/signum.h> directly; use <signal.h> instead." +#endif + +/* Adjustments and additions to the signal number constants for + Linux/MIPS. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGPWR 19 /* Power failure imminent. */ + +/* Historical signals specified by POSIX. */ +#define SIGBUS 10 /* Bus error. */ +#define SIGSYS 12 /* Bad system call. */ + +/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */ +#define SIGURG 21 /* Urgent data is available at a socket. */ +#define SIGSTOP 23 /* Stop, unblockable. */ +#define SIGTSTP 24 /* Keyboard stop. */ +#define SIGCONT 25 /* Continue. */ +#define SIGCHLD 18 /* Child terminated or stopped. */ +#define SIGTTIN 26 /* Background read from control terminal. */ +#define SIGTTOU 27 /* Background write to control terminal. */ +#define SIGPOLL 22 /* Pollable event occurred (System V). */ +#define SIGXCPU 30 /* CPU time limit exceeded. */ +#define SIGVTALRM 28 /* Virtual timer expired. */ +#define SIGPROF 29 /* Profiling timer expired. */ +#define SIGXFSZ 31 /* File size limit exceeded. */ +#define SIGUSR1 16 /* User-defined signal 1. */ +#define SIGUSR2 17 /* User-defined signal 2. */ + +/* Nonstandard signals found in all modern POSIX systems + (including both BSD and Linux). */ +#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ + +/* Archaic names for compatibility. */ +#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ +#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */ +#define SIGCLD SIGCHLD /* Old System V name */ + +/* By default no real-time signals are supported. */ +#define __SIGRTMIN 32 +#define __SIGRTMAX 127 + +#endif /* <signal.h> included. */ +\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/signum.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/signum.h @@ -1,68 +0,0 @@ -/* Signal number definitions. Linux/MIPS version. - Copyright (C) 1995-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include <bits/signum.h> directly; use <signal.h> instead." -#endif - -#include <bits/signum-generic.h> - -/* Adjustments and additions to the signal number constants for - Linux/MIPS. */ - -#define SIGEMT 7 /* Emulator trap. */ -#define SIGPWR 19 /* Power failure imminent. */ - -#undef SIGUSR1 -#define SIGUSR1 16 -#undef SIGUSR2 -#define SIGUSR2 17 -#undef SIGCHLD -#define SIGCHLD 18 -#undef SIGWINCH -#define SIGWINCH 20 -#undef SIGURG -#define SIGURG 21 -#undef SIGPOLL -#define SIGPOLL 22 -#undef SIGSTOP -#define SIGSTOP 23 -#undef SIGTSTP -#define SIGTSTP 24 -#undef SIGCONT -#define SIGCONT 25 -#undef SIGTTIN -#define SIGTTIN 26 -#undef SIGTTOU -#define SIGTTOU 27 -#undef SIGVTALRM -#define SIGVTALRM 28 -#undef SIGPROF -#define SIGPROF 29 -#undef SIGXCPU -#define SIGXCPU 30 -#undef SIGXFSZ -#define SIGXFSZ 31 - -#undef __SIGRTMAX -#define __SIGRTMAX 127 - -#endif /* <signal.h> included. */ -\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_msqid_ds.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_msqid_ds.h @@ -0,0 +1,56 @@ +/* Linux/MIPS implementation of the SysV message struct msqid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_MSG_H +# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." +#endif + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ +#if __TIMESIZE == 32 +# ifdef __MIPSEL__ + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_stime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_ctime; /* time of last change */ + unsigned long int __msg_ctime_high; +# else + unsigned long int __msg_stime_high; + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_ctime_high; + __time_t msg_ctime; /* time of last change */ +# endif +#else + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgsnd command */ + __time_t msg_ctime; /* time of last change */ +#endif + __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ + __pid_t msg_lspid; /* pid of last msgsnd() */ + __pid_t msg_lrpid; /* pid of last msgrcv() */ + __syscall_ulong_t __glibc_reserved4; + __syscall_ulong_t __glibc_reserved5; +}; +\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h @@ -0,0 +1,32 @@ +/* MIPS implementation of the semaphore struct semid_ds + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SEM_H +# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ + __time_t sem_otime; /* last semop() time */ + __time_t sem_ctime; /* last time changed by semctl() */ + __syscall_ulong_t sem_nsems; /* number of semaphores in set */ + __syscall_ulong_t __sem_otime_high; + __syscall_ulong_t __sem_ctime_high; +}; +\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_shmid_ds.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_shmid_ds.h @@ -0,0 +1,49 @@ +/* Linux/MIPS implementation of the shared memory struct shmid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SHM_H +# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead." +#endif + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ + size_t shm_segsz; /* size of segment in bytes */ +#if __TIMESIZE == 32 + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#else + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#endif + __pid_t shm_cpid; /* pid of creator */ + __pid_t shm_lpid; /* pid of last shmop */ + shmatt_t shm_nattch; /* number of current attaches */ +#if __TIMESIZE == 32 + unsigned short int __shm_atime_high; + unsigned short int __shm_dtime_high; + unsigned short int __shm_ctime_high; + unsigned short int __glibc_reserved4; +#else + __syscall_ulong_t __glibc_reserved5; + __syscall_ulong_t __glibc_reserved6; +#endif + }; +\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/floatn.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/floatn.h diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h @@ -1,31 +0,0 @@ -/* Define where padding goes in struct msqid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_MSG_H -# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/timesize.h> - -#ifdef __MIPSEL__ -# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32) -# define __MSQ_PAD_BEFORE_TIME 0 -#else -# define __MSQ_PAD_AFTER_TIME 0 -# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) -#endif -\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/resource.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/resource.h @@ -98,7 +98,7 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - /* Maximum CPU time in µs that a process scheduled under a real-time + /* Maximum CPU time in microseconds that a process scheduled under a real-time scheduling policy may consume without making a blocking system call before being forcibly descheduled. */ __RLIMIT_RTTIME = 15, diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/sem-pad.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/sem-pad.h @@ -1,24 +0,0 @@ -/* Define where padding goes in struct semid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SEM_H -# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." -#endif - -#define __SEM_PAD_AFTER_TIME 0 -#define __SEM_PAD_BEFORE_TIME 0 -\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/semaphore.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/semaphore.h diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/shm-pad.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/shm-pad.h @@ -1,26 +0,0 @@ -/* Define where padding goes in struct shmid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SHM_H -# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." -#endif - -#define __SHM_PAD_AFTER_TIME 0 -#define __SHM_PAD_BEFORE_TIME 0 -#define __SHM_SEGSZ_AFTER_TIME 0 -#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 -\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/signum-arch.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/signum-arch.h @@ -0,0 +1,65 @@ +/* Signal number definitions. Linux/MIPS version. + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include <bits/signum.h> directly; use <signal.h> instead." +#endif + +/* Adjustments and additions to the signal number constants for + Linux/MIPS. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGPWR 19 /* Power failure imminent. */ + +/* Historical signals specified by POSIX. */ +#define SIGBUS 10 /* Bus error. */ +#define SIGSYS 12 /* Bad system call. */ + +/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */ +#define SIGURG 21 /* Urgent data is available at a socket. */ +#define SIGSTOP 23 /* Stop, unblockable. */ +#define SIGTSTP 24 /* Keyboard stop. */ +#define SIGCONT 25 /* Continue. */ +#define SIGCHLD 18 /* Child terminated or stopped. */ +#define SIGTTIN 26 /* Background read from control terminal. */ +#define SIGTTOU 27 /* Background write to control terminal. */ +#define SIGPOLL 22 /* Pollable event occurred (System V). */ +#define SIGXCPU 30 /* CPU time limit exceeded. */ +#define SIGVTALRM 28 /* Virtual timer expired. */ +#define SIGPROF 29 /* Profiling timer expired. */ +#define SIGXFSZ 31 /* File size limit exceeded. */ +#define SIGUSR1 16 /* User-defined signal 1. */ +#define SIGUSR2 17 /* User-defined signal 2. */ + +/* Nonstandard signals found in all modern POSIX systems + (including both BSD and Linux). */ +#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ + +/* Archaic names for compatibility. */ +#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ +#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */ +#define SIGCLD SIGCHLD /* Old System V name */ + +/* By default no real-time signals are supported. */ +#define __SIGRTMIN 32 +#define __SIGRTMAX 127 + +#endif /* <signal.h> included. */ +\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/signum.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/signum.h @@ -1,68 +0,0 @@ -/* Signal number definitions. Linux/MIPS version. - Copyright (C) 1995-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include <bits/signum.h> directly; use <signal.h> instead." -#endif - -#include <bits/signum-generic.h> - -/* Adjustments and additions to the signal number constants for - Linux/MIPS. */ - -#define SIGEMT 7 /* Emulator trap. */ -#define SIGPWR 19 /* Power failure imminent. */ - -#undef SIGUSR1 -#define SIGUSR1 16 -#undef SIGUSR2 -#define SIGUSR2 17 -#undef SIGCHLD -#define SIGCHLD 18 -#undef SIGWINCH -#define SIGWINCH 20 -#undef SIGURG -#define SIGURG 21 -#undef SIGPOLL -#define SIGPOLL 22 -#undef SIGSTOP -#define SIGSTOP 23 -#undef SIGTSTP -#define SIGTSTP 24 -#undef SIGCONT -#define SIGCONT 25 -#undef SIGTTIN -#define SIGTTIN 26 -#undef SIGTTOU -#define SIGTTOU 27 -#undef SIGVTALRM -#define SIGVTALRM 28 -#undef SIGPROF -#define SIGPROF 29 -#undef SIGXCPU -#define SIGXCPU 30 -#undef SIGXFSZ -#define SIGXFSZ 31 - -#undef __SIGRTMAX -#define __SIGRTMAX 127 - -#endif /* <signal.h> included. */ -\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_msqid_ds.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_msqid_ds.h @@ -0,0 +1,56 @@ +/* Linux/MIPS implementation of the SysV message struct msqid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_MSG_H +# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." +#endif + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ +#if __TIMESIZE == 32 +# ifdef __MIPSEL__ + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_stime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_ctime; /* time of last change */ + unsigned long int __msg_ctime_high; +# else + unsigned long int __msg_stime_high; + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_ctime_high; + __time_t msg_ctime; /* time of last change */ +# endif +#else + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgsnd command */ + __time_t msg_ctime; /* time of last change */ +#endif + __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ + __pid_t msg_lspid; /* pid of last msgsnd() */ + __pid_t msg_lrpid; /* pid of last msgrcv() */ + __syscall_ulong_t __glibc_reserved4; + __syscall_ulong_t __glibc_reserved5; +}; +\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_semid_ds.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_semid_ds.h @@ -0,0 +1,32 @@ +/* MIPS implementation of the semaphore struct semid_ds + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SEM_H +# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ + __time_t sem_otime; /* last semop() time */ + __time_t sem_ctime; /* last time changed by semctl() */ + __syscall_ulong_t sem_nsems; /* number of semaphores in set */ + __syscall_ulong_t __sem_otime_high; + __syscall_ulong_t __sem_ctime_high; +}; +\ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_shmid_ds.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_shmid_ds.h @@ -0,0 +1,49 @@ +/* Linux/MIPS implementation of the shared memory struct shmid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SHM_H +# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead." +#endif + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ + size_t shm_segsz; /* size of segment in bytes */ +#if __TIMESIZE == 32 + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#else + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#endif + __pid_t shm_cpid; /* pid of creator */ + __pid_t shm_lpid; /* pid of last shmop */ + shmatt_t shm_nattch; /* number of current attaches */ +#if __TIMESIZE == 32 + unsigned short int __shm_atime_high; + unsigned short int __shm_dtime_high; + unsigned short int __shm_ctime_high; + unsigned short int __glibc_reserved4; +#else + __syscall_ulong_t __glibc_reserved5; + __syscall_ulong_t __glibc_reserved6; +#endif + }; +\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/floatn.h b/lib/libc/include/mipsel-linux-gnu/bits/floatn.h diff --git a/lib/libc/include/mipsel-linux-gnu/bits/msq-pad.h b/lib/libc/include/mipsel-linux-gnu/bits/msq-pad.h @@ -1,31 +0,0 @@ -/* Define where padding goes in struct msqid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_MSG_H -# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/timesize.h> - -#ifdef __MIPSEL__ -# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32) -# define __MSQ_PAD_BEFORE_TIME 0 -#else -# define __MSQ_PAD_AFTER_TIME 0 -# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) -#endif -\ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-gnu/bits/resource.h b/lib/libc/include/mipsel-linux-gnu/bits/resource.h @@ -98,7 +98,7 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - /* Maximum CPU time in µs that a process scheduled under a real-time + /* Maximum CPU time in microseconds that a process scheduled under a real-time scheduling policy may consume without making a blocking system call before being forcibly descheduled. */ __RLIMIT_RTTIME = 15, diff --git a/lib/libc/include/mipsel-linux-gnu/bits/sem-pad.h b/lib/libc/include/mipsel-linux-gnu/bits/sem-pad.h @@ -1,24 +0,0 @@ -/* Define where padding goes in struct semid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SEM_H -# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." -#endif - -#define __SEM_PAD_AFTER_TIME 0 -#define __SEM_PAD_BEFORE_TIME 0 -\ No newline at end of file diff --git a/lib/libc/include/generic-glibc/bits/semaphore.h b/lib/libc/include/mipsel-linux-gnu/bits/semaphore.h diff --git a/lib/libc/include/mipsel-linux-gnu/bits/shm-pad.h b/lib/libc/include/mipsel-linux-gnu/bits/shm-pad.h @@ -1,26 +0,0 @@ -/* Define where padding goes in struct shmid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SHM_H -# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." -#endif - -#define __SHM_PAD_AFTER_TIME 0 -#define __SHM_PAD_BEFORE_TIME 0 -#define __SHM_SEGSZ_AFTER_TIME 0 -#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 -\ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-gnu/bits/signum-arch.h b/lib/libc/include/mipsel-linux-gnu/bits/signum-arch.h @@ -0,0 +1,65 @@ +/* Signal number definitions. Linux/MIPS version. + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include <bits/signum.h> directly; use <signal.h> instead." +#endif + +/* Adjustments and additions to the signal number constants for + Linux/MIPS. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGPWR 19 /* Power failure imminent. */ + +/* Historical signals specified by POSIX. */ +#define SIGBUS 10 /* Bus error. */ +#define SIGSYS 12 /* Bad system call. */ + +/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */ +#define SIGURG 21 /* Urgent data is available at a socket. */ +#define SIGSTOP 23 /* Stop, unblockable. */ +#define SIGTSTP 24 /* Keyboard stop. */ +#define SIGCONT 25 /* Continue. */ +#define SIGCHLD 18 /* Child terminated or stopped. */ +#define SIGTTIN 26 /* Background read from control terminal. */ +#define SIGTTOU 27 /* Background write to control terminal. */ +#define SIGPOLL 22 /* Pollable event occurred (System V). */ +#define SIGXCPU 30 /* CPU time limit exceeded. */ +#define SIGVTALRM 28 /* Virtual timer expired. */ +#define SIGPROF 29 /* Profiling timer expired. */ +#define SIGXFSZ 31 /* File size limit exceeded. */ +#define SIGUSR1 16 /* User-defined signal 1. */ +#define SIGUSR2 17 /* User-defined signal 2. */ + +/* Nonstandard signals found in all modern POSIX systems + (including both BSD and Linux). */ +#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ + +/* Archaic names for compatibility. */ +#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ +#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */ +#define SIGCLD SIGCHLD /* Old System V name */ + +/* By default no real-time signals are supported. */ +#define __SIGRTMIN 32 +#define __SIGRTMAX 127 + +#endif /* <signal.h> included. */ +\ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-gnu/bits/signum.h b/lib/libc/include/mipsel-linux-gnu/bits/signum.h @@ -1,68 +0,0 @@ -/* Signal number definitions. Linux/MIPS version. - Copyright (C) 1995-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include <bits/signum.h> directly; use <signal.h> instead." -#endif - -#include <bits/signum-generic.h> - -/* Adjustments and additions to the signal number constants for - Linux/MIPS. */ - -#define SIGEMT 7 /* Emulator trap. */ -#define SIGPWR 19 /* Power failure imminent. */ - -#undef SIGUSR1 -#define SIGUSR1 16 -#undef SIGUSR2 -#define SIGUSR2 17 -#undef SIGCHLD -#define SIGCHLD 18 -#undef SIGWINCH -#define SIGWINCH 20 -#undef SIGURG -#define SIGURG 21 -#undef SIGPOLL -#define SIGPOLL 22 -#undef SIGSTOP -#define SIGSTOP 23 -#undef SIGTSTP -#define SIGTSTP 24 -#undef SIGCONT -#define SIGCONT 25 -#undef SIGTTIN -#define SIGTTIN 26 -#undef SIGTTOU -#define SIGTTOU 27 -#undef SIGVTALRM -#define SIGVTALRM 28 -#undef SIGPROF -#define SIGPROF 29 -#undef SIGXCPU -#define SIGXCPU 30 -#undef SIGXFSZ -#define SIGXFSZ 31 - -#undef __SIGRTMAX -#define __SIGRTMAX 127 - -#endif /* <signal.h> included. */ -\ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-gnu/bits/types/struct_msqid_ds.h b/lib/libc/include/mipsel-linux-gnu/bits/types/struct_msqid_ds.h @@ -0,0 +1,56 @@ +/* Linux/MIPS implementation of the SysV message struct msqid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_MSG_H +# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." +#endif + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ +#if __TIMESIZE == 32 +# ifdef __MIPSEL__ + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_stime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_ctime; /* time of last change */ + unsigned long int __msg_ctime_high; +# else + unsigned long int __msg_stime_high; + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_ctime_high; + __time_t msg_ctime; /* time of last change */ +# endif +#else + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgsnd command */ + __time_t msg_ctime; /* time of last change */ +#endif + __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ + __pid_t msg_lspid; /* pid of last msgsnd() */ + __pid_t msg_lrpid; /* pid of last msgrcv() */ + __syscall_ulong_t __glibc_reserved4; + __syscall_ulong_t __glibc_reserved5; +}; +\ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-gnu/bits/types/struct_semid_ds.h b/lib/libc/include/mipsel-linux-gnu/bits/types/struct_semid_ds.h @@ -0,0 +1,32 @@ +/* MIPS implementation of the semaphore struct semid_ds + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SEM_H +# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ + __time_t sem_otime; /* last semop() time */ + __time_t sem_ctime; /* last time changed by semctl() */ + __syscall_ulong_t sem_nsems; /* number of semaphores in set */ + __syscall_ulong_t __sem_otime_high; + __syscall_ulong_t __sem_ctime_high; +}; +\ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-gnu/bits/types/struct_shmid_ds.h b/lib/libc/include/mipsel-linux-gnu/bits/types/struct_shmid_ds.h @@ -0,0 +1,49 @@ +/* Linux/MIPS implementation of the shared memory struct shmid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SHM_H +# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead." +#endif + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ + size_t shm_segsz; /* size of segment in bytes */ +#if __TIMESIZE == 32 + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#else + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#endif + __pid_t shm_cpid; /* pid of creator */ + __pid_t shm_lpid; /* pid of last shmop */ + shmatt_t shm_nattch; /* number of current attaches */ +#if __TIMESIZE == 32 + unsigned short int __shm_atime_high; + unsigned short int __shm_dtime_high; + unsigned short int __shm_ctime_high; + unsigned short int __glibc_reserved4; +#else + __syscall_ulong_t __glibc_reserved5; + __syscall_ulong_t __glibc_reserved6; +#endif + }; +\ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-gnu/bits/fenvinline.h b/lib/libc/include/powerpc-linux-gnu/bits/fenvinline.h @@ -1,102 +0,0 @@ -/* Inline floating-point environment handling functions for powerpc. - Copyright (C) 1995-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__ - -/* Inline definitions for fegetround. */ -# define __fegetround_ISA300() \ - (__extension__ ({ \ - union { double __d; unsigned long long __ll; } __u; \ - __asm__ __volatile__ ( \ - ".machine push; .machine \"power9\"; mffsl %0; .machine pop" \ - : "=f" (__u.__d)); \ - __u.__ll & 0x0000000000000003LL; \ - })) - -# define __fegetround_ISA2() \ - (__extension__ ({ \ - int __fegetround_result; \ - __asm__ __volatile__ ("mcrfs 7,7 ; mfcr %0" \ - : "=r"(__fegetround_result) : : "cr7"); \ - __fegetround_result & 3; \ - })) - -# ifdef _ARCH_PWR9 -# define __fegetround() __fegetround_ISA300() -# elif defined __BUILTIN_CPU_SUPPORTS__ -# define __fegetround() \ - (__glibc_likely (__builtin_cpu_supports ("arch_3_00")) \ - ? __fegetround_ISA300() \ - : __fegetround_ISA2() \ - ) -# else -# define __fegetround() __fegetround_ISA2() -# endif - -# define fegetround() __fegetround () - -# ifndef __NO_MATH_INLINES -/* The weird 'i#*X' constraints on the following suppress a gcc - warning when __excepts is not a constant. Otherwise, they mean the - same as just plain 'i'. */ - -# if __GNUC_PREREQ(3, 4) - -/* Inline definition for feraiseexcept. */ -# define feraiseexcept(__excepts) \ - (__extension__ ({ \ - int __e = __excepts; \ - int __ret; \ - if (__builtin_constant_p (__e) \ - && (__e & (__e - 1)) == 0 \ - && __e != FE_INVALID) \ - { \ - if (__e != 0) \ - __asm__ __volatile__ ("mtfsb1 %0" \ - : : "i#*X" (__builtin_clz (__e))); \ - __ret = 0; \ - } \ - else \ - __ret = feraiseexcept (__e); \ - __ret; \ - })) - -/* Inline definition for feclearexcept. */ -# define feclearexcept(__excepts) \ - (__extension__ ({ \ - int __e = __excepts; \ - int __ret; \ - if (__builtin_constant_p (__e) \ - && (__e & (__e - 1)) == 0 \ - && __e != FE_INVALID) \ - { \ - if (__e != 0) \ - __asm__ __volatile__ ("mtfsb0 %0" \ - : : "i#*X" (__builtin_clz (__e))); \ - __ret = 0; \ - } \ - else \ - __ret = feclearexcept (__e); \ - __ret; \ - })) - -# endif /* __GNUC_PREREQ(3, 4). */ - -# endif /* !__NO_MATH_INLINES. */ - -#endif /* __GNUC__ && !_SOFT_FLOAT && !__NO_FPRS__ */ -\ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-gnu/bits/hwcap.h b/lib/libc/include/powerpc-linux-gnu/bits/hwcap.h @@ -73,4 +73,6 @@ #define PPC_FEATURE2_DARN 0x00200000 /* darn instruction. */ #define PPC_FEATURE2_SCV 0x00100000 /* scv syscall. */ #define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM without suspended - state. */ -\ No newline at end of file + state. */ +#define PPC_FEATURE2_ARCH_3_1 0x00040000 /* ISA 3.1. */ +#define PPC_FEATURE2_MMA 0x00020000 /* Matrix-Multiply Assist. */ +\ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h b/lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h @@ -20,7 +20,7 @@ # error "Never use <bits/iscanonical.h> directly; include <math.h> instead." #endif -#ifdef __NO_LONG_DOUBLE_MATH +#if defined (__NO_LONG_DOUBLE_MATH) || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # define iscanonical(x) ((void) (__typeof (x)) (x), 1) #else extern int __iscanonicall (long double __x) diff --git a/lib/libc/include/powerpc-linux-gnu/bits/long-double.h b/lib/libc/include/powerpc-linux-gnu/bits/long-double.h @@ -22,4 +22,4 @@ # define __NO_LONG_DOUBLE_MATH 1 # endif #endif -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 +\ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-gnu/bits/msq-pad.h b/lib/libc/include/powerpc-linux-gnu/bits/msq-pad.h @@ -1,26 +0,0 @@ -/* Define where padding goes in struct msqid_ds. PowerPC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_MSG_H -# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/timesize.h> - -#define __MSQ_PAD_AFTER_TIME 0 -#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) -\ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-gnu/bits/sem-pad.h b/lib/libc/include/powerpc-linux-gnu/bits/sem-pad.h @@ -1,26 +0,0 @@ -/* Define where padding goes in struct semid_ds. PowerPC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SEM_H -# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." -#endif - -#include <bits/timesize.h> - -#define __SEM_PAD_AFTER_TIME 0 -#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32) -\ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-gnu/bits/semaphore.h b/lib/libc/include/powerpc-linux-gnu/bits/semaphore.h @@ -1,40 +0,0 @@ -/* Machine-specific POSIX semaphore type layouts. PowerPC version. - Copyright (C) 2003-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SEMAPHORE_H -# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." -#endif - -#include <bits/wordsize.h> - -#if __WORDSIZE == 64 -# define __SIZEOF_SEM_T 32 -#else -# define __SIZEOF_SEM_T 16 -#endif - -/* Value returned if `sem_open' failed. */ -#define SEM_FAILED ((sem_t *) 0) - - -typedef union -{ - char __size[__SIZEOF_SEM_T]; - long int __align; -} sem_t; -\ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-gnu/bits/shm-pad.h b/lib/libc/include/powerpc-linux-gnu/bits/shm-pad.h @@ -1,28 +0,0 @@ -/* Define where padding goes in struct shmid_ds. PowerPC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SHM_H -# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." -#endif - -#include <bits/timesize.h> - -#define __SHM_PAD_AFTER_TIME 0 -#define __SHM_PAD_BEFORE_TIME (__TIMESIZE == 32) -#define __SHM_SEGSZ_AFTER_TIME 1 -#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ (__TIMESIZE == 32) -\ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-gnu/bits/types/struct_msqid_ds.h b/lib/libc/include/powerpc-linux-gnu/bits/types/struct_msqid_ds.h @@ -0,0 +1,47 @@ +/* Linux/PowerPC implementation of the SysV message struct msqid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_MSG_H +# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." +#endif + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ +#if __TIMESIZE == 32 + unsigned long int __msg_stime_high; + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_ctime_high; + __time_t msg_ctime; /* time of last change */ +#else + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgsnd command */ + __time_t msg_ctime; /* time of last change */ +#endif + __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ + __pid_t msg_lspid; /* pid of last msgsnd() */ + __pid_t msg_lrpid; /* pid of last msgrcv() */ + __syscall_ulong_t __glibc_reserved4; + __syscall_ulong_t __glibc_reserved5; +}; +\ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-gnu/bits/types/struct_semid_ds.h b/lib/libc/include/powerpc-linux-gnu/bits/types/struct_semid_ds.h @@ -0,0 +1,39 @@ +/* PowerPC implementation of the semaphore struct semid_ds. + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SEM_H +# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ +#if __TIMESIZE == 32 + __syscall_ulong_t __sem_otime_high; + __time_t sem_otime; /* last semop() time */ + __syscall_ulong_t __sem_ctime_high; + __time_t sem_ctime; /* last time changed by semctl() */ +#else + __time_t sem_otime; /* last semop() time */ + __time_t sem_ctime; /* last time changed by semctl() */ +#endif + __syscall_ulong_t sem_nsems; /* number of semaphores in set */ + __syscall_ulong_t __glibc_reserved3; + __syscall_ulong_t __glibc_reserved4; +}; +\ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-gnu/bits/types/struct_shmid_ds.h b/lib/libc/include/powerpc-linux-gnu/bits/types/struct_shmid_ds.h @@ -0,0 +1,46 @@ +/* Linux/PowerPC implementation of the shared memory struct shmid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SHM_H +# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead." +#endif + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ +#if __TIMESIZE == 32 + unsigned long int __shm_atime_high; + __time_t shm_atime; /* time of last shmat() */ + unsigned long int __shm_dtime_high; + __time_t shm_dtime; /* time of last shmdt() */ + unsigned long int __shm_ctime_high; + __time_t shm_ctime; /* time of last change by shmctl() */ + unsigned long int __glibc_reserved4; +#else + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#endif + size_t shm_segsz; /* size of segment in bytes */ + __pid_t shm_cpid; /* pid of creator */ + __pid_t shm_lpid; /* pid of last shmop */ + shmatt_t shm_nattch; /* number of current attaches */ + __syscall_ulong_t __glibc_reserved5; + __syscall_ulong_t __glibc_reserved6; + }; +\ No newline at end of file diff --git a/lib/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h b/lib/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h @@ -19,8 +19,6 @@ #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" -#define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" diff --git a/lib/libc/include/powerpc-linux-gnu/ieee754.h b/lib/libc/include/powerpc-linux-gnu/ieee754.h @@ -21,6 +21,7 @@ #include <features.h> #include <bits/endian.h> +#include <bits/floatn.h> __BEGIN_DECLS @@ -111,6 +112,65 @@ union ieee754_double #define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ +#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +/* long double is IEEE 128 bit */ +union ieee854_long_double + { + long double d; + + /* This is the IEEE 854 quad-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:16; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:16; + unsigned int exponent:15; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:15; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:15; + unsigned int quiet_nan:1; + unsigned int exponent:15; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ +#endif + + +#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 || __GNUC_PREREQ (7, 0) /* IBM extended format for long double. Each long double is made up of two IEEE doubles. The value of the @@ -121,12 +181,16 @@ union ieee754_double -0.0. No other requirements are made; so, for example, 1.0 may be represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a NaN is don't-care. */ - union ibm_extended_long_double { - long double ld; +# if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 && __GNUC_PREREQ (7, 0) + __ibm128 ld; +# else + long double ld; +# endif union ieee754_double d[2]; }; +#endif __END_DECLS diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/fenvinline.h b/lib/libc/include/powerpc64-linux-gnu/bits/fenvinline.h @@ -1,102 +0,0 @@ -/* Inline floating-point environment handling functions for powerpc. - Copyright (C) 1995-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__ - -/* Inline definitions for fegetround. */ -# define __fegetround_ISA300() \ - (__extension__ ({ \ - union { double __d; unsigned long long __ll; } __u; \ - __asm__ __volatile__ ( \ - ".machine push; .machine \"power9\"; mffsl %0; .machine pop" \ - : "=f" (__u.__d)); \ - __u.__ll & 0x0000000000000003LL; \ - })) - -# define __fegetround_ISA2() \ - (__extension__ ({ \ - int __fegetround_result; \ - __asm__ __volatile__ ("mcrfs 7,7 ; mfcr %0" \ - : "=r"(__fegetround_result) : : "cr7"); \ - __fegetround_result & 3; \ - })) - -# ifdef _ARCH_PWR9 -# define __fegetround() __fegetround_ISA300() -# elif defined __BUILTIN_CPU_SUPPORTS__ -# define __fegetround() \ - (__glibc_likely (__builtin_cpu_supports ("arch_3_00")) \ - ? __fegetround_ISA300() \ - : __fegetround_ISA2() \ - ) -# else -# define __fegetround() __fegetround_ISA2() -# endif - -# define fegetround() __fegetround () - -# ifndef __NO_MATH_INLINES -/* The weird 'i#*X' constraints on the following suppress a gcc - warning when __excepts is not a constant. Otherwise, they mean the - same as just plain 'i'. */ - -# if __GNUC_PREREQ(3, 4) - -/* Inline definition for feraiseexcept. */ -# define feraiseexcept(__excepts) \ - (__extension__ ({ \ - int __e = __excepts; \ - int __ret; \ - if (__builtin_constant_p (__e) \ - && (__e & (__e - 1)) == 0 \ - && __e != FE_INVALID) \ - { \ - if (__e != 0) \ - __asm__ __volatile__ ("mtfsb1 %0" \ - : : "i#*X" (__builtin_clz (__e))); \ - __ret = 0; \ - } \ - else \ - __ret = feraiseexcept (__e); \ - __ret; \ - })) - -/* Inline definition for feclearexcept. */ -# define feclearexcept(__excepts) \ - (__extension__ ({ \ - int __e = __excepts; \ - int __ret; \ - if (__builtin_constant_p (__e) \ - && (__e & (__e - 1)) == 0 \ - && __e != FE_INVALID) \ - { \ - if (__e != 0) \ - __asm__ __volatile__ ("mtfsb0 %0" \ - : : "i#*X" (__builtin_clz (__e))); \ - __ret = 0; \ - } \ - else \ - __ret = feclearexcept (__e); \ - __ret; \ - })) - -# endif /* __GNUC_PREREQ(3, 4). */ - -# endif /* !__NO_MATH_INLINES. */ - -#endif /* __GNUC__ && !_SOFT_FLOAT && !__NO_FPRS__ */ -\ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/hwcap.h b/lib/libc/include/powerpc64-linux-gnu/bits/hwcap.h @@ -73,4 +73,6 @@ #define PPC_FEATURE2_DARN 0x00200000 /* darn instruction. */ #define PPC_FEATURE2_SCV 0x00100000 /* scv syscall. */ #define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM without suspended - state. */ -\ No newline at end of file + state. */ +#define PPC_FEATURE2_ARCH_3_1 0x00040000 /* ISA 3.1. */ +#define PPC_FEATURE2_MMA 0x00020000 /* Matrix-Multiply Assist. */ +\ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/iscanonical.h b/lib/libc/include/powerpc64-linux-gnu/bits/iscanonical.h @@ -20,7 +20,7 @@ # error "Never use <bits/iscanonical.h> directly; include <math.h> instead." #endif -#ifdef __NO_LONG_DOUBLE_MATH +#if defined (__NO_LONG_DOUBLE_MATH) || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # define iscanonical(x) ((void) (__typeof (x)) (x), 1) #else extern int __iscanonicall (long double __x) diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/long-double.h b/lib/libc/include/powerpc64-linux-gnu/bits/long-double.h @@ -22,4 +22,4 @@ # define __NO_LONG_DOUBLE_MATH 1 # endif #endif -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 +\ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/msq-pad.h b/lib/libc/include/powerpc64-linux-gnu/bits/msq-pad.h @@ -1,26 +0,0 @@ -/* Define where padding goes in struct msqid_ds. PowerPC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_MSG_H -# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/timesize.h> - -#define __MSQ_PAD_AFTER_TIME 0 -#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) -\ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/sem-pad.h b/lib/libc/include/powerpc64-linux-gnu/bits/sem-pad.h @@ -1,26 +0,0 @@ -/* Define where padding goes in struct semid_ds. PowerPC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SEM_H -# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." -#endif - -#include <bits/timesize.h> - -#define __SEM_PAD_AFTER_TIME 0 -#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32) -\ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/semaphore.h b/lib/libc/include/powerpc64-linux-gnu/bits/semaphore.h @@ -1,40 +0,0 @@ -/* Machine-specific POSIX semaphore type layouts. PowerPC version. - Copyright (C) 2003-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SEMAPHORE_H -# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." -#endif - -#include <bits/wordsize.h> - -#if __WORDSIZE == 64 -# define __SIZEOF_SEM_T 32 -#else -# define __SIZEOF_SEM_T 16 -#endif - -/* Value returned if `sem_open' failed. */ -#define SEM_FAILED ((sem_t *) 0) - - -typedef union -{ - char __size[__SIZEOF_SEM_T]; - long int __align; -} sem_t; -\ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/shm-pad.h b/lib/libc/include/powerpc64-linux-gnu/bits/shm-pad.h @@ -1,28 +0,0 @@ -/* Define where padding goes in struct shmid_ds. PowerPC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SHM_H -# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." -#endif - -#include <bits/timesize.h> - -#define __SHM_PAD_AFTER_TIME 0 -#define __SHM_PAD_BEFORE_TIME (__TIMESIZE == 32) -#define __SHM_SEGSZ_AFTER_TIME 1 -#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ (__TIMESIZE == 32) -\ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/types/struct_msqid_ds.h b/lib/libc/include/powerpc64-linux-gnu/bits/types/struct_msqid_ds.h @@ -0,0 +1,47 @@ +/* Linux/PowerPC implementation of the SysV message struct msqid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_MSG_H +# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." +#endif + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ +#if __TIMESIZE == 32 + unsigned long int __msg_stime_high; + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_ctime_high; + __time_t msg_ctime; /* time of last change */ +#else + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgsnd command */ + __time_t msg_ctime; /* time of last change */ +#endif + __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ + __pid_t msg_lspid; /* pid of last msgsnd() */ + __pid_t msg_lrpid; /* pid of last msgrcv() */ + __syscall_ulong_t __glibc_reserved4; + __syscall_ulong_t __glibc_reserved5; +}; +\ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/types/struct_semid_ds.h b/lib/libc/include/powerpc64-linux-gnu/bits/types/struct_semid_ds.h @@ -0,0 +1,39 @@ +/* PowerPC implementation of the semaphore struct semid_ds. + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SEM_H +# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ +#if __TIMESIZE == 32 + __syscall_ulong_t __sem_otime_high; + __time_t sem_otime; /* last semop() time */ + __syscall_ulong_t __sem_ctime_high; + __time_t sem_ctime; /* last time changed by semctl() */ +#else + __time_t sem_otime; /* last semop() time */ + __time_t sem_ctime; /* last time changed by semctl() */ +#endif + __syscall_ulong_t sem_nsems; /* number of semaphores in set */ + __syscall_ulong_t __glibc_reserved3; + __syscall_ulong_t __glibc_reserved4; +}; +\ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/types/struct_shmid_ds.h b/lib/libc/include/powerpc64-linux-gnu/bits/types/struct_shmid_ds.h @@ -0,0 +1,46 @@ +/* Linux/PowerPC implementation of the shared memory struct shmid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SHM_H +# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead." +#endif + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ +#if __TIMESIZE == 32 + unsigned long int __shm_atime_high; + __time_t shm_atime; /* time of last shmat() */ + unsigned long int __shm_dtime_high; + __time_t shm_dtime; /* time of last shmdt() */ + unsigned long int __shm_ctime_high; + __time_t shm_ctime; /* time of last change by shmctl() */ + unsigned long int __glibc_reserved4; +#else + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#endif + size_t shm_segsz; /* size of segment in bytes */ + __pid_t shm_cpid; /* pid of creator */ + __pid_t shm_lpid; /* pid of last shmop */ + shmatt_t shm_nattch; /* number of current attaches */ + __syscall_ulong_t __glibc_reserved5; + __syscall_ulong_t __glibc_reserved6; + }; +\ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-gnu/gnu/lib-names-64-v1.h b/lib/libc/include/powerpc64-linux-gnu/gnu/lib-names-64-v1.h @@ -20,8 +20,6 @@ #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" -#define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" diff --git a/lib/libc/include/powerpc64-linux-gnu/gnu/stubs-64-v1.h b/lib/libc/include/powerpc64-linux-gnu/gnu/stubs-64-v1.h @@ -10,9 +10,7 @@ #define __stub_chflags #define __stub_fchflags #define __stub_gtty -#define __stub_lchmod #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn -#define __stub_sstk #define __stub_stty \ No newline at end of file diff --git a/lib/libc/include/powerpc64-linux-gnu/ieee754.h b/lib/libc/include/powerpc64-linux-gnu/ieee754.h @@ -21,6 +21,7 @@ #include <features.h> #include <bits/endian.h> +#include <bits/floatn.h> __BEGIN_DECLS @@ -111,6 +112,65 @@ union ieee754_double #define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ +#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +/* long double is IEEE 128 bit */ +union ieee854_long_double + { + long double d; + + /* This is the IEEE 854 quad-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:16; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:16; + unsigned int exponent:15; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:15; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:15; + unsigned int quiet_nan:1; + unsigned int exponent:15; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ +#endif + + +#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 || __GNUC_PREREQ (7, 0) /* IBM extended format for long double. Each long double is made up of two IEEE doubles. The value of the @@ -121,12 +181,16 @@ union ieee754_double -0.0. No other requirements are made; so, for example, 1.0 may be represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a NaN is don't-care. */ - union ibm_extended_long_double { - long double ld; +# if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 && __GNUC_PREREQ (7, 0) + __ibm128 ld; +# else + long double ld; +# endif union ieee754_double d[2]; }; +#endif __END_DECLS diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/fenvinline.h b/lib/libc/include/powerpc64le-linux-gnu/bits/fenvinline.h @@ -1,102 +0,0 @@ -/* Inline floating-point environment handling functions for powerpc. - Copyright (C) 1995-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__ - -/* Inline definitions for fegetround. */ -# define __fegetround_ISA300() \ - (__extension__ ({ \ - union { double __d; unsigned long long __ll; } __u; \ - __asm__ __volatile__ ( \ - ".machine push; .machine \"power9\"; mffsl %0; .machine pop" \ - : "=f" (__u.__d)); \ - __u.__ll & 0x0000000000000003LL; \ - })) - -# define __fegetround_ISA2() \ - (__extension__ ({ \ - int __fegetround_result; \ - __asm__ __volatile__ ("mcrfs 7,7 ; mfcr %0" \ - : "=r"(__fegetround_result) : : "cr7"); \ - __fegetround_result & 3; \ - })) - -# ifdef _ARCH_PWR9 -# define __fegetround() __fegetround_ISA300() -# elif defined __BUILTIN_CPU_SUPPORTS__ -# define __fegetround() \ - (__glibc_likely (__builtin_cpu_supports ("arch_3_00")) \ - ? __fegetround_ISA300() \ - : __fegetround_ISA2() \ - ) -# else -# define __fegetround() __fegetround_ISA2() -# endif - -# define fegetround() __fegetround () - -# ifndef __NO_MATH_INLINES -/* The weird 'i#*X' constraints on the following suppress a gcc - warning when __excepts is not a constant. Otherwise, they mean the - same as just plain 'i'. */ - -# if __GNUC_PREREQ(3, 4) - -/* Inline definition for feraiseexcept. */ -# define feraiseexcept(__excepts) \ - (__extension__ ({ \ - int __e = __excepts; \ - int __ret; \ - if (__builtin_constant_p (__e) \ - && (__e & (__e - 1)) == 0 \ - && __e != FE_INVALID) \ - { \ - if (__e != 0) \ - __asm__ __volatile__ ("mtfsb1 %0" \ - : : "i#*X" (__builtin_clz (__e))); \ - __ret = 0; \ - } \ - else \ - __ret = feraiseexcept (__e); \ - __ret; \ - })) - -/* Inline definition for feclearexcept. */ -# define feclearexcept(__excepts) \ - (__extension__ ({ \ - int __e = __excepts; \ - int __ret; \ - if (__builtin_constant_p (__e) \ - && (__e & (__e - 1)) == 0 \ - && __e != FE_INVALID) \ - { \ - if (__e != 0) \ - __asm__ __volatile__ ("mtfsb0 %0" \ - : : "i#*X" (__builtin_clz (__e))); \ - __ret = 0; \ - } \ - else \ - __ret = feclearexcept (__e); \ - __ret; \ - })) - -# endif /* __GNUC_PREREQ(3, 4). */ - -# endif /* !__NO_MATH_INLINES. */ - -#endif /* __GNUC__ && !_SOFT_FLOAT && !__NO_FPRS__ */ -\ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/hwcap.h b/lib/libc/include/powerpc64le-linux-gnu/bits/hwcap.h @@ -73,4 +73,6 @@ #define PPC_FEATURE2_DARN 0x00200000 /* darn instruction. */ #define PPC_FEATURE2_SCV 0x00100000 /* scv syscall. */ #define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM without suspended - state. */ -\ No newline at end of file + state. */ +#define PPC_FEATURE2_ARCH_3_1 0x00040000 /* ISA 3.1. */ +#define PPC_FEATURE2_MMA 0x00020000 /* Matrix-Multiply Assist. */ +\ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/iscanonical.h b/lib/libc/include/powerpc64le-linux-gnu/bits/iscanonical.h @@ -20,7 +20,7 @@ # error "Never use <bits/iscanonical.h> directly; include <math.h> instead." #endif -#ifdef __NO_LONG_DOUBLE_MATH +#if defined (__NO_LONG_DOUBLE_MATH) || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # define iscanonical(x) ((void) (__typeof (x)) (x), 1) #else extern int __iscanonicall (long double __x) diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/long-double.h b/lib/libc/include/powerpc64le-linux-gnu/bits/long-double.h @@ -1,5 +1,5 @@ /* Properties of long double type. ldbl-opt version. - Copyright (C) 2016-2020 Free Software Foundation, Inc. + Copyright (C) 2019-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,4 +22,5 @@ # define __NO_LONG_DOUBLE_MATH 1 # endif #endif -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file + +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI (__LDBL_MANT_DIG__ == 113) +\ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/msq-pad.h b/lib/libc/include/powerpc64le-linux-gnu/bits/msq-pad.h @@ -1,26 +0,0 @@ -/* Define where padding goes in struct msqid_ds. PowerPC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_MSG_H -# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/timesize.h> - -#define __MSQ_PAD_AFTER_TIME 0 -#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) -\ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/sem-pad.h b/lib/libc/include/powerpc64le-linux-gnu/bits/sem-pad.h @@ -1,26 +0,0 @@ -/* Define where padding goes in struct semid_ds. PowerPC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SEM_H -# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." -#endif - -#include <bits/timesize.h> - -#define __SEM_PAD_AFTER_TIME 0 -#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32) -\ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/semaphore.h b/lib/libc/include/powerpc64le-linux-gnu/bits/semaphore.h @@ -1,40 +0,0 @@ -/* Machine-specific POSIX semaphore type layouts. PowerPC version. - Copyright (C) 2003-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SEMAPHORE_H -# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." -#endif - -#include <bits/wordsize.h> - -#if __WORDSIZE == 64 -# define __SIZEOF_SEM_T 32 -#else -# define __SIZEOF_SEM_T 16 -#endif - -/* Value returned if `sem_open' failed. */ -#define SEM_FAILED ((sem_t *) 0) - - -typedef union -{ - char __size[__SIZEOF_SEM_T]; - long int __align; -} sem_t; -\ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/shm-pad.h b/lib/libc/include/powerpc64le-linux-gnu/bits/shm-pad.h @@ -1,28 +0,0 @@ -/* Define where padding goes in struct shmid_ds. PowerPC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SHM_H -# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." -#endif - -#include <bits/timesize.h> - -#define __SHM_PAD_AFTER_TIME 0 -#define __SHM_PAD_BEFORE_TIME (__TIMESIZE == 32) -#define __SHM_SEGSZ_AFTER_TIME 1 -#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ (__TIMESIZE == 32) -\ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_msqid_ds.h b/lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_msqid_ds.h @@ -0,0 +1,47 @@ +/* Linux/PowerPC implementation of the SysV message struct msqid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_MSG_H +# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." +#endif + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ +#if __TIMESIZE == 32 + unsigned long int __msg_stime_high; + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_ctime_high; + __time_t msg_ctime; /* time of last change */ +#else + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgsnd command */ + __time_t msg_ctime; /* time of last change */ +#endif + __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ + __pid_t msg_lspid; /* pid of last msgsnd() */ + __pid_t msg_lrpid; /* pid of last msgrcv() */ + __syscall_ulong_t __glibc_reserved4; + __syscall_ulong_t __glibc_reserved5; +}; +\ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_semid_ds.h b/lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_semid_ds.h @@ -0,0 +1,39 @@ +/* PowerPC implementation of the semaphore struct semid_ds. + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SEM_H +# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ +#if __TIMESIZE == 32 + __syscall_ulong_t __sem_otime_high; + __time_t sem_otime; /* last semop() time */ + __syscall_ulong_t __sem_ctime_high; + __time_t sem_ctime; /* last time changed by semctl() */ +#else + __time_t sem_otime; /* last semop() time */ + __time_t sem_ctime; /* last time changed by semctl() */ +#endif + __syscall_ulong_t sem_nsems; /* number of semaphores in set */ + __syscall_ulong_t __glibc_reserved3; + __syscall_ulong_t __glibc_reserved4; +}; +\ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_shmid_ds.h b/lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_shmid_ds.h @@ -0,0 +1,46 @@ +/* Linux/PowerPC implementation of the shared memory struct shmid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SHM_H +# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead." +#endif + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ +#if __TIMESIZE == 32 + unsigned long int __shm_atime_high; + __time_t shm_atime; /* time of last shmat() */ + unsigned long int __shm_dtime_high; + __time_t shm_dtime; /* time of last shmdt() */ + unsigned long int __shm_ctime_high; + __time_t shm_ctime; /* time of last change by shmctl() */ + unsigned long int __glibc_reserved4; +#else + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#endif + size_t shm_segsz; /* size of segment in bytes */ + __pid_t shm_cpid; /* pid of creator */ + __pid_t shm_lpid; /* pid of last shmop */ + shmatt_t shm_nattch; /* number of current attaches */ + __syscall_ulong_t __glibc_reserved5; + __syscall_ulong_t __glibc_reserved6; + }; +\ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-gnu/gnu/lib-names-64-v2.h b/lib/libc/include/powerpc64le-linux-gnu/gnu/lib-names-64-v2.h @@ -20,8 +20,6 @@ #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" -#define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" diff --git a/lib/libc/include/powerpc64le-linux-gnu/gnu/stubs-64-v2.h b/lib/libc/include/powerpc64le-linux-gnu/gnu/stubs-64-v2.h @@ -10,9 +10,7 @@ #define __stub_chflags #define __stub_fchflags #define __stub_gtty -#define __stub_lchmod #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn -#define __stub_sstk #define __stub_stty \ No newline at end of file diff --git a/lib/libc/include/powerpc64le-linux-gnu/ieee754.h b/lib/libc/include/powerpc64le-linux-gnu/ieee754.h @@ -21,6 +21,7 @@ #include <features.h> #include <bits/endian.h> +#include <bits/floatn.h> __BEGIN_DECLS @@ -111,6 +112,65 @@ union ieee754_double #define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ +#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 +/* long double is IEEE 128 bit */ +union ieee854_long_double + { + long double d; + + /* This is the IEEE 854 quad-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:16; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:16; + unsigned int exponent:15; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:15; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:15; + unsigned int quiet_nan:1; + unsigned int exponent:15; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ +#endif + + +#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 || __GNUC_PREREQ (7, 0) /* IBM extended format for long double. Each long double is made up of two IEEE doubles. The value of the @@ -121,12 +181,16 @@ union ieee754_double -0.0. No other requirements are made; so, for example, 1.0 may be represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a NaN is don't-care. */ - union ibm_extended_long_double { - long double ld; +# if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 && __GNUC_PREREQ (7, 0) + __ibm128 ld; +# else + long double ld; +# endif union ieee754_double d[2]; }; +#endif __END_DECLS diff --git a/lib/libc/include/riscv64-linux-gnu/bits/floatn.h b/lib/libc/include/riscv64-linux-gnu/bits/floatn.h @@ -1,97 +0,0 @@ -/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. - Copyright (C) 2017-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _BITS_FLOATN_H -#define _BITS_FLOATN_H - -#include <features.h> -#include <bits/long-double.h> - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the IEEE 754 binary128 format, and this - glibc includes corresponding *f128 interfaces for it. */ -#ifndef __NO_LONG_DOUBLE_MATH -# define __HAVE_FLOAT128 1 -#else -/* glibc does not support _Float128 for platforms where long double is - normally binary128 when building with long double as binary64. - GCC's default for supported scalar modes does not support it either - in that case. */ -# define __HAVE_FLOAT128 0 -#endif - -/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct - from the default float, double and long double types in this glibc. */ -#define __HAVE_DISTINCT_FLOAT128 0 - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the right format for _Float64x, and this - glibc includes corresponding *f64x interfaces for it. */ -#define __HAVE_FLOAT64X __HAVE_FLOAT128 - -/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format - of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has - the format of _Float128, which must be different from that of long - double. */ -#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128 - -#ifndef __ASSEMBLER__ - -/* Defined to concatenate the literal suffix to be used with _Float128 - types, if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -/* The literal suffix f128 exists only since GCC 7.0. */ -# define __f128(x) x##l -# else -# define __f128(x) x##f128 -# endif -# endif - -/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -# define __CFLOAT128 _Complex long double -# else -# define __CFLOAT128 _Complex _Float128 -# endif -# endif - -/* The remaining of this file provides support for older compilers. */ -# if __HAVE_FLOAT128 - -/* The type _Float128 exists only since GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -typedef long double _Float128; -# endif - -/* Various built-in functions do not exist before GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) -# define __builtin_huge_valf128() (__builtin_huge_vall ()) -# define __builtin_inff128() (__builtin_infl ()) -# define __builtin_nanf128(x) (__builtin_nanl (x)) -# define __builtin_nansf128(x) (__builtin_nansl (x)) -# endif - -# endif - -#endif /* !__ASSEMBLER__. */ - -#include <bits/floatn-common.h> - -#endif /* _BITS_FLOATN_H */ -\ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-gnu/bits/long-double.h b/lib/libc/include/riscv64-linux-gnu/bits/long-double.h @@ -18,4 +18,4 @@ /* long double is distinct from double, so there is nothing to define here. */ -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 +\ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-gnu/bits/semaphore.h b/lib/libc/include/riscv64-linux-gnu/bits/semaphore.h @@ -1,33 +0,0 @@ -/* Machine-specific POSIX semaphore type layouts. RISC-V version. - Copyright (C) 2002-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SEMAPHORE_H -# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." -#endif - -#define __SIZEOF_SEM_T (4 * __SIZEOF_POINTER__) - -/* Value returned if `sem_open' failed. */ -#define SEM_FAILED ((sem_t *) 0) - - -typedef union -{ - char __size[__SIZEOF_SEM_T]; - long int __align; -} sem_t; -\ No newline at end of file diff --git a/lib/libc/include/riscv64-linux-gnu/bits/typesizes.h b/lib/libc/include/riscv64-linux-gnu/bits/typesizes.h @@ -26,31 +26,45 @@ /* See <bits/types.h> for the meaning of these macros. This file exists so that <bits/types.h> need not vary across different GNU platforms. */ +#if __TIMESIZE == 64 && __WORDSIZE == 32 +/* These are the "new" y2038 types defined for architectures added after + the 5.1 kernel. */ +# define __INO_T_TYPE __UQUAD_TYPE +# define __OFF_T_TYPE __SQUAD_TYPE +# define __RLIM_T_TYPE __UQUAD_TYPE +# define __BLKCNT_T_TYPE __SQUAD_TYPE +# define __FSBLKCNT_T_TYPE __UQUAD_TYPE +# define __FSFILCNT_T_TYPE __UQUAD_TYPE +# define __TIME_T_TYPE __SQUAD_TYPE +# define __SUSECONDS_T_TYPE __SQUAD_TYPE +#else +# define __INO_T_TYPE __ULONGWORD_TYPE +# define __OFF_T_TYPE __SLONGWORD_TYPE +# define __RLIM_T_TYPE __ULONGWORD_TYPE +# define __BLKCNT_T_TYPE __SLONGWORD_TYPE +# define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE +# define __FSFILCNT_T_TYPE __ULONGWORD_TYPE +# define __TIME_T_TYPE __SLONGWORD_TYPE +# define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#endif #define __DEV_T_TYPE __UQUAD_TYPE #define __UID_T_TYPE __U32_TYPE #define __GID_T_TYPE __U32_TYPE -#define __INO_T_TYPE __ULONGWORD_TYPE #define __INO64_T_TYPE __UQUAD_TYPE #define __MODE_T_TYPE __U32_TYPE #define __NLINK_T_TYPE __U32_TYPE -#define __OFF_T_TYPE __SLONGWORD_TYPE #define __OFF64_T_TYPE __SQUAD_TYPE #define __PID_T_TYPE __S32_TYPE -#define __RLIM_T_TYPE __ULONGWORD_TYPE #define __RLIM64_T_TYPE __UQUAD_TYPE -#define __BLKCNT_T_TYPE __SLONGWORD_TYPE #define __BLKCNT64_T_TYPE __SQUAD_TYPE -#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE #define __FSBLKCNT64_T_TYPE __UQUAD_TYPE -#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE #define __FSFILCNT64_T_TYPE __UQUAD_TYPE #define __FSWORD_T_TYPE __SWORD_TYPE #define __ID_T_TYPE __U32_TYPE #define __CLOCK_T_TYPE __SLONGWORD_TYPE -#define __TIME_T_TYPE __SLONGWORD_TYPE #define __USECONDS_T_TYPE __U32_TYPE -#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#define __SUSECONDS64_T_TYPE __SQUAD_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE @@ -62,7 +76,7 @@ #define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE #define __CPU_MASK_TYPE __ULONGWORD_TYPE -#ifdef __LP64__ +#if defined __LP64__ || (__TIMESIZE == 64 && __WORDSIZE == 32) /* Tell the libc code that off_t and off64_t are actually the same type for all ABI purposes, even if possibly expressed as different base types for C type-checking purposes. */ @@ -76,11 +90,17 @@ /* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ # define __STATFS_MATCHES_STATFS64 1 + +/* And for getitimer, setitimer and rusage */ +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 (__WORDSIZE == 64) #else # define __RLIM_T_MATCHES_RLIM64_T 0 # define __STATFS_MATCHES_STATFS64 0 + +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0 #endif + /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 diff --git a/lib/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64.h b/lib/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64.h @@ -20,8 +20,6 @@ #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" -#define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" diff --git a/lib/libc/include/riscv64-linux-gnu/gnu/stubs-lp64.h b/lib/libc/include/riscv64-linux-gnu/gnu/stubs-lp64.h @@ -32,10 +32,7 @@ #define __stub_fetestexcept #define __stub_feupdateenv #define __stub_gtty -#define __stub_lchmod #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn -#define __stub_sstk -#define __stub_stty -#define __stub_sysctl -\ No newline at end of file +#define __stub_stty +\ No newline at end of file diff --git a/lib/libc/include/s390x-linux-gnu/bits/fenv.h b/lib/libc/include/s390x-linux-gnu/bits/fenv.h @@ -73,14 +73,14 @@ typedef unsigned int fexcept_t; /* size of fpc */ /* Type representing floating-point environment. This function corresponds - to the layout of the block written by the `fstenv'. */ + to the layout of the block used by fegetenv and fesetenv. */ typedef struct { fexcept_t __fpc; void *__unused; /* The field __unused (formerly __ieee_instruction_pointer) is a relict from commit "Remove PTRACE_PEEKUSER" (87b9b50f0d4b92248905e95a06a13c513dc45e59) - and isn´t used anymore. */ + and isn't used anymore. */ } fenv_t; /* If the default argument is used we use this value. */ diff --git a/lib/libc/include/s390x-linux-gnu/bits/floatn.h b/lib/libc/include/s390x-linux-gnu/bits/floatn.h @@ -1,97 +0,0 @@ -/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. - Copyright (C) 2017-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _BITS_FLOATN_H -#define _BITS_FLOATN_H - -#include <features.h> -#include <bits/long-double.h> - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the IEEE 754 binary128 format, and this - glibc includes corresponding *f128 interfaces for it. */ -#ifndef __NO_LONG_DOUBLE_MATH -# define __HAVE_FLOAT128 1 -#else -/* glibc does not support _Float128 for platforms where long double is - normally binary128 when building with long double as binary64. - GCC's default for supported scalar modes does not support it either - in that case. */ -# define __HAVE_FLOAT128 0 -#endif - -/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct - from the default float, double and long double types in this glibc. */ -#define __HAVE_DISTINCT_FLOAT128 0 - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the right format for _Float64x, and this - glibc includes corresponding *f64x interfaces for it. */ -#define __HAVE_FLOAT64X __HAVE_FLOAT128 - -/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format - of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has - the format of _Float128, which must be different from that of long - double. */ -#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128 - -#ifndef __ASSEMBLER__ - -/* Defined to concatenate the literal suffix to be used with _Float128 - types, if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -/* The literal suffix f128 exists only since GCC 7.0. */ -# define __f128(x) x##l -# else -# define __f128(x) x##f128 -# endif -# endif - -/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -# define __CFLOAT128 _Complex long double -# else -# define __CFLOAT128 _Complex _Float128 -# endif -# endif - -/* The remaining of this file provides support for older compilers. */ -# if __HAVE_FLOAT128 - -/* The type _Float128 exists only since GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -typedef long double _Float128; -# endif - -/* Various built-in functions do not exist before GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) -# define __builtin_huge_valf128() (__builtin_huge_vall ()) -# define __builtin_inff128() (__builtin_infl ()) -# define __builtin_nanf128(x) (__builtin_nanl (x)) -# define __builtin_nansf128(x) (__builtin_nansl (x)) -# endif - -# endif - -#endif /* !__ASSEMBLER__. */ - -#include <bits/floatn-common.h> - -#endif /* _BITS_FLOATN_H */ -\ No newline at end of file diff --git a/lib/libc/include/s390x-linux-gnu/bits/long-double.h b/lib/libc/include/s390x-linux-gnu/bits/long-double.h @@ -22,4 +22,4 @@ # define __NO_LONG_DOUBLE_MATH 1 # endif #endif -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 +\ No newline at end of file diff --git a/lib/libc/include/s390x-linux-gnu/bits/semaphore.h b/lib/libc/include/s390x-linux-gnu/bits/semaphore.h @@ -1,39 +0,0 @@ -/* Copyright (C) 2003-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>, 2003. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SEMAPHORE_H -# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." -#endif - -#include <bits/wordsize.h> - -#if __WORDSIZE == 64 -# define __SIZEOF_SEM_T 32 -#else -# define __SIZEOF_SEM_T 16 -#endif - -/* Value returned if `sem_open' failed. */ -#define SEM_FAILED ((sem_t *) 0) - - -typedef union -{ - char __size[__SIZEOF_SEM_T]; - long int __align; -} sem_t; -\ No newline at end of file diff --git a/lib/libc/include/s390x-linux-gnu/bits/typesizes.h b/lib/libc/include/s390x-linux-gnu/bits/typesizes.h @@ -50,6 +50,7 @@ #define __TIME_T_TYPE __SLONGWORD_TYPE #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#define __SUSECONDS64_T_TYPE __SQUAD_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE @@ -81,10 +82,16 @@ /* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ # define __STATFS_MATCHES_STATFS64 1 + +/* And for getitimer, setitimer and rusage */ +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1 #else # define __RLIM_T_MATCHES_RLIM64_T 0 # define __STATFS_MATCHES_STATFS64 0 + +/* And for getitimer, setitimer and rusage */ +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0 #endif /* Number of descriptors that can fit in an `fd_set'. */ diff --git a/lib/libc/include/s390x-linux-gnu/gnu/lib-names-64.h b/lib/libc/include/s390x-linux-gnu/gnu/lib-names-64.h @@ -20,8 +20,6 @@ #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" -#define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" diff --git a/lib/libc/include/sparc-linux-gnu/bits/fenv.h b/lib/libc/include/sparc-linux-gnu/bits/fenv.h @@ -83,15 +83,6 @@ typedef unsigned long int fenv_t; # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif -/* For internal use only: access the fp state register. */ -#if __WORDSIZE == 64 -# define __fenv_stfsr(X) __asm__ __volatile__ ("stx %%fsr,%0" : "=m" (X)) -# define __fenv_ldfsr(X) __asm__ __volatile__ ("ldx %0,%%fsr" : : "m" (X)) -#else -# define __fenv_stfsr(X) __asm__ __volatile__ ("st %%fsr,%0" : "=m" (X)) -# define __fenv_ldfsr(X) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (X)) -#endif - #if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef unsigned long int femode_t; diff --git a/lib/libc/include/sparc-linux-gnu/bits/floatn.h b/lib/libc/include/sparc-linux-gnu/bits/floatn.h @@ -1,97 +0,0 @@ -/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. - Copyright (C) 2017-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _BITS_FLOATN_H -#define _BITS_FLOATN_H - -#include <features.h> -#include <bits/long-double.h> - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the IEEE 754 binary128 format, and this - glibc includes corresponding *f128 interfaces for it. */ -#ifndef __NO_LONG_DOUBLE_MATH -# define __HAVE_FLOAT128 1 -#else -/* glibc does not support _Float128 for platforms where long double is - normally binary128 when building with long double as binary64. - GCC's default for supported scalar modes does not support it either - in that case. */ -# define __HAVE_FLOAT128 0 -#endif - -/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct - from the default float, double and long double types in this glibc. */ -#define __HAVE_DISTINCT_FLOAT128 0 - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the right format for _Float64x, and this - glibc includes corresponding *f64x interfaces for it. */ -#define __HAVE_FLOAT64X __HAVE_FLOAT128 - -/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format - of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has - the format of _Float128, which must be different from that of long - double. */ -#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128 - -#ifndef __ASSEMBLER__ - -/* Defined to concatenate the literal suffix to be used with _Float128 - types, if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -/* The literal suffix f128 exists only since GCC 7.0. */ -# define __f128(x) x##l -# else -# define __f128(x) x##f128 -# endif -# endif - -/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -# define __CFLOAT128 _Complex long double -# else -# define __CFLOAT128 _Complex _Float128 -# endif -# endif - -/* The remaining of this file provides support for older compilers. */ -# if __HAVE_FLOAT128 - -/* The type _Float128 exists only since GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -typedef long double _Float128; -# endif - -/* Various built-in functions do not exist before GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) -# define __builtin_huge_valf128() (__builtin_huge_vall ()) -# define __builtin_inff128() (__builtin_infl ()) -# define __builtin_nanf128(x) (__builtin_nanl (x)) -# define __builtin_nansf128(x) (__builtin_nansl (x)) -# endif - -# endif - -#endif /* !__ASSEMBLER__. */ - -#include <bits/floatn-common.h> - -#endif /* _BITS_FLOATN_H */ -\ No newline at end of file diff --git a/lib/libc/include/sparc-linux-gnu/bits/long-double.h b/lib/libc/include/sparc-linux-gnu/bits/long-double.h @@ -24,4 +24,4 @@ # define __NO_LONG_DOUBLE_MATH 1 # endif #endif -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 +\ No newline at end of file diff --git a/lib/libc/include/sparc-linux-gnu/bits/msq-pad.h b/lib/libc/include/sparc-linux-gnu/bits/msq-pad.h @@ -1,26 +0,0 @@ -/* Define where padding goes in struct msqid_ds. SPARC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_MSG_H -# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/timesize.h> - -#define __MSQ_PAD_AFTER_TIME 0 -#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) -\ No newline at end of file diff --git a/lib/libc/include/sparc-linux-gnu/bits/resource.h b/lib/libc/include/sparc-linux-gnu/bits/resource.h @@ -98,7 +98,7 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - /* Maximum CPU time in µs that a process scheduled under a real-time + /* Maximum CPU time in microseconds that a process scheduled under a real-time scheduling policy may consume without making a blocking system call before being forcibly descheduled. */ __RLIMIT_RTTIME = 15, diff --git a/lib/libc/include/sparc-linux-gnu/bits/sem-pad.h b/lib/libc/include/sparc-linux-gnu/bits/sem-pad.h @@ -1,26 +0,0 @@ -/* Define where padding goes in struct semid_ds. SPARC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SEM_H -# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." -#endif - -#include <bits/timesize.h> - -#define __SEM_PAD_AFTER_TIME 0 -#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32) -\ No newline at end of file diff --git a/lib/libc/include/sparc-linux-gnu/bits/semaphore.h b/lib/libc/include/sparc-linux-gnu/bits/semaphore.h @@ -1,40 +0,0 @@ -/* Machine-specific POSIX semaphore type layouts. SPARC version. - Copyright (C) 2003-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SEMAPHORE_H -# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." -#endif - -#include <bits/wordsize.h> - -#if __WORDSIZE == 64 -# define __SIZEOF_SEM_T 32 -#else -# define __SIZEOF_SEM_T 16 -#endif - -/* Value returned if `sem_open' failed. */ -#define SEM_FAILED ((sem_t *) 0) - - -typedef union -{ - char __size[__SIZEOF_SEM_T]; - long int __align; -} sem_t; -\ No newline at end of file diff --git a/lib/libc/include/sparc-linux-gnu/bits/shm-pad.h b/lib/libc/include/sparc-linux-gnu/bits/shm-pad.h @@ -1,28 +0,0 @@ -/* Define where padding goes in struct shmid_ds. SPARC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SHM_H -# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." -#endif - -#include <bits/timesize.h> - -#define __SHM_PAD_AFTER_TIME 0 -#define __SHM_PAD_BEFORE_TIME (__TIMESIZE == 32) -#define __SHM_SEGSZ_AFTER_TIME 1 -#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 -\ No newline at end of file diff --git a/lib/libc/include/sparc-linux-gnu/bits/signum-arch.h b/lib/libc/include/sparc-linux-gnu/bits/signum-arch.h @@ -0,0 +1,66 @@ +/* Signal number definitions. Linux/SPARC version. + Copyright (C) 1996-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _BITS_SIGNUM_ARCH_H +#define _BITS_SIGNUM_ARCH_H 1 + +#ifndef _SIGNAL_H +#error "Never include <bits/signum-arch.h> directly; use <signal.h> instead." +#endif + +/* Adjustments and additions to the signal number constants for + Linux/SPARC systems. Signal values on this platform were chosen + for SunOS binary compatibility. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGLOST 29 /* Resource lost (Sun); server died (GNU). */ +#define SIGPWR SIGLOST /* Power failure imminent (SysV). */ + +/* Historical signals specified by POSIX. */ +#define SIGBUS 10 /* Bus error. */ +#define SIGSYS 12 /* Bad system call. */ + +/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */ +#define SIGURG 16 /* Urgent data is available at a socket. */ +#define SIGSTOP 17 /* Stop, unblockable. */ +#define SIGTSTP 18 /* Keyboard stop. */ +#define SIGCONT 19 /* Continue. */ +#define SIGCHLD 20 /* Child terminated or stopped. */ +#define SIGTTIN 21 /* Background read from control terminal. */ +#define SIGTTOU 22 /* Background write to control terminal. */ +#define SIGPOLL 23 /* Pollable event occurred (System V). */ +#define SIGXCPU 24 /* CPU time limit exceeded. */ +#define SIGVTALRM 26 /* Virtual timer expired. */ +#define SIGPROF 27 /* Profiling timer expired. */ +#define SIGXFSZ 25 /* File size limit exceeded. */ +#define SIGUSR1 30 /* User-defined signal 1. */ +#define SIGUSR2 31 /* User-defined signal 2. */ + +/* Nonstandard signals found in all modern POSIX systems + (including both BSD and Linux). */ +#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ + +/* Archaic names for compatibility. */ +#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ +#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */ +#define SIGCLD SIGCHLD /* Old System V name */ + +#define __SIGRTMIN 32 +#define __SIGRTMAX 64 + +#endif /* <signal.h> included. */ +\ No newline at end of file diff --git a/lib/libc/include/sparc-linux-gnu/bits/signum.h b/lib/libc/include/sparc-linux-gnu/bits/signum.h @@ -1,39 +0,0 @@ -/* Signal number definitions. Linux/SPARC version. - Copyright (C) 1996-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include <bits/signum.h> directly; use <signal.h> instead." -#endif - -#include <bits/signum-generic.h> - -/* Adjustments and additions to the signal number constants for - Linux/SPARC systems. Signal values on this platform were chosen - for SunOS binary compatibility. */ - -#define SIGEMT 7 /* Emulator trap. */ -#define SIGLOST 29 /* Resource lost (Sun); server died (GNU). */ -#define SIGPWR SIGLOST /* Power failure imminent (SysV). */ - -#undef __SIGRTMAX -#define __SIGRTMAX 64 - -#endif /* <signal.h> included. */ -\ No newline at end of file diff --git a/lib/libc/include/sparc-linux-gnu/bits/types/struct_msqid_ds.h b/lib/libc/include/sparc-linux-gnu/bits/types/struct_msqid_ds.h @@ -0,0 +1,47 @@ +/* Linux/SPARC implementation of the SysV message struct msqid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_MSG_H +# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." +#endif + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ +#if __TIMESIZE == 32 + unsigned long int __msg_stime_high; + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_ctime_high; + __time_t msg_ctime; /* time of last change */ +#else + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgsnd command */ + __time_t msg_ctime; /* time of last change */ +#endif + __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ + __pid_t msg_lspid; /* pid of last msgsnd() */ + __pid_t msg_lrpid; /* pid of last msgrcv() */ + __syscall_ulong_t __glibc_reserved4; + __syscall_ulong_t __glibc_reserved5; +}; +\ No newline at end of file diff --git a/lib/libc/include/sparc-linux-gnu/bits/types/struct_semid_ds.h b/lib/libc/include/sparc-linux-gnu/bits/types/struct_semid_ds.h @@ -0,0 +1,39 @@ +/* Sparc implementation of the semaphore struct semid_ds + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SEM_H +# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ +#if __TIMESIZE == 32 + __syscall_ulong_t __sem_otime_high; + __time_t sem_otime; /* last semop() time */ + __syscall_ulong_t __sem_ctime_high; + __time_t sem_ctime; /* last time changed by semctl() */ +#else + __time_t sem_otime; /* last semop() time */ + __time_t sem_ctime; /* last time changed by semctl() */ +#endif + __syscall_ulong_t sem_nsems; /* number of semaphores in set */ + __syscall_ulong_t __glibc_reserved3; + __syscall_ulong_t __glibc_reserved4; +}; +\ No newline at end of file diff --git a/lib/libc/include/sparc-linux-gnu/bits/types/struct_shmid_ds.h b/lib/libc/include/sparc-linux-gnu/bits/types/struct_shmid_ds.h @@ -0,0 +1,45 @@ +/* Linux/SPARC implementation of the shared memory struct shmid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SHM_H +# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead." +#endif + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ +#if __TIMESIZE == 32 + unsigned long int __shm_atime_high; + __time_t shm_atime; /* time of last shmat() */ + unsigned long int __shm_dtime_high; + __time_t shm_dtime; /* time of last shmdt() */ + unsigned long int __shm_ctime_high; + __time_t shm_ctime; /* time of last change by shmctl() */ +#else + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#endif + size_t shm_segsz; /* size of segment in bytes */ + __pid_t shm_cpid; /* pid of creator */ + __pid_t shm_lpid; /* pid of last shmop */ + shmatt_t shm_nattch; /* number of current attaches */ + __syscall_ulong_t __glibc_reserved5; + __syscall_ulong_t __glibc_reserved6; + }; +\ No newline at end of file diff --git a/lib/libc/include/sparc-linux-gnu/bits/typesizes.h b/lib/libc/include/sparc-linux-gnu/bits/typesizes.h @@ -50,6 +50,7 @@ #define __TIME_T_TYPE __SLONGWORD_TYPE #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __S32_TYPE +#define __SUSECONDS64_T_TYPE __SQUAD_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE @@ -75,10 +76,16 @@ /* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ # define __STATFS_MATCHES_STATFS64 1 + +/* And for getitimer, setitimer and rusage */ +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1 #else # define __RLIM_T_MATCHES_RLIM64_T 0 # define __STATFS_MATCHES_STATFS64 0 + +/* And for getitimer, setitimer and rusage */ +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0 #endif /* Number of descriptors that can fit in an `fd_set'. */ diff --git a/lib/libc/include/sparc-linux-gnu/gnu/lib-names-64.h b/lib/libc/include/sparc-linux-gnu/gnu/lib-names-64.h @@ -20,8 +20,6 @@ #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" -#define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/fenv.h b/lib/libc/include/sparcv9-linux-gnu/bits/fenv.h @@ -83,15 +83,6 @@ typedef unsigned long int fenv_t; # define FE_NOMASK_ENV ((const fenv_t *) -2) #endif -/* For internal use only: access the fp state register. */ -#if __WORDSIZE == 64 -# define __fenv_stfsr(X) __asm__ __volatile__ ("stx %%fsr,%0" : "=m" (X)) -# define __fenv_ldfsr(X) __asm__ __volatile__ ("ldx %0,%%fsr" : : "m" (X)) -#else -# define __fenv_stfsr(X) __asm__ __volatile__ ("st %%fsr,%0" : "=m" (X)) -# define __fenv_ldfsr(X) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (X)) -#endif - #if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) /* Type representing floating-point control modes. */ typedef unsigned long int femode_t; diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/floatn.h b/lib/libc/include/sparcv9-linux-gnu/bits/floatn.h @@ -1,97 +0,0 @@ -/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. - Copyright (C) 2017-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _BITS_FLOATN_H -#define _BITS_FLOATN_H - -#include <features.h> -#include <bits/long-double.h> - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the IEEE 754 binary128 format, and this - glibc includes corresponding *f128 interfaces for it. */ -#ifndef __NO_LONG_DOUBLE_MATH -# define __HAVE_FLOAT128 1 -#else -/* glibc does not support _Float128 for platforms where long double is - normally binary128 when building with long double as binary64. - GCC's default for supported scalar modes does not support it either - in that case. */ -# define __HAVE_FLOAT128 0 -#endif - -/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct - from the default float, double and long double types in this glibc. */ -#define __HAVE_DISTINCT_FLOAT128 0 - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the right format for _Float64x, and this - glibc includes corresponding *f64x interfaces for it. */ -#define __HAVE_FLOAT64X __HAVE_FLOAT128 - -/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format - of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has - the format of _Float128, which must be different from that of long - double. */ -#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128 - -#ifndef __ASSEMBLER__ - -/* Defined to concatenate the literal suffix to be used with _Float128 - types, if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -/* The literal suffix f128 exists only since GCC 7.0. */ -# define __f128(x) x##l -# else -# define __f128(x) x##f128 -# endif -# endif - -/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -# define __CFLOAT128 _Complex long double -# else -# define __CFLOAT128 _Complex _Float128 -# endif -# endif - -/* The remaining of this file provides support for older compilers. */ -# if __HAVE_FLOAT128 - -/* The type _Float128 exists only since GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -typedef long double _Float128; -# endif - -/* Various built-in functions do not exist before GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) -# define __builtin_huge_valf128() (__builtin_huge_vall ()) -# define __builtin_inff128() (__builtin_infl ()) -# define __builtin_nanf128(x) (__builtin_nanl (x)) -# define __builtin_nansf128(x) (__builtin_nansl (x)) -# endif - -# endif - -#endif /* !__ASSEMBLER__. */ - -#include <bits/floatn-common.h> - -#endif /* _BITS_FLOATN_H */ -\ No newline at end of file diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/long-double.h b/lib/libc/include/sparcv9-linux-gnu/bits/long-double.h @@ -24,4 +24,4 @@ # define __NO_LONG_DOUBLE_MATH 1 # endif #endif -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 +\ No newline at end of file diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/msq-pad.h b/lib/libc/include/sparcv9-linux-gnu/bits/msq-pad.h @@ -1,26 +0,0 @@ -/* Define where padding goes in struct msqid_ds. SPARC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_MSG_H -# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead." -#endif - -#include <bits/timesize.h> - -#define __MSQ_PAD_AFTER_TIME 0 -#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) -\ No newline at end of file diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/resource.h b/lib/libc/include/sparcv9-linux-gnu/bits/resource.h @@ -98,7 +98,7 @@ enum __rlimit_resource __RLIMIT_RTPRIO = 14, #define RLIMIT_RTPRIO __RLIMIT_RTPRIO - /* Maximum CPU time in µs that a process scheduled under a real-time + /* Maximum CPU time in microseconds that a process scheduled under a real-time scheduling policy may consume without making a blocking system call before being forcibly descheduled. */ __RLIMIT_RTTIME = 15, diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/sem-pad.h b/lib/libc/include/sparcv9-linux-gnu/bits/sem-pad.h @@ -1,26 +0,0 @@ -/* Define where padding goes in struct semid_ds. SPARC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SEM_H -# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." -#endif - -#include <bits/timesize.h> - -#define __SEM_PAD_AFTER_TIME 0 -#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32) -\ No newline at end of file diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/semaphore.h b/lib/libc/include/sparcv9-linux-gnu/bits/semaphore.h @@ -1,40 +0,0 @@ -/* Machine-specific POSIX semaphore type layouts. SPARC version. - Copyright (C) 2003-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SEMAPHORE_H -# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." -#endif - -#include <bits/wordsize.h> - -#if __WORDSIZE == 64 -# define __SIZEOF_SEM_T 32 -#else -# define __SIZEOF_SEM_T 16 -#endif - -/* Value returned if `sem_open' failed. */ -#define SEM_FAILED ((sem_t *) 0) - - -typedef union -{ - char __size[__SIZEOF_SEM_T]; - long int __align; -} sem_t; -\ No newline at end of file diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/shm-pad.h b/lib/libc/include/sparcv9-linux-gnu/bits/shm-pad.h @@ -1,28 +0,0 @@ -/* Define where padding goes in struct shmid_ds. SPARC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SHM_H -# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead." -#endif - -#include <bits/timesize.h> - -#define __SHM_PAD_AFTER_TIME 0 -#define __SHM_PAD_BEFORE_TIME (__TIMESIZE == 32) -#define __SHM_SEGSZ_AFTER_TIME 1 -#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 -\ No newline at end of file diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/signum-arch.h b/lib/libc/include/sparcv9-linux-gnu/bits/signum-arch.h @@ -0,0 +1,66 @@ +/* Signal number definitions. Linux/SPARC version. + Copyright (C) 1996-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _BITS_SIGNUM_ARCH_H +#define _BITS_SIGNUM_ARCH_H 1 + +#ifndef _SIGNAL_H +#error "Never include <bits/signum-arch.h> directly; use <signal.h> instead." +#endif + +/* Adjustments and additions to the signal number constants for + Linux/SPARC systems. Signal values on this platform were chosen + for SunOS binary compatibility. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGLOST 29 /* Resource lost (Sun); server died (GNU). */ +#define SIGPWR SIGLOST /* Power failure imminent (SysV). */ + +/* Historical signals specified by POSIX. */ +#define SIGBUS 10 /* Bus error. */ +#define SIGSYS 12 /* Bad system call. */ + +/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */ +#define SIGURG 16 /* Urgent data is available at a socket. */ +#define SIGSTOP 17 /* Stop, unblockable. */ +#define SIGTSTP 18 /* Keyboard stop. */ +#define SIGCONT 19 /* Continue. */ +#define SIGCHLD 20 /* Child terminated or stopped. */ +#define SIGTTIN 21 /* Background read from control terminal. */ +#define SIGTTOU 22 /* Background write to control terminal. */ +#define SIGPOLL 23 /* Pollable event occurred (System V). */ +#define SIGXCPU 24 /* CPU time limit exceeded. */ +#define SIGVTALRM 26 /* Virtual timer expired. */ +#define SIGPROF 27 /* Profiling timer expired. */ +#define SIGXFSZ 25 /* File size limit exceeded. */ +#define SIGUSR1 30 /* User-defined signal 1. */ +#define SIGUSR2 31 /* User-defined signal 2. */ + +/* Nonstandard signals found in all modern POSIX systems + (including both BSD and Linux). */ +#define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ + +/* Archaic names for compatibility. */ +#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ +#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */ +#define SIGCLD SIGCHLD /* Old System V name */ + +#define __SIGRTMIN 32 +#define __SIGRTMAX 64 + +#endif /* <signal.h> included. */ +\ No newline at end of file diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/signum.h b/lib/libc/include/sparcv9-linux-gnu/bits/signum.h @@ -1,39 +0,0 @@ -/* Signal number definitions. Linux/SPARC version. - Copyright (C) 1996-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include <bits/signum.h> directly; use <signal.h> instead." -#endif - -#include <bits/signum-generic.h> - -/* Adjustments and additions to the signal number constants for - Linux/SPARC systems. Signal values on this platform were chosen - for SunOS binary compatibility. */ - -#define SIGEMT 7 /* Emulator trap. */ -#define SIGLOST 29 /* Resource lost (Sun); server died (GNU). */ -#define SIGPWR SIGLOST /* Power failure imminent (SysV). */ - -#undef __SIGRTMAX -#define __SIGRTMAX 64 - -#endif /* <signal.h> included. */ -\ No newline at end of file diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/types/struct_msqid_ds.h b/lib/libc/include/sparcv9-linux-gnu/bits/types/struct_msqid_ds.h @@ -0,0 +1,47 @@ +/* Linux/SPARC implementation of the SysV message struct msqid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_MSG_H +# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead." +#endif + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ +#if __TIMESIZE == 32 + unsigned long int __msg_stime_high; + __time_t msg_stime; /* time of last msgsnd command */ + unsigned long int __msg_rtime_high; + __time_t msg_rtime; /* time of last msgsnd command */ + unsigned long int __msg_ctime_high; + __time_t msg_ctime; /* time of last change */ +#else + __time_t msg_stime; /* time of last msgsnd command */ + __time_t msg_rtime; /* time of last msgsnd command */ + __time_t msg_ctime; /* time of last change */ +#endif + __syscall_ulong_t __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ + __pid_t msg_lspid; /* pid of last msgsnd() */ + __pid_t msg_lrpid; /* pid of last msgrcv() */ + __syscall_ulong_t __glibc_reserved4; + __syscall_ulong_t __glibc_reserved5; +}; +\ No newline at end of file diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/types/struct_semid_ds.h b/lib/libc/include/sparcv9-linux-gnu/bits/types/struct_semid_ds.h @@ -0,0 +1,39 @@ +/* Sparc implementation of the semaphore struct semid_ds + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SEM_H +# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ +#if __TIMESIZE == 32 + __syscall_ulong_t __sem_otime_high; + __time_t sem_otime; /* last semop() time */ + __syscall_ulong_t __sem_ctime_high; + __time_t sem_ctime; /* last time changed by semctl() */ +#else + __time_t sem_otime; /* last semop() time */ + __time_t sem_ctime; /* last time changed by semctl() */ +#endif + __syscall_ulong_t sem_nsems; /* number of semaphores in set */ + __syscall_ulong_t __glibc_reserved3; + __syscall_ulong_t __glibc_reserved4; +}; +\ No newline at end of file diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/types/struct_shmid_ds.h b/lib/libc/include/sparcv9-linux-gnu/bits/types/struct_shmid_ds.h @@ -0,0 +1,45 @@ +/* Linux/SPARC implementation of the shared memory struct shmid_ds. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SHM_H +# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead." +#endif + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { + struct ipc_perm shm_perm; /* operation permission struct */ +#if __TIMESIZE == 32 + unsigned long int __shm_atime_high; + __time_t shm_atime; /* time of last shmat() */ + unsigned long int __shm_dtime_high; + __time_t shm_dtime; /* time of last shmdt() */ + unsigned long int __shm_ctime_high; + __time_t shm_ctime; /* time of last change by shmctl() */ +#else + __time_t shm_atime; /* time of last shmat() */ + __time_t shm_dtime; /* time of last shmdt() */ + __time_t shm_ctime; /* time of last change by shmctl() */ +#endif + size_t shm_segsz; /* size of segment in bytes */ + __pid_t shm_cpid; /* pid of creator */ + __pid_t shm_lpid; /* pid of last shmop */ + shmatt_t shm_nattch; /* number of current attaches */ + __syscall_ulong_t __glibc_reserved5; + __syscall_ulong_t __glibc_reserved6; + }; +\ No newline at end of file diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/typesizes.h b/lib/libc/include/sparcv9-linux-gnu/bits/typesizes.h @@ -50,6 +50,7 @@ #define __TIME_T_TYPE __SLONGWORD_TYPE #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __S32_TYPE +#define __SUSECONDS64_T_TYPE __SQUAD_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE @@ -75,10 +76,16 @@ /* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ # define __STATFS_MATCHES_STATFS64 1 + +/* And for getitimer, setitimer and rusage */ +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1 #else # define __RLIM_T_MATCHES_RLIM64_T 0 # define __STATFS_MATCHES_STATFS64 0 + +/* And for getitimer, setitimer and rusage */ +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0 #endif /* Number of descriptors that can fit in an `fd_set'. */ diff --git a/lib/libc/include/x86_64-linux-gnu/bits/fenv.h b/lib/libc/include/x86_64-linux-gnu/bits/fenv.h @@ -113,58 +113,4 @@ femode_t; /* Default floating-point control modes. */ # define FE_DFL_MODE ((const femode_t *) -1L) -#endif - - -#ifdef __USE_EXTERN_INLINES -__BEGIN_DECLS - -/* Optimized versions. */ -#ifndef _LIBC -extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), feraiseexcept); -#endif -__extern_always_inline void -__NTH (__feraiseexcept_invalid_divbyzero (int __excepts)) -{ - if ((FE_INVALID & __excepts) != 0) - { - /* One example of an invalid operation is 0.0 / 0.0. */ - float __f = 0.0; - -# ifdef __SSE_MATH__ - __asm__ __volatile__ ("divss %0, %0 " : : "x" (__f)); -# else - __asm__ __volatile__ ("fdiv %%st, %%st(0); fwait" - : "=t" (__f) : "0" (__f)); -# endif - (void) &__f; - } - if ((FE_DIVBYZERO & __excepts) != 0) - { - float __f = 1.0; - float __g = 0.0; - -# ifdef __SSE_MATH__ - __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g)); -# else - __asm__ __volatile__ ("fdivp %%st, %%st(1); fwait" - : "=t" (__f) : "0" (__f), "u" (__g) : "st(1)"); -# endif - (void) &__f; - } -} -__extern_inline int -__NTH (feraiseexcept (int __excepts)) -{ - if (__builtin_constant_p (__excepts) - && (__excepts & ~(FE_INVALID | FE_DIVBYZERO)) == 0) - { - __feraiseexcept_invalid_divbyzero (__excepts); - return 0; - } - - return __feraiseexcept_renamed (__excepts); -} - -__END_DECLS #endif \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnu/bits/long-double.h b/lib/libc/include/x86_64-linux-gnu/bits/long-double.h @@ -18,4 +18,4 @@ /* long double is distinct from double, so there is nothing to define here. */ -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 +\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnu/bits/select.h b/lib/libc/include/x86_64-linux-gnu/bits/select.h @@ -1,63 +0,0 @@ -/* Copyright (C) 1997-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SELECT_H -# error "Never use <bits/select.h> directly; include <sys/select.h> instead." -#endif - -#include <bits/wordsize.h> - - -#if defined __GNUC__ && __GNUC__ >= 2 - -# if __WORDSIZE == 64 -# define __FD_ZERO_STOS "stosq" -# else -# define __FD_ZERO_STOS "stosl" -# endif - -# define __FD_ZERO(fdsp) \ - do { \ - int __d0, __d1; \ - __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS \ - : "=c" (__d0), "=D" (__d1) \ - : "a" (0), "0" (sizeof (fd_set) \ - / sizeof (__fd_mask)), \ - "1" (&__FDS_BITS (fdsp)[0]) \ - : "memory"); \ - } while (0) - -#else /* ! GNU CC */ - -/* We don't use `memset' because this would require a prototype and - the array isn't too big. */ -# define __FD_ZERO(set) \ - do { \ - unsigned int __i; \ - fd_set *__arr = (set); \ - for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ - __FDS_BITS (__arr)[__i] = 0; \ - } while (0) - -#endif /* GNU CC */ - -#define __FD_SET(d, set) \ - ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d))) -#define __FD_CLR(d, set) \ - ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d))) -#define __FD_ISSET(d, set) \ - ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0) -\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnu/bits/sem-pad.h b/lib/libc/include/x86_64-linux-gnu/bits/sem-pad.h @@ -1,24 +0,0 @@ -/* Define where padding goes in struct semid_ds. x86 version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SEM_H -# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." -#endif - -#define __SEM_PAD_AFTER_TIME 1 -#define __SEM_PAD_BEFORE_TIME 0 -\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnu/bits/semaphore.h b/lib/libc/include/x86_64-linux-gnu/bits/semaphore.h @@ -1,40 +0,0 @@ -/* Copyright (C) 2002-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SEMAPHORE_H -# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." -#endif - -#include <bits/wordsize.h> - -#if __WORDSIZE == 64 -# define __SIZEOF_SEM_T 32 -#else -# define __SIZEOF_SEM_T 16 -#endif - - -/* Value returned if `sem_open' failed. */ -#define SEM_FAILED ((sem_t *) 0) - - -typedef union -{ - char __size[__SIZEOF_SEM_T]; - long int __align; -} sem_t; -\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnu/bits/sysctl.h b/lib/libc/include/x86_64-linux-gnu/bits/sysctl.h @@ -1,20 +0,0 @@ -/* Copyright (C) 2012-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#if defined __x86_64__ && defined __ILP32__ -# error "sysctl system call is unsupported in x32 kernel" -#endif -\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnu/bits/types/struct_semid_ds.h b/lib/libc/include/x86_64-linux-gnu/bits/types/struct_semid_ds.h @@ -0,0 +1,34 @@ +/* x86 implementation of the semaphore struct semid_ds. + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SEM_H +# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ + __time_t sem_otime; /* last semop() time */ + __syscall_ulong_t __sem_otime_high; + __time_t sem_ctime; /* last time changed by semctl() */ + __syscall_ulong_t __sem_ctime_high; + __syscall_ulong_t sem_nsems; /* number of semaphores in set */ + __syscall_ulong_t __glibc_reserved3; + __syscall_ulong_t __glibc_reserved4; +}; +\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h b/lib/libc/include/x86_64-linux-gnu/bits/typesizes.h @@ -64,6 +64,7 @@ #define __TIME_T_TYPE __SYSCALL_SLONG_TYPE #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE +#define __SUSECONDS64_T_TYPE __SQUAD_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE @@ -87,10 +88,15 @@ /* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ # define __STATFS_MATCHES_STATFS64 1 + +/* And for getitimer, setitimer and rusage */ +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1 #else # define __RLIM_T_MATCHES_RLIM64_T 0 # define __STATFS_MATCHES_STATFS64 0 + +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0 #endif /* Number of descriptors that can fit in an `fd_set'. */ diff --git a/lib/libc/include/x86_64-linux-gnu/gnu/lib-names-64.h b/lib/libc/include/x86_64-linux-gnu/gnu/lib-names-64.h @@ -20,8 +20,6 @@ #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" -#define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" diff --git a/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h b/lib/libc/include/x86_64-linux-gnu/gnu/stubs-64.h @@ -11,9 +11,7 @@ #define __stub_chflags #define __stub_fchflags #define __stub_gtty -#define __stub_lchmod #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn -#define __stub_sstk #define __stub_stty \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/fenv.h b/lib/libc/include/x86_64-linux-gnux32/bits/fenv.h @@ -113,58 +113,4 @@ femode_t; /* Default floating-point control modes. */ # define FE_DFL_MODE ((const femode_t *) -1L) -#endif - - -#ifdef __USE_EXTERN_INLINES -__BEGIN_DECLS - -/* Optimized versions. */ -#ifndef _LIBC -extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), feraiseexcept); -#endif -__extern_always_inline void -__NTH (__feraiseexcept_invalid_divbyzero (int __excepts)) -{ - if ((FE_INVALID & __excepts) != 0) - { - /* One example of an invalid operation is 0.0 / 0.0. */ - float __f = 0.0; - -# ifdef __SSE_MATH__ - __asm__ __volatile__ ("divss %0, %0 " : : "x" (__f)); -# else - __asm__ __volatile__ ("fdiv %%st, %%st(0); fwait" - : "=t" (__f) : "0" (__f)); -# endif - (void) &__f; - } - if ((FE_DIVBYZERO & __excepts) != 0) - { - float __f = 1.0; - float __g = 0.0; - -# ifdef __SSE_MATH__ - __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g)); -# else - __asm__ __volatile__ ("fdivp %%st, %%st(1); fwait" - : "=t" (__f) : "0" (__f), "u" (__g) : "st(1)"); -# endif - (void) &__f; - } -} -__extern_inline int -__NTH (feraiseexcept (int __excepts)) -{ - if (__builtin_constant_p (__excepts) - && (__excepts & ~(FE_INVALID | FE_DIVBYZERO)) == 0) - { - __feraiseexcept_invalid_divbyzero (__excepts); - return 0; - } - - return __feraiseexcept_renamed (__excepts); -} - -__END_DECLS #endif \ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/long-double.h b/lib/libc/include/x86_64-linux-gnux32/bits/long-double.h @@ -18,4 +18,4 @@ /* long double is distinct from double, so there is nothing to define here. */ -#define __LONG_DOUBLE_USES_FLOAT128 0 -\ No newline at end of file +#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 +\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/select.h b/lib/libc/include/x86_64-linux-gnux32/bits/select.h @@ -1,63 +0,0 @@ -/* Copyright (C) 1997-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SELECT_H -# error "Never use <bits/select.h> directly; include <sys/select.h> instead." -#endif - -#include <bits/wordsize.h> - - -#if defined __GNUC__ && __GNUC__ >= 2 - -# if __WORDSIZE == 64 -# define __FD_ZERO_STOS "stosq" -# else -# define __FD_ZERO_STOS "stosl" -# endif - -# define __FD_ZERO(fdsp) \ - do { \ - int __d0, __d1; \ - __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS \ - : "=c" (__d0), "=D" (__d1) \ - : "a" (0), "0" (sizeof (fd_set) \ - / sizeof (__fd_mask)), \ - "1" (&__FDS_BITS (fdsp)[0]) \ - : "memory"); \ - } while (0) - -#else /* ! GNU CC */ - -/* We don't use `memset' because this would require a prototype and - the array isn't too big. */ -# define __FD_ZERO(set) \ - do { \ - unsigned int __i; \ - fd_set *__arr = (set); \ - for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ - __FDS_BITS (__arr)[__i] = 0; \ - } while (0) - -#endif /* GNU CC */ - -#define __FD_SET(d, set) \ - ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d))) -#define __FD_CLR(d, set) \ - ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d))) -#define __FD_ISSET(d, set) \ - ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0) -\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/sem-pad.h b/lib/libc/include/x86_64-linux-gnux32/bits/sem-pad.h @@ -1,24 +0,0 @@ -/* Define where padding goes in struct semid_ds. x86 version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SYS_SEM_H -# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead." -#endif - -#define __SEM_PAD_AFTER_TIME 1 -#define __SEM_PAD_BEFORE_TIME 0 -\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/semaphore.h b/lib/libc/include/x86_64-linux-gnux32/bits/semaphore.h @@ -1,40 +0,0 @@ -/* Copyright (C) 2002-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#ifndef _SEMAPHORE_H -# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." -#endif - -#include <bits/wordsize.h> - -#if __WORDSIZE == 64 -# define __SIZEOF_SEM_T 32 -#else -# define __SIZEOF_SEM_T 16 -#endif - - -/* Value returned if `sem_open' failed. */ -#define SEM_FAILED ((sem_t *) 0) - - -typedef union -{ - char __size[__SIZEOF_SEM_T]; - long int __align; -} sem_t; -\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/sysctl.h b/lib/libc/include/x86_64-linux-gnux32/bits/sysctl.h @@ -1,20 +0,0 @@ -/* Copyright (C) 2012-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#if defined __x86_64__ && defined __ILP32__ -# error "sysctl system call is unsupported in x32 kernel" -#endif -\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/types/struct_semid_ds.h b/lib/libc/include/x86_64-linux-gnux32/bits/types/struct_semid_ds.h @@ -0,0 +1,34 @@ +/* x86 implementation of the semaphore struct semid_ds. + Copyright (C) 1995-2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + +#ifndef _SYS_SEM_H +# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ + struct ipc_perm sem_perm; /* operation permission struct */ + __time_t sem_otime; /* last semop() time */ + __syscall_ulong_t __sem_otime_high; + __time_t sem_ctime; /* last time changed by semctl() */ + __syscall_ulong_t __sem_ctime_high; + __syscall_ulong_t sem_nsems; /* number of semaphores in set */ + __syscall_ulong_t __glibc_reserved3; + __syscall_ulong_t __glibc_reserved4; +}; +\ No newline at end of file diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/typesizes.h b/lib/libc/include/x86_64-linux-gnux32/bits/typesizes.h @@ -64,6 +64,7 @@ #define __TIME_T_TYPE __SYSCALL_SLONG_TYPE #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE +#define __SUSECONDS64_T_TYPE __SQUAD_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE @@ -87,10 +88,15 @@ /* And for fsblkcnt_t, fsblkcnt64_t, fsfilcnt_t and fsfilcnt64_t. */ # define __STATFS_MATCHES_STATFS64 1 + +/* And for getitimer, setitimer and rusage */ +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 1 #else # define __RLIM_T_MATCHES_RLIM64_T 0 # define __STATFS_MATCHES_STATFS64 0 + +# define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 0 #endif /* Number of descriptors that can fit in an `fd_set'. */ diff --git a/lib/libc/include/x86_64-linux-gnux32/gnu/lib-names-x32.h b/lib/libc/include/x86_64-linux-gnux32/gnu/lib-names-x32.h @@ -20,8 +20,6 @@ #define LIBNSS_FILES_SO "libnss_files.so.2" #define LIBNSS_HESIOD_SO "libnss_hesiod.so.2" #define LIBNSS_LDAP_SO "libnss_ldap.so.2" -#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2" -#define LIBNSS_NIS_SO "libnss_nis.so.2" #define LIBNSS_TEST1_SO "libnss_test1.so.2" #define LIBNSS_TEST2_SO "libnss_test2.so.2" #define LIBPTHREAD_SO "libpthread.so.0" diff --git a/lib/libc/include/x86_64-linux-gnux32/gnu/stubs-x32.h b/lib/libc/include/x86_64-linux-gnux32/gnu/stubs-x32.h @@ -16,9 +16,7 @@ #define __stub_chflags #define __stub_fchflags #define __stub_gtty -#define __stub_lchmod #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn -#define __stub_sstk #define __stub_stty \ No newline at end of file diff --git a/lib/std/child_process.zig b/lib/std/child_process.zig @@ -396,12 +396,12 @@ pub const ChildProcess = struct { // and execve from the child process to the parent process. const err_pipe = blk: { if (builtin.os.tag == .linux) { - const fd = try os.eventfd(0, 0); + const fd = try os.eventfd(0, os.EFD_CLOEXEC); // There's no distinction between the readable and the writeable // end with eventfd break :blk [2]os.fd_t{ fd, fd }; } else { - break :blk try os.pipe(); + break :blk try os.pipe2(os.O_CLOEXEC); } }; errdefer destroyPipe(err_pipe); diff --git a/lib/std/fs/test.zig b/lib/std/fs/test.zig @@ -25,12 +25,20 @@ test "Dir.readLink" { { // Create symbolic link by path - try tmp.dir.symLink("file.txt", "symlink1", .{}); + tmp.dir.symLink("file.txt", "symlink1", .{}) catch |err| switch (err) { + // Symlink requires admin privileges on windows, so this test can legitimately fail. + error.AccessDenied => return error.SkipZigTest, + else => return err, + }; try testReadLink(tmp.dir, "file.txt", "symlink1"); } { // Create symbolic link by path - try tmp.dir.symLink("subdir", "symlink2", .{ .is_directory = true }); + tmp.dir.symLink("subdir", "symlink2", .{ .is_directory = true }) catch |err| switch (err) { + // Symlink requires admin privileges on windows, so this test can legitimately fail. + error.AccessDenied => return error.SkipZigTest, + else => return err, + }; try testReadLink(tmp.dir, "subdir", "symlink2"); } } @@ -66,7 +74,11 @@ test "readLinkAbsolute" { const symlink_path = try fs.path.join(allocator, &[_][]const u8{ base_path, "symlink1" }); // Create symbolic link by path - try fs.symLinkAbsolute(target_path, symlink_path, .{}); + fs.symLinkAbsolute(target_path, symlink_path, .{}) catch |err| switch (err) { + // Symlink requires admin privileges on windows, so this test can legitimately fail. + error.AccessDenied => return error.SkipZigTest, + else => return err, + }; try testReadLinkAbsolute(target_path, symlink_path); } { @@ -74,7 +86,11 @@ test "readLinkAbsolute" { const symlink_path = try fs.path.join(allocator, &[_][]const u8{ base_path, "symlink2" }); // Create symbolic link by path - try fs.symLinkAbsolute(target_path, symlink_path, .{ .is_directory = true }); + fs.symLinkAbsolute(target_path, symlink_path, .{ .is_directory = true }) catch |err| switch (err) { + // Symlink requires admin privileges on windows, so this test can legitimately fail. + error.AccessDenied => return error.SkipZigTest, + else => return err, + }; try testReadLinkAbsolute(target_path, symlink_path); } } diff --git a/lib/std/heap/general_purpose_allocator.zig b/lib/std/heap/general_purpose_allocator.zig @@ -561,24 +561,25 @@ pub fn GeneralPurposeAllocator(comptime config: Config) type { return error.OutOfMemory; } + // Returns true if an allocation of `size` bytes is within the specified + // limits if enable_memory_limit is true + fn isAllocationAllowed(self: *Self, size: usize) bool { + if (config.enable_memory_limit) { + const new_req_bytes = self.total_requested_bytes + size; + if (new_req_bytes > self.requested_memory_limit) + return false; + self.total_requested_bytes = new_req_bytes; + } + + return true; + } + fn alloc(allocator: *Allocator, len: usize, ptr_align: u29, len_align: u29, ret_addr: usize) Error![]u8 { const self = @fieldParentPtr(Self, "allocator", allocator); const held = self.mutex.acquire(); defer held.release(); - const prev_req_bytes = self.total_requested_bytes; - if (config.enable_memory_limit) { - const new_req_bytes = prev_req_bytes + len; - if (new_req_bytes > self.requested_memory_limit) { - return error.OutOfMemory; - } - self.total_requested_bytes = new_req_bytes; - } - errdefer if (config.enable_memory_limit) { - self.total_requested_bytes = prev_req_bytes; - }; - const new_aligned_size = math.max(len, ptr_align); if (new_aligned_size > largest_bucket_object_size) { try self.large_allocations.ensureCapacity( @@ -588,17 +589,30 @@ pub fn GeneralPurposeAllocator(comptime config: Config) type { const slice = try self.backing_allocator.allocFn(self.backing_allocator, len, ptr_align, len_align, ret_addr); + // The backing allocator may return a memory block bigger than + // `len`, use the effective size for bookkeeping purposes + if (!self.isAllocationAllowed(slice.len)) { + // Free the block so no memory is leaked + const new_len = try self.backing_allocator.resizeFn(self.backing_allocator, slice, ptr_align, 0, 0, ret_addr); + assert(new_len == 0); + return error.OutOfMemory; + } + const gop = self.large_allocations.getOrPutAssumeCapacity(@ptrToInt(slice.ptr)); assert(!gop.found_existing); // This would mean the kernel double-mapped pages. gop.entry.value.bytes = slice; collectStackTrace(ret_addr, &gop.entry.value.stack_addresses); return slice; - } else { - const new_size_class = math.ceilPowerOfTwoAssert(usize, new_aligned_size); - const ptr = try self.allocSlot(new_size_class, ret_addr); - return ptr[0..len]; } + + if (!self.isAllocationAllowed(len)) { + return error.OutOfMemory; + } + + const new_size_class = math.ceilPowerOfTwoAssert(usize, new_aligned_size); + const ptr = try self.allocSlot(new_size_class, ret_addr); + return ptr[0..len]; } fn createBucket(self: *Self, size_class: usize, bucket_index: usize) Error!*BucketHeader { diff --git a/lib/std/macho.zig b/lib/std/macho.zig @@ -81,6 +81,182 @@ pub const symtab_command = extern struct { strsize: u32, }; +/// This is the second set of the symbolic information which is used to support +/// the data structures for the dynamically link editor. +/// +/// The original set of symbolic information in the symtab_command which contains +/// the symbol and string tables must also be present when this load command is +/// present. When this load command is present the symbol table is organized +/// into three groups of symbols: +/// local symbols (static and debugging symbols) - grouped by module +/// defined external symbols - grouped by module (sorted by name if not lib) +/// undefined external symbols (sorted by name if MH_BINDATLOAD is not set, +/// and in order the were seen by the static +/// linker if MH_BINDATLOAD is set) +/// In this load command there are offsets and counts to each of the three groups +/// of symbols. +/// +/// This load command contains a the offsets and sizes of the following new +/// symbolic information tables: +/// table of contents +/// module table +/// reference symbol table +/// indirect symbol table +/// The first three tables above (the table of contents, module table and +/// reference symbol table) are only present if the file is a dynamically linked +/// shared library. For executable and object modules, which are files +/// containing only one module, the information that would be in these three +/// tables is determined as follows: +/// table of contents - the defined external symbols are sorted by name +/// module table - the file contains only one module so everything in the +/// file is part of the module. +/// reference symbol table - is the defined and undefined external symbols +/// +/// For dynamically linked shared library files this load command also contains +/// offsets and sizes to the pool of relocation entries for all sections +/// separated into two groups: +/// external relocation entries +/// local relocation entries +/// For executable and object modules the relocation entries continue to hang +/// off the section structures. +pub const dysymtab_command = extern struct { + /// LC_DYSYMTAB + cmd: u32, + + /// sizeof(struct dysymtab_command) + cmdsize: u32, + + // The symbols indicated by symoff and nsyms of the LC_SYMTAB load command + // are grouped into the following three groups: + // local symbols (further grouped by the module they are from) + // defined external symbols (further grouped by the module they are from) + // undefined symbols + // + // The local symbols are used only for debugging. The dynamic binding + // process may have to use them to indicate to the debugger the local + // symbols for a module that is being bound. + // + // The last two groups are used by the dynamic binding process to do the + // binding (indirectly through the module table and the reference symbol + // table when this is a dynamically linked shared library file). + + /// index of local symbols + ilocalsym: u32, + + /// number of local symbols + nlocalsym: u32, + + /// index to externally defined symbols + iextdefsym: u32, + + /// number of externally defined symbols + nextdefsym: u32, + + /// index to undefined symbols + iundefsym: u32, + + /// number of undefined symbols + nundefsym: u32, + + // For the for the dynamic binding process to find which module a symbol + // is defined in the table of contents is used (analogous to the ranlib + // structure in an archive) which maps defined external symbols to modules + // they are defined in. This exists only in a dynamically linked shared + // library file. For executable and object modules the defined external + // symbols are sorted by name and is use as the table of contents. + + /// file offset to table of contents + tocoff: u32, + + /// number of entries in table of contents + ntoc: u32, + + // To support dynamic binding of "modules" (whole object files) the symbol + // table must reflect the modules that the file was created from. This is + // done by having a module table that has indexes and counts into the merged + // tables for each module. The module structure that these two entries + // refer to is described below. This exists only in a dynamically linked + // shared library file. For executable and object modules the file only + // contains one module so everything in the file belongs to the module. + + /// file offset to module table + modtaboff: u32, + + /// number of module table entries + nmodtab: u32, + + // To support dynamic module binding the module structure for each module + // indicates the external references (defined and undefined) each module + // makes. For each module there is an offset and a count into the + // reference symbol table for the symbols that the module references. + // This exists only in a dynamically linked shared library file. For + // executable and object modules the defined external symbols and the + // undefined external symbols indicates the external references. + + /// offset to referenced symbol table + extrefsymoff: u32, + + /// number of referenced symbol table entries + nextrefsyms: u32, + + // The sections that contain "symbol pointers" and "routine stubs" have + // indexes and (implied counts based on the size of the section and fixed + // size of the entry) into the "indirect symbol" table for each pointer + // and stub. For every section of these two types the index into the + // indirect symbol table is stored in the section header in the field + // reserved1. An indirect symbol table entry is simply a 32bit index into + // the symbol table to the symbol that the pointer or stub is referring to. + // The indirect symbol table is ordered to match the entries in the section. + + /// file offset to the indirect symbol table + indirectsymoff: u32, + + /// number of indirect symbol table entries + nindirectsyms: u32, + + // To support relocating an individual module in a library file quickly the + // external relocation entries for each module in the library need to be + // accessed efficiently. Since the relocation entries can't be accessed + // through the section headers for a library file they are separated into + // groups of local and external entries further grouped by module. In this + // case the presents of this load command who's extreloff, nextrel, + // locreloff and nlocrel fields are non-zero indicates that the relocation + // entries of non-merged sections are not referenced through the section + // structures (and the reloff and nreloc fields in the section headers are + // set to zero). + // + // Since the relocation entries are not accessed through the section headers + // this requires the r_address field to be something other than a section + // offset to identify the item to be relocated. In this case r_address is + // set to the offset from the vmaddr of the first LC_SEGMENT command. + // For MH_SPLIT_SEGS images r_address is set to the the offset from the + // vmaddr of the first read-write LC_SEGMENT command. + // + // The relocation entries are grouped by module and the module table + // entries have indexes and counts into them for the group of external + // relocation entries for that the module. + // + // For sections that are merged across modules there must not be any + // remaining external relocation entries for them (for merged sections + // remaining relocation entries must be local). + + /// offset to external relocation entries + extreloff: u32, + + /// number of external relocation entries + nextrel: u32, + + // All the local relocation entries are grouped together (they are not + // grouped by their module since they are only used if the object is moved + // from it staticly link edited address). + + /// offset to local relocation entries + locreloff: u32, + + /// number of local relocation entries + nlocrel: u32, +}; + /// The linkedit_data_command contains the offsets and sizes of a blob /// of data in the __LINKEDIT segment. pub const linkedit_data_command = extern struct { @@ -97,6 +273,127 @@ pub const linkedit_data_command = extern struct { datasize: u32, }; +/// The dyld_info_command contains the file offsets and sizes of +/// the new compressed form of the information dyld needs to +/// load the image. This information is used by dyld on Mac OS X +/// 10.6 and later. All information pointed to by this command +/// is encoded using byte streams, so no endian swapping is needed +/// to interpret it. +pub const dyld_info_command = extern struct { + /// LC_DYLD_INFO or LC_DYLD_INFO_ONLY + cmd: u32, + + /// sizeof(struct dyld_info_command) + cmdsize: u32, + + // Dyld rebases an image whenever dyld loads it at an address different + // from its preferred address. The rebase information is a stream + // of byte sized opcodes whose symbolic names start with REBASE_OPCODE_. + // Conceptually the rebase information is a table of tuples: + // <seg-index, seg-offset, type> + // The opcodes are a compressed way to encode the table by only + // encoding when a column changes. In addition simple patterns + // like "every n'th offset for m times" can be encoded in a few + // bytes. + + /// file offset to rebase info + rebase_off: u32, + + /// size of rebase info + rebase_size: u32, + + // Dyld binds an image during the loading process, if the image + // requires any pointers to be initialized to symbols in other images. + // The bind information is a stream of byte sized + // opcodes whose symbolic names start with BIND_OPCODE_. + // Conceptually the bind information is a table of tuples: + // <seg-index, seg-offset, type, symbol-library-ordinal, symbol-name, addend> + // The opcodes are a compressed way to encode the table by only + // encoding when a column changes. In addition simple patterns + // like for runs of pointers initialzed to the same value can be + // encoded in a few bytes. + + /// file offset to binding info + bind_off: u32, + + /// size of binding info + bind_size: u32, + + // Some C++ programs require dyld to unique symbols so that all + // images in the process use the same copy of some code/data. + // This step is done after binding. The content of the weak_bind + // info is an opcode stream like the bind_info. But it is sorted + // alphabetically by symbol name. This enable dyld to walk + // all images with weak binding information in order and look + // for collisions. If there are no collisions, dyld does + // no updating. That means that some fixups are also encoded + // in the bind_info. For instance, all calls to "operator new" + // are first bound to libstdc++.dylib using the information + // in bind_info. Then if some image overrides operator new + // that is detected when the weak_bind information is processed + // and the call to operator new is then rebound. + + /// file offset to weak binding info + weak_bind_off: u32, + + /// size of weak binding info + weak_bind_size: u32, + + // Some uses of external symbols do not need to be bound immediately. + // Instead they can be lazily bound on first use. The lazy_bind + // are contains a stream of BIND opcodes to bind all lazy symbols. + // Normal use is that dyld ignores the lazy_bind section when + // loading an image. Instead the static linker arranged for the + // lazy pointer to initially point to a helper function which + // pushes the offset into the lazy_bind area for the symbol + // needing to be bound, then jumps to dyld which simply adds + // the offset to lazy_bind_off to get the information on what + // to bind. + + /// file offset to lazy binding info + lazy_bind_off: u32, + + /// size of lazy binding info + lazy_bind_size: u32, + + // The symbols exported by a dylib are encoded in a trie. This + // is a compact representation that factors out common prefixes. + // It also reduces LINKEDIT pages in RAM because it encodes all + // information (name, address, flags) in one small, contiguous range. + // The export area is a stream of nodes. The first node sequentially + // is the start node for the trie. + // + // Nodes for a symbol start with a uleb128 that is the length of + // the exported symbol information for the string so far. + // If there is no exported symbol, the node starts with a zero byte. + // If there is exported info, it follows the length. + // + // First is a uleb128 containing flags. Normally, it is followed by + // a uleb128 encoded offset which is location of the content named + // by the symbol from the mach_header for the image. If the flags + // is EXPORT_SYMBOL_FLAGS_REEXPORT, then following the flags is + // a uleb128 encoded library ordinal, then a zero terminated + // UTF8 string. If the string is zero length, then the symbol + // is re-export from the specified dylib with the same name. + // If the flags is EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER, then following + // the flags is two uleb128s: the stub offset and the resolver offset. + // The stub is used by non-lazy pointers. The resolver is used + // by lazy pointers and must be called to get the actual address to use. + // + // After the optional exported symbol information is a byte of + // how many edges (0-255) that this node has leaving it, + // followed by each edge. + // Each edge is a zero terminated UTF8 of the addition chars + // in the symbol, followed by a uleb128 offset for the node that + // edge points to. + + /// file offset to lazy binding info + export_off: u32, + + /// size of lazy binding info + export_size: u32, +}; + /// A program that uses a dynamic linker contains a dylinker_command to identify /// the name of the dynamic linker (LC_LOAD_DYLINKER). And a dynamic linker /// contains a dylinker_command to identify the dynamic linker (LC_ID_DYLINKER). @@ -681,6 +978,24 @@ pub const N_TYPE = 0x0e; /// external symbol bit, set for external symbols pub const N_EXT = 0x01; +/// symbol is undefined +pub const N_UNDF = 0x0; + +/// symbol is absolute +pub const N_ABS = 0x2; + +/// symbol is defined in the section number given in n_sect +pub const N_SECT = 0xe; + +/// symbol is undefined and the image is using a prebound +/// value for the symbol +pub const N_PBUD = 0xc; + +/// symbol is defined to be the same as another symbol; the n_value +/// field is an index into the string table specifying the name of the +/// other symbol +pub const N_INDR = 0xa; + /// global symbol: name,,NO_SECT,type,0 pub const N_GSYM = 0x20; @@ -781,6 +1096,35 @@ pub const N_LENG = 0xfe; /// a debug section pub const S_ATTR_DEBUG = 0x02000000; +/// section contains only true machine instructions +pub const S_ATTR_PURE_INSTRUCTIONS = 0x80000000; + +/// section contains coalesced symbols that are not to be in a ranlib +/// table of contents +pub const S_ATTR_NO_TOC = 0x40000000; + +/// ok to strip static symbols in this section in files with the +/// MH_DYLDLINK flag +pub const S_ATTR_STRIP_STATIC_SYMS = 0x20000000; + +/// no dead stripping +pub const S_ATTR_NO_DEAD_STRIP = 0x10000000; + +/// blocks are live if they reference live blocks +pub const S_ATTR_LIVE_SUPPORT = 0x8000000; + +/// used with i386 code stubs written on by dyld +pub const S_ATTR_SELF_MODIFYING_CODE = 0x4000000; + +/// section contains some machine instructions +pub const S_ATTR_SOME_INSTRUCTIONS = 0x400; + +/// section has external relocation entries +pub const S_ATTR_EXT_RELOC = 0x200; + +/// section has local relocation entries +pub const S_ATTR_LOC_RELOC = 0x100; + pub const cpu_type_t = integer_t; pub const cpu_subtype_t = integer_t; pub const integer_t = c_int; diff --git a/lib/std/math.zig b/lib/std/math.zig @@ -596,6 +596,59 @@ fn testDivFloor() void { testing.expect((divFloor(f32, -5.0, 3.0) catch unreachable) == -2.0); } +pub fn divCeil(comptime T: type, numerator: T, denominator: T) !T { + @setRuntimeSafety(false); + if (comptime std.meta.trait.isNumber(T) and denominator == 0) return error.DivisionByZero; + const info = @typeInfo(T); + switch (info) { + .ComptimeFloat, .Float => return @ceil(numerator / denominator), + .ComptimeInt, .Int => { + if (numerator < 0 and denominator < 0) { + if (info == .Int and numerator == minInt(T) and denominator == -1) + return error.Overflow; + return @divFloor(numerator + 1, denominator) + 1; + } + if (numerator > 0 and denominator > 0) + return @divFloor(numerator - 1, denominator) + 1; + return @divTrunc(numerator, denominator); + }, + else => @compileError("divCeil unsupported on " ++ @typeName(T)), + } +} + +test "math.divCeil" { + testDivCeil(); + comptime testDivCeil(); +} +fn testDivCeil() void { + testing.expectEqual(@as(i32, 2), divCeil(i32, 5, 3) catch unreachable); + testing.expectEqual(@as(i32, -1), divCeil(i32, -5, 3) catch unreachable); + testing.expectEqual(@as(i32, -1), divCeil(i32, 5, -3) catch unreachable); + testing.expectEqual(@as(i32, 2), divCeil(i32, -5, -3) catch unreachable); + testing.expectEqual(@as(i32, 0), divCeil(i32, 0, 5) catch unreachable); + testing.expectEqual(@as(u32, 0), divCeil(u32, 0, 5) catch unreachable); + testing.expectError(error.DivisionByZero, divCeil(i8, -5, 0)); + testing.expectError(error.Overflow, divCeil(i8, -128, -1)); + + testing.expectEqual(@as(f32, 0.0), divCeil(f32, 0.0, 5.0) catch unreachable); + testing.expectEqual(@as(f32, 2.0), divCeil(f32, 5.0, 3.0) catch unreachable); + testing.expectEqual(@as(f32, -1.0), divCeil(f32, -5.0, 3.0) catch unreachable); + testing.expectEqual(@as(f32, -1.0), divCeil(f32, 5.0, -3.0) catch unreachable); + testing.expectEqual(@as(f32, 2.0), divCeil(f32, -5.0, -3.0) catch unreachable); + + testing.expectEqual(6, divCeil(comptime_int, 23, 4) catch unreachable); + testing.expectEqual(-5, divCeil(comptime_int, -23, 4) catch unreachable); + testing.expectEqual(-5, divCeil(comptime_int, 23, -4) catch unreachable); + testing.expectEqual(6, divCeil(comptime_int, -23, -4) catch unreachable); + testing.expectError(error.DivisionByZero, divCeil(comptime_int, 23, 0)); + + testing.expectEqual(6.0, divCeil(comptime_float, 23.0, 4.0) catch unreachable); + testing.expectEqual(-5.0, divCeil(comptime_float, -23.0, 4.0) catch unreachable); + testing.expectEqual(-5.0, divCeil(comptime_float, 23.0, -4.0) catch unreachable); + testing.expectEqual(6.0, divCeil(comptime_float, -23.0, -4.0) catch unreachable); + testing.expectError(error.DivisionByZero, divCeil(comptime_float, 23.0, 0.0)); +} + pub fn divExact(comptime T: type, numerator: T, denominator: T) !T { @setRuntimeSafety(false); if (denominator == 0) return error.DivisionByZero; diff --git a/lib/std/meta/trailer_flags.zig b/lib/std/meta/trailer_flags.zig @@ -8,6 +8,7 @@ const meta = std.meta; const testing = std.testing; const mem = std.mem; const assert = std.debug.assert; +const TypeInfo = std.builtin.TypeInfo; /// This is useful for saving memory when allocating an object that has many /// optional components. The optional objects are allocated sequentially in @@ -17,91 +18,125 @@ pub fn TrailerFlags(comptime Fields: type) type { return struct { bits: Int, - pub const Int = @Type(.{ .Int = .{ .bits = bit_count, .is_signed = false } }); + pub const Int = meta.Int(false, bit_count); pub const bit_count = @typeInfo(Fields).Struct.fields.len; + pub const FieldEnum = blk: { + comptime var fields: [bit_count]TypeInfo.EnumField = undefined; + inline for (@typeInfo(Fields).Struct.fields) |struct_field, i| + fields[i] = .{ .name = struct_field.name, .value = i }; + break :blk @Type(.{ + .Enum = .{ + .layout = .Auto, + .tag_type = std.math.IntFittingRange(0, bit_count - 1), + .fields = &fields, + .decls = &[_]TypeInfo.Declaration{}, + .is_exhaustive = true, + }, + }); + }; + + pub const InitStruct = blk: { + comptime var fields: [bit_count]TypeInfo.StructField = undefined; + inline for (@typeInfo(Fields).Struct.fields) |struct_field, i| { + fields[i] = TypeInfo.StructField{ + .name = struct_field.name, + .field_type = ?struct_field.field_type, + .default_value = @as( + ??struct_field.field_type, + @as(?struct_field.field_type, null), + ), + }; + } + break :blk @Type(.{ + .Struct = .{ + .layout = .Auto, + .fields = &fields, + .decls = &[_]TypeInfo.Declaration{}, + .is_tuple = false, + }, + }); + }; + pub const Self = @This(); - pub fn has(self: Self, comptime name: []const u8) bool { - const field_index = meta.fieldIndex(Fields, name).?; + pub fn has(self: Self, comptime field: FieldEnum) bool { + const field_index = @enumToInt(field); return (self.bits & (1 << field_index)) != 0; } - pub fn get(self: Self, p: [*]align(@alignOf(Fields)) const u8, comptime name: []const u8) ?Field(name) { - if (!self.has(name)) + pub fn get(self: Self, p: [*]align(@alignOf(Fields)) const u8, comptime field: FieldEnum) ?Field(field) { + if (!self.has(field)) return null; - return self.ptrConst(p, name).*; + return self.ptrConst(p, field).*; } - pub fn setFlag(self: *Self, comptime name: []const u8) void { - const field_index = meta.fieldIndex(Fields, name).?; + pub fn setFlag(self: *Self, comptime field: FieldEnum) void { + const field_index = @enumToInt(field); self.bits |= 1 << field_index; } /// `fields` is a struct with each field set to an optional value. - /// Missing fields are assumed to be `null`. /// Only the non-null bits are observed and are used to set the flag bits. - pub fn init(fields: anytype) Self { + pub fn init(fields: InitStruct) Self { var self: Self = .{ .bits = 0 }; - inline for (@typeInfo(@TypeOf(fields)).Struct.fields) |field| { - const opt: ?Field(field.name) = @field(fields, field.name); - const field_index = meta.fieldIndex(Fields, field.name).?; - self.bits |= @as(Int, @boolToInt(opt != null)) << field_index; + inline for (@typeInfo(Fields).Struct.fields) |field, i| { + if (@field(fields, field.name)) |_| + self.bits |= 1 << i; } return self; } /// `fields` is a struct with each field set to an optional value (same as `init`). - /// Missing fields are assumed to be `null`. - pub fn setMany(self: Self, p: [*]align(@alignOf(Fields)) u8, fields: anytype) void { - inline for (@typeInfo(@TypeOf(fields)).Struct.fields) |field| { - const opt: ?Field(field.name) = @field(fields, field.name); - if (opt) |value| { - self.set(p, field.name, value); - } + pub fn setMany(self: Self, p: [*]align(@alignOf(Fields)) u8, fields: InitStruct) void { + inline for (@typeInfo(Fields).Struct.fields) |field, i| { + if (@field(fields, field.name)) |value| + self.set(p, @intToEnum(FieldEnum, i), value); } } pub fn set( self: Self, p: [*]align(@alignOf(Fields)) u8, - comptime name: []const u8, - value: Field(name), + comptime field: FieldEnum, + value: Field(field), ) void { - self.ptr(p, name).* = value; + self.ptr(p, field).* = value; } - pub fn ptr(self: Self, p: [*]align(@alignOf(Fields)) u8, comptime name: []const u8) *Field(name) { - if (@sizeOf(Field(name)) == 0) + pub fn ptr(self: Self, p: [*]align(@alignOf(Fields)) u8, comptime field: FieldEnum) *Field(field) { + if (@sizeOf(Field(field)) == 0) return undefined; - const off = self.offset(p, name); - return @ptrCast(*Field(name), @alignCast(@alignOf(Field(name)), p + off)); + const off = self.offset(p, field); + return @ptrCast(*Field(field), @alignCast(@alignOf(Field(field)), p + off)); } - pub fn ptrConst(self: Self, p: [*]align(@alignOf(Fields)) const u8, comptime name: []const u8) *const Field(name) { - if (@sizeOf(Field(name)) == 0) + pub fn ptrConst(self: Self, p: [*]align(@alignOf(Fields)) const u8, comptime field: FieldEnum) *const Field(field) { + if (@sizeOf(Field(field)) == 0) return undefined; - const off = self.offset(p, name); - return @ptrCast(*const Field(name), @alignCast(@alignOf(Field(name)), p + off)); + const off = self.offset(p, field); + return @ptrCast(*const Field(field), @alignCast(@alignOf(Field(field)), p + off)); } - pub fn offset(self: Self, p: [*]align(@alignOf(Fields)) const u8, comptime name: []const u8) usize { + pub fn offset(self: Self, p: [*]align(@alignOf(Fields)) const u8, comptime field: FieldEnum) usize { var off: usize = 0; - inline for (@typeInfo(Fields).Struct.fields) |field, i| { + inline for (@typeInfo(Fields).Struct.fields) |field_info, i| { const active = (self.bits & (1 << i)) != 0; - if (comptime mem.eql(u8, field.name, name)) { + if (i == @enumToInt(field)) { assert(active); - return mem.alignForwardGeneric(usize, off, @alignOf(field.field_type)); + return mem.alignForwardGeneric(usize, off, @alignOf(field_info.field_type)); } else if (active) { - off = mem.alignForwardGeneric(usize, off, @alignOf(field.field_type)); - off += @sizeOf(field.field_type); + off = mem.alignForwardGeneric(usize, off, @alignOf(field_info.field_type)); + off += @sizeOf(field_info.field_type); } } - @compileError("no field named " ++ name ++ " in type " ++ @typeName(Fields)); } - pub fn Field(comptime name: []const u8) type { - return meta.fieldInfo(Fields, name).field_type; + pub fn Field(comptime field: FieldEnum) type { + inline for (@typeInfo(Fields).Struct.fields) |field_info, i| { + if (i == @enumToInt(field)) + return field_info.field_type; + } } pub fn sizeInBytes(self: Self) usize { @@ -125,6 +160,8 @@ test "TrailerFlags" { b: bool, c: u64, }); + testing.expectEqual(u2, @TagType(Flags.FieldEnum)); + var flags = Flags.init(.{ .b = true, .c = 1234, @@ -132,19 +169,19 @@ test "TrailerFlags" { const slice = try testing.allocator.allocAdvanced(u8, 8, flags.sizeInBytes(), .exact); defer testing.allocator.free(slice); - flags.set(slice.ptr, "b", false); - flags.set(slice.ptr, "c", 12345678); + flags.set(slice.ptr, .b, false); + flags.set(slice.ptr, .c, 12345678); - testing.expect(flags.get(slice.ptr, "a") == null); - testing.expect(!flags.get(slice.ptr, "b").?); - testing.expect(flags.get(slice.ptr, "c").? == 12345678); + testing.expect(flags.get(slice.ptr, .a) == null); + testing.expect(!flags.get(slice.ptr, .b).?); + testing.expect(flags.get(slice.ptr, .c).? == 12345678); flags.setMany(slice.ptr, .{ .b = true, .c = 5678, }); - testing.expect(flags.get(slice.ptr, "a") == null); - testing.expect(flags.get(slice.ptr, "b").?); - testing.expect(flags.get(slice.ptr, "c").? == 5678); + testing.expect(flags.get(slice.ptr, .a) == null); + testing.expect(flags.get(slice.ptr, .b).?); + testing.expect(flags.get(slice.ptr, .c).? == 5678); } diff --git a/lib/std/os/test.zig b/lib/std/os/test.zig @@ -125,7 +125,20 @@ test "symlink with relative paths" { try cwd.writeFile("file.txt", "nonsense"); if (builtin.os.tag == .windows) { - try os.windows.CreateSymbolicLink(cwd.fd, &[_]u16{ 's', 'y', 'm', 'l', 'i', 'n', 'k', 'e', 'd' }, &[_]u16{ 'f', 'i', 'l', 'e', '.', 't', 'x', 't' }, false); + os.windows.CreateSymbolicLink( + cwd.fd, + &[_]u16{ 's', 'y', 'm', 'l', 'i', 'n', 'k', 'e', 'd' }, + &[_]u16{ 'f', 'i', 'l', 'e', '.', 't', 'x', 't' }, + false, + ) catch |err| switch (err) { + // Symlink requires admin privileges on windows, so this test can legitimately fail. + error.AccessDenied => { + try cwd.deleteFile("file.txt"); + try cwd.deleteFile("symlinked"); + return error.SkipZigTest; + }, + else => return err, + }; } else { try os.symlink("file.txt", "symlinked"); } @@ -183,7 +196,16 @@ test "readlinkat" { // create a symbolic link if (builtin.os.tag == .windows) { - try os.windows.CreateSymbolicLink(tmp.dir.fd, &[_]u16{ 'l', 'i', 'n', 'k' }, &[_]u16{ 'f', 'i', 'l', 'e', '.', 't', 'x', 't' }, false); + os.windows.CreateSymbolicLink( + tmp.dir.fd, + &[_]u16{ 'l', 'i', 'n', 'k' }, + &[_]u16{ 'f', 'i', 'l', 'e', '.', 't', 'x', 't' }, + false, + ) catch |err| switch (err) { + // Symlink requires admin privileges on windows, so this test can legitimately fail. + error.AccessDenied => return error.SkipZigTest, + else => return err, + }; } else { try os.symlinkat("file.txt", tmp.dir.fd, "link"); } diff --git a/lib/std/os/uefi/protocols/simple_text_input_protocol.zig b/lib/std/os/uefi/protocols/simple_text_input_protocol.zig @@ -11,7 +11,7 @@ const Status = uefi.Status; /// Character input devices, e.g. Keyboard pub const SimpleTextInputProtocol = extern struct { - _reset: fn (*const SimpleTextInputProtocol, bool) callconv(.C) usize, + _reset: fn (*const SimpleTextInputProtocol, bool) callconv(.C) Status, _read_key_stroke: fn (*const SimpleTextInputProtocol, *InputKey) callconv(.C) Status, wait_for_key: Event, diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig @@ -164,7 +164,7 @@ pub fn CreateEventExW(attributes: ?*SECURITY_ATTRIBUTES, nameW: [*:0]const u16, } } -pub const DeviceIoControlError = error{Unexpected}; +pub const DeviceIoControlError = error{ AccessDenied, Unexpected }; /// A Zig wrapper around `NtDeviceIoControlFile` and `NtFsControlFile` syscalls. /// It implements similar behavior to `DeviceIoControl` and is meant to serve @@ -216,6 +216,7 @@ pub fn DeviceIoControl( }; switch (rc) { .SUCCESS => {}, + .PRIVILEGE_NOT_HELD => return error.AccessDenied, .INVALID_PARAMETER => unreachable, else => return unexpectedStatus(rc), } @@ -593,6 +594,12 @@ pub const CreateSymbolicLinkError = error{ Unexpected, }; +/// Needs either: +/// - `SeCreateSymbolicLinkPrivilege` privilege +/// or +/// - Developper mode on Windows 10 +/// otherwise fails with `error.AccessDenied`. In which case `sym_link_path` may still +/// be created on the file system but will lack reparse processing data applied to it. pub fn CreateSymbolicLink( dir: ?HANDLE, sym_link_path: []const u16, @@ -710,7 +717,10 @@ pub fn ReadLink(dir: ?HANDLE, sub_path_w: []const u16, out_buffer: []u8) ReadLin defer CloseHandle(result_handle); var reparse_buf: [MAXIMUM_REPARSE_DATA_BUFFER_SIZE]u8 = undefined; - _ = try DeviceIoControl(result_handle, FSCTL_GET_REPARSE_POINT, null, reparse_buf[0..]); + _ = DeviceIoControl(result_handle, FSCTL_GET_REPARSE_POINT, null, reparse_buf[0..]) catch |err| switch (err) { + error.AccessDenied => unreachable, + else => |e| return e, + }; const reparse_struct = @ptrCast(*const REPARSE_DATA_BUFFER, @alignCast(@alignOf(REPARSE_DATA_BUFFER), &reparse_buf[0])); switch (reparse_struct.ReparseTag) { @@ -992,7 +1002,10 @@ pub fn GetFinalPathNameByHandle( input_struct.DeviceNameLength = @intCast(USHORT, volume_name.FileNameLength); @memcpy(input_buf[@sizeOf(MOUNTMGR_MOUNT_POINT)..], @ptrCast([*]const u8, &volume_name.FileName[0]), volume_name.FileNameLength); - try DeviceIoControl(mgmt_handle, IOCTL_MOUNTMGR_QUERY_POINTS, input_buf[0..], output_buf[0..]); + DeviceIoControl(mgmt_handle, IOCTL_MOUNTMGR_QUERY_POINTS, input_buf[0..], output_buf[0..]) catch |err| switch (err) { + error.AccessDenied => unreachable, + else => |e| return e, + }; const mount_points_struct = @ptrCast(*const MOUNTMGR_MOUNT_POINTS, &output_buf[0]); const mount_points = @ptrCast( diff --git a/lib/std/special/compiler_rt.zig b/lib/std/special/compiler_rt.zig @@ -100,7 +100,8 @@ comptime { @export(@import("compiler_rt/floatditf.zig").__floatditf, .{ .name = "__floatditf", .linkage = linkage }); @export(@import("compiler_rt/floattitf.zig").__floattitf, .{ .name = "__floattitf", .linkage = linkage }); @export(@import("compiler_rt/floattidf.zig").__floattidf, .{ .name = "__floattidf", .linkage = linkage }); - @export(@import("compiler_rt/floattisf.zig").__floattisf, .{ .name = "__floattisf", .linkage = linkage }); + @export(@import("compiler_rt/floatXisf.zig").__floattisf, .{ .name = "__floattisf", .linkage = linkage }); + @export(@import("compiler_rt/floatXisf.zig").__floatdisf, .{ .name = "__floatdisf", .linkage = linkage }); @export(@import("compiler_rt/floatunditf.zig").__floatunditf, .{ .name = "__floatunditf", .linkage = linkage }); @export(@import("compiler_rt/floatunsitf.zig").__floatunsitf, .{ .name = "__floatunsitf", .linkage = linkage }); @@ -204,6 +205,7 @@ comptime { @export(@import("compiler_rt/extendXfYf2.zig").__aeabi_f2d, .{ .name = "__aeabi_f2d", .linkage = linkage }); @export(@import("compiler_rt/floatsiXf.zig").__aeabi_i2d, .{ .name = "__aeabi_i2d", .linkage = linkage }); @export(@import("compiler_rt/floatdidf.zig").__aeabi_l2d, .{ .name = "__aeabi_l2d", .linkage = linkage }); + @export(@import("compiler_rt/floatXisf.zig").__aeabi_l2f, .{ .name = "__aeabi_l2f", .linkage = linkage }); @export(@import("compiler_rt/floatunsidf.zig").__aeabi_ui2d, .{ .name = "__aeabi_ui2d", .linkage = linkage }); @export(@import("compiler_rt/floatundidf.zig").__aeabi_ul2d, .{ .name = "__aeabi_ul2d", .linkage = linkage }); @export(@import("compiler_rt/floatunsisf.zig").__aeabi_ui2f, .{ .name = "__aeabi_ui2f", .linkage = linkage }); diff --git a/lib/std/special/compiler_rt/floatXisf.zig b/lib/std/special/compiler_rt/floatXisf.zig @@ -0,0 +1,97 @@ +// SPDX-License-Identifier: MIT +// Copyright (c) 2015-2020 Zig Contributors +// This file is part of [zig](https://ziglang.org/), which is MIT licensed. +// The MIT license requires this copyright notice to be included in all copies +// and substantial portions of the software. +const builtin = @import("builtin"); +const std = @import("std"); +const maxInt = std.math.maxInt; + +const FLT_MANT_DIG = 24; + +fn __floatXisf(comptime T: type, arg: T) f32 { + @setRuntimeSafety(builtin.is_test); + + const Z = std.meta.Int(false, T.bit_count); + const S = std.meta.Int(false, T.bit_count - @clz(Z, @as(Z, T.bit_count) - 1)); + + if (arg == 0) { + return @as(f32, 0.0); + } + + var ai = arg; + const N: u32 = T.bit_count; + const si = ai >> @intCast(S, (N - 1)); + ai = ((ai ^ si) -% si); + var a = @bitCast(Z, ai); + + const sd = @bitCast(i32, N - @clz(Z, a)); // number of significant digits + var e: i32 = sd - 1; // exponent + + if (sd > FLT_MANT_DIG) { + // start: 0000000000000000000001xxxxxxxxxxxxxxxxxxxxxxPQxxxxxxxxxxxxxxxxxx + // finish: 000000000000000000000000000000000000001xxxxxxxxxxxxxxxxxxxxxxPQR + // 12345678901234567890123456 + // 1 = msb 1 bit + // P = bit FLT_MANT_DIG-1 bits to the right of 1 + // Q = bit FLT_MANT_DIG bits to the right of 1 + // R = "or" of all bits to the right of Q + switch (sd) { + FLT_MANT_DIG + 1 => { + a <<= 1; + }, + FLT_MANT_DIG + 2 => {}, + else => { + const shift1_amt = @intCast(i32, sd - (FLT_MANT_DIG + 2)); + const shift1_amt_u7 = @intCast(S, shift1_amt); + + const shift2_amt = @intCast(i32, N + (FLT_MANT_DIG + 2)) - sd; + const shift2_amt_u7 = @intCast(S, shift2_amt); + + a = (a >> shift1_amt_u7) | @boolToInt((a & (@intCast(Z, maxInt(Z)) >> shift2_amt_u7)) != 0); + }, + } + // finish + a |= @boolToInt((a & 4) != 0); // Or P into R + a += 1; // round - this step may add a significant bit + a >>= 2; // dump Q and R + // a is now rounded to FLT_MANT_DIG or FLT_MANT_DIG+1 bits + if ((a & (@as(Z, 1) << FLT_MANT_DIG)) != 0) { + a >>= 1; + e += 1; + } + // a is now rounded to FLT_MANT_DIG bits + } else { + a <<= @intCast(S, FLT_MANT_DIG - sd); + // a is now rounded to FLT_MANT_DIG bits + } + + const s = @bitCast(Z, arg) >> (T.bit_count - 32); + const r = (@intCast(u32, s) & 0x80000000) | // sign + (@intCast(u32, (e + 127)) << 23) | // exponent + (@truncate(u32, a) & 0x007fffff); // mantissa-high + + return @bitCast(f32, r); +} + +pub fn __floatdisf(arg: i64) callconv(.C) f32 { + @setRuntimeSafety(builtin.is_test); + return @call(.{ .modifier = .always_inline }, __floatXisf, .{ i64, arg }); +} + +pub fn __floattisf(arg: i128) callconv(.C) f32 { + @setRuntimeSafety(builtin.is_test); + return @call(.{ .modifier = .always_inline }, __floatXisf, .{ i128, arg }); +} + +pub fn __aeabi_l2f(arg: i64) callconv(.AAPCS) f32 { + @setRuntimeSafety(false); + return @call(.{ .modifier = .always_inline }, __floatdisf, .{arg}); +} + +test "import floattisf" { + _ = @import("floattisf_test.zig"); +} +test "import floatdisf" { + _ = @import("floattisf_test.zig"); +} diff --git a/lib/std/special/compiler_rt/floatdisf_test.zig b/lib/std/special/compiler_rt/floatdisf_test.zig @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: MIT +// Copyright (c) 2015-2020 Zig Contributors +// This file is part of [zig](https://ziglang.org/), which is MIT licensed. +// The MIT license requires this copyright notice to be included in all copies +// and substantial portions of the software. +const __floatdisf = @import("floatXisf.zig").__floatdisf; +const testing = @import("std").testing; + +fn test__floatdisf(a: i64, expected: f32) void { + const x = __floatdisf(a); + testing.expect(x == expected); +} + +test "floatdisf" { + test__floatdisf(0, 0.0); + test__floatdisf(1, 1.0); + test__floatdisf(2, 2.0); + test__floatdisf(-1, -1.0); + test__floatdisf(-2, -2.0); + test__floatdisf(0x7FFFFF8000000000, 0x1.FFFFFEp+62); + test__floatdisf(0x7FFFFF0000000000, 0x1.FFFFFCp+62); + test__floatdisf(0x8000008000000000, -0x1.FFFFFEp+62); + test__floatdisf(0x8000010000000000, -0x1.FFFFFCp+62); + test__floatdisf(0x8000000000000000, -0x1.000000p+63); + test__floatdisf(0x8000000000000001, -0x1.000000p+63); + test__floatdisf(0x0007FB72E8000000, 0x1.FEDCBAp+50); + test__floatdisf(0x0007FB72EA000000, 0x1.FEDCBAp+50); + test__floatdisf(0x0007FB72EB000000, 0x1.FEDCBAp+50); + test__floatdisf(0x0007FB72EBFFFFFF, 0x1.FEDCBAp+50); + test__floatdisf(0x0007FB72EC000000, 0x1.FEDCBCp+50); + test__floatdisf(0x0007FB72E8000001, 0x1.FEDCBAp+50); + test__floatdisf(0x0007FB72E6000000, 0x1.FEDCBAp+50); + test__floatdisf(0x0007FB72E7000000, 0x1.FEDCBAp+50); + test__floatdisf(0x0007FB72E7FFFFFF, 0x1.FEDCBAp+50); + test__floatdisf(0x0007FB72E4000001, 0x1.FEDCBAp+50); + test__floatdisf(0x0007FB72E4000000, 0x1.FEDCB8p+50); +} diff --git a/lib/std/special/compiler_rt/floattisf.zig b/lib/std/special/compiler_rt/floattisf.zig @@ -1,76 +0,0 @@ -// SPDX-License-Identifier: MIT -// Copyright (c) 2015-2020 Zig Contributors -// This file is part of [zig](https://ziglang.org/), which is MIT licensed. -// The MIT license requires this copyright notice to be included in all copies -// and substantial portions of the software. -const builtin = @import("builtin"); -const is_test = builtin.is_test; -const std = @import("std"); -const maxInt = std.math.maxInt; - -const FLT_MANT_DIG = 24; - -pub fn __floattisf(arg: i128) callconv(.C) f32 { - @setRuntimeSafety(is_test); - - if (arg == 0) - return 0.0; - - var ai = arg; - const N: u32 = 128; - const si = ai >> @intCast(u7, (N - 1)); - ai = ((ai ^ si) -% si); - var a = @bitCast(u128, ai); - - const sd = @bitCast(i32, N - @clz(u128, a)); // number of significant digits - var e: i32 = sd - 1; // exponent - - if (sd > FLT_MANT_DIG) { - // start: 0000000000000000000001xxxxxxxxxxxxxxxxxxxxxxPQxxxxxxxxxxxxxxxxxx - // finish: 000000000000000000000000000000000000001xxxxxxxxxxxxxxxxxxxxxxPQR - // 12345678901234567890123456 - // 1 = msb 1 bit - // P = bit FLT_MANT_DIG-1 bits to the right of 1 - // Q = bit FLT_MANT_DIG bits to the right of 1 - // R = "or" of all bits to the right of Q - switch (sd) { - FLT_MANT_DIG + 1 => { - a <<= 1; - }, - FLT_MANT_DIG + 2 => {}, - else => { - const shift1_amt = @intCast(i32, sd - (FLT_MANT_DIG + 2)); - const shift1_amt_u7 = @intCast(u7, shift1_amt); - - const shift2_amt = @intCast(i32, N + (FLT_MANT_DIG + 2)) - sd; - const shift2_amt_u7 = @intCast(u7, shift2_amt); - - a = (a >> shift1_amt_u7) | @boolToInt((a & (@intCast(u128, maxInt(u128)) >> shift2_amt_u7)) != 0); - }, - } - // finish - a |= @boolToInt((a & 4) != 0); // Or P into R - a += 1; // round - this step may add a significant bit - a >>= 2; // dump Q and R - // a is now rounded to FLT_MANT_DIG or FLT_MANT_DIG+1 bits - if ((a & (@as(u128, 1) << FLT_MANT_DIG)) != 0) { - a >>= 1; - e += 1; - } - // a is now rounded to FLT_MANT_DIG bits - } else { - a <<= @intCast(u7, FLT_MANT_DIG - sd); - // a is now rounded to FLT_MANT_DIG bits - } - - const s = @bitCast(u128, arg) >> (128 - 32); - const r = (@intCast(u32, s) & 0x80000000) | // sign - (@intCast(u32, (e + 127)) << 23) | // exponent - (@truncate(u32, a) & 0x007fffff); // mantissa-high - - return @bitCast(f32, r); -} - -test "import floattisf" { - _ = @import("floattisf_test.zig"); -} diff --git a/lib/std/special/compiler_rt/floattisf_test.zig b/lib/std/special/compiler_rt/floattisf_test.zig @@ -3,7 +3,7 @@ // This file is part of [zig](https://ziglang.org/), which is MIT licensed. // The MIT license requires this copyright notice to be included in all copies // and substantial portions of the software. -const __floattisf = @import("floattisf.zig").__floattisf; +const __floattisf = @import("floatXisf.zig").__floattisf; const testing = @import("std").testing; fn test__floattisf(a: i128, expected: f32) void { diff --git a/lib/std/zig/ast.zig b/lib/std/zig/ast.zig @@ -915,23 +915,111 @@ pub const Node = struct { init_node: *Node, }); + pub fn getDocComments(self: *const VarDecl) ?*DocComment { + return self.getTrailer(.doc_comments); + } + + pub fn setDocComments(self: *VarDecl, value: *DocComment) void { + self.setTrailer(.doc_comments, value); + } + + pub fn getVisibToken(self: *const VarDecl) ?TokenIndex { + return self.getTrailer(.visib_token); + } + + pub fn setVisibToken(self: *VarDecl, value: TokenIndex) void { + self.setTrailer(.visib_token, value); + } + + pub fn getThreadLocalToken(self: *const VarDecl) ?TokenIndex { + return self.getTrailer(.thread_local_token); + } + + pub fn setThreadLocalToken(self: *VarDecl, value: TokenIndex) void { + self.setTrailer(.thread_local_token, value); + } + + pub fn getEqToken(self: *const VarDecl) ?TokenIndex { + return self.getTrailer(.eq_token); + } + + pub fn setEqToken(self: *VarDecl, value: TokenIndex) void { + self.setTrailer(.eq_token, value); + } + + pub fn getComptimeToken(self: *const VarDecl) ?TokenIndex { + return self.getTrailer(.comptime_token); + } + + pub fn setComptimeToken(self: *VarDecl, value: TokenIndex) void { + self.setTrailer(.comptime_token, value); + } + + pub fn getExternExportToken(self: *const VarDecl) ?TokenIndex { + return self.getTrailer(.extern_export_token); + } + + pub fn setExternExportToken(self: *VarDecl, value: TokenIndex) void { + self.setTrailer(.extern_export_token, value); + } + + pub fn getLibName(self: *const VarDecl) ?*Node { + return self.getTrailer(.lib_name); + } + + pub fn setLibName(self: *VarDecl, value: *Node) void { + self.setTrailer(.lib_name, value); + } + + pub fn getTypeNode(self: *const VarDecl) ?*Node { + return self.getTrailer(.type_node); + } + + pub fn setTypeNode(self: *VarDecl, value: *Node) void { + self.setTrailer(.type_node, value); + } + + pub fn getAlignNode(self: *const VarDecl) ?*Node { + return self.getTrailer(.align_node); + } + + pub fn setAlignNode(self: *VarDecl, value: *Node) void { + self.setTrailer(.align_node, value); + } + + pub fn getSectionNode(self: *const VarDecl) ?*Node { + return self.getTrailer(.section_node); + } + + pub fn setSectionNode(self: *VarDecl, value: *Node) void { + self.setTrailer(.section_node, value); + } + + pub fn getInitNode(self: *const VarDecl) ?*Node { + return self.getTrailer(.init_node); + } + + pub fn setInitNode(self: *VarDecl, value: *Node) void { + self.setTrailer(.init_node, value); + } + pub const RequiredFields = struct { mut_token: TokenIndex, name_token: TokenIndex, semicolon_token: TokenIndex, }; - pub fn getTrailer(self: *const VarDecl, comptime name: []const u8) ?TrailerFlags.Field(name) { + fn getTrailer(self: *const VarDecl, comptime field: TrailerFlags.FieldEnum) ?TrailerFlags.Field(field) { const trailers_start = @ptrCast([*]const u8, self) + @sizeOf(VarDecl); - return self.trailer_flags.get(trailers_start, name); + return self.trailer_flags.get(trailers_start, field); } - pub fn setTrailer(self: *VarDecl, comptime name: []const u8, value: TrailerFlags.Field(name)) void { + fn setTrailer(self: *VarDecl, comptime field: TrailerFlags.FieldEnum, value: TrailerFlags.Field(field)) void { const trailers_start = @ptrCast([*]u8, self) + @sizeOf(VarDecl); - self.trailer_flags.set(trailers_start, name, value); + self.trailer_flags.set(trailers_start, field, value); } - pub fn create(allocator: *mem.Allocator, required: RequiredFields, trailers: anytype) !*VarDecl { + pub fn create(allocator: *mem.Allocator, required: RequiredFields, trailers: TrailerFlags.InitStruct) !*VarDecl { const trailer_flags = TrailerFlags.init(trailers); const bytes = try allocator.alignedAlloc(u8, @alignOf(VarDecl), sizeInBytes(trailer_flags)); const var_decl = @ptrCast(*VarDecl, bytes.ptr); @@ -954,22 +1042,22 @@ pub const Node = struct { pub fn iterate(self: *const VarDecl, index: usize) ?*Node { var i = index; - if (self.getTrailer("type_node")) |type_node| { + if (self.getTypeNode()) |type_node| { if (i < 1) return type_node; i -= 1; } - if (self.getTrailer("align_node")) |align_node| { + if (self.getAlignNode()) |align_node| { if (i < 1) return align_node; i -= 1; } - if (self.getTrailer("section_node")) |section_node| { + if (self.getSectionNode()) |section_node| { if (i < 1) return section_node; i -= 1; } - if (self.getTrailer("init_node")) |init_node| { + if (self.getInitNode()) |init_node| { if (i < 1) return init_node; i -= 1; } @@ -978,11 +1066,11 @@ pub const Node = struct { } pub fn firstToken(self: *const VarDecl) TokenIndex { - if (self.getTrailer("visib_token")) |visib_token| return visib_token; - if (self.getTrailer("thread_local_token")) |thread_local_token| return thread_local_token; - if (self.getTrailer("comptime_token")) |comptime_token| return comptime_token; - if (self.getTrailer("extern_export_token")) |extern_export_token| return extern_export_token; - assert(self.getTrailer("lib_name") == null); + if (self.getVisibToken()) |visib_token| return visib_token; + if (self.getThreadLocalToken()) |thread_local_token| return thread_local_token; + if (self.getComptimeToken()) |comptime_token| return comptime_token; + if (self.getExternExportToken()) |extern_export_token| return extern_export_token; + assert(self.getLibName() == null); return self.mut_token; } @@ -1320,34 +1408,126 @@ pub const Node = struct { std.debug.print("{*} flags: {b} name_token: {} {*} params_len: {}\n", .{ self, self.trailer_flags.bits, - self.getTrailer("name_token"), - self.trailer_flags.ptrConst(trailers_start, "name_token"), + self.getNameToken(), + self.trailer_flags.ptrConst(trailers_start, .name_token), self.params_len, }); } - pub fn body(self: *const FnProto) ?*Node { - return self.getTrailer("body_node"); + pub fn getDocComments(self: *const FnProto) ?*DocComment { + return self.getTrailer(.doc_comments); + } + + pub fn setDocComments(self: *FnProto, value: *DocComment) void { + self.setTrailer(.doc_comments, value); + } + + pub fn getBodyNode(self: *const FnProto) ?*Node { + return self.getTrailer(.body_node); + } + + pub fn setBodyNode(self: *FnProto, value: *Node) void { + self.setTrailer(.body_node, value); + } + + pub fn getLibName(self: *const FnProto) ?*Node { + return self.getTrailer(.lib_name); + } + + pub fn setLibName(self: *FnProto, value: *Node) void { + self.setTrailer(.lib_name, value); + } + + pub fn getAlignExpr(self: *const FnProto) ?*Node { + return self.getTrailer(.align_expr); + } + + pub fn setAlignExpr(self: *FnProto, value: *Node) void { + self.setTrailer(.align_expr, value); + } + + pub fn getSectionExpr(self: *const FnProto) ?*Node { + return self.getTrailer(.section_expr); + } + + pub fn setSectionExpr(self: *FnProto, value: *Node) void { + self.setTrailer(.section_expr, value); + } + + pub fn getCallconvExpr(self: *const FnProto) ?*Node { + return self.getTrailer(.callconv_expr); + } + + pub fn setCallconvExpr(self: *FnProto, value: *Node) void { + self.setTrailer(.callconv_expr, value); + } + + pub fn getVisibToken(self: *const FnProto) ?TokenIndex { + return self.getTrailer(.visib_token); } - pub fn getTrailer(self: *const FnProto, comptime name: []const u8) ?TrailerFlags.Field(name) { + pub fn setVisibToken(self: *FnProto, value: TokenIndex) void { + self.setTrailer(.visib_token, value); + } + + pub fn getNameToken(self: *const FnProto) ?TokenIndex { + return self.getTrailer(.name_token); + } + + pub fn setNameToken(self: *FnProto, value: TokenIndex) void { + self.setTrailer(.name_token, value); + } + + pub fn getVarArgsToken(self: *const FnProto) ?TokenIndex { + return self.getTrailer(.var_args_token); + } + + pub fn setVarArgsToken(self: *FnProto, value: TokenIndex) void { + self.setTrailer(.var_args_token, value); + } + + pub fn getExternExportInlineToken(self: *const FnProto) ?TokenIndex { + return self.getTrailer(.extern_export_inline_token); + } + + pub fn setExternExportInlineToken(self: *FnProto, value: TokenIndex) void { + self.setTrailer(.extern_export_inline_token, value); + } + + pub fn getIsExternPrototype(self: *const FnProto) ?void { + return self.getTrailer(.is_extern_prototype); + } + + pub fn setIsExternPrototype(self: *FnProto, value: void) void { + self.setTrailer(.is_extern_prototype, value); + } + + pub fn getIsAsync(self: *const FnProto) ?void { + return self.getTrailer(.is_async); + } + + pub fn setIsAsync(self: *FnProto, value: void) void { + self.setTrailer(.is_async, value); + } + + fn getTrailer(self: *const FnProto, comptime field: TrailerFlags.FieldEnum) ?TrailerFlags.Field(field) { const trailers_start = @alignCast( @alignOf(ParamDecl), @ptrCast([*]const u8, self) + @sizeOf(FnProto) + @sizeOf(ParamDecl) * self.params_len, ); - return self.trailer_flags.get(trailers_start, name); + return self.trailer_flags.get(trailers_start, field); } - pub fn setTrailer(self: *FnProto, comptime name: []const u8, value: TrailerFlags.Field(name)) void { + fn setTrailer(self: *FnProto, comptime field: TrailerFlags.FieldEnum, value: TrailerFlags.Field(field)) void { const trailers_start = @alignCast( @alignOf(ParamDecl), @ptrCast([*]u8, self) + @sizeOf(FnProto) + @sizeOf(ParamDecl) * self.params_len, ); - self.trailer_flags.set(trailers_start, name, value); + self.trailer_flags.set(trailers_start, field, value); } /// After this the caller must initialize the params list. - pub fn create(allocator: *mem.Allocator, required: RequiredFields, trailers: anytype) !*FnProto { + pub fn create(allocator: *mem.Allocator, required: RequiredFields, trailers: TrailerFlags.InitStruct) !*FnProto { const trailer_flags = TrailerFlags.init(trailers); const bytes = try allocator.alignedAlloc(u8, @alignOf(FnProto), sizeInBytes( required.params_len, @@ -1376,7 +1556,7 @@ pub const Node = struct { pub fn iterate(self: *const FnProto, index: usize) ?*Node { var i = index; - if (self.getTrailer("lib_name")) |lib_name| { + if (self.getLibName()) |lib_name| { if (i < 1) return lib_name; i -= 1; } @@ -1394,12 +1574,12 @@ pub const Node = struct { } i -= params_len; - if (self.getTrailer("align_expr")) |align_expr| { + if (self.getAlignExpr()) |align_expr| { if (i < 1) return align_expr; i -= 1; } - if (self.getTrailer("section_expr")) |section_expr| { + if (self.getSectionExpr()) |section_expr| { if (i < 1) return section_expr; i -= 1; } @@ -1412,7 +1592,7 @@ pub const Node = struct { .Invalid => {}, } - if (self.body()) |body_node| { + if (self.getBodyNode()) |body_node| { if (i < 1) return body_node; i -= 1; } @@ -1421,14 +1601,14 @@ pub const Node = struct { } pub fn firstToken(self: *const FnProto) TokenIndex { - if (self.getTrailer("visib_token")) |visib_token| return visib_token; - if (self.getTrailer("extern_export_inline_token")) |extern_export_inline_token| return extern_export_inline_token; - assert(self.getTrailer("lib_name") == null); + if (self.getVisibToken()) |visib_token| return visib_token; + if (self.getExternExportInlineToken()) |extern_export_inline_token| return extern_export_inline_token; + assert(self.getLibName() == null); return self.fn_token; } pub fn lastToken(self: *const FnProto) TokenIndex { - if (self.body()) |body_node| return body_node.lastToken(); + if (self.getBodyNode()) |body_node| return body_node.lastToken(); switch (self.return_type) { .Explicit, .InferErrorSet => |node| return node.lastToken(), .Invalid => |tok| return tok, @@ -2673,24 +2853,32 @@ pub const Node = struct { }; pub fn getRHS(self: *const ControlFlowExpression) ?*Node { - return self.getTrailer("rhs"); + return self.getTrailer(.rhs); + } + + pub fn setRHS(self: *ControlFlowExpression, value: *Node) void { + self.setTrailer(.rhs, value); } pub fn getLabel(self: *const ControlFlowExpression) ?TokenIndex { - return self.getTrailer("label"); + return self.getTrailer(.label); + } + + pub fn setLabel(self: *ControlFlowExpression, value: TokenIndex) void { + self.setTrailer(.label, value); } - pub fn getTrailer(self: *const ControlFlowExpression, comptime name: []const u8) ?TrailerFlags.Field(name) { + fn getTrailer(self: *const ControlFlowExpression, comptime field: TrailerFlags.FieldEnum) ?TrailerFlags.Field(field) { const trailers_start = @ptrCast([*]const u8, self) + @sizeOf(ControlFlowExpression); - return self.trailer_flags.get(trailers_start, name); + return self.trailer_flags.get(trailers_start, field); } - pub fn setTrailer(self: *ControlFlowExpression, comptime name: []const u8, value: TrailerFlags.Field(name)) void { + fn setTrailer(self: *ControlFlowExpression, comptime field: TrailerFlags.FieldEnum, value: TrailerFlags.Field(field)) void { const trailers_start = @ptrCast([*]u8, self) + @sizeOf(ControlFlowExpression); - self.trailer_flags.set(trailers_start, name, value); + self.trailer_flags.set(trailers_start, field, value); } - pub fn create(allocator: *mem.Allocator, required: RequiredFields, trailers: anytype) !*ControlFlowExpression { + pub fn create(allocator: *mem.Allocator, required: RequiredFields, trailers: TrailerFlags.InitStruct) !*ControlFlowExpression { const trailer_flags = TrailerFlags.init(trailers); const bytes = try allocator.alignedAlloc(u8, @alignOf(ControlFlowExpression), sizeInBytes(trailer_flags)); const ctrl_flow_expr = @ptrCast(*ControlFlowExpression, bytes.ptr); diff --git a/lib/std/zig/render.zig b/lib/std/zig/render.zig @@ -195,9 +195,9 @@ fn renderContainerDecl(allocator: *mem.Allocator, stream: anytype, tree: *ast.Tr .FnProto => { const fn_proto = @fieldParentPtr(ast.Node.FnProto, "base", decl); - try renderDocComments(tree, stream, fn_proto, fn_proto.getTrailer("doc_comments")); + try renderDocComments(tree, stream, fn_proto, fn_proto.getDocComments()); - if (fn_proto.getTrailer("body_node")) |body_node| { + if (fn_proto.getBodyNode()) |body_node| { try renderExpression(allocator, stream, tree, decl, .Space); try renderExpression(allocator, stream, tree, body_node, space); } else { @@ -220,7 +220,7 @@ fn renderContainerDecl(allocator: *mem.Allocator, stream: anytype, tree: *ast.Tr .VarDecl => { const var_decl = @fieldParentPtr(ast.Node.VarDecl, "base", decl); - try renderDocComments(tree, stream, var_decl, var_decl.getTrailer("doc_comments")); + try renderDocComments(tree, stream, var_decl, var_decl.getDocComments()); try renderVarDecl(allocator, stream, tree, var_decl); }, @@ -1423,6 +1423,10 @@ fn renderExpression( .BuiltinCall => { const builtin_call = @fieldParentPtr(ast.Node.BuiltinCall, "base", base); + // TODO remove after 0.7.0 release + if (mem.eql(u8, tree.tokenSlice(builtin_call.builtin_token), "@OpaqueType")) + return stream.writeAll("@Type(.Opaque)"); + try renderToken(tree, stream, builtin_call.builtin_token, Space.None); // @name const src_params_trailing_comma = blk: { @@ -1464,23 +1468,23 @@ fn renderExpression( .FnProto => { const fn_proto = @fieldParentPtr(ast.Node.FnProto, "base", base); - if (fn_proto.getTrailer("visib_token")) |visib_token_index| { + if (fn_proto.getVisibToken()) |visib_token_index| { const visib_token = tree.token_ids[visib_token_index]; assert(visib_token == .Keyword_pub or visib_token == .Keyword_export); try renderToken(tree, stream, visib_token_index, Space.Space); // pub } - if (fn_proto.getTrailer("extern_export_inline_token")) |extern_export_inline_token| { - if (fn_proto.getTrailer("is_extern_prototype") == null) + if (fn_proto.getExternExportInlineToken()) |extern_export_inline_token| { + if (fn_proto.getIsExternPrototype() == null) try renderToken(tree, stream, extern_export_inline_token, Space.Space); // extern/export/inline } - if (fn_proto.getTrailer("lib_name")) |lib_name| { + if (fn_proto.getLibName()) |lib_name| { try renderExpression(allocator, stream, tree, lib_name, Space.Space); } - const lparen = if (fn_proto.getTrailer("name_token")) |name_token| blk: { + const lparen = if (fn_proto.getNameToken()) |name_token| blk: { try renderToken(tree, stream, fn_proto.fn_token, Space.Space); // fn try renderToken(tree, stream, name_token, Space.None); // name break :blk tree.nextToken(name_token); @@ -1493,11 +1497,11 @@ fn renderExpression( const rparen = tree.prevToken( // the first token for the annotation expressions is the left // parenthesis, hence the need for two prevToken - if (fn_proto.getTrailer("align_expr")) |align_expr| + if (fn_proto.getAlignExpr()) |align_expr| tree.prevToken(tree.prevToken(align_expr.firstToken())) - else if (fn_proto.getTrailer("section_expr")) |section_expr| + else if (fn_proto.getSectionExpr()) |section_expr| tree.prevToken(tree.prevToken(section_expr.firstToken())) - else if (fn_proto.getTrailer("callconv_expr")) |callconv_expr| + else if (fn_proto.getCallconvExpr()) |callconv_expr| tree.prevToken(tree.prevToken(callconv_expr.firstToken())) else switch (fn_proto.return_type) { .Explicit => |node| node.firstToken(), @@ -1518,12 +1522,12 @@ fn renderExpression( for (fn_proto.params()) |param_decl, i| { try renderParamDecl(allocator, stream, tree, param_decl, Space.None); - if (i + 1 < fn_proto.params_len or fn_proto.getTrailer("var_args_token") != null) { + if (i + 1 < fn_proto.params_len or fn_proto.getVarArgsToken() != null) { const comma = tree.nextToken(param_decl.lastToken()); try renderToken(tree, stream, comma, Space.Space); // , } } - if (fn_proto.getTrailer("var_args_token")) |var_args_token| { + if (fn_proto.getVarArgsToken()) |var_args_token| { try renderToken(tree, stream, var_args_token, Space.None); } } else { @@ -1535,14 +1539,14 @@ fn renderExpression( for (fn_proto.params()) |param_decl| { try renderParamDecl(allocator, stream, tree, param_decl, Space.Comma); } - if (fn_proto.getTrailer("var_args_token")) |var_args_token| { + if (fn_proto.getVarArgsToken()) |var_args_token| { try renderToken(tree, stream, var_args_token, Space.Comma); } } try renderToken(tree, stream, rparen, Space.Space); // ) - if (fn_proto.getTrailer("align_expr")) |align_expr| { + if (fn_proto.getAlignExpr()) |align_expr| { const align_rparen = tree.nextToken(align_expr.lastToken()); const align_lparen = tree.prevToken(align_expr.firstToken()); const align_kw = tree.prevToken(align_lparen); @@ -1553,7 +1557,7 @@ fn renderExpression( try renderToken(tree, stream, align_rparen, Space.Space); // ) } - if (fn_proto.getTrailer("section_expr")) |section_expr| { + if (fn_proto.getSectionExpr()) |section_expr| { const section_rparen = tree.nextToken(section_expr.lastToken()); const section_lparen = tree.prevToken(section_expr.firstToken()); const section_kw = tree.prevToken(section_lparen); @@ -1564,7 +1568,7 @@ fn renderExpression( try renderToken(tree, stream, section_rparen, Space.Space); // ) } - if (fn_proto.getTrailer("callconv_expr")) |callconv_expr| { + if (fn_proto.getCallconvExpr()) |callconv_expr| { const callconv_rparen = tree.nextToken(callconv_expr.lastToken()); const callconv_lparen = tree.prevToken(callconv_expr.firstToken()); const callconv_kw = tree.prevToken(callconv_lparen); @@ -1573,9 +1577,9 @@ fn renderExpression( try renderToken(tree, stream, callconv_lparen, Space.None); // ( try renderExpression(allocator, stream, tree, callconv_expr, Space.None); try renderToken(tree, stream, callconv_rparen, Space.Space); // ) - } else if (fn_proto.getTrailer("is_extern_prototype") != null) { + } else if (fn_proto.getIsExternPrototype() != null) { try stream.writer().writeAll("callconv(.C) "); - } else if (fn_proto.getTrailer("is_async") != null) { + } else if (fn_proto.getIsAsync() != null) { try stream.writer().writeAll("callconv(.Async) "); } @@ -2150,31 +2154,31 @@ fn renderVarDecl( tree: *ast.Tree, var_decl: *ast.Node.VarDecl, ) (@TypeOf(stream.*).Error || Error)!void { - if (var_decl.getTrailer("visib_token")) |visib_token| { + if (var_decl.getVisibToken()) |visib_token| { try renderToken(tree, stream, visib_token, Space.Space); // pub } - if (var_decl.getTrailer("extern_export_token")) |extern_export_token| { + if (var_decl.getExternExportToken()) |extern_export_token| { try renderToken(tree, stream, extern_export_token, Space.Space); // extern - if (var_decl.getTrailer("lib_name")) |lib_name| { + if (var_decl.getLibName()) |lib_name| { try renderExpression(allocator, stream, tree, lib_name, Space.Space); // "lib" } } - if (var_decl.getTrailer("comptime_token")) |comptime_token| { + if (var_decl.getComptimeToken()) |comptime_token| { try renderToken(tree, stream, comptime_token, Space.Space); // comptime } - if (var_decl.getTrailer("thread_local_token")) |thread_local_token| { + if (var_decl.getThreadLocalToken()) |thread_local_token| { try renderToken(tree, stream, thread_local_token, Space.Space); // threadlocal } try renderToken(tree, stream, var_decl.mut_token, Space.Space); // var - const name_space = if (var_decl.getTrailer("type_node") == null and - (var_decl.getTrailer("align_node") != null or - var_decl.getTrailer("section_node") != null or - var_decl.getTrailer("init_node") != null)) + const name_space = if (var_decl.getTypeNode() == null and + (var_decl.getAlignNode() != null or + var_decl.getSectionNode() != null or + var_decl.getInitNode() != null)) Space.Space else Space.None; @@ -2188,31 +2192,31 @@ fn renderVarDecl( try renderExpression(allocator, stream, tree, type_node, s); } - if (var_decl.getTrailer("align_node")) |align_node| { + if (var_decl.getAlignNode()) |align_node| { const lparen = tree.prevToken(align_node.firstToken()); const align_kw = tree.prevToken(lparen); const rparen = tree.nextToken(align_node.lastToken()); try renderToken(tree, stream, align_kw, Space.None); // align try renderToken(tree, stream, lparen, Space.None); // ( try renderExpression(allocator, stream, tree, align_node, Space.None); - const s = if (var_decl.getTrailer("section_node") != null or var_decl.getTrailer("init_node") != null) Space.Space else Space.None; + const s = if (var_decl.getSectionNode() != null or var_decl.getInitNode() != null) Space.Space else Space.None; try renderToken(tree, stream, rparen, s); // ) } - if (var_decl.getTrailer("section_node")) |section_node| { + if (var_decl.getSectionNode()) |section_node| { const lparen = tree.prevToken(section_node.firstToken()); const section_kw = tree.prevToken(lparen); const rparen = tree.nextToken(section_node.lastToken()); try renderToken(tree, stream, section_kw, Space.None); // linksection try renderToken(tree, stream, lparen, Space.None); // ( try renderExpression(allocator, stream, tree, section_node, Space.None); - const s = if (var_decl.getTrailer("init_node") != null) Space.Space else Space.None; + const s = if (var_decl.getInitNode() != null) Space.Space else Space.None; try renderToken(tree, stream, rparen, s); // ) } - if (var_decl.getTrailer("init_node")) |init_node| { + if (var_decl.getInitNode()) |init_node| { const s = if (init_node.tag == .MultilineStringLiteral) Space.None else Space.Space; - try renderToken(tree, stream, var_decl.getTrailer("eq_token").?, s); // = + try renderToken(tree, stream, var_decl.getEqToken().?, s); // = stream.pushIndentOneShot(); try renderExpression(allocator, stream, tree, init_node, Space.None); } diff --git a/lib/std/zig/system.zig b/lib/std/zig/system.zig @@ -88,6 +88,7 @@ pub const NativePaths = struct { if (!is_windows) { const triple = try Target.current.linuxTriple(allocator); + const qual = Target.current.cpu.arch.ptrBitWidth(); // TODO: $ ld --verbose | grep SEARCH_DIR // the output contains some paths that end with lib64, maybe include them too? @@ -95,17 +96,17 @@ pub const NativePaths = struct { // TODO: some of these are suspect and should only be added on some systems. audit needed. try self.addIncludeDir("/usr/local/include"); + try self.addLibDirFmt("/usr/local/lib{}", .{qual}); try self.addLibDir("/usr/local/lib"); - try self.addLibDir("/usr/local/lib64"); try self.addIncludeDirFmt("/usr/include/{}", .{triple}); try self.addLibDirFmt("/usr/lib/{}", .{triple}); try self.addIncludeDir("/usr/include"); + try self.addLibDirFmt("/lib{}", .{qual}); try self.addLibDir("/lib"); - try self.addLibDir("/lib64"); + try self.addLibDirFmt("/usr/lib{}", .{qual}); try self.addLibDir("/usr/lib"); - try self.addLibDir("/usr/lib64"); // example: on a 64-bit debian-based linux distro, with zlib installed from apt: // zlib.h is in /usr/include (added above) diff --git a/src-self-hosted/Module.zig b/src-self-hosted/Module.zig @@ -1256,8 +1256,8 @@ fn astGenAndAnalyzeDecl(self: *Module, decl: *Decl) !bool { }; defer fn_type_scope.instructions.deinit(self.gpa); - decl.is_pub = fn_proto.getTrailer("visib_token") != null; - const body_node = fn_proto.getTrailer("body_node") orelse + decl.is_pub = fn_proto.getVisibToken() != null; + const body_node = fn_proto.getBodyNode() orelse return self.failTok(&fn_type_scope.base, fn_proto.fn_token, "TODO implement extern functions", .{}); const param_decls = fn_proto.params(); @@ -1276,19 +1276,19 @@ fn astGenAndAnalyzeDecl(self: *Module, decl: *Decl) !bool { }; param_types[i] = try astgen.expr(self, &fn_type_scope.base, type_type_rl, param_type_node); } - if (fn_proto.getTrailer("var_args_token")) |var_args_token| { + if (fn_proto.getVarArgsToken()) |var_args_token| { return self.failTok(&fn_type_scope.base, var_args_token, "TODO implement var args", .{}); } - if (fn_proto.getTrailer("lib_name")) |lib_name| { + if (fn_proto.getLibName()) |lib_name| { return self.failNode(&fn_type_scope.base, lib_name, "TODO implement function library name", .{}); } - if (fn_proto.getTrailer("align_expr")) |align_expr| { + if (fn_proto.getAlignExpr()) |align_expr| { return self.failNode(&fn_type_scope.base, align_expr, "TODO implement function align expression", .{}); } - if (fn_proto.getTrailer("section_expr")) |sect_expr| { + if (fn_proto.getSectionExpr()) |sect_expr| { return self.failNode(&fn_type_scope.base, sect_expr, "TODO implement function section expression", .{}); } - if (fn_proto.getTrailer("callconv_expr")) |callconv_expr| { + if (fn_proto.getCallconvExpr()) |callconv_expr| { return self.failNode( &fn_type_scope.base, callconv_expr, @@ -1430,10 +1430,10 @@ fn astGenAndAnalyzeDecl(self: *Module, decl: *Decl) !bool { self.bin_file.freeDecl(decl); } - if (fn_proto.getTrailer("extern_export_inline_token")) |maybe_export_token| { + if (fn_proto.getExternExportInlineToken()) |maybe_export_token| { if (tree.token_ids[maybe_export_token] == .Keyword_export) { const export_src = tree.token_locs[maybe_export_token].start; - const name_loc = tree.token_locs[fn_proto.getTrailer("name_token").?]; + const name_loc = tree.token_locs[fn_proto.getNameToken().?]; const name = tree.tokenSliceLoc(name_loc); // The scope needs to have the decl in it. try self.analyzeExport(&block_scope.base, export_src, name, decl); @@ -1460,37 +1460,37 @@ fn astGenAndAnalyzeDecl(self: *Module, decl: *Decl) !bool { }; defer block_scope.instructions.deinit(self.gpa); - decl.is_pub = var_decl.getTrailer("visib_token") != null; + decl.is_pub = var_decl.getVisibToken() != null; const is_extern = blk: { - const maybe_extern_token = var_decl.getTrailer("extern_export_token") orelse + const maybe_extern_token = var_decl.getExternExportToken() orelse break :blk false; if (tree.token_ids[maybe_extern_token] != .Keyword_extern) break :blk false; - if (var_decl.getTrailer("init_node")) |some| { + if (var_decl.getInitNode()) |some| { return self.failNode(&block_scope.base, some, "extern variables have no initializers", .{}); } break :blk true; }; - if (var_decl.getTrailer("lib_name")) |lib_name| { + if (var_decl.getLibName()) |lib_name| { assert(is_extern); return self.failNode(&block_scope.base, lib_name, "TODO implement function library name", .{}); } const is_mutable = tree.token_ids[var_decl.mut_token] == .Keyword_var; - const is_threadlocal = if (var_decl.getTrailer("thread_local_token")) |some| blk: { + const is_threadlocal = if (var_decl.getThreadLocalToken()) |some| blk: { if (!is_mutable) { return self.failTok(&block_scope.base, some, "threadlocal variable cannot be constant", .{}); } break :blk true; } else false; - assert(var_decl.getTrailer("comptime_token") == null); - if (var_decl.getTrailer("align_node")) |align_expr| { + assert(var_decl.getComptimeToken() == null); + if (var_decl.getAlignNode()) |align_expr| { return self.failNode(&block_scope.base, align_expr, "TODO implement function align expression", .{}); } - if (var_decl.getTrailer("section_node")) |sect_expr| { + if (var_decl.getSectionNode()) |sect_expr| { return self.failNode(&block_scope.base, sect_expr, "TODO implement function section expression", .{}); } const explicit_type = blk: { - const type_node = var_decl.getTrailer("type_node") orelse + const type_node = var_decl.getTypeNode() orelse break :blk null; // Temporary arena for the zir instructions. @@ -1517,7 +1517,7 @@ fn astGenAndAnalyzeDecl(self: *Module, decl: *Decl) !bool { }; var var_type: Type = undefined; - const value: ?Value = if (var_decl.getTrailer("init_node")) |init_node| blk: { + const value: ?Value = if (var_decl.getInitNode()) |init_node| blk: { var gen_scope_arena = std.heap.ArenaAllocator.init(self.gpa); defer gen_scope_arena.deinit(); var gen_scope: Scope.GenZIR = .{ @@ -1602,7 +1602,7 @@ fn astGenAndAnalyzeDecl(self: *Module, decl: *Decl) !bool { decl.analysis = .complete; decl.generation = self.generation; - if (var_decl.getTrailer("extern_export_token")) |maybe_export_token| { + if (var_decl.getExternExportToken()) |maybe_export_token| { if (tree.token_ids[maybe_export_token] == .Keyword_export) { const export_src = tree.token_locs[maybe_export_token].start; const name_loc = tree.token_locs[var_decl.name_token]; @@ -1768,7 +1768,7 @@ fn analyzeRootSrcFile(self: *Module, root_scope: *Scope.File) !void { for (decls) |src_decl, decl_i| { if (src_decl.cast(ast.Node.FnProto)) |fn_proto| { // We will create a Decl for it regardless of analysis status. - const name_tok = fn_proto.getTrailer("name_token") orelse { + const name_tok = fn_proto.getNameToken() orelse { @panic("TODO missing function name"); }; @@ -1804,7 +1804,7 @@ fn analyzeRootSrcFile(self: *Module, root_scope: *Scope.File) !void { } else { const new_decl = try self.createNewDecl(&root_scope.base, name, decl_i, name_hash, contents_hash); root_scope.decls.appendAssumeCapacity(new_decl); - if (fn_proto.getTrailer("extern_export_inline_token")) |maybe_export_token| { + if (fn_proto.getExternExportInlineToken()) |maybe_export_token| { if (tree.token_ids[maybe_export_token] == .Keyword_export) { self.work_queue.writeItemAssumeCapacity(.{ .analyze_decl = new_decl }); } @@ -1831,7 +1831,7 @@ fn analyzeRootSrcFile(self: *Module, root_scope: *Scope.File) !void { } else { const new_decl = try self.createNewDecl(&root_scope.base, name, decl_i, name_hash, contents_hash); root_scope.decls.appendAssumeCapacity(new_decl); - if (var_decl.getTrailer("extern_export_token")) |maybe_export_token| { + if (var_decl.getExternExportToken()) |maybe_export_token| { if (tree.token_ids[maybe_export_token] == .Keyword_export) { self.work_queue.writeItemAssumeCapacity(.{ .analyze_decl = new_decl }); } diff --git a/src-self-hosted/astgen.zig b/src-self-hosted/astgen.zig @@ -451,16 +451,16 @@ fn varDecl( block_arena: *Allocator, ) InnerError!*Scope { // TODO implement detection of shadowing - if (node.getTrailer("comptime_token")) |comptime_token| { + if (node.getComptimeToken()) |comptime_token| { return mod.failTok(scope, comptime_token, "TODO implement comptime locals", .{}); } - if (node.getTrailer("align_node")) |align_node| { + if (node.getAlignNode()) |align_node| { return mod.failNode(scope, align_node, "TODO implement alignment on locals", .{}); } const tree = scope.tree(); const name_src = tree.token_locs[node.name_token].start; const ident_name = try identifierTokenString(mod, scope, node.name_token); - const init_node = node.getTrailer("init_node") orelse + const init_node = node.getInitNode() orelse return mod.fail(scope, name_src, "variables must be initialized", .{}); switch (tree.token_ids[node.mut_token]) { @@ -469,7 +469,7 @@ fn varDecl( // or an rvalue as a result location. If it is an rvalue, we can use the instruction as // the variable, no memory location needed. const result_loc = if (nodeMayNeedMemoryLocation(init_node)) r: { - if (node.getTrailer("type_node")) |type_node| { + if (node.getTypeNode()) |type_node| { const type_inst = try typeExpr(mod, scope, type_node); const alloc = try addZIRUnOp(mod, scope, name_src, .alloc, type_inst); break :r ResultLoc{ .ptr = alloc }; @@ -478,7 +478,7 @@ fn varDecl( break :r ResultLoc{ .inferred_ptr = alloc }; } } else r: { - if (node.getTrailer("type_node")) |type_node| + if (node.getTypeNode()) |type_node| break :r ResultLoc{ .ty = try typeExpr(mod, scope, type_node) } else break :r .none; @@ -494,7 +494,7 @@ fn varDecl( return &sub_scope.base; }, .Keyword_var => { - const var_data: struct { result_loc: ResultLoc, alloc: *zir.Inst } = if (node.getTrailer("type_node")) |type_node| a: { + const var_data: struct { result_loc: ResultLoc, alloc: *zir.Inst } = if (node.getTypeNode()) |type_node| a: { const type_inst = try typeExpr(mod, scope, type_node); const alloc = try addZIRUnOp(mod, scope, name_src, .alloc, type_inst); break :a .{ .alloc = alloc, .result_loc = .{ .ptr = alloc } }; diff --git a/src-self-hosted/codegen.zig b/src-self-hosted/codegen.zig @@ -439,7 +439,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type { if (module_fn.owner_decl.scope.cast(Module.Scope.File)) |scope_file| { const tree = scope_file.contents.tree; const fn_proto = tree.root_node.decls()[module_fn.owner_decl.src_index].castTag(.FnProto).?; - const block = fn_proto.body().?.castTag(.Block).?; + const block = fn_proto.getBodyNode().?.castTag(.Block).?; const lbrace_src = tree.token_locs[block.lbrace].start; const rbrace_src = tree.token_locs[block.rbrace].start; break :blk .{ .lbrace_src = lbrace_src, .rbrace_src = rbrace_src, .source = tree.source }; diff --git a/src-self-hosted/link/Elf.zig b/src-self-hosted/link/Elf.zig @@ -1661,7 +1661,7 @@ pub fn updateDecl(self: *Elf, module: *Module, decl: *Module.Decl) !void { // TODO Look into improving the performance here by adding a token-index-to-line // lookup table. Currently this involves scanning over the source code for newlines. const fn_proto = file_ast_decls[decl.src_index].castTag(.FnProto).?; - const block = fn_proto.body().?.castTag(.Block).?; + const block = fn_proto.getBodyNode().?.castTag(.Block).?; const line_delta = std.zig.lineDelta(tree.source, 0, tree.token_locs[block.lbrace].start); break :blk @intCast(u28, line_delta); } else if (decl.scope.cast(Module.Scope.ZIRModule)) |zir_module| { @@ -2160,7 +2160,7 @@ pub fn updateDeclLineNumber(self: *Elf, module: *Module, decl: *const Module.Dec // TODO Look into improving the performance here by adding a token-index-to-line // lookup table. Currently this involves scanning over the source code for newlines. const fn_proto = file_ast_decls[decl.src_index].castTag(.FnProto).?; - const block = fn_proto.body().?.castTag(.Block).?; + const block = fn_proto.getBodyNode().?.castTag(.Block).?; const line_delta = std.zig.lineDelta(tree.source, 0, tree.token_locs[block.lbrace].start); const casted_line_off = @intCast(u28, line_delta); diff --git a/src-self-hosted/main.zig b/src-self-hosted/main.zig @@ -912,7 +912,7 @@ pub const info_zen = \\ * Reduce the amount one must remember. \\ * Minimize energy spent on coding style. \\ * Resource deallocation must succeed. - \\ * Together we serve end users. + \\ * Together we serve the users. \\ \\ ; diff --git a/src-self-hosted/translate_c.zig b/src-self-hosted/translate_c.zig @@ -168,7 +168,7 @@ const Scope = struct { fn localContains(scope: *Block, name: []const u8) bool { for (scope.variables.items) |p| { - if (mem.eql(u8, p.name, name)) + if (mem.eql(u8, p.alias, name)) return true; } return false; @@ -675,7 +675,7 @@ fn visitFnDecl(c: *Context, fn_decl: *const ZigClangFunctionDecl) Error!void { } const body_node = try block_scope.complete(rp.c); - proto_node.setTrailer("body_node", body_node); + proto_node.setBodyNode(body_node); return addTopLevelDecl(c, fn_name, &proto_node.base); } @@ -4493,7 +4493,7 @@ fn transCreateNodeMacroFn(c: *Context, name: []const u8, ref: *ast.Node, proto_a const block_lbrace = try appendToken(c, .LBrace, "{"); const return_kw = try appendToken(c, .Keyword_return, "return"); - const unwrap_expr = try transCreateNodeUnwrapNull(c, ref.cast(ast.Node.VarDecl).?.getTrailer("init_node").?); + const unwrap_expr = try transCreateNodeUnwrapNull(c, ref.cast(ast.Node.VarDecl).?.getInitNode().?); const call_expr = try c.createCall(unwrap_expr, fn_params.items.len); const call_params = call_expr.params(); @@ -6361,7 +6361,7 @@ fn getContainer(c: *Context, node: *ast.Node) ?*ast.Node { const ident = node.castTag(.Identifier).?; if (c.global_scope.sym_table.get(tokenSlice(c, ident.token))) |value| { if (value.cast(ast.Node.VarDecl)) |var_decl| - return getContainer(c, var_decl.getTrailer("init_node").?); + return getContainer(c, var_decl.getInitNode().?); } }, @@ -6390,7 +6390,7 @@ fn getContainerTypeOf(c: *Context, ref: *ast.Node) ?*ast.Node { if (ref.castTag(.Identifier)) |ident| { if (c.global_scope.sym_table.get(tokenSlice(c, ident.token))) |value| { if (value.cast(ast.Node.VarDecl)) |var_decl| { - if (var_decl.getTrailer("type_node")) |ty| + if (var_decl.getTypeNode()) |ty| return getContainer(c, ty); } } @@ -6412,7 +6412,7 @@ fn getContainerTypeOf(c: *Context, ref: *ast.Node) ?*ast.Node { } fn getFnProto(c: *Context, ref: *ast.Node) ?*ast.Node.FnProto { - const init = if (ref.cast(ast.Node.VarDecl)) |v| v.getTrailer("init_node").? else return null; + const init = if (ref.cast(ast.Node.VarDecl)) |v| v.getInitNode().? else return null; if (getContainerTypeOf(c, init)) |ty_node| { if (ty_node.castTag(.OptionalType)) |prefix| { if (prefix.rhs.cast(ast.Node.FnProto)) |fn_proto| { diff --git a/src/all_types.hpp b/src/all_types.hpp @@ -1809,7 +1809,6 @@ enum BuiltinFnId { BuiltinFnIdShrExact, BuiltinFnIdSetEvalBranchQuota, BuiltinFnIdAlignCast, - BuiltinFnIdOpaqueType, BuiltinFnIdThis, BuiltinFnIdSetAlignStack, BuiltinFnIdExport, @@ -2734,7 +2733,6 @@ enum IrInstSrcId { IrInstSrcIdImplicitCast, IrInstSrcIdResolveResult, IrInstSrcIdResetResult, - IrInstSrcIdOpaqueType, IrInstSrcIdSetAlignStack, IrInstSrcIdArgType, IrInstSrcIdExport, @@ -4234,10 +4232,6 @@ struct IrInstGenAlignCast { IrInstGen *target; }; -struct IrInstSrcOpaqueType { - IrInstSrc base; -}; - struct IrInstSrcSetAlignStack { IrInstSrc base; diff --git a/src/codegen.cpp b/src/codegen.cpp @@ -8699,7 +8699,6 @@ static void define_builtin_fns(CodeGen *g) { create_builtin_fn(g, BuiltinFnIdShrExact, "shrExact", 2); create_builtin_fn(g, BuiltinFnIdSetEvalBranchQuota, "setEvalBranchQuota", 1); create_builtin_fn(g, BuiltinFnIdAlignCast, "alignCast", 2); - create_builtin_fn(g, BuiltinFnIdOpaqueType, "OpaqueType", 0); create_builtin_fn(g, BuiltinFnIdSetAlignStack, "setAlignStack", 1); create_builtin_fn(g, BuiltinFnIdExport, "export", 2); create_builtin_fn(g, BuiltinFnIdErrorReturnTrace, "errorReturnTrace", 0); diff --git a/src/ir.cpp b/src/ir.cpp @@ -505,8 +505,6 @@ static void destroy_instruction_src(IrInstSrc *inst) { return heap::c_allocator.destroy(reinterpret_cast<IrInstSrcResolveResult *>(inst)); case IrInstSrcIdResetResult: return heap::c_allocator.destroy(reinterpret_cast<IrInstSrcResetResult *>(inst)); - case IrInstSrcIdOpaqueType: - return heap::c_allocator.destroy(reinterpret_cast<IrInstSrcOpaqueType *>(inst)); case IrInstSrcIdSetAlignStack: return heap::c_allocator.destroy(reinterpret_cast<IrInstSrcSetAlignStack *>(inst)); case IrInstSrcIdArgType: @@ -1532,10 +1530,6 @@ static constexpr IrInstSrcId ir_inst_id(IrInstSrcResetResult *) { return IrInstSrcIdResetResult; } -static constexpr IrInstSrcId ir_inst_id(IrInstSrcOpaqueType *) { - return IrInstSrcIdOpaqueType; -} - static constexpr IrInstSrcId ir_inst_id(IrInstSrcSetAlignStack *) { return IrInstSrcIdSetAlignStack; } @@ -4535,12 +4529,6 @@ static IrInstSrc *ir_build_reset_result(IrBuilderSrc *irb, Scope *scope, AstNode return &instruction->base; } -static IrInstSrc *ir_build_opaque_type(IrBuilderSrc *irb, Scope *scope, AstNode *source_node) { - IrInstSrcOpaqueType *instruction = ir_build_instruction<IrInstSrcOpaqueType>(irb, scope, source_node); - - return &instruction->base; -} - static IrInstSrc *ir_build_set_align_stack(IrBuilderSrc *irb, Scope *scope, AstNode *source_node, IrInstSrc *align_bytes) { @@ -7310,11 +7298,6 @@ static IrInstSrc *ir_gen_builtin_fn_call(IrBuilderSrc *irb, Scope *scope, AstNod IrInstSrc *align_cast = ir_build_align_cast_src(irb, scope, node, arg0_value, arg1_value); return ir_lval_wrap(irb, scope, align_cast, lval, result_loc); } - case BuiltinFnIdOpaqueType: - { - IrInstSrc *opaque_type = ir_build_opaque_type(irb, scope, node); - return ir_lval_wrap(irb, scope, opaque_type, lval, result_loc); - } case BuiltinFnIdThis: { IrInstSrc *this_inst = ir_gen_this(irb, scope, node); @@ -30263,15 +30246,6 @@ static IrInstGen *ir_analyze_instruction_align_cast(IrAnalyze *ira, IrInstSrcAli return result; } -static IrInstGen *ir_analyze_instruction_opaque_type(IrAnalyze *ira, IrInstSrcOpaqueType *instruction) { - Buf *bare_name = buf_alloc(); - Buf *full_name = get_anon_type_name(ira->codegen, ira->old_irb.exec, "opaque", - instruction->base.base.scope, instruction->base.base.source_node, bare_name); - ZigType *result_type = get_opaque_type(ira->codegen, instruction->base.base.scope, - instruction->base.base.source_node, buf_ptr(full_name), bare_name); - return ir_const_type(ira, &instruction->base.base, result_type); -} - static IrInstGen *ir_analyze_instruction_set_align_stack(IrAnalyze *ira, IrInstSrcSetAlignStack *instruction) { uint32_t align_bytes; IrInstGen *align_bytes_inst = instruction->align_bytes->child; @@ -31736,8 +31710,6 @@ static IrInstGen *ir_analyze_instruction_base(IrAnalyze *ira, IrInstSrc *instruc return ir_analyze_instruction_resolve_result(ira, (IrInstSrcResolveResult *)instruction); case IrInstSrcIdResetResult: return ir_analyze_instruction_reset_result(ira, (IrInstSrcResetResult *)instruction); - case IrInstSrcIdOpaqueType: - return ir_analyze_instruction_opaque_type(ira, (IrInstSrcOpaqueType *)instruction); case IrInstSrcIdSetAlignStack: return ir_analyze_instruction_set_align_stack(ira, (IrInstSrcSetAlignStack *)instruction); case IrInstSrcIdArgType: @@ -32181,7 +32153,6 @@ bool ir_inst_src_has_side_effects(IrInstSrc *instruction) { case IrInstSrcIdAlignCast: case IrInstSrcIdImplicitCast: case IrInstSrcIdResolveResult: - case IrInstSrcIdOpaqueType: case IrInstSrcIdArgType: case IrInstSrcIdTagType: case IrInstSrcIdErrorReturnTrace: diff --git a/src/ir_print.cpp b/src/ir_print.cpp @@ -306,8 +306,6 @@ const char* ir_inst_src_type_str(IrInstSrcId id) { return "SrcResolveResult"; case IrInstSrcIdResetResult: return "SrcResetResult"; - case IrInstSrcIdOpaqueType: - return "SrcOpaqueType"; case IrInstSrcIdSetAlignStack: return "SrcSetAlignStack"; case IrInstSrcIdArgType: @@ -2315,10 +2313,6 @@ static void ir_print_reset_result(IrPrintSrc *irp, IrInstSrcResetResult *instruc fprintf(irp->f, ")"); } -static void ir_print_opaque_type(IrPrintSrc *irp, IrInstSrcOpaqueType *instruction) { - fprintf(irp->f, "@OpaqueType()"); -} - static void ir_print_set_align_stack(IrPrintSrc *irp, IrInstSrcSetAlignStack *instruction) { fprintf(irp->f, "@setAlignStack("); ir_print_other_inst_src(irp, instruction->align_bytes); @@ -2911,9 +2905,6 @@ static void ir_print_inst_src(IrPrintSrc *irp, IrInstSrc *instruction, bool trai case IrInstSrcIdResetResult: ir_print_reset_result(irp, (IrInstSrcResetResult *)instruction); break; - case IrInstSrcIdOpaqueType: - ir_print_opaque_type(irp, (IrInstSrcOpaqueType *)instruction); - break; case IrInstSrcIdSetAlignStack: ir_print_set_align_stack(irp, (IrInstSrcSetAlignStack *)instruction); break; diff --git a/test/compile_errors.zig b/test/compile_errors.zig @@ -7394,7 +7394,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { }); cases.add("function parameter is opaque", - \\const FooType = @OpaqueType(); + \\const FooType = @Type(.Opaque); \\export fn entry1() void { \\ const someFuncPtr: fn (FooType) void = undefined; \\} diff --git a/test/run_translated_c.zig b/test/run_translated_c.zig @@ -3,6 +3,23 @@ const tests = @import("tests.zig"); const nl = std.cstr.line_sep; pub fn addCases(cases: *tests.RunTranslatedCContext) void { + cases.add("variable shadowing type type", + \\#include <stdlib.h> + \\int main() { + \\ int type = 1; + \\ if (type != 1) abort(); + \\} + , ""); + + cases.add("assignment as expression", + \\#include <stdlib.h> + \\int main() { + \\ int a, b, c, d = 5; + \\ int e = a = b = c = d; + \\ if (e != 5) abort(); + \\} + , ""); + cases.add("static variable in block scope", \\#include <stdlib.h> \\int foo() { diff --git a/test/stage1/behavior/type.zig b/test/stage1/behavior/type.zig @@ -190,7 +190,6 @@ test "Type.ErrorUnion" { } test "Type.Opaque" { - testing.expect(@OpaqueType() != @Type(.Opaque)); testing.expect(@Type(.Opaque) != @Type(.Opaque)); testing.expect(@typeInfo(@Type(.Opaque)) == .Opaque); } diff --git a/tools/process_headers.zig b/tools/process_headers.zig @@ -15,7 +15,7 @@ const Arch = std.Target.Cpu.Arch; const Abi = std.Target.Abi; const OsTag = std.Target.Os.Tag; const assert = std.debug.assert; -const Sha256 = std.crypto.hash.sha2.Sha256; +const Blake3 = std.crypto.hash.Blake3; const LibCTarget = struct { name: []const u8, @@ -314,7 +314,7 @@ pub fn main() !void { var max_bytes_saved: usize = 0; var total_bytes: usize = 0; - var hasher = Sha256.init(.{}); + var hasher = Blake3.init(.{}); for (libc_targets) |libc_target| { const dest_target = DestTarget{ @@ -360,7 +360,7 @@ pub fn main() !void { const trimmed = std.mem.trim(u8, raw_bytes, " \r\n\t"); total_bytes += raw_bytes.len; const hash = try allocator.alloc(u8, 32); - hasher = Sha256.init(.{}); + hasher = Blake3.init(.{}); hasher.update(rel_path); hasher.update(trimmed); hasher.final(hash); @@ -412,12 +412,12 @@ pub fn main() !void { { var hash_it = path_kv.value.iterator(); while (hash_it.next()) |hash_kv| { - const contents = &hash_to_contents.get(hash_kv.value).?; + const contents = &hash_to_contents.getEntry(hash_kv.value).?.value; try contents_list.append(contents); } } std.sort.sort(*Contents, contents_list.span(), {}, Contents.hitCountLessThan); - var best_contents = contents_list.popOrNull().?; + const best_contents = contents_list.popOrNull().?; if (best_contents.hit_count > 1) { // worth it to make it generic const full_path = try std.fs.path.join(allocator, &[_][]const u8{ out_dir, generic_name, path_kv.key }); @@ -434,7 +434,7 @@ pub fn main() !void { } var hash_it = path_kv.value.iterator(); while (hash_it.next()) |hash_kv| { - const contents = &hash_to_contents.get(hash_kv.value).?; + const contents = &hash_to_contents.getEntry(hash_kv.value).?.value; if (contents.is_generic) continue; const dest_target = hash_kv.key;