From dd8cc6b0f1f7e92c0ec2bfa22e12f1595206e35d Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 30 Aug 2020 21:27:30 -0700 Subject: [PATCH] update glibc headers to 2.32 --- .../include/aarch64-linux-gnu/bits/hwcap.h | 21 +- .../aarch64-linux-gnu/bits/long-double.h | 2 +- .../bits/mman.h} | 19 +- .../aarch64-linux-gnu/bits/typesizes.h | 38 +++- .../aarch64-linux-gnu/gnu/lib-names-lp64.h | 2 - .../aarch64-linux-gnu/gnu/stubs-lp64.h | 5 +- .../include/aarch64_be-linux-gnu/bits/hwcap.h | 21 +- .../aarch64_be-linux-gnu/bits/long-double.h | 2 +- .../bits/mman.h} | 21 +- .../aarch64_be-linux-gnu/bits/typesizes.h | 38 +++- .../gnu/lib-names-lp64_be.h | 2 - .../aarch64_be-linux-gnu/gnu/stubs-lp64_be.h | 5 +- .../arm-linux-gnueabi/bits/long-double.h | 15 +- .../arm-linux-gnueabihf/bits/long-double.h | 15 +- .../armeb-linux-gnueabi/bits/long-double.h | 15 +- .../armeb-linux-gnueabihf/bits/long-double.h | 15 +- lib/libc/include/generic-glibc/argp.h | 3 +- .../include/generic-glibc/bits/fcntl-linux.h | 3 +- .../include/generic-glibc/bits/fenvinline.h | 8 - lib/libc/include/generic-glibc/bits/floatn.h | 2 +- .../include/generic-glibc/bits/long-double.h | 2 +- .../bits/mathcalls-helper-functions.h | 18 +- .../include/generic-glibc/bits/mathcalls.h | 9 +- .../include/generic-glibc/bits/mathinline.h | 12 -- .../include/generic-glibc/bits/mman-shared.h | 1 + lib/libc/include/generic-glibc/bits/msq-pad.h | 31 --- lib/libc/include/generic-glibc/bits/msq.h | 39 +--- .../include/generic-glibc/bits/resource.h | 2 +- lib/libc/include/generic-glibc/bits/sem-pad.h | 33 --- lib/libc/include/generic-glibc/bits/sem.h | 26 +-- .../include/generic-glibc/bits/semaphore.h | 9 +- lib/libc/include/generic-glibc/bits/shm-pad.h | 37 ---- lib/libc/include/generic-glibc/bits/shm.h | 35 +-- .../include/generic-glibc/bits/signum-arch.h | 64 ++++++ .../generic-glibc/bits/signum-generic.h | 27 +-- lib/libc/include/generic-glibc/bits/signum.h | 58 ----- .../generic-glibc/bits/socket-constants.h | 16 +- .../generic-glibc/bits/statx-generic.h | 1 + .../include/generic-glibc/bits/stdio-ldbl.h | 46 ++-- lib/libc/include/generic-glibc/bits/stdio2.h | 25 ++- .../include/generic-glibc/bits/stdlib-ldbl.h | 22 ++ lib/libc/include/generic-glibc/bits/stdlib.h | 17 +- .../generic-glibc/bits/string_fortified.h | 5 +- .../include/generic-glibc/bits/sys_errlist.h | 32 --- lib/libc/include/generic-glibc/bits/syscall.h | 24 ++- lib/libc/include/generic-glibc/bits/sysctl.h | 1 - .../include/generic-glibc/bits/syslog-ldbl.h | 4 +- .../generic-glibc/bits/thread-shared-types.h | 10 + lib/libc/include/generic-glibc/bits/types.h | 1 + .../bits/types/struct_msqid_ds.h | 47 ++++ .../bits/types/struct_semid_ds.h | 39 ++++ .../bits/types/struct_shmid_ds.h | 45 ++++ .../include/generic-glibc/bits/typesizes.h | 7 + lib/libc/include/generic-glibc/bits/unistd.h | 58 +++-- .../include/generic-glibc/bits/wchar-ldbl.h | 36 +++- lib/libc/include/generic-glibc/complex.h | 29 ++- lib/libc/include/generic-glibc/elf.h | 80 ++++++- lib/libc/include/generic-glibc/err.h | 3 +- lib/libc/include/generic-glibc/error.h | 6 +- lib/libc/include/generic-glibc/features.h | 2 +- lib/libc/include/generic-glibc/fenv.h | 4 - .../include/generic-glibc/gnu/lib-names-32.h | 2 - .../generic-glibc/gnu/lib-names-hard.h | 2 - .../generic-glibc/gnu/lib-names-n32_hard.h | 2 - .../generic-glibc/gnu/lib-names-n64_hard.h | 2 - .../generic-glibc/gnu/lib-names-o32_hard.h | 2 - .../generic-glibc/gnu/lib-names-soft.h | 2 - lib/libc/include/generic-glibc/gnu/stubs-32.h | 2 - lib/libc/include/generic-glibc/gnu/stubs-64.h | 2 - .../include/generic-glibc/gnu/stubs-hard.h | 2 - .../generic-glibc/gnu/stubs-n32_hard.h | 2 - .../generic-glibc/gnu/stubs-n64_hard.h | 2 - .../generic-glibc/gnu/stubs-o32_hard.h | 2 - .../include/generic-glibc/gnu/stubs-soft.h | 2 - lib/libc/include/generic-glibc/inttypes.h | 48 ++--- lib/libc/include/generic-glibc/malloc.h | 7 +- lib/libc/include/generic-glibc/math.h | 88 ++++++-- lib/libc/include/generic-glibc/monetary.h | 3 +- .../include/generic-glibc/netinet/icmp6.h | 8 +- lib/libc/include/generic-glibc/netinet/in.h | 4 + lib/libc/include/generic-glibc/nss.h | 203 +++++++++++++++++- lib/libc/include/generic-glibc/printf.h | 3 +- lib/libc/include/generic-glibc/pthread.h | 15 ++ lib/libc/include/generic-glibc/signal.h | 31 +-- lib/libc/include/generic-glibc/stdio.h | 27 +-- lib/libc/include/generic-glibc/stdlib.h | 15 +- lib/libc/include/generic-glibc/string.h | 48 +++-- lib/libc/include/generic-glibc/sys/cdefs.h | 49 ++++- lib/libc/include/generic-glibc/sys/random.h | 1 + .../sys/single_threaded.h} | 23 +- lib/libc/include/generic-glibc/sys/sysctl.h | 76 ------- lib/libc/include/generic-glibc/sys/syslog.h | 4 +- lib/libc/include/generic-glibc/threads.h | 13 +- lib/libc/include/generic-glibc/unistd.h | 65 +++--- lib/libc/include/generic-glibc/wchar.h | 14 +- lib/libc/include/i386-linux-gnu/bits/fenv.h | 54 ----- .../include/i386-linux-gnu/bits/long-double.h | 2 +- lib/libc/include/i386-linux-gnu/bits/select.h | 63 ------ .../include/i386-linux-gnu/bits/semaphore.h | 40 ---- lib/libc/include/i386-linux-gnu/bits/sysctl.h | 20 -- .../bits/types/struct_semid_ds.h | 34 +++ .../include/i386-linux-gnu/bits/typesizes.h | 6 + .../bits/floatn.h | 2 +- .../include/mips-linux-gnu/bits/msq-pad.h | 31 --- .../include/mips-linux-gnu/bits/resource.h | 2 +- .../bits/semaphore.h | 8 +- .../include/mips-linux-gnu/bits/shm-pad.h | 26 --- .../include/mips-linux-gnu/bits/signum-arch.h | 65 ++++++ lib/libc/include/mips-linux-gnu/bits/signum.h | 68 ------ .../bits/types/struct_msqid_ds.h | 56 +++++ .../{sem-pad.h => types/struct_semid_ds.h} | 18 +- .../bits/types/struct_shmid_ds.h | 49 +++++ .../bits/floatn.h | 2 +- .../mips64-linux-gnuabi64/bits/msq-pad.h | 31 --- .../mips64-linux-gnuabi64/bits/resource.h | 2 +- .../bits/semaphore.h | 8 +- .../mips64-linux-gnuabi64/bits/shm-pad.h | 26 --- .../mips64-linux-gnuabi64/bits/signum-arch.h | 65 ++++++ .../mips64-linux-gnuabi64/bits/signum.h | 68 ------ .../bits/types/struct_msqid_ds.h | 56 +++++ .../bits/types/struct_semid_ds.h} | 18 +- .../bits/types/struct_shmid_ds.h | 49 +++++ .../bits/floatn.h | 2 +- .../mips64-linux-gnuabin32/bits/msq-pad.h | 31 --- .../mips64-linux-gnuabin32/bits/resource.h | 2 +- .../bits/semaphore.h | 8 +- .../mips64-linux-gnuabin32/bits/shm-pad.h | 26 --- .../mips64-linux-gnuabin32/bits/signum-arch.h | 65 ++++++ .../mips64-linux-gnuabin32/bits/signum.h | 68 ------ .../bits/types/struct_msqid_ds.h | 56 +++++ .../bits/types/struct_semid_ds.h} | 18 +- .../bits/types/struct_shmid_ds.h | 49 +++++ .../bits/floatn.h | 2 +- .../mips64el-linux-gnuabi64/bits/msq-pad.h | 31 --- .../mips64el-linux-gnuabi64/bits/resource.h | 2 +- .../mips64el-linux-gnuabi64/bits/sem-pad.h | 24 --- .../bits/semaphore.h | 8 +- .../mips64el-linux-gnuabi64/bits/shm-pad.h | 26 --- .../bits/signum-arch.h | 65 ++++++ .../mips64el-linux-gnuabi64/bits/signum.h | 68 ------ .../bits/types/struct_msqid_ds.h | 56 +++++ .../bits/types/struct_semid_ds.h} | 18 +- .../bits/types/struct_shmid_ds.h | 49 +++++ .../mips64el-linux-gnuabin32/bits/floatn.h | 97 +++++++++ .../mips64el-linux-gnuabin32/bits/msq-pad.h | 31 --- .../mips64el-linux-gnuabin32/bits/resource.h | 2 +- .../mips64el-linux-gnuabin32/bits/sem-pad.h | 24 --- .../mips64el-linux-gnuabin32/bits/semaphore.h | 36 ++++ .../mips64el-linux-gnuabin32/bits/shm-pad.h | 26 --- .../bits/signum-arch.h | 65 ++++++ .../mips64el-linux-gnuabin32/bits/signum.h | 68 ------ .../bits/types/struct_msqid_ds.h | 56 +++++ .../bits/types/struct_semid_ds.h | 32 +++ .../bits/types/struct_shmid_ds.h | 49 +++++ .../include/mipsel-linux-gnu/bits/floatn.h | 97 +++++++++ .../include/mipsel-linux-gnu/bits/msq-pad.h | 31 --- .../include/mipsel-linux-gnu/bits/resource.h | 2 +- .../include/mipsel-linux-gnu/bits/sem-pad.h | 24 --- .../include/mipsel-linux-gnu/bits/semaphore.h | 36 ++++ .../include/mipsel-linux-gnu/bits/shm-pad.h | 26 --- .../mipsel-linux-gnu/bits/signum-arch.h | 65 ++++++ .../include/mipsel-linux-gnu/bits/signum.h | 68 ------ .../bits/types/struct_msqid_ds.h | 56 +++++ .../bits/types/struct_semid_ds.h | 32 +++ .../bits/types/struct_shmid_ds.h | 49 +++++ .../powerpc-linux-gnu/bits/fenvinline.h | 102 --------- .../include/powerpc-linux-gnu/bits/hwcap.h | 4 +- .../powerpc-linux-gnu/bits/iscanonical.h | 2 +- .../powerpc-linux-gnu/bits/long-double.h | 2 +- .../include/powerpc-linux-gnu/bits/msq-pad.h | 26 --- .../include/powerpc-linux-gnu/bits/sem-pad.h | 26 --- .../powerpc-linux-gnu/bits/semaphore.h | 40 ---- .../include/powerpc-linux-gnu/bits/shm-pad.h | 28 --- .../bits/types/struct_msqid_ds.h | 47 ++++ .../bits/types/struct_semid_ds.h | 39 ++++ .../bits/types/struct_shmid_ds.h | 46 ++++ .../powerpc-linux-gnu/gnu/lib-names-32.h | 2 - lib/libc/include/powerpc-linux-gnu/ieee754.h | 68 +++++- .../powerpc64-linux-gnu/bits/fenvinline.h | 102 --------- .../include/powerpc64-linux-gnu/bits/hwcap.h | 4 +- .../powerpc64-linux-gnu/bits/iscanonical.h | 2 +- .../powerpc64-linux-gnu/bits/long-double.h | 2 +- .../powerpc64-linux-gnu/bits/msq-pad.h | 26 --- .../powerpc64-linux-gnu/bits/sem-pad.h | 26 --- .../powerpc64-linux-gnu/bits/semaphore.h | 40 ---- .../powerpc64-linux-gnu/bits/shm-pad.h | 28 --- .../bits/types/struct_msqid_ds.h | 47 ++++ .../bits/types/struct_semid_ds.h | 39 ++++ .../bits/types/struct_shmid_ds.h | 46 ++++ .../powerpc64-linux-gnu/gnu/lib-names-64-v1.h | 2 - .../powerpc64-linux-gnu/gnu/stubs-64-v1.h | 2 - .../include/powerpc64-linux-gnu/ieee754.h | 68 +++++- .../powerpc64le-linux-gnu/bits/fenvinline.h | 102 --------- .../powerpc64le-linux-gnu/bits/hwcap.h | 4 +- .../powerpc64le-linux-gnu/bits/iscanonical.h | 2 +- .../powerpc64le-linux-gnu/bits/long-double.h | 5 +- .../powerpc64le-linux-gnu/bits/msq-pad.h | 26 --- .../powerpc64le-linux-gnu/bits/sem-pad.h | 26 --- .../powerpc64le-linux-gnu/bits/semaphore.h | 40 ---- .../powerpc64le-linux-gnu/bits/shm-pad.h | 28 --- .../bits/types/struct_msqid_ds.h | 47 ++++ .../bits/types/struct_semid_ds.h | 39 ++++ .../bits/types/struct_shmid_ds.h | 46 ++++ .../gnu/lib-names-64-v2.h | 2 - .../powerpc64le-linux-gnu/gnu/stubs-64-v2.h | 2 - .../include/powerpc64le-linux-gnu/ieee754.h | 68 +++++- .../riscv64-linux-gnu/bits/long-double.h | 2 +- .../riscv64-linux-gnu/bits/semaphore.h | 33 --- .../riscv64-linux-gnu/bits/typesizes.h | 38 +++- .../riscv64-linux-gnu/gnu/lib-names-lp64.h | 2 - .../riscv64-linux-gnu/gnu/stubs-lp64.h | 5 +- lib/libc/include/s390x-linux-gnu/bits/fenv.h | 4 +- .../s390x-linux-gnu/bits/long-double.h | 2 +- .../include/s390x-linux-gnu/bits/semaphore.h | 39 ---- .../include/s390x-linux-gnu/bits/typesizes.h | 7 + .../s390x-linux-gnu/gnu/lib-names-64.h | 2 - lib/libc/include/sparc-linux-gnu/bits/fenv.h | 9 - .../include/sparc-linux-gnu/bits/floatn.h | 97 --------- .../sparc-linux-gnu/bits/long-double.h | 2 +- .../include/sparc-linux-gnu/bits/resource.h | 2 +- .../include/sparc-linux-gnu/bits/semaphore.h | 40 ---- .../sparc-linux-gnu/bits/signum-arch.h | 66 ++++++ .../include/sparc-linux-gnu/bits/signum.h | 39 ---- .../bits/types/struct_msqid_ds.h | 47 ++++ .../bits/types/struct_semid_ds.h | 39 ++++ .../bits/types/struct_shmid_ds.h | 45 ++++ .../include/sparc-linux-gnu/bits/typesizes.h | 7 + .../sparc-linux-gnu/gnu/lib-names-64.h | 2 - .../include/sparcv9-linux-gnu/bits/fenv.h | 9 - .../include/sparcv9-linux-gnu/bits/floatn.h | 97 --------- .../sparcv9-linux-gnu/bits/long-double.h | 2 +- .../include/sparcv9-linux-gnu/bits/msq-pad.h | 26 --- .../include/sparcv9-linux-gnu/bits/resource.h | 2 +- .../include/sparcv9-linux-gnu/bits/sem-pad.h | 26 --- .../sparcv9-linux-gnu/bits/semaphore.h | 40 ---- .../include/sparcv9-linux-gnu/bits/shm-pad.h | 28 --- .../sparcv9-linux-gnu/bits/signum-arch.h | 66 ++++++ .../include/sparcv9-linux-gnu/bits/signum.h | 39 ---- .../bits/types/struct_msqid_ds.h | 47 ++++ .../bits/types/struct_semid_ds.h | 39 ++++ .../bits/types/struct_shmid_ds.h | 45 ++++ .../sparcv9-linux-gnu/bits/typesizes.h | 7 + lib/libc/include/x86_64-linux-gnu/bits/fenv.h | 54 ----- .../x86_64-linux-gnu/bits/long-double.h | 2 +- .../include/x86_64-linux-gnu/bits/select.h | 63 ------ .../include/x86_64-linux-gnu/bits/sem-pad.h | 24 --- .../include/x86_64-linux-gnu/bits/semaphore.h | 40 ---- .../include/x86_64-linux-gnu/bits/sysctl.h | 20 -- .../bits/types/struct_semid_ds.h | 34 +++ .../include/x86_64-linux-gnu/bits/typesizes.h | 6 + .../x86_64-linux-gnu/gnu/lib-names-64.h | 2 - .../include/x86_64-linux-gnu/gnu/stubs-64.h | 2 - .../include/x86_64-linux-gnux32/bits/fenv.h | 54 ----- .../x86_64-linux-gnux32/bits/long-double.h | 2 +- .../include/x86_64-linux-gnux32/bits/select.h | 63 ------ .../x86_64-linux-gnux32/bits/sem-pad.h | 24 --- .../x86_64-linux-gnux32/bits/semaphore.h | 40 ---- .../include/x86_64-linux-gnux32/bits/sysctl.h | 20 -- .../bits/types/struct_semid_ds.h | 34 +++ .../x86_64-linux-gnux32/bits/typesizes.h | 6 + .../x86_64-linux-gnux32/gnu/lib-names-x32.h | 2 - .../x86_64-linux-gnux32/gnu/stubs-x32.h | 2 - 262 files changed, 3876 insertions(+), 3424 deletions(-) rename lib/libc/include/{sparc-linux-gnu/bits/sem-pad.h => aarch64-linux-gnu/bits/mman.h} (62%) rename lib/libc/include/{sparc-linux-gnu/bits/shm-pad.h => aarch64_be-linux-gnu/bits/mman.h} (62%) delete mode 100644 lib/libc/include/generic-glibc/bits/fenvinline.h delete mode 100644 lib/libc/include/generic-glibc/bits/mathinline.h delete mode 100644 lib/libc/include/generic-glibc/bits/msq-pad.h delete mode 100644 lib/libc/include/generic-glibc/bits/sem-pad.h delete mode 100644 lib/libc/include/generic-glibc/bits/shm-pad.h create mode 100644 lib/libc/include/generic-glibc/bits/signum-arch.h delete mode 100644 lib/libc/include/generic-glibc/bits/signum.h delete mode 100644 lib/libc/include/generic-glibc/bits/sys_errlist.h delete mode 100644 lib/libc/include/generic-glibc/bits/sysctl.h create mode 100644 lib/libc/include/generic-glibc/bits/types/struct_msqid_ds.h create mode 100644 lib/libc/include/generic-glibc/bits/types/struct_semid_ds.h create mode 100644 lib/libc/include/generic-glibc/bits/types/struct_shmid_ds.h rename lib/libc/include/{sparc-linux-gnu/bits/msq-pad.h => generic-glibc/sys/single_threaded.h} (62%) delete mode 100644 lib/libc/include/generic-glibc/sys/sysctl.h delete mode 100644 lib/libc/include/i386-linux-gnu/bits/select.h delete mode 100644 lib/libc/include/i386-linux-gnu/bits/semaphore.h delete mode 100644 lib/libc/include/i386-linux-gnu/bits/sysctl.h create mode 100644 lib/libc/include/i386-linux-gnu/bits/types/struct_semid_ds.h rename lib/libc/include/{aarch64-linux-gnu => mips-linux-gnu}/bits/floatn.h (97%) delete mode 100644 lib/libc/include/mips-linux-gnu/bits/msq-pad.h rename lib/libc/include/{armeb-linux-gnueabi => mips-linux-gnu}/bits/semaphore.h (92%) delete mode 100644 lib/libc/include/mips-linux-gnu/bits/shm-pad.h create mode 100644 lib/libc/include/mips-linux-gnu/bits/signum-arch.h delete mode 100644 lib/libc/include/mips-linux-gnu/bits/signum.h create mode 100644 lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h rename lib/libc/include/mips-linux-gnu/bits/{sem-pad.h => types/struct_semid_ds.h} (56%) create mode 100644 lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h rename lib/libc/include/{aarch64_be-linux-gnu => mips64-linux-gnuabi64}/bits/floatn.h (97%) delete mode 100644 lib/libc/include/mips64-linux-gnuabi64/bits/msq-pad.h rename lib/libc/include/{armeb-linux-gnueabihf => mips64-linux-gnuabi64}/bits/semaphore.h (92%) delete mode 100644 lib/libc/include/mips64-linux-gnuabi64/bits/shm-pad.h create mode 100644 lib/libc/include/mips64-linux-gnuabi64/bits/signum-arch.h delete mode 100644 lib/libc/include/mips64-linux-gnuabi64/bits/signum.h create mode 100644 lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_msqid_ds.h rename lib/libc/include/{mips64-linux-gnuabin32/bits/sem-pad.h => mips64-linux-gnuabi64/bits/types/struct_semid_ds.h} (56%) create mode 100644 lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_shmid_ds.h rename lib/libc/include/{s390x-linux-gnu => mips64-linux-gnuabin32}/bits/floatn.h (97%) delete mode 100644 lib/libc/include/mips64-linux-gnuabin32/bits/msq-pad.h rename lib/libc/include/{arm-linux-gnueabi => mips64-linux-gnuabin32}/bits/semaphore.h (92%) delete mode 100644 lib/libc/include/mips64-linux-gnuabin32/bits/shm-pad.h create mode 100644 lib/libc/include/mips64-linux-gnuabin32/bits/signum-arch.h delete mode 100644 lib/libc/include/mips64-linux-gnuabin32/bits/signum.h create mode 100644 lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_msqid_ds.h rename lib/libc/include/{mips64-linux-gnuabi64/bits/sem-pad.h => mips64-linux-gnuabin32/bits/types/struct_semid_ds.h} (56%) create mode 100644 lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_shmid_ds.h rename lib/libc/include/{riscv64-linux-gnu => mips64el-linux-gnuabi64}/bits/floatn.h (97%) delete mode 100644 lib/libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h delete mode 100644 lib/libc/include/mips64el-linux-gnuabi64/bits/sem-pad.h rename lib/libc/include/{arm-linux-gnueabihf => mips64el-linux-gnuabi64}/bits/semaphore.h (92%) delete mode 100644 lib/libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h create mode 100644 lib/libc/include/mips64el-linux-gnuabi64/bits/signum-arch.h delete mode 100644 lib/libc/include/mips64el-linux-gnuabi64/bits/signum.h create mode 100644 lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_msqid_ds.h rename lib/libc/include/{i386-linux-gnu/bits/sem-pad.h => mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h} (56%) create mode 100644 lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_shmid_ds.h create mode 100644 lib/libc/include/mips64el-linux-gnuabin32/bits/floatn.h delete mode 100644 lib/libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h delete mode 100644 lib/libc/include/mips64el-linux-gnuabin32/bits/sem-pad.h create mode 100644 lib/libc/include/mips64el-linux-gnuabin32/bits/semaphore.h delete mode 100644 lib/libc/include/mips64el-linux-gnuabin32/bits/shm-pad.h create mode 100644 lib/libc/include/mips64el-linux-gnuabin32/bits/signum-arch.h delete mode 100644 lib/libc/include/mips64el-linux-gnuabin32/bits/signum.h create mode 100644 lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_msqid_ds.h create mode 100644 lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_semid_ds.h create mode 100644 lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_shmid_ds.h create mode 100644 lib/libc/include/mipsel-linux-gnu/bits/floatn.h delete mode 100644 lib/libc/include/mipsel-linux-gnu/bits/msq-pad.h delete mode 100644 lib/libc/include/mipsel-linux-gnu/bits/sem-pad.h create mode 100644 lib/libc/include/mipsel-linux-gnu/bits/semaphore.h delete mode 100644 lib/libc/include/mipsel-linux-gnu/bits/shm-pad.h create mode 100644 lib/libc/include/mipsel-linux-gnu/bits/signum-arch.h delete mode 100644 lib/libc/include/mipsel-linux-gnu/bits/signum.h create mode 100644 lib/libc/include/mipsel-linux-gnu/bits/types/struct_msqid_ds.h create mode 100644 lib/libc/include/mipsel-linux-gnu/bits/types/struct_semid_ds.h create mode 100644 lib/libc/include/mipsel-linux-gnu/bits/types/struct_shmid_ds.h delete mode 100644 lib/libc/include/powerpc-linux-gnu/bits/fenvinline.h delete mode 100644 lib/libc/include/powerpc-linux-gnu/bits/msq-pad.h delete mode 100644 lib/libc/include/powerpc-linux-gnu/bits/sem-pad.h delete mode 100644 lib/libc/include/powerpc-linux-gnu/bits/semaphore.h delete mode 100644 lib/libc/include/powerpc-linux-gnu/bits/shm-pad.h create mode 100644 lib/libc/include/powerpc-linux-gnu/bits/types/struct_msqid_ds.h create mode 100644 lib/libc/include/powerpc-linux-gnu/bits/types/struct_semid_ds.h create mode 100644 lib/libc/include/powerpc-linux-gnu/bits/types/struct_shmid_ds.h delete mode 100644 lib/libc/include/powerpc64-linux-gnu/bits/fenvinline.h delete mode 100644 lib/libc/include/powerpc64-linux-gnu/bits/msq-pad.h delete mode 100644 lib/libc/include/powerpc64-linux-gnu/bits/sem-pad.h delete mode 100644 lib/libc/include/powerpc64-linux-gnu/bits/semaphore.h delete mode 100644 lib/libc/include/powerpc64-linux-gnu/bits/shm-pad.h create mode 100644 lib/libc/include/powerpc64-linux-gnu/bits/types/struct_msqid_ds.h create mode 100644 lib/libc/include/powerpc64-linux-gnu/bits/types/struct_semid_ds.h create mode 100644 lib/libc/include/powerpc64-linux-gnu/bits/types/struct_shmid_ds.h delete mode 100644 lib/libc/include/powerpc64le-linux-gnu/bits/fenvinline.h delete mode 100644 lib/libc/include/powerpc64le-linux-gnu/bits/msq-pad.h delete mode 100644 lib/libc/include/powerpc64le-linux-gnu/bits/sem-pad.h delete mode 100644 lib/libc/include/powerpc64le-linux-gnu/bits/semaphore.h delete mode 100644 lib/libc/include/powerpc64le-linux-gnu/bits/shm-pad.h create mode 100644 lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_msqid_ds.h create mode 100644 lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_semid_ds.h create mode 100644 lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_shmid_ds.h delete mode 100644 lib/libc/include/riscv64-linux-gnu/bits/semaphore.h delete mode 100644 lib/libc/include/s390x-linux-gnu/bits/semaphore.h delete mode 100644 lib/libc/include/sparc-linux-gnu/bits/floatn.h delete mode 100644 lib/libc/include/sparc-linux-gnu/bits/semaphore.h create mode 100644 lib/libc/include/sparc-linux-gnu/bits/signum-arch.h delete mode 100644 lib/libc/include/sparc-linux-gnu/bits/signum.h create mode 100644 lib/libc/include/sparc-linux-gnu/bits/types/struct_msqid_ds.h create mode 100644 lib/libc/include/sparc-linux-gnu/bits/types/struct_semid_ds.h create mode 100644 lib/libc/include/sparc-linux-gnu/bits/types/struct_shmid_ds.h delete mode 100644 lib/libc/include/sparcv9-linux-gnu/bits/floatn.h delete mode 100644 lib/libc/include/sparcv9-linux-gnu/bits/msq-pad.h delete mode 100644 lib/libc/include/sparcv9-linux-gnu/bits/sem-pad.h delete mode 100644 lib/libc/include/sparcv9-linux-gnu/bits/semaphore.h delete mode 100644 lib/libc/include/sparcv9-linux-gnu/bits/shm-pad.h create mode 100644 lib/libc/include/sparcv9-linux-gnu/bits/signum-arch.h delete mode 100644 lib/libc/include/sparcv9-linux-gnu/bits/signum.h create mode 100644 lib/libc/include/sparcv9-linux-gnu/bits/types/struct_msqid_ds.h create mode 100644 lib/libc/include/sparcv9-linux-gnu/bits/types/struct_semid_ds.h create mode 100644 lib/libc/include/sparcv9-linux-gnu/bits/types/struct_shmid_ds.h delete mode 100644 lib/libc/include/x86_64-linux-gnu/bits/select.h delete mode 100644 lib/libc/include/x86_64-linux-gnu/bits/sem-pad.h delete mode 100644 lib/libc/include/x86_64-linux-gnu/bits/semaphore.h delete mode 100644 lib/libc/include/x86_64-linux-gnu/bits/sysctl.h create mode 100644 lib/libc/include/x86_64-linux-gnu/bits/types/struct_semid_ds.h delete mode 100644 lib/libc/include/x86_64-linux-gnux32/bits/select.h delete mode 100644 lib/libc/include/x86_64-linux-gnux32/bits/sem-pad.h delete mode 100644 lib/libc/include/x86_64-linux-gnux32/bits/semaphore.h delete mode 100644 lib/libc/include/x86_64-linux-gnux32/bits/sysctl.h create mode 100644 lib/libc/include/x86_64-linux-gnux32/bits/types/struct_semid_ds.h diff --git a/lib/libc/include/aarch64-linux-gnu/bits/hwcap.h b/lib/libc/include/aarch64-linux-gnu/bits/hwcap.h index cf38b9d8b7..9f3cadf056 100644 --- 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 index ce06962796..f95b24f8e7 100644 --- 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/sparc-linux-gnu/bits/sem-pad.h b/lib/libc/include/aarch64-linux-gnu/bits/mman.h similarity index 62% rename from lib/libc/include/sparc-linux-gnu/bits/sem-pad.h rename to lib/libc/include/aarch64-linux-gnu/bits/mman.h index 75a0a010c9..da9c3b862f 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/sem-pad.h +++ b/lib/libc/include/aarch64-linux-gnu/bits/mman.h @@ -1,5 +1,5 @@ -/* Define where padding goes in struct semid_ds. SPARC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. +/* 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 @@ -16,11 +16,16 @@ License along with the GNU C Library; if not, see . */ -#ifndef _SYS_SEM_H -# error "Never use directly; include instead." +#ifndef _SYS_MMAN_H +# error "Never use directly; include instead." #endif -#include +/* AArch64 specific definitions, should be in sync with + arch/arm64/include/uapi/asm/mman.h. */ -#define __SEM_PAD_AFTER_TIME 0 -#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32) \ No newline at end of file +#define PROT_BTI 0x10 + +#include + +/* Include generic Linux declarations. */ +#include \ 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 index d9e9b274ac..a5f4c78b94 100644 --- 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 for the meaning of these macros. This file exists so that 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 index f1923e9517..d25085e24f 100644 --- 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 index 342cde4c98..4c2911dd6d 100644 --- 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/hwcap.h b/lib/libc/include/aarch64_be-linux-gnu/bits/hwcap.h index cf38b9d8b7..9f3cadf056 100644 --- 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 index ce06962796..f95b24f8e7 100644 --- 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/sparc-linux-gnu/bits/shm-pad.h b/lib/libc/include/aarch64_be-linux-gnu/bits/mman.h similarity index 62% rename from lib/libc/include/sparc-linux-gnu/bits/shm-pad.h rename to lib/libc/include/aarch64_be-linux-gnu/bits/mman.h index 6f9480247f..da9c3b862f 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/shm-pad.h +++ b/lib/libc/include/aarch64_be-linux-gnu/bits/mman.h @@ -1,5 +1,5 @@ -/* Define where padding goes in struct shmid_ds. SPARC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. +/* 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 @@ -16,13 +16,16 @@ License along with the GNU C Library; if not, see . */ -#ifndef _SYS_SHM_H -# error "Never use directly; include instead." +#ifndef _SYS_MMAN_H +# error "Never use directly; include instead." #endif -#include +/* AArch64 specific definitions, should be in sync with + arch/arm64/include/uapi/asm/mman.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 +#define PROT_BTI 0x10 + +#include + +/* Include generic Linux declarations. */ +#include \ 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 index d9e9b274ac..a5f4c78b94 100644 --- 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 for the meaning of these macros. This file exists so that 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 index f5cf894313..fb1dd8a26c 100644 --- 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 index 342cde4c98..4c2911dd6d 100644 --- 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 index 13e74241e1..088c7a2a06 100644 --- 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-gnueabihf/bits/long-double.h b/lib/libc/include/arm-linux-gnueabihf/bits/long-double.h index 13e74241e1..088c7a2a06 100644 --- 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/armeb-linux-gnueabi/bits/long-double.h b/lib/libc/include/armeb-linux-gnueabi/bits/long-double.h index 13e74241e1..088c7a2a06 100644 --- 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-gnueabihf/bits/long-double.h b/lib/libc/include/armeb-linux-gnueabihf/bits/long-double.h index 13e74241e1..088c7a2a06 100644 --- 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/generic-glibc/argp.h b/lib/libc/include/generic-glibc/argp.h index 0bb8d732f5..8101648163 100644 --- 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 +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include #endif diff --git a/lib/libc/include/generic-glibc/bits/fcntl-linux.h b/lib/libc/include/generic-glibc/bits/fcntl-linux.h index 4e3813d8c4..14d7e72f01 100644 --- 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 deleted file mode 100644 index 1367c80eaf..0000000000 --- a/lib/libc/include/generic-glibc/bits/fenvinline.h +++ /dev/null @@ -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 index 68a17ab2c7..a4045e43a3 100644 --- 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 index 27339ff440..2ce9aaebd9 100644 --- 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 index 88ced5d2e1..29808be75a 100644 --- 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 . */ - /* 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 index e6b009ff27..28d936113e 100644 --- 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 deleted file mode 100644 index 76a37688ed..0000000000 --- a/lib/libc/include/generic-glibc/bits/mathinline.h +++ /dev/null @@ -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 index aa6c176fca..45862663e3 100644 --- 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 deleted file mode 100644 index 5cc786f0d3..0000000000 --- a/lib/libc/include/generic-glibc/bits/msq-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_MSG_H -# error "Never use directly; include instead." -#endif - -#include - -/* 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 index 98efc613d1..7c8dba0eca 100644 --- a/lib/libc/include/generic-glibc/bits/msq.h +++ b/lib/libc/include/generic-glibc/bits/msq.h @@ -20,7 +20,12 @@ #endif #include -#include + +/* Types used in the MSQID_DS structure definition. */ +typedef __syscall_ulong_t msgqnum_t; +typedef __syscall_ulong_t msglen_t; + +#include /* 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 index 6f4ec334ac..f5b55f6a7c 100644 --- 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 deleted file mode 100644 index 92c1bab60a..0000000000 --- a/lib/libc/include/generic-glibc/bits/sem-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SEM_H -# error "Never use directly; include instead." -#endif - -#include - -/* 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 , 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 index b352aa0cbb..67c394015a 100644 --- a/lib/libc/include/generic-glibc/bits/sem.h +++ b/lib/libc/include/generic-glibc/bits/sem.h @@ -20,7 +20,8 @@ #endif #include -#include +#include +#include /* 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 index e28b319eb5..97292723c8 100644 --- 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 . */ #ifndef _SEMAPHORE_H # error "Never use directly; include instead." #endif -#if _MIPS_SIM == _ABI64 +#include + +#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 deleted file mode 100644 index e214cd6e6b..0000000000 --- a/lib/libc/include/generic-glibc/bits/shm-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SHM_H -# error "Never use directly; include instead." -#endif - -#include - -/* 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 , 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 index 97e4d577e0..e5de42e2ab 100644 --- a/lib/libc/include/generic-glibc/bits/shm.h +++ b/lib/libc/include/generic-glibc/bits/shm.h @@ -22,7 +22,6 @@ #include #include #include -#include /* Permission flag for shmget. */ #define SHM_R 0400 /* or S_IRUGO from */ @@ -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 #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 new file mode 100644 index 0000000000..e6d32d64f2 --- /dev/null +++ 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 + . */ + +#ifndef _BITS_SIGNUM_ARCH_H +#define _BITS_SIGNUM_ARCH_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use 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 /* 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 index fc31cf9cff..eddb633837 100644 --- 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 /* 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 deleted file mode 100644 index a549ca0204..0000000000 --- a/lib/libc/include/generic-glibc/bits/signum.h +++ /dev/null @@ -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 - . */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include directly; use instead." -#endif - -#include - -/* 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 /* 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 index 1781053c77..93fd5d7548 100644 --- 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 directly; use instead." #endif +#include + #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 index e277c97c32..f0d8e4d846 100644 --- 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 index 1e6a0edf64..f74840c8b6 100644 --- 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 index 32e4a4b64a..b6b568ad96 100644 --- 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 index b4c4abe997..185b83dde3 100644 --- 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 index d6fb14eb32..92b27c5534 100644 --- 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 index f516808da3..0ec88c36a4 100644 --- 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 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 deleted file mode 100644 index ae30302397..0000000000 --- a/lib/libc/include/generic-glibc/bits/sys_errlist.h +++ /dev/null @@ -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 - . */ - -#ifndef _STDIO_H -# error "Never include directly; use 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 index a1f9bcb306..561be5ac16 100644 --- 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 directly; include 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 deleted file mode 100644 index d47dd78ea1..0000000000 --- a/lib/libc/include/generic-glibc/bits/sysctl.h +++ /dev/null @@ -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 index 8f46907bef..a6527d038f 100644 --- 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 index ac0c7f5370..43efbedb1b 100644 --- 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 index 26fbc0be67..1f37c9eec8 100644 --- 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 new file mode 100644 index 0000000000..fa4f23c16b --- /dev/null +++ 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 + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include 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 new file mode 100644 index 0000000000..932c18daeb --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use 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 new file mode 100644 index 0000000000..9c3a7677c0 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use 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 index 571d285ea0..07b9a875b0 100644 --- 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 index 9cad6847f9..729afdf23e 100644 --- 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 index 3ded0fb11c..7067a9c3e3 100644 --- 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 index 3a3de87d1e..9510f64101 100644 --- 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 +# 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 index de9cf6e57a..58b7bc8e2b 100644 --- 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 index 90cb060734..f505f646b2 100644 --- 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 +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include #endif diff --git a/lib/libc/include/generic-glibc/error.h b/lib/libc/include/generic-glibc/error.h index fa22157daf..dfd1623e1a 100644 --- 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 +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include #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 diff --git a/lib/libc/include/generic-glibc/features.h b/lib/libc/include/generic-glibc/features.h index 21e01848fa..ed3e1cd728 100644 --- 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 index 0df8e06d17..833583f5b9 100644 --- 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 -#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 index 910a12d444..3e05ce280d 100644 --- 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 index 9c4e7c164e..dd2cb9fb78 100644 --- 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 index d6c1d96f7e..4ec7514060 100644 --- 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 index b5af4b1542..1f8eed349b 100644 --- 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 index 4746766acf..8a3a04cb2d 100644 --- 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 index 14dc0082b0..3c3e1769fa 100644 --- 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 index 12c0d956e8..636dc73283 100644 --- 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 index 12c0d956e8..636dc73283 100644 --- 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 index add0d4871d..013aed511c 100644 --- 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 index d4c69865ed..186070157a 100644 --- 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 index d4c69865ed..186070157a 100644 --- 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 index 12c0d956e8..636dc73283 100644 --- 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 index add0d4871d..013aed511c 100644 --- 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 index 61b4464bb3..7734ebce74 100644 --- 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 index ebddb55e58..fd73ea1c79 100644 --- 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 index 9b3f228199..1956311cb8 100644 --- 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 # include + # 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 @@ -511,6 +560,11 @@ extern long double __REDIRECT_NTH (nexttowardl, # ifdef __LDBL_COMPAT # define __MATHCALL_REDIR_NAME(name) f ## name # 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 @@ -518,7 +572,8 @@ extern long double __REDIRECT_NTH (nexttowardl, # 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) \ @@ -531,6 +586,11 @@ extern long double __REDIRECT_NTH (nexttowardl, # ifdef __LDBL_COMPAT # define __MATHCALL_REDIR_NAME(name) __nldbl_d ## name ## l # 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 @@ -538,7 +598,8 @@ extern long double __REDIRECT_NTH (nexttowardl, # 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 -#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 index d7789d087a..e8142d7b07 100644 --- 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 +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include #endif diff --git a/lib/libc/include/generic-glibc/netinet/icmp6.h b/lib/libc/include/generic-glibc/netinet/icmp6.h index 0d1da5d26c..8f030dd8f9 100644 --- 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 index bcca1ad51e..ae09a54121 100644 --- 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 index d24028cc4f..f17defc30f 100644 --- 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 +#include #include +#include __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 index eaf489649e..ac8ae173af 100644 --- 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 +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include #endif diff --git a/lib/libc/include/generic-glibc/pthread.h b/lib/libc/include/generic-glibc/pthread.h index b9914a0d45..efa17507b6 100644 --- a/lib/libc/include/generic-glibc/pthread.h +++ b/lib/libc/include/generic-glibc/pthread.h @@ -27,6 +27,7 @@ #include #include #include +#include /* 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 index 7fa19ea215..91b7be3621 100644 --- a/lib/libc/include/generic-glibc/signal.h +++ b/lib/libc/include/generic-glibc/signal.h @@ -27,7 +27,7 @@ __BEGIN_DECLS #include -#include +#include #include @@ -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 ). */ -extern const char *const _sys_siglist[_NSIG]; -extern const char *const sys_siglist[_NSIG]; - - /* Get machine-dependent `struct sigcontext' and signal subcodes. */ # include @@ -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 # include @@ -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 index 7b5485826b..f83759406f 100644 --- 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 +#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 - #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 #endif -#ifdef __LDBL_COMPAT + +#include +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include #endif diff --git a/lib/libc/include/generic-glibc/stdlib.h b/lib/libc/include/generic-glibc/stdlib.h index 115bcee92d..3ffc3703d4 100644 --- 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 #endif -#ifdef __LDBL_COMPAT + +#include +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include #endif diff --git a/lib/libc/include/generic-glibc/string.h b/lib/libc/include/generic-glibc/string.h index 423cc537ed..99d5158b5a 100644 --- 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 index 8d82b634bd..cee62de938 100644 --- a/lib/libc/include/generic-glibc/sys/cdefs.h +++ b/lib/libc/include/generic-glibc/sys/cdefs.h @@ -452,7 +452,37 @@ #include #include -#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, [, ]) */ +#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 index 1ef7b160db..690a5234cf 100644 --- 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/sparc-linux-gnu/bits/msq-pad.h b/lib/libc/include/generic-glibc/sys/single_threaded.h similarity index 62% rename from lib/libc/include/sparc-linux-gnu/bits/msq-pad.h rename to lib/libc/include/generic-glibc/sys/single_threaded.h index 6e05183c93..0ea9034f8f 100644 --- a/lib/libc/include/sparc-linux-gnu/bits/msq-pad.h +++ b/lib/libc/include/generic-glibc/sys/single_threaded.h @@ -1,5 +1,5 @@ -/* Define where padding goes in struct msqid_ds. SPARC version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. +/* 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 @@ -16,11 +16,18 @@ License along with the GNU C Library; if not, see . */ -#ifndef _SYS_MSG_H -# error "Never use directly; include instead." -#endif +#ifndef _SYS_SINGLE_THREADED_H +#define _SYS_SINGLE_THREADED_H -#include +#include -#define __MSQ_PAD_AFTER_TIME 0 -#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) \ No newline at end of file +__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 deleted file mode 100644 index e8def66c88..0000000000 --- a/lib/libc/include/generic-glibc/sys/sysctl.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SYSCTL_H -#define _SYS_SYSCTL_H 1 - -#warning "The header is deprecated and will be removed." - -#include -#define __need_size_t -#include -/* 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 - -#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 - -__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 index 05b95a4bf1..3c249a2789 100644 --- 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 #endif -#ifdef __LDBL_COMPAT + +#include +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include #endif diff --git a/lib/libc/include/generic-glibc/threads.h b/lib/libc/include/generic-glibc/threads.h index 212eac67ef..a176ad32cc 100644 --- a/lib/libc/include/generic-glibc/threads.h +++ b/lib/libc/include/generic-glibc/threads.h @@ -24,7 +24,7 @@ __BEGIN_DECLS -#include +#include #include #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 index 2decd11b88..83a83213c0 100644 --- 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 index f358a1400f..f92623639b 100644 --- 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 #endif -#ifdef __LDBL_COMPAT +#include +#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 # include #endif diff --git a/lib/libc/include/i386-linux-gnu/bits/fenv.h b/lib/libc/include/i386-linux-gnu/bits/fenv.h index 3164b63556..b504e27b15 100644 --- 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 index a7bd8fb163..75bc1fcce4 100644 --- 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 deleted file mode 100644 index 959d998266..0000000000 --- a/lib/libc/include/i386-linux-gnu/bits/select.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SELECT_H -# error "Never use directly; include instead." -#endif - -#include - - -#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/semaphore.h b/lib/libc/include/i386-linux-gnu/bits/semaphore.h deleted file mode 100644 index 7f41d9a880..0000000000 --- a/lib/libc/include/i386-linux-gnu/bits/semaphore.h +++ /dev/null @@ -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 , 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 - . */ - -#ifndef _SEMAPHORE_H -# error "Never use directly; include instead." -#endif - -#include - -#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 deleted file mode 100644 index 5e2b946cdf..0000000000 --- a/lib/libc/include/i386-linux-gnu/bits/sysctl.h +++ /dev/null @@ -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 - . */ - -#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 new file mode 100644 index 0000000000..ea9721c6bd --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use 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 index 7ad60c3f43..53ae0bd5ef 100644 --- 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/aarch64-linux-gnu/bits/floatn.h b/lib/libc/include/mips-linux-gnu/bits/floatn.h similarity index 97% rename from lib/libc/include/aarch64-linux-gnu/bits/floatn.h rename to lib/libc/include/mips-linux-gnu/bits/floatn.h index a4045e43a3..68a17ab2c7 100644 --- a/lib/libc/include/aarch64-linux-gnu/bits/floatn.h +++ b/lib/libc/include/mips-linux-gnu/bits/floatn.h @@ -1,4 +1,4 @@ -/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. +/* Macros to control TS 18661-3 glibc features on MIPS platforms. Copyright (C) 2017-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/lib/libc/include/mips-linux-gnu/bits/msq-pad.h b/lib/libc/include/mips-linux-gnu/bits/msq-pad.h deleted file mode 100644 index 132f7815a7..0000000000 --- a/lib/libc/include/mips-linux-gnu/bits/msq-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_MSG_H -# error "Never use directly; include instead." -#endif - -#include - -#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 index 11fc73b49d..f2a2c48a9d 100644 --- 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/armeb-linux-gnueabi/bits/semaphore.h b/lib/libc/include/mips-linux-gnu/bits/semaphore.h similarity index 92% rename from lib/libc/include/armeb-linux-gnueabi/bits/semaphore.h rename to lib/libc/include/mips-linux-gnu/bits/semaphore.h index 3dd94baf34..e28b319eb5 100644 --- a/lib/libc/include/armeb-linux-gnueabi/bits/semaphore.h +++ b/lib/libc/include/mips-linux-gnu/bits/semaphore.h @@ -19,9 +19,11 @@ # error "Never use directly; include instead." #endif - -#define __SIZEOF_SEM_T 16 - +#if _MIPS_SIM == _ABI64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) diff --git a/lib/libc/include/mips-linux-gnu/bits/shm-pad.h b/lib/libc/include/mips-linux-gnu/bits/shm-pad.h deleted file mode 100644 index 1c596174a8..0000000000 --- a/lib/libc/include/mips-linux-gnu/bits/shm-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SHM_H -# error "Never use directly; include 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 new file mode 100644 index 0000000000..5ca20ca480 --- /dev/null +++ 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 + . */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use 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 /* 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 deleted file mode 100644 index e9fa21916b..0000000000 --- a/lib/libc/include/mips-linux-gnu/bits/signum.h +++ /dev/null @@ -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 - . */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include directly; use instead." -#endif - -#include - -/* 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 /* 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 new file mode 100644 index 0000000000..d469ca5f18 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include 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/sem-pad.h b/lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h similarity index 56% rename from lib/libc/include/mips-linux-gnu/bits/sem-pad.h rename to lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h index 0638180f08..a6ca82cbec 100644 --- a/lib/libc/include/mips-linux-gnu/bits/sem-pad.h +++ b/lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h @@ -1,5 +1,5 @@ -/* Define where padding goes in struct semid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. +/* 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 @@ -17,8 +17,16 @@ . */ #ifndef _SYS_SEM_H -# error "Never use directly; include instead." +# error "Never include directly; use instead." #endif -#define __SEM_PAD_AFTER_TIME 0 -#define __SEM_PAD_BEFORE_TIME 0 \ No newline at end of file +/* 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 new file mode 100644 index 0000000000..4398086812 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use 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/aarch64_be-linux-gnu/bits/floatn.h b/lib/libc/include/mips64-linux-gnuabi64/bits/floatn.h similarity index 97% rename from lib/libc/include/aarch64_be-linux-gnu/bits/floatn.h rename to lib/libc/include/mips64-linux-gnuabi64/bits/floatn.h index a4045e43a3..68a17ab2c7 100644 --- a/lib/libc/include/aarch64_be-linux-gnu/bits/floatn.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/floatn.h @@ -1,4 +1,4 @@ -/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. +/* Macros to control TS 18661-3 glibc features on MIPS platforms. Copyright (C) 2017-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/msq-pad.h b/lib/libc/include/mips64-linux-gnuabi64/bits/msq-pad.h deleted file mode 100644 index 132f7815a7..0000000000 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/msq-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_MSG_H -# error "Never use directly; include instead." -#endif - -#include - -#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 index 11fc73b49d..f2a2c48a9d 100644 --- 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/armeb-linux-gnueabihf/bits/semaphore.h b/lib/libc/include/mips64-linux-gnuabi64/bits/semaphore.h similarity index 92% rename from lib/libc/include/armeb-linux-gnueabihf/bits/semaphore.h rename to lib/libc/include/mips64-linux-gnuabi64/bits/semaphore.h index 3dd94baf34..e28b319eb5 100644 --- a/lib/libc/include/armeb-linux-gnueabihf/bits/semaphore.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/semaphore.h @@ -19,9 +19,11 @@ # error "Never use directly; include instead." #endif - -#define __SIZEOF_SEM_T 16 - +#if _MIPS_SIM == _ABI64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/shm-pad.h b/lib/libc/include/mips64-linux-gnuabi64/bits/shm-pad.h deleted file mode 100644 index 1c596174a8..0000000000 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/shm-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SHM_H -# error "Never use directly; include 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 new file mode 100644 index 0000000000..5ca20ca480 --- /dev/null +++ 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 + . */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use 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 /* 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 deleted file mode 100644 index e9fa21916b..0000000000 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/signum.h +++ /dev/null @@ -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 - . */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include directly; use instead." -#endif - -#include - -/* 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 /* 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 new file mode 100644 index 0000000000..d469ca5f18 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include 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/sem-pad.h b/lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_semid_ds.h similarity index 56% rename from lib/libc/include/mips64-linux-gnuabin32/bits/sem-pad.h rename to lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_semid_ds.h index 0638180f08..a6ca82cbec 100644 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/sem-pad.h +++ b/lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_semid_ds.h @@ -1,5 +1,5 @@ -/* Define where padding goes in struct semid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. +/* 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 @@ -17,8 +17,16 @@ . */ #ifndef _SYS_SEM_H -# error "Never use directly; include instead." +# error "Never include directly; use instead." #endif -#define __SEM_PAD_AFTER_TIME 0 -#define __SEM_PAD_BEFORE_TIME 0 \ No newline at end of file +/* 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 new file mode 100644 index 0000000000..4398086812 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use 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/s390x-linux-gnu/bits/floatn.h b/lib/libc/include/mips64-linux-gnuabin32/bits/floatn.h similarity index 97% rename from lib/libc/include/s390x-linux-gnu/bits/floatn.h rename to lib/libc/include/mips64-linux-gnuabin32/bits/floatn.h index a4045e43a3..68a17ab2c7 100644 --- a/lib/libc/include/s390x-linux-gnu/bits/floatn.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/floatn.h @@ -1,4 +1,4 @@ -/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. +/* Macros to control TS 18661-3 glibc features on MIPS platforms. Copyright (C) 2017-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/msq-pad.h b/lib/libc/include/mips64-linux-gnuabin32/bits/msq-pad.h deleted file mode 100644 index 132f7815a7..0000000000 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/msq-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_MSG_H -# error "Never use directly; include instead." -#endif - -#include - -#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 index 11fc73b49d..f2a2c48a9d 100644 --- 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/arm-linux-gnueabi/bits/semaphore.h b/lib/libc/include/mips64-linux-gnuabin32/bits/semaphore.h similarity index 92% rename from lib/libc/include/arm-linux-gnueabi/bits/semaphore.h rename to lib/libc/include/mips64-linux-gnuabin32/bits/semaphore.h index 3dd94baf34..e28b319eb5 100644 --- a/lib/libc/include/arm-linux-gnueabi/bits/semaphore.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/semaphore.h @@ -19,9 +19,11 @@ # error "Never use directly; include instead." #endif - -#define __SIZEOF_SEM_T 16 - +#if _MIPS_SIM == _ABI64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/shm-pad.h b/lib/libc/include/mips64-linux-gnuabin32/bits/shm-pad.h deleted file mode 100644 index 1c596174a8..0000000000 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/shm-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SHM_H -# error "Never use directly; include 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 new file mode 100644 index 0000000000..5ca20ca480 --- /dev/null +++ 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 + . */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use 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 /* 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 deleted file mode 100644 index e9fa21916b..0000000000 --- a/lib/libc/include/mips64-linux-gnuabin32/bits/signum.h +++ /dev/null @@ -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 - . */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include directly; use instead." -#endif - -#include - -/* 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 /* 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 new file mode 100644 index 0000000000..d469ca5f18 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include 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/sem-pad.h b/lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_semid_ds.h similarity index 56% rename from lib/libc/include/mips64-linux-gnuabi64/bits/sem-pad.h rename to lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_semid_ds.h index 0638180f08..a6ca82cbec 100644 --- a/lib/libc/include/mips64-linux-gnuabi64/bits/sem-pad.h +++ b/lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_semid_ds.h @@ -1,5 +1,5 @@ -/* Define where padding goes in struct semid_ds. MIPS version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. +/* 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 @@ -17,8 +17,16 @@ . */ #ifndef _SYS_SEM_H -# error "Never use directly; include instead." +# error "Never include directly; use instead." #endif -#define __SEM_PAD_AFTER_TIME 0 -#define __SEM_PAD_BEFORE_TIME 0 \ No newline at end of file +/* 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 new file mode 100644 index 0000000000..4398086812 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use 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/riscv64-linux-gnu/bits/floatn.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/floatn.h similarity index 97% rename from lib/libc/include/riscv64-linux-gnu/bits/floatn.h rename to lib/libc/include/mips64el-linux-gnuabi64/bits/floatn.h index a4045e43a3..68a17ab2c7 100644 --- a/lib/libc/include/riscv64-linux-gnu/bits/floatn.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/floatn.h @@ -1,4 +1,4 @@ -/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. +/* Macros to control TS 18661-3 glibc features on MIPS platforms. Copyright (C) 2017-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h deleted file mode 100644 index 132f7815a7..0000000000 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_MSG_H -# error "Never use directly; include instead." -#endif - -#include - -#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 index 11fc73b49d..f2a2c48a9d 100644 --- 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 deleted file mode 100644 index 0638180f08..0000000000 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/sem-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SEM_H -# error "Never use directly; include 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/arm-linux-gnueabihf/bits/semaphore.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/semaphore.h similarity index 92% rename from lib/libc/include/arm-linux-gnueabihf/bits/semaphore.h rename to lib/libc/include/mips64el-linux-gnuabi64/bits/semaphore.h index 3dd94baf34..e28b319eb5 100644 --- a/lib/libc/include/arm-linux-gnueabihf/bits/semaphore.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/semaphore.h @@ -19,9 +19,11 @@ # error "Never use directly; include instead." #endif - -#define __SIZEOF_SEM_T 16 - +#if _MIPS_SIM == _ABI64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif /* Value returned if `sem_open' failed. */ #define SEM_FAILED ((sem_t *) 0) diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h deleted file mode 100644 index 1c596174a8..0000000000 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SHM_H -# error "Never use directly; include 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 new file mode 100644 index 0000000000..5ca20ca480 --- /dev/null +++ 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 + . */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use 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 /* 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 deleted file mode 100644 index e9fa21916b..0000000000 --- a/lib/libc/include/mips64el-linux-gnuabi64/bits/signum.h +++ /dev/null @@ -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 - . */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include directly; use instead." -#endif - -#include - -/* 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 /* 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 new file mode 100644 index 0000000000..d469ca5f18 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include 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/i386-linux-gnu/bits/sem-pad.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h similarity index 56% rename from lib/libc/include/i386-linux-gnu/bits/sem-pad.h rename to lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h index 10534c61cf..a6ca82cbec 100644 --- a/lib/libc/include/i386-linux-gnu/bits/sem-pad.h +++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h @@ -1,5 +1,5 @@ -/* Define where padding goes in struct semid_ds. x86 version. - Copyright (C) 2018-2020 Free Software Foundation, Inc. +/* 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 @@ -17,8 +17,16 @@ . */ #ifndef _SYS_SEM_H -# error "Never use directly; include instead." +# error "Never include directly; use instead." #endif -#define __SEM_PAD_AFTER_TIME 1 -#define __SEM_PAD_BEFORE_TIME 0 \ No newline at end of file +/* 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 new file mode 100644 index 0000000000..4398086812 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use 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/mips64el-linux-gnuabin32/bits/floatn.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/floatn.h new file mode 100644 index 0000000000..68a17ab2c7 --- /dev/null +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/floatn.h @@ -0,0 +1,97 @@ +/* Macros to control TS 18661-3 glibc features on MIPS 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 + . */ + +#ifndef _BITS_FLOATN_H +#define _BITS_FLOATN_H + +#include +#include + +/* 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 + +#endif /* _BITS_FLOATN_H */ \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h deleted file mode 100644 index 132f7815a7..0000000000 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_MSG_H -# error "Never use directly; include instead." -#endif - -#include - -#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 index 11fc73b49d..f2a2c48a9d 100644 --- 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 deleted file mode 100644 index 0638180f08..0000000000 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/sem-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SEM_H -# error "Never use directly; include 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/mips64el-linux-gnuabin32/bits/semaphore.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/semaphore.h new file mode 100644 index 0000000000..e28b319eb5 --- /dev/null +++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/semaphore.h @@ -0,0 +1,36 @@ +/* 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 + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + +#if _MIPS_SIM == _ABI64 +# 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/mips64el-linux-gnuabin32/bits/shm-pad.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/shm-pad.h deleted file mode 100644 index 1c596174a8..0000000000 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/shm-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SHM_H -# error "Never use directly; include 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 new file mode 100644 index 0000000000..5ca20ca480 --- /dev/null +++ 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 + . */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use 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 /* 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 deleted file mode 100644 index e9fa21916b..0000000000 --- a/lib/libc/include/mips64el-linux-gnuabin32/bits/signum.h +++ /dev/null @@ -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 - . */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include directly; use instead." -#endif - -#include - -/* 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 /* 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 new file mode 100644 index 0000000000..d469ca5f18 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include 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 new file mode 100644 index 0000000000..a6ca82cbec --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use 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 new file mode 100644 index 0000000000..4398086812 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use 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/mipsel-linux-gnu/bits/floatn.h b/lib/libc/include/mipsel-linux-gnu/bits/floatn.h new file mode 100644 index 0000000000..68a17ab2c7 --- /dev/null +++ b/lib/libc/include/mipsel-linux-gnu/bits/floatn.h @@ -0,0 +1,97 @@ +/* Macros to control TS 18661-3 glibc features on MIPS 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 + . */ + +#ifndef _BITS_FLOATN_H +#define _BITS_FLOATN_H + +#include +#include + +/* 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 + +#endif /* _BITS_FLOATN_H */ \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-gnu/bits/msq-pad.h b/lib/libc/include/mipsel-linux-gnu/bits/msq-pad.h deleted file mode 100644 index 132f7815a7..0000000000 --- a/lib/libc/include/mipsel-linux-gnu/bits/msq-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_MSG_H -# error "Never use directly; include instead." -#endif - -#include - -#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 index 11fc73b49d..f2a2c48a9d 100644 --- 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 deleted file mode 100644 index 0638180f08..0000000000 --- a/lib/libc/include/mipsel-linux-gnu/bits/sem-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SEM_H -# error "Never use directly; include 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/mipsel-linux-gnu/bits/semaphore.h b/lib/libc/include/mipsel-linux-gnu/bits/semaphore.h new file mode 100644 index 0000000000..e28b319eb5 --- /dev/null +++ b/lib/libc/include/mipsel-linux-gnu/bits/semaphore.h @@ -0,0 +1,36 @@ +/* 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 + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + +#if _MIPS_SIM == _ABI64 +# 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/mipsel-linux-gnu/bits/shm-pad.h b/lib/libc/include/mipsel-linux-gnu/bits/shm-pad.h deleted file mode 100644 index 1c596174a8..0000000000 --- a/lib/libc/include/mipsel-linux-gnu/bits/shm-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SHM_H -# error "Never use directly; include 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 new file mode 100644 index 0000000000..5ca20ca480 --- /dev/null +++ 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 + . */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use 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 /* 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 deleted file mode 100644 index e9fa21916b..0000000000 --- a/lib/libc/include/mipsel-linux-gnu/bits/signum.h +++ /dev/null @@ -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 - . */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include directly; use instead." -#endif - -#include - -/* 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 /* 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 new file mode 100644 index 0000000000..d469ca5f18 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include 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 new file mode 100644 index 0000000000..a6ca82cbec --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use 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 new file mode 100644 index 0000000000..4398086812 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use 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 deleted file mode 100644 index 695d3a395d..0000000000 --- a/lib/libc/include/powerpc-linux-gnu/bits/fenvinline.h +++ /dev/null @@ -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 - . */ - -#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 index 335efbd0aa..5719e16ac2 100644 --- 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 index 8818d6fa08..c94a446c49 100644 --- 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 directly; include 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 index 391f7d62fe..b37f1929bd 100644 --- 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 deleted file mode 100644 index c72a8507da..0000000000 --- a/lib/libc/include/powerpc-linux-gnu/bits/msq-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_MSG_H -# error "Never use directly; include instead." -#endif - -#include - -#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 deleted file mode 100644 index e6aca78279..0000000000 --- a/lib/libc/include/powerpc-linux-gnu/bits/sem-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SEM_H -# error "Never use directly; include instead." -#endif - -#include - -#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 deleted file mode 100644 index d8dd45053b..0000000000 --- a/lib/libc/include/powerpc-linux-gnu/bits/semaphore.h +++ /dev/null @@ -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 , 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 - . */ - -#ifndef _SEMAPHORE_H -# error "Never use directly; include instead." -#endif - -#include - -#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 deleted file mode 100644 index 950fc7d5b5..0000000000 --- a/lib/libc/include/powerpc-linux-gnu/bits/shm-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SHM_H -# error "Never use directly; include instead." -#endif - -#include - -#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 new file mode 100644 index 0000000000..41646497c8 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include 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 new file mode 100644 index 0000000000..95d8aaaee9 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use 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 new file mode 100644 index 0000000000..1dfac82c03 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use 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 index 762a5673fb..f4db4285af 100644 --- 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 index dcdca2eb78..9f9206f008 100644 --- a/lib/libc/include/powerpc-linux-gnu/ieee754.h +++ b/lib/libc/include/powerpc-linux-gnu/ieee754.h @@ -21,6 +21,7 @@ #include #include +#include __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 deleted file mode 100644 index 695d3a395d..0000000000 --- a/lib/libc/include/powerpc64-linux-gnu/bits/fenvinline.h +++ /dev/null @@ -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 - . */ - -#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 index 335efbd0aa..5719e16ac2 100644 --- 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 index 8818d6fa08..c94a446c49 100644 --- 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 directly; include 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 index 391f7d62fe..b37f1929bd 100644 --- 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 deleted file mode 100644 index c72a8507da..0000000000 --- a/lib/libc/include/powerpc64-linux-gnu/bits/msq-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_MSG_H -# error "Never use directly; include instead." -#endif - -#include - -#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 deleted file mode 100644 index e6aca78279..0000000000 --- a/lib/libc/include/powerpc64-linux-gnu/bits/sem-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SEM_H -# error "Never use directly; include instead." -#endif - -#include - -#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 deleted file mode 100644 index d8dd45053b..0000000000 --- a/lib/libc/include/powerpc64-linux-gnu/bits/semaphore.h +++ /dev/null @@ -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 , 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 - . */ - -#ifndef _SEMAPHORE_H -# error "Never use directly; include instead." -#endif - -#include - -#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 deleted file mode 100644 index 950fc7d5b5..0000000000 --- a/lib/libc/include/powerpc64-linux-gnu/bits/shm-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SHM_H -# error "Never use directly; include instead." -#endif - -#include - -#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 new file mode 100644 index 0000000000..41646497c8 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include 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 new file mode 100644 index 0000000000..95d8aaaee9 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use 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 new file mode 100644 index 0000000000..1dfac82c03 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use 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 index 143f904e09..22c0732548 100644 --- 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 index 12c0d956e8..636dc73283 100644 --- 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 index dcdca2eb78..9f9206f008 100644 --- a/lib/libc/include/powerpc64-linux-gnu/ieee754.h +++ b/lib/libc/include/powerpc64-linux-gnu/ieee754.h @@ -21,6 +21,7 @@ #include #include +#include __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 deleted file mode 100644 index 695d3a395d..0000000000 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/fenvinline.h +++ /dev/null @@ -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 - . */ - -#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 index 335efbd0aa..5719e16ac2 100644 --- 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 index 8818d6fa08..c94a446c49 100644 --- 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 directly; include 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 index 391f7d62fe..bfeb899917 100644 --- 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 deleted file mode 100644 index c72a8507da..0000000000 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/msq-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_MSG_H -# error "Never use directly; include instead." -#endif - -#include - -#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 deleted file mode 100644 index e6aca78279..0000000000 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/sem-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SEM_H -# error "Never use directly; include instead." -#endif - -#include - -#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 deleted file mode 100644 index d8dd45053b..0000000000 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/semaphore.h +++ /dev/null @@ -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 , 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 - . */ - -#ifndef _SEMAPHORE_H -# error "Never use directly; include instead." -#endif - -#include - -#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 deleted file mode 100644 index 950fc7d5b5..0000000000 --- a/lib/libc/include/powerpc64le-linux-gnu/bits/shm-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SHM_H -# error "Never use directly; include instead." -#endif - -#include - -#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 new file mode 100644 index 0000000000..41646497c8 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include 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 new file mode 100644 index 0000000000..95d8aaaee9 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use 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 new file mode 100644 index 0000000000..1dfac82c03 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use 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 index c26da6b2cd..b8e68b6c89 100644 --- 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 index 12c0d956e8..636dc73283 100644 --- 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 index dcdca2eb78..9f9206f008 100644 --- a/lib/libc/include/powerpc64le-linux-gnu/ieee754.h +++ b/lib/libc/include/powerpc64le-linux-gnu/ieee754.h @@ -21,6 +21,7 @@ #include #include +#include __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/long-double.h b/lib/libc/include/riscv64-linux-gnu/bits/long-double.h index ce06962796..f95b24f8e7 100644 --- 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 deleted file mode 100644 index 7277c658e8..0000000000 --- a/lib/libc/include/riscv64-linux-gnu/bits/semaphore.h +++ /dev/null @@ -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 - . */ - -#ifndef _SEMAPHORE_H -# error "Never use directly; include 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 index d9e9b274ac..a5f4c78b94 100644 --- 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 for the meaning of these macros. This file exists so that 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 index 7e92db0ded..c157deb8cf 100644 --- 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 index 6ac6614fb7..6ce02418e6 100644 --- 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 index 281e760819..5bf167975e 100644 --- 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/long-double.h b/lib/libc/include/s390x-linux-gnu/bits/long-double.h index 391f7d62fe..b37f1929bd 100644 --- 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 deleted file mode 100644 index d99eca3d90..0000000000 --- a/lib/libc/include/s390x-linux-gnu/bits/semaphore.h +++ /dev/null @@ -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 , 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 - . */ - -#ifndef _SEMAPHORE_H -# error "Never use directly; include instead." -#endif - -#include - -#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 index d31219c155..fecd80e33a 100644 --- 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 index 268b163638..1f26b2ab53 100644 --- 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 index 408a29f7b6..7eba346aa7 100644 --- 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 deleted file mode 100644 index a4045e43a3..0000000000 --- a/lib/libc/include/sparc-linux-gnu/bits/floatn.h +++ /dev/null @@ -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 - . */ - -#ifndef _BITS_FLOATN_H -#define _BITS_FLOATN_H - -#include -#include - -/* 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 - -#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 index e32f6ad721..de5e60beb8 100644 --- 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/resource.h b/lib/libc/include/sparc-linux-gnu/bits/resource.h index 34605679a3..3cfbfd381c 100644 --- 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/semaphore.h b/lib/libc/include/sparc-linux-gnu/bits/semaphore.h deleted file mode 100644 index ee2f8e0ca5..0000000000 --- a/lib/libc/include/sparc-linux-gnu/bits/semaphore.h +++ /dev/null @@ -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 , 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 - . */ - -#ifndef _SEMAPHORE_H -# error "Never use directly; include instead." -#endif - -#include - -#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/signum-arch.h b/lib/libc/include/sparc-linux-gnu/bits/signum-arch.h new file mode 100644 index 0000000000..36a52c8e5a --- /dev/null +++ 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 + . */ + +#ifndef _BITS_SIGNUM_ARCH_H +#define _BITS_SIGNUM_ARCH_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use 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 /* 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 deleted file mode 100644 index 2890ba7808..0000000000 --- a/lib/libc/include/sparc-linux-gnu/bits/signum.h +++ /dev/null @@ -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 - . */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include directly; use instead." -#endif - -#include - -/* 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 /* 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 new file mode 100644 index 0000000000..7f79bfadfa --- /dev/null +++ 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 + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include 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 new file mode 100644 index 0000000000..f0b03d63ad --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use 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 new file mode 100644 index 0000000000..3fc476b0d1 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use 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 index 123acf7d25..ebff4bdbcc 100644 --- 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 index 08e73abcba..0f86fee604 100644 --- 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 index 408a29f7b6..7eba346aa7 100644 --- 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 deleted file mode 100644 index a4045e43a3..0000000000 --- a/lib/libc/include/sparcv9-linux-gnu/bits/floatn.h +++ /dev/null @@ -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 - . */ - -#ifndef _BITS_FLOATN_H -#define _BITS_FLOATN_H - -#include -#include - -/* 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 - -#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 index e32f6ad721..de5e60beb8 100644 --- 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 deleted file mode 100644 index 6e05183c93..0000000000 --- a/lib/libc/include/sparcv9-linux-gnu/bits/msq-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_MSG_H -# error "Never use directly; include instead." -#endif - -#include - -#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 index 34605679a3..3cfbfd381c 100644 --- 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 deleted file mode 100644 index 75a0a010c9..0000000000 --- a/lib/libc/include/sparcv9-linux-gnu/bits/sem-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SEM_H -# error "Never use directly; include instead." -#endif - -#include - -#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 deleted file mode 100644 index ee2f8e0ca5..0000000000 --- a/lib/libc/include/sparcv9-linux-gnu/bits/semaphore.h +++ /dev/null @@ -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 , 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 - . */ - -#ifndef _SEMAPHORE_H -# error "Never use directly; include instead." -#endif - -#include - -#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 deleted file mode 100644 index 6f9480247f..0000000000 --- a/lib/libc/include/sparcv9-linux-gnu/bits/shm-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SHM_H -# error "Never use directly; include instead." -#endif - -#include - -#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 new file mode 100644 index 0000000000..36a52c8e5a --- /dev/null +++ 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 + . */ + +#ifndef _BITS_SIGNUM_ARCH_H +#define _BITS_SIGNUM_ARCH_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use 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 /* 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 deleted file mode 100644 index 2890ba7808..0000000000 --- a/lib/libc/include/sparcv9-linux-gnu/bits/signum.h +++ /dev/null @@ -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 - . */ - -#ifndef _BITS_SIGNUM_H -#define _BITS_SIGNUM_H 1 - -#ifndef _SIGNAL_H -#error "Never include directly; use instead." -#endif - -#include - -/* 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 /* 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 new file mode 100644 index 0000000000..7f79bfadfa --- /dev/null +++ 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 + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include 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 new file mode 100644 index 0000000000..f0b03d63ad --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use 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 new file mode 100644 index 0000000000..3fc476b0d1 --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use 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 index 123acf7d25..ebff4bdbcc 100644 --- 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 index 3164b63556..b504e27b15 100644 --- 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 index a7bd8fb163..75bc1fcce4 100644 --- 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 deleted file mode 100644 index 959d998266..0000000000 --- a/lib/libc/include/x86_64-linux-gnu/bits/select.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SELECT_H -# error "Never use directly; include instead." -#endif - -#include - - -#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 deleted file mode 100644 index 10534c61cf..0000000000 --- a/lib/libc/include/x86_64-linux-gnu/bits/sem-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SEM_H -# error "Never use directly; include 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 deleted file mode 100644 index 7f41d9a880..0000000000 --- a/lib/libc/include/x86_64-linux-gnu/bits/semaphore.h +++ /dev/null @@ -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 , 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 - . */ - -#ifndef _SEMAPHORE_H -# error "Never use directly; include instead." -#endif - -#include - -#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 deleted file mode 100644 index 5e2b946cdf..0000000000 --- a/lib/libc/include/x86_64-linux-gnu/bits/sysctl.h +++ /dev/null @@ -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 - . */ - -#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 new file mode 100644 index 0000000000..ea9721c6bd --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use 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 index 7ad60c3f43..53ae0bd5ef 100644 --- 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 index 3d707eaca3..03d0df5edf 100644 --- 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 index 5ce8c64bba..d4b87af1a5 100644 --- 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 index 3164b63556..b504e27b15 100644 --- 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 index a7bd8fb163..75bc1fcce4 100644 --- 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 deleted file mode 100644 index 959d998266..0000000000 --- a/lib/libc/include/x86_64-linux-gnux32/bits/select.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SELECT_H -# error "Never use directly; include instead." -#endif - -#include - - -#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 deleted file mode 100644 index 10534c61cf..0000000000 --- a/lib/libc/include/x86_64-linux-gnux32/bits/sem-pad.h +++ /dev/null @@ -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 - . */ - -#ifndef _SYS_SEM_H -# error "Never use directly; include 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 deleted file mode 100644 index 7f41d9a880..0000000000 --- a/lib/libc/include/x86_64-linux-gnux32/bits/semaphore.h +++ /dev/null @@ -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 , 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 - . */ - -#ifndef _SEMAPHORE_H -# error "Never use directly; include instead." -#endif - -#include - -#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 deleted file mode 100644 index 5e2b946cdf..0000000000 --- a/lib/libc/include/x86_64-linux-gnux32/bits/sysctl.h +++ /dev/null @@ -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 - . */ - -#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 new file mode 100644 index 0000000000..ea9721c6bd --- /dev/null +++ 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 + . */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use 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 index 7ad60c3f43..53ae0bd5ef 100644 --- 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 index e9ea9cb4be..cdc4ac90f9 100644 --- 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 index 9f943854b0..b3af77d56c 100644 --- 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