aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/include
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-12-16 13:16:14 -0800
committerGitHub <noreply@github.com>2021-12-16 13:16:14 -0800
commit58f669dc8c4fa9f78d73d014e805a506009f3d30 (patch)
tree4343603e48044a8c1123ef5ad495a88bb164788d /lib/libc/include
parent877a1f2a2986e02269c64a05456dff521da27ac1 (diff)
parent9257669cd4ecb10c51baea2bccee993e0c82bd20 (diff)
downloadzig-58f669dc8c4fa9f78d73d014e805a506009f3d30.tar.gz
zig-58f669dc8c4fa9f78d73d014e805a506009f3d30.zip
Merge pull request #10339 from ziglang/update-glibc
update glibc to 2.34
Diffstat (limited to 'lib/libc/include')
-rw-r--r--lib/libc/include/aarch64-linux-gnu/bits/local_lim.h101
-rw-r--r--lib/libc/include/aarch64-linux-gnu/bits/pthread_stack_min.h22
-rw-r--r--lib/libc/include/aarch64-linux-gnu/bits/statfs.h86
-rw-r--r--lib/libc/include/aarch64-linux-gnu/gnu/lib-names-lp64.h1
-rw-r--r--lib/libc/include/aarch64-linux-gnu/sys/ptrace.h50
-rw-r--r--lib/libc/include/aarch64_be-linux-gnu/bits/local_lim.h101
-rw-r--r--lib/libc/include/aarch64_be-linux-gnu/bits/pthread_stack_min.h22
-rw-r--r--lib/libc/include/aarch64_be-linux-gnu/bits/statfs.h86
-rw-r--r--lib/libc/include/aarch64_be-linux-gnu/gnu/lib-names-lp64_be.h1
-rw-r--r--lib/libc/include/aarch64_be-linux-gnu/sys/ptrace.h50
-rw-r--r--lib/libc/include/arm-linux-gnueabi/bits/floatn.h52
-rw-r--r--lib/libc/include/arm-linux-gnueabi/bits/struct_rwlock.h (renamed from lib/libc/include/mips64-linux-gnuabin32/bits/struct_rwlock.h)44
-rw-r--r--lib/libc/include/arm-linux-gnueabi/bits/struct_stat.h50
-rw-r--r--lib/libc/include/arm-linux-gnueabi/bits/wordsize.h21
-rw-r--r--lib/libc/include/arm-linux-gnueabihf/bits/floatn.h52
-rw-r--r--lib/libc/include/arm-linux-gnueabihf/bits/struct_rwlock.h (renamed from lib/libc/include/mips64el-linux-gnuabi64/bits/struct_rwlock.h)44
-rw-r--r--lib/libc/include/arm-linux-gnueabihf/bits/struct_stat.h50
-rw-r--r--lib/libc/include/arm-linux-gnueabihf/bits/wordsize.h21
-rw-r--r--lib/libc/include/armeb-linux-gnueabi/bits/floatn.h52
-rw-r--r--lib/libc/include/armeb-linux-gnueabi/bits/struct_rwlock.h (renamed from lib/libc/include/mips64-linux-gnuabi64/bits/struct_rwlock.h)44
-rw-r--r--lib/libc/include/armeb-linux-gnueabi/bits/struct_stat.h50
-rw-r--r--lib/libc/include/armeb-linux-gnueabi/bits/wordsize.h21
-rw-r--r--lib/libc/include/armeb-linux-gnueabihf/bits/floatn.h52
-rw-r--r--lib/libc/include/armeb-linux-gnueabihf/bits/struct_rwlock.h61
-rw-r--r--lib/libc/include/armeb-linux-gnueabihf/bits/struct_stat.h50
-rw-r--r--lib/libc/include/armeb-linux-gnueabihf/bits/wordsize.h21
-rw-r--r--lib/libc/include/csky-linux-gnueabi/bits/floatn.h52
-rw-r--r--lib/libc/include/csky-linux-gnueabi/bits/statfs.h11
-rw-r--r--lib/libc/include/csky-linux-gnueabi/bits/struct_rwlock.h61
-rw-r--r--lib/libc/include/csky-linux-gnueabi/bits/wordsize.h21
-rw-r--r--lib/libc/include/csky-linux-gnueabi/gnu/lib-names.h1
-rw-r--r--lib/libc/include/csky-linux-gnueabihf/bits/floatn.h52
-rw-r--r--lib/libc/include/csky-linux-gnueabihf/bits/statfs.h11
-rw-r--r--lib/libc/include/csky-linux-gnueabihf/bits/struct_rwlock.h61
-rw-r--r--lib/libc/include/csky-linux-gnueabihf/bits/wordsize.h21
-rw-r--r--lib/libc/include/csky-linux-gnueabihf/gnu/lib-names.h1
-rw-r--r--lib/libc/include/generic-glibc/aio.h15
-rw-r--r--lib/libc/include/generic-glibc/arpa/inet.h3
-rw-r--r--lib/libc/include/generic-glibc/arpa/nameser.h33
-rw-r--r--lib/libc/include/generic-glibc/bits/confname.h8
-rw-r--r--lib/libc/include/generic-glibc/bits/floatn.h71
-rw-r--r--lib/libc/include/generic-glibc/bits/libc-header-start.h28
-rw-r--r--lib/libc/include/generic-glibc/bits/local_lim.h4
-rw-r--r--lib/libc/include/generic-glibc/bits/mathcalls.h12
-rw-r--r--lib/libc/include/generic-glibc/bits/msq.h1
-rw-r--r--lib/libc/include/generic-glibc/bits/platform/x86.h311
-rw-r--r--lib/libc/include/generic-glibc/bits/poll2.h10
-rw-r--r--lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h31
-rw-r--r--lib/libc/include/generic-glibc/bits/pthread_stack_min.h20
-rw-r--r--lib/libc/include/generic-glibc/bits/sem.h1
-rw-r--r--lib/libc/include/generic-glibc/bits/shm.h1
-rw-r--r--lib/libc/include/generic-glibc/bits/sigstksz.h33
-rw-r--r--lib/libc/include/generic-glibc/bits/socket-constants.h49
-rw-r--r--lib/libc/include/generic-glibc/bits/struct_rwlock.h44
-rw-r--r--lib/libc/include/generic-glibc/bits/struct_stat.h89
-rw-r--r--lib/libc/include/generic-glibc/bits/struct_stat_time64_helper.h66
-rw-r--r--lib/libc/include/generic-glibc/bits/syscall.h24
-rw-r--r--lib/libc/include/generic-glibc/bits/time.h10
-rw-r--r--lib/libc/include/generic-glibc/bits/timex.h31
-rw-r--r--lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds.h30
-rw-r--r--lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds_helper.h30
-rw-r--r--lib/libc/include/generic-glibc/bits/types/struct_msqid_ds.h12
-rw-r--r--lib/libc/include/generic-glibc/bits/types/struct_semid64_ds.h30
-rw-r--r--lib/libc/include/generic-glibc/bits/types/struct_semid64_ds_helper.h25
-rw-r--r--lib/libc/include/generic-glibc/bits/types/struct_semid_ds.h10
-rw-r--r--lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds.h30
-rw-r--r--lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds_helper.h28
-rw-r--r--lib/libc/include/generic-glibc/bits/types/struct_shmid_ds.h10
-rw-r--r--lib/libc/include/generic-glibc/bits/types/struct_timespec.h7
-rw-r--r--lib/libc/include/generic-glibc/bits/types/struct_timeval.h5
-rw-r--r--lib/libc/include/generic-glibc/bits/types/time_t.h4
-rw-r--r--lib/libc/include/generic-glibc/bits/unistd_ext.h25
-rw-r--r--lib/libc/include/generic-glibc/bits/wordsize.h20
-rw-r--r--lib/libc/include/generic-glibc/elf.h7
-rw-r--r--lib/libc/include/generic-glibc/fcntl.h27
-rw-r--r--lib/libc/include/generic-glibc/features-time64.h37
-rw-r--r--lib/libc/include/generic-glibc/features.h17
-rw-r--r--lib/libc/include/generic-glibc/fts.h43
-rw-r--r--lib/libc/include/generic-glibc/ftw.h46
-rw-r--r--lib/libc/include/generic-glibc/glob.h34
-rw-r--r--lib/libc/include/generic-glibc/gnu/lib-names-32.h1
-rw-r--r--lib/libc/include/generic-glibc/gnu/lib-names-hard.h1
-rw-r--r--lib/libc/include/generic-glibc/gnu/lib-names-ilp32d.h30
-rw-r--r--lib/libc/include/generic-glibc/gnu/lib-names-n32_hard.h1
-rw-r--r--lib/libc/include/generic-glibc/gnu/lib-names-n64_hard.h1
-rw-r--r--lib/libc/include/generic-glibc/gnu/lib-names-o32_hard.h1
-rw-r--r--lib/libc/include/generic-glibc/gnu/lib-names-o32_soft.h29
-rw-r--r--lib/libc/include/generic-glibc/gnu/lib-names-soft.h1
-rw-r--r--lib/libc/include/generic-glibc/gnu/stubs-ilp32.h38
-rw-r--r--lib/libc/include/generic-glibc/gnu/stubs-ilp32d.h24
-rw-r--r--lib/libc/include/generic-glibc/gnu/stubs-o32_soft.h33
-rw-r--r--lib/libc/include/generic-glibc/malloc.h38
-rw-r--r--lib/libc/include/generic-glibc/math.h30
-rw-r--r--lib/libc/include/generic-glibc/monetary.h6
-rw-r--r--lib/libc/include/generic-glibc/mqueue.h22
-rw-r--r--lib/libc/include/generic-glibc/net/if.h4
-rw-r--r--lib/libc/include/generic-glibc/netdb.h11
-rw-r--r--lib/libc/include/generic-glibc/netinet/icmp6.h2
-rw-r--r--lib/libc/include/generic-glibc/netinet/ip_icmp.h18
-rw-r--r--lib/libc/include/generic-glibc/nss.h2
-rw-r--r--lib/libc/include/generic-glibc/pthread.h172
-rw-r--r--lib/libc/include/generic-glibc/pwd.h12
-rw-r--r--lib/libc/include/generic-glibc/regex.h23
-rw-r--r--lib/libc/include/generic-glibc/resolv.h103
-rw-r--r--lib/libc/include/generic-glibc/sched.h11
-rw-r--r--lib/libc/include/generic-glibc/semaphore.h25
-rw-r--r--lib/libc/include/generic-glibc/signal.h14
-rw-r--r--lib/libc/include/generic-glibc/spawn.h8
-rw-r--r--lib/libc/include/generic-glibc/stdio.h74
-rw-r--r--lib/libc/include/generic-glibc/stdlib.h16
-rw-r--r--lib/libc/include/generic-glibc/sys/cdefs.h171
-rw-r--r--lib/libc/include/generic-glibc/sys/ioctl.h10
-rw-r--r--lib/libc/include/generic-glibc/sys/mount.h2
-rw-r--r--lib/libc/include/generic-glibc/sys/msg.h10
-rw-r--r--lib/libc/include/generic-glibc/sys/platform/x86.h14
-rw-r--r--lib/libc/include/generic-glibc/sys/poll.h18
-rw-r--r--lib/libc/include/generic-glibc/sys/prctl.h14
-rw-r--r--lib/libc/include/generic-glibc/sys/resource.h24
-rw-r--r--lib/libc/include/generic-glibc/sys/select.h27
-rw-r--r--lib/libc/include/generic-glibc/sys/sem.h21
-rw-r--r--lib/libc/include/generic-glibc/sys/shm.h10
-rw-r--r--lib/libc/include/generic-glibc/sys/socket.h76
-rw-r--r--lib/libc/include/generic-glibc/sys/stat.h113
-rw-r--r--lib/libc/include/generic-glibc/sys/statvfs.h2
-rw-r--r--lib/libc/include/generic-glibc/sys/time.h71
-rw-r--r--lib/libc/include/generic-glibc/sys/timerfd.h22
-rw-r--r--lib/libc/include/generic-glibc/sys/timex.h29
-rw-r--r--lib/libc/include/generic-glibc/sys/uio.h37
-rw-r--r--lib/libc/include/generic-glibc/sys/wait.h20
-rw-r--r--lib/libc/include/generic-glibc/threads.h33
-rw-r--r--lib/libc/include/generic-glibc/time.h149
-rw-r--r--lib/libc/include/generic-glibc/unistd.h18
-rw-r--r--lib/libc/include/generic-glibc/utime.h16
-rw-r--r--lib/libc/include/generic-glibc/wchar.h19
-rw-r--r--lib/libc/include/i386-linux-gnu/bits/struct_stat.h90
-rw-r--r--lib/libc/include/i386-linux-gnu/bits/types/struct_semid_ds.h4
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/floatn.h52
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/struct_rwlock.h61
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/struct_stat.h50
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/wordsize.h21
-rw-r--r--lib/libc/include/m68k-linux-gnu/gnu/lib-names.h1
-rw-r--r--lib/libc/include/mips-linux-gnu/bits/local_lim.h99
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/dlfcn.h (renamed from lib/libc/include/mips-linux-gnu/bits/dlfcn.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/errno.h (renamed from lib/libc/include/mips-linux-gnu/bits/errno.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/eventfd.h (renamed from lib/libc/include/mips-linux-gnu/bits/eventfd.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/inotify.h (renamed from lib/libc/include/mips-linux-gnu/bits/inotify.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/ioctl-types.h (renamed from lib/libc/include/mips-linux-gnu/bits/ioctl-types.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/ipctypes.h (renamed from lib/libc/include/mips-linux-gnu/bits/ipctypes.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/mman.h (renamed from lib/libc/include/mips-linux-gnu/bits/mman.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/poll.h (renamed from lib/libc/include/mips-linux-gnu/bits/poll.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/pthread_stack_min.h20
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/pthreadtypes-arch.h (renamed from lib/libc/include/mips-linux-gnu/bits/pthreadtypes-arch.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/resource.h (renamed from lib/libc/include/mips-linux-gnu/bits/resource.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/semaphore.h (renamed from lib/libc/include/mips-linux-gnu/bits/semaphore.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/shmlba.h (renamed from lib/libc/include/mips-linux-gnu/bits/shmlba.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/sigaction.h (renamed from lib/libc/include/mips-linux-gnu/bits/sigaction.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/sigcontext.h (renamed from lib/libc/include/mips-linux-gnu/bits/sigcontext.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/siginfo-arch.h (renamed from lib/libc/include/mips-linux-gnu/bits/siginfo-arch.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/signalfd.h (renamed from lib/libc/include/mips-linux-gnu/bits/signalfd.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/signum-arch.h (renamed from lib/libc/include/mips-linux-gnu/bits/signum-arch.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/socket-constants.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/socket-constants.h)38
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/socket_type.h (renamed from lib/libc/include/mips-linux-gnu/bits/socket_type.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/statfs.h (renamed from lib/libc/include/mips-linux-gnu/bits/statfs.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/struct_mutex.h (renamed from lib/libc/include/mips-linux-gnu/bits/struct_mutex.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/termios-c_cc.h (renamed from lib/libc/include/mips-linux-gnu/bits/termios-c_cc.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/termios-c_lflag.h (renamed from lib/libc/include/mips-linux-gnu/bits/termios-c_lflag.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/termios-struct.h (renamed from lib/libc/include/mips-linux-gnu/bits/termios-struct.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/termios-tcflow.h (renamed from lib/libc/include/mips-linux-gnu/bits/termios-tcflow.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/timerfd.h (renamed from lib/libc/include/mips-linux-gnu/bits/timerfd.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/types/stack_t.h (renamed from lib/libc/include/mips-linux-gnu/bits/types/stack_t.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/types/struct_msqid_ds.h (renamed from lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h)18
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/types/struct_semid_ds.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/types/struct_semid_ds.h)4
-rw-r--r--lib/libc/include/mips-linux-gnueabi/bits/types/struct_shmid_ds.h (renamed from lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h)14
-rw-r--r--lib/libc/include/mips-linux-gnueabi/ieee754.h (renamed from lib/libc/include/mips-linux-gnu/ieee754.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/dlfcn.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/dlfcn.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/errno.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/errno.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/eventfd.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/eventfd.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/inotify.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/inotify.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/ioctl-types.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/ioctl-types.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/ipctypes.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/ipctypes.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/mman.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/mman.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/poll.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/poll.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/pthread_stack_min.h20
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/pthreadtypes-arch.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/pthreadtypes-arch.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/resource.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/resource.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/semaphore.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/semaphore.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/shmlba.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/shmlba.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/sigaction.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/sigaction.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/sigcontext.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/sigcontext.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/siginfo-arch.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/siginfo-arch.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/signalfd.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/signalfd.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/signum-arch.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/signum-arch.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/socket-constants.h (renamed from lib/libc/include/mips-linux-gnu/bits/socket-constants.h)38
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/socket_type.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/socket_type.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/statfs.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/statfs.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/struct_mutex.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/struct_mutex.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/termios-c_cc.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/termios-c_cc.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/termios-c_lflag.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/termios-c_lflag.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/termios-struct.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/termios-struct.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/termios-tcflow.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/termios-tcflow.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/timerfd.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/timerfd.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/types/stack_t.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/types/stack_t.h)0
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/types/struct_msqid_ds.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/types/struct_msqid_ds.h)18
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/types/struct_semid_ds.h (renamed from lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h)4
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/bits/types/struct_shmid_ds.h (renamed from lib/libc/include/mipsel-linux-gnu/bits/types/struct_shmid_ds.h)14
-rw-r--r--lib/libc/include/mips-linux-gnueabihf/ieee754.h (renamed from lib/libc/include/mipsel-linux-gnu/ieee754.h)0
-rw-r--r--lib/libc/include/mips64-linux-gnuabi64/bits/floatn.h97
-rw-r--r--lib/libc/include/mips64-linux-gnuabi64/bits/local_lim.h99
-rw-r--r--lib/libc/include/mips64-linux-gnuabi64/bits/pthread_stack_min.h20
-rw-r--r--lib/libc/include/mips64-linux-gnuabi64/bits/socket-constants.h38
-rw-r--r--lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_msqid_ds.h18
-rw-r--r--lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_semid_ds.h4
-rw-r--r--lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_shmid_ds.h14
-rw-r--r--lib/libc/include/mips64-linux-gnuabin32/bits/floatn.h97
-rw-r--r--lib/libc/include/mips64-linux-gnuabin32/bits/local_lim.h99
-rw-r--r--lib/libc/include/mips64-linux-gnuabin32/bits/pthread_stack_min.h20
-rw-r--r--lib/libc/include/mips64-linux-gnuabin32/bits/socket-constants.h38
-rw-r--r--lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_msqid_ds.h18
-rw-r--r--lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_semid_ds.h4
-rw-r--r--lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_shmid_ds.h14
-rw-r--r--lib/libc/include/mips64el-linux-gnuabi64/bits/floatn.h97
-rw-r--r--lib/libc/include/mips64el-linux-gnuabi64/bits/local_lim.h99
-rw-r--r--lib/libc/include/mips64el-linux-gnuabi64/bits/pthread_stack_min.h20
-rw-r--r--lib/libc/include/mips64el-linux-gnuabi64/bits/socket-constants.h38
-rw-r--r--lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_msqid_ds.h18
-rw-r--r--lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h4
-rw-r--r--lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_shmid_ds.h14
-rw-r--r--lib/libc/include/mips64el-linux-gnuabin32/bits/floatn.h97
-rw-r--r--lib/libc/include/mips64el-linux-gnuabin32/bits/local_lim.h99
-rw-r--r--lib/libc/include/mips64el-linux-gnuabin32/bits/pthread_stack_min.h20
-rw-r--r--lib/libc/include/mips64el-linux-gnuabin32/bits/socket-constants.h38
-rw-r--r--lib/libc/include/mips64el-linux-gnuabin32/bits/struct_rwlock.h71
-rw-r--r--lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_msqid_ds.h18
-rw-r--r--lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_semid_ds.h4
-rw-r--r--lib/libc/include/mips64el-linux-gnuabin32/bits/types/struct_shmid_ds.h14
-rw-r--r--lib/libc/include/mips64el-linux-gnuabin32/bits/wordsize.h31
-rw-r--r--lib/libc/include/mipsel-linux-gnu/bits/floatn.h97
-rw-r--r--lib/libc/include/mipsel-linux-gnu/bits/local_lim.h99
-rw-r--r--lib/libc/include/mipsel-linux-gnu/bits/struct_rwlock.h71
-rw-r--r--lib/libc/include/mipsel-linux-gnu/bits/wordsize.h31
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/dlfcn.h64
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/errno.h52
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/eventfd.h31
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/inotify.h29
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/ioctl-types.h75
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/ipctypes.h (renamed from lib/libc/include/mips64el-linux-gnuabi64/bits/wordsize.h)24
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/mman.h48
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/poll.h49
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/pthread_stack_min.h20
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/pthreadtypes-arch.h44
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/resource.h231
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/semaphore.h (renamed from lib/libc/include/mips64-linux-gnuabin32/bits/wordsize.h)23
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/shmlba.h24
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/sigaction.h94
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/sigcontext.h82
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/siginfo-arch.h13
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/signalfd.h29
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/signum-arch.h65
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/socket-constants.h70
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/socket_type.h55
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/statfs.h73
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/struct_mutex.h56
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/termios-c_cc.h43
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/termios-c_lflag.h46
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/termios-struct.h34
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/termios-tcflow.h26
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/timerfd.h29
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/types/stack_t.h33
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_msqid_ds.h62
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_semid_ds.h36
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_shmid_ds.h53
-rw-r--r--lib/libc/include/mipsel-linux-gnueabi/ieee754.h326
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/dlfcn.h64
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/errno.h52
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/eventfd.h31
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/inotify.h29
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/ioctl-types.h75
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/ipctypes.h (renamed from lib/libc/include/mips64-linux-gnuabi64/bits/wordsize.h)24
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/mman.h48
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/poll.h49
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/pthread_stack_min.h20
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/pthreadtypes-arch.h44
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/resource.h231
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/semaphore.h (renamed from lib/libc/include/mips-linux-gnu/bits/wordsize.h)23
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/shmlba.h24
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/sigaction.h94
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/sigcontext.h82
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/siginfo-arch.h13
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/signalfd.h29
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/signum-arch.h65
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/socket-constants.h70
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/socket_type.h55
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/statfs.h73
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/struct_mutex.h56
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/termios-c_cc.h43
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/termios-c_lflag.h46
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/termios-struct.h34
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/termios-tcflow.h26
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/timerfd.h29
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/types/stack_t.h33
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_msqid_ds.h62
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_semid_ds.h36
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_shmid_ds.h53
-rw-r--r--lib/libc/include/mipsel-linux-gnueabihf/ieee754.h326
-rw-r--r--lib/libc/include/powerpc-linux-gnu/bits/local_lim.h100
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/endianness.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/endianness.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/environments.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/environments.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/fcntl.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/fcntl.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/fenv.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/fenv.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/floatn.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/floatn.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/fp-fast.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/fp-fast.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/hwcap.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/hwcap.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/ioctl-types.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/ioctl-types.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/ipc-perm.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/ipc-perm.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/iscanonical.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/link.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/link.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/long-double.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/long-double.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/mman.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/mman.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/procfs.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/procfs.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/pthread_stack_min.h21
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/setjmp.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/setjmp.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/sigstack.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/sigstack.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/socket-constants.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h)38
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/struct_mutex.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/struct_mutex.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/struct_rwlock.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/struct_rwlock.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/struct_stat.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/struct_stat.h)52
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/termios-baud.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/termios-baud.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_cc.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/termios-c_cc.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_cflag.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_iflag.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/termios-c_iflag.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_lflag.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/termios-c_lflag.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_oflag.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/termios-c_oflag.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/termios-misc.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/termios-misc.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/types/struct_msqid_ds.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/types/struct_msqid_ds.h)12
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/types/struct_semid_ds.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/types/struct_semid_ds.h)10
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/types/struct_shmid_ds.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/types/struct_shmid_ds.h)10
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/bits/wordsize.h (renamed from lib/libc/include/powerpc-linux-gnu/bits/wordsize.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/fpu_control.h (renamed from lib/libc/include/powerpc-linux-gnu/fpu_control.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/gnu/lib-names-32.h (renamed from lib/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h)1
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/gnu/lib-names.h (renamed from lib/libc/include/powerpc-linux-gnu/gnu/lib-names.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/gnu/stubs.h (renamed from lib/libc/include/powerpc-linux-gnu/gnu/stubs.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/ieee754.h (renamed from lib/libc/include/powerpc-linux-gnu/ieee754.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/sys/ptrace.h (renamed from lib/libc/include/powerpc-linux-gnu/sys/ptrace.h)10
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/sys/ucontext.h (renamed from lib/libc/include/powerpc-linux-gnu/sys/ucontext.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabi/sys/user.h (renamed from lib/libc/include/powerpc-linux-gnu/sys/user.h)0
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/endianness.h16
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/environments.h96
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/fcntl.h62
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/fenv.h180
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/floatn.h (renamed from lib/libc/include/mips-linux-gnu/bits/floatn.h)71
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/fp-fast.h39
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/hwcap.h78
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/ioctl-types.h77
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/ipc-perm.h36
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/iscanonical.h58
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/link.h156
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/long-double.h25
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/mman.h53
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/procfs.h49
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/pthread_stack_min.h21
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/setjmp.h50
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/sigstack.h32
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/socket-constants.h70
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/struct_mutex.h63
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/struct_rwlock.h (renamed from lib/libc/include/mips-linux-gnu/bits/struct_rwlock.h)36
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/struct_stat.h231
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/termios-baud.h45
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_cc.h41
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_cflag.h35
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_iflag.h38
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_lflag.h45
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_oflag.h65
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/termios-misc.h72
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_msqid_ds.h53
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_semid_ds.h43
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_shmid_ds.h50
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/bits/wordsize.h11
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/fpu_control.h114
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/gnu/lib-names-32.h29
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/gnu/lib-names.h19
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/gnu/stubs.h15
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/ieee754.h197
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/sys/ptrace.h272
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/sys/ucontext.h200
-rw-r--r--lib/libc/include/powerpc-linux-gnueabihf/sys/user.h40
-rw-r--r--lib/libc/include/powerpc64-linux-gnu/bits/local_lim.h100
-rw-r--r--lib/libc/include/powerpc64-linux-gnu/bits/pthread_stack_min.h21
-rw-r--r--lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h38
-rw-r--r--lib/libc/include/powerpc64-linux-gnu/bits/struct_stat.h52
-rw-r--r--lib/libc/include/powerpc64-linux-gnu/bits/types/struct_msqid_ds.h12
-rw-r--r--lib/libc/include/powerpc64-linux-gnu/bits/types/struct_semid_ds.h10
-rw-r--r--lib/libc/include/powerpc64-linux-gnu/bits/types/struct_shmid_ds.h10
-rw-r--r--lib/libc/include/powerpc64-linux-gnu/gnu/lib-names-64-v1.h1
-rw-r--r--lib/libc/include/powerpc64-linux-gnu/sys/ptrace.h10
-rw-r--r--lib/libc/include/powerpc64le-linux-gnu/bits/local_lim.h100
-rw-r--r--lib/libc/include/powerpc64le-linux-gnu/bits/pthread_stack_min.h21
-rw-r--r--lib/libc/include/powerpc64le-linux-gnu/bits/socket-constants.h38
-rw-r--r--lib/libc/include/powerpc64le-linux-gnu/bits/struct_stat.h52
-rw-r--r--lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_msqid_ds.h12
-rw-r--r--lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_semid_ds.h10
-rw-r--r--lib/libc/include/powerpc64le-linux-gnu/bits/types/struct_shmid_ds.h10
-rw-r--r--lib/libc/include/powerpc64le-linux-gnu/gnu/lib-names-64-v2.h1
-rw-r--r--lib/libc/include/powerpc64le-linux-gnu/sys/ptrace.h10
-rw-r--r--lib/libc/include/riscv64-linux-gnu/bits/statfs.h86
-rw-r--r--lib/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64.h1
-rw-r--r--lib/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64d.h30
-rw-r--r--lib/libc/include/riscv64-linux-gnu/gnu/stubs-lp64d.h24
-rw-r--r--lib/libc/include/s390x-linux-gnu/bits/hwcap.h4
-rw-r--r--lib/libc/include/s390x-linux-gnu/bits/struct_stat.h56
-rw-r--r--lib/libc/include/s390x-linux-gnu/gnu/lib-names-64.h1
-rw-r--r--lib/libc/include/s390x-linux-gnu/sys/ptrace.h10
-rw-r--r--lib/libc/include/sparc-linux-gnu/bits/local_lim.h99
-rw-r--r--lib/libc/include/sparc-linux-gnu/bits/pthread_stack_min.h20
-rw-r--r--lib/libc/include/sparc-linux-gnu/bits/socket-constants.h38
-rw-r--r--lib/libc/include/sparc-linux-gnu/bits/types/struct_msqid_ds.h12
-rw-r--r--lib/libc/include/sparc-linux-gnu/bits/types/struct_semid_ds.h10
-rw-r--r--lib/libc/include/sparc-linux-gnu/bits/types/struct_shmid_ds.h10
-rw-r--r--lib/libc/include/sparc-linux-gnu/gnu/lib-names-64.h1
-rw-r--r--lib/libc/include/sparcv9-linux-gnu/bits/local_lim.h99
-rw-r--r--lib/libc/include/sparcv9-linux-gnu/bits/pthread_stack_min.h20
-rw-r--r--lib/libc/include/sparcv9-linux-gnu/bits/socket-constants.h38
-rw-r--r--lib/libc/include/sparcv9-linux-gnu/bits/types/struct_msqid_ds.h12
-rw-r--r--lib/libc/include/sparcv9-linux-gnu/bits/types/struct_semid_ds.h10
-rw-r--r--lib/libc/include/sparcv9-linux-gnu/bits/types/struct_shmid_ds.h10
-rw-r--r--lib/libc/include/x86_64-linux-gnu/bits/struct_stat.h90
-rw-r--r--lib/libc/include/x86_64-linux-gnu/bits/types/struct_semid_ds.h4
-rw-r--r--lib/libc/include/x86_64-linux-gnu/gnu/lib-names-64.h1
-rw-r--r--lib/libc/include/x86_64-linux-gnux32/bits/struct_stat.h90
-rw-r--r--lib/libc/include/x86_64-linux-gnux32/bits/types/struct_semid_ds.h4
-rw-r--r--lib/libc/include/x86_64-linux-gnux32/gnu/lib-names-x32.h1
430 files changed, 11670 insertions, 3306 deletions
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/local_lim.h b/lib/libc/include/aarch64-linux-gnu/bits/local_lim.h
deleted file mode 100644
index 61e25c0bcc..0000000000
--- a/lib/libc/include/aarch64-linux-gnu/bits/local_lim.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages for systems with 64k
- pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647) \ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/pthread_stack_min.h b/lib/libc/include/aarch64-linux-gnu/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..b08307db0a
--- /dev/null
+++ b/lib/libc/include/aarch64-linux-gnu/bits/pthread_stack_min.h
@@ -0,0 +1,22 @@
+/* Definition of PTHREAD_STACK_MIN. Linux/aarch64 version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages for systems with 64k
+ pages. */
+#define PTHREAD_STACK_MIN 131072 \ No newline at end of file
diff --git a/lib/libc/include/aarch64-linux-gnu/bits/statfs.h b/lib/libc/include/aarch64-linux-gnu/bits/statfs.h
deleted file mode 100644
index 94a6e610fb..0000000000
--- a/lib/libc/include/aarch64-linux-gnu/bits/statfs.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_STATFS_H
-# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
-#endif
-
-#include <bits/endian.h>
-#include <bits/types.h>
-#include <bits/wordsize.h>
-
-/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
- statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
- and accesses it via the statfs64() syscall. All the various
- APIs offered by libc use the kernel shape for their struct statfs
- structure; the only difference is that 32-bit programs not
- using __USE_FILE_OFFSET64 only see the low 32 bits of some
- of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
-
-#if defined __USE_FILE_OFFSET64
-# define __field64(type, type64, name) type64 name
-#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
-# define __field64(type, type64, name) type name
-#elif __BYTE_ORDER == __LITTLE_ENDIAN
-# define __field64(type, type64, name) \
- type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
-#else
-# define __field64(type, type64, name) \
- int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
-#endif
-
-struct statfs
- {
- __SWORD_TYPE f_type;
- __SWORD_TYPE f_bsize;
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks);
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree);
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail);
- __field64(__fsfilcnt_t, __fsfilcnt64_t, f_files);
- __field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree);
- __fsid_t f_fsid;
- __SWORD_TYPE f_namelen;
- __SWORD_TYPE f_frsize;
- __SWORD_TYPE f_flags;
- __SWORD_TYPE f_spare[4];
- };
-
-#undef __field64
-
-#ifdef __USE_LARGEFILE64
-struct statfs64
- {
- __SWORD_TYPE f_type;
- __SWORD_TYPE f_bsize;
- __fsblkcnt64_t f_blocks;
- __fsblkcnt64_t f_bfree;
- __fsblkcnt64_t f_bavail;
- __fsfilcnt64_t f_files;
- __fsfilcnt64_t f_ffree;
- __fsid_t f_fsid;
- __SWORD_TYPE f_namelen;
- __SWORD_TYPE f_frsize;
- __SWORD_TYPE f_flags;
- __SWORD_TYPE f_spare[4];
- };
-#endif
-
-/* Tell code we have these members. */
-#define _STATFS_F_NAMELEN
-#define _STATFS_F_FRSIZE
-#define _STATFS_F_FLAGS \ No newline at end of file
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 d25085e24f..f156f318c9 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
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
diff --git a/lib/libc/include/aarch64-linux-gnu/sys/ptrace.h b/lib/libc/include/aarch64-linux-gnu/sys/ptrace.h
index 40f59658ab..a3c6247f68 100644
--- a/lib/libc/include/aarch64-linux-gnu/sys/ptrace.h
+++ b/lib/libc/include/aarch64-linux-gnu/sys/ptrace.h
@@ -25,6 +25,40 @@
__BEGIN_DECLS
+/* Avoid collision if the linux ptrace header is already included. */
+#undef PTRACE_TRACEME
+#undef PTRACE_PEEKTEXT
+#undef PTRACE_PEEKDATA
+#undef PTRACE_PEEKUSER
+#undef PTRACE_POKETEXT
+#undef PTRACE_POKEDATA
+#undef PTRACE_POKEUSER
+#undef PTRACE_CONT
+#undef PTRACE_KILL
+#undef PTRACE_SINGLESTEP
+#undef PTRACE_ATTACH
+#undef PTRACE_DETACH
+#undef PTRACE_SYSCALL
+#undef PTRACE_SYSEMU
+#undef PTRACE_SYSEMU_SINGLESTEP
+#undef PTRACE_PEEKMTETAGS
+#undef PTRACE_POKEMTETAGS
+#undef PTRACE_SETOPTIONS
+#undef PTRACE_GETEVENTMSG
+#undef PTRACE_GETSIGINFO
+#undef PTRACE_SETSIGINFO
+#undef PTRACE_GETREGSET
+#undef PTRACE_SETREGSET
+#undef PTRACE_SEIZE
+#undef PTRACE_INTERRUPT
+#undef PTRACE_LISTEN
+#undef PTRACE_PEEKSIGINFO
+#undef PTRACE_GETSIGMASK
+#undef PTRACE_SETSIGMASK
+#undef PTRACE_SECCOMP_GET_FILTER
+#undef PTRACE_SECCOMP_GET_METADATA
+#undef PTRACE_GET_SYSCALL_INFO
+
/* Type of the REQUEST argument to `ptrace.' */
enum __ptrace_request
{
@@ -82,6 +116,22 @@ enum __ptrace_request
PTRACE_SYSCALL = 24,
#define PT_SYSCALL PTRACE_SYSCALL
+ /* Continue and stop at the next syscall, it will not be executed. */
+ PTRACE_SYSEMU = 31,
+#define PT_SYSEMU PTRACE_SYSEMU
+
+ /* Single step the process, the next syscall will not be executed. */
+ PTRACE_SYSEMU_SINGLESTEP = 32,
+#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
+
+ /* Read MTE tags. */
+ PTRACE_PEEKMTETAGS = 33,
+#define PT_PEEKMTETAGS PTRACE_PEEKMTETAGS
+
+ /* Write MTE tags. */
+ PTRACE_POKEMTETAGS = 34,
+#define PT_POKEMTETAGS PTRACE_POKEMTETAGS
+
/* Set ptrace filter options. */
PTRACE_SETOPTIONS = 0x4200,
#define PT_SETOPTIONS PTRACE_SETOPTIONS
diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/local_lim.h b/lib/libc/include/aarch64_be-linux-gnu/bits/local_lim.h
deleted file mode 100644
index 61e25c0bcc..0000000000
--- a/lib/libc/include/aarch64_be-linux-gnu/bits/local_lim.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
-
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages for systems with 64k
- pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647) \ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/pthread_stack_min.h b/lib/libc/include/aarch64_be-linux-gnu/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..b08307db0a
--- /dev/null
+++ b/lib/libc/include/aarch64_be-linux-gnu/bits/pthread_stack_min.h
@@ -0,0 +1,22 @@
+/* Definition of PTHREAD_STACK_MIN. Linux/aarch64 version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages for systems with 64k
+ pages. */
+#define PTHREAD_STACK_MIN 131072 \ No newline at end of file
diff --git a/lib/libc/include/aarch64_be-linux-gnu/bits/statfs.h b/lib/libc/include/aarch64_be-linux-gnu/bits/statfs.h
deleted file mode 100644
index 94a6e610fb..0000000000
--- a/lib/libc/include/aarch64_be-linux-gnu/bits/statfs.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_STATFS_H
-# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
-#endif
-
-#include <bits/endian.h>
-#include <bits/types.h>
-#include <bits/wordsize.h>
-
-/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
- statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
- and accesses it via the statfs64() syscall. All the various
- APIs offered by libc use the kernel shape for their struct statfs
- structure; the only difference is that 32-bit programs not
- using __USE_FILE_OFFSET64 only see the low 32 bits of some
- of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
-
-#if defined __USE_FILE_OFFSET64
-# define __field64(type, type64, name) type64 name
-#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
-# define __field64(type, type64, name) type name
-#elif __BYTE_ORDER == __LITTLE_ENDIAN
-# define __field64(type, type64, name) \
- type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
-#else
-# define __field64(type, type64, name) \
- int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
-#endif
-
-struct statfs
- {
- __SWORD_TYPE f_type;
- __SWORD_TYPE f_bsize;
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks);
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree);
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail);
- __field64(__fsfilcnt_t, __fsfilcnt64_t, f_files);
- __field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree);
- __fsid_t f_fsid;
- __SWORD_TYPE f_namelen;
- __SWORD_TYPE f_frsize;
- __SWORD_TYPE f_flags;
- __SWORD_TYPE f_spare[4];
- };
-
-#undef __field64
-
-#ifdef __USE_LARGEFILE64
-struct statfs64
- {
- __SWORD_TYPE f_type;
- __SWORD_TYPE f_bsize;
- __fsblkcnt64_t f_blocks;
- __fsblkcnt64_t f_bfree;
- __fsblkcnt64_t f_bavail;
- __fsfilcnt64_t f_files;
- __fsfilcnt64_t f_ffree;
- __fsid_t f_fsid;
- __SWORD_TYPE f_namelen;
- __SWORD_TYPE f_frsize;
- __SWORD_TYPE f_flags;
- __SWORD_TYPE f_spare[4];
- };
-#endif
-
-/* Tell code we have these members. */
-#define _STATFS_F_NAMELEN
-#define _STATFS_F_FRSIZE
-#define _STATFS_F_FLAGS \ No newline at end of file
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 fb1dd8a26c..7c11af71ef 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
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
diff --git a/lib/libc/include/aarch64_be-linux-gnu/sys/ptrace.h b/lib/libc/include/aarch64_be-linux-gnu/sys/ptrace.h
index 40f59658ab..a3c6247f68 100644
--- a/lib/libc/include/aarch64_be-linux-gnu/sys/ptrace.h
+++ b/lib/libc/include/aarch64_be-linux-gnu/sys/ptrace.h
@@ -25,6 +25,40 @@
__BEGIN_DECLS
+/* Avoid collision if the linux ptrace header is already included. */
+#undef PTRACE_TRACEME
+#undef PTRACE_PEEKTEXT
+#undef PTRACE_PEEKDATA
+#undef PTRACE_PEEKUSER
+#undef PTRACE_POKETEXT
+#undef PTRACE_POKEDATA
+#undef PTRACE_POKEUSER
+#undef PTRACE_CONT
+#undef PTRACE_KILL
+#undef PTRACE_SINGLESTEP
+#undef PTRACE_ATTACH
+#undef PTRACE_DETACH
+#undef PTRACE_SYSCALL
+#undef PTRACE_SYSEMU
+#undef PTRACE_SYSEMU_SINGLESTEP
+#undef PTRACE_PEEKMTETAGS
+#undef PTRACE_POKEMTETAGS
+#undef PTRACE_SETOPTIONS
+#undef PTRACE_GETEVENTMSG
+#undef PTRACE_GETSIGINFO
+#undef PTRACE_SETSIGINFO
+#undef PTRACE_GETREGSET
+#undef PTRACE_SETREGSET
+#undef PTRACE_SEIZE
+#undef PTRACE_INTERRUPT
+#undef PTRACE_LISTEN
+#undef PTRACE_PEEKSIGINFO
+#undef PTRACE_GETSIGMASK
+#undef PTRACE_SETSIGMASK
+#undef PTRACE_SECCOMP_GET_FILTER
+#undef PTRACE_SECCOMP_GET_METADATA
+#undef PTRACE_GET_SYSCALL_INFO
+
/* Type of the REQUEST argument to `ptrace.' */
enum __ptrace_request
{
@@ -82,6 +116,22 @@ enum __ptrace_request
PTRACE_SYSCALL = 24,
#define PT_SYSCALL PTRACE_SYSCALL
+ /* Continue and stop at the next syscall, it will not be executed. */
+ PTRACE_SYSEMU = 31,
+#define PT_SYSEMU PTRACE_SYSEMU
+
+ /* Single step the process, the next syscall will not be executed. */
+ PTRACE_SYSEMU_SINGLESTEP = 32,
+#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
+
+ /* Read MTE tags. */
+ PTRACE_PEEKMTETAGS = 33,
+#define PT_PEEKMTETAGS PTRACE_PEEKMTETAGS
+
+ /* Write MTE tags. */
+ PTRACE_POKEMTETAGS = 34,
+#define PT_POKEMTETAGS PTRACE_POKEMTETAGS
+
/* Set ptrace filter options. */
PTRACE_SETOPTIONS = 0x4200,
#define PT_SETOPTIONS PTRACE_SETOPTIONS
diff --git a/lib/libc/include/arm-linux-gnueabi/bits/floatn.h b/lib/libc/include/arm-linux-gnueabi/bits/floatn.h
new file mode 100644
index 0000000000..18018fa9f8
--- /dev/null
+++ b/lib/libc/include/arm-linux-gnueabi/bits/floatn.h
@@ -0,0 +1,52 @@
+/* Macros to control TS 18661-3 glibc features.
+ Copyright (C) 2017-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* 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. */
+#define __HAVE_FLOAT128 0
+
+/* 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 0
+
+/* 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 0
+
+#ifndef __ASSEMBLER__
+
+/* Defined to concatenate the literal suffix to be used with _Float128
+ types, if __HAVE_FLOAT128 is 1.
+ E.g.: #define __f128(x) x##f128. */
+# undef __f128
+
+/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
+ E.g.: #define __CFLOAT128 _Complex _Float128. */
+# undef __CFLOAT128
+
+#endif /* !__ASSEMBLER__. */
+
+#include <bits/floatn-common.h> \ No newline at end of file
diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/struct_rwlock.h b/lib/libc/include/arm-linux-gnueabi/bits/struct_rwlock.h
index 6355f539b9..7431c5597f 100644
--- a/lib/libc/include/mips64-linux-gnuabin32/bits/struct_rwlock.h
+++ b/lib/libc/include/arm-linux-gnueabi/bits/struct_rwlock.h
@@ -1,4 +1,4 @@
-/* MIPS internal rwlock struct definitions.
+/* Default read-write lock implementation struct definitions.
Copyright (C) 2019-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -16,8 +16,15 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _RWLOCK_INTERNAL_H
-#define _RWLOCK_INTERNAL_H
+#ifndef __RWLOCK_INTERNAL_H
+#define __RWLOCK_INTERNAL_H
+
+#include <bits/endian.h>
+
+/* Generic struct for both POSIX read-write lock. New ports are expected
+ to use the default layout, however archictetures can redefine it to add
+ arch-specific extensions (such as lock-elision). The struct have a size
+ of 32 bytes on both LP32 and LP64 architectures. */
struct __pthread_rwlock_arch_t
{
@@ -27,45 +34,28 @@ struct __pthread_rwlock_arch_t
unsigned int __writers_futex;
unsigned int __pad3;
unsigned int __pad4;
-#if _MIPS_SIM == _ABI64
- int __cur_writer;
- int __shared;
- unsigned long int __pad1;
- unsigned long int __pad2;
- /* FLAGS must stay at this position in the structure to maintain
+ /* FLAGS must stay at its position in the structure to maintain
binary compatibility. */
- unsigned int __flags;
-# else
-# if __BYTE_ORDER == __BIG_ENDIAN
+#if __BYTE_ORDER == __BIG_ENDIAN
unsigned char __pad1;
unsigned char __pad2;
unsigned char __shared;
- /* FLAGS must stay at this position in the structure to maintain
- binary compatibility. */
unsigned char __flags;
-# else
- /* FLAGS must stay at this position in the structure to maintain
- binary compatibility. */
+#else
unsigned char __flags;
unsigned char __shared;
unsigned char __pad1;
unsigned char __pad2;
-# endif
- int __cur_writer;
#endif
+ int __cur_writer;
};
-#if _MIPS_SIM == _ABI64
+#if __BYTE_ORDER == __BIG_ENDIAN
# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
-#else
-# if __BYTE_ORDER == __BIG_ENDIAN
-# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
-# else
-# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
+#else
+# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
-# endif
#endif
#endif \ No newline at end of file
diff --git a/lib/libc/include/arm-linux-gnueabi/bits/struct_stat.h b/lib/libc/include/arm-linux-gnueabi/bits/struct_stat.h
index 94f0282059..202df2c998 100644
--- a/lib/libc/include/arm-linux-gnueabi/bits/struct_stat.h
+++ b/lib/libc/include/arm-linux-gnueabi/bits/struct_stat.h
@@ -28,32 +28,35 @@
struct stat
{
+#ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+#else
__dev_t st_dev; /* Device. */
unsigned short int __pad1;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-#endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -63,28 +66,32 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
-#ifndef __USE_FILE_OFFSET64
+# endif
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-#else
+# else
__ino64_t st_ino; /* File serial number. */
-#endif
+# endif
+#endif /* __USE_TIME_BITS64 */
};
#ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
unsigned int __pad1;
@@ -99,7 +106,7 @@ struct stat64
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -109,15 +116,16 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
__ino64_t st_ino; /* File serial number. */
+# endif /* __USE_TIME_BITS64 */
};
#endif
diff --git a/lib/libc/include/arm-linux-gnueabi/bits/wordsize.h b/lib/libc/include/arm-linux-gnueabi/bits/wordsize.h
new file mode 100644
index 0000000000..6561e924f5
--- /dev/null
+++ b/lib/libc/include/arm-linux-gnueabi/bits/wordsize.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#define __WORDSIZE 32
+#define __WORDSIZE_TIME64_COMPAT32 0
+#define __WORDSIZE32_SIZE_ULONG 0
+#define __WORDSIZE32_PTRDIFF_LONG 0 \ No newline at end of file
diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/floatn.h b/lib/libc/include/arm-linux-gnueabihf/bits/floatn.h
new file mode 100644
index 0000000000..18018fa9f8
--- /dev/null
+++ b/lib/libc/include/arm-linux-gnueabihf/bits/floatn.h
@@ -0,0 +1,52 @@
+/* Macros to control TS 18661-3 glibc features.
+ Copyright (C) 2017-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* 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. */
+#define __HAVE_FLOAT128 0
+
+/* 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 0
+
+/* 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 0
+
+#ifndef __ASSEMBLER__
+
+/* Defined to concatenate the literal suffix to be used with _Float128
+ types, if __HAVE_FLOAT128 is 1.
+ E.g.: #define __f128(x) x##f128. */
+# undef __f128
+
+/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
+ E.g.: #define __CFLOAT128 _Complex _Float128. */
+# undef __CFLOAT128
+
+#endif /* !__ASSEMBLER__. */
+
+#include <bits/floatn-common.h> \ No newline at end of file
diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/struct_rwlock.h b/lib/libc/include/arm-linux-gnueabihf/bits/struct_rwlock.h
index 6355f539b9..7431c5597f 100644
--- a/lib/libc/include/mips64el-linux-gnuabi64/bits/struct_rwlock.h
+++ b/lib/libc/include/arm-linux-gnueabihf/bits/struct_rwlock.h
@@ -1,4 +1,4 @@
-/* MIPS internal rwlock struct definitions.
+/* Default read-write lock implementation struct definitions.
Copyright (C) 2019-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -16,8 +16,15 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _RWLOCK_INTERNAL_H
-#define _RWLOCK_INTERNAL_H
+#ifndef __RWLOCK_INTERNAL_H
+#define __RWLOCK_INTERNAL_H
+
+#include <bits/endian.h>
+
+/* Generic struct for both POSIX read-write lock. New ports are expected
+ to use the default layout, however archictetures can redefine it to add
+ arch-specific extensions (such as lock-elision). The struct have a size
+ of 32 bytes on both LP32 and LP64 architectures. */
struct __pthread_rwlock_arch_t
{
@@ -27,45 +34,28 @@ struct __pthread_rwlock_arch_t
unsigned int __writers_futex;
unsigned int __pad3;
unsigned int __pad4;
-#if _MIPS_SIM == _ABI64
- int __cur_writer;
- int __shared;
- unsigned long int __pad1;
- unsigned long int __pad2;
- /* FLAGS must stay at this position in the structure to maintain
+ /* FLAGS must stay at its position in the structure to maintain
binary compatibility. */
- unsigned int __flags;
-# else
-# if __BYTE_ORDER == __BIG_ENDIAN
+#if __BYTE_ORDER == __BIG_ENDIAN
unsigned char __pad1;
unsigned char __pad2;
unsigned char __shared;
- /* FLAGS must stay at this position in the structure to maintain
- binary compatibility. */
unsigned char __flags;
-# else
- /* FLAGS must stay at this position in the structure to maintain
- binary compatibility. */
+#else
unsigned char __flags;
unsigned char __shared;
unsigned char __pad1;
unsigned char __pad2;
-# endif
- int __cur_writer;
#endif
+ int __cur_writer;
};
-#if _MIPS_SIM == _ABI64
+#if __BYTE_ORDER == __BIG_ENDIAN
# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
-#else
-# if __BYTE_ORDER == __BIG_ENDIAN
-# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
-# else
-# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
+#else
+# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
-# endif
#endif
#endif \ No newline at end of file
diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/struct_stat.h b/lib/libc/include/arm-linux-gnueabihf/bits/struct_stat.h
index 94f0282059..202df2c998 100644
--- a/lib/libc/include/arm-linux-gnueabihf/bits/struct_stat.h
+++ b/lib/libc/include/arm-linux-gnueabihf/bits/struct_stat.h
@@ -28,32 +28,35 @@
struct stat
{
+#ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+#else
__dev_t st_dev; /* Device. */
unsigned short int __pad1;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-#endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -63,28 +66,32 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
-#ifndef __USE_FILE_OFFSET64
+# endif
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-#else
+# else
__ino64_t st_ino; /* File serial number. */
-#endif
+# endif
+#endif /* __USE_TIME_BITS64 */
};
#ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
unsigned int __pad1;
@@ -99,7 +106,7 @@ struct stat64
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -109,15 +116,16 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
__ino64_t st_ino; /* File serial number. */
+# endif /* __USE_TIME_BITS64 */
};
#endif
diff --git a/lib/libc/include/arm-linux-gnueabihf/bits/wordsize.h b/lib/libc/include/arm-linux-gnueabihf/bits/wordsize.h
new file mode 100644
index 0000000000..6561e924f5
--- /dev/null
+++ b/lib/libc/include/arm-linux-gnueabihf/bits/wordsize.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#define __WORDSIZE 32
+#define __WORDSIZE_TIME64_COMPAT32 0
+#define __WORDSIZE32_SIZE_ULONG 0
+#define __WORDSIZE32_PTRDIFF_LONG 0 \ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/floatn.h b/lib/libc/include/armeb-linux-gnueabi/bits/floatn.h
new file mode 100644
index 0000000000..18018fa9f8
--- /dev/null
+++ b/lib/libc/include/armeb-linux-gnueabi/bits/floatn.h
@@ -0,0 +1,52 @@
+/* Macros to control TS 18661-3 glibc features.
+ Copyright (C) 2017-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* 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. */
+#define __HAVE_FLOAT128 0
+
+/* 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 0
+
+/* 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 0
+
+#ifndef __ASSEMBLER__
+
+/* Defined to concatenate the literal suffix to be used with _Float128
+ types, if __HAVE_FLOAT128 is 1.
+ E.g.: #define __f128(x) x##f128. */
+# undef __f128
+
+/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
+ E.g.: #define __CFLOAT128 _Complex _Float128. */
+# undef __CFLOAT128
+
+#endif /* !__ASSEMBLER__. */
+
+#include <bits/floatn-common.h> \ No newline at end of file
diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/struct_rwlock.h b/lib/libc/include/armeb-linux-gnueabi/bits/struct_rwlock.h
index 6355f539b9..7431c5597f 100644
--- a/lib/libc/include/mips64-linux-gnuabi64/bits/struct_rwlock.h
+++ b/lib/libc/include/armeb-linux-gnueabi/bits/struct_rwlock.h
@@ -1,4 +1,4 @@
-/* MIPS internal rwlock struct definitions.
+/* Default read-write lock implementation struct definitions.
Copyright (C) 2019-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -16,8 +16,15 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _RWLOCK_INTERNAL_H
-#define _RWLOCK_INTERNAL_H
+#ifndef __RWLOCK_INTERNAL_H
+#define __RWLOCK_INTERNAL_H
+
+#include <bits/endian.h>
+
+/* Generic struct for both POSIX read-write lock. New ports are expected
+ to use the default layout, however archictetures can redefine it to add
+ arch-specific extensions (such as lock-elision). The struct have a size
+ of 32 bytes on both LP32 and LP64 architectures. */
struct __pthread_rwlock_arch_t
{
@@ -27,45 +34,28 @@ struct __pthread_rwlock_arch_t
unsigned int __writers_futex;
unsigned int __pad3;
unsigned int __pad4;
-#if _MIPS_SIM == _ABI64
- int __cur_writer;
- int __shared;
- unsigned long int __pad1;
- unsigned long int __pad2;
- /* FLAGS must stay at this position in the structure to maintain
+ /* FLAGS must stay at its position in the structure to maintain
binary compatibility. */
- unsigned int __flags;
-# else
-# if __BYTE_ORDER == __BIG_ENDIAN
+#if __BYTE_ORDER == __BIG_ENDIAN
unsigned char __pad1;
unsigned char __pad2;
unsigned char __shared;
- /* FLAGS must stay at this position in the structure to maintain
- binary compatibility. */
unsigned char __flags;
-# else
- /* FLAGS must stay at this position in the structure to maintain
- binary compatibility. */
+#else
unsigned char __flags;
unsigned char __shared;
unsigned char __pad1;
unsigned char __pad2;
-# endif
- int __cur_writer;
#endif
+ int __cur_writer;
};
-#if _MIPS_SIM == _ABI64
+#if __BYTE_ORDER == __BIG_ENDIAN
# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
-#else
-# if __BYTE_ORDER == __BIG_ENDIAN
-# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
-# else
-# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
+#else
+# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
-# endif
#endif
#endif \ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/struct_stat.h b/lib/libc/include/armeb-linux-gnueabi/bits/struct_stat.h
index 94f0282059..202df2c998 100644
--- a/lib/libc/include/armeb-linux-gnueabi/bits/struct_stat.h
+++ b/lib/libc/include/armeb-linux-gnueabi/bits/struct_stat.h
@@ -28,32 +28,35 @@
struct stat
{
+#ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+#else
__dev_t st_dev; /* Device. */
unsigned short int __pad1;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-#endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -63,28 +66,32 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
-#ifndef __USE_FILE_OFFSET64
+# endif
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-#else
+# else
__ino64_t st_ino; /* File serial number. */
-#endif
+# endif
+#endif /* __USE_TIME_BITS64 */
};
#ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
unsigned int __pad1;
@@ -99,7 +106,7 @@ struct stat64
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -109,15 +116,16 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
__ino64_t st_ino; /* File serial number. */
+# endif /* __USE_TIME_BITS64 */
};
#endif
diff --git a/lib/libc/include/armeb-linux-gnueabi/bits/wordsize.h b/lib/libc/include/armeb-linux-gnueabi/bits/wordsize.h
new file mode 100644
index 0000000000..6561e924f5
--- /dev/null
+++ b/lib/libc/include/armeb-linux-gnueabi/bits/wordsize.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#define __WORDSIZE 32
+#define __WORDSIZE_TIME64_COMPAT32 0
+#define __WORDSIZE32_SIZE_ULONG 0
+#define __WORDSIZE32_PTRDIFF_LONG 0 \ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/floatn.h b/lib/libc/include/armeb-linux-gnueabihf/bits/floatn.h
new file mode 100644
index 0000000000..18018fa9f8
--- /dev/null
+++ b/lib/libc/include/armeb-linux-gnueabihf/bits/floatn.h
@@ -0,0 +1,52 @@
+/* Macros to control TS 18661-3 glibc features.
+ Copyright (C) 2017-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* 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. */
+#define __HAVE_FLOAT128 0
+
+/* 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 0
+
+/* 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 0
+
+#ifndef __ASSEMBLER__
+
+/* Defined to concatenate the literal suffix to be used with _Float128
+ types, if __HAVE_FLOAT128 is 1.
+ E.g.: #define __f128(x) x##f128. */
+# undef __f128
+
+/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
+ E.g.: #define __CFLOAT128 _Complex _Float128. */
+# undef __CFLOAT128
+
+#endif /* !__ASSEMBLER__. */
+
+#include <bits/floatn-common.h> \ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/struct_rwlock.h b/lib/libc/include/armeb-linux-gnueabihf/bits/struct_rwlock.h
new file mode 100644
index 0000000000..7431c5597f
--- /dev/null
+++ b/lib/libc/include/armeb-linux-gnueabihf/bits/struct_rwlock.h
@@ -0,0 +1,61 @@
+/* Default read-write lock implementation struct definitions.
+ Copyright (C) 2019-2021 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
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef __RWLOCK_INTERNAL_H
+#define __RWLOCK_INTERNAL_H
+
+#include <bits/endian.h>
+
+/* Generic struct for both POSIX read-write lock. New ports are expected
+ to use the default layout, however archictetures can redefine it to add
+ arch-specific extensions (such as lock-elision). The struct have a size
+ of 32 bytes on both LP32 and LP64 architectures. */
+
+struct __pthread_rwlock_arch_t
+{
+ unsigned int __readers;
+ unsigned int __writers;
+ unsigned int __wrphase_futex;
+ unsigned int __writers_futex;
+ unsigned int __pad3;
+ unsigned int __pad4;
+ /* FLAGS must stay at its position in the structure to maintain
+ binary compatibility. */
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned char __pad1;
+ unsigned char __pad2;
+ unsigned char __shared;
+ unsigned char __flags;
+#else
+ unsigned char __flags;
+ unsigned char __shared;
+ unsigned char __pad1;
+ unsigned char __pad2;
+#endif
+ int __cur_writer;
+};
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
+#else
+# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
+ 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
+#endif
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/struct_stat.h b/lib/libc/include/armeb-linux-gnueabihf/bits/struct_stat.h
index 94f0282059..202df2c998 100644
--- a/lib/libc/include/armeb-linux-gnueabihf/bits/struct_stat.h
+++ b/lib/libc/include/armeb-linux-gnueabihf/bits/struct_stat.h
@@ -28,32 +28,35 @@
struct stat
{
+#ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+#else
__dev_t st_dev; /* Device. */
unsigned short int __pad1;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-#endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -63,28 +66,32 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
-#ifndef __USE_FILE_OFFSET64
+# endif
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-#else
+# else
__ino64_t st_ino; /* File serial number. */
-#endif
+# endif
+#endif /* __USE_TIME_BITS64 */
};
#ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
unsigned int __pad1;
@@ -99,7 +106,7 @@ struct stat64
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -109,15 +116,16 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
__ino64_t st_ino; /* File serial number. */
+# endif /* __USE_TIME_BITS64 */
};
#endif
diff --git a/lib/libc/include/armeb-linux-gnueabihf/bits/wordsize.h b/lib/libc/include/armeb-linux-gnueabihf/bits/wordsize.h
new file mode 100644
index 0000000000..6561e924f5
--- /dev/null
+++ b/lib/libc/include/armeb-linux-gnueabihf/bits/wordsize.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#define __WORDSIZE 32
+#define __WORDSIZE_TIME64_COMPAT32 0
+#define __WORDSIZE32_SIZE_ULONG 0
+#define __WORDSIZE32_PTRDIFF_LONG 0 \ No newline at end of file
diff --git a/lib/libc/include/csky-linux-gnueabi/bits/floatn.h b/lib/libc/include/csky-linux-gnueabi/bits/floatn.h
new file mode 100644
index 0000000000..18018fa9f8
--- /dev/null
+++ b/lib/libc/include/csky-linux-gnueabi/bits/floatn.h
@@ -0,0 +1,52 @@
+/* Macros to control TS 18661-3 glibc features.
+ Copyright (C) 2017-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* 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. */
+#define __HAVE_FLOAT128 0
+
+/* 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 0
+
+/* 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 0
+
+#ifndef __ASSEMBLER__
+
+/* Defined to concatenate the literal suffix to be used with _Float128
+ types, if __HAVE_FLOAT128 is 1.
+ E.g.: #define __f128(x) x##f128. */
+# undef __f128
+
+/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
+ E.g.: #define __CFLOAT128 _Complex _Float128. */
+# undef __CFLOAT128
+
+#endif /* !__ASSEMBLER__. */
+
+#include <bits/floatn-common.h> \ No newline at end of file
diff --git a/lib/libc/include/csky-linux-gnueabi/bits/statfs.h b/lib/libc/include/csky-linux-gnueabi/bits/statfs.h
index 94a6e610fb..60421fc7fb 100644
--- a/lib/libc/include/csky-linux-gnueabi/bits/statfs.h
+++ b/lib/libc/include/csky-linux-gnueabi/bits/statfs.h
@@ -1,6 +1,5 @@
/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -24,18 +23,8 @@
#include <bits/types.h>
#include <bits/wordsize.h>
-/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
- statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
- and accesses it via the statfs64() syscall. All the various
- APIs offered by libc use the kernel shape for their struct statfs
- structure; the only difference is that 32-bit programs not
- using __USE_FILE_OFFSET64 only see the low 32 bits of some
- of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
-
#if defined __USE_FILE_OFFSET64
# define __field64(type, type64, name) type64 name
-#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
-# define __field64(type, type64, name) type name
#elif __BYTE_ORDER == __LITTLE_ENDIAN
# define __field64(type, type64, name) \
type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
diff --git a/lib/libc/include/csky-linux-gnueabi/bits/struct_rwlock.h b/lib/libc/include/csky-linux-gnueabi/bits/struct_rwlock.h
new file mode 100644
index 0000000000..7431c5597f
--- /dev/null
+++ b/lib/libc/include/csky-linux-gnueabi/bits/struct_rwlock.h
@@ -0,0 +1,61 @@
+/* Default read-write lock implementation struct definitions.
+ Copyright (C) 2019-2021 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
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef __RWLOCK_INTERNAL_H
+#define __RWLOCK_INTERNAL_H
+
+#include <bits/endian.h>
+
+/* Generic struct for both POSIX read-write lock. New ports are expected
+ to use the default layout, however archictetures can redefine it to add
+ arch-specific extensions (such as lock-elision). The struct have a size
+ of 32 bytes on both LP32 and LP64 architectures. */
+
+struct __pthread_rwlock_arch_t
+{
+ unsigned int __readers;
+ unsigned int __writers;
+ unsigned int __wrphase_futex;
+ unsigned int __writers_futex;
+ unsigned int __pad3;
+ unsigned int __pad4;
+ /* FLAGS must stay at its position in the structure to maintain
+ binary compatibility. */
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned char __pad1;
+ unsigned char __pad2;
+ unsigned char __shared;
+ unsigned char __flags;
+#else
+ unsigned char __flags;
+ unsigned char __shared;
+ unsigned char __pad1;
+ unsigned char __pad2;
+#endif
+ int __cur_writer;
+};
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
+#else
+# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
+ 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
+#endif
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/csky-linux-gnueabi/bits/wordsize.h b/lib/libc/include/csky-linux-gnueabi/bits/wordsize.h
new file mode 100644
index 0000000000..6561e924f5
--- /dev/null
+++ b/lib/libc/include/csky-linux-gnueabi/bits/wordsize.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#define __WORDSIZE 32
+#define __WORDSIZE_TIME64_COMPAT32 0
+#define __WORDSIZE32_SIZE_ULONG 0
+#define __WORDSIZE32_PTRDIFF_LONG 0 \ No newline at end of file
diff --git a/lib/libc/include/csky-linux-gnueabi/gnu/lib-names.h b/lib/libc/include/csky-linux-gnueabi/gnu/lib-names.h
index 21c8322d29..aed5f023bf 100644
--- a/lib/libc/include/csky-linux-gnueabi/gnu/lib-names.h
+++ b/lib/libc/include/csky-linux-gnueabi/gnu/lib-names.h
@@ -9,6 +9,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
diff --git a/lib/libc/include/csky-linux-gnueabihf/bits/floatn.h b/lib/libc/include/csky-linux-gnueabihf/bits/floatn.h
new file mode 100644
index 0000000000..18018fa9f8
--- /dev/null
+++ b/lib/libc/include/csky-linux-gnueabihf/bits/floatn.h
@@ -0,0 +1,52 @@
+/* Macros to control TS 18661-3 glibc features.
+ Copyright (C) 2017-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* 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. */
+#define __HAVE_FLOAT128 0
+
+/* 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 0
+
+/* 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 0
+
+#ifndef __ASSEMBLER__
+
+/* Defined to concatenate the literal suffix to be used with _Float128
+ types, if __HAVE_FLOAT128 is 1.
+ E.g.: #define __f128(x) x##f128. */
+# undef __f128
+
+/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
+ E.g.: #define __CFLOAT128 _Complex _Float128. */
+# undef __CFLOAT128
+
+#endif /* !__ASSEMBLER__. */
+
+#include <bits/floatn-common.h> \ No newline at end of file
diff --git a/lib/libc/include/csky-linux-gnueabihf/bits/statfs.h b/lib/libc/include/csky-linux-gnueabihf/bits/statfs.h
index 94a6e610fb..60421fc7fb 100644
--- a/lib/libc/include/csky-linux-gnueabihf/bits/statfs.h
+++ b/lib/libc/include/csky-linux-gnueabihf/bits/statfs.h
@@ -1,6 +1,5 @@
/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -24,18 +23,8 @@
#include <bits/types.h>
#include <bits/wordsize.h>
-/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
- statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
- and accesses it via the statfs64() syscall. All the various
- APIs offered by libc use the kernel shape for their struct statfs
- structure; the only difference is that 32-bit programs not
- using __USE_FILE_OFFSET64 only see the low 32 bits of some
- of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
-
#if defined __USE_FILE_OFFSET64
# define __field64(type, type64, name) type64 name
-#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
-# define __field64(type, type64, name) type name
#elif __BYTE_ORDER == __LITTLE_ENDIAN
# define __field64(type, type64, name) \
type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
diff --git a/lib/libc/include/csky-linux-gnueabihf/bits/struct_rwlock.h b/lib/libc/include/csky-linux-gnueabihf/bits/struct_rwlock.h
new file mode 100644
index 0000000000..7431c5597f
--- /dev/null
+++ b/lib/libc/include/csky-linux-gnueabihf/bits/struct_rwlock.h
@@ -0,0 +1,61 @@
+/* Default read-write lock implementation struct definitions.
+ Copyright (C) 2019-2021 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
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef __RWLOCK_INTERNAL_H
+#define __RWLOCK_INTERNAL_H
+
+#include <bits/endian.h>
+
+/* Generic struct for both POSIX read-write lock. New ports are expected
+ to use the default layout, however archictetures can redefine it to add
+ arch-specific extensions (such as lock-elision). The struct have a size
+ of 32 bytes on both LP32 and LP64 architectures. */
+
+struct __pthread_rwlock_arch_t
+{
+ unsigned int __readers;
+ unsigned int __writers;
+ unsigned int __wrphase_futex;
+ unsigned int __writers_futex;
+ unsigned int __pad3;
+ unsigned int __pad4;
+ /* FLAGS must stay at its position in the structure to maintain
+ binary compatibility. */
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned char __pad1;
+ unsigned char __pad2;
+ unsigned char __shared;
+ unsigned char __flags;
+#else
+ unsigned char __flags;
+ unsigned char __shared;
+ unsigned char __pad1;
+ unsigned char __pad2;
+#endif
+ int __cur_writer;
+};
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
+#else
+# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
+ 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
+#endif
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/csky-linux-gnueabihf/bits/wordsize.h b/lib/libc/include/csky-linux-gnueabihf/bits/wordsize.h
new file mode 100644
index 0000000000..6561e924f5
--- /dev/null
+++ b/lib/libc/include/csky-linux-gnueabihf/bits/wordsize.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#define __WORDSIZE 32
+#define __WORDSIZE_TIME64_COMPAT32 0
+#define __WORDSIZE32_SIZE_ULONG 0
+#define __WORDSIZE32_PTRDIFF_LONG 0 \ No newline at end of file
diff --git a/lib/libc/include/csky-linux-gnueabihf/gnu/lib-names.h b/lib/libc/include/csky-linux-gnueabihf/gnu/lib-names.h
index a2d4ba2f42..9fe17746c0 100644
--- a/lib/libc/include/csky-linux-gnueabihf/gnu/lib-names.h
+++ b/lib/libc/include/csky-linux-gnueabihf/gnu/lib-names.h
@@ -9,6 +9,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
diff --git a/lib/libc/include/generic-glibc/aio.h b/lib/libc/include/generic-glibc/aio.h
index 9ffd31d991..7a27495843 100644
--- a/lib/libc/include/generic-glibc/aio.h
+++ b/lib/libc/include/generic-glibc/aio.h
@@ -193,12 +193,17 @@ extern __ssize_t __REDIRECT_NTH (aio_return, (struct aiocb *__aiocbp),
extern int __REDIRECT_NTH (aio_cancel,
(int __fildes, struct aiocb *__aiocbp),
aio_cancel64);
-
+# ifdef __USE_TIME_BITS64
+extern int __REDIRECT_NTH (aio_suspend,
+ (const struct aiocb *const __list[], int __nent,
+ const struct timespec *__restrict __timeout),
+ __aio_suspend_time64) __nonnull ((1));
+# else
extern int __REDIRECT_NTH (aio_suspend,
(const struct aiocb *const __list[], int __nent,
const struct timespec *__restrict __timeout),
aio_suspend64) __nonnull ((1));
-
+# endif
extern int __REDIRECT_NTH (aio_fsync,
(int __operation, struct aiocb *__aiocbp),
aio_fsync64) __nonnull ((2));
@@ -210,7 +215,11 @@ extern int __REDIRECT_NTH (aio_fsync,
# define aio_error aio_error64
# define aio_return aio_return64
# define aio_cancel aio_cancel64
-# define aio_suspend aio_suspend64
+# ifdef __USE_TIME_BITS64
+# define aio_suspend __aio_suspend_time64
+# else
+# define aio_suspend aio_suspend64
+# endif
# define aio_fsync aio_fsync64
# endif
#endif
diff --git a/lib/libc/include/generic-glibc/arpa/inet.h b/lib/libc/include/generic-glibc/arpa/inet.h
index 4a6afd6da9..16227d6ce9 100644
--- a/lib/libc/include/generic-glibc/arpa/inet.h
+++ b/lib/libc/include/generic-glibc/arpa/inet.h
@@ -74,7 +74,8 @@ extern int inet_aton (const char *__cp, struct in_addr *__inp) __THROW;
/* Format a network number NET into presentation format and place result
in buffer starting at BUF with length of LEN bytes. */
-extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __THROW;
+extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __THROW
+ __attribute_deprecated_msg__ ("Use inet_ntop instead");
/* Convert network number for interface type AF in buffer starting at
CP to presentation format. The result will specifiy BITS bits of
diff --git a/lib/libc/include/generic-glibc/arpa/nameser.h b/lib/libc/include/generic-glibc/arpa/nameser.h
index 0e049d3f6a..30fe567c2e 100644
--- a/lib/libc/include/generic-glibc/arpa/nameser.h
+++ b/lib/libc/include/generic-glibc/arpa/nameser.h
@@ -52,6 +52,12 @@
#include <sys/types.h>
#include <stdint.h>
+#ifdef _LIBC
+# define __NAMESER_DEPRECATED
+#else
+# define __NAMESER_DEPRECATED __attribute_deprecated__
+#endif
+
/*
* Define constants based on RFC 883, RFC 1034, RFC 1035
*/
@@ -401,14 +407,18 @@ int ns_skiprr (const unsigned char *, const unsigned char *,
int ns_parserr (ns_msg *, ns_sect, int, ns_rr *) __THROW;
int ns_sprintrr (const ns_msg *, const ns_rr *,
const char *, const char *, char *, size_t)
- __THROW;
+ __THROW __NAMESER_DEPRECATED;
int ns_sprintrrf (const unsigned char *, size_t, const char *,
ns_class, ns_type, unsigned long,
const unsigned char *, size_t, const char *,
- const char *, char *, size_t) __THROW;
-int ns_format_ttl (unsigned long, char *, size_t) __THROW;
-int ns_parse_ttl (const char *, unsigned long *) __THROW;
-uint32_t ns_datetosecs (const char *, int *) __THROW;
+ const char *, char *, size_t)
+ __THROW __NAMESER_DEPRECATED;
+int ns_format_ttl (unsigned long, char *, size_t)
+ __THROW __NAMESER_DEPRECATED;
+int ns_parse_ttl (const char *, unsigned long *)
+ __THROW __NAMESER_DEPRECATED;
+uint32_t ns_datetosecs (const char *, int *)
+ __THROW __NAMESER_DEPRECATED;
int ns_name_ntol (const unsigned char *, unsigned char *, size_t)
__THROW;
int ns_name_ntop (const unsigned char *, char *, size_t) __THROW;
@@ -431,10 +441,15 @@ int ns_name_skip (const unsigned char **, const unsigned char *)
void ns_name_rollback (const unsigned char *,
const unsigned char **,
const unsigned char **) __THROW;
-int ns_samedomain (const char *, const char *) __THROW;
-int ns_subdomain (const char *, const char *) __THROW;
-int ns_makecanon (const char *, char *, size_t) __THROW;
-int ns_samename (const char *, const char *) __THROW;
+
+int ns_samedomain (const char *, const char *) __THROW
+ __NAMESER_DEPRECATED;
+int ns_subdomain (const char *, const char *) __THROW
+ __NAMESER_DEPRECATED;
+int ns_makecanon (const char *, char *, size_t) __THROW
+ __NAMESER_DEPRECATED;
+int ns_samename (const char *, const char *) __THROW
+ __NAMESER_DEPRECATED;
__END_DECLS
#include <arpa/nameser_compat.h>
diff --git a/lib/libc/include/generic-glibc/bits/confname.h b/lib/libc/include/generic-glibc/bits/confname.h
index b6bcdd460d..a364471509 100644
--- a/lib/libc/include/generic-glibc/bits/confname.h
+++ b/lib/libc/include/generic-glibc/bits/confname.h
@@ -525,8 +525,14 @@ enum
_SC_THREAD_ROBUST_PRIO_INHERIT,
#define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT
- _SC_THREAD_ROBUST_PRIO_PROTECT
+ _SC_THREAD_ROBUST_PRIO_PROTECT,
#define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT
+
+ _SC_MINSIGSTKSZ,
+#define _SC_MINSIGSTKSZ _SC_MINSIGSTKSZ
+
+ _SC_SIGSTKSZ
+#define _SC_SIGSTKSZ _SC_SIGSTKSZ
};
/* Values for the NAME argument to `confstr'. */
diff --git a/lib/libc/include/generic-glibc/bits/floatn.h b/lib/libc/include/generic-glibc/bits/floatn.h
index 18018fa9f8..c05a5e55e0 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.
+/* Macros to control TS 18661-3 glibc features on MIPS platforms.
Copyright (C) 2017-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -16,10 +16,24 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#ifndef _BITS_FLOATN_H
+#define _BITS_FLOATN_H
+
+#include <features.h>
+#include <bits/long-double.h>
+
/* Defined to 1 if the current compiler invocation provides a
- floating-point type with the IEEE 754 binary128 format, and this glibc
- includes corresponding *f128 interfaces for it. */
-#define __HAVE_FLOAT128 0
+ 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. */
@@ -28,25 +42,56 @@
/* 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 0
+#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 0
+#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.
- E.g.: #define __f128(x) x##f128. */
-# undef __f128
+ 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
-/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
- E.g.: #define __CFLOAT128 _Complex _Float128. */
-# undef __CFLOAT128
+/* The type _Float128 exists only since GCC 7.0. */
+# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+typedef long double _Float128;
+# endif
+
+/* Various built-in functions do not exist before GCC 7.0. */
+# if !__GNUC_PREREQ (7, 0)
+# define __builtin_huge_valf128() (__builtin_huge_vall ())
+# define __builtin_inff128() (__builtin_infl ())
+# define __builtin_nanf128(x) (__builtin_nanl (x))
+# define __builtin_nansf128(x) (__builtin_nansl (x))
+# endif
+
+# endif
#endif /* !__ASSEMBLER__. */
-#include <bits/floatn-common.h> \ No newline at end of file
+#include <bits/floatn-common.h>
+
+#endif /* _BITS_FLOATN_H */ \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/libc-header-start.h b/lib/libc/include/generic-glibc/bits/libc-header-start.h
index 402725f4b2..3bb5101e05 100644
--- a/lib/libc/include/generic-glibc/bits/libc-header-start.h
+++ b/lib/libc/include/generic-glibc/bits/libc-header-start.h
@@ -44,8 +44,26 @@
/* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
macro. Most but not all symbols enabled by that macro in TS
- 18661-1 are enabled unconditionally in C2X; the symbols in Annex F
- still require that macro in C2X. */
+ 18661-1 are enabled unconditionally in C2X. In C2X, the symbols in
+ Annex F still require a new feature test macro
+ __STDC_WANT_IEC_60559_EXT__ instead (C2X does not define
+ __STDC_WANT_IEC_60559_BFP_EXT__), while a few features from TS
+ 18661-1 are not included in C2X (and thus should depend on
+ __STDC_WANT_IEC_60559_BFP_EXT__ even when C2X features are
+ enabled).
+
+ __GLIBC_USE (IEC_60559_BFP_EXT) controls those features from TS
+ 18661-1 not included in C2X.
+
+ __GLIBC_USE (IEC_60559_BFP_EXT_C2X) controls those features from TS
+ 18661-1 that are also included in C2X (with no feature test macro
+ required in C2X).
+
+ __GLIBC_USE (IEC_60559_EXT) controls those features from TS 18661-1
+ that are included in C2X but conditional on
+ __STDC_WANT_IEC_60559_EXT__. (There are currently no features
+ conditional on __STDC_WANT_IEC_60559_EXT__ that are not in TS
+ 18661-1.) */
#undef __GLIBC_USE_IEC_60559_BFP_EXT
#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_BFP_EXT__
# define __GLIBC_USE_IEC_60559_BFP_EXT 1
@@ -58,6 +76,12 @@
#else
# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0
#endif
+#undef __GLIBC_USE_IEC_60559_EXT
+#if __GLIBC_USE (IEC_60559_BFP_EXT) || defined __STDC_WANT_IEC_60559_EXT__
+# define __GLIBC_USE_IEC_60559_EXT 1
+#else
+# define __GLIBC_USE_IEC_60559_EXT 0
+#endif
/* ISO/IEC TS 18661-4:2015 defines the
__STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction
diff --git a/lib/libc/include/generic-glibc/bits/local_lim.h b/lib/libc/include/generic-glibc/bits/local_lim.h
index af2e6b3471..0dccd480b1 100644
--- a/lib/libc/include/generic-glibc/bits/local_lim.h
+++ b/lib/libc/include/generic-glibc/bits/local_lim.h
@@ -77,8 +77,8 @@
priority level. */
#define AIO_PRIO_DELTA_MAX 20
-/* Minimum size for a thread. We are free to choose a reasonable value. */
-#define PTHREAD_STACK_MIN 16384
+/* Arrange for the definition of PTHREAD_STACK_MIN. */
+#include <bits/pthread_stack_min-dynamic.h>
/* Maximum number of timer expiration overruns. */
#define DELAYTIMER_MAX 2147483647
diff --git a/lib/libc/include/generic-glibc/bits/mathcalls.h b/lib/libc/include/generic-glibc/bits/mathcalls.h
index 61796cb512..526f3f3e53 100644
--- a/lib/libc/include/generic-glibc/bits/mathcalls.h
+++ b/lib/libc/include/generic-glibc/bits/mathcalls.h
@@ -364,17 +364,21 @@ __MATHDECL (__intmax_t, fromfpx,, (_Mdouble_ __x, int __round,
__MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round,
unsigned int __width));
+/* Canonicalize floating-point representation. */
+__MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x));
+#endif
+
+#if (__GLIBC_USE (IEC_60559_BFP_EXT) \
+ || (__MATH_DECLARING_FLOATN \
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC2X))))
/* Return value with maximum magnitude. */
__MATHCALLX (fmaxmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
/* Return value with minimum magnitude. */
__MATHCALLX (fminmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
-
-/* Canonicalize floating-point representation. */
-__MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x));
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT) || __MATH_DECLARING_FLOATN
+#if __GLIBC_USE (IEC_60559_EXT) || __MATH_DECLARING_FLOATN
/* Total order operation. */
__MATHDECL_1 (int, totalorder,, (const _Mdouble_ *__x,
const _Mdouble_ *__y))
diff --git a/lib/libc/include/generic-glibc/bits/msq.h b/lib/libc/include/generic-glibc/bits/msq.h
index f770dba088..ec07f9f195 100644
--- a/lib/libc/include/generic-glibc/bits/msq.h
+++ b/lib/libc/include/generic-glibc/bits/msq.h
@@ -26,6 +26,7 @@ typedef __syscall_ulong_t msgqnum_t;
typedef __syscall_ulong_t msglen_t;
#include <bits/types/struct_msqid_ds.h>
+#include <bits/types/struct_msqid64_ds.h>
/* Define options for message queue functions. */
#define MSG_NOERROR 010000 /* no error if message is too big */
diff --git a/lib/libc/include/generic-glibc/bits/platform/x86.h b/lib/libc/include/generic-glibc/bits/platform/x86.h
new file mode 100644
index 0000000000..214f2a93a8
--- /dev/null
+++ b/lib/libc/include/generic-glibc/bits/platform/x86.h
@@ -0,0 +1,311 @@
+/* Constants and data structures for x86 CPU features.
+ This file is part of the GNU C Library.
+ Copyright (C) 2008-2020 Free Software Foundation, Inc.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_PLATFORM_X86_H
+# error "Never include <bits/platform/x86.h> directly; use <sys/platform/x86.h> instead."
+#endif
+
+enum
+{
+ CPUID_INDEX_1 = 0,
+ CPUID_INDEX_7,
+ CPUID_INDEX_80000001,
+ CPUID_INDEX_D_ECX_1,
+ CPUID_INDEX_80000007,
+ CPUID_INDEX_80000008,
+ CPUID_INDEX_7_ECX_1,
+ CPUID_INDEX_19,
+ CPUID_INDEX_14_ECX_0
+};
+
+struct cpuid_feature
+{
+ unsigned int cpuid_array[4];
+ unsigned int active_array[4];
+};
+
+enum cpuid_register_index
+{
+ cpuid_register_index_eax = 0,
+ cpuid_register_index_ebx,
+ cpuid_register_index_ecx,
+ cpuid_register_index_edx
+};
+
+/* CPU features. */
+
+enum
+{
+ x86_cpu_index_1_ecx
+ = (CPUID_INDEX_1 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_ecx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_SSE3 = x86_cpu_index_1_ecx,
+ x86_cpu_PCLMULQDQ = x86_cpu_index_1_ecx + 1,
+ x86_cpu_DTES64 = x86_cpu_index_1_ecx + 2,
+ x86_cpu_MONITOR = x86_cpu_index_1_ecx + 3,
+ x86_cpu_DS_CPL = x86_cpu_index_1_ecx + 4,
+ x86_cpu_VMX = x86_cpu_index_1_ecx + 5,
+ x86_cpu_SMX = x86_cpu_index_1_ecx + 6,
+ x86_cpu_EIST = x86_cpu_index_1_ecx + 7,
+ x86_cpu_TM2 = x86_cpu_index_1_ecx + 8,
+ x86_cpu_SSSE3 = x86_cpu_index_1_ecx + 9,
+ x86_cpu_CNXT_ID = x86_cpu_index_1_ecx + 10,
+ x86_cpu_SDBG = x86_cpu_index_1_ecx + 11,
+ x86_cpu_FMA = x86_cpu_index_1_ecx + 12,
+ x86_cpu_CMPXCHG16B = x86_cpu_index_1_ecx + 13,
+ x86_cpu_XTPRUPDCTRL = x86_cpu_index_1_ecx + 14,
+ x86_cpu_PDCM = x86_cpu_index_1_ecx + 15,
+ x86_cpu_INDEX_1_ECX_16 = x86_cpu_index_1_ecx + 16,
+ x86_cpu_PCID = x86_cpu_index_1_ecx + 17,
+ x86_cpu_DCA = x86_cpu_index_1_ecx + 18,
+ x86_cpu_SSE4_1 = x86_cpu_index_1_ecx + 19,
+ x86_cpu_SSE4_2 = x86_cpu_index_1_ecx + 20,
+ x86_cpu_X2APIC = x86_cpu_index_1_ecx + 21,
+ x86_cpu_MOVBE = x86_cpu_index_1_ecx + 22,
+ x86_cpu_POPCNT = x86_cpu_index_1_ecx + 23,
+ x86_cpu_TSC_DEADLINE = x86_cpu_index_1_ecx + 24,
+ x86_cpu_AES = x86_cpu_index_1_ecx + 25,
+ x86_cpu_XSAVE = x86_cpu_index_1_ecx + 26,
+ x86_cpu_OSXSAVE = x86_cpu_index_1_ecx + 27,
+ x86_cpu_AVX = x86_cpu_index_1_ecx + 28,
+ x86_cpu_F16C = x86_cpu_index_1_ecx + 29,
+ x86_cpu_RDRAND = x86_cpu_index_1_ecx + 30,
+ x86_cpu_INDEX_1_ECX_31 = x86_cpu_index_1_ecx + 31,
+
+ x86_cpu_index_1_edx
+ = (CPUID_INDEX_1 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_edx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_FPU = x86_cpu_index_1_edx,
+ x86_cpu_VME = x86_cpu_index_1_edx + 1,
+ x86_cpu_DE = x86_cpu_index_1_edx + 2,
+ x86_cpu_PSE = x86_cpu_index_1_edx + 3,
+ x86_cpu_TSC = x86_cpu_index_1_edx + 4,
+ x86_cpu_MSR = x86_cpu_index_1_edx + 5,
+ x86_cpu_PAE = x86_cpu_index_1_edx + 6,
+ x86_cpu_MCE = x86_cpu_index_1_edx + 7,
+ x86_cpu_CX8 = x86_cpu_index_1_edx + 8,
+ x86_cpu_APIC = x86_cpu_index_1_edx + 9,
+ x86_cpu_INDEX_1_EDX_10 = x86_cpu_index_1_edx + 10,
+ x86_cpu_SEP = x86_cpu_index_1_edx + 11,
+ x86_cpu_MTRR = x86_cpu_index_1_edx + 12,
+ x86_cpu_PGE = x86_cpu_index_1_edx + 13,
+ x86_cpu_MCA = x86_cpu_index_1_edx + 14,
+ x86_cpu_CMOV = x86_cpu_index_1_edx + 15,
+ x86_cpu_PAT = x86_cpu_index_1_edx + 16,
+ x86_cpu_PSE_36 = x86_cpu_index_1_edx + 17,
+ x86_cpu_PSN = x86_cpu_index_1_edx + 18,
+ x86_cpu_CLFSH = x86_cpu_index_1_edx + 19,
+ x86_cpu_INDEX_1_EDX_20 = x86_cpu_index_1_edx + 20,
+ x86_cpu_DS = x86_cpu_index_1_edx + 21,
+ x86_cpu_ACPI = x86_cpu_index_1_edx + 22,
+ x86_cpu_MMX = x86_cpu_index_1_edx + 23,
+ x86_cpu_FXSR = x86_cpu_index_1_edx + 24,
+ x86_cpu_SSE = x86_cpu_index_1_edx + 25,
+ x86_cpu_SSE2 = x86_cpu_index_1_edx + 26,
+ x86_cpu_SS = x86_cpu_index_1_edx + 27,
+ x86_cpu_HTT = x86_cpu_index_1_edx + 28,
+ x86_cpu_TM = x86_cpu_index_1_edx + 29,
+ x86_cpu_INDEX_1_EDX_30 = x86_cpu_index_1_edx + 30,
+ x86_cpu_PBE = x86_cpu_index_1_edx + 31,
+
+ x86_cpu_index_7_ebx
+ = (CPUID_INDEX_7 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_ebx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_FSGSBASE = x86_cpu_index_7_ebx,
+ x86_cpu_TSC_ADJUST = x86_cpu_index_7_ebx + 1,
+ x86_cpu_SGX = x86_cpu_index_7_ebx + 2,
+ x86_cpu_BMI1 = x86_cpu_index_7_ebx + 3,
+ x86_cpu_HLE = x86_cpu_index_7_ebx + 4,
+ x86_cpu_AVX2 = x86_cpu_index_7_ebx + 5,
+ x86_cpu_INDEX_7_EBX_6 = x86_cpu_index_7_ebx + 6,
+ x86_cpu_SMEP = x86_cpu_index_7_ebx + 7,
+ x86_cpu_BMI2 = x86_cpu_index_7_ebx + 8,
+ x86_cpu_ERMS = x86_cpu_index_7_ebx + 9,
+ x86_cpu_INVPCID = x86_cpu_index_7_ebx + 10,
+ x86_cpu_RTM = x86_cpu_index_7_ebx + 11,
+ x86_cpu_RDT_M = x86_cpu_index_7_ebx + 12,
+ x86_cpu_DEPR_FPU_CS_DS = x86_cpu_index_7_ebx + 13,
+ x86_cpu_MPX = x86_cpu_index_7_ebx + 14,
+ x86_cpu_RDT_A = x86_cpu_index_7_ebx + 15,
+ x86_cpu_AVX512F = x86_cpu_index_7_ebx + 16,
+ x86_cpu_AVX512DQ = x86_cpu_index_7_ebx + 17,
+ x86_cpu_RDSEED = x86_cpu_index_7_ebx + 18,
+ x86_cpu_ADX = x86_cpu_index_7_ebx + 19,
+ x86_cpu_SMAP = x86_cpu_index_7_ebx + 20,
+ x86_cpu_AVX512_IFMA = x86_cpu_index_7_ebx + 21,
+ x86_cpu_INDEX_7_EBX_22 = x86_cpu_index_7_ebx + 22,
+ x86_cpu_CLFLUSHOPT = x86_cpu_index_7_ebx + 23,
+ x86_cpu_CLWB = x86_cpu_index_7_ebx + 24,
+ x86_cpu_TRACE = x86_cpu_index_7_ebx + 25,
+ x86_cpu_AVX512PF = x86_cpu_index_7_ebx + 26,
+ x86_cpu_AVX512ER = x86_cpu_index_7_ebx + 27,
+ x86_cpu_AVX512CD = x86_cpu_index_7_ebx + 28,
+ x86_cpu_SHA = x86_cpu_index_7_ebx + 29,
+ x86_cpu_AVX512BW = x86_cpu_index_7_ebx + 30,
+ x86_cpu_AVX512VL = x86_cpu_index_7_ebx + 31,
+
+ x86_cpu_index_7_ecx
+ = (CPUID_INDEX_7 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_ecx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_PREFETCHWT1 = x86_cpu_index_7_ecx,
+ x86_cpu_AVX512_VBMI = x86_cpu_index_7_ecx + 1,
+ x86_cpu_UMIP = x86_cpu_index_7_ecx + 2,
+ x86_cpu_PKU = x86_cpu_index_7_ecx + 3,
+ x86_cpu_OSPKE = x86_cpu_index_7_ecx + 4,
+ x86_cpu_WAITPKG = x86_cpu_index_7_ecx + 5,
+ x86_cpu_AVX512_VBMI2 = x86_cpu_index_7_ecx + 6,
+ x86_cpu_SHSTK = x86_cpu_index_7_ecx + 7,
+ x86_cpu_GFNI = x86_cpu_index_7_ecx + 8,
+ x86_cpu_VAES = x86_cpu_index_7_ecx + 9,
+ x86_cpu_VPCLMULQDQ = x86_cpu_index_7_ecx + 10,
+ x86_cpu_AVX512_VNNI = x86_cpu_index_7_ecx + 11,
+ x86_cpu_AVX512_BITALG = x86_cpu_index_7_ecx + 12,
+ x86_cpu_INDEX_7_ECX_13 = x86_cpu_index_7_ecx + 13,
+ x86_cpu_AVX512_VPOPCNTDQ = x86_cpu_index_7_ecx + 14,
+ x86_cpu_INDEX_7_ECX_1 = x86_cpu_index_7_ecx + 15,
+ x86_cpu_INDEX_7_ECX_16 = x86_cpu_index_7_ecx + 16,
+/* Note: Bits 17-21: The value of MAWAU used by the BNDLDX and BNDSTX
+ instructions in 64-bit mode. */
+ x86_cpu_RDPID = x86_cpu_index_7_ecx + 22,
+ x86_cpu_KL = x86_cpu_index_7_ecx + 23,
+ x86_cpu_INDEX_7_ECX_24 = x86_cpu_index_7_ecx + 24,
+ x86_cpu_CLDEMOTE = x86_cpu_index_7_ecx + 25,
+ x86_cpu_INDEX_7_ECX_26 = x86_cpu_index_7_ecx + 26,
+ x86_cpu_MOVDIRI = x86_cpu_index_7_ecx + 27,
+ x86_cpu_MOVDIR64B = x86_cpu_index_7_ecx + 28,
+ x86_cpu_ENQCMD = x86_cpu_index_7_ecx + 29,
+ x86_cpu_SGX_LC = x86_cpu_index_7_ecx + 30,
+ x86_cpu_PKS = x86_cpu_index_7_ecx + 31,
+
+ x86_cpu_index_7_edx
+ = (CPUID_INDEX_7 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_edx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_INDEX_7_EDX_0 = x86_cpu_index_7_edx,
+ x86_cpu_INDEX_7_EDX_1 = x86_cpu_index_7_edx + 1,
+ x86_cpu_AVX512_4VNNIW = x86_cpu_index_7_edx + 2,
+ x86_cpu_AVX512_4FMAPS = x86_cpu_index_7_edx + 3,
+ x86_cpu_FSRM = x86_cpu_index_7_edx + 4,
+ x86_cpu_UINTR = x86_cpu_index_7_edx + 5,
+ x86_cpu_INDEX_7_EDX_6 = x86_cpu_index_7_edx + 6,
+ x86_cpu_INDEX_7_EDX_7 = x86_cpu_index_7_edx + 7,
+ x86_cpu_AVX512_VP2INTERSECT = x86_cpu_index_7_edx + 8,
+ x86_cpu_INDEX_7_EDX_9 = x86_cpu_index_7_edx + 9,
+ x86_cpu_MD_CLEAR = x86_cpu_index_7_edx + 10,
+ x86_cpu_RTM_ALWAYS_ABORT = x86_cpu_index_7_edx + 11,
+ x86_cpu_INDEX_7_EDX_12 = x86_cpu_index_7_edx + 12,
+ x86_cpu_INDEX_7_EDX_13 = x86_cpu_index_7_edx + 13,
+ x86_cpu_SERIALIZE = x86_cpu_index_7_edx + 14,
+ x86_cpu_HYBRID = x86_cpu_index_7_edx + 15,
+ x86_cpu_TSXLDTRK = x86_cpu_index_7_edx + 16,
+ x86_cpu_INDEX_7_EDX_17 = x86_cpu_index_7_edx + 17,
+ x86_cpu_PCONFIG = x86_cpu_index_7_edx + 18,
+ x86_cpu_INDEX_7_EDX_19 = x86_cpu_index_7_edx + 19,
+ x86_cpu_IBT = x86_cpu_index_7_edx + 20,
+ x86_cpu_INDEX_7_EDX_21 = x86_cpu_index_7_edx + 21,
+ x86_cpu_AMX_BF16 = x86_cpu_index_7_edx + 22,
+ x86_cpu_AVX512_FP16 = x86_cpu_index_7_edx + 23,
+ x86_cpu_AMX_TILE = x86_cpu_index_7_edx + 24,
+ x86_cpu_AMX_INT8 = x86_cpu_index_7_edx + 25,
+ x86_cpu_IBRS_IBPB = x86_cpu_index_7_edx + 26,
+ x86_cpu_STIBP = x86_cpu_index_7_edx + 27,
+ x86_cpu_L1D_FLUSH = x86_cpu_index_7_edx + 28,
+ x86_cpu_ARCH_CAPABILITIES = x86_cpu_index_7_edx + 29,
+ x86_cpu_CORE_CAPABILITIES = x86_cpu_index_7_edx + 30,
+ x86_cpu_SSBD = x86_cpu_index_7_edx + 31,
+
+ x86_cpu_index_80000001_ecx
+ = (CPUID_INDEX_80000001 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_ecx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_LAHF64_SAHF64 = x86_cpu_index_80000001_ecx,
+ x86_cpu_SVM = x86_cpu_index_80000001_ecx + 2,
+ x86_cpu_LZCNT = x86_cpu_index_80000001_ecx + 5,
+ x86_cpu_SSE4A = x86_cpu_index_80000001_ecx + 6,
+ x86_cpu_PREFETCHW = x86_cpu_index_80000001_ecx + 8,
+ x86_cpu_XOP = x86_cpu_index_80000001_ecx + 11,
+ x86_cpu_LWP = x86_cpu_index_80000001_ecx + 15,
+ x86_cpu_FMA4 = x86_cpu_index_80000001_ecx + 16,
+ x86_cpu_TBM = x86_cpu_index_80000001_ecx + 21,
+
+ x86_cpu_index_80000001_edx
+ = (CPUID_INDEX_80000001 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_edx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_SYSCALL_SYSRET = x86_cpu_index_80000001_edx + 11,
+ x86_cpu_NX = x86_cpu_index_80000001_edx + 20,
+ x86_cpu_PAGE1GB = x86_cpu_index_80000001_edx + 26,
+ x86_cpu_RDTSCP = x86_cpu_index_80000001_edx + 27,
+ x86_cpu_LM = x86_cpu_index_80000001_edx + 29,
+
+ x86_cpu_index_d_ecx_1_eax
+ = (CPUID_INDEX_D_ECX_1 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_eax * 8 * sizeof (unsigned int)),
+
+ x86_cpu_XSAVEOPT = x86_cpu_index_d_ecx_1_eax,
+ x86_cpu_XSAVEC = x86_cpu_index_d_ecx_1_eax + 1,
+ x86_cpu_XGETBV_ECX_1 = x86_cpu_index_d_ecx_1_eax + 2,
+ x86_cpu_XSAVES = x86_cpu_index_d_ecx_1_eax + 3,
+ x86_cpu_XFD = x86_cpu_index_d_ecx_1_eax + 4,
+
+ x86_cpu_index_80000007_edx
+ = (CPUID_INDEX_80000007 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_edx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_INVARIANT_TSC = x86_cpu_index_80000007_edx + 8,
+
+ x86_cpu_index_80000008_ebx
+ = (CPUID_INDEX_80000008 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_ebx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_WBNOINVD = x86_cpu_index_80000008_ebx + 9,
+ x86_cpu_AMD_IBPB = x86_cpu_index_80000008_ebx + 12,
+ x86_cpu_AMD_IBRS = x86_cpu_index_80000008_ebx + 14,
+ x86_cpu_AMD_STIBP = x86_cpu_index_80000008_ebx + 15,
+ x86_cpu_AMD_SSBD = x86_cpu_index_80000008_ebx + 24,
+ x86_cpu_AMD_VIRT_SSBD = x86_cpu_index_80000008_ebx + 25,
+
+ x86_cpu_index_7_ecx_1_eax
+ = (CPUID_INDEX_7_ECX_1 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_eax * 8 * sizeof (unsigned int)),
+
+ x86_cpu_AVX_VNNI = x86_cpu_index_7_ecx_1_eax + 4,
+ x86_cpu_AVX512_BF16 = x86_cpu_index_7_ecx_1_eax + 5,
+ x86_cpu_FZLRM = x86_cpu_index_7_ecx_1_eax + 10,
+ x86_cpu_FSRS = x86_cpu_index_7_ecx_1_eax + 11,
+ x86_cpu_FSRCS = x86_cpu_index_7_ecx_1_eax + 12,
+ x86_cpu_HRESET = x86_cpu_index_7_ecx_1_eax + 22,
+ x86_cpu_LAM = x86_cpu_index_7_ecx_1_eax + 26,
+
+ x86_cpu_index_19_ebx
+ = (CPUID_INDEX_19 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_ebx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_AESKLE = x86_cpu_index_19_ebx,
+ x86_cpu_WIDE_KL = x86_cpu_index_19_ebx + 2,
+
+ x86_cpu_index_14_ecx_0_ebx
+ = (CPUID_INDEX_14_ECX_0 * 8 * 4 * sizeof (unsigned int)
+ + cpuid_register_index_ebx * 8 * sizeof (unsigned int)),
+
+ x86_cpu_PTWRITE = x86_cpu_index_14_ecx_0_ebx + 4
+}; \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/poll2.h b/lib/libc/include/generic-glibc/bits/poll2.h
index b7b5ca466c..10bcf5b7f1 100644
--- a/lib/libc/include/generic-glibc/bits/poll2.h
+++ b/lib/libc/include/generic-glibc/bits/poll2.h
@@ -26,13 +26,14 @@ __BEGIN_DECLS
extern int __REDIRECT (__poll_alias, (struct pollfd *__fds, nfds_t __nfds,
int __timeout), poll);
extern int __poll_chk (struct pollfd *__fds, nfds_t __nfds, int __timeout,
- __SIZE_TYPE__ __fdslen);
+ __SIZE_TYPE__ __fdslen)
+ __attr_access ((__write_only__, 1, 2));
extern int __REDIRECT (__poll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
int __timeout, __SIZE_TYPE__ __fdslen),
__poll_chk)
__warnattr ("poll called with fds buffer too small file nfds entries");
-__fortify_function int
+__fortify_function __attr_access ((__write_only__, 1, 2)) int
poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
{
if (__glibc_objsize (__fds) != (__SIZE_TYPE__) -1)
@@ -54,7 +55,8 @@ extern int __REDIRECT (__ppoll_alias, (struct pollfd *__fds, nfds_t __nfds,
const __sigset_t *__ss), ppoll);
extern int __ppoll_chk (struct pollfd *__fds, nfds_t __nfds,
const struct timespec *__timeout,
- const __sigset_t *__ss, __SIZE_TYPE__ __fdslen);
+ const __sigset_t *__ss, __SIZE_TYPE__ __fdslen)
+ __attr_access ((__write_only__, 1, 2));
extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
const struct timespec *__timeout,
const __sigset_t *__ss,
@@ -62,7 +64,7 @@ extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
__ppoll_chk)
__warnattr ("ppoll called with fds buffer too small file nfds entries");
-__fortify_function int
+__fortify_function __attr_access ((__write_only__, 1, 2)) int
ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,
const __sigset_t *__ss)
{
diff --git a/lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h b/lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h
new file mode 100644
index 0000000000..a01a2eb280
--- /dev/null
+++ b/lib/libc/include/generic-glibc/bits/pthread_stack_min-dynamic.h
@@ -0,0 +1,31 @@
+/* Definition of PTHREAD_STACK_MIN, possibly dynamic.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef PTHREAD_STACK_MIN
+# if defined __USE_DYNAMIC_STACK_SIZE && __USE_DYNAMIC_STACK_SIZE
+# ifndef __ASSEMBLER__
+# define __SC_THREAD_STACK_MIN_VALUE 75
+__BEGIN_DECLS
+extern long int __sysconf (int __name) __THROW;
+__END_DECLS
+# define PTHREAD_STACK_MIN __sysconf (__SC_THREAD_STACK_MIN_VALUE)
+# endif
+# else
+# include <bits/pthread_stack_min.h>
+# endif
+#endif \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/pthread_stack_min.h b/lib/libc/include/generic-glibc/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..af78521be7
--- /dev/null
+++ b/lib/libc/include/generic-glibc/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. Linux version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. We are free to choose a reasonable value. */
+#define PTHREAD_STACK_MIN 16384 \ 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 9189fceda4..efab0d3b07 100644
--- a/lib/libc/include/generic-glibc/bits/sem.h
+++ b/lib/libc/include/generic-glibc/bits/sem.h
@@ -22,6 +22,7 @@
#include <sys/types.h>
#include <bits/timesize.h>
#include <bits/types/struct_semid_ds.h>
+#include <bits/types/struct_semid64_ds.h>
/* Flags for `semop'. */
#define SEM_UNDO 0x1000 /* undo the operation on exit */
diff --git a/lib/libc/include/generic-glibc/bits/shm.h b/lib/libc/include/generic-glibc/bits/shm.h
index 56d36a3d66..28b171ed98 100644
--- a/lib/libc/include/generic-glibc/bits/shm.h
+++ b/lib/libc/include/generic-glibc/bits/shm.h
@@ -43,6 +43,7 @@ __BEGIN_DECLS
typedef __syscall_ulong_t shmatt_t;
#include <bits/types/struct_shmid_ds.h>
+#include <bits/types/struct_shmid64_ds.h>
#ifdef __USE_MISC
diff --git a/lib/libc/include/generic-glibc/bits/sigstksz.h b/lib/libc/include/generic-glibc/bits/sigstksz.h
new file mode 100644
index 0000000000..b9cda80f3e
--- /dev/null
+++ b/lib/libc/include/generic-glibc/bits/sigstksz.h
@@ -0,0 +1,33 @@
+/* Definition of MINSIGSTKSZ and SIGSTKSZ. Linux version.
+ Copyright (C) 2020 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigstksz.h> directly; use <signal.h> instead."
+#endif
+
+#if defined __USE_DYNAMIC_STACK_SIZE && __USE_DYNAMIC_STACK_SIZE
+# include <unistd.h>
+
+/* Default stack size for a signal handler: sysconf (SC_SIGSTKSZ). */
+# undef SIGSTKSZ
+# define SIGSTKSZ sysconf (_SC_SIGSTKSZ)
+
+/* Minimum stack size for a signal handler: SIGSTKSZ. */
+# undef MINSIGSTKSZ
+# define MINSIGSTKSZ SIGSTKSZ
+#endif \ 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 1f67ca36fb..f82406abd8 100644
--- a/lib/libc/include/generic-glibc/bits/socket-constants.h
+++ b/lib/libc/include/generic-glibc/bits/socket-constants.h
@@ -32,19 +32,50 @@
#define SO_OOBINLINE 10
#define SO_RCVBUF 8
#define SO_RCVLOWAT 18
-#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_TYPE 3
+
#if (__TIMESIZE == 64 && __WORDSIZE == 32 \
&& (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32))
+# define SO_RCVTIMEO 66
# define SO_SNDTIMEO 67
+# define SO_TIMESTAMP 63
+# define SO_TIMESTAMPNS 64
+# define SO_TIMESTAMPING 65
#else
-# define SO_SNDTIMEO 21
-#endif
-#define SO_TYPE 3 \ No newline at end of file
+# if __TIMESIZE == 64
+# define SO_RCVTIMEO 20
+# define SO_SNDTIMEO 21
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+# else
+# define SO_RCVTIMEO_OLD 20
+# define SO_SNDTIMEO_OLD 21
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+# endif
+#endif \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/struct_rwlock.h b/lib/libc/include/generic-glibc/bits/struct_rwlock.h
index 7431c5597f..6355f539b9 100644
--- a/lib/libc/include/generic-glibc/bits/struct_rwlock.h
+++ b/lib/libc/include/generic-glibc/bits/struct_rwlock.h
@@ -1,4 +1,4 @@
-/* Default read-write lock implementation struct definitions.
+/* MIPS internal rwlock struct definitions.
Copyright (C) 2019-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -16,15 +16,8 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifndef __RWLOCK_INTERNAL_H
-#define __RWLOCK_INTERNAL_H
-
-#include <bits/endian.h>
-
-/* Generic struct for both POSIX read-write lock. New ports are expected
- to use the default layout, however archictetures can redefine it to add
- arch-specific extensions (such as lock-elision). The struct have a size
- of 32 bytes on both LP32 and LP64 architectures. */
+#ifndef _RWLOCK_INTERNAL_H
+#define _RWLOCK_INTERNAL_H
struct __pthread_rwlock_arch_t
{
@@ -34,28 +27,45 @@ struct __pthread_rwlock_arch_t
unsigned int __writers_futex;
unsigned int __pad3;
unsigned int __pad4;
- /* FLAGS must stay at its position in the structure to maintain
+#if _MIPS_SIM == _ABI64
+ int __cur_writer;
+ int __shared;
+ unsigned long int __pad1;
+ unsigned long int __pad2;
+ /* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
-#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int __flags;
+# else
+# if __BYTE_ORDER == __BIG_ENDIAN
unsigned char __pad1;
unsigned char __pad2;
unsigned char __shared;
+ /* FLAGS must stay at this position in the structure to maintain
+ binary compatibility. */
unsigned char __flags;
-#else
+# else
+ /* FLAGS must stay at this position in the structure to maintain
+ binary compatibility. */
unsigned char __flags;
unsigned char __shared;
unsigned char __pad1;
unsigned char __pad2;
-#endif
+# endif
int __cur_writer;
+#endif
};
-#if __BYTE_ORDER == __BIG_ENDIAN
+#if _MIPS_SIM == _ABI64
# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
- 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
#else
-# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
+# if __BYTE_ORDER == __BIG_ENDIAN
+# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
+# else
+# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
+# endif
#endif
#endif \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/struct_stat.h b/lib/libc/include/generic-glibc/bits/struct_stat.h
index 29d304519a..49c901ce9a 100644
--- a/lib/libc/include/generic-glibc/bits/struct_stat.h
+++ b/lib/libc/include/generic-glibc/bits/struct_stat.h
@@ -29,28 +29,31 @@
/* Structure describing file characteristics. */
struct stat
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
unsigned long int st_dev;
long int st_pad1[3];
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino64_t st_ino; /* File serial number. */
-#endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
unsigned long int st_rdev; /* Device number, if device. */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
long int st_pad2[2];
__off_t st_size; /* Size of file, in bytes. */
/* SVR4 added this extra long to allow for expansion of off_t. */
long int st_pad3;
-#else
+# else
long int st_pad2[3];
__off64_t st_size; /* Size of file, in bytes. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -60,30 +63,34 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */
-#else
+# else
long int st_pad4;
__blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
-#endif
+# endif
long int st_pad5[14];
+# endif /* __USE_TIME_BITS64 */
};
-#ifdef __USE_LARGEFILE64
+# ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
unsigned long int st_dev;
long int st_pad1[3];
__ino64_t st_ino; /* File serial number. */
@@ -94,7 +101,7 @@ struct stat64
unsigned long int st_rdev; /* Device number, if device. */
long int st_pad2[3];
__off64_t st_size; /* Size of file, in bytes. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -104,44 +111,47 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
long int st_pad3;
__blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */
long int st_pad4[14];
+# endif /* __USE_TIME_BITS64 */
};
-#endif
-#else
+# endif /* __USE_LARGEFILE64 */
+
+#else /* _MIPS_SIM != _ABIO32 */
+
struct stat
{
__dev_t st_dev;
int st_pad1[3]; /* Reserved for st_dev expansion */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__ino_t st_ino;
-#else
+# else
__ino64_t st_ino;
-#endif
+# endif
__mode_t st_mode;
__nlink_t st_nlink;
__uid_t st_uid;
__gid_t st_gid;
__dev_t st_rdev;
-#if !defined __USE_FILE_OFFSET64
+# if !defined __USE_FILE_OFFSET64
unsigned int st_pad2[2]; /* Reserved for st_rdev expansion */
__off_t st_size;
int st_pad3;
-#else
+# else
unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
__off64_t st_size;
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -151,24 +161,24 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
+# endif
__blksize_t st_blksize;
unsigned int st_pad4;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks;
-#else
+# else
__blkcnt64_t st_blocks;
-#endif
+# endif
int st_pad5[14];
};
@@ -185,7 +195,7 @@ struct stat64
__dev_t st_rdev;
unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */
__off64_t st_size;
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -195,20 +205,21 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
__blksize_t st_blksize;
unsigned int st_pad3;
__blkcnt64_t st_blocks;
int st_pad4[14];
};
#endif
+
#endif
/* Tell code we have these members. */
diff --git a/lib/libc/include/generic-glibc/bits/struct_stat_time64_helper.h b/lib/libc/include/generic-glibc/bits/struct_stat_time64_helper.h
new file mode 100644
index 0000000000..15f02c4dc1
--- /dev/null
+++ b/lib/libc/include/generic-glibc/bits/struct_stat_time64_helper.h
@@ -0,0 +1,66 @@
+/* Definition for helper to define struct stat with 64-bit time.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+ /* Content of internal __stat64_t64 struct. */
+ __dev_t st_dev; /* Device. */
+ __ino64_t st_ino; /* file serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group. */
+ __dev_t st_rdev; /* Device number, if device. */
+ __off64_t st_size; /* Size of file, in bytes. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+#ifdef __USE_XOPEN2K8
+# ifndef __struct_timespec
+# define __struct_timespec struct timespec
+# endif
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ __struct_timespec st_atim;
+ __struct_timespec st_mtim;
+ __struct_timespec st_ctim;
+# define st_atime st_atim.tv_sec
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# undef __struct_timespec
+#else
+/* The definition should be equal to the 'struct __timespec64' internal
+ layout. */
+# if __BYTE_ORDER == __BIG_ENDIAN
+# define __fieldts64(name) \
+ __time64_t name; __int32_t :32; __int32_t name ## nsec
+# else
+# define __fieldts64(name) \
+ __time64_t name; __int32_t name ## nsec; __int32_t :32
+# endif
+
+ __fieldts64 (st_atime);
+ __fieldts64 (st_mtime);
+ __fieldts64 (st_ctime);
+
+ unsigned long int __glibc_reserved4;
+ unsigned long int __glibc_reserved5;
+
+# undef __fieldts64
+#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 f418df3294..5cd10027e1 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.10. */
+/* The system call list corresponds to kernel 5.13. */
#ifndef _SYSCALL_H
# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."
#endif
-#define __GLIBC_LINUX_VERSION_CODE 330240
+#define __GLIBC_LINUX_VERSION_CODE 331008
#ifdef __NR_FAST_atomic_update
# define SYS_FAST_atomic_update __NR_FAST_atomic_update
@@ -291,6 +291,10 @@
# define SYS_epoll_pwait __NR_epoll_pwait
#endif
+#ifdef __NR_epoll_pwait2
+# define SYS_epoll_pwait2 __NR_epoll_pwait2
+#endif
+
#ifdef __NR_epoll_wait
# define SYS_epoll_wait __NR_epoll_wait
#endif
@@ -803,6 +807,18 @@
# define SYS_kill __NR_kill
#endif
+#ifdef __NR_landlock_add_rule
+# define SYS_landlock_add_rule __NR_landlock_add_rule
+#endif
+
+#ifdef __NR_landlock_create_ruleset
+# define SYS_landlock_create_ruleset __NR_landlock_create_ruleset
+#endif
+
+#ifdef __NR_landlock_restrict_self
+# define SYS_landlock_restrict_self __NR_landlock_restrict_self
+#endif
+
#ifdef __NR_lchown
# define SYS_lchown __NR_lchown
#endif
@@ -939,6 +955,10 @@
# define SYS_mount __NR_mount
#endif
+#ifdef __NR_mount_setattr
+# define SYS_mount_setattr __NR_mount_setattr
+#endif
+
#ifdef __NR_move_mount
# define SYS_move_mount __NR_move_mount
#endif
diff --git a/lib/libc/include/generic-glibc/bits/time.h b/lib/libc/include/generic-glibc/bits/time.h
index 2665b86352..2cc9c18c35 100644
--- a/lib/libc/include/generic-glibc/bits/time.h
+++ b/lib/libc/include/generic-glibc/bits/time.h
@@ -77,6 +77,16 @@ __BEGIN_DECLS
/* Tune a POSIX clock. */
extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW;
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT_NTH)
+extern int __REDIRECT_NTH (clock_adjtime, (__clockid_t __clock_id,
+ struct timex *__utx),
+ __clock_adjtime64);
+# else
+# define clock_adjtime __clock_adjtime64
+# endif
+#endif
+
__END_DECLS
#endif /* use GNU */
diff --git a/lib/libc/include/generic-glibc/bits/timex.h b/lib/libc/include/generic-glibc/bits/timex.h
index 9042996de3..40295471b4 100644
--- a/lib/libc/include/generic-glibc/bits/timex.h
+++ b/lib/libc/include/generic-glibc/bits/timex.h
@@ -25,6 +25,36 @@
struct timex
{
+# ifdef __USE_TIME_BITS64
+ unsigned int modes; /* mode selector */
+ int :32; /* pad */
+ long long offset; /* time offset (usec) */
+ long long freq; /* frequency offset (scaled ppm) */
+ long long maxerror; /* maximum error (usec) */
+ long long esterror; /* estimated error (usec) */
+ int status; /* clock command/status */
+ int :32; /* pad */
+ long long constant; /* pll time constant */
+ long long precision; /* clock precision (usec) (read only) */
+ long long tolerance; /* clock frequency tolerance (ppm) (ro) */
+ struct timeval time; /* (read only, except for ADJ_SETOFFSET) */
+ long long tick; /* (modified) usecs between clock ticks */
+ long long ppsfreq; /* pps frequency (scaled ppm) (ro) */
+ long long jitter; /* pps jitter (us) (ro) */
+ int shift; /* interval duration (s) (shift) (ro) */
+ int :32; /* pad */
+ long long stabil; /* pps stability (scaled ppm) (ro) */
+ long long jitcnt; /* jitter limit exceeded (ro) */
+ long long calcnt; /* calibration intervals (ro) */
+ long long errcnt; /* calibration errors (ro) */
+ long long stbcnt; /* stability limit exceeded (ro) */
+
+ int tai; /* TAI offset (ro) */
+
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32; int :32;
+ int :32; int :32; int :32;
+# else
unsigned int modes; /* mode selector */
__syscall_slong_t offset; /* time offset (usec) */
__syscall_slong_t freq; /* frequency offset (scaled ppm) */
@@ -51,6 +81,7 @@ struct timex
int :32; int :32; int :32; int :32;
int :32; int :32; int :32; int :32;
int :32; int :32; int :32;
+# endif
};
/* Mode codes (timex.mode) */
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds.h b/lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds.h
new file mode 100644
index 0000000000..44e70eddae
--- /dev/null
+++ b/lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds.h
@@ -0,0 +1,30 @@
+/* Generic implementation of the SysV message struct msqid64_ds.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_MSG_H
+# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
+#endif
+
+#if __TIMESIZE == 64
+# define __msqid64_ds msqid_ds
+#else
+struct __msqid64_ds
+{
+# include <bits/types/struct_msqid64_ds_helper.h>
+};
+#endif \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds_helper.h b/lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds_helper.h
new file mode 100644
index 0000000000..9887c5f478
--- /dev/null
+++ b/lib/libc/include/generic-glibc/bits/types/struct_msqid64_ds_helper.h
@@ -0,0 +1,30 @@
+/* Common definitions for struct msqid_ds with 64-bit time.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+ /* Content of internal __msqid64_ds. */
+ struct ipc_perm msg_perm; /* structure describing operation permission */
+ __time64_t msg_stime; /* time of last msgsnd command */
+ __time64_t msg_rtime; /* time of last msgsnd command */
+ __time64_t msg_ctime; /* 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() */
+ unsigned long int __glibc_reserved4;
+ unsigned long int __glibc_reserved5; \ No newline at end of file
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
index 9ccafc23d6..4ed63d1742 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_msqid_ds.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_msqid_ds.h
@@ -20,23 +20,28 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
+# 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
+# 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
+# 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 */
@@ -44,4 +49,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
}; \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_semid64_ds.h b/lib/libc/include/generic-glibc/bits/types/struct_semid64_ds.h
new file mode 100644
index 0000000000..b6f423abe0
--- /dev/null
+++ b/lib/libc/include/generic-glibc/bits/types/struct_semid64_ds.h
@@ -0,0 +1,30 @@
+/* Generic implementation of the semaphore struct semid64_ds.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SEM_H
+# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead."
+#endif
+
+#if __TIMESIZE == 64
+# define __semid64_ds semid_ds
+#else
+struct __semid64_ds
+{
+# include <bits/types/struct_semid64_ds_helper.h>
+};
+#endif \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_semid64_ds_helper.h b/lib/libc/include/generic-glibc/bits/types/struct_semid64_ds_helper.h
new file mode 100644
index 0000000000..f9d237db03
--- /dev/null
+++ b/lib/libc/include/generic-glibc/bits/types/struct_semid64_ds_helper.h
@@ -0,0 +1,25 @@
+/* Common definitions for struct semid_ds with 64-bit time.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+ /* Content of internal __semid64_ds. */
+ struct ipc_perm sem_perm; /* operation permission struct */
+ __time64_t sem_otime; /* last semop() time */
+ __time64_t sem_ctime; /* last time changed by semctl() */
+ __syscall_ulong_t sem_nsems; /* number of semaphores in set */
+ unsigned long int __glibc_reserved3;
+ unsigned long int __glibc_reserved4; \ 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
index b7b46007a1..fcbf6447fc 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_semid_ds.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_semid_ds.h
@@ -23,17 +23,21 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# 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
+# else
__time_t sem_otime;
__time_t sem_ctime;
-#endif
+# endif
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
}; \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds.h b/lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds.h
new file mode 100644
index 0000000000..ec2c97d59c
--- /dev/null
+++ b/lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds.h
@@ -0,0 +1,30 @@
+/* Generic implementation of the shared memory struct shmid_ds.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SHM_H
+# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead."
+#endif
+
+#if __TIMESIZE == 64
+# define __shmid64_ds shmid_ds
+#else
+struct __shmid64_ds
+{
+# include <bits/types/struct_shmid64_ds_helper.h>
+};
+#endif \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds_helper.h b/lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds_helper.h
new file mode 100644
index 0000000000..157d363e8d
--- /dev/null
+++ b/lib/libc/include/generic-glibc/bits/types/struct_shmid64_ds_helper.h
@@ -0,0 +1,28 @@
+/* Common definitions for struct semid_ds with 64-bit time.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+ struct ipc_perm shm_perm; /* operation permission struct */
+ size_t shm_segsz; /* size of segment in bytes */
+ __time64_t shm_atime; /* time of last shmat() */
+ __time64_t shm_dtime; /* time of last shmdt() */
+ __time64_t shm_ctime; /* time of last change by shmctl() */
+ __pid_t shm_cpid; /* pid of creator */
+ __pid_t shm_lpid; /* pid of last shmop */
+ shmatt_t shm_nattch; /* number of current attaches */
+ unsigned long int __glibc_reserved5;
+ unsigned long int __glibc_reserved6; \ 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
index 4c4670b47b..07ecb8c0d3 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_shmid_ds.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_shmid_ds.h
@@ -23,23 +23,27 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
size_t shm_segsz; /* size of segment in bytes */
-#if __TIMESIZE == 32
+# 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
+# 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
+# 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;
+#endif
}; \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_timespec.h b/lib/libc/include/generic-glibc/bits/types/struct_timespec.h
index 3df95ada11..d008a04a4b 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_timespec.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_timespec.h
@@ -4,15 +4,20 @@
#include <bits/types.h>
#include <bits/endian.h>
+#include <bits/types/time_t.h>
/* POSIX.1b structure for a time value. This is like a `struct timeval' but
has nanoseconds instead of microseconds. */
struct timespec
{
+#ifdef __USE_TIME_BITS64
+ __time64_t tv_sec; /* Seconds. */
+#else
__time_t tv_sec; /* Seconds. */
+#endif
#if __WORDSIZE == 64 \
|| (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \
- || __TIMESIZE == 32
+ || (__TIMESIZE == 32 && !defined __USE_TIME_BITS64)
__syscall_slong_t tv_nsec; /* Nanoseconds. */
#else
# if __BYTE_ORDER == __BIG_ENDIAN
diff --git a/lib/libc/include/generic-glibc/bits/types/struct_timeval.h b/lib/libc/include/generic-glibc/bits/types/struct_timeval.h
index 5144612f07..176b5e4f4e 100644
--- a/lib/libc/include/generic-glibc/bits/types/struct_timeval.h
+++ b/lib/libc/include/generic-glibc/bits/types/struct_timeval.h
@@ -7,7 +7,12 @@
microsecond but also has a range of years. */
struct timeval
{
+#ifdef __USE_TIME_BITS64
+ __time64_t tv_sec; /* Seconds. */
+ __suseconds64_t tv_usec; /* Microseconds. */
+#else
__time_t tv_sec; /* Seconds. */
__suseconds_t tv_usec; /* Microseconds. */
+#endif
};
#endif \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/types/time_t.h b/lib/libc/include/generic-glibc/bits/types/time_t.h
index cba3ced0ec..073c25016b 100644
--- a/lib/libc/include/generic-glibc/bits/types/time_t.h
+++ b/lib/libc/include/generic-glibc/bits/types/time_t.h
@@ -4,6 +4,10 @@
#include <bits/types.h>
/* Returned by `time'. */
+#ifdef __USE_TIME_BITS64
+typedef __time64_t time_t;
+#else
typedef __time_t time_t;
+#endif
#endif \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/unistd_ext.h b/lib/libc/include/generic-glibc/bits/unistd_ext.h
index 94ad5474d2..7ea3163bf6 100644
--- a/lib/libc/include/generic-glibc/bits/unistd_ext.h
+++ b/lib/libc/include/generic-glibc/bits/unistd_ext.h
@@ -33,4 +33,27 @@
not detached and has not been joined. */
extern __pid_t gettid (void) __THROW;
-#endif \ No newline at end of file
+#ifdef __has_include
+# if __has_include ("linux/close_range.h")
+# include "linux/close_range.h"
+# endif
+#endif
+/* Unshare the file descriptor table before closing file descriptors. */
+#ifndef CLOSE_RANGE_UNSHARE
+# define CLOSE_RANGE_UNSHARE (1U << 1)
+#endif
+/* Set the FD_CLOEXEC bit instead of closing the file descriptor. */
+#ifndef CLOSE_RANGE_CLOEXEC
+# define CLOSE_RANGE_CLOEXEC (1U << 2)
+#endif
+
+/* Close all file descriptors in the range FD up to MAX_FD. The flag FLAGS
+ are define by the CLOSE_RANGE prefix. This function behaves like close
+ on the range, but in a fail-safe where it will either fail and not close
+ any file descriptor or close all of them. Gaps where the file descriptor
+ is invalid are ignored. Returns 0 on successor or -1 for failure (and
+ sets errno accordingly). */
+extern int close_range (unsigned int __fd, unsigned int __max_fd,
+ int __flags) __THROW;
+
+#endif /* __USE_GNU */ \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/bits/wordsize.h b/lib/libc/include/generic-glibc/bits/wordsize.h
index 6561e924f5..9e405e4e4e 100644
--- a/lib/libc/include/generic-glibc/bits/wordsize.h
+++ b/lib/libc/include/generic-glibc/bits/wordsize.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2021 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,10 +12,20 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
+ License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */
-#define __WORDSIZE 32
-#define __WORDSIZE_TIME64_COMPAT32 0
+#include <sgidefs.h>
+
+#define __WORDSIZE _MIPS_SZPTR
+
+#if _MIPS_SIM == _ABI64
+# define __WORDSIZE_TIME64_COMPAT32 1
+#else
+# define __WORDSIZE_TIME64_COMPAT32 0
+#endif
+
+#if __WORDSIZE == 32
#define __WORDSIZE32_SIZE_ULONG 0
-#define __WORDSIZE32_PTRDIFF_LONG 0 \ No newline at end of file
+#define __WORDSIZE32_PTRDIFF_LONG 0
+#endif \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/elf.h b/lib/libc/include/generic-glibc/elf.h
index 4cf698fa9f..e55c74a275 100644
--- a/lib/libc/include/generic-glibc/elf.h
+++ b/lib/libc/include/generic-glibc/elf.h
@@ -336,7 +336,8 @@ typedef struct
#define EM_BA2 202 /* Beyond BA2 */
#define EM_XCORE 203 /* XMOS xCORE */
#define EM_MCHP_PIC 204 /* Microchip 8-bit PIC(r) */
- /* reserved 205-209 */
+#define EM_INTELGT 205 /* Intel Graphics Technology */
+ /* reserved 206-209 */
#define EM_KM32 210 /* KM211 KM32 */
#define EM_KMX32 211 /* KM211 KMX32 */
#define EM_EMX16 212 /* KM211 KMX16 */
@@ -813,6 +814,10 @@ typedef struct
address keys. */
#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication
generic key. */
+#define NT_ARM_TAGGED_ADDR_CTRL 0x409 /* AArch64 tagged address
+ control. */
+#define NT_ARM_PAC_ENABLED_KEYS 0x40a /* AArch64 pointer authentication
+ enabled keys. */
#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */
#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */
#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */
diff --git a/lib/libc/include/generic-glibc/fcntl.h b/lib/libc/include/generic-glibc/fcntl.h
index d84aefa62f..ceeb63138b 100644
--- a/lib/libc/include/generic-glibc/fcntl.h
+++ b/lib/libc/include/generic-glibc/fcntl.h
@@ -172,17 +172,30 @@ typedef __pid_t pid_t;
This function is a cancellation point and therefore not marked with
__THROW. */
-#ifndef __USE_FILE_OFFSET64
+#ifndef __USE_TIME_BITS64
+# ifndef __USE_FILE_OFFSET64
extern int fcntl (int __fd, int __cmd, ...);
-#else
-# ifdef __REDIRECT
-extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
# else
-# define fcntl fcntl64
+# ifdef __REDIRECT
+extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
+# else
+# define fcntl fcntl64
+# endif
# endif
-#endif
-#ifdef __USE_LARGEFILE64
+# ifdef __USE_LARGEFILE64
extern int fcntl64 (int __fd, int __cmd, ...);
+# endif
+#else /* __USE_TIME_BITS64 */
+# ifdef __REDIRECT
+extern int __REDIRECT (fcntl, (int __fd, int __request, ...),
+ __fcntl_time64) __THROW;
+extern int __REDIRECT (fcntl64, (int __fd, int __request, ...),
+ __fcntl_time64) __THROW;
+# else
+extern int __fcntl_time64 (int __fd, int __request, ...) __THROW;
+# define fcntl64 __fcntl_time64
+# define fcntl __fcntl_time64
+# endif
#endif
/* Open FILE and return a new file descriptor for it, or -1 on error.
diff --git a/lib/libc/include/generic-glibc/features-time64.h b/lib/libc/include/generic-glibc/features-time64.h
new file mode 100644
index 0000000000..8e8163f6a3
--- /dev/null
+++ b/lib/libc/include/generic-glibc/features-time64.h
@@ -0,0 +1,37 @@
+/* Features part to handle 64-bit time_t support.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* We need to know the word size in order to check the time size. */
+#include <bits/wordsize.h>
+#include <bits/timesize.h>
+
+#if defined _TIME_BITS
+# if _TIME_BITS == 64
+# if ! defined (_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64
+# error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
+# elif __TIMESIZE == 32
+# define __USE_TIME_BITS64 1
+# endif
+# elif _TIME_BITS == 32
+# if __TIMESIZE > 32
+# error "_TIME_BITS=32 is not compatible with __TIMESIZE > 32"
+# endif
+# else
+# error Invalid _TIME_BITS value (can only be 32 or 64-bit)
+# endif
+#endif \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/features.h b/lib/libc/include/generic-glibc/features.h
index 47b1935cb3..62ffeace4b 100644
--- a/lib/libc/include/generic-glibc/features.h
+++ b/lib/libc/include/generic-glibc/features.h
@@ -33,6 +33,8 @@
Extensions to ISO C11 from TS 18661-4:2015.
__STDC_WANT_IEC_60559_TYPES_EXT__
Extensions to ISO C11 from TS 18661-3:2015.
+ __STDC_WANT_IEC_60559_EXT__
+ ISO C2X interfaces defined only in Annex F.
_POSIX_SOURCE IEEE Std 1003.1.
_POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
@@ -48,6 +50,8 @@
_LARGEFILE64_SOURCE Additional functionality from LFS for large files.
_FILE_OFFSET_BITS=N Select default filesystem interface.
_ATFILE_SOURCE Additional *at interfaces.
+ _DYNAMIC_STACK_SIZE_SOURCE Select correct (but non compile-time constant)
+ MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
_GNU_SOURCE All of the above, plus GNU extensions.
_DEFAULT_SOURCE The default set of features (taking precedence over
__STRICT_ANSI__).
@@ -94,6 +98,8 @@
__USE_FILE_OFFSET64 Define 64bit interface as default.
__USE_MISC Define things from 4.3BSD or System V Unix.
__USE_ATFILE Define *at interfaces and AT_* constants for them.
+ __USE_DYNAMIC_STACK_SIZE Define correct (but non compile-time constant)
+ MINSIGSTKSZ, SIGSTKSZ and PTHREAD_STACK_MIN.
__USE_GNU Define GNU extensions.
__USE_FORTIFY_LEVEL Additional security measures used, according to level.
@@ -137,6 +143,7 @@
#undef __USE_FILE_OFFSET64
#undef __USE_MISC
#undef __USE_ATFILE
+#undef __USE_DYNAMIC_STACK_SIZE
#undef __USE_GNU
#undef __USE_FORTIFY_LEVEL
#undef __KERNEL_STRICT_NAMES
@@ -213,6 +220,8 @@
# define _DEFAULT_SOURCE 1
# undef _ATFILE_SOURCE
# define _ATFILE_SOURCE 1
+# undef _DYNAMIC_STACK_SIZE_SOURCE
+# define _DYNAMIC_STACK_SIZE_SOURCE 1
#endif
/* If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined,
@@ -380,6 +389,8 @@
# define __USE_FILE_OFFSET64 1
#endif
+#include <features-time64.h>
+
#if defined _DEFAULT_SOURCE
# define __USE_MISC 1
#endif
@@ -388,6 +399,10 @@
# define __USE_ATFILE 1
#endif
+#ifdef _DYNAMIC_STACK_SIZE_SOURCE
+# define __USE_DYNAMIC_STACK_SIZE 1
+#endif
+
#ifdef _GNU_SOURCE
# define __USE_GNU 1
#endif
@@ -462,7 +477,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__ 33
+#define __GLIBC_MINOR__ 34
#define __GLIBC_PREREQ(maj, min) \
((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
diff --git a/lib/libc/include/generic-glibc/fts.h b/lib/libc/include/generic-glibc/fts.h
index 88183efb90..2705c1c67a 100644
--- a/lib/libc/include/generic-glibc/fts.h
+++ b/lib/libc/include/generic-glibc/fts.h
@@ -187,6 +187,7 @@ FTSENT *fts_read (FTS *);
int fts_set (FTS *, FTSENT *, int) __THROW;
#else
# ifdef __REDIRECT
+# ifndef __USE_TIME_BITS64
FTSENT *__REDIRECT (fts_children, (FTS *, int), fts64_children);
int __REDIRECT (fts_close, (FTS *), fts64_close);
FTS *__REDIRECT (fts_open, (char * const *, int,
@@ -194,21 +195,53 @@ FTS *__REDIRECT (fts_open, (char * const *, int,
fts64_open);
FTSENT *__REDIRECT (fts_read, (FTS *), fts64_read);
int __REDIRECT_NTH (fts_set, (FTS *, FTSENT *, int), fts64_set);
+# else
+FTSENT *__REDIRECT (fts_children, (FTS *, int), __fts64_children_time64);
+int __REDIRECT (fts_close, (FTS *), __fts64_close_time64);
+FTS *__REDIRECT (fts_open, (char * const *, int,
+ int (*)(const FTSENT **, const FTSENT **)),
+ __fts64_open_time64);
+FTSENT *__REDIRECT (fts_read, (FTS *), __fts64_read_time64);
+int __REDIRECT_NTH (fts_set, (FTS *, FTSENT *, int),
+ __fts64_set_time64);
+# endif
# else
-# define fts_children fts64_children
-# define fts_close fts64_close
-# define fts_open fts64_open
-# define fts_read fts64_read
-# define fts_set fts64_set
+# ifndef __USE_TIME_BITS64
+# define fts_children fts64_children
+# define fts_close fts64_close
+# define fts_open fts64_open
+# define fts_read fts64_read
+# define fts_set fts64_set
+# else
+# endif
# endif
#endif
#ifdef __USE_LARGEFILE64
+# ifndef __USE_TIME_BITS64
FTSENT64 *fts64_children (FTS64 *, int);
int fts64_close (FTS64 *);
FTS64 *fts64_open (char * const *, int,
int (*)(const FTSENT64 **, const FTSENT64 **));
FTSENT64 *fts64_read (FTS64 *);
int fts64_set (FTS64 *, FTSENT64 *, int) __THROW;
+# else
+# ifdef __REDIRECT
+FTSENT *__REDIRECT (fts64_children, (FTS64 *, int), __fts64_children_time64);
+int __REDIRECT (fts64_close, (FTS64 *), __fts64_close_time64);
+FTS *__REDIRECT (fts64_open, (char * const *, int,
+ int (*)(const FTSENT64 **, const FTSENT64 **)),
+ __fts64_open_time64);
+FTSENT *__REDIRECT (fts64_read, (FTS64 *), __fts64_read_time64);
+int __REDIRECT_NTH (fts64_set, (FTS64 *, FTSENT64 *, int),
+ __fts64_set_time64);
+# else
+# define fts_children __fts64_children_time64
+# define fts_close __fts64_close_time64
+# define fts_open __fts64_open_time64
+# define fts_read __fts64_read_time64
+# define fts_set __fts64_set_time64
+# endif
+# endif
#endif
__END_DECLS
diff --git a/lib/libc/include/generic-glibc/ftw.h b/lib/libc/include/generic-glibc/ftw.h
index 6f7b312bd3..14531bc774 100644
--- a/lib/libc/include/generic-glibc/ftw.h
+++ b/lib/libc/include/generic-glibc/ftw.h
@@ -137,15 +137,36 @@ extern int ftw (const char *__dir, __ftw_func_t __func, int __descriptors)
__nonnull ((1, 2));
#else
# ifdef __REDIRECT
+# ifndef __USE_TIME_BITS64
extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,
int __descriptors), ftw64) __nonnull ((1, 2));
+# else
+extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,
+ int __descriptors), __ftw64_time64)
+ __nonnull ((1, 2));
+# endif
# else
-# define ftw ftw64
+# ifndef __USE_TIME_BITS64
+# define ftw ftw64
+# else
+# define ftw __ftw64_time64
+# endif
# endif
#endif
#ifdef __USE_LARGEFILE64
+# ifndef __USE_TIME_BITS64
extern int ftw64 (const char *__dir, __ftw64_func_t __func,
int __descriptors) __nonnull ((1, 2));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (ftw64, (const char *__dir, __ftw64_func_t __func,
+ int __descriptors),
+ __ftw64_time64)
+ __nonnull ((1, 2));
+# else
+# define nftw64 __nftw64_time64
+# endif
+# endif
#endif
#ifdef __USE_XOPEN_EXTENDED
@@ -159,16 +180,37 @@ extern int nftw (const char *__dir, __nftw_func_t __func, int __descriptors,
int __flag) __nonnull ((1, 2));
# else
# ifdef __REDIRECT
+# ifndef __USE_TIME_BITS64
extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,
int __descriptors, int __flag), nftw64)
__nonnull ((1, 2));
+# else
+extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,
+ int __descriptors, int __flag), __nftw64_time64)
+ __nonnull ((1, 2));
+# endif
# else
-# define nftw nftw64
+# ifndef __USE_TIME_BITS64
+# define nftw nftw64
+# else
+# define nftw __nftw64_time64
+# endif
# endif
# endif
# ifdef __USE_LARGEFILE64
+# ifndef __USE_TIME_BITS64
extern int nftw64 (const char *__dir, __nftw64_func_t __func,
int __descriptors, int __flag) __nonnull ((1, 2));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (nftw64, (const char *__dir, __nftw64_func_t __func,
+ int __descriptors, int __flag),
+ __nftw64_time64)
+ __nonnull ((1, 2));
+# else
+# define nftw64 __nftw64_time64
+# endif
+# endif
# endif
#endif
diff --git a/lib/libc/include/generic-glibc/glob.h b/lib/libc/include/generic-glibc/glob.h
index 07645f1229..a014ec4db5 100644
--- a/lib/libc/include/generic-glibc/glob.h
+++ b/lib/libc/include/generic-glibc/glob.h
@@ -145,25 +145,47 @@ typedef struct
#if !defined __USE_FILE_OFFSET64
extern int glob (const char *__restrict __pattern, int __flags,
int (*__errfunc) (const char *, int),
- glob_t *__restrict __pglob) __THROW;
+ glob_t *__restrict __pglob) __THROWNL;
/* Free storage allocated in PGLOB by a previous `glob' call. */
extern void globfree (glob_t *__pglob) __THROW;
#else
-extern int __REDIRECT_NTH (glob, (const char *__restrict __pattern,
- int __flags,
- int (*__errfunc) (const char *, int),
- glob_t *__restrict __pglob), glob64);
+# ifdef __USE_TIME_BITS64
+extern int __REDIRECT_NTHNL (glob, (const char *__restrict __pattern,
+ int __flags,
+ int (*__errfunc) (const char *, int),
+ glob_t *__restrict __pglob),
+ __glob64_time64);
+
+extern void __REDIRECT_NTH (globfree, (glob_t *__pglob),
+ __globfree64_time64);
+# else
+extern int __REDIRECT_NTHNL (glob, (const char *__restrict __pattern,
+ int __flags,
+ int (*__errfunc) (const char *, int),
+ glob_t *__restrict __pglob), glob64);
extern void __REDIRECT_NTH (globfree, (glob_t *__pglob), globfree64);
+# endif
#endif
#ifdef __USE_LARGEFILE64
+# ifdef __USE_TIME_BITS64
+extern int __REDIRECT_NTHNL (glob64, (const char *__restrict __pattern,
+ int __flags,
+ int (*__errfunc) (const char *, int),
+ glob64_t *__restrict __pglob),
+ __glob64_time64);
+
+extern void __REDIRECT_NTH (globfree64, (glob64_t *__pglob),
+ __globfree64_time64);
+# else
extern int glob64 (const char *__restrict __pattern, int __flags,
int (*__errfunc) (const char *, int),
- glob64_t *__restrict __pglob) __THROW;
+ glob64_t *__restrict __pglob) __THROWNL;
extern void globfree64 (glob64_t *__pglob) __THROW;
+# endif
#endif
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 3e05ce280d..94b406673b 100644
--- a/lib/libc/include/generic-glibc/gnu/lib-names-32.h
+++ b/lib/libc/include/generic-glibc/gnu/lib-names-32.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
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 dd2cb9fb78..eab9583670 100644
--- a/lib/libc/include/generic-glibc/gnu/lib-names-hard.h
+++ b/lib/libc/include/generic-glibc/gnu/lib-names-hard.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
diff --git a/lib/libc/include/generic-glibc/gnu/lib-names-ilp32d.h b/lib/libc/include/generic-glibc/gnu/lib-names-ilp32d.h
new file mode 100644
index 0000000000..da6ef4813b
--- /dev/null
+++ b/lib/libc/include/generic-glibc/gnu/lib-names-ilp32d.h
@@ -0,0 +1,30 @@
+/* This file is automatically generated. */
+#ifndef __GNU_LIB_NAMES_H
+# error "Never use <gnu/lib-names-ilp32d.h> directly; include <gnu/lib-names.h> instead."
+#endif
+
+#define LD_LINUX_RISCV32_ILP32D_SO "ld-linux-riscv32-ilp32d.so.1"
+#define LD_SO "ld-linux-riscv32-ilp32d.so.1"
+#define LIBANL_SO "libanl.so.1"
+#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
+#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
+#define LIBC_SO "libc.so.6"
+#define LIBDL_SO "libdl.so.2"
+#define LIBGCC_S_SO "libgcc_s.so.1"
+#define LIBMVEC_SO "libmvec.so.1"
+#define LIBM_SO "libm.so.6"
+#define LIBNSL_SO "libnsl.so.1"
+#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
+#define LIBNSS_DB_SO "libnss_db.so.2"
+#define LIBNSS_DNS_SO "libnss_dns.so.2"
+#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_TEST1_SO "libnss_test1.so.2"
+#define LIBNSS_TEST2_SO "libnss_test2.so.2"
+#define LIBPTHREAD_SO "libpthread.so.0"
+#define LIBRESOLV_SO "libresolv.so.2"
+#define LIBRT_SO "librt.so.1"
+#define LIBTHREAD_DB_SO "libthread_db.so.1"
+#define LIBUTIL_SO "libutil.so.1"
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 4ec7514060..a941c82ff7 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
@@ -7,6 +7,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
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 1f8eed349b..740f99f84f 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
@@ -7,6 +7,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
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 8a3a04cb2d..e5bde87e45 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
@@ -7,6 +7,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
diff --git a/lib/libc/include/generic-glibc/gnu/lib-names-o32_soft.h b/lib/libc/include/generic-glibc/gnu/lib-names-o32_soft.h
new file mode 100644
index 0000000000..2eb6ca4f6a
--- /dev/null
+++ b/lib/libc/include/generic-glibc/gnu/lib-names-o32_soft.h
@@ -0,0 +1,29 @@
+/* This file is automatically generated. */
+#ifndef __GNU_LIB_NAMES_H
+# error "Never use <gnu/lib-names-o32_soft.h> directly; include <gnu/lib-names.h> instead."
+#endif
+
+#define LD_SO "ld.so.1"
+#define LIBANL_SO "libanl.so.1"
+#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
+#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
+#define LIBC_SO "libc.so.6"
+#define LIBDL_SO "libdl.so.2"
+#define LIBGCC_S_SO "libgcc_s.so.1"
+#define LIBMVEC_SO "libmvec.so.1"
+#define LIBM_SO "libm.so.6"
+#define LIBNSL_SO "libnsl.so.1"
+#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
+#define LIBNSS_DB_SO "libnss_db.so.2"
+#define LIBNSS_DNS_SO "libnss_dns.so.2"
+#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_TEST1_SO "libnss_test1.so.2"
+#define LIBNSS_TEST2_SO "libnss_test2.so.2"
+#define LIBPTHREAD_SO "libpthread.so.0"
+#define LIBRESOLV_SO "libresolv.so.2"
+#define LIBRT_SO "librt.so.1"
+#define LIBTHREAD_DB_SO "libthread_db.so.1"
+#define LIBUTIL_SO "libutil.so.1" \ No newline at end of file
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 3c3e1769fa..bcafe34bdd 100644
--- a/lib/libc/include/generic-glibc/gnu/lib-names-soft.h
+++ b/lib/libc/include/generic-glibc/gnu/lib-names-soft.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
diff --git a/lib/libc/include/generic-glibc/gnu/stubs-ilp32.h b/lib/libc/include/generic-glibc/gnu/stubs-ilp32.h
new file mode 100644
index 0000000000..b9af396166
--- /dev/null
+++ b/lib/libc/include/generic-glibc/gnu/stubs-ilp32.h
@@ -0,0 +1,38 @@
+/* This file is automatically generated.
+ It defines a symbol `__stub_FUNCTION' for each function
+ in the C library which is a stub, meaning it will fail
+ every time called, usually setting errno to ENOSYS. */
+
+#ifdef _LIBC
+ #error Applications may not define the macro _LIBC
+#endif
+
+#define __stub___compat_bdflush
+#define __stub___compat_create_module
+#define __stub___compat_get_kernel_syms
+#define __stub___compat_query_module
+#define __stub___compat_uselib
+#define __stub_chflags
+#define __stub_fchflags
+#define __stub_feclearexcept
+#define __stub_fedisableexcept
+#define __stub_feenableexcept
+#define __stub_fegetenv
+#define __stub_fegetexcept
+#define __stub_fegetexceptflag
+#define __stub_fegetmode
+#define __stub_fegetround
+#define __stub_feholdexcept
+#define __stub_feraiseexcept
+#define __stub_fesetenv
+#define __stub_fesetexcept
+#define __stub_fesetexceptflag
+#define __stub_fesetmode
+#define __stub_fesetround
+#define __stub_fetestexcept
+#define __stub_feupdateenv
+#define __stub_gtty
+#define __stub_revoke
+#define __stub_setlogin
+#define __stub_sigreturn
+#define __stub_stty
diff --git a/lib/libc/include/generic-glibc/gnu/stubs-ilp32d.h b/lib/libc/include/generic-glibc/gnu/stubs-ilp32d.h
new file mode 100644
index 0000000000..4d4c0d146a
--- /dev/null
+++ b/lib/libc/include/generic-glibc/gnu/stubs-ilp32d.h
@@ -0,0 +1,24 @@
+/* This file is automatically generated.
+ It defines a symbol `__stub_FUNCTION' for each function
+ in the C library which is a stub, meaning it will fail
+ every time called, usually setting errno to ENOSYS. */
+
+#ifdef _LIBC
+ #error Applications may not define the macro _LIBC
+#endif
+
+#define __stub___compat_bdflush
+#define __stub___compat_create_module
+#define __stub___compat_get_kernel_syms
+#define __stub___compat_query_module
+#define __stub___compat_uselib
+#define __stub_chflags
+#define __stub_fchflags
+#define __stub_fedisableexcept
+#define __stub_feenableexcept
+#define __stub_fegetexcept
+#define __stub_gtty
+#define __stub_revoke
+#define __stub_setlogin
+#define __stub_sigreturn
+#define __stub_stty
diff --git a/lib/libc/include/generic-glibc/gnu/stubs-o32_soft.h b/lib/libc/include/generic-glibc/gnu/stubs-o32_soft.h
new file mode 100644
index 0000000000..5c4857a869
--- /dev/null
+++ b/lib/libc/include/generic-glibc/gnu/stubs-o32_soft.h
@@ -0,0 +1,33 @@
+/* This file is automatically generated.
+ It defines a symbol `__stub_FUNCTION' for each function
+ in the C library which is a stub, meaning it will fail
+ every time called, usually setting errno to ENOSYS. */
+
+#ifdef _LIBC
+ #error Applications may not define the macro _LIBC
+#endif
+
+#define __stub_chflags
+#define __stub_fchflags
+#define __stub_feclearexcept
+#define __stub_fedisableexcept
+#define __stub_feenableexcept
+#define __stub_fegetenv
+#define __stub_fegetexcept
+#define __stub_fegetexceptflag
+#define __stub_fegetmode
+#define __stub_fegetround
+#define __stub_feholdexcept
+#define __stub_feraiseexcept
+#define __stub_fesetenv
+#define __stub_fesetexcept
+#define __stub_fesetexceptflag
+#define __stub_fesetmode
+#define __stub_fesetround
+#define __stub_fetestexcept
+#define __stub_feupdateenv
+#define __stub_gtty
+#define __stub_revoke
+#define __stub_setlogin
+#define __stub_sigreturn
+#define __stub_stty \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/malloc.h b/lib/libc/include/generic-glibc/malloc.h
index 893014fc39..d9be803a6f 100644
--- a/lib/libc/include/generic-glibc/malloc.h
+++ b/lib/libc/include/generic-glibc/malloc.h
@@ -56,30 +56,25 @@ __THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2));
the same pointer that was passed to it, aliasing needs to be allowed
between objects pointed by the old and new pointers. */
extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
-__THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2, 3));
+ __THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2, 3))
+ __attr_dealloc_free;
/* Free a block allocated by `malloc', `realloc' or `calloc'. */
extern void free (void *__ptr) __THROW;
/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
extern void *memalign (size_t __alignment, size_t __size)
-__THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur;
+ __THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur
+ __attr_dealloc_free;
/* Allocate SIZE bytes on a page boundary. */
extern void *valloc (size_t __size) __THROW __attribute_malloc__
- __attribute_alloc_size__ ((1)) __wur;
+ __attribute_alloc_size__ ((1)) __wur __attr_dealloc_free;
/* Equivalent to valloc(minimum-page-that-holds(n)), that is, round up
__size to nearest pagesize. */
-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) __MALLOC_DEPRECATED;
-
-/* Default value of `__morecore'. */
-extern void *__default_morecore (ptrdiff_t __size)
-__THROW __attribute_malloc__ __MALLOC_DEPRECATED;
+extern void *pvalloc (size_t __size) __THROW __attribute_malloc__
+ __wur __attr_dealloc_free;
/* SVID2/XPG mallinfo structure */
@@ -161,24 +156,5 @@ extern void malloc_stats (void) __THROW;
/* Output information about state of allocator to stream FP. */
extern int malloc_info (int __options, FILE *__fp) __THROW;
-/* Hooks for debugging and user-defined versions. */
-extern void (*__MALLOC_HOOK_VOLATILE __free_hook) (void *__ptr,
- const void *)
-__MALLOC_DEPRECATED;
-extern void *(*__MALLOC_HOOK_VOLATILE __malloc_hook)(size_t __size,
- const void *)
-__MALLOC_DEPRECATED;
-extern void *(*__MALLOC_HOOK_VOLATILE __realloc_hook)(void *__ptr,
- size_t __size,
- const void *)
-__MALLOC_DEPRECATED;
-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)
- __MALLOC_DEPRECATED;
-
-
__END_DECLS
#endif /* malloc.h */ \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/math.h b/lib/libc/include/generic-glibc/math.h
index 99c89c05ef..3c95334ab8 100644
--- a/lib/libc/include/generic-glibc/math.h
+++ b/lib/libc/include/generic-glibc/math.h
@@ -104,7 +104,7 @@ __BEGIN_DECLS
# endif
#endif /* __USE_ISOC99 */
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT)
/* Signaling NaN macros, if supported. */
# if __GNUC_PREREQ (3, 3)
# define SNANF (__builtin_nansf (""))
@@ -112,25 +112,39 @@ __BEGIN_DECLS
# define SNANL (__builtin_nansl (""))
# endif
#endif
-#if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+#if (__HAVE_FLOAT16 \
+ && __GLIBC_USE (IEC_60559_TYPES_EXT) \
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
# define SNANF16 (__builtin_nansf16 (""))
#endif
-#if __HAVE_FLOAT32 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+#if (__HAVE_FLOAT32 \
+ && __GLIBC_USE (IEC_60559_TYPES_EXT) \
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
# define SNANF32 (__builtin_nansf32 (""))
#endif
-#if __HAVE_FLOAT64 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+#if (__HAVE_FLOAT64 \
+ && __GLIBC_USE (IEC_60559_TYPES_EXT) \
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
# define SNANF64 (__builtin_nansf64 (""))
#endif
-#if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+#if (__HAVE_FLOAT128 \
+ && __GLIBC_USE (IEC_60559_TYPES_EXT) \
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
# define SNANF128 (__builtin_nansf128 (""))
#endif
-#if __HAVE_FLOAT32X && __GLIBC_USE (IEC_60559_TYPES_EXT)
+#if (__HAVE_FLOAT32X \
+ && __GLIBC_USE (IEC_60559_TYPES_EXT) \
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
# define SNANF32X (__builtin_nansf32x (""))
#endif
-#if __HAVE_FLOAT64X && __GLIBC_USE (IEC_60559_TYPES_EXT)
+#if (__HAVE_FLOAT64X \
+ && __GLIBC_USE (IEC_60559_TYPES_EXT) \
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
# define SNANF64X (__builtin_nansf64x (""))
#endif
-#if __HAVE_FLOAT128X && __GLIBC_USE (IEC_60559_TYPES_EXT)
+#if (__HAVE_FLOAT128X \
+ && __GLIBC_USE (IEC_60559_TYPES_EXT) \
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
# define SNANF128X (__builtin_nansf128x (""))
#endif
diff --git a/lib/libc/include/generic-glibc/monetary.h b/lib/libc/include/generic-glibc/monetary.h
index 94fd5f87dd..4df23ee58c 100644
--- a/lib/libc/include/generic-glibc/monetary.h
+++ b/lib/libc/include/generic-glibc/monetary.h
@@ -37,7 +37,8 @@ __BEGIN_DECLS
/* Formatting a monetary value according to the current locale. */
extern ssize_t strfmon (char *__restrict __s, size_t __maxsize,
const char *__restrict __format, ...)
- __THROW __attribute_format_strfmon__ (3, 4);
+ __THROW __attribute_format_strfmon__ (3, 4)
+ __attr_access ((__write_only__, 1, 2));
#ifdef __USE_XOPEN2K8
/* POSIX.1-2008 extended locale interface (see locale.h). */
@@ -47,7 +48,8 @@ extern ssize_t strfmon (char *__restrict __s, size_t __maxsize,
extern ssize_t strfmon_l (char *__restrict __s, size_t __maxsize,
locale_t __loc,
const char *__restrict __format, ...)
- __THROW __attribute_format_strfmon__ (4, 5);
+ __THROW __attribute_format_strfmon__ (4, 5)
+ __attr_access ((__write_only__, 1, 2));
#endif
#include <bits/floatn.h>
diff --git a/lib/libc/include/generic-glibc/mqueue.h b/lib/libc/include/generic-glibc/mqueue.h
index b2d0257f58..99066fff8e 100644
--- a/lib/libc/include/generic-glibc/mqueue.h
+++ b/lib/libc/include/generic-glibc/mqueue.h
@@ -71,6 +71,7 @@ extern int mq_send (mqd_t __mqdes, const char *__msg_ptr, size_t __msg_len,
unsigned int __msg_prio) __nonnull ((2));
#ifdef __USE_XOPEN2K
+# ifndef __USE_TIME_BITS64
/* Receive the oldest from highest priority messages in message queue
MQDES, stop waiting if ABS_TIMEOUT expires. */
extern ssize_t mq_timedreceive (mqd_t __mqdes, char *__restrict __msg_ptr,
@@ -85,6 +86,27 @@ extern int mq_timedsend (mqd_t __mqdes, const char *__msg_ptr,
size_t __msg_len, unsigned int __msg_prio,
const struct timespec *__abs_timeout)
__nonnull ((2, 5));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (mq_timedreceive, (mqd_t __mqdes,
+ char *__restrict __msg_ptr,
+ size_t __msg_len,
+ unsigned int *__restrict __msg_prio,
+ const struct timespec *__restrict __abs_timeout),
+ __mq_timedreceive_time64)
+ __nonnull ((2, 5));
+
+extern int __REDIRECT (mq_timedsend, (mqd_t __mqdes,
+ const char *__msg_ptr, size_t __msg_len,
+ unsigned int __msg_prio,
+ const struct timespec *__abs_timeout),
+ __mq_timedsend_time64)
+ __nonnull ((2, 5));
+# else
+# define mq_timedreceive __mq_timedreceive_time64
+# define mq_timedsend __mq_timedsend_time64
+# endif
+# endif
#endif
/* Define some inlines helping to catch common problems. */
diff --git a/lib/libc/include/generic-glibc/net/if.h b/lib/libc/include/generic-glibc/net/if.h
index 592dfaf274..299ac38fd6 100644
--- a/lib/libc/include/generic-glibc/net/if.h
+++ b/lib/libc/include/generic-glibc/net/if.h
@@ -191,7 +191,9 @@ __BEGIN_DECLS
/* Convert an interface name to an index, and vice versa. */
extern unsigned int if_nametoindex (const char *__ifname) __THROW;
-extern char *if_indextoname (unsigned int __ifindex, char *__ifname) __THROW;
+extern char *if_indextoname (unsigned int __ifindex,
+ char __ifname[IF_NAMESIZE]) __THROW
+ __attr_access ((__write_only__, 2));
/* Return a list of all interfaces and their indices. */
extern struct if_nameindex *if_nameindex (void) __THROW;
diff --git a/lib/libc/include/generic-glibc/netdb.h b/lib/libc/include/generic-glibc/netdb.h
index 1fe8f37e8f..ffdd666793 100644
--- a/lib/libc/include/generic-glibc/netdb.h
+++ b/lib/libc/include/generic-glibc/netdb.h
@@ -701,6 +701,17 @@ extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict_arr],
extern int gai_suspend (const struct gaicb *const __list[], int __ent,
const struct timespec *__timeout);
+# ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT)
+extern int __REDIRECT (gai_suspend, (const struct gaicb *const __list[],
+ int __ent,
+ const struct timespec *__timeout),
+ __gai_suspend_time64);
+# else
+# define gai_suspend __gai_suspend_time64
+# endif
+# endif
+
/* Get the error status of the request REQ. */
extern int gai_error (struct gaicb *__req) __THROW;
diff --git a/lib/libc/include/generic-glibc/netinet/icmp6.h b/lib/libc/include/generic-glibc/netinet/icmp6.h
index df2aadac34..04a482ead8 100644
--- a/lib/libc/include/generic-glibc/netinet/icmp6.h
+++ b/lib/libc/include/generic-glibc/netinet/icmp6.h
@@ -69,6 +69,8 @@ struct icmp6_hdr
#define MLD_LISTENER_QUERY 130
#define MLD_LISTENER_REPORT 131
#define MLD_LISTENER_REDUCTION 132
+#define ICMPV6_EXT_ECHO_REQUEST 160
+#define ICMPV6_EXT_ECHO_REPLY 161
#define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */
#define ICMP6_DST_UNREACH_ADMIN 1 /* communication with destination */
diff --git a/lib/libc/include/generic-glibc/netinet/ip_icmp.h b/lib/libc/include/generic-glibc/netinet/ip_icmp.h
index 0d19d729f2..47abfae972 100644
--- a/lib/libc/include/generic-glibc/netinet/ip_icmp.h
+++ b/lib/libc/include/generic-glibc/netinet/ip_icmp.h
@@ -89,6 +89,24 @@ struct icmphdr
#define ICMP_EXC_TTL 0 /* TTL count exceeded */
#define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */
+/* Codes for ICMP_EXT_ECHO (PROBE) */
+#define ICMP_EXT_ECHO 42
+#define ICMP_EXT_ECHOREPLY 43
+#define ICMP_EXT_CODE_MAL_QUERY 1 /* Malformed Query */
+#define ICMP_EXT_CODE_NO_IF 2 /* No such Interface */
+#define ICMP_EXT_CODE_NO_TABLE_ENT 3 /* No table entry */
+#define ICMP_EXT_CODE_MULT_IFS 4 /* Multiple Interfaces Satisfy Query */
+
+/* Constants for EXT_ECHO (PROBE) */
+#define ICMP_EXT_ECHOREPLY_ACTIVE (1 << 2)/* active bit in reply */
+#define ICMP_EXT_ECHOREPLY_IPV4 (1 << 1)/* ipv4 bit in reply */
+#define ICMP_EXT_ECHOREPLY_IPV6 1 /* ipv6 bit in reply */
+#define ICMP_EXT_ECHO_CTYPE_NAME 1
+#define ICMP_EXT_ECHO_CTYPE_INDEX 2
+#define ICMP_EXT_ECHO_CTYPE_ADDR 3
+#define ICMP_AFI_IP 1 /* Address Family Identifier for IPV4 */
+#define ICMP_AFI_IP6 2 /* Address Family Identifier for IPV6 */
+
#ifdef __USE_MISC
/*
diff --git a/lib/libc/include/generic-glibc/nss.h b/lib/libc/include/generic-glibc/nss.h
index 09c496fb38..53187118a1 100644
--- a/lib/libc/include/generic-glibc/nss.h
+++ b/lib/libc/include/generic-glibc/nss.h
@@ -196,7 +196,7 @@ typedef enum nss_status nss_setspent (int);
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_endnetgrent _nss_##module##_endnetgrent; \
extern nss_endprotoent _nss_##module##_endprotoent; \
extern nss_endpwent _nss_##module##_endpwent; \
extern nss_endrpcent _nss_##module##_endrpcent; \
diff --git a/lib/libc/include/generic-glibc/pthread.h b/lib/libc/include/generic-glibc/pthread.h
index 28ba72711d..4c46be9a6a 100644
--- a/lib/libc/include/generic-glibc/pthread.h
+++ b/lib/libc/include/generic-glibc/pthread.h
@@ -29,7 +29,9 @@
#include <bits/types/struct_timespec.h>
#include <bits/types/__sigset_t.h>
#include <bits/types/struct___jmp_buf_tag.h>
-
+#ifdef __USE_MISC
+# include <bits/pthread_stack_min-dynamic.h>
+#endif
/* Detach state. */
enum
@@ -221,6 +223,7 @@ extern int pthread_join (pthread_t __th, void **__thread_return);
the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */
extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW;
+# ifndef __USE_TIME_BITS64
/* Make calling thread wait for termination of the thread TH, but only
until TIMEOUT. The exit status of the thread is stored in
*THREAD_RETURN, if THREAD_RETURN is not NULL.
@@ -240,6 +243,23 @@ extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return,
clockid_t __clockid,
const struct timespec *__abstime);
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (pthread_timedjoin_np,
+ (pthread_t __th, void **__thread_return,
+ const struct timespec *__abstime),
+ __pthread_timedjoin_np64);
+
+extern int __REDIRECT (pthread_clockjoin_np,
+ (pthread_t __th, void **__thread_return,
+ clockid_t __clockid,
+ const struct timespec *__abstime),
+ __pthread_clockjoin_np64);
+# else
+# define pthread_timedjoin_np __pthread_timedjoin_np64
+# define pthread_clockjoin_np __pthread_clockjoin_np64
+# endif
+# endif
#endif
/* Indicate that the thread TH is never to be joined with PTHREAD_JOIN.
@@ -454,11 +474,14 @@ extern int pthread_setconcurrency (int __level) __THROW;
#endif
#ifdef __USE_GNU
-/* Yield the processor to another thread or process.
- This function is similar to the POSIX `sched_yield' function but
- might be differently implemented in the case of a m-on-n thread
- implementation. */
extern int pthread_yield (void) __THROW;
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (pthread_yield, (void), sched_yield)
+ __attribute_deprecated_msg__ ("\
+pthread_yield is deprecated, use sched_yield instead");
+# else
+# define pthread_yield sched_yield
+# endif
/* Limit specified thread TH to run only on the processors represented
@@ -773,16 +796,39 @@ extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
#ifdef __USE_XOPEN2K
/* Wait until lock becomes available, or specified time passes. */
+# ifndef __USE_TIME_BITS64
extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 2));
+# else
+# ifdef __REDIRECT_NTHNL
+extern int __REDIRECT_NTHNL (pthread_mutex_timedlock,
+ (pthread_mutex_t *__restrict __mutex,
+ const struct timespec *__restrict __abstime),
+ __pthread_mutex_timedlock64) __nonnull ((1, 2));
+# else
+# define pthread_mutex_timedlock __pthread_mutex_timedlock64
+# endif
+# endif
#endif
#ifdef __USE_GNU
+# ifndef __USE_TIME_BITS64
extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex,
clockid_t __clockid,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 3));
+# else
+# ifdef __REDIRECT_NTHNL
+extern int __REDIRECT_NTHNL (pthread_mutex_clocklock,
+ (pthread_mutex_t *__restrict __mutex,
+ clockid_t __clockid,
+ const struct timespec *__restrict __abstime),
+ __pthread_mutex_clocklock64) __nonnull ((1, 3));
+# else
+# define pthread_mutex_clocklock __pthread_mutex_clocklock64
+# endif
+# endif
#endif
/* Unlock a mutex. */
@@ -809,8 +855,14 @@ extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
__THROW __nonnull ((1));
# ifdef __USE_GNU
-extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
- __THROW __nonnull ((1));
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (pthread_mutex_consistent_np, (pthread_mutex_t *),
+ pthread_mutex_consistent) __nonnull ((1))
+ __attribute_deprecated_msg__ ("\
+pthread_mutex_consistent_np is deprecated, use pthread_mutex_consistent");
+# else
+# define pthread_mutex_consistent_np pthread_mutex_consistent
+# endif
# endif
#endif
@@ -879,9 +931,15 @@ extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
int *__robustness)
__THROW __nonnull ((1, 2));
# ifdef __USE_GNU
-extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr,
- int *__robustness)
- __THROW __nonnull ((1, 2));
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (pthread_mutexattr_getrobust_np,
+ (pthread_mutex_t *, int *),
+ pthread_mutexattr_getrobust) __nonnull ((1))
+ __attribute_deprecated_msg__ ("\
+pthread_mutexattr_getrobust_np is deprecated, use pthread_mutexattr_getrobust");
+# else
+# define pthread_mutexattr_getrobust_np pthread_mutexattr_getrobust
+# endif
# endif
/* Set the robustness flag of the mutex attribute ATTR. */
@@ -889,13 +947,18 @@ extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
int __robustness)
__THROW __nonnull ((1));
# ifdef __USE_GNU
-extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
- int __robustness)
- __THROW __nonnull ((1));
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (pthread_mutexattr_setrobust_np,
+ (pthread_mutex_t *, int),
+ pthread_mutexattr_setrobust) __nonnull ((1))
+ __attribute_deprecated_msg__ ("\
+pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust");
+# else
+# define pthread_mutexattr_setrobust_np pthread_mutexattr_setrobust
+# endif
# endif
#endif
-
#if defined __USE_UNIX98 || defined __USE_XOPEN2K
/* Functions for handling read-write locks. */
@@ -919,16 +982,41 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
# ifdef __USE_XOPEN2K
/* Try to acquire read lock for RWLOCK or return after specfied time. */
+# ifndef __USE_TIME_BITS64
extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 2));
+# else
+# ifdef __REDIRECT_NTHNL
+extern int __REDIRECT_NTHNL (pthread_rwlock_timedrdlock,
+ (pthread_rwlock_t *__restrict __rwlock,
+ const struct timespec *__restrict __abstime),
+ __pthread_rwlock_timedrdlock64)
+ __nonnull ((1, 2));
+# else
+# define pthread_rwlock_timedrdlock __pthread_rwlock_timedrdlock64
+# endif
+# endif
# endif
# ifdef __USE_GNU
+# ifndef __USE_TIME_BITS64
extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock,
clockid_t __clockid,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 3));
+# else
+# ifdef __REDIRECT_NTHNL
+extern int __REDIRECT_NTHNL (pthread_rwlock_clockrdlock,
+ (pthread_rwlock_t *__restrict __rwlock,
+ clockid_t __clockid,
+ const struct timespec *__restrict __abstime),
+ __pthread_rwlock_clockrdlock64)
+ __nonnull ((1, 3));
+# else
+# define pthread_rwlock_clockrdlock __pthread_rwlock_clockrdlock64
+# endif
+# endif
# endif
/* Acquire write lock for RWLOCK. */
@@ -941,16 +1029,42 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
# ifdef __USE_XOPEN2K
/* Try to acquire write lock for RWLOCK or return after specfied time. */
+# ifndef __USE_TIME_BITS64
extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 2));
+# else
+# ifdef __REDIRECT_NTHNL
+extern int __REDIRECT_NTHNL (pthread_rwlock_timedwrlock,
+ (pthread_rwlock_t *__restrict __rwlock,
+ const struct timespec *__restrict __abstime),
+ __pthread_rwlock_timedwrlock64)
+ __nonnull ((1, 2));
+# else
+# define pthread_rwlock_timedwrlock __pthread_rwlock_timedwrlock64
+# endif
+# endif
# endif
# ifdef __USE_GNU
+# ifndef __USE_TIME_BITS64
extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock,
clockid_t __clockid,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 3));
+
+# else
+# ifdef __REDIRECT_NTHNL
+extern int __REDIRECT_NTHNL (pthread_rwlock_clockwrlock,
+ (pthread_rwlock_t *__restrict __rwlock,
+ clockid_t __clockid,
+ const struct timespec *__restrict __abstime),
+ __pthread_rwlock_clockwrlock64)
+ __nonnull ((1, 3));
+# else
+# define pthread_rwlock_clockwrlock __pthread_rwlock_clockwrlock64
+# endif
+# endif
# endif
/* Unlock RWLOCK. */
@@ -1027,10 +1141,23 @@ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
This function is a cancellation point and therefore not marked with
__THROW. */
+# ifndef __USE_TIME_BITS64
extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
pthread_mutex_t *__restrict __mutex,
const struct timespec *__restrict __abstime)
__nonnull ((1, 2, 3));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (pthread_cond_timedwait,
+ (pthread_cond_t *__restrict __cond,
+ pthread_mutex_t *__restrict __mutex,
+ const struct timespec *__restrict __abstime),
+ __pthread_cond_timedwait64)
+ __nonnull ((1, 2, 3));
+# else
+# define pthread_cond_timedwait __pthread_cond_timedwait64
+# endif
+# endif
# ifdef __USE_GNU
/* Wait for condition variable COND to be signaled or broadcast until
@@ -1040,11 +1167,25 @@ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
This function is a cancellation point and therefore not marked with
__THROW. */
+# ifndef __USE_TIME_BITS64
extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond,
pthread_mutex_t *__restrict __mutex,
__clockid_t __clock_id,
const struct timespec *__restrict __abstime)
__nonnull ((1, 2, 4));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (pthread_cond_clockwait,
+ (pthread_cond_t *__restrict __cond,
+ pthread_mutex_t *__restrict __mutex,
+ __clockid_t __clock_id,
+ const struct timespec *__restrict __abstime),
+ __pthread_cond_clockwait64)
+ __nonnull ((1, 2, 4));
+# else
+# define pthread_cond_clockwait __pthread_cond_clockwait64
+# endif
+# endif
# endif
/* Functions for handling condition variable attributes. */
@@ -1165,7 +1306,8 @@ extern void *pthread_getspecific (pthread_key_t __key) __THROW;
/* Store POINTER in the thread-specific data slot identified by KEY. */
extern int pthread_setspecific (pthread_key_t __key,
- const void *__pointer) __THROW ;
+ const void *__pointer)
+ __THROW __attr_access_none (2);
#ifdef __USE_XOPEN2K
diff --git a/lib/libc/include/generic-glibc/pwd.h b/lib/libc/include/generic-glibc/pwd.h
index 1d8329440a..382a580c2b 100644
--- a/lib/libc/include/generic-glibc/pwd.h
+++ b/lib/libc/include/generic-glibc/pwd.h
@@ -139,20 +139,23 @@ extern struct passwd *getpwnam (const char *__name) __nonnull ((1));
extern int getpwent_r (struct passwd *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
struct passwd **__restrict __result)
- __nonnull ((1, 2, 4));
+ __nonnull ((1, 2, 4))
+ __attr_access ((__write_only__, 2, 3));
# endif
extern int getpwuid_r (__uid_t __uid,
struct passwd *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
struct passwd **__restrict __result)
- __nonnull ((2, 3, 5));
+ __nonnull ((2, 3, 5))
+ __attr_access ((__write_only__, 3, 4));
extern int getpwnam_r (const char *__restrict __name,
struct passwd *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
struct passwd **__restrict __result)
- __nonnull ((1, 2, 3, 5));
+ __nonnull ((1, 2, 3, 5))
+ __attr_access ((__write_only__, 3, 4));
# ifdef __USE_MISC
@@ -167,7 +170,8 @@ extern int fgetpwent_r (FILE *__restrict __stream,
struct passwd *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
struct passwd **__restrict __result)
- __nonnull ((1, 2, 3, 5));
+ __nonnull ((1, 2, 3, 5))
+ __attr_access ((__write_only__, 3, 4));
# endif
#endif /* POSIX or reentrant */
diff --git a/lib/libc/include/generic-glibc/regex.h b/lib/libc/include/generic-glibc/regex.h
index ef5937f67b..0d44e6a12a 100644
--- a/lib/libc/include/generic-glibc/regex.h
+++ b/lib/libc/include/generic-glibc/regex.h
@@ -536,7 +536,8 @@ extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
'regcomp', with a malloc'ed value, or set to NULL before calling
'regfree'. */
extern const char *re_compile_pattern (const char *__pattern, size_t __length,
- struct re_pattern_buffer *__buffer);
+ struct re_pattern_buffer *__buffer)
+ __attr_access ((__read_only__, 1, 2));
/* Compile a fastmap for the compiled pattern in BUFFER; used to
@@ -553,7 +554,8 @@ extern int re_compile_fastmap (struct re_pattern_buffer *__buffer);
extern regoff_t re_search (struct re_pattern_buffer *__buffer,
const char *__String, regoff_t __length,
regoff_t __start, regoff_t __range,
- struct re_registers *__regs);
+ struct re_registers *__regs)
+ __attr_access ((__read_only__, 2, 3));
/* Like 're_search', but search in the concatenation of STRING1 and
@@ -563,14 +565,17 @@ extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
const char *__string2, regoff_t __length2,
regoff_t __start, regoff_t __range,
struct re_registers *__regs,
- regoff_t __stop);
+ regoff_t __stop)
+ __attr_access ((__read_only__, 2, 3))
+ __attr_access ((__read_only__, 4, 5));
/* Like 're_search', but return how many characters in STRING the regexp
in BUFFER matched, starting at position START. */
extern regoff_t re_match (struct re_pattern_buffer *__buffer,
const char *__String, regoff_t __length,
- regoff_t __start, struct re_registers *__regs);
+ regoff_t __start, struct re_registers *__regs)
+ __attr_access ((__read_only__, 2, 3));
/* Relates to 're_match' as 're_search_2' relates to 're_search'. */
@@ -578,7 +583,9 @@ extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,
const char *__string1, regoff_t __length1,
const char *__string2, regoff_t __length2,
regoff_t __start, struct re_registers *__regs,
- regoff_t __stop);
+ regoff_t __stop)
+ __attr_access ((__read_only__, 2, 3))
+ __attr_access ((__read_only__, 4, 5));
/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
@@ -648,10 +655,12 @@ extern int regcomp (regex_t *_Restrict_ __preg,
extern int regexec (const regex_t *_Restrict_ __preg,
const char *_Restrict_ __String, size_t __nmatch,
regmatch_t __pmatch[_Restrict_arr_],
- int __eflags);
+ int __eflags)
+ __attr_access ((__write_only__, 4, 3));
extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg,
- char *_Restrict_ __errbuf, size_t __errbuf_size);
+ char *_Restrict_ __errbuf, size_t __errbuf_size)
+ __attr_access ((__write_only__, 3, 4));
extern void regfree (regex_t *__preg);
diff --git a/lib/libc/include/generic-glibc/resolv.h b/lib/libc/include/generic-glibc/resolv.h
index 55f0916179..aadb9e79a7 100644
--- a/lib/libc/include/generic-glibc/resolv.h
+++ b/lib/libc/include/generic-glibc/resolv.h
@@ -168,20 +168,28 @@ __END_DECLS
#define res_close __res_close
#define res_init __res_init
#define res_isourserver __res_isourserver
-#define res_mkquery __res_mkquery
-#define res_query __res_query
-#define res_querydomain __res_querydomain
-#define res_search __res_search
-#define res_send __res_send
+
+#ifdef _LIBC
+# define __RESOLV_DEPRECATED
+# define __RESOLV_DEPRECATED_MSG(msg)
+#else
+# define __RESOLV_DEPRECATED __attribute_deprecated__
+# define __RESOLV_DEPRECATED_MSG(msg) __attribute_deprecated_msg__ (msg)
+#endif
__BEGIN_DECLS
-void fp_nquery (const unsigned char *, int, FILE *) __THROW;
-void fp_query (const unsigned char *, FILE *) __THROW;
-const char * hostalias (const char *) __THROW;
-void p_query (const unsigned char *) __THROW;
+void fp_nquery (const unsigned char *, int, FILE *) __THROW
+ __RESOLV_DEPRECATED;
+void fp_query (const unsigned char *, FILE *) __THROW
+ __RESOLV_DEPRECATED;
+const char * hostalias (const char *) __THROW
+ __RESOLV_DEPRECATED_MSG ("use getaddrinfo instead");
+void p_query (const unsigned char *) __THROW
+ __RESOLV_DEPRECATED;
void res_close (void) __THROW;
int res_init (void) __THROW;
-int res_isourserver (const struct sockaddr_in *) __THROW;
+int res_isourserver (const struct sockaddr_in *) __THROW
+ __RESOLV_DEPRECATED;
int res_mkquery (int, const char *, int, int,
const unsigned char *, int, const unsigned char *,
unsigned char *, int) __THROW;
@@ -197,10 +205,7 @@ __END_DECLS
#define b64_ntop __b64_ntop
#define b64_pton __b64_pton
-#define dn_comp __dn_comp
#define dn_count_labels __dn_count_labels
-#define dn_expand __dn_expand
-#define dn_skipname __dn_skipname
#define fp_resstat __fp_resstat
#define loc_aton __loc_aton
#define loc_ntoa __loc_ntoa
@@ -215,19 +220,10 @@ __END_DECLS
#define p_rcode __p_rcode
#define putlong __putlong
#define putshort __putshort
-#define res_dnok __res_dnok
-#define res_hnok __res_hnok
#define res_hostalias __res_hostalias
-#define res_mailok __res_mailok
#define res_nameinquery __res_nameinquery
#define res_nclose __res_nclose
#define res_ninit __res_ninit
-#define res_nmkquery __res_nmkquery
-#define res_nquery __res_nquery
-#define res_nquerydomain __res_nquerydomain
-#define res_nsearch __res_nsearch
-#define res_nsend __res_nsend
-#define res_ownok __res_ownok
#define res_queriesmatch __res_queriesmatch
#define res_randomid __res_randomid
#define sym_ntop __sym_ntop
@@ -238,50 +234,61 @@ int res_hnok (const char *) __THROW;
int res_ownok (const char *) __THROW;
int res_mailok (const char *) __THROW;
int res_dnok (const char *) __THROW;
-int sym_ston (const struct res_sym *, const char *, int *) __THROW;
-const char * sym_ntos (const struct res_sym *, int, int *) __THROW;
-const char * sym_ntop (const struct res_sym *, int, int *) __THROW;
+int sym_ston (const struct res_sym *, const char *, int *) __THROW
+ __RESOLV_DEPRECATED;
+const char * sym_ntos (const struct res_sym *, int, int *) __THROW
+ __RESOLV_DEPRECATED;
+const char * sym_ntop (const struct res_sym *, int, int *) __THROW
+ __RESOLV_DEPRECATED;
int b64_ntop (const unsigned char *, size_t, char *, size_t)
- __THROW;
+ __THROW;
int b64_pton (char const *, unsigned char *, size_t) __THROW;
-int loc_aton (const char *__ascii, unsigned char *__binary) __THROW;
-const char * loc_ntoa (const unsigned char *__binary, char *__ascii) __THROW;
+int loc_aton (const char *__ascii, unsigned char *__binary) __THROW
+ __RESOLV_DEPRECATED;
+const char * loc_ntoa (const unsigned char *__binary, char *__ascii) __THROW
+ __RESOLV_DEPRECATED;
int dn_skipname (const unsigned char *, const unsigned char *)
- __THROW;
-void putlong (uint32_t, unsigned char *) __THROW;
-void putshort (uint16_t, unsigned char *) __THROW;
-const char * p_class (int) __THROW;
-const char * p_time (uint32_t) __THROW;
-const char * p_type (int) __THROW;
-const char * p_rcode (int) __THROW;
-const unsigned char * p_cdnname (const unsigned char *,
- const unsigned char *, int, FILE *) __THROW;
+ __THROW;
+void putlong (uint32_t, unsigned char *) __THROW
+ __RESOLV_DEPRECATED_MSG ("use NS_PUT16 instead");
+void putshort (uint16_t, unsigned char *) __THROW
+ __RESOLV_DEPRECATED_MSG ("use NS_PUT32 instead");
+const char * p_class (int) __THROW __RESOLV_DEPRECATED;
+const char * p_time (uint32_t) __THROW __RESOLV_DEPRECATED;
+const char * p_type (int) __THROW __RESOLV_DEPRECATED;
+const char * p_rcode (int) __THROW __RESOLV_DEPRECATED;
+const unsigned char * p_cdnname (const unsigned char *, const unsigned char *,
+ int, FILE *) __THROW __RESOLV_DEPRECATED;
const unsigned char * p_cdname (const unsigned char *, const unsigned char *,
- FILE *) __THROW;
+ FILE *) __THROW __RESOLV_DEPRECATED;
const unsigned char * p_fqnname (const unsigned char *__cp,
const unsigned char *__msg,
- int, char *, int) __THROW;
-const unsigned char * p_fqname (const unsigned char *,
- const unsigned char *, FILE *) __THROW;
-const char * p_option (unsigned long __option) __THROW;
-int dn_count_labels (const char *) __THROW;
+ int, char *, int) __THROW __RESOLV_DEPRECATED;
+const unsigned char * p_fqname (const unsigned char *, const unsigned char *,
+ FILE *) __THROW __RESOLV_DEPRECATED;
+const char * p_option (unsigned long __option) __THROW __RESOLV_DEPRECATED;
+int dn_count_labels (const char *) __THROW __RESOLV_DEPRECATED;
int dn_comp (const char *, unsigned char *, int, unsigned char **,
unsigned char **) __THROW;
int dn_expand (const unsigned char *, const unsigned char *,
const unsigned char *, char *, int) __THROW;
-unsigned int res_randomid (void) __THROW;
+unsigned int res_randomid (void) __THROW
+ __RESOLV_DEPRECATED_MSG ("use getentropy instead");
int res_nameinquery (const char *, int, int,
const unsigned char *,
- const unsigned char *) __THROW;
+ const unsigned char *) __THROW
+ __RESOLV_DEPRECATED;
int res_queriesmatch (const unsigned char *,
const unsigned char *,
const unsigned char *,
- const unsigned char *) __THROW;
+ const unsigned char *) __THROW
+ __RESOLV_DEPRECATED;
/* Things involving a resolver context. */
int res_ninit (res_state) __THROW;
-void fp_resstat (const res_state, FILE *) __THROW;
+void fp_resstat (const res_state, FILE *) __THROW
+ __RESOLV_DEPRECATED;
const char * res_hostalias (const res_state, const char *, char *, size_t)
- __THROW;
+ __THROW __RESOLV_DEPRECATED_MSG ("use getaddrinfo instead");
int res_nquery (res_state, const char *, int, int,
unsigned char *, int) __THROW;
int res_nsearch (res_state, const char *, int, int,
diff --git a/lib/libc/include/generic-glibc/sched.h b/lib/libc/include/generic-glibc/sched.h
index cea5f6874c..2ecd9b3377 100644
--- a/lib/libc/include/generic-glibc/sched.h
+++ b/lib/libc/include/generic-glibc/sched.h
@@ -74,8 +74,17 @@ extern int sched_get_priority_max (int __algorithm) __THROW;
extern int sched_get_priority_min (int __algorithm) __THROW;
/* Get the SCHED_RR interval for the named process. */
+#ifndef __USE_TIME_BITS64
extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
-
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (sched_rr_get_interval,
+ (__pid_t __pid, struct timespec *__t),
+ __sched_rr_get_interval64);
+# else
+# define sched_rr_get_interval __sched_rr_get_interval64
+# endif
+#endif
#ifdef __USE_GNU
/* Access macros for `cpu_set'. */
diff --git a/lib/libc/include/generic-glibc/semaphore.h b/lib/libc/include/generic-glibc/semaphore.h
index 2eff18a327..f62f4d300c 100644
--- a/lib/libc/include/generic-glibc/semaphore.h
+++ b/lib/libc/include/generic-glibc/semaphore.h
@@ -59,16 +59,41 @@ extern int sem_wait (sem_t *__sem) __nonnull ((1));
This function is a cancellation point and therefore not marked with
__THROW. */
+# ifndef __USE_TIME_BITS64
extern int sem_timedwait (sem_t *__restrict __sem,
const struct timespec *__restrict __abstime)
__nonnull ((1, 2));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (sem_timedwait,
+ (sem_t *__restrict __sem,
+ const struct timespec *__restrict __abstime),
+ __sem_timedwait64)
+ __nonnull ((1, 2));
+# else
+# define sem_timedwait __sem_timedwait64
+# endif
+# endif
#endif
#ifdef __USE_GNU
+# ifndef __USE_TIME_BITS64
extern int sem_clockwait (sem_t *__restrict __sem,
clockid_t clock,
const struct timespec *__restrict __abstime)
__nonnull ((1, 3));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (sem_clockwait,
+ (sem_t *__restrict __sem,
+ clockid_t clock,
+ const struct timespec *__restrict __abstime),
+ __sem_clockwait64)
+ __nonnull ((1, 3));
+# else
+# define sem_clockwait __sem_clockwait64
+# endif
+# endif
#endif
/* Test whether SEM is posted. */
diff --git a/lib/libc/include/generic-glibc/signal.h b/lib/libc/include/generic-glibc/signal.h
index b3ac843ae6..d73d1f710e 100644
--- a/lib/libc/include/generic-glibc/signal.h
+++ b/lib/libc/include/generic-glibc/signal.h
@@ -269,10 +269,23 @@ extern int sigwaitinfo (const sigset_t *__restrict __set,
This function is a cancellation point and therefore not marked with
__THROW. */
+# ifndef __USE_TIME_BITS64
extern int sigtimedwait (const sigset_t *__restrict __set,
siginfo_t *__restrict __info,
const struct timespec *__restrict __timeout)
__nonnull ((1));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (sigtimedwait,
+ (const sigset_t *__restrict __set,
+ siginfo_t *__restrict __info,
+ const struct timespec *__restrict __timeout),
+ __sigtimedwait64)
+ __nonnull ((1));
+# else
+# define sigtimedwait __sigtimedwait64
+# endif
+# endif
/* Send signal SIG to the process PID. Associate data in VAL with the
signal. */
@@ -312,6 +325,7 @@ extern int siginterrupt (int __sig, int __interrupt) __THROW
__attribute_deprecated_msg__ ("Use sigaction with SA_RESTART instead");
# include <bits/sigstack.h>
+# include <bits/sigstksz.h>
# include <bits/ss_flags.h>
/* Alternate signal handler stack interface.
diff --git a/lib/libc/include/generic-glibc/spawn.h b/lib/libc/include/generic-glibc/spawn.h
index 466dab6970..b48b07c1b4 100644
--- a/lib/libc/include/generic-glibc/spawn.h
+++ b/lib/libc/include/generic-glibc/spawn.h
@@ -213,6 +213,14 @@ extern int posix_spawn_file_actions_addchdir_np (posix_spawn_file_actions_t *
extern int posix_spawn_file_actions_addfchdir_np (posix_spawn_file_actions_t *,
int __fd)
__THROW __nonnull ((1));
+
+/* Add an action to close all file descriptor greater than or equal to FROM
+ during spawn. This affects the subsequent file actions. */
+extern int
+posix_spawn_file_actions_addclosefrom_np (posix_spawn_file_actions_t *,
+ int __from)
+ __THROW __nonnull ((1));
+
#endif
__END_DECLS
diff --git a/lib/libc/include/generic-glibc/stdio.h b/lib/libc/include/generic-glibc/stdio.h
index 7381342f71..9f5bc7efd5 100644
--- a/lib/libc/include/generic-glibc/stdio.h
+++ b/lib/libc/include/generic-glibc/stdio.h
@@ -165,31 +165,43 @@ extern int renameat2 (int __oldfd, const char *__old, int __newfd,
const char *__new, unsigned int __flags) __THROW;
#endif
+/* Close STREAM.
+
+ This function is a possible cancellation point and therefore not
+ marked with __THROW. */
+extern int fclose (FILE *__stream);
+
+#undef __attr_dealloc_fclose
+#define __attr_dealloc_fclose __attr_dealloc (fclose, 1)
+
/* Create a temporary file and open it read/write.
This function is a possible cancellation point and therefore not
marked with __THROW. */
#ifndef __USE_FILE_OFFSET64
-extern FILE *tmpfile (void) __wur;
+extern FILE *tmpfile (void)
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
#else
# ifdef __REDIRECT
-extern FILE *__REDIRECT (tmpfile, (void), tmpfile64) __wur;
+extern FILE *__REDIRECT (tmpfile, (void), tmpfile64)
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
# else
# define tmpfile tmpfile64
# endif
#endif
#ifdef __USE_LARGEFILE64
-extern FILE *tmpfile64 (void) __wur;
+extern FILE *tmpfile64 (void)
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
#endif
/* Generate a temporary filename. */
-extern char *tmpnam (char *__s) __THROW __wur;
+extern char *tmpnam (char[L_tmpnam]) __THROW __wur;
#ifdef __USE_MISC
/* This is the reentrant variant of `tmpnam'. The only difference is
that it does not allow S to be NULL. */
-extern char *tmpnam_r (char *__s) __THROW __wur;
+extern char *tmpnam_r (char __s[L_tmpnam]) __THROW __wur;
#endif
@@ -202,15 +214,9 @@ extern char *tmpnam_r (char *__s) __THROW __wur;
P_tmpdir is tried and finally "/tmp". The storage for the filename
is allocated by `malloc'. */
extern char *tempnam (const char *__dir, const char *__pfx)
- __THROW __attribute_malloc__ __wur;
+ __THROW __attribute_malloc__ __wur __attr_dealloc_free;
#endif
-
-/* Close STREAM.
-
- This function is a possible cancellation point and therefore not
- marked with __THROW. */
-extern int fclose (FILE *__stream);
/* Flush STREAM, or all streams if STREAM is NULL.
This function is a possible cancellation point and therefore not
@@ -244,7 +250,8 @@ extern int fcloseall (void);
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern FILE *fopen (const char *__restrict __filename,
- const char *__restrict __modes) __wur;
+ const char *__restrict __modes)
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
/* Open a file, replacing an existing stream with it.
This function is a possible cancellation point and therefore not
@@ -256,7 +263,7 @@ extern FILE *freopen (const char *__restrict __filename,
# ifdef __REDIRECT
extern FILE *__REDIRECT (fopen, (const char *__restrict __filename,
const char *__restrict __modes), fopen64)
- __wur;
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
extern FILE *__REDIRECT (freopen, (const char *__restrict __filename,
const char *__restrict __modes,
FILE *__restrict __stream), freopen64)
@@ -268,7 +275,8 @@ extern FILE *__REDIRECT (freopen, (const char *__restrict __filename,
#endif
#ifdef __USE_LARGEFILE64
extern FILE *fopen64 (const char *__restrict __filename,
- const char *__restrict __modes) __wur;
+ const char *__restrict __modes)
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
extern FILE *freopen64 (const char *__restrict __filename,
const char *__restrict __modes,
FILE *__restrict __stream) __wur;
@@ -276,7 +284,8 @@ extern FILE *freopen64 (const char *__restrict __filename,
#ifdef __USE_POSIX
/* Create a new stream that refers to an existing system file descriptor. */
-extern FILE *fdopen (int __fd, const char *__modes) __THROW __wur;
+extern FILE *fdopen (int __fd, const char *__modes) __THROW
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
#endif
#ifdef __USE_GNU
@@ -284,21 +293,30 @@ extern FILE *fdopen (int __fd, const char *__modes) __THROW __wur;
and uses the given functions for input and output. */
extern FILE *fopencookie (void *__restrict __magic_cookie,
const char *__restrict __modes,
- cookie_io_functions_t __io_funcs) __THROW __wur;
+ cookie_io_functions_t __io_funcs) __THROW
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
#endif
#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2)
/* Create a new stream that refers to a memory buffer. */
extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
- __THROW __wur;
+ __THROW __attribute_malloc__ __attr_dealloc_fclose __wur;
/* Open a stream that writes into a malloc'd buffer that is expanded as
necessary. *BUFLOC and *SIZELOC are updated with the buffer's location
and the number of characters written on fflush or fclose. */
-extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW __wur;
+extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW
+ __attribute_malloc__ __attr_dealloc_fclose __wur;
+
+#ifdef _WCHAR_H
+/* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces
+ a wide character string. Declared here only to add attribute malloc
+ and only if <wchar.h> has been previously #included. */
+extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW
+ __attribute_malloc__ __attr_dealloc_fclose;
+# endif
#endif
-
/* If BUF is NULL, make STREAM unbuffered.
Else make it use buffer BUF, of size BUFSIZ. */
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW;
@@ -792,29 +810,33 @@ extern int fileno_unlocked (FILE *__stream) __THROW __wur;
#ifdef __USE_POSIX2
-/* Create a new stream connected to a pipe running the given command.
+/* Close a stream opened by popen and return the status of its child.
This function is a possible cancellation point and therefore not
marked with __THROW. */
-extern FILE *popen (const char *__command, const char *__modes) __wur;
+extern int pclose (FILE *__stream);
-/* Close a stream opened by popen and return the status of its child.
+/* Create a new stream connected to a pipe running the given command.
This function is a possible cancellation point and therefore not
marked with __THROW. */
-extern int pclose (FILE *__stream);
+extern FILE *popen (const char *__command, const char *__modes)
+ __attribute_malloc__ __attr_dealloc (pclose, 1) __wur;
+
#endif
#ifdef __USE_POSIX
/* Return the name of the controlling terminal. */
-extern char *ctermid (char *__s) __THROW;
+extern char *ctermid (char *__s) __THROW
+ __attr_access ((__write_only__, 1));
#endif /* Use POSIX. */
#if (defined __USE_XOPEN && !defined __USE_XOPEN2K) || defined __USE_GNU
/* Return the name of the current user. */
-extern char *cuserid (char *__s);
+extern char *cuserid (char *__s)
+ __attr_access ((__write_only__, 1));
#endif /* Use X/Open, but not issue 6. */
diff --git a/lib/libc/include/generic-glibc/stdlib.h b/lib/libc/include/generic-glibc/stdlib.h
index cbafd640e9..d04a49c967 100644
--- a/lib/libc/include/generic-glibc/stdlib.h
+++ b/lib/libc/include/generic-glibc/stdlib.h
@@ -550,6 +550,9 @@ extern void *calloc (size_t __nmemb, size_t __size)
extern void *realloc (void *__ptr, size_t __size)
__THROW __attribute_warn_unused_result__ __attribute_alloc_size__ ((2));
+/* Free a block allocated by `malloc', `realloc' or `calloc'. */
+extern void free (void *__ptr) __THROW;
+
#ifdef __USE_MISC
/* Re-allocate the previously allocated block in PTR, making the new
block large enough for NMEMB elements of SIZE bytes each. */
@@ -558,11 +561,13 @@ extern void *realloc (void *__ptr, size_t __size)
between objects pointed by the old and new pointers. */
extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
__THROW __attribute_warn_unused_result__
- __attribute_alloc_size__ ((2, 3));
-#endif
+ __attribute_alloc_size__ ((2, 3))
+ __attr_dealloc_free;
-/* Free a block allocated by `malloc', `realloc' or `calloc'. */
-extern void free (void *__ptr) __THROW;
+/* Add reallocarray as its own deallocator. */
+extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
+ __THROW __attr_dealloc (reallocarray, 1);
+#endif
#ifdef __USE_MISC
# include <alloca.h>
@@ -788,7 +793,8 @@ extern int system (const char *__command) __wur;
/* Return a malloc'd string containing the canonical absolute name of the
existing named file. */
extern char *canonicalize_file_name (const char *__name)
- __THROW __nonnull ((1)) __wur;
+ __THROW __nonnull ((1)) __attribute_malloc__
+ __attr_dealloc_free __wur;
#endif
#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
diff --git a/lib/libc/include/generic-glibc/sys/cdefs.h b/lib/libc/include/generic-glibc/sys/cdefs.h
index fc2e4be563..2d594e1ba6 100644
--- a/lib/libc/include/generic-glibc/sys/cdefs.h
+++ b/lib/libc/include/generic-glibc/sys/cdefs.h
@@ -34,7 +34,29 @@
#undef __P
#undef __PMT
-#ifdef __GNUC__
+/* Compilers that lack __has_attribute may object to
+ #if defined __has_attribute && __has_attribute (...)
+ even though they do not need to evaluate the right-hand side of the &&.
+ Similarly for __has_builtin, etc. */
+#if (defined __has_attribute \
+ && (!defined __clang_minor__ \
+ || 3 < __clang_major__ + (5 <= __clang_minor__)))
+# define __glibc_has_attribute(attr) __has_attribute (attr)
+#else
+# define __glibc_has_attribute(attr) 0
+#endif
+#ifdef __has_builtin
+# define __glibc_has_builtin(name) __has_builtin (name)
+#else
+# define __glibc_has_builtin(name) 0
+#endif
+#ifdef __has_extension
+# define __glibc_has_extension(ext) __has_extension (ext)
+#else
+# define __glibc_has_extension(ext) 0
+#endif
+
+#if defined __GNUC__ || defined __clang__
/* All functions, except those with callbacks or those that
synchronize memory, are leaf functions. */
@@ -48,16 +70,17 @@
/* GCC can always grok prototypes. For C++ programs we add throw()
to help it optimize the function calls. But this only works with
- gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
+ gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
as non-throwing using a function attribute since programs can use
the -fexceptions options for C code as well. */
-# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
+# if !defined __cplusplus \
+ && (__GNUC_PREREQ (3, 4) || __glibc_has_attribute (__nothrow__))
# define __THROW __attribute__ ((__nothrow__ __LEAF))
# define __THROWNL __attribute__ ((__nothrow__))
# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
# define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
# else
-# if defined __cplusplus && __GNUC_PREREQ (2,8)
+# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major >= 4)
# if __cplusplus >= 201103L
# define __THROW noexcept (true)
# else
@@ -74,7 +97,7 @@
# endif
# endif
-#else /* Not GCC. */
+#else /* Not GCC or clang. */
# if (defined __cplusplus \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
@@ -87,16 +110,7 @@
# define __THROWNL
# define __NTH(fct) fct
-#endif /* GCC. */
-
-/* Compilers that are not clang may object to
- #if defined __clang__ && __has_extension(...)
- even though they do not need to evaluate the right-hand side of the &&. */
-#if defined __clang__ && defined __has_extension
-# define __glibc_clang_has_extension(ext) __has_extension (ext)
-#else
-# define __glibc_clang_has_extension(ext) 0
-#endif
+#endif /* GCC || clang. */
/* These two macros are not used in glibc anymore. They are kept here
only because some other projects expect the macros to be defined. */
@@ -149,11 +163,11 @@
Headers that should use flexible arrays only if they're "real"
(e.g. only if they won't affect sizeof()) should test
#if __glibc_c99_flexarr_available. */
-#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __HP_cc
# define __flexarr []
# define __glibc_c99_flexarr_available 1
-#elif __GNUC_PREREQ (2,97)
-/* GCC 2.97 supports C99 flexible array members as an extension,
+#elif __GNUC_PREREQ (2,97) || defined __clang__
+/* GCC 2.97 and clang support C99 flexible array members as an extension,
even when in C89 mode or compiling C++ (any version). */
# define __flexarr []
# define __glibc_c99_flexarr_available 1
@@ -179,7 +193,7 @@
Example:
int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
-#if defined __GNUC__ && __GNUC__ >= 2
+#if (defined __GNUC__ && __GNUC__ >= 2) || (__clang_major__ >= 4)
# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
# ifdef __cplusplus
@@ -204,17 +218,17 @@
*/
#endif
-/* GCC has various useful declarations that can be made with the
- `__attribute__' syntax. All of the ways we use this do fine if
- they are omitted for compilers that don't understand it. */
-#if !defined __GNUC__ || __GNUC__ < 2
+/* GCC and clang have various useful declarations that can be made with
+ the '__attribute__' syntax. All of the ways we use this do fine if
+ they are omitted for compilers that don't understand it. */
+#if !(defined __GNUC__ || defined __clang__)
# define __attribute__(xyz) /* Ignore */
#endif
/* At some point during the gcc 2.96 development the `malloc' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
-#if __GNUC_PREREQ (2,96)
+#if __GNUC_PREREQ (2,96) || __glibc_has_attribute (__malloc__)
# define __attribute_malloc__ __attribute__ ((__malloc__))
#else
# define __attribute_malloc__ /* Ignore */
@@ -232,23 +246,29 @@
/* At some point during the gcc 2.96 development the `pure' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
-#if __GNUC_PREREQ (2,96)
+#if __GNUC_PREREQ (2,96) || __glibc_has_attribute (__pure__)
# define __attribute_pure__ __attribute__ ((__pure__))
#else
# define __attribute_pure__ /* Ignore */
#endif
/* This declaration tells the compiler that the value is constant. */
-#if __GNUC_PREREQ (2,5)
+#if __GNUC_PREREQ (2,5) || __glibc_has_attribute (__const__)
# define __attribute_const__ __attribute__ ((__const__))
#else
# define __attribute_const__ /* Ignore */
#endif
+#if __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__)
+# define __attribute_maybe_unused__ __attribute__ ((__unused__))
+#else
+# define __attribute_maybe_unused__ /* Ignore */
+#endif
+
/* At some point during the gcc 3.1 development the `used' attribute
for functions was introduced. We don't want to use it unconditionally
(although this would be possible) since it generates warnings. */
-#if __GNUC_PREREQ (3,1)
+#if __GNUC_PREREQ (3,1) || __glibc_has_attribute (__used__)
# define __attribute_used__ __attribute__ ((__used__))
# define __attribute_noinline__ __attribute__ ((__noinline__))
#else
@@ -257,7 +277,7 @@
#endif
/* Since version 3.2, gcc allows marking deprecated functions. */
-#if __GNUC_PREREQ (3,2)
+#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__deprecated__)
# define __attribute_deprecated__ __attribute__ ((__deprecated__))
#else
# define __attribute_deprecated__ /* Ignore */
@@ -267,7 +287,7 @@
when a deprecated function is used. clang claims to be gcc 4.2, but
may also support this feature. */
#if __GNUC_PREREQ (4,5) \
- || __glibc_clang_has_extension (__attribute_deprecated_with_message__)
+ || __glibc_has_extension (__attribute_deprecated_with_message__)
# define __attribute_deprecated_msg__(msg) \
__attribute__ ((__deprecated__ (msg)))
#else
@@ -280,7 +300,7 @@
If several `format_arg' attributes are given for the same function, in
gcc-3.0 and older, all but the last one are ignored. In newer gccs,
all designated arguments are considered. */
-#if __GNUC_PREREQ (2,8)
+#if __GNUC_PREREQ (2,8) || __glibc_has_attribute (__format_arg__)
# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
#else
# define __attribute_format_arg__(x) /* Ignore */
@@ -290,27 +310,42 @@
attribute for functions was introduced. We don't want to use it
unconditionally (although this would be possible) since it
generates warnings. */
-#if __GNUC_PREREQ (2,97)
+#if __GNUC_PREREQ (2,97) || __glibc_has_attribute (__format__)
# define __attribute_format_strfmon__(a,b) \
__attribute__ ((__format__ (__strfmon__, a, b)))
#else
# define __attribute_format_strfmon__(a,b) /* Ignore */
#endif
-/* The nonull function attribute allows to mark pointer parameters which
+/* The nonnull function attribute marks pointer parameters that
must not be NULL. */
-#if __GNUC_PREREQ (3,3)
-# define __nonnull(params) __attribute__ ((__nonnull__ params))
-#else
-# define __nonnull(params)
+#ifndef __nonnull
+# if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__)
+# define __nonnull(params) __attribute__ ((__nonnull__ params))
+# else
+# define __nonnull(params)
+# endif
+#elif !defined __GLIBC__
+# undef __nonnull
+# define __nonnull(params) _GL_ATTRIBUTE_NONNULL (params)
+#endif
+
+/* The returns_nonnull function attribute marks the return type of the function
+ as always being non-null. */
+#ifndef __returns_nonnull
+# if __GNUC_PREREQ (4, 9) || __glibc_has_attribute (__returns_nonnull__)
+# define __returns_nonnull __attribute__ ((__returns_nonnull__))
+# else
+# define __returns_nonnull
+# endif
#endif
/* If fortification mode, we warn about unused results of certain
function calls which can lead to problems. */
-#if __GNUC_PREREQ (3,4)
+#if __GNUC_PREREQ (3,4) || __glibc_has_attribute (__warn_unused_result__)
# define __attribute_warn_unused_result__ \
__attribute__ ((__warn_unused_result__))
-# if __USE_FORTIFY_LEVEL > 0
+# if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0
# define __wur __attribute_warn_unused_result__
# endif
#else
@@ -321,7 +356,7 @@
#endif
/* Forces a function to be always inlined. */
-#if __GNUC_PREREQ (3,2)
+#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__always_inline__)
/* The Linux kernel defines __always_inline in stddef.h (283d7573), and
it conflicts with this definition. Therefore undefine it first to
allow either header to be included first. */
@@ -334,7 +369,7 @@
/* Associate error messages with the source location of the call site rather
than with the source location inside the function. */
-#if __GNUC_PREREQ (4,3)
+#if __GNUC_PREREQ (4,3) || __glibc_has_attribute (__artificial__)
# define __attribute_artificial__ __attribute__ ((__artificial__))
#else
# define __attribute_artificial__ /* Ignore */
@@ -377,12 +412,14 @@
run in pedantic mode if the uses are carefully marked using the
`__extension__' keyword. But this is not generally available before
version 2.8. */
-#if !__GNUC_PREREQ (2,8)
+#if !(__GNUC_PREREQ (2,8) || defined __clang__)
# define __extension__ /* Ignore */
#endif
-/* __restrict is known in EGCS 1.2 and above. */
-#if !__GNUC_PREREQ (2,92)
+/* __restrict is known in EGCS 1.2 and above, and in clang.
+ It works also in C++ mode (outside of arrays), but only when spelled
+ as '__restrict', not 'restrict'. */
+#if !(__GNUC_PREREQ (2,92) || __clang_major__ >= 3)
# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
# define __restrict restrict
# else
@@ -392,8 +429,9 @@
/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is
array_name[restrict]
- GCC 3.1 supports this. */
-#if __GNUC_PREREQ (3,1) && !defined __GNUG__
+ GCC 3.1 and clang support this.
+ This syntax is not usable in C++ mode. */
+#if (__GNUC_PREREQ (3,1) || __clang_major__ >= 3) && !defined __cplusplus
# define __restrict_arr __restrict
#else
# ifdef __GNUC__
@@ -408,7 +446,7 @@
# endif
#endif
-#if __GNUC__ >= 3
+#if (__GNUC__ >= 3) || __glibc_has_builtin (__builtin_expect)
# define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
# define __glibc_likely(cond) __builtin_expect ((cond), 1)
#else
@@ -416,15 +454,10 @@
# define __glibc_likely(cond) (cond)
#endif
-#ifdef __has_attribute
-# define __glibc_has_attribute(attr) __has_attribute (attr)
-#else
-# define __glibc_has_attribute(attr) 0
-#endif
-
#if (!defined _Noreturn \
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
- && !__GNUC_PREREQ (4,7))
+ && !(__GNUC_PREREQ (4,7) \
+ || (3 < __clang_major__ + (5 <= __clang_minor__))))
# if __GNUC_PREREQ (2,8)
# define _Noreturn __attribute__ ((__noreturn__))
# else
@@ -453,14 +486,19 @@
#if (!defined _Static_assert && !defined __cplusplus \
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
- && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__))
+ && (!(__GNUC_PREREQ (4, 6) || __clang_major__ >= 4) \
+ || defined __STRICT_ANSI__))
# define _Static_assert(expr, diagnostic) \
extern int (*__Static_assert_function (void)) \
[!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
#endif
-#include <bits/wordsize.h>
-#include <bits/long-double.h>
+/* The #ifndef lets Gnulib avoid including these on non-glibc
+ platforms, where the includes typically do not exist. */
+#ifdef __GLIBC__
+# include <bits/wordsize.h>
+# include <bits/long-double.h>
+#endif
#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
# ifdef __REDIRECT
@@ -550,7 +588,7 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
check is required to enable the use of generic selection. */
#if !defined __cplusplus \
&& (__GNUC_PREREQ (4, 9) \
- || __glibc_clang_has_extension (c_generic_selections) \
+ || __glibc_has_extension (c_generic_selections) \
|| (!defined __GNUC__ && defined __STDC_VERSION__ \
&& __STDC_VERSION__ >= 201112L))
# define __HAVE_GENERIC_SELECTION 1
@@ -564,9 +602,26 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
array according to access mode, or at least one element when
size-index is not provided:
access (access-mode, <ref-index> [, <size-index>]) */
-#define __attr_access(x) __attribute__ ((__access__ x))
+# define __attr_access(x) __attribute__ ((__access__ x))
+# if __GNUC_PREREQ (11, 0)
+# define __attr_access_none(argno) __attribute__ ((__access__ (__none__, argno)))
+# else
+# define __attr_access_none(argno)
+# endif
#else
# define __attr_access(x)
+# define __attr_access_none(argno)
+#endif
+
+#if __GNUC_PREREQ (11, 0)
+/* Designates dealloc as a function to call to deallocate objects
+ allocated by the declared function. */
+# define __attr_dealloc(dealloc, argno) \
+ __attribute__ ((__malloc__ (dealloc, argno)))
+# define __attr_dealloc_free __attr_dealloc (__builtin_free, 1)
+#else
+# define __attr_dealloc(dealloc, argno)
+# define __attr_dealloc_free
#endif
/* Specify that a function such as setjmp or vfork may return
diff --git a/lib/libc/include/generic-glibc/sys/ioctl.h b/lib/libc/include/generic-glibc/sys/ioctl.h
index f74a78b3c3..0bf578863e 100644
--- a/lib/libc/include/generic-glibc/sys/ioctl.h
+++ b/lib/libc/include/generic-glibc/sys/ioctl.h
@@ -38,7 +38,17 @@ __BEGIN_DECLS
/* Perform the I/O control operation specified by REQUEST on FD.
One argument may follow; its presence and type depend on REQUEST.
Return value depends on REQUEST. Usually -1 indicates error. */
+#ifndef __USE_TIME_BITS64
extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT (ioctl, (int __fd, unsigned long int __request, ...),
+ __ioctl_time64) __THROW;
+# else
+extern int __ioctl_time64 (int __fd, unsigned long int __request, ...) __THROW;
+# define ioctl __ioctl_time64
+# endif
+#endif
__END_DECLS
diff --git a/lib/libc/include/generic-glibc/sys/mount.h b/lib/libc/include/generic-glibc/sys/mount.h
index 1eb8f0d067..ea7a023b09 100644
--- a/lib/libc/include/generic-glibc/sys/mount.h
+++ b/lib/libc/include/generic-glibc/sys/mount.h
@@ -48,6 +48,8 @@ enum
#define MS_MANDLOCK MS_MANDLOCK
MS_DIRSYNC = 128, /* Directory modifications are synchronous. */
#define MS_DIRSYNC MS_DIRSYNC
+ MS_NOSYMFOLLOW = 256, /* Do not follow symlinks. */
+#define MS_NOSYMFOLLOW MS_NOSYMFOLLOW
MS_NOATIME = 1024, /* Do not update access times. */
#define MS_NOATIME MS_NOATIME
MS_NODIRATIME = 2048, /* Do not update directory access times. */
diff --git a/lib/libc/include/generic-glibc/sys/msg.h b/lib/libc/include/generic-glibc/sys/msg.h
index 6e421f1d22..325812a981 100644
--- a/lib/libc/include/generic-glibc/sys/msg.h
+++ b/lib/libc/include/generic-glibc/sys/msg.h
@@ -58,7 +58,17 @@ struct msgbuf
__BEGIN_DECLS
/* Message queue control operation. */
+#ifndef __USE_TIME_BITS64
extern int msgctl (int __msqid, int __cmd, struct msqid_ds *__buf) __THROW;
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (msgctl,
+ (int __msqid, int __cmd, struct msqid_ds *__buf),
+ __msgctl64);
+# else
+# define msgctl __msgctl64
+# endif
+#endif
/* Get messages queue. */
extern int msgget (key_t __key, int __msgflg) __THROW;
diff --git a/lib/libc/include/generic-glibc/sys/platform/x86.h b/lib/libc/include/generic-glibc/sys/platform/x86.h
index 4ff21517be..1d0d73c948 100644
--- a/lib/libc/include/generic-glibc/sys/platform/x86.h
+++ b/lib/libc/include/generic-glibc/sys/platform/x86.h
@@ -30,7 +30,7 @@ extern const struct cpuid_feature *__x86_get_cpuid_feature_leaf (unsigned int)
__attribute__ ((pure));
static __inline__ _Bool
-x86_cpu_has_feature (unsigned int __index)
+x86_cpu_present (unsigned int __index)
{
const struct cpuid_feature *__ptr = __x86_get_cpuid_feature_leaf
(__index / (8 * sizeof (unsigned int) * 4));
@@ -43,7 +43,7 @@ x86_cpu_has_feature (unsigned int __index)
}
static __inline__ _Bool
-x86_cpu_is_usable (unsigned int __index)
+x86_cpu_active (unsigned int __index)
{
const struct cpuid_feature *__ptr = __x86_get_cpuid_feature_leaf
(__index / (8 * sizeof (unsigned int) * 4));
@@ -52,13 +52,13 @@ x86_cpu_is_usable (unsigned int __index)
unsigned int __bit = __reg & (8 * sizeof (unsigned int) - 1);
__reg /= 8 * sizeof (unsigned int);
- return __ptr->usable_array[__reg] & (1 << __bit);
+ return __ptr->active_array[__reg] & (1 << __bit);
}
-/* HAS_CPU_FEATURE evaluates to true if CPU supports the feature. */
-#define HAS_CPU_FEATURE(name) x86_cpu_has_feature (x86_cpu_##name)
-/* CPU_FEATURE_USABLE evaluates to true if the feature is usable. */
-#define CPU_FEATURE_USABLE(name) x86_cpu_is_usable (x86_cpu_##name)
+/* CPU_FEATURE_PRESENT evaluates to true if CPU supports the feature. */
+#define CPU_FEATURE_PRESENT(name) x86_cpu_present (x86_cpu_##name)
+/* CPU_FEATURE_ACTIVE evaluates to true if the feature is active. */
+#define CPU_FEATURE_ACTIVE(name) x86_cpu_active (x86_cpu_##name)
__END_DECLS
diff --git a/lib/libc/include/generic-glibc/sys/poll.h b/lib/libc/include/generic-glibc/sys/poll.h
index b5947952ff..358e8c2b80 100644
--- a/lib/libc/include/generic-glibc/sys/poll.h
+++ b/lib/libc/include/generic-glibc/sys/poll.h
@@ -51,7 +51,8 @@ __BEGIN_DECLS
This function is a cancellation point and therefore not marked with
__THROW. */
-extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout);
+extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout)
+ __attr_access ((__write_only__, 1, 2));
#ifdef __USE_GNU
/* Like poll, but before waiting the threads signal mask is replaced
@@ -62,7 +63,20 @@ extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout);
__THROW. */
extern int ppoll (struct pollfd *__fds, nfds_t __nfds,
const struct timespec *__timeout,
- const __sigset_t *__ss);
+ const __sigset_t *__ss)
+ __attr_access ((__write_only__, 1, 2));
+
+# ifdef __USE_TIME_BITS64
+# ifdef __REDIRECT
+extern int __REDIRECT (ppoll, (struct pollfd *__fds, nfds_t __nfds,
+ const struct timespec *__timeout,
+ const __sigset_t *__ss),
+ __ppoll64)
+ __attr_access ((__write_only__, 1, 2));
+# else
+# define ppoll __ppoll64
+# endif
+# endif
#endif
__END_DECLS
diff --git a/lib/libc/include/generic-glibc/sys/prctl.h b/lib/libc/include/generic-glibc/sys/prctl.h
index b22bbe264b..5435c0473a 100644
--- a/lib/libc/include/generic-glibc/sys/prctl.h
+++ b/lib/libc/include/generic-glibc/sys/prctl.h
@@ -25,10 +25,6 @@
we're picking up... */
/* Memory tagging control operations (for AArch64). */
-#ifndef PR_TAGGED_ADDR_ENABLE
-# define PR_TAGGED_ADDR_ENABLE (1UL << 8)
-#endif
-
#ifndef PR_MTE_TCF_SHIFT
# define PR_MTE_TCF_SHIFT 1
# define PR_MTE_TCF_NONE (0UL << PR_MTE_TCF_SHIFT)
@@ -42,7 +38,17 @@
__BEGIN_DECLS
/* Control process execution. */
+#ifndef __USE_TIME_BITS64
extern int prctl (int __option, ...) __THROW;
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT (prctl, (int __option, ...), __prctl_time64) __THROW;
+# else
+extern int __prctl_time64 (int __option,d ...) __THROW;
+# define ioctl __prctl_time64
+# endif
+#endif
+
__END_DECLS
diff --git a/lib/libc/include/generic-glibc/sys/resource.h b/lib/libc/include/generic-glibc/sys/resource.h
index 52ea01a148..da44ec0320 100644
--- a/lib/libc/include/generic-glibc/sys/resource.h
+++ b/lib/libc/include/generic-glibc/sys/resource.h
@@ -48,18 +48,19 @@ typedef int __priority_which_t;
Returns 0 if successful, -1 if not (and sets errno). */
#ifndef __USE_FILE_OFFSET64
extern int getrlimit (__rlimit_resource_t __resource,
- struct rlimit *__rlimits) __THROW;
+ struct rlimit *__rlimits) __THROW __nonnull ((2));
#else
# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (getrlimit, (__rlimit_resource_t __resource,
- struct rlimit *__rlimits), getrlimit64);
+ struct rlimit *__rlimits), getrlimit64)
+ __nonnull ((2));
# else
# define getrlimit getrlimit64
# endif
#endif
#ifdef __USE_LARGEFILE64
extern int getrlimit64 (__rlimit_resource_t __resource,
- struct rlimit64 *__rlimits) __THROW;
+ struct rlimit64 *__rlimits) __THROW __nonnull ((2));
#endif
/* Set the soft and hard limits for RESOURCE to *RLIMITS.
@@ -67,25 +68,36 @@ extern int getrlimit64 (__rlimit_resource_t __resource,
Return 0 if successful, -1 if not (and sets errno). */
#ifndef __USE_FILE_OFFSET64
extern int setrlimit (__rlimit_resource_t __resource,
- const struct rlimit *__rlimits) __THROW;
+ const struct rlimit *__rlimits) __THROW __nonnull ((2));
#else
# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (setrlimit, (__rlimit_resource_t __resource,
const struct rlimit *__rlimits),
- setrlimit64);
+ setrlimit64) __nonnull ((2));
# else
# define setrlimit setrlimit64
# endif
#endif
#ifdef __USE_LARGEFILE64
extern int setrlimit64 (__rlimit_resource_t __resource,
- const struct rlimit64 *__rlimits) __THROW;
+ const struct rlimit64 *__rlimits) __THROW
+ __nonnull ((2));
#endif
/* Return resource usage information on process indicated by WHO
and put it in *USAGE. Returns 0 for success, -1 for failure. */
extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __THROW;
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT_NTH)
+extern int __REDIRECT_NTH (getrusage, (__rusage_who_t __who,
+ struct rusage *__usage),
+ __getrusage64);
+# else
+# define getrusage __getrusage64
+# endif
+#endif
+
/* Return the highest priority of any process specified by WHICH and WHO
(see above); if WHO is zero, the current process, process group, or user
(as specified by WHO) is used. A lower priority number means higher
diff --git a/lib/libc/include/generic-glibc/sys/select.h b/lib/libc/include/generic-glibc/sys/select.h
index ecf5c60674..47298cf1fa 100644
--- a/lib/libc/include/generic-glibc/sys/select.h
+++ b/lib/libc/include/generic-glibc/sys/select.h
@@ -98,10 +98,23 @@ __BEGIN_DECLS
This function is a cancellation point and therefore not marked with
__THROW. */
+#ifndef __USE_TIME_BITS64
extern int select (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
struct timeval *__restrict __timeout);
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT (select,
+ (int __nfds, fd_set *__restrict __readfds,
+ fd_set *__restrict __writefds,
+ fd_set *__restrict __exceptfds,
+ struct timeval *__restrict __timeout),
+ __select64);
+# else
+# define select __select64
+# endif
+#endif
#ifdef __USE_XOPEN2K
/* Same as above only that the TIMEOUT value is given with higher
@@ -110,11 +123,25 @@ extern int select (int __nfds, fd_set *__restrict __readfds,
This function is a cancellation point and therefore not marked with
__THROW. */
+# ifndef __USE_TIME_BITS64
extern int pselect (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
const struct timespec *__restrict __timeout,
const __sigset_t *__restrict __sigmask);
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (pselect,
+ (int __nfds, fd_set *__restrict __readfds,
+ fd_set *__restrict __writefds,
+ fd_set *__restrict __exceptfds,
+ const struct timespec *__restrict __timeout,
+ const __sigset_t *__restrict __sigmask),
+ __pselect64);
+# else
+# define pselect __pselect64
+# endif
+# endif
#endif
diff --git a/lib/libc/include/generic-glibc/sys/sem.h b/lib/libc/include/generic-glibc/sys/sem.h
index a1ba6ef73d..f8d45b1038 100644
--- a/lib/libc/include/generic-glibc/sys/sem.h
+++ b/lib/libc/include/generic-glibc/sys/sem.h
@@ -48,7 +48,17 @@ struct sembuf
__BEGIN_DECLS
/* Semaphore control operation. */
+#ifndef __USE_TIME_BITS64
extern int semctl (int __semid, int __semnum, int __cmd, ...) __THROW;
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (semctl,
+ (int __semid, int __semnum, int __cmd, ...),
+ __semctl64);
+# else
+# define semctl __semctl64
+# endif
+#endif
/* Get semaphore. */
extern int semget (key_t __key, int __nsems, int __semflg) __THROW;
@@ -58,8 +68,19 @@ extern int semop (int __semid, struct sembuf *__sops, size_t __nsops) __THROW;
#ifdef __USE_GNU
/* Operate on semaphore with timeout. */
+# ifndef __USE_TIME_BITS64
extern int semtimedop (int __semid, struct sembuf *__sops, size_t __nsops,
const struct timespec *__timeout) __THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (semtimedop, (int __semid, struct sembuf *__sops,
+ size_t __nsops,
+ const struct timespec *__timeout),
+ __semtimedop64);
+# else
+# define semtimedop __semtimedop64
+# endif
+# endif
#endif
__END_DECLS
diff --git a/lib/libc/include/generic-glibc/sys/shm.h b/lib/libc/include/generic-glibc/sys/shm.h
index bd4d8e9703..6fbac17523 100644
--- a/lib/libc/include/generic-glibc/sys/shm.h
+++ b/lib/libc/include/generic-glibc/sys/shm.h
@@ -46,7 +46,17 @@ __BEGIN_DECLS
facility. The definition is found in XPG4.2. */
/* Shared memory control operation. */
+#ifndef __USE_TIME_BITS64
extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf) __THROW;
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (shmctl,
+ (int __shmid, int __cmd, struct shmid_ds *__buf),
+ __shmctl64);
+# else
+# define shmctl __shmctl64
+# endif
+#endif
/* Get shared memory segment. */
extern int shmget (key_t __key, size_t __size, int __shmflg) __THROW;
diff --git a/lib/libc/include/generic-glibc/sys/socket.h b/lib/libc/include/generic-glibc/sys/socket.h
index b2ed8b968c..2599db5d59 100644
--- a/lib/libc/include/generic-glibc/sys/socket.h
+++ b/lib/libc/include/generic-glibc/sys/socket.h
@@ -170,8 +170,20 @@ extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
This function is a cancellation point and therefore not marked with
__THROW. */
+#ifndef __USE_TIME_BITS64
extern ssize_t sendmsg (int __fd, const struct msghdr *__message,
int __flags);
+#else
+# ifdef __REDIRECT
+extern ssize_t __REDIRECT (sendmsg, (int __fd, const struct msghdr *__message,
+ int __flags),
+ __sendmsg64);
+# else
+extern ssize_t __sendmsg64 (int __fd, const struct msghdr *__message,
+ int __flags);
+# defien sendmsg __sendmsg64
+# endif
+#endif
#ifdef __USE_GNU
/* Send a VLEN messages as described by VMESSAGES to socket FD.
@@ -179,16 +191,39 @@ extern ssize_t sendmsg (int __fd, const struct msghdr *__message,
This function is a cancellation point and therefore not marked with
__THROW. */
+# ifndef __USE_TIME_BITS64
extern int sendmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags);
-#endif
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (sendmmsg, (int __fd, struct mmsghdr *__vmessages,
+ unsigned int __vlen, int __flags),
+ __sendmmsg64);
+# else
+extern int __sendmmsg64 (int __fd, struct mmsghdr *__vmessages,
+ unsigned int __vlen, int __flags);
+# define sendmmsg __sendmmsg64
+# endif
+# endif /* __USE_TIME_BITS64 */
+#endif /* __USE_GNU */
/* Receive a message as described by MESSAGE from socket FD.
Returns the number of bytes read or -1 for errors.
This function is a cancellation point and therefore not marked with
__THROW. */
+#ifndef __USE_TIME_BITS64
extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);
+#else
+# ifdef __REDIRECT
+extern ssize_t __REDIRECT (recvmsg,
+ (int __fd, struct msghdr *__message, int __flags),
+ __recvmsg64);
+# else
+extern ssize_t __recvmsg64 (int __fd, struct msghdr *__message, int __flags);
+# define recvmsg __recvmsg64
+# endif
+#endif
#ifdef __USE_GNU
/* Receive up to VLEN messages as described by VMESSAGES from socket FD.
@@ -196,24 +231,63 @@ extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);
This function is a cancellation point and therefore not marked with
__THROW. */
+# ifndef __USE_TIME_BITS64
extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags,
struct timespec *__tmo);
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (recvmmsg, (int __fd, struct mmsghdr *__vmessages,
+ unsigned int __vlen, int __flags,
+ struct timespec *__tmo),
+ __recvmmsg64);
+# else
+# define recvmmsg __recvmmsg64
+# endif
+# endif
#endif
/* Put the current value for socket FD's option OPTNAME at protocol level LEVEL
into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's
actual length. Returns 0 on success, -1 for errors. */
+#ifndef __USE_TIME_BITS64
extern int getsockopt (int __fd, int __level, int __optname,
void *__restrict __optval,
socklen_t *__restrict __optlen) __THROW;
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT_NTH (getsockopt,
+ (int __fd, int __level, int __optname,
+ void *__restrict __optval,
+ socklen_t *__restrict __optlen),
+ __getsockopt64);
+# else
+extern int __getsockopt64 (int __fd, int __level, int __optname,
+ void *__restrict __optval,
+ socklen_t *__restrict __optlen) __THROW;
+# define getsockopt __getsockopt64
+# endif
+#endif
/* Set socket FD's option OPTNAME at protocol level LEVEL
to *OPTVAL (which is OPTLEN bytes long).
Returns 0 on success, -1 for errors. */
+#ifndef __USE_TIME_BITS64
extern int setsockopt (int __fd, int __level, int __optname,
const void *__optval, socklen_t __optlen) __THROW;
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT_NTH (setsockopt,
+ (int __fd, int __level, int __optname,
+ const void *__optval, socklen_t __optlen),
+ __setsockopt64);
+# else
+extern int __setsockopt64 (int __fd, int __level, int __optname,
+ const void *__optval, socklen_t __optlen) __THROW;
+# define setsockopt __setsockopt64
+# endif
+#endif
/* Prepare to accept connections on socket FD.
diff --git a/lib/libc/include/generic-glibc/sys/stat.h b/lib/libc/include/generic-glibc/sys/stat.h
index 77e0e23e08..f1248327fb 100644
--- a/lib/libc/include/generic-glibc/sys/stat.h
+++ b/lib/libc/include/generic-glibc/sys/stat.h
@@ -209,21 +209,51 @@ extern int stat (const char *__restrict __file,
that file descriptor FD is open on and put them in BUF. */
extern int fstat (int __fd, struct stat *__buf) __THROW __nonnull ((2));
#else
-# ifdef __REDIRECT_NTH
+# ifdef __USE_TIME_BITS64
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (stat, (const char *__restrict __file,
+ struct stat *__restrict __buf),
+ __stat64_time64)
+ __nonnull ((1, 2));
+extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf),
+ __fstat64_time64)
+ __nonnull ((2));
+# else
+# define stat __stat64_time64
+# define fstat __fstat64_time64
+# endif
+# else
+# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (stat, (const char *__restrict __file,
struct stat *__restrict __buf), stat64)
__nonnull ((1, 2));
extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64)
__nonnull ((2));
-# else
-# define stat stat64
-# define fstat fstat64
+# else
+# define stat stat64
+# define fstat fstat64
+# endif
# endif
#endif
#ifdef __USE_LARGEFILE64
+# ifndef __USE_TIME_BITS64
extern int stat64 (const char *__restrict __file,
struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2));
extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (stat64, (const char *__restrict __file,
+ struct stat64 *__restrict __buf),
+ __stat64_time64)
+ __nonnull ((1, 2));
+extern int __REDIRECT_NTH (fstat64, (int __fd, struct stat64 *__buf),
+ __fstat64_time64)
+ __nonnull ((2));
+# else
+# define stat64 __stat64_time64
+# define fstat64 __fstat64_time
+# endif
+# endif
#endif
#ifdef __USE_ATFILE
@@ -235,20 +265,44 @@ extern int fstatat (int __fd, const char *__restrict __file,
struct stat *__restrict __buf, int __flag)
__THROW __nonnull ((2, 3));
# else
-# ifdef __REDIRECT_NTH
+# ifdef __USE_TIME_BITS64
+# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
struct stat *__restrict __buf,
int __flag),
- fstatat64) __nonnull ((2, 3));
+ __fstatat64_time64) __nonnull ((2, 3));
+# else
+# define fstatat __fstatat64_time64
+# endif
# else
-# define fstatat fstatat64
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
+ struct stat *__restrict __buf,
+ int __flag),
+ fstatat64) __nonnull ((2, 3));
+# else
+# define fstatat fstatat64
+# endif
# endif
# endif
# ifdef __USE_LARGEFILE64
+# ifndef __USE_TIME_BITS64
extern int fstatat64 (int __fd, const char *__restrict __file,
struct stat64 *__restrict __buf, int __flag)
__THROW __nonnull ((2, 3));
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (fstatat64, (int __fd,
+ const char *__restrict __file,
+ struct stat64 *__restrict __buf,
+ int __flag),
+ __fstatat64_time64)
+ __nonnull ((2, 3));
+# else
+# define fstatat64 __fstatat64_time64
+# endif
+# endif
# endif
#endif
@@ -259,19 +313,37 @@ extern int fstatat64 (int __fd, const char *__restrict __file,
extern int lstat (const char *__restrict __file,
struct stat *__restrict __buf) __THROW __nonnull ((1, 2));
# else
-# ifdef __REDIRECT_NTH
+# ifdef __USE_TIME_BITS64
+# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (lstat,
(const char *__restrict __file,
- struct stat *__restrict __buf), lstat64)
+ struct stat *__restrict __buf), __lstat64_time64)
__nonnull ((1, 2));
+# else
+# define lstat __lstat64_time64
+# endif
# else
-# define lstat lstat64
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (lstat,
+ (const char *__restrict __file,
+ struct stat *__restrict __buf), lstat64)
+ __nonnull ((1, 2));
+# else
+# define lstat lstat64
+# endif
# endif
# endif
# ifdef __USE_LARGEFILE64
+# ifndef __USE_TIME_BITS64
extern int lstat64 (const char *__restrict __file,
struct stat64 *__restrict __buf)
__THROW __nonnull ((1, 2));
+# else
+extern int __REDIRECT_NTH (lstat64, (const char *__restrict __file,
+ struct stat64 *__restrict __buf),
+ __lstat64_time64)
+ __nonnull ((1, 2));
+# endif
# endif
#endif
@@ -355,17 +427,38 @@ extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
#endif
#ifdef __USE_ATFILE
+# ifndef __USE_TIME_BITS64
/* Set file access and modification times relative to directory file
descriptor. */
extern int utimensat (int __fd, const char *__path,
const struct timespec __times[2],
int __flags)
__THROW __nonnull ((2));
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (utimensat, (int fd, const char *__path,
+ const struct timespec __times[2],
+ int flags),
+ __utimensat64) __nonnull ((2));
+# else
+# define utimensat __utimensat64
+# endif
+# endif
#endif
#ifdef __USE_XOPEN2K8
+# ifndef __USE_TIME_BITS64
/* Set file access and modification times of the file associated with FD. */
extern int futimens (int __fd, const struct timespec __times[2]) __THROW;
+
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (futimens, (int fd, const struct timespec __times[2]),
+ __futimens64);
+# else
+# define futimens __futimens64
+# endif
+# endif
#endif
#ifdef __USE_GNU
diff --git a/lib/libc/include/generic-glibc/sys/statvfs.h b/lib/libc/include/generic-glibc/sys/statvfs.h
index bcb73bc191..a36a9ada1d 100644
--- a/lib/libc/include/generic-glibc/sys/statvfs.h
+++ b/lib/libc/include/generic-glibc/sys/statvfs.h
@@ -21,7 +21,7 @@
#include <features.h>
-/* Get the system-specific definition of `struct statfs'. */
+/* Get the system-specific definition of `struct statvfs'. */
#include <bits/statvfs.h>
#ifndef __USE_FILE_OFFSET64
diff --git a/lib/libc/include/generic-glibc/sys/time.h b/lib/libc/include/generic-glibc/sys/time.h
index 4f935c1cae..35bad81116 100644
--- a/lib/libc/include/generic-glibc/sys/time.h
+++ b/lib/libc/include/generic-glibc/sys/time.h
@@ -63,10 +63,21 @@ struct timezone
use localtime etc. instead.
This function itself is semi-obsolete;
most callers should use time or clock_gettime instead. */
+#ifndef __USE_TIME_BITS64
extern int gettimeofday (struct timeval *__restrict __tv,
void *__restrict __tz) __THROW __nonnull ((1));
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (gettimeofday, (struct timeval *__restrict __tv,
+ void *__restrict __tz),
+ __gettimeofday64) __nonnull ((1));
+# else
+# define gettimeofday __gettimeofday64
+# endif
+#endif
#ifdef __USE_MISC
+# ifndef __USE_TIME_BITS64
/* Set the current time of day and timezone information.
This call is restricted to the super-user.
Setting the timezone in this way is obsolete, but we don't yet
@@ -82,6 +93,20 @@ extern int settimeofday (const struct timeval *__tv,
This call is restricted to the super-user. */
extern int adjtime (const struct timeval *__delta,
struct timeval *__olddelta) __THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (settimeofday, (const struct timeval *__tv,
+ const struct timezone *__tz),
+ __settimeofday64);
+
+extern int __REDIRECT_NTH (adjtime, (const struct timeval *__delta,
+ struct timeval *__olddelta),
+ __adjtime64);
+# else
+# define settimeofday __settimeofday64
+# define adjtime __adjtime64
+# endif
+# endif
#endif
@@ -118,6 +143,7 @@ typedef enum __itimer_which __itimer_which_t;
typedef int __itimer_which_t;
#endif
+#ifndef __USE_TIME_BITS64
/* Set *VALUE to the current setting of timer WHICH.
Return 0 on success, -1 on errors. */
extern int getitimer (__itimer_which_t __which,
@@ -136,21 +162,66 @@ extern int setitimer (__itimer_which_t __which,
extern int utimes (const char *__file, const struct timeval __tvp[2])
__THROW __nonnull ((1));
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (getitimer, (__itimer_which_t __which,
+ struct itimerval *__value),
+ __getitimer64);
+
+extern int __REDIRECT_NTH (setitimer, (__itimer_which_t __which,
+ const struct itimerval *__restrict __new,
+ struct itimerval *__restrict __old),
+ __setitimer64);
+
+extern int __REDIRECT_NTH (utimes, (const char *__file,
+ const struct timeval __tvp[2]),
+ __utimes64) __nonnull ((1));
+# else
+# define getitimer __getitimer64
+# define setitimer __setitimer64
+# define utimes __utimes64
+# endif
+#endif
+
#ifdef __USE_MISC
+# ifndef __USE_TIME_BITS64
/* Same as `utimes', but does not follow symbolic links. */
extern int lutimes (const char *__file, const struct timeval __tvp[2])
__THROW __nonnull ((1));
/* Same as `utimes', but takes an open file descriptor instead of a name. */
extern int futimes (int __fd, const struct timeval __tvp[2]) __THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (lutimes, (const char *__file,
+ const struct timeval __tvp[2]),
+ __lutimes64) __nonnull ((1));
+
+extern int __REDIRECT_NTH (futimes, (int __fd, const struct timeval __tvp[2]),
+ __futimes64);
+# else
+# define lutimes __lutimes64
+# define futimes __futimes64
+# endif
+# endif
#endif
#ifdef __USE_GNU
+# ifndef __USE_TIME_BITS64
/* Change the access time of FILE relative to FD to TVP[0] and the
modification time of FILE to TVP[1]. If TVP is a null pointer, use
the current time instead. Returns 0 on success, -1 on errors. */
extern int futimesat (int __fd, const char *__file,
const struct timeval __tvp[2]) __THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (futimesat, (int __fd, const char *__file,
+ const struct timeval __tvp[2]),
+ __futimesat64);
+# else
+# define futimesat __futimesat64
+# endif
+# endif
#endif
diff --git a/lib/libc/include/generic-glibc/sys/timerfd.h b/lib/libc/include/generic-glibc/sys/timerfd.h
index 18acd489ea..32643a90a1 100644
--- a/lib/libc/include/generic-glibc/sys/timerfd.h
+++ b/lib/libc/include/generic-glibc/sys/timerfd.h
@@ -47,9 +47,31 @@ extern int timerfd_settime (int __ufd, int __flags,
const struct itimerspec *__utmr,
struct itimerspec *__otmr) __THROW;
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT_NTH)
+extern int __REDIRECT_NTH (timerfd_settime,
+ (int __ufd, int __flags,
+ const struct itimerspec *__restrict __value,
+ struct itimerspec *__restrict __ovalue),
+ __timerfd_settime64);
+# else
+# define timerfd_settime __timerfd_settime64
+# endif
+#endif
+
/* Return the next expiration time of UFD. */
extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW;
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT_NTH)
+extern int __REDIRECT_NTH (timerfd_gettime, (int __ufd,
+ struct itimerspec *__otmr),
+ __timerfd_gettime64);
+# else
+# define timerfd_gettime __timerfd_gettime64
+# endif
+#endif
+
__END_DECLS
#endif /* sys/timerfd.h */ \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/sys/timex.h b/lib/libc/include/generic-glibc/sys/timex.h
index 0e82ddced7..2ca80d7baf 100644
--- a/lib/libc/include/generic-glibc/sys/timex.h
+++ b/lib/libc/include/generic-glibc/sys/timex.h
@@ -54,17 +54,34 @@ struct ntptimeval
__BEGIN_DECLS
-extern int __adjtimex (struct timex *__ntx) __THROW;
+#ifndef __USE_TIME_BITS64
extern int adjtimex (struct timex *__ntx) __THROW;
+extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW;
-#ifdef __REDIRECT_NTH
+# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv),
- ntp_gettimex);
+ ntp_gettimex);
+# else
+# define ntp_gettime ntp_gettimex
+# endif
+extern int ntp_adjtime (struct timex *__tntx) __THROW;
#else
-extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW;
-# define ntp_gettime ntp_gettimex
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (adjtimex, (struct timex *__ntx),
+ ___adjtimex64);
+extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv),
+ __ntp_gettime64);
+extern int __REDIRECT_NTH (ntp_gettimex, (struct ntptimeval *__ntv),
+ __ntp_gettimex64);
+extern int __REDIRECT_NTH (ntp_adjtime, (struct timex *__ntx),
+ ___adjtimex64);
+# else
+# define adjtimex ___adjtimex64
+# define ntp_adjtime ___adjtimex64
+# define ntp_gettime __ntp_gettime64
+# define ntp_gettimex __ntp_gettimex64
+# endif
#endif
-extern int ntp_adjtime (struct timex *__tntx) __THROW;
__END_DECLS
diff --git a/lib/libc/include/generic-glibc/sys/uio.h b/lib/libc/include/generic-glibc/sys/uio.h
index 7d14d63881..8a8846a5de 100644
--- a/lib/libc/include/generic-glibc/sys/uio.h
+++ b/lib/libc/include/generic-glibc/sys/uio.h
@@ -39,7 +39,7 @@ __BEGIN_DECLS
This function is a cancellation point and therefore not marked with
__THROW. */
extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count)
- __wur;
+ __wur __attr_access ((__read_only__, 2, 3));
/* Write data pointed by the buffers described by IOVEC, which
is a vector of COUNT 'struct iovec's, to file descriptor FD.
@@ -50,7 +50,7 @@ extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count)
This function is a cancellation point and therefore not marked with
__THROW. */
extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)
- __wur;
+ __wur __attr_access ((__read_only__, 2, 3));
#ifdef __USE_MISC
@@ -65,7 +65,8 @@ extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)
This function is a cancellation point and therefore not marked with
__THROW. */
extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,
- __off_t __offset) __wur;
+ __off_t __offset)
+ __wur __attr_access ((__read_only__, 2, 3));
/* Write data pointed by the buffers described by IOVEC, which is a
vector of COUNT 'struct iovec's, to file descriptor FD at the given
@@ -77,16 +78,19 @@ extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,
This function is a cancellation point and therefore not marked with
__THROW. */
extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count,
- __off_t __offset) __wur;
+ __off_t __offset)
+ __wur __attr_access ((__read_only__, 2, 3));
# else
# ifdef __REDIRECT
extern ssize_t __REDIRECT (preadv, (int __fd, const struct iovec *__iovec,
int __count, __off64_t __offset),
- preadv64) __wur;
+ preadv64)
+ __wur __attr_access ((__read_only__, 2, 3));
extern ssize_t __REDIRECT (pwritev, (int __fd, const struct iovec *__iovec,
int __count, __off64_t __offset),
- pwritev64) __wur;
+ pwritev64)
+ __wur __attr_access ((__read_only__, 2, 3));
# else
# define preadv preadv64
# define pwritev pwritev64
@@ -104,7 +108,8 @@ extern ssize_t __REDIRECT (pwritev, (int __fd, const struct iovec *__iovec,
This function is a cancellation point and therefore not marked with
__THROW. */
extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count,
- __off64_t __offset) __wur;
+ __off64_t __offset)
+ __wur __attr_access ((__read_only__, 2, 3));
/* Write data pointed by the buffers described by IOVEC, which is a
vector of COUNT 'struct iovec's, to file descriptor FD at the given
@@ -116,7 +121,8 @@ extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count,
This function is a cancellation point and therefore not marked with
__THROW. */
extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count,
- __off64_t __offset) __wur;
+ __off64_t __offset)
+ __wur __attr_access ((__read_only__, 2, 3));
# endif
#endif /* Use misc. */
@@ -125,7 +131,8 @@ extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count,
# ifndef __USE_FILE_OFFSET64
/* Same as preadv but with an additional flag argumenti defined at uio.h. */
extern ssize_t preadv2 (int __fp, const struct iovec *__iovec, int __count,
- __off_t __offset, int ___flags) __wur;
+ __off_t __offset, int ___flags)
+ __wur __attr_access ((__read_only__, 2, 3));
/* Same as preadv but with an additional flag argument defined at uio.h. */
extern ssize_t pwritev2 (int __fd, const struct iovec *__iodev, int __count,
@@ -136,11 +143,13 @@ extern ssize_t pwritev2 (int __fd, const struct iovec *__iodev, int __count,
extern ssize_t __REDIRECT (pwritev2, (int __fd, const struct iovec *__iovec,
int __count, __off64_t __offset,
int __flags),
- pwritev64v2) __wur;
+ pwritev64v2)
+ __wur __attr_access ((__read_only__, 2, 3));
extern ssize_t __REDIRECT (preadv2, (int __fd, const struct iovec *__iovec,
int __count, __off64_t __offset,
int __flags),
- preadv64v2) __wur;
+ preadv64v2)
+ __wur __attr_access ((__read_only__, 2, 3));
# else
# define preadv2 preadv64v2
# define pwritev2 pwritev64v2
@@ -151,12 +160,14 @@ extern ssize_t __REDIRECT (preadv2, (int __fd, const struct iovec *__iovec,
/* Same as preadv but with an additional flag argumenti defined at uio.h. */
extern ssize_t preadv64v2 (int __fp, const struct iovec *__iovec,
int __count, __off64_t __offset,
- int ___flags) __wur;
+ int ___flags)
+ __wur __attr_access ((__read_only__, 2, 3));
/* Same as preadv but with an additional flag argument defined at uio.h. */
extern ssize_t pwritev64v2 (int __fd, const struct iovec *__iodev,
int __count, __off64_t __offset,
- int __flags) __wur;
+ int __flags)
+ __wur __attr_access ((__read_only__, 2, 3));
# endif
#endif /* Use GNU. */
diff --git a/lib/libc/include/generic-glibc/sys/wait.h b/lib/libc/include/generic-glibc/sys/wait.h
index 8a0a954eb7..17d2be0a62 100644
--- a/lib/libc/include/generic-glibc/sys/wait.h
+++ b/lib/libc/include/generic-glibc/sys/wait.h
@@ -144,14 +144,34 @@ struct rusage;
nil, store information about the child's resource usage there. If the
WUNTRACED bit is set in OPTIONS, return status for stopped children;
otherwise don't. */
+# ifndef __USE_TIME_BITS64
extern __pid_t wait3 (int *__stat_loc, int __options,
struct rusage * __usage) __THROWNL;
+# else
+# ifdef __REDIRECT_NTHNL
+extern __pid_t __REDIRECT_NTHNL (wait3, (int *__stat_loc, int __options,
+ struct rusage * __usage),
+ __wait3_time64);
+# else
+# define wait3 __wait3_time64
+# endif
+# endif
#endif
#ifdef __USE_MISC
+# ifndef __USE_TIME_BITS64
/* PID is like waitpid. Other args are like wait3. */
extern __pid_t wait4 (__pid_t __pid, int *__stat_loc, int __options,
struct rusage *__usage) __THROWNL;
+# else
+# ifdef __REDIRECT_NTHNL
+extern __pid_t __REDIRECT_NTHNL (wait4, (__pid_t __pid, int *__stat_loc,
+ int __options, struct rusage *__usage),
+ __wait4_time64);
+# else
+# define wait4 __wait4_time64
+# endif
+# endif
#endif /* Use misc. */
diff --git a/lib/libc/include/generic-glibc/threads.h b/lib/libc/include/generic-glibc/threads.h
index a6b2089453..4f99432495 100644
--- a/lib/libc/include/generic-glibc/threads.h
+++ b/lib/libc/include/generic-glibc/threads.h
@@ -88,8 +88,18 @@ extern thrd_t thrd_current (void);
__TIME_POINT. The current thread may resume if receives a signal. In
that case, if __REMAINING is not NULL, the remaining time is stored in
the object pointed by it. */
+#ifndef __USE_TIME_BITS64
extern int thrd_sleep (const struct timespec *__time_point,
struct timespec *__remaining);
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT (thrd_sleep, (const struct timespec *__time_point,
+ struct timespec *__remaining),
+ __thrd_sleep64);
+# else
+# define thrd_sleep __thrd_sleep64
+# endif
+#endif
/* Terminate current thread execution, cleaning up any thread local
storage and freeing resources. Returns the value specified in __RES. */
@@ -131,8 +141,19 @@ extern int mtx_lock (mtx_t *__mutex);
/* Block the current thread until the mutex pointed by __MUTEX is unlocked
or time pointed by __TIME_POINT is reached. In case the mutex is unlock,
the current thread will not be blocked. */
+#ifndef __USE_TIME_BITS64
extern int mtx_timedlock (mtx_t *__restrict __mutex,
const struct timespec *__restrict __time_point);
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT (mtx_timedlock, (mtx_t *__restrict __mutex,
+ const struct timespec *__restrict
+ __time_point),
+ __mtx_timedlock64);
+# else
+# define mtx_timedlock __mtx_timedlock64
+# endif
+#endif
/* Try to lock the mutex pointed by __MUTEX without blocking. If the mutex
is free the current threads takes control of it, otherwise it returns
@@ -171,9 +192,21 @@ extern int cnd_wait (cnd_t *__cond, mtx_t *__mutex);
/* Block current thread on the condition variable until condition variable
pointed by __COND is signaled or time pointed by __TIME_POINT is
reached. */
+#ifndef __USE_TIME_BITS64
extern int cnd_timedwait (cnd_t *__restrict __cond,
mtx_t *__restrict __mutex,
const struct timespec *__restrict __time_point);
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT (cnd_timedwait, (cnd_t *__restrict __cond,
+ mtx_t *__restrict __mutex,
+ const struct timespec *__restrict
+ __time_point),
+ __cnd_timedwait64);
+# else
+# define cnd_timedwait __cnd_timedwait64
+# endif
+#endif
/* Destroy condition variable pointed by __cond and free all of its
resources. */
diff --git a/lib/libc/include/generic-glibc/time.h b/lib/libc/include/generic-glibc/time.h
index 878ba90789..10ad9d992e 100644
--- a/lib/libc/include/generic-glibc/time.h
+++ b/lib/libc/include/generic-glibc/time.h
@@ -71,6 +71,7 @@ __BEGIN_DECLS
The result / CLOCKS_PER_SEC is program time in seconds. */
extern clock_t clock (void) __THROW;
+#ifndef __USE_TIME_BITS64
/* Return the current time and put it in *TIMER if TIMER is not NULL. */
extern time_t time (time_t *__timer) __THROW;
@@ -80,7 +81,18 @@ extern double difftime (time_t __time1, time_t __time0)
/* Return the `time_t' representation of TP and normalize TP. */
extern time_t mktime (struct tm *__tp) __THROW;
-
+#else
+# ifdef __REDIRECT_NTH
+extern time_t __REDIRECT_NTH (time, (time_t *__timer), __time64);
+extern double __REDIRECT_NTH (difftime, (time_t __time1, time_t __time0),
+ __difftime64) __attribute__ ((__const__));
+extern time_t __REDIRECT_NTH (mktime, (struct tm *__tp), __mktime64);
+# else
+# define time __time64
+# define difftime __difftime64
+# define mktime __mktime64
+# endif
+#endif
/* Format TP into S according to FORMAT.
Write no more than MAXSIZE characters and return the number
@@ -114,6 +126,7 @@ extern char *strptime_l (const char *__restrict __s,
#endif
+#ifndef __USE_TIME_BITS64
/* Return the `struct tm' representation of *TIMER
in Universal Coordinated Time (aka Greenwich Mean Time). */
extern struct tm *gmtime (const time_t *__timer) __THROW;
@@ -122,7 +135,20 @@ extern struct tm *gmtime (const time_t *__timer) __THROW;
of *TIMER in the local timezone. */
extern struct tm *localtime (const time_t *__timer) __THROW;
+#else
+# ifdef __REDIRECT_NTH
+extern struct tm*__REDIRECT_NTH (gmtime, (const time_t *__timer), __gmtime64);
+extern struct tm *__REDIRECT_NTH (localtime, (const time_t *__timer),
+ __localtime64);
+# else
+# define gmtime __gmtime64
+# define localtime __localtime64
+# endif
+#endif
+
+
#if defined __USE_POSIX || __GLIBC_USE (ISOC2X)
+# ifndef __USE_TIME_BITS64
/* Return the `struct tm' representation of *TIMER in UTC,
using *TP to store the result. */
extern struct tm *gmtime_r (const time_t *__restrict __timer,
@@ -132,6 +158,20 @@ extern struct tm *gmtime_r (const time_t *__restrict __timer,
using *TP to store the result. */
extern struct tm *localtime_r (const time_t *__restrict __timer,
struct tm *__restrict __tp) __THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern struct tm*__REDIRECT_NTH (gmtime_r, (const time_t *__restrict __timer,
+ struct tm *__restrict __tp),
+ __gmtime64_r);
+
+extern struct tm*__REDIRECT_NTH (localtime_r, (const time_t *__restrict __t,
+ struct tm *__restrict __tp),
+ __localtime64_r);
+# else
+# define gmtime_r __gmtime64_r
+# define localtime_r __localtime_r
+# endif
+# endif
#endif /* POSIX || C2X */
/* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n"
@@ -139,9 +179,17 @@ extern struct tm *localtime_r (const time_t *__restrict __timer,
extern char *asctime (const struct tm *__tp) __THROW;
/* Equivalent to `asctime (localtime (timer))'. */
+#ifndef __USE_TIME_BITS64
extern char *ctime (const time_t *__timer) __THROW;
+#else
+# ifdef __REDIRECT_NTH
+extern char *__REDIRECT_NTH (ctime, (const time_t *__timer), __ctime64);
+# else
+# define ctime __ctime64
+# endif
+#endif
-#if defined __USE_POSIX || __GLIBC_USE (ISOC2X)
+#ifdef __USE_POSIX
/* Reentrant versions of the above functions. */
/* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n"
@@ -150,9 +198,19 @@ extern char *asctime_r (const struct tm *__restrict __tp,
char *__restrict __buf) __THROW;
/* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */
+#ifndef __USE_TIME_BITS64
extern char *ctime_r (const time_t *__restrict __timer,
char *__restrict __buf) __THROW;
-#endif /* POSIX || C2X */
+#else
+# ifdef __REDIRECT_NTH
+extern char *__REDIRECT_NTH (ctime_r, (const time_t *__restrict __timer,
+ char *__restrict __buf), __ctime64_r);
+# else
+# define ctime_r __ctime64_r
+# endif
+#endif
+
+#endif /* POSIX */
/* Defined in localtime.c. */
@@ -186,11 +244,19 @@ extern long int timezone;
/* Miscellaneous functions many Unices inherited from the public domain
localtime package. These are included only for compatibility. */
+#ifndef __USE_TIME_BITS64
/* Like `mktime', but for TP represents Universal Time, not local time. */
extern time_t timegm (struct tm *__tp) __THROW;
-
/* Another name for `mktime'. */
extern time_t timelocal (struct tm *__tp) __THROW;
+#else
+# ifdef __REDIRECT_NTH
+extern time_t __REDIRECT_NTH (timegm, (struct tm *__tp), __timegm64);
+extern time_t __REDIRECT_NTH (timelocal, (struct tm *__tp), __mktime64);
+# else
+# define timegm __timegm64
+# endif
+#endif
/* Return the number of days in YEAR. */
extern int dysize (int __year) __THROW __attribute__ ((__const__));
@@ -198,6 +264,7 @@ extern int dysize (int __year) __THROW __attribute__ ((__const__));
#ifdef __USE_POSIX199309
+# ifndef __USE_TIME_BITS64
/* Pause execution for a number of nanoseconds.
This function is a cancellation point and therefore not marked with
@@ -205,7 +272,6 @@ extern int dysize (int __year) __THROW __attribute__ ((__const__));
extern int nanosleep (const struct timespec *__requested_time,
struct timespec *__remaining);
-
/* Get resolution of clock CLOCK_ID. */
extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW;
@@ -215,15 +281,46 @@ extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;
/* Set clock CLOCK_ID to value TP. */
extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
__THROW;
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (nanosleep, (const struct timespec *__requested_time,
+ struct timespec *__remaining),
+ __nanosleep64);
+extern int __REDIRECT_NTH (clock_getres, (clockid_t __clock_id,
+ struct timespec *__res),
+ __clock_getres64);
+extern int __REDIRECT_NTH (clock_gettime, (clockid_t __clock_id, struct
+ timespec *__tp), __clock_gettime64);
+extern int __REDIRECT_NTH (clock_settime, (clockid_t __clock_id, const struct
+ timespec *__tp), __clock_settime64);
+# else
+# define nanosleep __nanosleep64
+# define clock_getres __clock_getres64
+# define clock_gettime __clock_gettime64
+# define clock_settime __clock_settime64
+# endif
+# endif
+
# ifdef __USE_XOPEN2K
/* High-resolution sleep with the specified clock.
This function is a cancellation point and therefore not marked with
__THROW. */
+# ifndef __USE_TIME_BITS64
extern int clock_nanosleep (clockid_t __clock_id, int __flags,
const struct timespec *__req,
struct timespec *__rem);
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (clock_nanosleep, (clockid_t __clock_id, int __flags,
+ const struct timespec *__req,
+ struct timespec *__rem),
+ __clock_nanosleep_time64);
+# else
+# define clock_nanosleep __clock_nanosleep_time64
+# endif
+# endif
/* Return clock ID for CPU-time clock. */
extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW;
@@ -239,6 +336,7 @@ extern int timer_create (clockid_t __clock_id,
extern int timer_delete (timer_t __timerid) __THROW;
/* Set timer TIMERID to VALUE, returning old value in OVALUE. */
+# ifndef __USE_TIME_BITS64
extern int timer_settime (timer_t __timerid, int __flags,
const struct itimerspec *__restrict __value,
struct itimerspec *__restrict __ovalue) __THROW;
@@ -246,6 +344,21 @@ extern int timer_settime (timer_t __timerid, int __flags,
/* Get current value of timer TIMERID and store it in VALUE. */
extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
__THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (timer_settime, (timer_t __timerid, int __flags,
+ const struct itimerspec *__restrict __value,
+ struct itimerspec *__restrict __ovalue),
+ __timer_settime64);
+
+extern int __REDIRECT_NTH (timer_gettime, (timer_t __timerid,
+ struct itimerspec *__value),
+ __timer_gettime64);
+# else
+# define timer_settime __timer_settime64
+# define timer_gettime __timer_gettime64
+# endif
+# endif
/* Get expiration overrun for timer TIMERID. */
extern int timer_getoverrun (timer_t __timerid) __THROW;
@@ -253,9 +366,35 @@ extern int timer_getoverrun (timer_t __timerid) __THROW;
#ifdef __USE_ISOC11
+# ifndef __USE_TIME_BITS64
/* Set TS to calendar time based in time base BASE. */
extern int timespec_get (struct timespec *__ts, int __base)
__THROW __nonnull ((1));
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (timespec_get, (struct timespec *__ts, int __base),
+ __timespec_get64) __nonnull ((1));
+# else
+# define timespec_get __timespec_get64
+# endif
+# endif
+#endif
+
+
+#if __GLIBC_USE (ISOC2X)
+# ifndef __USE_TIME_BITS64
+/* Set TS to resolution of time base BASE. */
+extern int timespec_getres (struct timespec *__ts, int __base)
+ __THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (timespec_getres, (struct timespec *__ts,
+ int __base),
+ __timespec_getres64);
+# else
+# define timespec_getres __timespec_getres64
+# endif
+# endif
#endif
diff --git a/lib/libc/include/generic-glibc/unistd.h b/lib/libc/include/generic-glibc/unistd.h
index 59ac4a72d1..61a801716c 100644
--- a/lib/libc/include/generic-glibc/unistd.h
+++ b/lib/libc/include/generic-glibc/unistd.h
@@ -295,6 +295,11 @@ extern int euidaccess (const char *__name, int __type)
/* An alias for `euidaccess', used by some other systems. */
extern int eaccess (const char *__name, int __type)
__THROW __nonnull ((1));
+
+/* Execute program relative to a directory file descriptor. */
+extern int execveat (int __fd, const char *__path, char *const __argv[],
+ char *const __envp[], int __flags)
+ __THROW __nonnull ((2, 3));
#endif
#ifdef __USE_ATFILE
@@ -352,6 +357,12 @@ extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
__THROW. */
extern int close (int __fd);
+#ifdef __USE_MISC
+/* Close all open file descriptors greater than or equal to LOWFD.
+ Negative LOWFD is clamped to 0. */
+extern void closefrom (int __lowfd) __THROW;
+#endif
+
/* Read NBYTES into BUF from FD. Return the
number read, -1 for errors or 0 for EOF.
@@ -776,6 +787,13 @@ extern __pid_t fork (void) __THROWNL;
extern __pid_t vfork (void) __THROW;
#endif /* Use misc or XPG < 7. */
+#ifdef __USE_GNU
+/* This is similar to fork, however it does not run the atfork handlers
+ neither reinitialize any internal locks in multithread case.
+ Different than fork, _Fork is async-signal-safe. */
+extern __pid_t _Fork (void) __THROW;
+#endif
+
/* Return the pathname of the terminal FD is open on, or NULL on errors.
The returned storage is good only until the next call to this function. */
diff --git a/lib/libc/include/generic-glibc/utime.h b/lib/libc/include/generic-glibc/utime.h
index 7f75dbf882..0a86b5413f 100644
--- a/lib/libc/include/generic-glibc/utime.h
+++ b/lib/libc/include/generic-glibc/utime.h
@@ -35,16 +35,32 @@ __BEGIN_DECLS
/* Structure describing file times. */
struct utimbuf
{
+#ifdef __USE_TIME_BITS64
+ __time64_t actime; /* Access time. */
+ __time64_t modtime; /* Modification time. */
+#else
__time_t actime; /* Access time. */
__time_t modtime; /* Modification time. */
+#endif
};
/* Set the access and modification times of FILE to those given in
*FILE_TIMES. If FILE_TIMES is NULL, set them to the current time. */
+#ifndef __USE_TIME_BITS64
extern int utime (const char *__file,
const struct utimbuf *__file_times)
__THROW __nonnull ((1));
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (utime, (const char *__file,
+ const struct utimbuf *__file_times),
+ __utime64);
+# else
+# define utime __utime64
+# endif
+#endif
+
__END_DECLS
#endif /* utime.h */ \ No newline at end of file
diff --git a/lib/libc/include/generic-glibc/wchar.h b/lib/libc/include/generic-glibc/wchar.h
index 2b4d5cfc49..6957f38294 100644
--- a/lib/libc/include/generic-glibc/wchar.h
+++ b/lib/libc/include/generic-glibc/wchar.h
@@ -151,7 +151,8 @@ extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2,
size_t __n, locale_t __loc) __THROW;
/* Duplicate S, returning an identical malloc'd string. */
-extern wchar_t *wcsdup (const wchar_t *__s) __THROW __attribute_malloc__;
+extern wchar_t *wcsdup (const wchar_t *__s) __THROW
+ __attribute_malloc__ __attr_dealloc_free;
#endif
/* Find the first occurrence of WC in WCS. */
@@ -562,9 +563,23 @@ extern wchar_t *wcpncpy (wchar_t *__restrict __dest,
/* Wide character I/O functions. */
#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2)
+# ifndef __attr_dealloc_fclose
+# if defined __has_builtin
+# if __has_builtin (__builtin_fclose)
+/* If the attribute macro hasn't been defined yet (by <stdio.h>) and
+ fclose is a built-in, use it. */
+# define __attr_dealloc_fclose __attr_dealloc (__builtin_fclose, 1)
+# endif
+# endif
+# endif
+# ifndef __attr_dealloc_fclose
+# define __attr_dealloc_fclose /* empty */
+# endif
+
/* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces
a wide character string. */
-extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW;
+extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW
+ __attribute_malloc__ __attr_dealloc_fclose;
#endif
#if defined __USE_ISOC95 || defined __USE_UNIX98
diff --git a/lib/libc/include/i386-linux-gnu/bits/struct_stat.h b/lib/libc/include/i386-linux-gnu/bits/struct_stat.h
index 4a34470345..b3674c73c4 100644
--- a/lib/libc/include/i386-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/i386-linux-gnu/bits/struct_stat.h
@@ -25,43 +25,46 @@
struct stat
{
+#ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+#else
__dev_t st_dev; /* Device. */
-#ifndef __x86_64__
+# ifndef __x86_64__
unsigned short int __pad1;
-#endif
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# endif
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-#endif
-#ifndef __x86_64__
+# endif
+# ifndef __x86_64__
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
-#else
+# else
__nlink_t st_nlink; /* Link count. */
__mode_t st_mode; /* File mode. */
-#endif
+# endif
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
-#ifdef __x86_64__
+# ifdef __x86_64__
int __pad0;
-#endif
+# endif
__dev_t st_rdev; /* Device number, if device. */
-#ifndef __x86_64__
+# ifndef __x86_64__
unsigned short int __pad2;
-#endif
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# endif
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -71,58 +74,62 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
__syscall_ulong_t st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
__syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
__syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
-#endif
-#ifdef __x86_64__
+# endif
+# ifdef __x86_64__
__syscall_slong_t __glibc_reserved[3];
-#else
-# ifndef __USE_FILE_OFFSET64
+# else
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-# else
+# else
__ino64_t st_ino; /* File serial number. */
+# endif
# endif
-#endif
+#endif /* __USE_TIME_BITS64 */
};
#ifdef __USE_LARGEFILE64
/* Note stat64 has the same shape as stat for x86-64. */
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
-# ifdef __x86_64__
+# ifdef __x86_64__
__ino64_t st_ino; /* File serial number. */
__nlink_t st_nlink; /* Link count. */
__mode_t st_mode; /* File mode. */
-# else
+# else
unsigned int __pad1;
__ino_t __st_ino; /* 32bit file serial number. */
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
-# endif
+# endif
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
-# ifdef __x86_64__
+# ifdef __x86_64__
int __pad0;
__dev_t st_rdev; /* Device number, if device. */
__off_t st_size; /* Size of file, in bytes. */
-# else
+# else
__dev_t st_rdev; /* Device number, if device. */
unsigned int __pad2;
__off64_t st_size; /* Size of file, in bytes. */
-# endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -132,19 +139,20 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
__syscall_ulong_t st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
__syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
__syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
-# endif
-# ifdef __x86_64__
+# endif
+# ifdef __x86_64__
__syscall_slong_t __glibc_reserved[3];
-# else
+# else
__ino64_t st_ino; /* File serial number. */
-# endif
+# endif
+# endif /* __USE_TIME_BITS64 */
};
#endif
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
index 76ea9f63dc..6713836d1e 100644
--- 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
@@ -23,6 +23,9 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
__time_t sem_otime; /* last semop() time */
__syscall_ulong_t __sem_otime_high;
@@ -31,4 +34,5 @@ struct semid_ds
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
}; \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/floatn.h b/lib/libc/include/m68k-linux-gnu/bits/floatn.h
new file mode 100644
index 0000000000..18018fa9f8
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/floatn.h
@@ -0,0 +1,52 @@
+/* Macros to control TS 18661-3 glibc features.
+ Copyright (C) 2017-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* 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. */
+#define __HAVE_FLOAT128 0
+
+/* 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 0
+
+/* 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 0
+
+#ifndef __ASSEMBLER__
+
+/* Defined to concatenate the literal suffix to be used with _Float128
+ types, if __HAVE_FLOAT128 is 1.
+ E.g.: #define __f128(x) x##f128. */
+# undef __f128
+
+/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1.
+ E.g.: #define __CFLOAT128 _Complex _Float128. */
+# undef __CFLOAT128
+
+#endif /* !__ASSEMBLER__. */
+
+#include <bits/floatn-common.h> \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/struct_rwlock.h b/lib/libc/include/m68k-linux-gnu/bits/struct_rwlock.h
new file mode 100644
index 0000000000..7431c5597f
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/struct_rwlock.h
@@ -0,0 +1,61 @@
+/* Default read-write lock implementation struct definitions.
+ Copyright (C) 2019-2021 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
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef __RWLOCK_INTERNAL_H
+#define __RWLOCK_INTERNAL_H
+
+#include <bits/endian.h>
+
+/* Generic struct for both POSIX read-write lock. New ports are expected
+ to use the default layout, however archictetures can redefine it to add
+ arch-specific extensions (such as lock-elision). The struct have a size
+ of 32 bytes on both LP32 and LP64 architectures. */
+
+struct __pthread_rwlock_arch_t
+{
+ unsigned int __readers;
+ unsigned int __writers;
+ unsigned int __wrphase_futex;
+ unsigned int __writers_futex;
+ unsigned int __pad3;
+ unsigned int __pad4;
+ /* FLAGS must stay at its position in the structure to maintain
+ binary compatibility. */
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned char __pad1;
+ unsigned char __pad2;
+ unsigned char __shared;
+ unsigned char __flags;
+#else
+ unsigned char __flags;
+ unsigned char __shared;
+ unsigned char __pad1;
+ unsigned char __pad2;
+#endif
+ int __cur_writer;
+};
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
+#else
+# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
+ 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
+#endif
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/struct_stat.h b/lib/libc/include/m68k-linux-gnu/bits/struct_stat.h
index e85f20f65c..07a734438f 100644
--- a/lib/libc/include/m68k-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/m68k-linux-gnu/bits/struct_stat.h
@@ -25,32 +25,35 @@
struct stat
{
+#ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+#else
__dev_t st_dev; /* Device. */
unsigned short int __pad1;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-#endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -60,28 +63,32 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-#endif
-#ifndef __USE_FILE_OFFSET64
+# endif
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-#else
+# else
__ino64_t st_ino; /* File serial number. */
-#endif
+# endif
+#endif /* __USE_TIME_BITS64 */
};
#ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
unsigned short int __pad1;
@@ -96,7 +103,7 @@ struct stat64
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -106,15 +113,16 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
__ino64_t st_ino; /* File serial number. */
+# endif /* __USE_TIME_BITS64 */
};
#endif
diff --git a/lib/libc/include/m68k-linux-gnu/bits/wordsize.h b/lib/libc/include/m68k-linux-gnu/bits/wordsize.h
new file mode 100644
index 0000000000..6561e924f5
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/wordsize.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#define __WORDSIZE 32
+#define __WORDSIZE_TIME64_COMPAT32 0
+#define __WORDSIZE32_SIZE_ULONG 0
+#define __WORDSIZE32_PTRDIFF_LONG 0 \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/gnu/lib-names.h b/lib/libc/include/m68k-linux-gnu/gnu/lib-names.h
index 8d51e1156c..666f9805be 100644
--- a/lib/libc/include/m68k-linux-gnu/gnu/lib-names.h
+++ b/lib/libc/include/m68k-linux-gnu/gnu/lib-names.h
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.2"
diff --git a/lib/libc/include/mips-linux-gnu/bits/local_lim.h b/lib/libc/include/mips-linux-gnu/bits/local_lim.h
deleted file mode 100644
index cf2974b434..0000000000
--- a/lib/libc/include/mips-linux-gnu/bits/local_lim.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages with 64k pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647) \ No newline at end of file
diff --git a/lib/libc/include/mips-linux-gnu/bits/dlfcn.h b/lib/libc/include/mips-linux-gnueabi/bits/dlfcn.h
index 733090d634..733090d634 100644
--- a/lib/libc/include/mips-linux-gnu/bits/dlfcn.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/dlfcn.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/errno.h b/lib/libc/include/mips-linux-gnueabi/bits/errno.h
index 0362f92048..0362f92048 100644
--- a/lib/libc/include/mips-linux-gnu/bits/errno.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/errno.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/eventfd.h b/lib/libc/include/mips-linux-gnueabi/bits/eventfd.h
index a0f8f94d0c..a0f8f94d0c 100644
--- a/lib/libc/include/mips-linux-gnu/bits/eventfd.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/eventfd.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/inotify.h b/lib/libc/include/mips-linux-gnueabi/bits/inotify.h
index f72c8dc639..f72c8dc639 100644
--- a/lib/libc/include/mips-linux-gnu/bits/inotify.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/inotify.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/ioctl-types.h b/lib/libc/include/mips-linux-gnueabi/bits/ioctl-types.h
index 84081f4bfd..84081f4bfd 100644
--- a/lib/libc/include/mips-linux-gnu/bits/ioctl-types.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/ioctl-types.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/ipctypes.h b/lib/libc/include/mips-linux-gnueabi/bits/ipctypes.h
index aa6d3772af..aa6d3772af 100644
--- a/lib/libc/include/mips-linux-gnu/bits/ipctypes.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/ipctypes.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/mman.h b/lib/libc/include/mips-linux-gnueabi/bits/mman.h
index 726689ddec..726689ddec 100644
--- a/lib/libc/include/mips-linux-gnu/bits/mman.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/mman.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/poll.h b/lib/libc/include/mips-linux-gnueabi/bits/poll.h
index fd12b70920..fd12b70920 100644
--- a/lib/libc/include/mips-linux-gnu/bits/poll.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/poll.h
diff --git a/lib/libc/include/mips-linux-gnueabi/bits/pthread_stack_min.h b/lib/libc/include/mips-linux-gnueabi/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..1c02866a70
--- /dev/null
+++ b/lib/libc/include/mips-linux-gnueabi/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages with 64k pages. */
+#define PTHREAD_STACK_MIN 131072 \ No newline at end of file
diff --git a/lib/libc/include/mips-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/mips-linux-gnueabi/bits/pthreadtypes-arch.h
index b6894a757e..b6894a757e 100644
--- a/lib/libc/include/mips-linux-gnu/bits/pthreadtypes-arch.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/pthreadtypes-arch.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/resource.h b/lib/libc/include/mips-linux-gnueabi/bits/resource.h
index 743dc1b9ad..743dc1b9ad 100644
--- a/lib/libc/include/mips-linux-gnu/bits/resource.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/resource.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/semaphore.h b/lib/libc/include/mips-linux-gnueabi/bits/semaphore.h
index 73abfb8078..73abfb8078 100644
--- a/lib/libc/include/mips-linux-gnu/bits/semaphore.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/semaphore.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/shmlba.h b/lib/libc/include/mips-linux-gnueabi/bits/shmlba.h
index 357defb2ba..357defb2ba 100644
--- a/lib/libc/include/mips-linux-gnu/bits/shmlba.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/shmlba.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/sigaction.h b/lib/libc/include/mips-linux-gnueabi/bits/sigaction.h
index f968c4d10d..f968c4d10d 100644
--- a/lib/libc/include/mips-linux-gnu/bits/sigaction.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/sigaction.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/sigcontext.h b/lib/libc/include/mips-linux-gnueabi/bits/sigcontext.h
index cdf767d48a..cdf767d48a 100644
--- a/lib/libc/include/mips-linux-gnu/bits/sigcontext.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/sigcontext.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/siginfo-arch.h b/lib/libc/include/mips-linux-gnueabi/bits/siginfo-arch.h
index d639ba2076..d639ba2076 100644
--- a/lib/libc/include/mips-linux-gnu/bits/siginfo-arch.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/siginfo-arch.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/signalfd.h b/lib/libc/include/mips-linux-gnueabi/bits/signalfd.h
index 10b69b2df4..10b69b2df4 100644
--- a/lib/libc/include/mips-linux-gnu/bits/signalfd.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/signalfd.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/signum-arch.h b/lib/libc/include/mips-linux-gnueabi/bits/signum-arch.h
index a217ddd443..a217ddd443 100644
--- a/lib/libc/include/mips-linux-gnu/bits/signum-arch.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/signum-arch.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/socket-constants.h b/lib/libc/include/mips-linux-gnueabi/bits/socket-constants.h
index d696a579f6..3e95d151ca 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/socket-constants.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 256
#define SO_RCVBUF 4098
#define SO_RCVLOWAT 4100
-#define SO_RCVTIMEO 4102
#define SO_REUSEADDR 4
#define SO_SNDBUF 4097
#define SO_SNDLOWAT 4099
-#define SO_SNDTIMEO 4101
-#define SO_TYPE 4104 \ No newline at end of file
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 4102
+# define SO_SNDTIMEO 4101
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 4102
+# define SO_SNDTIMEO_OLD 4101
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mips-linux-gnu/bits/socket_type.h b/lib/libc/include/mips-linux-gnueabi/bits/socket_type.h
index f66bd0ea5f..f66bd0ea5f 100644
--- a/lib/libc/include/mips-linux-gnu/bits/socket_type.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/socket_type.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/statfs.h b/lib/libc/include/mips-linux-gnueabi/bits/statfs.h
index 0e18718b24..0e18718b24 100644
--- a/lib/libc/include/mips-linux-gnu/bits/statfs.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/statfs.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/struct_mutex.h b/lib/libc/include/mips-linux-gnueabi/bits/struct_mutex.h
index 8ddb89ce24..8ddb89ce24 100644
--- a/lib/libc/include/mips-linux-gnu/bits/struct_mutex.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/struct_mutex.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/termios-c_cc.h b/lib/libc/include/mips-linux-gnueabi/bits/termios-c_cc.h
index 8e67783a9e..8e67783a9e 100644
--- a/lib/libc/include/mips-linux-gnu/bits/termios-c_cc.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/termios-c_cc.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/termios-c_lflag.h b/lib/libc/include/mips-linux-gnueabi/bits/termios-c_lflag.h
index 6ef207b1a2..6ef207b1a2 100644
--- a/lib/libc/include/mips-linux-gnu/bits/termios-c_lflag.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/termios-c_lflag.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/termios-struct.h b/lib/libc/include/mips-linux-gnueabi/bits/termios-struct.h
index 3bae186f55..3bae186f55 100644
--- a/lib/libc/include/mips-linux-gnu/bits/termios-struct.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/termios-struct.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/termios-tcflow.h b/lib/libc/include/mips-linux-gnueabi/bits/termios-tcflow.h
index a6a4e5719e..a6a4e5719e 100644
--- a/lib/libc/include/mips-linux-gnu/bits/termios-tcflow.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/termios-tcflow.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/timerfd.h b/lib/libc/include/mips-linux-gnueabi/bits/timerfd.h
index 871792717b..871792717b 100644
--- a/lib/libc/include/mips-linux-gnu/bits/timerfd.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/timerfd.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/types/stack_t.h b/lib/libc/include/mips-linux-gnueabi/bits/types/stack_t.h
index 005479e51a..005479e51a 100644
--- a/lib/libc/include/mips-linux-gnu/bits/types/stack_t.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/types/stack_t.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h b/lib/libc/include/mips-linux-gnueabi/bits/types/struct_msqid_ds.h
index d40f4ffc82..c7dcdf23d9 100644
--- a/lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/types/struct_msqid_ds.h
@@ -20,32 +20,37 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
-# ifdef __MIPSEL__
+# 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
+# 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
+# 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
+# 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 */
@@ -53,4 +58,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
}; \ 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/mips-linux-gnueabi/bits/types/struct_semid_ds.h
index dfdf05cc71..c1961e1bb1 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/types/struct_semid_ds.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/types/struct_semid_ds.h
@@ -23,10 +23,14 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
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;
+#endif
}; \ 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-gnueabi/bits/types/struct_shmid_ds.h
index c59e4e25b6..2e8525c1a5 100644
--- a/lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h
+++ b/lib/libc/include/mips-linux-gnueabi/bits/types/struct_shmid_ds.h
@@ -23,27 +23,31 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
size_t shm_segsz; /* size of segment in bytes */
-#if __TIMESIZE == 32
+# 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
+# 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
+# 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
+# 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
+# else
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+# endif
#endif
}; \ No newline at end of file
diff --git a/lib/libc/include/mips-linux-gnu/ieee754.h b/lib/libc/include/mips-linux-gnueabi/ieee754.h
index f3e3977ca3..f3e3977ca3 100644
--- a/lib/libc/include/mips-linux-gnu/ieee754.h
+++ b/lib/libc/include/mips-linux-gnueabi/ieee754.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/dlfcn.h b/lib/libc/include/mips-linux-gnueabihf/bits/dlfcn.h
index 733090d634..733090d634 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/dlfcn.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/dlfcn.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/errno.h b/lib/libc/include/mips-linux-gnueabihf/bits/errno.h
index 0362f92048..0362f92048 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/errno.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/errno.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/eventfd.h b/lib/libc/include/mips-linux-gnueabihf/bits/eventfd.h
index a0f8f94d0c..a0f8f94d0c 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/eventfd.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/eventfd.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/inotify.h b/lib/libc/include/mips-linux-gnueabihf/bits/inotify.h
index f72c8dc639..f72c8dc639 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/inotify.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/inotify.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/ioctl-types.h b/lib/libc/include/mips-linux-gnueabihf/bits/ioctl-types.h
index 84081f4bfd..84081f4bfd 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/ioctl-types.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/ioctl-types.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/ipctypes.h b/lib/libc/include/mips-linux-gnueabihf/bits/ipctypes.h
index aa6d3772af..aa6d3772af 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/ipctypes.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/ipctypes.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/mman.h b/lib/libc/include/mips-linux-gnueabihf/bits/mman.h
index 726689ddec..726689ddec 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/mman.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/mman.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/poll.h b/lib/libc/include/mips-linux-gnueabihf/bits/poll.h
index fd12b70920..fd12b70920 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/poll.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/poll.h
diff --git a/lib/libc/include/mips-linux-gnueabihf/bits/pthread_stack_min.h b/lib/libc/include/mips-linux-gnueabihf/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..1c02866a70
--- /dev/null
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages with 64k pages. */
+#define PTHREAD_STACK_MIN 131072 \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/mips-linux-gnueabihf/bits/pthreadtypes-arch.h
index b6894a757e..b6894a757e 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/pthreadtypes-arch.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/pthreadtypes-arch.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/resource.h b/lib/libc/include/mips-linux-gnueabihf/bits/resource.h
index 743dc1b9ad..743dc1b9ad 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/resource.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/resource.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/semaphore.h b/lib/libc/include/mips-linux-gnueabihf/bits/semaphore.h
index 73abfb8078..73abfb8078 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/semaphore.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/semaphore.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/shmlba.h b/lib/libc/include/mips-linux-gnueabihf/bits/shmlba.h
index 357defb2ba..357defb2ba 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/shmlba.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/shmlba.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/sigaction.h b/lib/libc/include/mips-linux-gnueabihf/bits/sigaction.h
index f968c4d10d..f968c4d10d 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/sigaction.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/sigaction.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/sigcontext.h b/lib/libc/include/mips-linux-gnueabihf/bits/sigcontext.h
index cdf767d48a..cdf767d48a 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/sigcontext.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/sigcontext.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/siginfo-arch.h b/lib/libc/include/mips-linux-gnueabihf/bits/siginfo-arch.h
index d639ba2076..d639ba2076 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/siginfo-arch.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/siginfo-arch.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/signalfd.h b/lib/libc/include/mips-linux-gnueabihf/bits/signalfd.h
index 10b69b2df4..10b69b2df4 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/signalfd.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/signalfd.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/signum-arch.h b/lib/libc/include/mips-linux-gnueabihf/bits/signum-arch.h
index a217ddd443..a217ddd443 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/signum-arch.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/signum-arch.h
diff --git a/lib/libc/include/mips-linux-gnu/bits/socket-constants.h b/lib/libc/include/mips-linux-gnueabihf/bits/socket-constants.h
index d696a579f6..3e95d151ca 100644
--- a/lib/libc/include/mips-linux-gnu/bits/socket-constants.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 256
#define SO_RCVBUF 4098
#define SO_RCVLOWAT 4100
-#define SO_RCVTIMEO 4102
#define SO_REUSEADDR 4
#define SO_SNDBUF 4097
#define SO_SNDLOWAT 4099
-#define SO_SNDTIMEO 4101
-#define SO_TYPE 4104 \ No newline at end of file
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 4102
+# define SO_SNDTIMEO 4101
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 4102
+# define SO_SNDTIMEO_OLD 4101
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/socket_type.h b/lib/libc/include/mips-linux-gnueabihf/bits/socket_type.h
index f66bd0ea5f..f66bd0ea5f 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/socket_type.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/socket_type.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/statfs.h b/lib/libc/include/mips-linux-gnueabihf/bits/statfs.h
index 0e18718b24..0e18718b24 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/statfs.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/statfs.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/struct_mutex.h b/lib/libc/include/mips-linux-gnueabihf/bits/struct_mutex.h
index 8ddb89ce24..8ddb89ce24 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/struct_mutex.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/struct_mutex.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/termios-c_cc.h b/lib/libc/include/mips-linux-gnueabihf/bits/termios-c_cc.h
index 8e67783a9e..8e67783a9e 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/termios-c_cc.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/termios-c_cc.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/termios-c_lflag.h b/lib/libc/include/mips-linux-gnueabihf/bits/termios-c_lflag.h
index 6ef207b1a2..6ef207b1a2 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/termios-c_lflag.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/termios-c_lflag.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/termios-struct.h b/lib/libc/include/mips-linux-gnueabihf/bits/termios-struct.h
index 3bae186f55..3bae186f55 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/termios-struct.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/termios-struct.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/termios-tcflow.h b/lib/libc/include/mips-linux-gnueabihf/bits/termios-tcflow.h
index a6a4e5719e..a6a4e5719e 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/termios-tcflow.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/termios-tcflow.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/timerfd.h b/lib/libc/include/mips-linux-gnueabihf/bits/timerfd.h
index 871792717b..871792717b 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/timerfd.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/timerfd.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/types/stack_t.h b/lib/libc/include/mips-linux-gnueabihf/bits/types/stack_t.h
index 005479e51a..005479e51a 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/types/stack_t.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/types/stack_t.h
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/types/struct_msqid_ds.h b/lib/libc/include/mips-linux-gnueabihf/bits/types/struct_msqid_ds.h
index d40f4ffc82..c7dcdf23d9 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/types/struct_msqid_ds.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/types/struct_msqid_ds.h
@@ -20,32 +20,37 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
-# ifdef __MIPSEL__
+# 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
+# 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
+# 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
+# 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 */
@@ -53,4 +58,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
}; \ No newline at end of file
diff --git a/lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h b/lib/libc/include/mips-linux-gnueabihf/bits/types/struct_semid_ds.h
index dfdf05cc71..c1961e1bb1 100644
--- a/lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/types/struct_semid_ds.h
@@ -23,10 +23,14 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
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;
+#endif
}; \ 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/mips-linux-gnueabihf/bits/types/struct_shmid_ds.h
index c59e4e25b6..2e8525c1a5 100644
--- a/lib/libc/include/mipsel-linux-gnu/bits/types/struct_shmid_ds.h
+++ b/lib/libc/include/mips-linux-gnueabihf/bits/types/struct_shmid_ds.h
@@ -23,27 +23,31 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
size_t shm_segsz; /* size of segment in bytes */
-#if __TIMESIZE == 32
+# 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
+# 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
+# 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
+# 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
+# else
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+# endif
#endif
}; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnu/ieee754.h b/lib/libc/include/mips-linux-gnueabihf/ieee754.h
index f3e3977ca3..f3e3977ca3 100644
--- a/lib/libc/include/mipsel-linux-gnu/ieee754.h
+++ b/lib/libc/include/mips-linux-gnueabihf/ieee754.h
diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/floatn.h b/lib/libc/include/mips64-linux-gnuabi64/bits/floatn.h
deleted file mode 100644
index c05a5e55e0..0000000000
--- a/lib/libc/include/mips64-linux-gnuabi64/bits/floatn.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Macros to control TS 18661-3 glibc features on MIPS platforms.
- Copyright (C) 2017-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _BITS_FLOATN_H
-#define _BITS_FLOATN_H
-
-#include <features.h>
-#include <bits/long-double.h>
-
-/* Defined to 1 if the current compiler invocation provides a
- floating-point type with the IEEE 754 binary128 format, and this
- glibc includes corresponding *f128 interfaces for it. */
-#ifndef __NO_LONG_DOUBLE_MATH
-# define __HAVE_FLOAT128 1
-#else
-/* glibc does not support _Float128 for platforms where long double is
- normally binary128 when building with long double as binary64.
- GCC's default for supported scalar modes does not support it either
- in that case. */
-# define __HAVE_FLOAT128 0
-#endif
-
-/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
- from the default float, double and long double types in this glibc. */
-#define __HAVE_DISTINCT_FLOAT128 0
-
-/* Defined to 1 if the current compiler invocation provides a
- floating-point type with the right format for _Float64x, and this
- glibc includes corresponding *f64x interfaces for it. */
-#define __HAVE_FLOAT64X __HAVE_FLOAT128
-
-/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
- of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
- the format of _Float128, which must be different from that of long
- double. */
-#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
-
-#ifndef __ASSEMBLER__
-
-/* Defined to concatenate the literal suffix to be used with _Float128
- types, if __HAVE_FLOAT128 is 1. */
-# if __HAVE_FLOAT128
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-/* The literal suffix f128 exists only since GCC 7.0. */
-# define __f128(x) x##l
-# else
-# define __f128(x) x##f128
-# endif
-# endif
-
-/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
-# if __HAVE_FLOAT128
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-# define __CFLOAT128 _Complex long double
-# else
-# define __CFLOAT128 _Complex _Float128
-# endif
-# endif
-
-/* The remaining of this file provides support for older compilers. */
-# if __HAVE_FLOAT128
-
-/* The type _Float128 exists only since GCC 7.0. */
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-typedef long double _Float128;
-# endif
-
-/* Various built-in functions do not exist before GCC 7.0. */
-# if !__GNUC_PREREQ (7, 0)
-# define __builtin_huge_valf128() (__builtin_huge_vall ())
-# define __builtin_inff128() (__builtin_infl ())
-# define __builtin_nanf128(x) (__builtin_nanl (x))
-# define __builtin_nansf128(x) (__builtin_nansl (x))
-# endif
-
-# endif
-
-#endif /* !__ASSEMBLER__. */
-
-#include <bits/floatn-common.h>
-
-#endif /* _BITS_FLOATN_H */ \ No newline at end of file
diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/local_lim.h b/lib/libc/include/mips64-linux-gnuabi64/bits/local_lim.h
deleted file mode 100644
index cf2974b434..0000000000
--- a/lib/libc/include/mips64-linux-gnuabi64/bits/local_lim.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages with 64k pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647) \ No newline at end of file
diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/pthread_stack_min.h b/lib/libc/include/mips64-linux-gnuabi64/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..1c02866a70
--- /dev/null
+++ b/lib/libc/include/mips64-linux-gnuabi64/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages with 64k pages. */
+#define PTHREAD_STACK_MIN 131072 \ No newline at end of file
diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/socket-constants.h b/lib/libc/include/mips64-linux-gnuabi64/bits/socket-constants.h
index d696a579f6..3e95d151ca 100644
--- a/lib/libc/include/mips64-linux-gnuabi64/bits/socket-constants.h
+++ b/lib/libc/include/mips64-linux-gnuabi64/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 256
#define SO_RCVBUF 4098
#define SO_RCVLOWAT 4100
-#define SO_RCVTIMEO 4102
#define SO_REUSEADDR 4
#define SO_SNDBUF 4097
#define SO_SNDLOWAT 4099
-#define SO_SNDTIMEO 4101
-#define SO_TYPE 4104 \ No newline at end of file
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 4102
+# define SO_SNDTIMEO 4101
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 4102
+# define SO_SNDTIMEO_OLD 4101
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif \ 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
index d40f4ffc82..c7dcdf23d9 100644
--- 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
@@ -20,32 +20,37 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
-# ifdef __MIPSEL__
+# 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
+# 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
+# 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
+# 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 */
@@ -53,4 +58,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
}; \ No newline at end of file
diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_semid_ds.h b/lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_semid_ds.h
index dfdf05cc71..c1961e1bb1 100644
--- a/lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_semid_ds.h
+++ b/lib/libc/include/mips64-linux-gnuabi64/bits/types/struct_semid_ds.h
@@ -23,10 +23,14 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
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;
+#endif
}; \ 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
index c59e4e25b6..2e8525c1a5 100644
--- 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
@@ -23,27 +23,31 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
size_t shm_segsz; /* size of segment in bytes */
-#if __TIMESIZE == 32
+# 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
+# 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
+# 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
+# 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
+# else
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+# endif
#endif
}; \ No newline at end of file
diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/floatn.h b/lib/libc/include/mips64-linux-gnuabin32/bits/floatn.h
deleted file mode 100644
index c05a5e55e0..0000000000
--- a/lib/libc/include/mips64-linux-gnuabin32/bits/floatn.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Macros to control TS 18661-3 glibc features on MIPS platforms.
- Copyright (C) 2017-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _BITS_FLOATN_H
-#define _BITS_FLOATN_H
-
-#include <features.h>
-#include <bits/long-double.h>
-
-/* Defined to 1 if the current compiler invocation provides a
- floating-point type with the IEEE 754 binary128 format, and this
- glibc includes corresponding *f128 interfaces for it. */
-#ifndef __NO_LONG_DOUBLE_MATH
-# define __HAVE_FLOAT128 1
-#else
-/* glibc does not support _Float128 for platforms where long double is
- normally binary128 when building with long double as binary64.
- GCC's default for supported scalar modes does not support it either
- in that case. */
-# define __HAVE_FLOAT128 0
-#endif
-
-/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
- from the default float, double and long double types in this glibc. */
-#define __HAVE_DISTINCT_FLOAT128 0
-
-/* Defined to 1 if the current compiler invocation provides a
- floating-point type with the right format for _Float64x, and this
- glibc includes corresponding *f64x interfaces for it. */
-#define __HAVE_FLOAT64X __HAVE_FLOAT128
-
-/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
- of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
- the format of _Float128, which must be different from that of long
- double. */
-#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
-
-#ifndef __ASSEMBLER__
-
-/* Defined to concatenate the literal suffix to be used with _Float128
- types, if __HAVE_FLOAT128 is 1. */
-# if __HAVE_FLOAT128
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-/* The literal suffix f128 exists only since GCC 7.0. */
-# define __f128(x) x##l
-# else
-# define __f128(x) x##f128
-# endif
-# endif
-
-/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
-# if __HAVE_FLOAT128
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-# define __CFLOAT128 _Complex long double
-# else
-# define __CFLOAT128 _Complex _Float128
-# endif
-# endif
-
-/* The remaining of this file provides support for older compilers. */
-# if __HAVE_FLOAT128
-
-/* The type _Float128 exists only since GCC 7.0. */
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-typedef long double _Float128;
-# endif
-
-/* Various built-in functions do not exist before GCC 7.0. */
-# if !__GNUC_PREREQ (7, 0)
-# define __builtin_huge_valf128() (__builtin_huge_vall ())
-# define __builtin_inff128() (__builtin_infl ())
-# define __builtin_nanf128(x) (__builtin_nanl (x))
-# define __builtin_nansf128(x) (__builtin_nansl (x))
-# endif
-
-# endif
-
-#endif /* !__ASSEMBLER__. */
-
-#include <bits/floatn-common.h>
-
-#endif /* _BITS_FLOATN_H */ \ No newline at end of file
diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/local_lim.h b/lib/libc/include/mips64-linux-gnuabin32/bits/local_lim.h
deleted file mode 100644
index cf2974b434..0000000000
--- a/lib/libc/include/mips64-linux-gnuabin32/bits/local_lim.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages with 64k pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647) \ No newline at end of file
diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/pthread_stack_min.h b/lib/libc/include/mips64-linux-gnuabin32/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..1c02866a70
--- /dev/null
+++ b/lib/libc/include/mips64-linux-gnuabin32/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages with 64k pages. */
+#define PTHREAD_STACK_MIN 131072 \ No newline at end of file
diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/socket-constants.h b/lib/libc/include/mips64-linux-gnuabin32/bits/socket-constants.h
index d696a579f6..3e95d151ca 100644
--- a/lib/libc/include/mips64-linux-gnuabin32/bits/socket-constants.h
+++ b/lib/libc/include/mips64-linux-gnuabin32/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 256
#define SO_RCVBUF 4098
#define SO_RCVLOWAT 4100
-#define SO_RCVTIMEO 4102
#define SO_REUSEADDR 4
#define SO_SNDBUF 4097
#define SO_SNDLOWAT 4099
-#define SO_SNDTIMEO 4101
-#define SO_TYPE 4104 \ No newline at end of file
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 4102
+# define SO_SNDTIMEO 4101
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 4102
+# define SO_SNDTIMEO_OLD 4101
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif \ 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
index d40f4ffc82..c7dcdf23d9 100644
--- 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
@@ -20,32 +20,37 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
-# ifdef __MIPSEL__
+# 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
+# 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
+# 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
+# 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 */
@@ -53,4 +58,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
}; \ No newline at end of file
diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_semid_ds.h b/lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_semid_ds.h
index dfdf05cc71..c1961e1bb1 100644
--- a/lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_semid_ds.h
+++ b/lib/libc/include/mips64-linux-gnuabin32/bits/types/struct_semid_ds.h
@@ -23,10 +23,14 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
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;
+#endif
}; \ 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
index c59e4e25b6..2e8525c1a5 100644
--- 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
@@ -23,27 +23,31 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
size_t shm_segsz; /* size of segment in bytes */
-#if __TIMESIZE == 32
+# 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
+# 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
+# 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
+# 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
+# else
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+# endif
#endif
}; \ No newline at end of file
diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/floatn.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/floatn.h
deleted file mode 100644
index c05a5e55e0..0000000000
--- a/lib/libc/include/mips64el-linux-gnuabi64/bits/floatn.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Macros to control TS 18661-3 glibc features on MIPS platforms.
- Copyright (C) 2017-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _BITS_FLOATN_H
-#define _BITS_FLOATN_H
-
-#include <features.h>
-#include <bits/long-double.h>
-
-/* Defined to 1 if the current compiler invocation provides a
- floating-point type with the IEEE 754 binary128 format, and this
- glibc includes corresponding *f128 interfaces for it. */
-#ifndef __NO_LONG_DOUBLE_MATH
-# define __HAVE_FLOAT128 1
-#else
-/* glibc does not support _Float128 for platforms where long double is
- normally binary128 when building with long double as binary64.
- GCC's default for supported scalar modes does not support it either
- in that case. */
-# define __HAVE_FLOAT128 0
-#endif
-
-/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
- from the default float, double and long double types in this glibc. */
-#define __HAVE_DISTINCT_FLOAT128 0
-
-/* Defined to 1 if the current compiler invocation provides a
- floating-point type with the right format for _Float64x, and this
- glibc includes corresponding *f64x interfaces for it. */
-#define __HAVE_FLOAT64X __HAVE_FLOAT128
-
-/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
- of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
- the format of _Float128, which must be different from that of long
- double. */
-#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
-
-#ifndef __ASSEMBLER__
-
-/* Defined to concatenate the literal suffix to be used with _Float128
- types, if __HAVE_FLOAT128 is 1. */
-# if __HAVE_FLOAT128
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-/* The literal suffix f128 exists only since GCC 7.0. */
-# define __f128(x) x##l
-# else
-# define __f128(x) x##f128
-# endif
-# endif
-
-/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
-# if __HAVE_FLOAT128
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-# define __CFLOAT128 _Complex long double
-# else
-# define __CFLOAT128 _Complex _Float128
-# endif
-# endif
-
-/* The remaining of this file provides support for older compilers. */
-# if __HAVE_FLOAT128
-
-/* The type _Float128 exists only since GCC 7.0. */
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-typedef long double _Float128;
-# endif
-
-/* Various built-in functions do not exist before GCC 7.0. */
-# if !__GNUC_PREREQ (7, 0)
-# define __builtin_huge_valf128() (__builtin_huge_vall ())
-# define __builtin_inff128() (__builtin_infl ())
-# define __builtin_nanf128(x) (__builtin_nanl (x))
-# define __builtin_nansf128(x) (__builtin_nansl (x))
-# endif
-
-# endif
-
-#endif /* !__ASSEMBLER__. */
-
-#include <bits/floatn-common.h>
-
-#endif /* _BITS_FLOATN_H */ \ No newline at end of file
diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/local_lim.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/local_lim.h
deleted file mode 100644
index cf2974b434..0000000000
--- a/lib/libc/include/mips64el-linux-gnuabi64/bits/local_lim.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages with 64k pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647) \ No newline at end of file
diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/pthread_stack_min.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..1c02866a70
--- /dev/null
+++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages with 64k pages. */
+#define PTHREAD_STACK_MIN 131072 \ No newline at end of file
diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/socket-constants.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/socket-constants.h
index d696a579f6..3e95d151ca 100644
--- a/lib/libc/include/mips64el-linux-gnuabi64/bits/socket-constants.h
+++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 256
#define SO_RCVBUF 4098
#define SO_RCVLOWAT 4100
-#define SO_RCVTIMEO 4102
#define SO_REUSEADDR 4
#define SO_SNDBUF 4097
#define SO_SNDLOWAT 4099
-#define SO_SNDTIMEO 4101
-#define SO_TYPE 4104 \ No newline at end of file
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 4102
+# define SO_SNDTIMEO 4101
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 4102
+# define SO_SNDTIMEO_OLD 4101
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif \ 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
index d40f4ffc82..c7dcdf23d9 100644
--- 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
@@ -20,32 +20,37 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
-# ifdef __MIPSEL__
+# 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
+# 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
+# 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
+# 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 */
@@ -53,4 +58,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
}; \ No newline at end of file
diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h b/lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h
index dfdf05cc71..c1961e1bb1 100644
--- a/lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h
+++ b/lib/libc/include/mips64el-linux-gnuabi64/bits/types/struct_semid_ds.h
@@ -23,10 +23,14 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
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;
+#endif
}; \ 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
index c59e4e25b6..2e8525c1a5 100644
--- 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
@@ -23,27 +23,31 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
size_t shm_segsz; /* size of segment in bytes */
-#if __TIMESIZE == 32
+# 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
+# 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
+# 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
+# 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
+# else
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+# endif
#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
deleted file mode 100644
index c05a5e55e0..0000000000
--- a/lib/libc/include/mips64el-linux-gnuabin32/bits/floatn.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Macros to control TS 18661-3 glibc features on MIPS platforms.
- Copyright (C) 2017-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _BITS_FLOATN_H
-#define _BITS_FLOATN_H
-
-#include <features.h>
-#include <bits/long-double.h>
-
-/* Defined to 1 if the current compiler invocation provides a
- floating-point type with the IEEE 754 binary128 format, and this
- glibc includes corresponding *f128 interfaces for it. */
-#ifndef __NO_LONG_DOUBLE_MATH
-# define __HAVE_FLOAT128 1
-#else
-/* glibc does not support _Float128 for platforms where long double is
- normally binary128 when building with long double as binary64.
- GCC's default for supported scalar modes does not support it either
- in that case. */
-# define __HAVE_FLOAT128 0
-#endif
-
-/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
- from the default float, double and long double types in this glibc. */
-#define __HAVE_DISTINCT_FLOAT128 0
-
-/* Defined to 1 if the current compiler invocation provides a
- floating-point type with the right format for _Float64x, and this
- glibc includes corresponding *f64x interfaces for it. */
-#define __HAVE_FLOAT64X __HAVE_FLOAT128
-
-/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
- of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
- the format of _Float128, which must be different from that of long
- double. */
-#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
-
-#ifndef __ASSEMBLER__
-
-/* Defined to concatenate the literal suffix to be used with _Float128
- types, if __HAVE_FLOAT128 is 1. */
-# if __HAVE_FLOAT128
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-/* The literal suffix f128 exists only since GCC 7.0. */
-# define __f128(x) x##l
-# else
-# define __f128(x) x##f128
-# endif
-# endif
-
-/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
-# if __HAVE_FLOAT128
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-# define __CFLOAT128 _Complex long double
-# else
-# define __CFLOAT128 _Complex _Float128
-# endif
-# endif
-
-/* The remaining of this file provides support for older compilers. */
-# if __HAVE_FLOAT128
-
-/* The type _Float128 exists only since GCC 7.0. */
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-typedef long double _Float128;
-# endif
-
-/* Various built-in functions do not exist before GCC 7.0. */
-# if !__GNUC_PREREQ (7, 0)
-# define __builtin_huge_valf128() (__builtin_huge_vall ())
-# define __builtin_inff128() (__builtin_infl ())
-# define __builtin_nanf128(x) (__builtin_nanl (x))
-# define __builtin_nansf128(x) (__builtin_nansl (x))
-# endif
-
-# endif
-
-#endif /* !__ASSEMBLER__. */
-
-#include <bits/floatn-common.h>
-
-#endif /* _BITS_FLOATN_H */ \ No newline at end of file
diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/local_lim.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/local_lim.h
deleted file mode 100644
index cf2974b434..0000000000
--- a/lib/libc/include/mips64el-linux-gnuabin32/bits/local_lim.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages with 64k pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647) \ No newline at end of file
diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/pthread_stack_min.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..1c02866a70
--- /dev/null
+++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages with 64k pages. */
+#define PTHREAD_STACK_MIN 131072 \ No newline at end of file
diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/socket-constants.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/socket-constants.h
index d696a579f6..3e95d151ca 100644
--- a/lib/libc/include/mips64el-linux-gnuabin32/bits/socket-constants.h
+++ b/lib/libc/include/mips64el-linux-gnuabin32/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 256
#define SO_RCVBUF 4098
#define SO_RCVLOWAT 4100
-#define SO_RCVTIMEO 4102
#define SO_REUSEADDR 4
#define SO_SNDBUF 4097
#define SO_SNDLOWAT 4099
-#define SO_SNDTIMEO 4101
-#define SO_TYPE 4104 \ No newline at end of file
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 4102
+# define SO_SNDTIMEO 4101
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 4102
+# define SO_SNDTIMEO_OLD 4101
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/struct_rwlock.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/struct_rwlock.h
deleted file mode 100644
index 6355f539b9..0000000000
--- a/lib/libc/include/mips64el-linux-gnuabin32/bits/struct_rwlock.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* MIPS internal rwlock struct definitions.
- Copyright (C) 2019-2021 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
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _RWLOCK_INTERNAL_H
-#define _RWLOCK_INTERNAL_H
-
-struct __pthread_rwlock_arch_t
-{
- unsigned int __readers;
- unsigned int __writers;
- unsigned int __wrphase_futex;
- unsigned int __writers_futex;
- unsigned int __pad3;
- unsigned int __pad4;
-#if _MIPS_SIM == _ABI64
- int __cur_writer;
- int __shared;
- unsigned long int __pad1;
- unsigned long int __pad2;
- /* FLAGS must stay at this position in the structure to maintain
- binary compatibility. */
- unsigned int __flags;
-# else
-# if __BYTE_ORDER == __BIG_ENDIAN
- unsigned char __pad1;
- unsigned char __pad2;
- unsigned char __shared;
- /* FLAGS must stay at this position in the structure to maintain
- binary compatibility. */
- unsigned char __flags;
-# else
- /* FLAGS must stay at this position in the structure to maintain
- binary compatibility. */
- unsigned char __flags;
- unsigned char __shared;
- unsigned char __pad1;
- unsigned char __pad2;
-# endif
- int __cur_writer;
-#endif
-};
-
-#if _MIPS_SIM == _ABI64
-# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
-#else
-# if __BYTE_ORDER == __BIG_ENDIAN
-# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
- 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
-# else
-# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
- 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
-# endif
-#endif
-
-#endif \ 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
index d40f4ffc82..c7dcdf23d9 100644
--- 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
@@ -20,32 +20,37 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
-# ifdef __MIPSEL__
+# 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
+# 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
+# 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
+# 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 */
@@ -53,4 +58,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
}; \ 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
index dfdf05cc71..c1961e1bb1 100644
--- 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
@@ -23,10 +23,14 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
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;
+#endif
}; \ 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
index c59e4e25b6..2e8525c1a5 100644
--- 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
@@ -23,27 +23,31 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
size_t shm_segsz; /* size of segment in bytes */
-#if __TIMESIZE == 32
+# 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
+# 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
+# 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
+# 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
+# else
__syscall_ulong_t __glibc_reserved5;
__syscall_ulong_t __glibc_reserved6;
+# endif
#endif
}; \ No newline at end of file
diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/wordsize.h b/lib/libc/include/mips64el-linux-gnuabin32/bits/wordsize.h
deleted file mode 100644
index 9e405e4e4e..0000000000
--- a/lib/libc/include/mips64el-linux-gnuabin32/bits/wordsize.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <sgidefs.h>
-
-#define __WORDSIZE _MIPS_SZPTR
-
-#if _MIPS_SIM == _ABI64
-# define __WORDSIZE_TIME64_COMPAT32 1
-#else
-# define __WORDSIZE_TIME64_COMPAT32 0
-#endif
-
-#if __WORDSIZE == 32
-#define __WORDSIZE32_SIZE_ULONG 0
-#define __WORDSIZE32_PTRDIFF_LONG 0
-#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
deleted file mode 100644
index c05a5e55e0..0000000000
--- a/lib/libc/include/mipsel-linux-gnu/bits/floatn.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Macros to control TS 18661-3 glibc features on MIPS platforms.
- Copyright (C) 2017-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _BITS_FLOATN_H
-#define _BITS_FLOATN_H
-
-#include <features.h>
-#include <bits/long-double.h>
-
-/* Defined to 1 if the current compiler invocation provides a
- floating-point type with the IEEE 754 binary128 format, and this
- glibc includes corresponding *f128 interfaces for it. */
-#ifndef __NO_LONG_DOUBLE_MATH
-# define __HAVE_FLOAT128 1
-#else
-/* glibc does not support _Float128 for platforms where long double is
- normally binary128 when building with long double as binary64.
- GCC's default for supported scalar modes does not support it either
- in that case. */
-# define __HAVE_FLOAT128 0
-#endif
-
-/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct
- from the default float, double and long double types in this glibc. */
-#define __HAVE_DISTINCT_FLOAT128 0
-
-/* Defined to 1 if the current compiler invocation provides a
- floating-point type with the right format for _Float64x, and this
- glibc includes corresponding *f64x interfaces for it. */
-#define __HAVE_FLOAT64X __HAVE_FLOAT128
-
-/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format
- of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has
- the format of _Float128, which must be different from that of long
- double. */
-#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128
-
-#ifndef __ASSEMBLER__
-
-/* Defined to concatenate the literal suffix to be used with _Float128
- types, if __HAVE_FLOAT128 is 1. */
-# if __HAVE_FLOAT128
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-/* The literal suffix f128 exists only since GCC 7.0. */
-# define __f128(x) x##l
-# else
-# define __f128(x) x##f128
-# endif
-# endif
-
-/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
-# if __HAVE_FLOAT128
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-# define __CFLOAT128 _Complex long double
-# else
-# define __CFLOAT128 _Complex _Float128
-# endif
-# endif
-
-/* The remaining of this file provides support for older compilers. */
-# if __HAVE_FLOAT128
-
-/* The type _Float128 exists only since GCC 7.0. */
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
-typedef long double _Float128;
-# endif
-
-/* Various built-in functions do not exist before GCC 7.0. */
-# if !__GNUC_PREREQ (7, 0)
-# define __builtin_huge_valf128() (__builtin_huge_vall ())
-# define __builtin_inff128() (__builtin_infl ())
-# define __builtin_nanf128(x) (__builtin_nanl (x))
-# define __builtin_nansf128(x) (__builtin_nansl (x))
-# endif
-
-# endif
-
-#endif /* !__ASSEMBLER__. */
-
-#include <bits/floatn-common.h>
-
-#endif /* _BITS_FLOATN_H */ \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/local_lim.h b/lib/libc/include/mipsel-linux-gnu/bits/local_lim.h
deleted file mode 100644
index cf2974b434..0000000000
--- a/lib/libc/include/mipsel-linux-gnu/bits/local_lim.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. MIPS Linux version.
- Copyright (C) 1993-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages with 64k pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647) \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/struct_rwlock.h b/lib/libc/include/mipsel-linux-gnu/bits/struct_rwlock.h
deleted file mode 100644
index 6355f539b9..0000000000
--- a/lib/libc/include/mipsel-linux-gnu/bits/struct_rwlock.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* MIPS internal rwlock struct definitions.
- Copyright (C) 2019-2021 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
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _RWLOCK_INTERNAL_H
-#define _RWLOCK_INTERNAL_H
-
-struct __pthread_rwlock_arch_t
-{
- unsigned int __readers;
- unsigned int __writers;
- unsigned int __wrphase_futex;
- unsigned int __writers_futex;
- unsigned int __pad3;
- unsigned int __pad4;
-#if _MIPS_SIM == _ABI64
- int __cur_writer;
- int __shared;
- unsigned long int __pad1;
- unsigned long int __pad2;
- /* FLAGS must stay at this position in the structure to maintain
- binary compatibility. */
- unsigned int __flags;
-# else
-# if __BYTE_ORDER == __BIG_ENDIAN
- unsigned char __pad1;
- unsigned char __pad2;
- unsigned char __shared;
- /* FLAGS must stay at this position in the structure to maintain
- binary compatibility. */
- unsigned char __flags;
-# else
- /* FLAGS must stay at this position in the structure to maintain
- binary compatibility. */
- unsigned char __flags;
- unsigned char __shared;
- unsigned char __pad1;
- unsigned char __pad2;
-# endif
- int __cur_writer;
-#endif
-};
-
-#if _MIPS_SIM == _ABI64
-# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
-#else
-# if __BYTE_ORDER == __BIG_ENDIAN
-# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
- 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
-# else
-# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
- 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
-# endif
-#endif
-
-#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnu/bits/wordsize.h b/lib/libc/include/mipsel-linux-gnu/bits/wordsize.h
deleted file mode 100644
index 9e405e4e4e..0000000000
--- a/lib/libc/include/mipsel-linux-gnu/bits/wordsize.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-#include <sgidefs.h>
-
-#define __WORDSIZE _MIPS_SZPTR
-
-#if _MIPS_SIM == _ABI64
-# define __WORDSIZE_TIME64_COMPAT32 1
-#else
-# define __WORDSIZE_TIME64_COMPAT32 0
-#endif
-
-#if __WORDSIZE == 32
-#define __WORDSIZE32_SIZE_ULONG 0
-#define __WORDSIZE32_PTRDIFF_LONG 0
-#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/dlfcn.h b/lib/libc/include/mipsel-linux-gnueabi/bits/dlfcn.h
new file mode 100644
index 0000000000..733090d634
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/dlfcn.h
@@ -0,0 +1,64 @@
+/* System dependent definitions for run-time dynamic loading.
+ Copyright (C) 1996-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _DLFCN_H
+# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
+#endif
+
+/* The MODE argument to `dlopen' contains one of the following: */
+#define RTLD_LAZY 0x0001 /* Lazy function call binding. */
+#define RTLD_NOW 0x0002 /* Immediate function call binding. */
+#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
+#define RTLD_NOLOAD 0x00008 /* Do not load the object. */
+#define RTLD_DEEPBIND 0x00010 /* Use deep binding. */
+
+/* If the following bit is set in the MODE argument to `dlopen',
+ the symbols of the loaded object and its dependencies are made
+ visible as if the object were linked directly into the program. */
+#define RTLD_GLOBAL 0x0004
+
+/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL.
+ The implementation does this by default and so we can define the
+ value to zero. */
+#define RTLD_LOCAL 0
+
+/* Do not delete object when closed. */
+#define RTLD_NODELETE 0x01000
+
+#ifdef __USE_GNU
+/* To support profiling of shared objects it is a good idea to call
+ the function found using `dlsym' using the following macro since
+ these calls do not use the PLT. But this would mean the dynamic
+ loader has no chance to find out when the function is called. The
+ macro applies the necessary magic so that profiling is possible.
+ Rewrite
+ foo = (*fctp) (arg1, arg2);
+ into
+ foo = DL_CALL_FCT (fctp, (arg1, arg2));
+*/
+# define DL_CALL_FCT(fctp, args) \
+ (_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args)
+
+__BEGIN_DECLS
+
+/* This function calls the profiling functions. */
+extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW;
+
+__END_DECLS
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/errno.h b/lib/libc/include/mipsel-linux-gnueabi/bits/errno.h
new file mode 100644
index 0000000000..0362f92048
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/errno.h
@@ -0,0 +1,52 @@
+/* Error constants. MIPS/Linux specific version.
+ Copyright (C) 1996-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_ERRNO_H
+
+#if !defined _ERRNO_H
+# error "Never include <bits/errno.h> directly; use <errno.h> instead."
+#endif
+
+# include <linux/errno.h>
+
+/* Older Linux headers do not define these constants. */
+# ifndef ENOTSUP
+# define ENOTSUP EOPNOTSUPP
+# endif
+
+# ifndef ECANCELED
+# define ECANCELED 158
+# endif
+
+# ifndef EOWNERDEAD
+# define EOWNERDEAD 165
+# endif
+
+# ifndef ENOTRECOVERABLE
+# define ENOTRECOVERABLE 166
+# endif
+
+# ifndef ERFKILL
+# define ERFKILL 167
+# endif
+
+# ifndef EHWPOISON
+# define EHWPOISON 168
+# endif
+
+#endif /* bits/errno.h. */ \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/eventfd.h b/lib/libc/include/mipsel-linux-gnueabi/bits/eventfd.h
new file mode 100644
index 0000000000..a0f8f94d0c
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/eventfd.h
@@ -0,0 +1,31 @@
+/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_EVENTFD_H
+# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
+#endif
+
+/* Flags for eventfd. */
+enum
+ {
+ EFD_SEMAPHORE = 00000001,
+#define EFD_SEMAPHORE EFD_SEMAPHORE
+ EFD_CLOEXEC = 02000000,
+#define EFD_CLOEXEC EFD_CLOEXEC
+ EFD_NONBLOCK = 00000200
+#define EFD_NONBLOCK EFD_NONBLOCK
+ }; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/inotify.h b/lib/libc/include/mipsel-linux-gnueabi/bits/inotify.h
new file mode 100644
index 0000000000..f72c8dc639
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/inotify.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_INOTIFY_H
+# error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead."
+#endif
+
+/* Flags for the parameter of inotify_init1. */
+enum
+ {
+ IN_CLOEXEC = 02000000,
+#define IN_CLOEXEC IN_CLOEXEC
+ IN_NONBLOCK = 00000200
+#define IN_NONBLOCK IN_NONBLOCK
+ }; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/ioctl-types.h b/lib/libc/include/mipsel-linux-gnueabi/bits/ioctl-types.h
new file mode 100644
index 0000000000..84081f4bfd
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/ioctl-types.h
@@ -0,0 +1,75 @@
+/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
+ Copyright (C) 1997-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
+#endif
+
+/* Get definition of constants for use with `ioctl'. */
+#include <asm/ioctls.h>
+
+struct winsize
+ {
+ unsigned short int ws_row;
+ unsigned short int ws_col;
+ unsigned short int ws_xpixel;
+ unsigned short int ws_ypixel;
+ };
+
+#define NCC 8
+struct termio
+ {
+ unsigned short int c_iflag; /* input mode flags */
+ unsigned short int c_oflag; /* output mode flags */
+ unsigned short int c_cflag; /* control mode flags */
+ unsigned short int c_lflag; /* local mode flags */
+ char c_line; /* line discipline */
+ /* Yes, this is really NCCS. */
+ unsigned char c_cc[32 /* NCCS */]; /* control characters */
+ };
+
+/* modem lines */
+#define TIOCM_LE 0x001 /* line enable */
+#define TIOCM_DTR 0x002 /* data terminal ready */
+#define TIOCM_RTS 0x004 /* request to send */
+#define TIOCM_ST 0x010 /* secondary transmit */
+#define TIOCM_SR 0x020 /* secondary receive */
+#define TIOCM_CTS 0x040 /* clear to send */
+#define TIOCM_CAR 0x100 /* carrier detect */
+#define TIOCM_CD TIOCM_CAR
+#define TIOCM_RNG 0x200 /* ring */
+#define TIOCM_RI TIOCM_RNG
+#define TIOCM_DSR 0x400 /* data set ready */
+
+/* line disciplines */
+#define N_TTY 0
+#define N_SLIP 1
+#define N_MOUSE 2
+#define N_PPP 3
+#define N_STRIP 4
+#define N_AX25 5
+#define N_X25 6 /* X.25 async */
+#define N_6PACK 7
+#define N_MASC 8 /* Mobitex module */
+#define N_R3964 9 /* Simatic R3964 module */
+#define N_PROFIBUS_FDL 10 /* Profibus */
+#define N_IRDA 11 /* Linux IR */
+#define N_SMSBLOCK 12 /* SMS block mode */
+#define N_HDLC 13 /* synchronous HDLC */
+#define N_SYNC_PPP 14 /* synchronous PPP */
+#define N_HCI 15 /* Bluetooth HCI UART */ \ No newline at end of file
diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/wordsize.h b/lib/libc/include/mipsel-linux-gnueabi/bits/ipctypes.h
index 9e405e4e4e..aa6d3772af 100644
--- a/lib/libc/include/mips64el-linux-gnuabi64/bits/wordsize.h
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/ipctypes.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
+/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
+ Copyright (C) 2002-2021 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
@@ -15,17 +16,16 @@
License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */
-#include <sgidefs.h>
+/*
+ * Never include <bits/ipctypes.h> directly.
+ */
-#define __WORDSIZE _MIPS_SZPTR
+#ifndef _BITS_IPCTYPES_H
+#define _BITS_IPCTYPES_H 1
-#if _MIPS_SIM == _ABI64
-# define __WORDSIZE_TIME64_COMPAT32 1
-#else
-# define __WORDSIZE_TIME64_COMPAT32 0
-#endif
+#include <bits/types.h>
-#if __WORDSIZE == 32
-#define __WORDSIZE32_SIZE_ULONG 0
-#define __WORDSIZE32_PTRDIFF_LONG 0
-#endif \ No newline at end of file
+typedef __SLONG32_TYPE __ipc_pid_t;
+
+
+#endif /* bits/ipctypes.h */ \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/mman.h b/lib/libc/include/mipsel-linux-gnueabi/bits/mman.h
new file mode 100644
index 0000000000..726689ddec
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/mman.h
@@ -0,0 +1,48 @@
+/* Definitions for POSIX memory map interface. Linux/MIPS version.
+ Copyright (C) 1997-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_MMAN_H
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
+#endif
+
+/* The following definitions basically come from the kernel headers.
+ But the kernel header is not namespace clean. */
+
+/* These are Linux-specific. */
+#ifdef __USE_MISC
+# define MAP_NORESERVE 0x0400 /* don't check for reservations */
+# define MAP_GROWSDOWN 0x1000 /* stack-like segment */
+# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
+# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
+# define MAP_LOCKED 0x8000 /* pages are locked */
+# define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
+# define MAP_NONBLOCK 0x20000 /* do not block on IO */
+# define MAP_STACK 0x40000 /* Allocation is for a stack. */
+# define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
+# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
+ underlying mapping. */
+#endif
+
+#define __MAP_ANONYMOUS 0x0800
+
+/* Include generic Linux declarations. */
+#include <bits/mman-linux.h>
+
+#ifdef __USE_MISC
+# define MAP_RENAME MAP_ANONYMOUS
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/poll.h b/lib/libc/include/mipsel-linux-gnueabi/bits/poll.h
new file mode 100644
index 0000000000..fd12b70920
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/poll.h
@@ -0,0 +1,49 @@
+/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_POLL_H
+# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#endif
+
+/* Event types that can be polled for. These bits may be set in `events'
+ to indicate the interesting event types; they will appear in `revents'
+ to indicate the status of the file descriptor. */
+#define POLLIN 0x001 /* There is data to read. */
+#define POLLPRI 0x002 /* There is urgent data to read. */
+#define POLLOUT 0x004 /* Writing now will not block. */
+
+#if defined __USE_XOPEN || defined __USE_XOPEN2K8
+/* These values are defined in XPG4.2. */
+# define POLLRDNORM 0x040 /* Normal data may be read. */
+# define POLLRDBAND 0x080 /* Priority data may be read. */
+# define POLLWRNORM POLLOUT /* Writing now will not block. */
+# define POLLWRBAND 0x100 /* Priority data may be written. */
+#endif
+
+#ifdef __USE_GNU
+/* These are extensions for Linux. */
+# define POLLMSG 0x400
+# define POLLREMOVE 0x1000
+# define POLLRDHUP 0x2000
+#endif
+
+/* Event types always implicitly polled for. These bits need not be set in
+ `events', but they will appear in `revents' to indicate the status of
+ the file descriptor. */
+#define POLLERR 0x008 /* Error condition. */
+#define POLLHUP 0x010 /* Hung up. */
+#define POLLNVAL 0x020 /* Invalid polling request. */ \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/pthread_stack_min.h b/lib/libc/include/mipsel-linux-gnueabi/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..1c02866a70
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages with 64k pages. */
+#define PTHREAD_STACK_MIN 131072 \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/pthreadtypes-arch.h b/lib/libc/include/mipsel-linux-gnueabi/bits/pthreadtypes-arch.h
new file mode 100644
index 0000000000..b6894a757e
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/pthreadtypes-arch.h
@@ -0,0 +1,44 @@
+/* Machine-specific pthread type layouts. MIPS version.
+ Copyright (C) 2005-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_PTHREADTYPES_ARCH_H
+#define _BITS_PTHREADTYPES_ARCH_H 1
+
+#include <bits/endian.h>
+
+#if _MIPS_SIM == _ABI64
+# define __SIZEOF_PTHREAD_ATTR_T 56
+# define __SIZEOF_PTHREAD_MUTEX_T 40
+# define __SIZEOF_PTHREAD_RWLOCK_T 56
+# define __SIZEOF_PTHREAD_BARRIER_T 32
+#else
+# define __SIZEOF_PTHREAD_ATTR_T 36
+# define __SIZEOF_PTHREAD_MUTEX_T 24
+# define __SIZEOF_PTHREAD_RWLOCK_T 32
+# define __SIZEOF_PTHREAD_BARRIER_T 20
+#endif
+#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
+#define __SIZEOF_PTHREAD_COND_T 48
+#define __SIZEOF_PTHREAD_CONDATTR_T 4
+#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
+#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
+
+#define __LOCK_ALIGNMENT
+#define __ONCE_ALIGNMENT
+
+#endif /* bits/pthreadtypes.h */ \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/resource.h b/lib/libc/include/mipsel-linux-gnueabi/bits/resource.h
new file mode 100644
index 0000000000..743dc1b9ad
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/resource.h
@@ -0,0 +1,231 @@
+/* Bit values & structures for resource limits. Linux/MIPS version.
+ Copyright (C) 1994-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_RESOURCE_H
+# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Transmute defines to enumerations. The macro re-definitions are
+ necessary because some programs want to test for operating system
+ features with #ifdef RUSAGE_SELF. In ISO C the reflexive
+ definition is a no-op. */
+
+/* Kinds of resource limit. */
+enum __rlimit_resource
+{
+ /* Per-process CPU limit, in seconds. */
+ RLIMIT_CPU = 0,
+#define RLIMIT_CPU RLIMIT_CPU
+
+ /* Largest file that can be created, in bytes. */
+ RLIMIT_FSIZE = 1,
+#define RLIMIT_FSIZE RLIMIT_FSIZE
+
+ /* Maximum size of data segment, in bytes. */
+ RLIMIT_DATA = 2,
+#define RLIMIT_DATA RLIMIT_DATA
+
+ /* Maximum size of stack segment, in bytes. */
+ RLIMIT_STACK = 3,
+#define RLIMIT_STACK RLIMIT_STACK
+
+ /* Largest core file that can be created, in bytes. */
+ RLIMIT_CORE = 4,
+#define RLIMIT_CORE RLIMIT_CORE
+
+ /* Largest resident set size, in bytes.
+ This affects swapping; processes that are exceeding their
+ resident set size will be more likely to have physical memory
+ taken from them. */
+ __RLIMIT_RSS = 7,
+#define RLIMIT_RSS __RLIMIT_RSS
+
+ /* Number of open files. */
+ RLIMIT_NOFILE = 5,
+ __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+#define RLIMIT_NOFILE RLIMIT_NOFILE
+#define RLIMIT_OFILE __RLIMIT_OFILE
+
+ /* Address space limit (?) */
+ RLIMIT_AS = 6,
+#define RLIMIT_AS RLIMIT_AS
+
+ /* Number of processes. */
+ __RLIMIT_NPROC = 8,
+#define RLIMIT_NPROC __RLIMIT_NPROC
+
+ /* Locked-in-memory address space. */
+ __RLIMIT_MEMLOCK = 9,
+#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK
+
+ /* Maximum number of file locks. */
+ __RLIMIT_LOCKS = 10,
+#define RLIMIT_LOCKS __RLIMIT_LOCKS
+
+ /* Maximum number of pending signals. */
+ __RLIMIT_SIGPENDING = 11,
+#define RLIMIT_SIGPENDING __RLIMIT_SIGPENDING
+
+ /* Maximum bytes in POSIX message queues. */
+ __RLIMIT_MSGQUEUE = 12,
+#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE
+
+ /* Maximum nice priority allowed to raise to.
+ Nice levels 19 .. -20 correspond to 0 .. 39
+ values of this resource limit. */
+ __RLIMIT_NICE = 13,
+#define RLIMIT_NICE __RLIMIT_NICE
+
+ /* Maximum realtime priority allowed for non-priviledged
+ processes. */
+ __RLIMIT_RTPRIO = 14,
+#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
+
+ /* 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,
+#define RLIMIT_RTTIME __RLIMIT_RTTIME
+
+ __RLIMIT_NLIMITS = 16,
+ __RLIM_NLIMITS = __RLIMIT_NLIMITS
+#define RLIMIT_NLIMITS __RLIMIT_NLIMITS
+#define RLIM_NLIMITS __RLIM_NLIMITS
+};
+
+/* Value to indicate that there is no limit. */
+#if _MIPS_SIM == _ABI64
+/* The N64 syscall uses this value. */
+# define RLIM_INFINITY 0xffffffffffffffffUL
+# ifdef __USE_LARGEFILE64
+# define RLIM64_INFINITY 0xffffffffffffffffUL
+# endif
+#else
+/* The O32 and N32 syscalls use 0x7fffffff. */
+# ifndef __USE_FILE_OFFSET64
+# define RLIM_INFINITY ((long int)(~0UL >> 1))
+# else
+# define RLIM_INFINITY 0xffffffffffffffffULL
+# endif
+# ifdef __USE_LARGEFILE64
+# define RLIM64_INFINITY 0xffffffffffffffffULL
+# endif
+#endif
+
+/* We can represent all limits. */
+#define RLIM_SAVED_MAX RLIM_INFINITY
+#define RLIM_SAVED_CUR RLIM_INFINITY
+
+
+/* Type for resource quantity measurement. */
+#ifndef __USE_FILE_OFFSET64
+typedef __rlim_t rlim_t;
+#else
+typedef __rlim64_t rlim_t;
+#endif
+#ifdef __USE_LARGEFILE64
+typedef __rlim64_t rlim64_t;
+#endif
+
+struct rlimit
+ {
+ /* The current (soft) limit. */
+ rlim_t rlim_cur;
+ /* The hard limit. */
+ rlim_t rlim_max;
+ };
+
+#ifdef __USE_LARGEFILE64
+struct rlimit64
+ {
+ /* The current (soft) limit. */
+ rlim64_t rlim_cur;
+ /* The hard limit. */
+ rlim64_t rlim_max;
+ };
+#endif
+
+/* Whose usage statistics do you want? */
+enum __rusage_who
+{
+ /* The calling process. */
+ RUSAGE_SELF = 0,
+#define RUSAGE_SELF RUSAGE_SELF
+
+ /* All of its terminated child processes. */
+ RUSAGE_CHILDREN = -1
+#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+
+#ifdef __USE_GNU
+ ,
+ /* The calling thread. */
+ RUSAGE_THREAD = 1
+# define RUSAGE_THREAD RUSAGE_THREAD
+ /* Name for the same functionality on Solaris. */
+# define RUSAGE_LWP RUSAGE_THREAD
+#endif
+};
+
+#include <bits/types/struct_timeval.h>
+#include <bits/types/struct_rusage.h>
+
+/* Priority limits. */
+#define PRIO_MIN -20 /* Minimum priority a process can have. */
+#define PRIO_MAX 20 /* Maximum priority a process can have. */
+
+/* The type of the WHICH argument to `getpriority' and `setpriority',
+ indicating what flavor of entity the WHO argument specifies. */
+enum __priority_which
+{
+ PRIO_PROCESS = 0, /* WHO is a process ID. */
+#define PRIO_PROCESS PRIO_PROCESS
+ PRIO_PGRP = 1, /* WHO is a process group ID. */
+#define PRIO_PGRP PRIO_PGRP
+ PRIO_USER = 2 /* WHO is a user ID. */
+#define PRIO_USER PRIO_USER
+};
+
+
+__BEGIN_DECLS
+
+#ifdef __USE_GNU
+/* Modify and return resource limits of a process atomically. */
+# ifndef __USE_FILE_OFFSET64
+extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource,
+ const struct rlimit *__new_limit,
+ struct rlimit *__old_limit) __THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (prlimit, (__pid_t __pid,
+ enum __rlimit_resource __resource,
+ const struct rlimit *__new_limit,
+ struct rlimit *__old_limit), prlimit64);
+# else
+# define prlimit prlimit64
+# endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource,
+ const struct rlimit64 *__new_limit,
+ struct rlimit64 *__old_limit) __THROW;
+# endif
+#endif
+
+__END_DECLS \ No newline at end of file
diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/wordsize.h b/lib/libc/include/mipsel-linux-gnueabi/bits/semaphore.h
index 9e405e4e4e..73abfb8078 100644
--- a/lib/libc/include/mips64-linux-gnuabin32/bits/wordsize.h
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/semaphore.h
@@ -15,17 +15,22 @@
License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */
-#include <sgidefs.h>
-
-#define __WORDSIZE _MIPS_SZPTR
+#ifndef _SEMAPHORE_H
+# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
+#endif
#if _MIPS_SIM == _ABI64
-# define __WORDSIZE_TIME64_COMPAT32 1
+# define __SIZEOF_SEM_T 32
#else
-# define __WORDSIZE_TIME64_COMPAT32 0
+# define __SIZEOF_SEM_T 16
#endif
-#if __WORDSIZE == 32
-#define __WORDSIZE32_SIZE_ULONG 0
-#define __WORDSIZE32_PTRDIFF_LONG 0
-#endif \ No newline at end of file
+/* 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-gnueabi/bits/shmlba.h b/lib/libc/include/mipsel-linux-gnueabi/bits/shmlba.h
new file mode 100644
index 0000000000..357defb2ba
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/shmlba.h
@@ -0,0 +1,24 @@
+/* Define SHMLBA. MIPS version.
+ Copyright (C) 2018-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SHM_H
+# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
+#endif
+
+/* Segment low boundary address multiple. */
+#define SHMLBA 0x40000 \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/sigaction.h b/lib/libc/include/mipsel-linux-gnueabi/bits/sigaction.h
new file mode 100644
index 0000000000..f968c4d10d
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/sigaction.h
@@ -0,0 +1,94 @@
+/* The proper definitions for Linux/MIPS's sigaction.
+ Copyright (C) 1993-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_SIGACTION_H
+#define _BITS_SIGACTION_H 1
+
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
+/* Structure describing the action to be taken when a signal arrives. */
+struct sigaction
+ {
+ /* Special flags. */
+ int sa_flags;
+
+ /* Signal handler. */
+#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED
+ union
+ {
+ /* Used if SA_SIGINFO is not set. */
+ __sighandler_t sa_handler;
+ /* Used if SA_SIGINFO is set. */
+ void (*sa_sigaction) (int, siginfo_t *, void *);
+ }
+ __sigaction_handler;
+# define sa_handler __sigaction_handler.sa_handler
+# define sa_sigaction __sigaction_handler.sa_sigaction
+#else
+ __sighandler_t sa_handler;
+#endif
+ /* Additional set of signals to be blocked. */
+ __sigset_t sa_mask;
+
+ /* The ABI says here are two unused ints following. */
+ /* Restore handler. */
+ void (*sa_restorer) (void);
+
+#if _MIPS_SZPTR < 64
+ int sa_resv[1];
+#endif
+ };
+
+/* Bits in `sa_flags'. */
+/* Please note that some Linux kernels versions use different values for these
+ flags which is a bug in those kernel versions. */
+#define SA_NOCLDSTOP 0x00000001 /* Don't send SIGCHLD when children stop. */
+#define SA_NOCLDWAIT 0x00010000 /* Don't create zombie on child death. */
+#define SA_SIGINFO 0x00000008 /* Invoke signal-catching function with
+ three arguments instead of one. */
+#if defined __USE_XOPEN_EXTENDED || defined __USE_MISC
+# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
+#endif
+#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
+# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
+# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */
+# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
+ its handler is being executed. */
+#endif
+#ifdef __USE_MISC
+# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
+
+/* Some aliases for the SA_ constants. */
+# define SA_NOMASK SA_NODEFER
+# define SA_ONESHOT SA_RESETHAND
+# define SA_STACK SA_ONSTACK
+#endif
+
+/* Values for the HOW argument to `sigprocmask'. */
+#define SIG_NOP 0 /* 0 is unused to catch errors */
+#define SIG_BLOCK 1 /* Block signals. */
+#define SIG_UNBLOCK 2 /* Unblock signals. */
+#define SIG_SETMASK 3 /* Set the set of blocked signals. */
+#ifdef __USE_MISC
+# define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility:
+ set only the low 32 bit of the sigset. */
+#endif
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/sigcontext.h b/lib/libc/include/mipsel-linux-gnueabi/bits/sigcontext.h
new file mode 100644
index 0000000000..cdf767d48a
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/sigcontext.h
@@ -0,0 +1,82 @@
+/* Copyright (C) 1996-2021 Free Software Foundation, Inc. This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_SIGCONTEXT_H
+#define _BITS_SIGCONTEXT_H 1
+
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
+#include <sgidefs.h>
+
+#if _MIPS_SIM == _ABIO32
+
+/* Certain unused fields were replaced with new ones in 2.6.12-rc4.
+ The changes were as follows:
+
+ sc_cause -> sc_hi1
+ sc_badvaddr -> sc_lo1
+ sc_sigset[0] -> sc_hi2
+ sc_sigset[1] -> sc_lo2
+ sc_sigset[2] -> sc_hi3
+ sc_sigset[3] -> sc_lo3
+
+ sc_regmask, sc_ownedfp and sc_fpc_eir are not used. */
+struct sigcontext {
+ unsigned int sc_regmask;
+ unsigned int sc_status;
+ __extension__ unsigned long long sc_pc;
+ __extension__ unsigned long long sc_regs[32];
+ __extension__ unsigned long long sc_fpregs[32];
+ unsigned int sc_ownedfp;
+ unsigned int sc_fpc_csr;
+ unsigned int sc_fpc_eir;
+ unsigned int sc_used_math;
+ unsigned int sc_dsp;
+ __extension__ unsigned long long sc_mdhi;
+ __extension__ unsigned long long sc_mdlo;
+ unsigned long sc_hi1;
+ unsigned long sc_lo1;
+ unsigned long sc_hi2;
+ unsigned long sc_lo2;
+ unsigned long sc_hi3;
+ unsigned long sc_lo3;
+};
+
+#else
+
+/* This structure changed in 2.6.12-rc4 when DSP support was added. */
+struct sigcontext {
+ __extension__ unsigned long long sc_regs[32];
+ __extension__ unsigned long long sc_fpregs[32];
+ __extension__ unsigned long long sc_mdhi;
+ __extension__ unsigned long long sc_hi1;
+ __extension__ unsigned long long sc_hi2;
+ __extension__ unsigned long long sc_hi3;
+ __extension__ unsigned long long sc_mdlo;
+ __extension__ unsigned long long sc_lo1;
+ __extension__ unsigned long long sc_lo2;
+ __extension__ unsigned long long sc_lo3;
+ __extension__ unsigned long long sc_pc;
+ unsigned int sc_fpc_csr;
+ unsigned int sc_used_math;
+ unsigned int sc_dsp;
+ unsigned int sc_reserved;
+};
+
+#endif /* _MIPS_SIM != _ABIO32 */
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/siginfo-arch.h b/lib/libc/include/mipsel-linux-gnueabi/bits/siginfo-arch.h
new file mode 100644
index 0000000000..d639ba2076
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/siginfo-arch.h
@@ -0,0 +1,13 @@
+/* Architecture-specific adjustments to siginfo_t. MIPS version. */
+#ifndef _BITS_SIGINFO_ARCH_H
+#define _BITS_SIGINFO_ARCH_H 1
+
+/* MIPS has the si_code and si_errno fields in the opposite order from
+ all other architectures. */
+#define __SI_ERRNO_THEN_CODE 0
+
+/* MIPS also has different values for SI_ASYNCIO, SI_MESGQ, and SI_TIMER
+ than all other architectures. */
+#define __SI_ASYNCIO_AFTER_SIGIO 0
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/signalfd.h b/lib/libc/include/mipsel-linux-gnueabi/bits/signalfd.h
new file mode 100644
index 0000000000..10b69b2df4
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/signalfd.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SIGNALFD_H
+# error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead."
+#endif
+
+/* Flags for signalfd. */
+enum
+ {
+ SFD_CLOEXEC = 02000000,
+#define SFD_CLOEXEC SFD_CLOEXEC
+ SFD_NONBLOCK = 00000200
+#define SFD_NONBLOCK SFD_NONBLOCK
+ }; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/signum-arch.h b/lib/libc/include/mipsel-linux-gnueabi/bits/signum-arch.h
new file mode 100644
index 0000000000..a217ddd443
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/signum-arch.h
@@ -0,0 +1,65 @@
+/* Signal number definitions. Linux/MIPS version.
+ Copyright (C) 1995-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_SIGNUM_H
+#define _BITS_SIGNUM_H 1
+
+#ifndef _SIGNAL_H
+#error "Never include <bits/signum.h> directly; use <signal.h> instead."
+#endif
+
+/* Adjustments and additions to the signal number constants for
+ Linux/MIPS. */
+
+#define SIGEMT 7 /* Emulator trap. */
+#define SIGPWR 19 /* Power failure imminent. */
+
+/* Historical signals specified by POSIX. */
+#define SIGBUS 10 /* Bus error. */
+#define SIGSYS 12 /* Bad system call. */
+
+/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */
+#define SIGURG 21 /* Urgent data is available at a socket. */
+#define SIGSTOP 23 /* Stop, unblockable. */
+#define SIGTSTP 24 /* Keyboard stop. */
+#define SIGCONT 25 /* Continue. */
+#define SIGCHLD 18 /* Child terminated or stopped. */
+#define SIGTTIN 26 /* Background read from control terminal. */
+#define SIGTTOU 27 /* Background write to control terminal. */
+#define SIGPOLL 22 /* Pollable event occurred (System V). */
+#define SIGXCPU 30 /* CPU time limit exceeded. */
+#define SIGVTALRM 28 /* Virtual timer expired. */
+#define SIGPROF 29 /* Profiling timer expired. */
+#define SIGXFSZ 31 /* File size limit exceeded. */
+#define SIGUSR1 16 /* User-defined signal 1. */
+#define SIGUSR2 17 /* User-defined signal 2. */
+
+/* Nonstandard signals found in all modern POSIX systems
+ (including both BSD and Linux). */
+#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
+
+/* Archaic names for compatibility. */
+#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */
+#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */
+#define SIGCLD SIGCHLD /* Old System V name */
+
+/* By default no real-time signals are supported. */
+#define __SIGRTMIN 32
+#define __SIGRTMAX 127
+
+#endif /* <signal.h> included. */ \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/socket-constants.h b/lib/libc/include/mipsel-linux-gnueabi/bits/socket-constants.h
new file mode 100644
index 0000000000..3e95d151ca
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/socket-constants.h
@@ -0,0 +1,70 @@
+/* Socket constants which vary among Linux architectures. Version for MIPS.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SOCKET_H
+# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
+#endif
+
+#define SOL_SOCKET 65535
+#define SO_ACCEPTCONN 4105
+#define SO_BROADCAST 32
+#define SO_DONTROUTE 16
+#define SO_ERROR 4103
+#define SO_KEEPALIVE 8
+#define SO_LINGER 128
+#define SO_OOBINLINE 256
+#define SO_RCVBUF 4098
+#define SO_RCVLOWAT 4100
+#define SO_REUSEADDR 4
+#define SO_SNDBUF 4097
+#define SO_SNDLOWAT 4099
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 4102
+# define SO_SNDTIMEO 4101
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 4102
+# define SO_SNDTIMEO_OLD 4101
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/socket_type.h b/lib/libc/include/mipsel-linux-gnueabi/bits/socket_type.h
new file mode 100644
index 0000000000..f66bd0ea5f
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/socket_type.h
@@ -0,0 +1,55 @@
+/* Define enum __socket_type for Linux/MIPS.
+ Copyright (C) 1991-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SOCKET_H
+# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
+#endif
+
+/* Types of sockets. */
+enum __socket_type
+{
+ SOCK_DGRAM = 1, /* Connectionless, unreliable datagrams
+ of fixed maximum length. */
+#define SOCK_DGRAM SOCK_DGRAM
+ SOCK_STREAM = 2, /* Sequenced, reliable, connection-based
+ byte streams. */
+#define SOCK_STREAM SOCK_STREAM
+ SOCK_RAW = 3, /* Raw protocol interface. */
+#define SOCK_RAW SOCK_RAW
+ SOCK_RDM = 4, /* Reliably-delivered messages. */
+#define SOCK_RDM SOCK_RDM
+ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
+ datagrams of fixed maximum length. */
+#define SOCK_SEQPACKET SOCK_SEQPACKET
+ SOCK_DCCP = 6,
+#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */
+ SOCK_PACKET = 10, /* Linux specific way of getting packets
+ at the dev level. For writing rarp and
+ other similar things on the user level. */
+#define SOCK_PACKET SOCK_PACKET
+
+ /* Flags to be ORed into the type parameter of socket and socketpair and
+ used for the flags parameter of paccept. */
+
+ SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
+ new descriptor(s). */
+#define SOCK_CLOEXEC SOCK_CLOEXEC
+ SOCK_NONBLOCK = 00000200 /* Atomically mark descriptor(s) as
+ non-blocking. */
+#define SOCK_NONBLOCK SOCK_NONBLOCK
+}; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/statfs.h b/lib/libc/include/mipsel-linux-gnueabi/bits/statfs.h
new file mode 100644
index 0000000000..0e18718b24
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/statfs.h
@@ -0,0 +1,73 @@
+/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_STATFS_H
+# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
+#endif
+
+#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/
+
+struct statfs
+ {
+ long int f_type;
+#define f_fstyp f_type
+ long int f_bsize;
+ long int f_frsize; /* Fragment size - unsupported */
+#ifndef __USE_FILE_OFFSET64
+ __fsblkcnt_t f_blocks;
+ __fsblkcnt_t f_bfree;
+ __fsblkcnt_t f_files;
+ __fsblkcnt_t f_ffree;
+ __fsblkcnt_t f_bavail;
+#else
+ __fsblkcnt64_t f_blocks;
+ __fsblkcnt64_t f_bfree;
+ __fsblkcnt64_t f_files;
+ __fsblkcnt64_t f_ffree;
+ __fsblkcnt64_t f_bavail;
+#endif
+
+ /* Linux specials */
+ __fsid_t f_fsid;
+ long int f_namelen;
+ long int f_flags;
+ long int f_spare[5];
+ };
+
+#ifdef __USE_LARGEFILE64
+struct statfs64
+ {
+ long int f_type;
+#define f_fstyp f_type
+ long int f_bsize;
+ long int f_frsize; /* Fragment size - unsupported */
+ __fsblkcnt64_t f_blocks;
+ __fsblkcnt64_t f_bfree;
+ __fsblkcnt64_t f_files;
+ __fsblkcnt64_t f_ffree;
+ __fsblkcnt64_t f_bavail;
+
+ /* Linux specials */
+ __fsid_t f_fsid;
+ long int f_namelen;
+ long int f_flags;
+ long int f_spare[5];
+ };
+#endif
+
+/* Tell code we have these members. */
+#define _STATFS_F_NAMELEN \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/struct_mutex.h b/lib/libc/include/mipsel-linux-gnueabi/bits/struct_mutex.h
new file mode 100644
index 0000000000..8ddb89ce24
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/struct_mutex.h
@@ -0,0 +1,56 @@
+/* MIPS internal mutex struct definitions.
+ Copyright (C) 2019-2021 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
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _THREAD_MUTEX_INTERNAL_H
+#define _THREAD_MUTEX_INTERNAL_H 1
+
+struct __pthread_mutex_s
+{
+ int __lock;
+ unsigned int __count;
+ int __owner;
+#if _MIPS_SIM == _ABI64
+ unsigned int __nusers;
+#endif
+ /* KIND must stay at this position in the structure to maintain
+ binary compatibility with static initializers. */
+ int __kind;
+#if _MIPS_SIM == _ABI64
+ int __spins;
+ __pthread_list_t __list;
+# define __PTHREAD_MUTEX_HAVE_PREV 1
+#else
+ unsigned int __nusers;
+ __extension__ union
+ {
+ int __spins;
+ __pthread_slist_t __list;
+ };
+# define __PTHREAD_MUTEX_HAVE_PREV 0
+#endif
+};
+
+#if _MIPS_SIM == _ABI64
+# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
+ 0, 0, 0, 0, __kind, 0, { 0, 0 }
+#else
+# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
+ 0, 0, 0, __kind, 0, { 0 }
+#endif
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/termios-c_cc.h b/lib/libc/include/mipsel-linux-gnueabi/bits/termios-c_cc.h
new file mode 100644
index 0000000000..8e67783a9e
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/termios-c_cc.h
@@ -0,0 +1,43 @@
+/* termios c_cc symbolic constant definitions. Linux/mips version.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
+#endif
+
+/* c_cc characters */
+#define VINTR 0 /* Interrupt character [ISIG]. */
+#define VQUIT 1 /* Quit character [ISIG]. */
+#define VERASE 2 /* Erase character [ICANON]. */
+#define VKILL 3 /* Kill-line character [ICANON]. */
+#define VMIN 4 /* Minimum number of bytes read at once [!ICANON]. */
+#define VTIME 5 /* Time-out value (tenths of a second) [!ICANON]. */
+#define VEOL2 6 /* Second EOL character [ICANON]. */
+#define VSWTC 7
+#define VSWTCH VSWTC
+#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */
+#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */
+#define VSUSP 10 /* Suspend character [ISIG]. */
+ /* VDSUSP is not supported on Linux. */
+/* #define VDSUSP 11 / * Delayed suspend character [ISIG]. */
+#define VREPRINT 12 /* Reprint-line character [ICANON]. */
+#define VDISCARD 13 /* Discard character [IEXTEN]. */
+#define VWERASE 14 /* Word-erase character [ICANON]. */
+#define VLNEXT 15 /* Literal-next character [IEXTEN]. */
+#define VEOF 16 /* End-of-file character [ICANON]. */
+#define VEOL 17 /* End-of-line character [ICANON]. */ \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/termios-c_lflag.h b/lib/libc/include/mipsel-linux-gnueabi/bits/termios-c_lflag.h
new file mode 100644
index 0000000000..6ef207b1a2
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/termios-c_lflag.h
@@ -0,0 +1,46 @@
+/* termios local mode definitions. Linux/mips version.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
+#endif
+
+/* c_lflag bits */
+#define ISIG 0000001 /* Enable signals. */
+#define ICANON 0000002 /* Do erase and kill processing. */
+#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
+# define XCASE 0000004
+#endif
+#define ECHO 0000010 /* Enable echo. */
+#define ECHOE 0000020 /* Visual erase for ERASE. */
+#define ECHOK 0000040 /* Echo NL after KILL. */
+#define ECHONL 0000100 /* Echo NL even if ECHO is off. */
+#define NOFLSH 0000200 /* Disable flush after interrupt. */
+#define IEXTEN 0000400 /* Enable DISCARD and LNEXT. */
+#ifdef __USE_MISC
+# define ECHOCTL 0001000 /* Echo control characters as ^X. */
+# define ECHOPRT 0002000 /* Hardcopy visual erase. */
+# define ECHOKE 0004000 /* Visual erase for KILL. */
+# define FLUSHO 0020000
+# define PENDIN 0040000 /* Retype pending input (state). */
+#endif
+#define TOSTOP 0100000 /* Send SIGTTOU for background output. */
+#define ITOSTOP TOSTOP
+#ifdef __USE_MISC
+# define EXTPROC 0200000
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/termios-struct.h b/lib/libc/include/mipsel-linux-gnueabi/bits/termios-struct.h
new file mode 100644
index 0000000000..3bae186f55
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/termios-struct.h
@@ -0,0 +1,34 @@
+/* struct termios definition. Linux/mips version.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
+#endif
+
+#define NCCS 32
+struct termios
+ {
+ tcflag_t c_iflag; /* input mode flags */
+ tcflag_t c_oflag; /* output mode flags */
+ tcflag_t c_cflag; /* control mode flags */
+ tcflag_t c_lflag; /* local mode flags */
+ cc_t c_line; /* line discipline */
+ cc_t c_cc[NCCS]; /* control characters */
+#define _HAVE_STRUCT_TERMIOS_C_ISPEED 0
+#define _HAVE_STRUCT_TERMIOS_C_OSPEED 0
+ }; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/termios-tcflow.h b/lib/libc/include/mipsel-linux-gnueabi/bits/termios-tcflow.h
new file mode 100644
index 0000000000..a6a4e5719e
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/termios-tcflow.h
@@ -0,0 +1,26 @@
+/* termios local mode definitions. Linux/mips version.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead."
+#endif
+
+/* tcsetattr uses these */
+#define TCSANOW 0x540e /* Same as TCSETS; change immediately. */
+#define TCSADRAIN 0x540f /* Same as TCSETSW; change when pending output is written. */
+#define TCSAFLUSH 0x5410 /* Same as TCSETSF; flush pending input before changing. */ \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/timerfd.h b/lib/libc/include/mipsel-linux-gnueabi/bits/timerfd.h
new file mode 100644
index 0000000000..871792717b
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/timerfd.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 2008-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_TIMERFD_H
+# error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead."
+#endif
+
+/* Bits to be set in the FLAGS parameter of `timerfd_create'. */
+enum
+ {
+ TFD_CLOEXEC = 02000000,
+#define TFD_CLOEXEC TFD_CLOEXEC
+ TFD_NONBLOCK = 00000200
+#define TFD_NONBLOCK TFD_NONBLOCK
+ }; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/types/stack_t.h b/lib/libc/include/mipsel-linux-gnueabi/bits/types/stack_t.h
new file mode 100644
index 0000000000..005479e51a
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/types/stack_t.h
@@ -0,0 +1,33 @@
+/* Define stack_t. MIPS Linux version.
+ Copyright (C) 1998-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef __stack_t_defined
+#define __stack_t_defined 1
+
+#define __need_size_t
+#include <stddef.h>
+
+/* Structure describing a signal stack. */
+typedef struct
+ {
+ void *ss_sp;
+ size_t ss_size;
+ int ss_flags;
+ } stack_t;
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_msqid_ds.h b/lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_msqid_ds.h
new file mode 100644
index 0000000000..c7dcdf23d9
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_msqid_ds.h
@@ -0,0 +1,62 @@
+/* Linux/MIPS implementation of the SysV message struct msqid_ds.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_MSG_H
+# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
+#endif
+
+#include <bits/types/time_t.h>
+
+/* Structure of record for one message inside the kernel.
+ The type `struct msg' is opaque. */
+struct msqid_ds
+{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
+ 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;
+#endif
+}; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_semid_ds.h b/lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_semid_ds.h
new file mode 100644
index 0000000000..c1961e1bb1
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_semid_ds.h
@@ -0,0 +1,36 @@
+/* MIPS implementation of the semaphore struct semid_ds
+ Copyright (C) 1995-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SEM_H
+# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead."
+#endif
+
+/* Data structure describing a set of semaphores. */
+struct semid_ds
+{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
+ 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;
+#endif
+}; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_shmid_ds.h b/lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_shmid_ds.h
new file mode 100644
index 0000000000..2e8525c1a5
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_shmid_ds.h
@@ -0,0 +1,53 @@
+/* Linux/MIPS implementation of the shared memory struct shmid_ds.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SHM_H
+# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead."
+#endif
+
+/* Data structure describing a shared memory segment. */
+struct shmid_ds
+ {
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
+ 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
+#endif
+ }; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabi/ieee754.h b/lib/libc/include/mipsel-linux-gnueabi/ieee754.h
new file mode 100644
index 0000000000..f3e3977ca3
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabi/ieee754.h
@@ -0,0 +1,326 @@
+/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _IEEE754_H
+#define _IEEE754_H 1
+
+#include <features.h>
+
+#include <bits/endian.h>
+
+#ifndef __LDBL_MANT_DIG__
+# include <float.h>
+# define __LDBL_MANT_DIG__ LDBL_MANT_DIG
+#endif
+
+__BEGIN_DECLS
+
+union ieee754_float
+ {
+ float f;
+
+ /* This is the IEEE 754 single-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:8;
+ unsigned int mantissa:23;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ unsigned int mantissa:23;
+ unsigned int exponent:8;
+ 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:8;
+ unsigned int quiet_nan:1;
+ unsigned int mantissa:22;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ unsigned int mantissa:22;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:8;
+ unsigned int negative:1;
+#endif /* Little endian. */
+ } ieee_nan;
+ };
+
+#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
+
+
+union ieee754_double
+ {
+ double d;
+
+ /* This is the IEEE 754 double-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:11;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:20;
+ unsigned int mantissa1:32;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+# else
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+# endif
+#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:11;
+ unsigned int quiet_nan:1;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:19;
+ unsigned int mantissa1:32;
+#else
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
+ unsigned int mantissa0:19;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+# else
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:19;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+# endif
+#endif
+ } ieee_nan;
+ };
+
+#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
+
+#if __LDBL_MANT_DIG__ == 113
+
+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;
+#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:15;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:15;
+ unsigned int negative:1;
+#endif /* Little endian. */
+ } ieee_nan;
+ };
+
+#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
+
+#elif __LDBL_MANT_DIG__ == 64
+
+union ieee854_long_double
+ {
+ long double d;
+
+ /* This is the IEEE 854 double-extended-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:15;
+ unsigned int empty:16;
+ unsigned int mantissa0:32;
+ unsigned int mantissa1:32;
+#endif
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
+ unsigned int exponent:15;
+ unsigned int negative:1;
+ unsigned int empty:16;
+ unsigned int mantissa0:32;
+ unsigned int mantissa1:32;
+# else
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:32;
+ unsigned int exponent:15;
+ unsigned int negative:1;
+ unsigned int empty:16;
+# endif
+#endif
+ } ieee;
+
+ /* This is for NaNs in the IEEE 854 double-extended-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:15;
+ unsigned int empty:16;
+ unsigned int one:1;
+ unsigned int quiet_nan:1;
+ unsigned int mantissa0:30;
+ unsigned int mantissa1:32;
+#endif
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
+ unsigned int exponent:15;
+ unsigned int negative:1;
+ unsigned int empty:16;
+ unsigned int mantissa0:30;
+ unsigned int quiet_nan:1;
+ unsigned int one:1;
+ unsigned int mantissa1:32;
+# else
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:30;
+ unsigned int quiet_nan:1;
+ unsigned int one:1;
+ unsigned int exponent:15;
+ unsigned int negative:1;
+ unsigned int empty:16;
+# endif
+#endif
+ } ieee_nan;
+ };
+
+#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
+
+#elif __LDBL_MANT_DIG__ == 53
+
+union ieee854_long_double
+ {
+ long double d;
+
+ /* This is the IEEE 754 double-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:11;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:20;
+ unsigned int mantissa1:32;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+# else
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+# endif
+#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:11;
+ unsigned int quiet_nan:1;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:19;
+ unsigned int mantissa1:32;
+#else
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
+ unsigned int mantissa0:19;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+# else
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:19;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+# endif
+#endif
+ } ieee_nan;
+ };
+
+#define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */
+
+#endif /* __LDBL_MANT_DIG__ == 53 */
+
+__END_DECLS
+
+#endif /* ieee754.h */ \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/dlfcn.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/dlfcn.h
new file mode 100644
index 0000000000..733090d634
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/dlfcn.h
@@ -0,0 +1,64 @@
+/* System dependent definitions for run-time dynamic loading.
+ Copyright (C) 1996-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _DLFCN_H
+# error "Never use <bits/dlfcn.h> directly; include <dlfcn.h> instead."
+#endif
+
+/* The MODE argument to `dlopen' contains one of the following: */
+#define RTLD_LAZY 0x0001 /* Lazy function call binding. */
+#define RTLD_NOW 0x0002 /* Immediate function call binding. */
+#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
+#define RTLD_NOLOAD 0x00008 /* Do not load the object. */
+#define RTLD_DEEPBIND 0x00010 /* Use deep binding. */
+
+/* If the following bit is set in the MODE argument to `dlopen',
+ the symbols of the loaded object and its dependencies are made
+ visible as if the object were linked directly into the program. */
+#define RTLD_GLOBAL 0x0004
+
+/* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL.
+ The implementation does this by default and so we can define the
+ value to zero. */
+#define RTLD_LOCAL 0
+
+/* Do not delete object when closed. */
+#define RTLD_NODELETE 0x01000
+
+#ifdef __USE_GNU
+/* To support profiling of shared objects it is a good idea to call
+ the function found using `dlsym' using the following macro since
+ these calls do not use the PLT. But this would mean the dynamic
+ loader has no chance to find out when the function is called. The
+ macro applies the necessary magic so that profiling is possible.
+ Rewrite
+ foo = (*fctp) (arg1, arg2);
+ into
+ foo = DL_CALL_FCT (fctp, (arg1, arg2));
+*/
+# define DL_CALL_FCT(fctp, args) \
+ (_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args)
+
+__BEGIN_DECLS
+
+/* This function calls the profiling functions. */
+extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW;
+
+__END_DECLS
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/errno.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/errno.h
new file mode 100644
index 0000000000..0362f92048
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/errno.h
@@ -0,0 +1,52 @@
+/* Error constants. MIPS/Linux specific version.
+ Copyright (C) 1996-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_ERRNO_H
+
+#if !defined _ERRNO_H
+# error "Never include <bits/errno.h> directly; use <errno.h> instead."
+#endif
+
+# include <linux/errno.h>
+
+/* Older Linux headers do not define these constants. */
+# ifndef ENOTSUP
+# define ENOTSUP EOPNOTSUPP
+# endif
+
+# ifndef ECANCELED
+# define ECANCELED 158
+# endif
+
+# ifndef EOWNERDEAD
+# define EOWNERDEAD 165
+# endif
+
+# ifndef ENOTRECOVERABLE
+# define ENOTRECOVERABLE 166
+# endif
+
+# ifndef ERFKILL
+# define ERFKILL 167
+# endif
+
+# ifndef EHWPOISON
+# define EHWPOISON 168
+# endif
+
+#endif /* bits/errno.h. */ \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/eventfd.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/eventfd.h
new file mode 100644
index 0000000000..a0f8f94d0c
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/eventfd.h
@@ -0,0 +1,31 @@
+/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_EVENTFD_H
+# error "Never use <bits/eventfd.h> directly; include <sys/eventfd.h> instead."
+#endif
+
+/* Flags for eventfd. */
+enum
+ {
+ EFD_SEMAPHORE = 00000001,
+#define EFD_SEMAPHORE EFD_SEMAPHORE
+ EFD_CLOEXEC = 02000000,
+#define EFD_CLOEXEC EFD_CLOEXEC
+ EFD_NONBLOCK = 00000200
+#define EFD_NONBLOCK EFD_NONBLOCK
+ }; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/inotify.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/inotify.h
new file mode 100644
index 0000000000..f72c8dc639
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/inotify.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_INOTIFY_H
+# error "Never use <bits/inotify.h> directly; include <sys/inotify.h> instead."
+#endif
+
+/* Flags for the parameter of inotify_init1. */
+enum
+ {
+ IN_CLOEXEC = 02000000,
+#define IN_CLOEXEC IN_CLOEXEC
+ IN_NONBLOCK = 00000200
+#define IN_NONBLOCK IN_NONBLOCK
+ }; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/ioctl-types.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/ioctl-types.h
new file mode 100644
index 0000000000..84081f4bfd
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/ioctl-types.h
@@ -0,0 +1,75 @@
+/* Structure types for pre-termios terminal ioctls. Linux/MIPS version.
+ Copyright (C) 1997-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
+#endif
+
+/* Get definition of constants for use with `ioctl'. */
+#include <asm/ioctls.h>
+
+struct winsize
+ {
+ unsigned short int ws_row;
+ unsigned short int ws_col;
+ unsigned short int ws_xpixel;
+ unsigned short int ws_ypixel;
+ };
+
+#define NCC 8
+struct termio
+ {
+ unsigned short int c_iflag; /* input mode flags */
+ unsigned short int c_oflag; /* output mode flags */
+ unsigned short int c_cflag; /* control mode flags */
+ unsigned short int c_lflag; /* local mode flags */
+ char c_line; /* line discipline */
+ /* Yes, this is really NCCS. */
+ unsigned char c_cc[32 /* NCCS */]; /* control characters */
+ };
+
+/* modem lines */
+#define TIOCM_LE 0x001 /* line enable */
+#define TIOCM_DTR 0x002 /* data terminal ready */
+#define TIOCM_RTS 0x004 /* request to send */
+#define TIOCM_ST 0x010 /* secondary transmit */
+#define TIOCM_SR 0x020 /* secondary receive */
+#define TIOCM_CTS 0x040 /* clear to send */
+#define TIOCM_CAR 0x100 /* carrier detect */
+#define TIOCM_CD TIOCM_CAR
+#define TIOCM_RNG 0x200 /* ring */
+#define TIOCM_RI TIOCM_RNG
+#define TIOCM_DSR 0x400 /* data set ready */
+
+/* line disciplines */
+#define N_TTY 0
+#define N_SLIP 1
+#define N_MOUSE 2
+#define N_PPP 3
+#define N_STRIP 4
+#define N_AX25 5
+#define N_X25 6 /* X.25 async */
+#define N_6PACK 7
+#define N_MASC 8 /* Mobitex module */
+#define N_R3964 9 /* Simatic R3964 module */
+#define N_PROFIBUS_FDL 10 /* Profibus */
+#define N_IRDA 11 /* Linux IR */
+#define N_SMSBLOCK 12 /* SMS block mode */
+#define N_HDLC 13 /* synchronous HDLC */
+#define N_SYNC_PPP 14 /* synchronous PPP */
+#define N_HCI 15 /* Bluetooth HCI UART */ \ No newline at end of file
diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/wordsize.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/ipctypes.h
index 9e405e4e4e..aa6d3772af 100644
--- a/lib/libc/include/mips64-linux-gnuabi64/bits/wordsize.h
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/ipctypes.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 2002-2021 Free Software Foundation, Inc.
+/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version
+ Copyright (C) 2002-2021 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
@@ -15,17 +16,16 @@
License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */
-#include <sgidefs.h>
+/*
+ * Never include <bits/ipctypes.h> directly.
+ */
-#define __WORDSIZE _MIPS_SZPTR
+#ifndef _BITS_IPCTYPES_H
+#define _BITS_IPCTYPES_H 1
-#if _MIPS_SIM == _ABI64
-# define __WORDSIZE_TIME64_COMPAT32 1
-#else
-# define __WORDSIZE_TIME64_COMPAT32 0
-#endif
+#include <bits/types.h>
-#if __WORDSIZE == 32
-#define __WORDSIZE32_SIZE_ULONG 0
-#define __WORDSIZE32_PTRDIFF_LONG 0
-#endif \ No newline at end of file
+typedef __SLONG32_TYPE __ipc_pid_t;
+
+
+#endif /* bits/ipctypes.h */ \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/mman.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/mman.h
new file mode 100644
index 0000000000..726689ddec
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/mman.h
@@ -0,0 +1,48 @@
+/* Definitions for POSIX memory map interface. Linux/MIPS version.
+ Copyright (C) 1997-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_MMAN_H
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
+#endif
+
+/* The following definitions basically come from the kernel headers.
+ But the kernel header is not namespace clean. */
+
+/* These are Linux-specific. */
+#ifdef __USE_MISC
+# define MAP_NORESERVE 0x0400 /* don't check for reservations */
+# define MAP_GROWSDOWN 0x1000 /* stack-like segment */
+# define MAP_DENYWRITE 0x2000 /* ETXTBSY */
+# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
+# define MAP_LOCKED 0x8000 /* pages are locked */
+# define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
+# define MAP_NONBLOCK 0x20000 /* do not block on IO */
+# define MAP_STACK 0x40000 /* Allocation is for a stack. */
+# define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
+# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
+ underlying mapping. */
+#endif
+
+#define __MAP_ANONYMOUS 0x0800
+
+/* Include generic Linux declarations. */
+#include <bits/mman-linux.h>
+
+#ifdef __USE_MISC
+# define MAP_RENAME MAP_ANONYMOUS
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/poll.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/poll.h
new file mode 100644
index 0000000000..fd12b70920
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/poll.h
@@ -0,0 +1,49 @@
+/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_POLL_H
+# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#endif
+
+/* Event types that can be polled for. These bits may be set in `events'
+ to indicate the interesting event types; they will appear in `revents'
+ to indicate the status of the file descriptor. */
+#define POLLIN 0x001 /* There is data to read. */
+#define POLLPRI 0x002 /* There is urgent data to read. */
+#define POLLOUT 0x004 /* Writing now will not block. */
+
+#if defined __USE_XOPEN || defined __USE_XOPEN2K8
+/* These values are defined in XPG4.2. */
+# define POLLRDNORM 0x040 /* Normal data may be read. */
+# define POLLRDBAND 0x080 /* Priority data may be read. */
+# define POLLWRNORM POLLOUT /* Writing now will not block. */
+# define POLLWRBAND 0x100 /* Priority data may be written. */
+#endif
+
+#ifdef __USE_GNU
+/* These are extensions for Linux. */
+# define POLLMSG 0x400
+# define POLLREMOVE 0x1000
+# define POLLRDHUP 0x2000
+#endif
+
+/* Event types always implicitly polled for. These bits need not be set in
+ `events', but they will appear in `revents' to indicate the status of
+ the file descriptor. */
+#define POLLERR 0x008 /* Error condition. */
+#define POLLHUP 0x010 /* Hung up. */
+#define POLLNVAL 0x020 /* Invalid polling request. */ \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/pthread_stack_min.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..1c02866a70
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. MIPS Linux version.
+ Copyright (C) 2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages with 64k pages. */
+#define PTHREAD_STACK_MIN 131072 \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/pthreadtypes-arch.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/pthreadtypes-arch.h
new file mode 100644
index 0000000000..b6894a757e
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/pthreadtypes-arch.h
@@ -0,0 +1,44 @@
+/* Machine-specific pthread type layouts. MIPS version.
+ Copyright (C) 2005-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_PTHREADTYPES_ARCH_H
+#define _BITS_PTHREADTYPES_ARCH_H 1
+
+#include <bits/endian.h>
+
+#if _MIPS_SIM == _ABI64
+# define __SIZEOF_PTHREAD_ATTR_T 56
+# define __SIZEOF_PTHREAD_MUTEX_T 40
+# define __SIZEOF_PTHREAD_RWLOCK_T 56
+# define __SIZEOF_PTHREAD_BARRIER_T 32
+#else
+# define __SIZEOF_PTHREAD_ATTR_T 36
+# define __SIZEOF_PTHREAD_MUTEX_T 24
+# define __SIZEOF_PTHREAD_RWLOCK_T 32
+# define __SIZEOF_PTHREAD_BARRIER_T 20
+#endif
+#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
+#define __SIZEOF_PTHREAD_COND_T 48
+#define __SIZEOF_PTHREAD_CONDATTR_T 4
+#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
+#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
+
+#define __LOCK_ALIGNMENT
+#define __ONCE_ALIGNMENT
+
+#endif /* bits/pthreadtypes.h */ \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/resource.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/resource.h
new file mode 100644
index 0000000000..743dc1b9ad
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/resource.h
@@ -0,0 +1,231 @@
+/* Bit values & structures for resource limits. Linux/MIPS version.
+ Copyright (C) 1994-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_RESOURCE_H
+# error "Never use <bits/resource.h> directly; include <sys/resource.h> instead."
+#endif
+
+#include <bits/types.h>
+
+/* Transmute defines to enumerations. The macro re-definitions are
+ necessary because some programs want to test for operating system
+ features with #ifdef RUSAGE_SELF. In ISO C the reflexive
+ definition is a no-op. */
+
+/* Kinds of resource limit. */
+enum __rlimit_resource
+{
+ /* Per-process CPU limit, in seconds. */
+ RLIMIT_CPU = 0,
+#define RLIMIT_CPU RLIMIT_CPU
+
+ /* Largest file that can be created, in bytes. */
+ RLIMIT_FSIZE = 1,
+#define RLIMIT_FSIZE RLIMIT_FSIZE
+
+ /* Maximum size of data segment, in bytes. */
+ RLIMIT_DATA = 2,
+#define RLIMIT_DATA RLIMIT_DATA
+
+ /* Maximum size of stack segment, in bytes. */
+ RLIMIT_STACK = 3,
+#define RLIMIT_STACK RLIMIT_STACK
+
+ /* Largest core file that can be created, in bytes. */
+ RLIMIT_CORE = 4,
+#define RLIMIT_CORE RLIMIT_CORE
+
+ /* Largest resident set size, in bytes.
+ This affects swapping; processes that are exceeding their
+ resident set size will be more likely to have physical memory
+ taken from them. */
+ __RLIMIT_RSS = 7,
+#define RLIMIT_RSS __RLIMIT_RSS
+
+ /* Number of open files. */
+ RLIMIT_NOFILE = 5,
+ __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */
+#define RLIMIT_NOFILE RLIMIT_NOFILE
+#define RLIMIT_OFILE __RLIMIT_OFILE
+
+ /* Address space limit (?) */
+ RLIMIT_AS = 6,
+#define RLIMIT_AS RLIMIT_AS
+
+ /* Number of processes. */
+ __RLIMIT_NPROC = 8,
+#define RLIMIT_NPROC __RLIMIT_NPROC
+
+ /* Locked-in-memory address space. */
+ __RLIMIT_MEMLOCK = 9,
+#define RLIMIT_MEMLOCK __RLIMIT_MEMLOCK
+
+ /* Maximum number of file locks. */
+ __RLIMIT_LOCKS = 10,
+#define RLIMIT_LOCKS __RLIMIT_LOCKS
+
+ /* Maximum number of pending signals. */
+ __RLIMIT_SIGPENDING = 11,
+#define RLIMIT_SIGPENDING __RLIMIT_SIGPENDING
+
+ /* Maximum bytes in POSIX message queues. */
+ __RLIMIT_MSGQUEUE = 12,
+#define RLIMIT_MSGQUEUE __RLIMIT_MSGQUEUE
+
+ /* Maximum nice priority allowed to raise to.
+ Nice levels 19 .. -20 correspond to 0 .. 39
+ values of this resource limit. */
+ __RLIMIT_NICE = 13,
+#define RLIMIT_NICE __RLIMIT_NICE
+
+ /* Maximum realtime priority allowed for non-priviledged
+ processes. */
+ __RLIMIT_RTPRIO = 14,
+#define RLIMIT_RTPRIO __RLIMIT_RTPRIO
+
+ /* 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,
+#define RLIMIT_RTTIME __RLIMIT_RTTIME
+
+ __RLIMIT_NLIMITS = 16,
+ __RLIM_NLIMITS = __RLIMIT_NLIMITS
+#define RLIMIT_NLIMITS __RLIMIT_NLIMITS
+#define RLIM_NLIMITS __RLIM_NLIMITS
+};
+
+/* Value to indicate that there is no limit. */
+#if _MIPS_SIM == _ABI64
+/* The N64 syscall uses this value. */
+# define RLIM_INFINITY 0xffffffffffffffffUL
+# ifdef __USE_LARGEFILE64
+# define RLIM64_INFINITY 0xffffffffffffffffUL
+# endif
+#else
+/* The O32 and N32 syscalls use 0x7fffffff. */
+# ifndef __USE_FILE_OFFSET64
+# define RLIM_INFINITY ((long int)(~0UL >> 1))
+# else
+# define RLIM_INFINITY 0xffffffffffffffffULL
+# endif
+# ifdef __USE_LARGEFILE64
+# define RLIM64_INFINITY 0xffffffffffffffffULL
+# endif
+#endif
+
+/* We can represent all limits. */
+#define RLIM_SAVED_MAX RLIM_INFINITY
+#define RLIM_SAVED_CUR RLIM_INFINITY
+
+
+/* Type for resource quantity measurement. */
+#ifndef __USE_FILE_OFFSET64
+typedef __rlim_t rlim_t;
+#else
+typedef __rlim64_t rlim_t;
+#endif
+#ifdef __USE_LARGEFILE64
+typedef __rlim64_t rlim64_t;
+#endif
+
+struct rlimit
+ {
+ /* The current (soft) limit. */
+ rlim_t rlim_cur;
+ /* The hard limit. */
+ rlim_t rlim_max;
+ };
+
+#ifdef __USE_LARGEFILE64
+struct rlimit64
+ {
+ /* The current (soft) limit. */
+ rlim64_t rlim_cur;
+ /* The hard limit. */
+ rlim64_t rlim_max;
+ };
+#endif
+
+/* Whose usage statistics do you want? */
+enum __rusage_who
+{
+ /* The calling process. */
+ RUSAGE_SELF = 0,
+#define RUSAGE_SELF RUSAGE_SELF
+
+ /* All of its terminated child processes. */
+ RUSAGE_CHILDREN = -1
+#define RUSAGE_CHILDREN RUSAGE_CHILDREN
+
+#ifdef __USE_GNU
+ ,
+ /* The calling thread. */
+ RUSAGE_THREAD = 1
+# define RUSAGE_THREAD RUSAGE_THREAD
+ /* Name for the same functionality on Solaris. */
+# define RUSAGE_LWP RUSAGE_THREAD
+#endif
+};
+
+#include <bits/types/struct_timeval.h>
+#include <bits/types/struct_rusage.h>
+
+/* Priority limits. */
+#define PRIO_MIN -20 /* Minimum priority a process can have. */
+#define PRIO_MAX 20 /* Maximum priority a process can have. */
+
+/* The type of the WHICH argument to `getpriority' and `setpriority',
+ indicating what flavor of entity the WHO argument specifies. */
+enum __priority_which
+{
+ PRIO_PROCESS = 0, /* WHO is a process ID. */
+#define PRIO_PROCESS PRIO_PROCESS
+ PRIO_PGRP = 1, /* WHO is a process group ID. */
+#define PRIO_PGRP PRIO_PGRP
+ PRIO_USER = 2 /* WHO is a user ID. */
+#define PRIO_USER PRIO_USER
+};
+
+
+__BEGIN_DECLS
+
+#ifdef __USE_GNU
+/* Modify and return resource limits of a process atomically. */
+# ifndef __USE_FILE_OFFSET64
+extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource,
+ const struct rlimit *__new_limit,
+ struct rlimit *__old_limit) __THROW;
+# else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (prlimit, (__pid_t __pid,
+ enum __rlimit_resource __resource,
+ const struct rlimit *__new_limit,
+ struct rlimit *__old_limit), prlimit64);
+# else
+# define prlimit prlimit64
+# endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource,
+ const struct rlimit64 *__new_limit,
+ struct rlimit64 *__old_limit) __THROW;
+# endif
+#endif
+
+__END_DECLS \ No newline at end of file
diff --git a/lib/libc/include/mips-linux-gnu/bits/wordsize.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/semaphore.h
index 9e405e4e4e..73abfb8078 100644
--- a/lib/libc/include/mips-linux-gnu/bits/wordsize.h
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/semaphore.h
@@ -15,17 +15,22 @@
License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */
-#include <sgidefs.h>
-
-#define __WORDSIZE _MIPS_SZPTR
+#ifndef _SEMAPHORE_H
+# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
+#endif
#if _MIPS_SIM == _ABI64
-# define __WORDSIZE_TIME64_COMPAT32 1
+# define __SIZEOF_SEM_T 32
#else
-# define __WORDSIZE_TIME64_COMPAT32 0
+# define __SIZEOF_SEM_T 16
#endif
-#if __WORDSIZE == 32
-#define __WORDSIZE32_SIZE_ULONG 0
-#define __WORDSIZE32_PTRDIFF_LONG 0
-#endif \ No newline at end of file
+/* 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-gnueabihf/bits/shmlba.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/shmlba.h
new file mode 100644
index 0000000000..357defb2ba
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/shmlba.h
@@ -0,0 +1,24 @@
+/* Define SHMLBA. MIPS version.
+ Copyright (C) 2018-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SHM_H
+# error "Never use <bits/shmlba.h> directly; include <sys/shm.h> instead."
+#endif
+
+/* Segment low boundary address multiple. */
+#define SHMLBA 0x40000 \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/sigaction.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/sigaction.h
new file mode 100644
index 0000000000..f968c4d10d
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/sigaction.h
@@ -0,0 +1,94 @@
+/* The proper definitions for Linux/MIPS's sigaction.
+ Copyright (C) 1993-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_SIGACTION_H
+#define _BITS_SIGACTION_H 1
+
+#ifndef _SIGNAL_H
+# error "Never include <bits/sigaction.h> directly; use <signal.h> instead."
+#endif
+
+/* Structure describing the action to be taken when a signal arrives. */
+struct sigaction
+ {
+ /* Special flags. */
+ int sa_flags;
+
+ /* Signal handler. */
+#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED
+ union
+ {
+ /* Used if SA_SIGINFO is not set. */
+ __sighandler_t sa_handler;
+ /* Used if SA_SIGINFO is set. */
+ void (*sa_sigaction) (int, siginfo_t *, void *);
+ }
+ __sigaction_handler;
+# define sa_handler __sigaction_handler.sa_handler
+# define sa_sigaction __sigaction_handler.sa_sigaction
+#else
+ __sighandler_t sa_handler;
+#endif
+ /* Additional set of signals to be blocked. */
+ __sigset_t sa_mask;
+
+ /* The ABI says here are two unused ints following. */
+ /* Restore handler. */
+ void (*sa_restorer) (void);
+
+#if _MIPS_SZPTR < 64
+ int sa_resv[1];
+#endif
+ };
+
+/* Bits in `sa_flags'. */
+/* Please note that some Linux kernels versions use different values for these
+ flags which is a bug in those kernel versions. */
+#define SA_NOCLDSTOP 0x00000001 /* Don't send SIGCHLD when children stop. */
+#define SA_NOCLDWAIT 0x00010000 /* Don't create zombie on child death. */
+#define SA_SIGINFO 0x00000008 /* Invoke signal-catching function with
+ three arguments instead of one. */
+#if defined __USE_XOPEN_EXTENDED || defined __USE_MISC
+# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
+#endif
+#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
+# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */
+# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */
+# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
+ its handler is being executed. */
+#endif
+#ifdef __USE_MISC
+# define SA_INTERRUPT 0x20000000 /* Historical no-op. */
+
+/* Some aliases for the SA_ constants. */
+# define SA_NOMASK SA_NODEFER
+# define SA_ONESHOT SA_RESETHAND
+# define SA_STACK SA_ONSTACK
+#endif
+
+/* Values for the HOW argument to `sigprocmask'. */
+#define SIG_NOP 0 /* 0 is unused to catch errors */
+#define SIG_BLOCK 1 /* Block signals. */
+#define SIG_UNBLOCK 2 /* Unblock signals. */
+#define SIG_SETMASK 3 /* Set the set of blocked signals. */
+#ifdef __USE_MISC
+# define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility:
+ set only the low 32 bit of the sigset. */
+#endif
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/sigcontext.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/sigcontext.h
new file mode 100644
index 0000000000..cdf767d48a
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/sigcontext.h
@@ -0,0 +1,82 @@
+/* Copyright (C) 1996-2021 Free Software Foundation, Inc. This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_SIGCONTEXT_H
+#define _BITS_SIGCONTEXT_H 1
+
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
+#include <sgidefs.h>
+
+#if _MIPS_SIM == _ABIO32
+
+/* Certain unused fields were replaced with new ones in 2.6.12-rc4.
+ The changes were as follows:
+
+ sc_cause -> sc_hi1
+ sc_badvaddr -> sc_lo1
+ sc_sigset[0] -> sc_hi2
+ sc_sigset[1] -> sc_lo2
+ sc_sigset[2] -> sc_hi3
+ sc_sigset[3] -> sc_lo3
+
+ sc_regmask, sc_ownedfp and sc_fpc_eir are not used. */
+struct sigcontext {
+ unsigned int sc_regmask;
+ unsigned int sc_status;
+ __extension__ unsigned long long sc_pc;
+ __extension__ unsigned long long sc_regs[32];
+ __extension__ unsigned long long sc_fpregs[32];
+ unsigned int sc_ownedfp;
+ unsigned int sc_fpc_csr;
+ unsigned int sc_fpc_eir;
+ unsigned int sc_used_math;
+ unsigned int sc_dsp;
+ __extension__ unsigned long long sc_mdhi;
+ __extension__ unsigned long long sc_mdlo;
+ unsigned long sc_hi1;
+ unsigned long sc_lo1;
+ unsigned long sc_hi2;
+ unsigned long sc_lo2;
+ unsigned long sc_hi3;
+ unsigned long sc_lo3;
+};
+
+#else
+
+/* This structure changed in 2.6.12-rc4 when DSP support was added. */
+struct sigcontext {
+ __extension__ unsigned long long sc_regs[32];
+ __extension__ unsigned long long sc_fpregs[32];
+ __extension__ unsigned long long sc_mdhi;
+ __extension__ unsigned long long sc_hi1;
+ __extension__ unsigned long long sc_hi2;
+ __extension__ unsigned long long sc_hi3;
+ __extension__ unsigned long long sc_mdlo;
+ __extension__ unsigned long long sc_lo1;
+ __extension__ unsigned long long sc_lo2;
+ __extension__ unsigned long long sc_lo3;
+ __extension__ unsigned long long sc_pc;
+ unsigned int sc_fpc_csr;
+ unsigned int sc_used_math;
+ unsigned int sc_dsp;
+ unsigned int sc_reserved;
+};
+
+#endif /* _MIPS_SIM != _ABIO32 */
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/siginfo-arch.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/siginfo-arch.h
new file mode 100644
index 0000000000..d639ba2076
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/siginfo-arch.h
@@ -0,0 +1,13 @@
+/* Architecture-specific adjustments to siginfo_t. MIPS version. */
+#ifndef _BITS_SIGINFO_ARCH_H
+#define _BITS_SIGINFO_ARCH_H 1
+
+/* MIPS has the si_code and si_errno fields in the opposite order from
+ all other architectures. */
+#define __SI_ERRNO_THEN_CODE 0
+
+/* MIPS also has different values for SI_ASYNCIO, SI_MESGQ, and SI_TIMER
+ than all other architectures. */
+#define __SI_ASYNCIO_AFTER_SIGIO 0
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/signalfd.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/signalfd.h
new file mode 100644
index 0000000000..10b69b2df4
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/signalfd.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 2007-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SIGNALFD_H
+# error "Never use <bits/signalfd.h> directly; include <sys/signalfd.h> instead."
+#endif
+
+/* Flags for signalfd. */
+enum
+ {
+ SFD_CLOEXEC = 02000000,
+#define SFD_CLOEXEC SFD_CLOEXEC
+ SFD_NONBLOCK = 00000200
+#define SFD_NONBLOCK SFD_NONBLOCK
+ }; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/signum-arch.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/signum-arch.h
new file mode 100644
index 0000000000..a217ddd443
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/signum-arch.h
@@ -0,0 +1,65 @@
+/* Signal number definitions. Linux/MIPS version.
+ Copyright (C) 1995-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_SIGNUM_H
+#define _BITS_SIGNUM_H 1
+
+#ifndef _SIGNAL_H
+#error "Never include <bits/signum.h> directly; use <signal.h> instead."
+#endif
+
+/* Adjustments and additions to the signal number constants for
+ Linux/MIPS. */
+
+#define SIGEMT 7 /* Emulator trap. */
+#define SIGPWR 19 /* Power failure imminent. */
+
+/* Historical signals specified by POSIX. */
+#define SIGBUS 10 /* Bus error. */
+#define SIGSYS 12 /* Bad system call. */
+
+/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */
+#define SIGURG 21 /* Urgent data is available at a socket. */
+#define SIGSTOP 23 /* Stop, unblockable. */
+#define SIGTSTP 24 /* Keyboard stop. */
+#define SIGCONT 25 /* Continue. */
+#define SIGCHLD 18 /* Child terminated or stopped. */
+#define SIGTTIN 26 /* Background read from control terminal. */
+#define SIGTTOU 27 /* Background write to control terminal. */
+#define SIGPOLL 22 /* Pollable event occurred (System V). */
+#define SIGXCPU 30 /* CPU time limit exceeded. */
+#define SIGVTALRM 28 /* Virtual timer expired. */
+#define SIGPROF 29 /* Profiling timer expired. */
+#define SIGXFSZ 31 /* File size limit exceeded. */
+#define SIGUSR1 16 /* User-defined signal 1. */
+#define SIGUSR2 17 /* User-defined signal 2. */
+
+/* Nonstandard signals found in all modern POSIX systems
+ (including both BSD and Linux). */
+#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
+
+/* Archaic names for compatibility. */
+#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */
+#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */
+#define SIGCLD SIGCHLD /* Old System V name */
+
+/* By default no real-time signals are supported. */
+#define __SIGRTMIN 32
+#define __SIGRTMAX 127
+
+#endif /* <signal.h> included. */ \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/socket-constants.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/socket-constants.h
new file mode 100644
index 0000000000..3e95d151ca
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/socket-constants.h
@@ -0,0 +1,70 @@
+/* Socket constants which vary among Linux architectures. Version for MIPS.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SOCKET_H
+# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
+#endif
+
+#define SOL_SOCKET 65535
+#define SO_ACCEPTCONN 4105
+#define SO_BROADCAST 32
+#define SO_DONTROUTE 16
+#define SO_ERROR 4103
+#define SO_KEEPALIVE 8
+#define SO_LINGER 128
+#define SO_OOBINLINE 256
+#define SO_RCVBUF 4098
+#define SO_RCVLOWAT 4100
+#define SO_REUSEADDR 4
+#define SO_SNDBUF 4097
+#define SO_SNDLOWAT 4099
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 4102
+# define SO_SNDTIMEO 4101
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 4102
+# define SO_SNDTIMEO_OLD 4101
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/socket_type.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/socket_type.h
new file mode 100644
index 0000000000..f66bd0ea5f
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/socket_type.h
@@ -0,0 +1,55 @@
+/* Define enum __socket_type for Linux/MIPS.
+ Copyright (C) 1991-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SOCKET_H
+# error "Never include <bits/socket_type.h> directly; use <sys/socket.h> instead."
+#endif
+
+/* Types of sockets. */
+enum __socket_type
+{
+ SOCK_DGRAM = 1, /* Connectionless, unreliable datagrams
+ of fixed maximum length. */
+#define SOCK_DGRAM SOCK_DGRAM
+ SOCK_STREAM = 2, /* Sequenced, reliable, connection-based
+ byte streams. */
+#define SOCK_STREAM SOCK_STREAM
+ SOCK_RAW = 3, /* Raw protocol interface. */
+#define SOCK_RAW SOCK_RAW
+ SOCK_RDM = 4, /* Reliably-delivered messages. */
+#define SOCK_RDM SOCK_RDM
+ SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based,
+ datagrams of fixed maximum length. */
+#define SOCK_SEQPACKET SOCK_SEQPACKET
+ SOCK_DCCP = 6,
+#define SOCK_DCCP SOCK_DCCP /* Datagram Congestion Control Protocol. */
+ SOCK_PACKET = 10, /* Linux specific way of getting packets
+ at the dev level. For writing rarp and
+ other similar things on the user level. */
+#define SOCK_PACKET SOCK_PACKET
+
+ /* Flags to be ORed into the type parameter of socket and socketpair and
+ used for the flags parameter of paccept. */
+
+ SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the
+ new descriptor(s). */
+#define SOCK_CLOEXEC SOCK_CLOEXEC
+ SOCK_NONBLOCK = 00000200 /* Atomically mark descriptor(s) as
+ non-blocking. */
+#define SOCK_NONBLOCK SOCK_NONBLOCK
+}; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/statfs.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/statfs.h
new file mode 100644
index 0000000000..0e18718b24
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/statfs.h
@@ -0,0 +1,73 @@
+/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_STATFS_H
+# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
+#endif
+
+#include <bits/types.h> /* for __fsid_t and __fsblkcnt_t*/
+
+struct statfs
+ {
+ long int f_type;
+#define f_fstyp f_type
+ long int f_bsize;
+ long int f_frsize; /* Fragment size - unsupported */
+#ifndef __USE_FILE_OFFSET64
+ __fsblkcnt_t f_blocks;
+ __fsblkcnt_t f_bfree;
+ __fsblkcnt_t f_files;
+ __fsblkcnt_t f_ffree;
+ __fsblkcnt_t f_bavail;
+#else
+ __fsblkcnt64_t f_blocks;
+ __fsblkcnt64_t f_bfree;
+ __fsblkcnt64_t f_files;
+ __fsblkcnt64_t f_ffree;
+ __fsblkcnt64_t f_bavail;
+#endif
+
+ /* Linux specials */
+ __fsid_t f_fsid;
+ long int f_namelen;
+ long int f_flags;
+ long int f_spare[5];
+ };
+
+#ifdef __USE_LARGEFILE64
+struct statfs64
+ {
+ long int f_type;
+#define f_fstyp f_type
+ long int f_bsize;
+ long int f_frsize; /* Fragment size - unsupported */
+ __fsblkcnt64_t f_blocks;
+ __fsblkcnt64_t f_bfree;
+ __fsblkcnt64_t f_files;
+ __fsblkcnt64_t f_ffree;
+ __fsblkcnt64_t f_bavail;
+
+ /* Linux specials */
+ __fsid_t f_fsid;
+ long int f_namelen;
+ long int f_flags;
+ long int f_spare[5];
+ };
+#endif
+
+/* Tell code we have these members. */
+#define _STATFS_F_NAMELEN \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/struct_mutex.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/struct_mutex.h
new file mode 100644
index 0000000000..8ddb89ce24
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/struct_mutex.h
@@ -0,0 +1,56 @@
+/* MIPS internal mutex struct definitions.
+ Copyright (C) 2019-2021 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
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _THREAD_MUTEX_INTERNAL_H
+#define _THREAD_MUTEX_INTERNAL_H 1
+
+struct __pthread_mutex_s
+{
+ int __lock;
+ unsigned int __count;
+ int __owner;
+#if _MIPS_SIM == _ABI64
+ unsigned int __nusers;
+#endif
+ /* KIND must stay at this position in the structure to maintain
+ binary compatibility with static initializers. */
+ int __kind;
+#if _MIPS_SIM == _ABI64
+ int __spins;
+ __pthread_list_t __list;
+# define __PTHREAD_MUTEX_HAVE_PREV 1
+#else
+ unsigned int __nusers;
+ __extension__ union
+ {
+ int __spins;
+ __pthread_slist_t __list;
+ };
+# define __PTHREAD_MUTEX_HAVE_PREV 0
+#endif
+};
+
+#if _MIPS_SIM == _ABI64
+# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
+ 0, 0, 0, 0, __kind, 0, { 0, 0 }
+#else
+# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
+ 0, 0, 0, __kind, 0, { 0 }
+#endif
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/termios-c_cc.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/termios-c_cc.h
new file mode 100644
index 0000000000..8e67783a9e
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/termios-c_cc.h
@@ -0,0 +1,43 @@
+/* termios c_cc symbolic constant definitions. Linux/mips version.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
+#endif
+
+/* c_cc characters */
+#define VINTR 0 /* Interrupt character [ISIG]. */
+#define VQUIT 1 /* Quit character [ISIG]. */
+#define VERASE 2 /* Erase character [ICANON]. */
+#define VKILL 3 /* Kill-line character [ICANON]. */
+#define VMIN 4 /* Minimum number of bytes read at once [!ICANON]. */
+#define VTIME 5 /* Time-out value (tenths of a second) [!ICANON]. */
+#define VEOL2 6 /* Second EOL character [ICANON]. */
+#define VSWTC 7
+#define VSWTCH VSWTC
+#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */
+#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */
+#define VSUSP 10 /* Suspend character [ISIG]. */
+ /* VDSUSP is not supported on Linux. */
+/* #define VDSUSP 11 / * Delayed suspend character [ISIG]. */
+#define VREPRINT 12 /* Reprint-line character [ICANON]. */
+#define VDISCARD 13 /* Discard character [IEXTEN]. */
+#define VWERASE 14 /* Word-erase character [ICANON]. */
+#define VLNEXT 15 /* Literal-next character [IEXTEN]. */
+#define VEOF 16 /* End-of-file character [ICANON]. */
+#define VEOL 17 /* End-of-line character [ICANON]. */ \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/termios-c_lflag.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/termios-c_lflag.h
new file mode 100644
index 0000000000..6ef207b1a2
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/termios-c_lflag.h
@@ -0,0 +1,46 @@
+/* termios local mode definitions. Linux/mips version.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
+#endif
+
+/* c_lflag bits */
+#define ISIG 0000001 /* Enable signals. */
+#define ICANON 0000002 /* Do erase and kill processing. */
+#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
+# define XCASE 0000004
+#endif
+#define ECHO 0000010 /* Enable echo. */
+#define ECHOE 0000020 /* Visual erase for ERASE. */
+#define ECHOK 0000040 /* Echo NL after KILL. */
+#define ECHONL 0000100 /* Echo NL even if ECHO is off. */
+#define NOFLSH 0000200 /* Disable flush after interrupt. */
+#define IEXTEN 0000400 /* Enable DISCARD and LNEXT. */
+#ifdef __USE_MISC
+# define ECHOCTL 0001000 /* Echo control characters as ^X. */
+# define ECHOPRT 0002000 /* Hardcopy visual erase. */
+# define ECHOKE 0004000 /* Visual erase for KILL. */
+# define FLUSHO 0020000
+# define PENDIN 0040000 /* Retype pending input (state). */
+#endif
+#define TOSTOP 0100000 /* Send SIGTTOU for background output. */
+#define ITOSTOP TOSTOP
+#ifdef __USE_MISC
+# define EXTPROC 0200000
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/termios-struct.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/termios-struct.h
new file mode 100644
index 0000000000..3bae186f55
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/termios-struct.h
@@ -0,0 +1,34 @@
+/* struct termios definition. Linux/mips version.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-struct.h> directly; use <termios.h> instead."
+#endif
+
+#define NCCS 32
+struct termios
+ {
+ tcflag_t c_iflag; /* input mode flags */
+ tcflag_t c_oflag; /* output mode flags */
+ tcflag_t c_cflag; /* control mode flags */
+ tcflag_t c_lflag; /* local mode flags */
+ cc_t c_line; /* line discipline */
+ cc_t c_cc[NCCS]; /* control characters */
+#define _HAVE_STRUCT_TERMIOS_C_ISPEED 0
+#define _HAVE_STRUCT_TERMIOS_C_OSPEED 0
+ }; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/termios-tcflow.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/termios-tcflow.h
new file mode 100644
index 0000000000..a6a4e5719e
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/termios-tcflow.h
@@ -0,0 +1,26 @@
+/* termios local mode definitions. Linux/mips version.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-tcflow.h> directly; use <termios.h> instead."
+#endif
+
+/* tcsetattr uses these */
+#define TCSANOW 0x540e /* Same as TCSETS; change immediately. */
+#define TCSADRAIN 0x540f /* Same as TCSETSW; change when pending output is written. */
+#define TCSAFLUSH 0x5410 /* Same as TCSETSF; flush pending input before changing. */ \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/timerfd.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/timerfd.h
new file mode 100644
index 0000000000..871792717b
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/timerfd.h
@@ -0,0 +1,29 @@
+/* Copyright (C) 2008-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_TIMERFD_H
+# error "Never use <bits/timerfd.h> directly; include <sys/timerfd.h> instead."
+#endif
+
+/* Bits to be set in the FLAGS parameter of `timerfd_create'. */
+enum
+ {
+ TFD_CLOEXEC = 02000000,
+#define TFD_CLOEXEC TFD_CLOEXEC
+ TFD_NONBLOCK = 00000200
+#define TFD_NONBLOCK TFD_NONBLOCK
+ }; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/types/stack_t.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/types/stack_t.h
new file mode 100644
index 0000000000..005479e51a
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/types/stack_t.h
@@ -0,0 +1,33 @@
+/* Define stack_t. MIPS Linux version.
+ Copyright (C) 1998-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef __stack_t_defined
+#define __stack_t_defined 1
+
+#define __need_size_t
+#include <stddef.h>
+
+/* Structure describing a signal stack. */
+typedef struct
+ {
+ void *ss_sp;
+ size_t ss_size;
+ int ss_flags;
+ } stack_t;
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_msqid_ds.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_msqid_ds.h
new file mode 100644
index 0000000000..c7dcdf23d9
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_msqid_ds.h
@@ -0,0 +1,62 @@
+/* Linux/MIPS implementation of the SysV message struct msqid_ds.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_MSG_H
+# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
+#endif
+
+#include <bits/types/time_t.h>
+
+/* Structure of record for one message inside the kernel.
+ The type `struct msg' is opaque. */
+struct msqid_ds
+{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
+ 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;
+#endif
+}; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_semid_ds.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_semid_ds.h
new file mode 100644
index 0000000000..c1961e1bb1
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_semid_ds.h
@@ -0,0 +1,36 @@
+/* MIPS implementation of the semaphore struct semid_ds
+ Copyright (C) 1995-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SEM_H
+# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead."
+#endif
+
+/* Data structure describing a set of semaphores. */
+struct semid_ds
+{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
+ 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;
+#endif
+}; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_shmid_ds.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_shmid_ds.h
new file mode 100644
index 0000000000..2e8525c1a5
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_shmid_ds.h
@@ -0,0 +1,53 @@
+/* Linux/MIPS implementation of the shared memory struct shmid_ds.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SHM_H
+# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead."
+#endif
+
+/* Data structure describing a shared memory segment. */
+struct shmid_ds
+ {
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
+ 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
+#endif
+ }; \ No newline at end of file
diff --git a/lib/libc/include/mipsel-linux-gnueabihf/ieee754.h b/lib/libc/include/mipsel-linux-gnueabihf/ieee754.h
new file mode 100644
index 0000000000..f3e3977ca3
--- /dev/null
+++ b/lib/libc/include/mipsel-linux-gnueabihf/ieee754.h
@@ -0,0 +1,326 @@
+/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _IEEE754_H
+#define _IEEE754_H 1
+
+#include <features.h>
+
+#include <bits/endian.h>
+
+#ifndef __LDBL_MANT_DIG__
+# include <float.h>
+# define __LDBL_MANT_DIG__ LDBL_MANT_DIG
+#endif
+
+__BEGIN_DECLS
+
+union ieee754_float
+ {
+ float f;
+
+ /* This is the IEEE 754 single-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:8;
+ unsigned int mantissa:23;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ unsigned int mantissa:23;
+ unsigned int exponent:8;
+ 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:8;
+ unsigned int quiet_nan:1;
+ unsigned int mantissa:22;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ unsigned int mantissa:22;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:8;
+ unsigned int negative:1;
+#endif /* Little endian. */
+ } ieee_nan;
+ };
+
+#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
+
+
+union ieee754_double
+ {
+ double d;
+
+ /* This is the IEEE 754 double-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:11;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:20;
+ unsigned int mantissa1:32;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+# else
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+# endif
+#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:11;
+ unsigned int quiet_nan:1;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:19;
+ unsigned int mantissa1:32;
+#else
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
+ unsigned int mantissa0:19;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+# else
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:19;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+# endif
+#endif
+ } ieee_nan;
+ };
+
+#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
+
+#if __LDBL_MANT_DIG__ == 113
+
+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;
+#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:15;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:15;
+ unsigned int negative:1;
+#endif /* Little endian. */
+ } ieee_nan;
+ };
+
+#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
+
+#elif __LDBL_MANT_DIG__ == 64
+
+union ieee854_long_double
+ {
+ long double d;
+
+ /* This is the IEEE 854 double-extended-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:15;
+ unsigned int empty:16;
+ unsigned int mantissa0:32;
+ unsigned int mantissa1:32;
+#endif
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
+ unsigned int exponent:15;
+ unsigned int negative:1;
+ unsigned int empty:16;
+ unsigned int mantissa0:32;
+ unsigned int mantissa1:32;
+# else
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:32;
+ unsigned int exponent:15;
+ unsigned int negative:1;
+ unsigned int empty:16;
+# endif
+#endif
+ } ieee;
+
+ /* This is for NaNs in the IEEE 854 double-extended-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:15;
+ unsigned int empty:16;
+ unsigned int one:1;
+ unsigned int quiet_nan:1;
+ unsigned int mantissa0:30;
+ unsigned int mantissa1:32;
+#endif
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
+ unsigned int exponent:15;
+ unsigned int negative:1;
+ unsigned int empty:16;
+ unsigned int mantissa0:30;
+ unsigned int quiet_nan:1;
+ unsigned int one:1;
+ unsigned int mantissa1:32;
+# else
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:30;
+ unsigned int quiet_nan:1;
+ unsigned int one:1;
+ unsigned int exponent:15;
+ unsigned int negative:1;
+ unsigned int empty:16;
+# endif
+#endif
+ } ieee_nan;
+ };
+
+#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
+
+#elif __LDBL_MANT_DIG__ == 53
+
+union ieee854_long_double
+ {
+ long double d;
+
+ /* This is the IEEE 754 double-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:11;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:20;
+ unsigned int mantissa1:32;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+# else
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+# endif
+#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:11;
+ unsigned int quiet_nan:1;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:19;
+ unsigned int mantissa1:32;
+#else
+# if __FLOAT_WORD_ORDER == __BIG_ENDIAN
+ unsigned int mantissa0:19;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+ unsigned int mantissa1:32;
+# else
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:19;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+# endif
+#endif
+ } ieee_nan;
+ };
+
+#define IEEE854_LONG_DOUBLE_BIAS 0x3ff /* Added to exponent. */
+
+#endif /* __LDBL_MANT_DIG__ == 53 */
+
+__END_DECLS
+
+#endif /* ieee754.h */ \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/local_lim.h b/lib/libc/include/powerpc-linux-gnu/bits/local_lim.h
deleted file mode 100644
index 5416e4d6cf..0000000000
--- a/lib/libc/include/powerpc-linux-gnu/bits/local_lim.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux/PPC version.
- Copyright (C) 1993-2021 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; see the file COPYING.LIB. If
- not, see <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages for systems with 64k
- pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647) \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/endianness.h b/lib/libc/include/powerpc-linux-gnueabi/bits/endianness.h
index 91892fa161..91892fa161 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/endianness.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/endianness.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/environments.h b/lib/libc/include/powerpc-linux-gnueabi/bits/environments.h
index 81b109e9c7..81b109e9c7 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/environments.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/environments.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/fcntl.h b/lib/libc/include/powerpc-linux-gnueabi/bits/fcntl.h
index abb1bd7083..abb1bd7083 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/fcntl.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/fcntl.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/fenv.h b/lib/libc/include/powerpc-linux-gnueabi/bits/fenv.h
index a1e1b6ba4b..a1e1b6ba4b 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/fenv.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/fenv.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/floatn.h b/lib/libc/include/powerpc-linux-gnueabi/bits/floatn.h
index cb7f2fe5bc..cb7f2fe5bc 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/floatn.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/floatn.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/fp-fast.h b/lib/libc/include/powerpc-linux-gnueabi/bits/fp-fast.h
index e10d37d400..e10d37d400 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/fp-fast.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/fp-fast.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/hwcap.h b/lib/libc/include/powerpc-linux-gnueabi/bits/hwcap.h
index 9858baf991..9858baf991 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/hwcap.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/hwcap.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/ioctl-types.h b/lib/libc/include/powerpc-linux-gnueabi/bits/ioctl-types.h
index 919610e5ca..919610e5ca 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/ioctl-types.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/ioctl-types.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/ipc-perm.h b/lib/libc/include/powerpc-linux-gnueabi/bits/ipc-perm.h
index ff13f53218..ff13f53218 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/ipc-perm.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/ipc-perm.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h b/lib/libc/include/powerpc-linux-gnueabi/bits/iscanonical.h
index 288b2f2d8a..288b2f2d8a 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/iscanonical.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/link.h b/lib/libc/include/powerpc-linux-gnueabi/bits/link.h
index fc234f741e..fc234f741e 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/link.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/link.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/long-double.h b/lib/libc/include/powerpc-linux-gnueabi/bits/long-double.h
index e3ec00d82b..e3ec00d82b 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/long-double.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/long-double.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/mman.h b/lib/libc/include/powerpc-linux-gnueabi/bits/mman.h
index c920654b28..c920654b28 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/mman.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/mman.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/procfs.h b/lib/libc/include/powerpc-linux-gnueabi/bits/procfs.h
index eabe87ff35..eabe87ff35 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/procfs.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/procfs.h
diff --git a/lib/libc/include/powerpc-linux-gnueabi/bits/pthread_stack_min.h b/lib/libc/include/powerpc-linux-gnueabi/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..c8caed37b2
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/pthread_stack_min.h
@@ -0,0 +1,21 @@
+/* Definition of PTHREAD_STACK_MIN. Linux/PPC version.
+ Copyright (C) 2021 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; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages for systems with 64k
+ pages. */
+#define PTHREAD_STACK_MIN 131072 \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/setjmp.h b/lib/libc/include/powerpc-linux-gnueabi/bits/setjmp.h
index 47eec4fe73..47eec4fe73 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/setjmp.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/setjmp.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/sigstack.h b/lib/libc/include/powerpc-linux-gnueabi/bits/sigstack.h
index f2371950e2..f2371950e2 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/sigstack.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/sigstack.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h b/lib/libc/include/powerpc-linux-gnueabi/bits/socket-constants.h
index 64f96f535c..a6223eff27 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/socket-constants.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 10
#define SO_RCVBUF 8
#define SO_RCVLOWAT 16
-#define SO_RCVTIMEO 18
#define SO_REUSEADDR 2
#define SO_SNDBUF 7
#define SO_SNDLOWAT 17
-#define SO_SNDTIMEO 19
-#define SO_TYPE 3 \ No newline at end of file
+#define SO_TYPE 3
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 18
+# define SO_SNDTIMEO 19
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 18
+# define SO_SNDTIMEO_OLD 19
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/struct_mutex.h b/lib/libc/include/powerpc-linux-gnueabi/bits/struct_mutex.h
index 708b22e85a..708b22e85a 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/struct_mutex.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/struct_mutex.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/struct_rwlock.h b/lib/libc/include/powerpc-linux-gnueabi/bits/struct_rwlock.h
index 5d5bc3f894..5d5bc3f894 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/struct_rwlock.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/struct_rwlock.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/struct_stat.h b/lib/libc/include/powerpc-linux-gnueabi/bits/struct_stat.h
index 805594defd..3faed3a29b 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/struct_stat.h
@@ -26,35 +26,37 @@
#include <bits/wordsize.h>
#if __WORDSIZE == 32
-
struct stat
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
unsigned short int __pad1;
__ino_t st_ino; /* File serial number. */
-# else
+# else
__ino64_t st_ino; /* File serial number. */
-# endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-# else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-# endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-# else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# endif
-# ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -64,25 +66,28 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-# else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
+# endif /* __USE_TIME_BITS64 */
};
-
# ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
__ino64_t st_ino; /* File serial number. */
__mode_t st_mode; /* File mode. */
@@ -94,7 +99,7 @@ struct stat64
__off64_t st_size; /* Size of file, in bytes. */
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -104,19 +109,20 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-# else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
+# endif /* __USE_TIME_BITS64 */
};
# endif /* __USE_LARGEFILE64 */
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-baud.h b/lib/libc/include/powerpc-linux-gnueabi/bits/termios-baud.h
index 4ee2f824bf..4ee2f824bf 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/termios-baud.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/termios-baud.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cc.h b/lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_cc.h
index 32283b153f..32283b153f 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cc.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_cc.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h b/lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_cflag.h
index 01c2a123b5..01c2a123b5 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_cflag.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_iflag.h b/lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_iflag.h
index 4df494e6dc..4df494e6dc 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_iflag.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_iflag.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_lflag.h b/lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_lflag.h
index ee2291cc56..ee2291cc56 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_lflag.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_lflag.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_oflag.h b/lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_oflag.h
index a875d23d4f..a875d23d4f 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/termios-c_oflag.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/termios-c_oflag.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/termios-misc.h b/lib/libc/include/powerpc-linux-gnueabi/bits/termios-misc.h
index dc3fb15aa7..dc3fb15aa7 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/termios-misc.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/termios-misc.h
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/types/struct_msqid_ds.h b/lib/libc/include/powerpc-linux-gnueabi/bits/types/struct_msqid_ds.h
index 65856a4231..52cc930886 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/types/struct_msqid_ds.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/types/struct_msqid_ds.h
@@ -20,23 +20,28 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
+# 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
+# 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
+# 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 */
@@ -44,4 +49,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
}; \ 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-gnueabi/bits/types/struct_semid_ds.h
index df168a5b57..d70967d6e0 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/types/struct_semid_ds.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/types/struct_semid_ds.h
@@ -23,17 +23,21 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# 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
+# else
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
-#endif
+# endif
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
}; \ 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-gnueabi/bits/types/struct_shmid_ds.h
index 82e25d77a9..6a47b1c39f 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/types/struct_shmid_ds.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/types/struct_shmid_ds.h
@@ -23,8 +23,11 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned long int __shm_atime_high;
__time_t shm_atime; /* time of last shmat() */
unsigned long int __shm_dtime_high;
@@ -32,15 +35,16 @@ struct shmid_ds
unsigned long int __shm_ctime_high;
__time_t shm_ctime; /* time of last change by shmctl() */
unsigned long int __glibc_reserved4;
-#else
+# 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
+# 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;
+#endif
}; \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/wordsize.h b/lib/libc/include/powerpc-linux-gnueabi/bits/wordsize.h
index 37836f9d4e..37836f9d4e 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/wordsize.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/bits/wordsize.h
diff --git a/lib/libc/include/powerpc-linux-gnu/fpu_control.h b/lib/libc/include/powerpc-linux-gnueabi/fpu_control.h
index 7f66352f1a..7f66352f1a 100644
--- a/lib/libc/include/powerpc-linux-gnu/fpu_control.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/fpu_control.h
diff --git a/lib/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h b/lib/libc/include/powerpc-linux-gnueabi/gnu/lib-names-32.h
index f4db4285af..7dfe5a7147 100644
--- a/lib/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/gnu/lib-names-32.h
@@ -7,6 +7,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
diff --git a/lib/libc/include/powerpc-linux-gnu/gnu/lib-names.h b/lib/libc/include/powerpc-linux-gnueabi/gnu/lib-names.h
index a6fbab8035..a6fbab8035 100644
--- a/lib/libc/include/powerpc-linux-gnu/gnu/lib-names.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/gnu/lib-names.h
diff --git a/lib/libc/include/powerpc-linux-gnu/gnu/stubs.h b/lib/libc/include/powerpc-linux-gnueabi/gnu/stubs.h
index d130565a35..d130565a35 100644
--- a/lib/libc/include/powerpc-linux-gnu/gnu/stubs.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/gnu/stubs.h
diff --git a/lib/libc/include/powerpc-linux-gnu/ieee754.h b/lib/libc/include/powerpc-linux-gnueabi/ieee754.h
index 78bbb343c4..78bbb343c4 100644
--- a/lib/libc/include/powerpc-linux-gnu/ieee754.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/ieee754.h
diff --git a/lib/libc/include/powerpc-linux-gnu/sys/ptrace.h b/lib/libc/include/powerpc-linux-gnueabi/sys/ptrace.h
index 5c5d5addee..a0134d5dfe 100644
--- a/lib/libc/include/powerpc-linux-gnu/sys/ptrace.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/sys/ptrace.h
@@ -70,6 +70,8 @@ __BEGIN_DECLS
# undef PTRACE_SYSCALL_INFO_ENTRY
# undef PTRACE_SYSCALL_INFO_EXIT
# undef PTRACE_SYSCALL_INFO_SECCOMP
+# undef PTRACE_SYSEMU
+# undef PTRACE_SYSEMU_SINGLESTEP
# undef PTRACE_TRACEME
#endif
@@ -188,6 +190,14 @@ enum __ptrace_request
PTRACE_SETVSRREGS = 28,
#define PT_SETVSRREGS PTRACE_SETVSRREGS
+ /* Continue and stop at the next syscall, it will not be executed. */
+ PTRACE_SYSEMU = 29,
+#define PT_SYSEMU PTRACE_SYSEMU
+
+ /* Single step the process, the next syscall will not be executed. */
+ PTRACE_SYSEMU_SINGLESTEP = 30,
+#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
+
/* Execute process until next taken branch. */
PTRACE_SINGLEBLOCK = 256,
#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
diff --git a/lib/libc/include/powerpc-linux-gnu/sys/ucontext.h b/lib/libc/include/powerpc-linux-gnueabi/sys/ucontext.h
index a48adedb95..a48adedb95 100644
--- a/lib/libc/include/powerpc-linux-gnu/sys/ucontext.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/sys/ucontext.h
diff --git a/lib/libc/include/powerpc-linux-gnu/sys/user.h b/lib/libc/include/powerpc-linux-gnueabi/sys/user.h
index c18c39983b..c18c39983b 100644
--- a/lib/libc/include/powerpc-linux-gnu/sys/user.h
+++ b/lib/libc/include/powerpc-linux-gnueabi/sys/user.h
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/endianness.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/endianness.h
new file mode 100644
index 0000000000..91892fa161
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/endianness.h
@@ -0,0 +1,16 @@
+#ifndef _BITS_ENDIANNESS_H
+#define _BITS_ENDIANNESS_H 1
+
+#ifndef _BITS_ENDIAN_H
+# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
+#endif
+
+/* PowerPC has selectable endianness. */
+#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN
+# define __BYTE_ORDER __BIG_ENDIAN
+#endif
+#if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
+# define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
+
+#endif /* bits/endianness.h */ \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/environments.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/environments.h
new file mode 100644
index 0000000000..81b109e9c7
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/environments.h
@@ -0,0 +1,96 @@
+/* Copyright (C) 1999-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _UNISTD_H
+# error "Never include this file directly. Use <unistd.h> instead"
+#endif
+
+#include <bits/wordsize.h>
+
+/* This header should define the following symbols under the described
+ situations. A value `1' means that the model is always supported,
+ `-1' means it is never supported. Undefined means it cannot be
+ statically decided.
+
+ _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type
+ _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type
+
+ _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type
+ _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type
+
+ The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG,
+ _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32,
+ _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were
+ used in previous versions of the Unix standard and are available
+ only for compatibility.
+*/
+
+#if __WORDSIZE == 64
+
+/* Environments with 32-bit wide pointers are optionally provided.
+ Therefore following macros aren't defined:
+ # undef _POSIX_V7_ILP32_OFF32
+ # undef _POSIX_V7_ILP32_OFFBIG
+ # undef _POSIX_V6_ILP32_OFF32
+ # undef _POSIX_V6_ILP32_OFFBIG
+ # undef _XBS5_ILP32_OFF32
+ # undef _XBS5_ILP32_OFFBIG
+ and users need to check at runtime. */
+
+/* We also have no use (for now) for an environment with bigger pointers
+ and offsets. */
+# define _POSIX_V7_LPBIG_OFFBIG -1
+# define _POSIX_V6_LPBIG_OFFBIG -1
+# define _XBS5_LPBIG_OFFBIG -1
+
+/* By default we have 64-bit wide `long int', pointers and `off_t'. */
+# define _POSIX_V7_LP64_OFF64 1
+# define _POSIX_V6_LP64_OFF64 1
+# define _XBS5_LP64_OFF64 1
+
+#else /* __WORDSIZE == 32 */
+
+/* By default we have 32-bit wide `int', `long int', pointers and `off_t'
+ and all platforms support LFS. */
+# define _POSIX_V7_ILP32_OFF32 1
+# define _POSIX_V7_ILP32_OFFBIG 1
+# define _POSIX_V6_ILP32_OFF32 1
+# define _POSIX_V6_ILP32_OFFBIG 1
+# define _XBS5_ILP32_OFF32 1
+# define _XBS5_ILP32_OFFBIG 1
+
+/* We optionally provide an environment with the above size but an 64-bit
+ side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */
+
+/* Environments with 64-bit wide pointers can be provided,
+ so these macros aren't defined:
+ # undef _POSIX_V7_LP64_OFF64
+ # undef _POSIX_V7_LPBIG_OFFBIG
+ # undef _POSIX_V6_LP64_OFF64
+ # undef _POSIX_V6_LPBIG_OFFBIG
+ # undef _XBS5_LP64_OFF64
+ # undef _XBS5_LPBIG_OFFBIG
+ and sysconf tests for it at runtime. */
+
+#endif /* __WORDSIZE == 32 */
+
+#define __ILP32_OFF32_CFLAGS "-m32"
+#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+#define __ILP32_OFF32_LDFLAGS "-m32"
+#define __ILP32_OFFBIG_LDFLAGS "-m32"
+#define __LP64_OFF64_CFLAGS "-m64"
+#define __LP64_OFF64_LDFLAGS "-m64" \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/fcntl.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/fcntl.h
new file mode 100644
index 0000000000..abb1bd7083
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/fcntl.h
@@ -0,0 +1,62 @@
+/* O_*, F_*, FD_* bit values for Linux/PowerPC.
+ Copyright (C) 1995-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _FCNTL_H
+# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+#include <bits/wordsize.h>
+
+#define __O_DIRECTORY 040000 /* Must be a directory. */
+#define __O_NOFOLLOW 0100000 /* Do not follow links. */
+#define __O_DIRECT 0400000 /* Direct disk access. */
+
+#if __WORDSIZE == 64
+/* Not necessary, files are always with 64bit off_t. */
+# define __O_LARGEFILE 0
+#else
+# define __O_LARGEFILE 0200000
+#endif
+
+struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+#ifndef __USE_FILE_OFFSET64
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+#else
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+#endif
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+
+#ifdef __USE_LARGEFILE64
+struct flock64
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+#endif
+
+/* Include generic Linux declarations. */
+#include <bits/fcntl-linux.h> \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/fenv.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/fenv.h
new file mode 100644
index 0000000000..a1e1b6ba4b
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/fenv.h
@@ -0,0 +1,180 @@
+/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _FENV_H
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+
+/* Define bits representing the exception. We use the bit positions of
+ the appropriate bits in the FPSCR... */
+enum
+ {
+ FE_INEXACT =
+#define FE_INEXACT (1 << (31 - 6))
+ FE_INEXACT,
+ FE_DIVBYZERO =
+#define FE_DIVBYZERO (1 << (31 - 5))
+ FE_DIVBYZERO,
+ FE_UNDERFLOW =
+#define FE_UNDERFLOW (1 << (31 - 4))
+ FE_UNDERFLOW,
+ FE_OVERFLOW =
+#define FE_OVERFLOW (1 << (31 - 3))
+ FE_OVERFLOW,
+
+ /* ... except for FE_INVALID, for which we use bit 31. FE_INVALID
+ actually corresponds to bits 7 through 12 and 21 through 23
+ in the FPSCR, but we can't use that because the current draft
+ says that it must be a power of 2. Instead we use bit 2 which
+ is the summary bit for all the FE_INVALID exceptions, which
+ kind of makes sense. */
+ FE_INVALID =
+#define FE_INVALID (1 << (31 - 2))
+ FE_INVALID,
+
+#ifdef __USE_GNU
+ /* Breakdown of the FE_INVALID bits. Setting FE_INVALID on an
+ input to a routine is equivalent to setting all of these bits;
+ FE_INVALID will be set on output from a routine iff one of
+ these bits is set. Note, though, that you can't disable or
+ enable these exceptions individually. */
+
+ /* Operation with a sNaN. */
+ FE_INVALID_SNAN =
+# define FE_INVALID_SNAN (1 << (31 - 7))
+ FE_INVALID_SNAN,
+
+ /* Inf - Inf */
+ FE_INVALID_ISI =
+# define FE_INVALID_ISI (1 << (31 - 8))
+ FE_INVALID_ISI,
+
+ /* Inf / Inf */
+ FE_INVALID_IDI =
+# define FE_INVALID_IDI (1 << (31 - 9))
+ FE_INVALID_IDI,
+
+ /* 0 / 0 */
+ FE_INVALID_ZDZ =
+# define FE_INVALID_ZDZ (1 << (31 - 10))
+ FE_INVALID_ZDZ,
+
+ /* Inf * 0 */
+ FE_INVALID_IMZ =
+# define FE_INVALID_IMZ (1 << (31 - 11))
+ FE_INVALID_IMZ,
+
+ /* Comparison with a NaN. */
+ FE_INVALID_COMPARE =
+# define FE_INVALID_COMPARE (1 << (31 - 12))
+ FE_INVALID_COMPARE,
+
+ /* Invalid operation flag for software (not set by hardware). */
+ /* Note that some chips don't have this implemented, presumably
+ because no-one expected anyone to write software for them %-). */
+ FE_INVALID_SOFTWARE =
+# define FE_INVALID_SOFTWARE (1 << (31 - 21))
+ FE_INVALID_SOFTWARE,
+
+ /* Square root of negative number (including -Inf). */
+ /* Note that some chips don't have this implemented. */
+ FE_INVALID_SQRT =
+# define FE_INVALID_SQRT (1 << (31 - 22))
+ FE_INVALID_SQRT,
+
+ /* Conversion-to-integer of a NaN or a number too large or too small. */
+ FE_INVALID_INTEGER_CONVERSION =
+# define FE_INVALID_INTEGER_CONVERSION (1 << (31 - 23))
+ FE_INVALID_INTEGER_CONVERSION
+
+# define FE_ALL_INVALID \
+ (FE_INVALID_SNAN | FE_INVALID_ISI | FE_INVALID_IDI | FE_INVALID_ZDZ \
+ | FE_INVALID_IMZ | FE_INVALID_COMPARE | FE_INVALID_SOFTWARE \
+ | FE_INVALID_SQRT | FE_INVALID_INTEGER_CONVERSION)
+#endif
+ };
+
+#define FE_ALL_EXCEPT \
+ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
+
+/* PowerPC chips support all of the four defined rounding modes. We
+ use the bit pattern in the FPSCR as the values for the
+ appropriate macros. */
+enum
+ {
+ FE_TONEAREST =
+#define FE_TONEAREST 0
+ FE_TONEAREST,
+ FE_TOWARDZERO =
+#define FE_TOWARDZERO 1
+ FE_TOWARDZERO,
+ FE_UPWARD =
+#define FE_UPWARD 2
+ FE_UPWARD,
+ FE_DOWNWARD =
+#define FE_DOWNWARD 3
+ FE_DOWNWARD
+ };
+
+/* Type representing exception flags. */
+typedef unsigned int fexcept_t;
+
+/* Type representing floating-point environment. We leave it as 'double'
+ for efficiency reasons (rather than writing it to a 32-bit integer). */
+typedef double fenv_t;
+
+/* If the default argument is used we use this value. */
+extern const fenv_t __fe_dfl_env;
+#define FE_DFL_ENV (&__fe_dfl_env)
+
+#ifdef __USE_GNU
+/* Floating-point environment where all exceptions are enabled. Note that
+ this is not sufficient to give you SIGFPE. */
+extern const fenv_t __fe_enabled_env;
+# define FE_ENABLED_ENV (&__fe_enabled_env)
+
+/* Floating-point environment with (processor-dependent) non-IEEE floating
+ point. */
+extern const fenv_t __fe_nonieee_env;
+# define FE_NONIEEE_ENV (&__fe_nonieee_env)
+
+/* Floating-point environment with all exceptions enabled. Note that
+ just evaluating this value does not change the processor exception mode.
+ Passing this mask to fesetenv will result in a prctl syscall to change
+ the MSR FE0/FE1 bits to "Precise Mode". On some processors this will
+ result in slower floating point execution. This will last until an
+ fenv or exception mask is installed that disables all FP exceptions. */
+# define FE_NOMASK_ENV FE_ENABLED_ENV
+
+/* Floating-point environment with all exceptions disabled. Note that
+ just evaluating this value does not change the processor exception mode.
+ Passing this mask to fesetenv will result in a prctl syscall to change
+ the MSR FE0/FE1 bits to "Ignore Exceptions Mode". On most processors
+ this allows the fastest possible floating point execution.*/
+# define FE_MASK_ENV FE_DFL_ENV
+
+#endif
+
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+/* Type representing floating-point control modes. */
+typedef double femode_t;
+
+/* Default floating-point control modes. */
+extern const femode_t __fe_dfl_mode;
+# define FE_DFL_MODE (&__fe_dfl_mode)
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mips-linux-gnu/bits/floatn.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/floatn.h
index c05a5e55e0..cb7f2fe5bc 100644
--- a/lib/libc/include/mips-linux-gnu/bits/floatn.h
+++ b/lib/libc/include/powerpc-linux-gnueabihf/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 powerpc.
Copyright (C) 2017-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -23,21 +23,23 @@
#include <bits/long-double.h>
/* Defined to 1 if the current compiler invocation provides a
- floating-point type with the IEEE 754 binary128 format, and this
- glibc includes corresponding *f128 interfaces for it. */
-#ifndef __NO_LONG_DOUBLE_MATH
+ floating-point type with the IEEE 754 binary128 format, and this glibc
+ includes corresponding *f128 interfaces for it. */
+#if defined _ARCH_PWR8 && defined __LITTLE_ENDIAN__ && (_CALL_ELF == 2) \
+ && defined __FLOAT128__ && !defined __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
+ from the default float, double and long double types in this glibc, i.e.
+ calls to the binary128 functions go to *f128 symbols instead of *l. */
+#if __HAVE_FLOAT128
+# define __HAVE_DISTINCT_FLOAT128 1
+#else
+# define __HAVE_DISTINCT_FLOAT128 0
+#endif
/* Defined to 1 if the current compiler invocation provides a
floating-point type with the right format for _Float64x, and this
@@ -48,7 +50,7 @@
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
+#define __HAVE_FLOAT64X_LONG_DOUBLE 0
#ifndef __ASSEMBLER__
@@ -56,8 +58,12 @@
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
+/* The literal suffix (f128) exist for powerpc only since GCC 7.0. */
+# if __LDBL_MANT_DIG__ == 113
+# define __f128(x) x##l
+# else
+# define __f128(x) x##q
+# endif
# else
# define __f128(x) x##f128
# endif
@@ -65,8 +71,16 @@
/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */
# if __HAVE_FLOAT128
-# if !__GNUC_PREREQ (7, 0) || defined __cplusplus
+# if __LDBL_MANT_DIG__ == 113 && defined __cplusplus
+typedef long double _Float128;
# define __CFLOAT128 _Complex long double
+# elif !__GNUC_PREREQ (7, 0) || defined __cplusplus
+/* The type _Float128 exist for powerpc only since GCC 7.0. */
+typedef __float128 _Float128;
+/* Add a typedef for older GCC and C++ compilers which don't natively support
+ _Complex _Float128. */
+typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__KC__)));
+# define __CFLOAT128 __cfloat128
# else
# define __CFLOAT128 _Complex _Float128
# endif
@@ -74,18 +88,29 @@
/* 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;
+/* Builtin __builtin_huge_valf128 doesn't exist before GCC 7.0. */
+# if !__GNUC_PREREQ (7, 0)
+# define __builtin_huge_valf128() ((_Float128) __builtin_huge_val ())
# endif
-/* Various built-in functions do not exist before GCC 7.0. */
+/* The following builtins (suffixed with 'q') are available in GCC >= 6.2,
+ which is the minimum version required for float128 support on powerpc64le.
+ Since GCC 7.0 the builtins suffixed with f128 are also available, then
+ there is no need to redefined them. */
# 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))
+# define __builtin_copysignf128 __builtin_copysignq
+# define __builtin_fabsf128 __builtin_fabsq
+# define __builtin_inff128 __builtin_infq
+# define __builtin_nanf128 __builtin_nanq
+# define __builtin_nansf128 __builtin_nansq
+# endif
+
+/* In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*,
+ e.g.: __builtin_signbitf128, before GCC 6. However, there has never
+ been a __builtin_signbitf128 in GCC and the type-generic builtin is
+ only available since GCC 6. */
+# if !__GNUC_PREREQ (6, 0)
+# define __builtin_signbitf128 __signbitf128
# endif
# endif
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/fp-fast.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/fp-fast.h
new file mode 100644
index 0000000000..e10d37d400
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/fp-fast.h
@@ -0,0 +1,39 @@
+/* Define FP_FAST_* macros. PowerPC version.
+ Copyright (C) 2016-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _MATH_H
+# error "Never use <bits/fp-fast.h> directly; include <math.h> instead."
+#endif
+
+#ifdef __USE_ISOC99
+
+/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l}
+ builtins are supported. */
+# if (!defined _SOFT_FLOAT && !defined __NO_FPRS__) || defined __FP_FAST_FMA
+# define FP_FAST_FMA 1
+# endif
+
+# if (!defined _SOFT_FLOAT && !defined __NO_FPRS__) || defined __FP_FAST_FMAF
+# define FP_FAST_FMAF 1
+# endif
+
+# ifdef __FP_FAST_FMAL
+# define FP_FAST_FMAL 1
+# endif
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/hwcap.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/hwcap.h
new file mode 100644
index 0000000000..9858baf991
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/hwcap.h
@@ -0,0 +1,78 @@
+/* Defines for bits in AT_HWCAP and AT_HWCAP2.
+ Copyright (C) 2012-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H)
+# error "Never include <bits/hwcap.h> directly; use <sys/auxv.h> instead."
+#endif
+
+/* The bit numbers must match those in the kernel's asm/cputable.h. */
+
+/* Feature definitions in AT_HWCAP. */
+#define PPC_FEATURE_32 0x80000000 /* 32-bit mode. */
+#define PPC_FEATURE_64 0x40000000 /* 64-bit mode. */
+#define PPC_FEATURE_601_INSTR 0x20000000 /* 601 chip, Old POWER ISA. */
+#define PPC_FEATURE_HAS_ALTIVEC 0x10000000 /* SIMD/Vector Unit. */
+#define PPC_FEATURE_HAS_FPU 0x08000000 /* Floating Point Unit. */
+#define PPC_FEATURE_HAS_MMU 0x04000000 /* Memory Management Unit. */
+#define PPC_FEATURE_HAS_4xxMAC 0x02000000 /* 4xx Multiply Accumulator. */
+#define PPC_FEATURE_UNIFIED_CACHE 0x01000000 /* Unified I/D cache. */
+#define PPC_FEATURE_HAS_SPE 0x00800000 /* Signal Processing ext. */
+#define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 /* SPE Float. */
+#define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 /* SPE Double. */
+#define PPC_FEATURE_NO_TB 0x00100000 /* 601/403gx have no timebase */
+#define PPC_FEATURE_POWER4 0x00080000 /* POWER4 ISA 2.00 */
+#define PPC_FEATURE_POWER5 0x00040000 /* POWER5 ISA 2.02 */
+#define PPC_FEATURE_POWER5_PLUS 0x00020000 /* POWER5+ ISA 2.03 */
+#define PPC_FEATURE_CELL_BE 0x00010000 /* CELL Broadband Engine */
+#define PPC_FEATURE_BOOKE 0x00008000 /* ISA Category Embedded */
+#define PPC_FEATURE_SMT 0x00004000 /* Simultaneous
+ Multi-Threading */
+#define PPC_FEATURE_ICACHE_SNOOP 0x00002000
+#define PPC_FEATURE_ARCH_2_05 0x00001000 /* ISA 2.05 */
+#define PPC_FEATURE_PA6T 0x00000800 /* PA Semi 6T Core */
+#define PPC_FEATURE_HAS_DFP 0x00000400 /* Decimal FP Unit */
+#define PPC_FEATURE_POWER6_EXT 0x00000200 /* P6 + mffgpr/mftgpr */
+#define PPC_FEATURE_ARCH_2_06 0x00000100 /* ISA 2.06 */
+#define PPC_FEATURE_HAS_VSX 0x00000080 /* P7 Vector Extension. */
+#define PPC_FEATURE_PSERIES_PERFMON_COMPAT 0x00000040
+/* Reserved by the kernel. 0x00000004 Do not use. */
+#define PPC_FEATURE_TRUE_LE 0x00000002
+#define PPC_FEATURE_PPC_LE 0x00000001
+
+/* Feature definitions in AT_HWCAP2. */
+#define PPC_FEATURE2_ARCH_2_07 0x80000000 /* ISA 2.07 */
+#define PPC_FEATURE2_HAS_HTM 0x40000000 /* Hardware Transactional
+ Memory */
+#define PPC_FEATURE2_HAS_DSCR 0x20000000 /* Data Stream Control
+ Register */
+#define PPC_FEATURE2_HAS_EBB 0x10000000 /* Event Base Branching */
+#define PPC_FEATURE2_HAS_ISEL 0x08000000 /* Integer Select */
+#define PPC_FEATURE2_HAS_TAR 0x04000000 /* Target Address Register */
+#define PPC_FEATURE2_HAS_VEC_CRYPTO 0x02000000 /* Target supports vector
+ instruction. */
+#define PPC_FEATURE2_HTM_NOSC 0x01000000 /* Kernel aborts transaction
+ when a syscall is made. */
+#define PPC_FEATURE2_ARCH_3_00 0x00800000 /* ISA 3.0 */
+#define PPC_FEATURE2_HAS_IEEE128 0x00400000 /* VSX IEEE Binary Float
+ 128-bit */
+#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. */
+#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-gnueabihf/bits/ioctl-types.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/ioctl-types.h
new file mode 100644
index 0000000000..919610e5ca
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/ioctl-types.h
@@ -0,0 +1,77 @@
+/* Structure types for pre-termios terminal ioctls. Linux/powerpc version.
+ Copyright (C) 2014-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_IOCTL_H
+# error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead."
+#endif
+
+/* Get definition of constants for use with `ioctl'. */
+#include <asm/ioctls.h>
+
+
+struct winsize
+ {
+ unsigned short int ws_row;
+ unsigned short int ws_col;
+ unsigned short int ws_xpixel;
+ unsigned short int ws_ypixel;
+ };
+
+#define NCC 10
+struct termio
+ {
+ unsigned short int c_iflag; /* input mode flags */
+ unsigned short int c_oflag; /* output mode flags */
+ unsigned short int c_cflag; /* control mode flags */
+ unsigned short int c_lflag; /* local mode flags */
+ unsigned char c_line; /* line discipline */
+ unsigned char c_cc[NCC]; /* control characters */
+};
+
+/* modem lines */
+#define TIOCM_LE 0x001
+#define TIOCM_DTR 0x002
+#define TIOCM_RTS 0x004
+#define TIOCM_ST 0x008
+#define TIOCM_SR 0x010
+#define TIOCM_CTS 0x020
+#define TIOCM_CAR 0x040
+#define TIOCM_RNG 0x080
+#define TIOCM_DSR 0x100
+#define TIOCM_CD TIOCM_CAR
+#define TIOCM_RI TIOCM_RNG
+
+/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
+
+/* line disciplines */
+#define N_TTY 0
+#define N_SLIP 1
+#define N_MOUSE 2
+#define N_PPP 3
+#define N_STRIP 4
+#define N_AX25 5
+#define N_X25 6 /* X.25 async */
+#define N_6PACK 7
+#define N_MASC 8 /* Mobitex module */
+#define N_R3964 9 /* Simatic R3964 module */
+#define N_PROFIBUS_FDL 10 /* Profibus */
+#define N_IRDA 11 /* Linux IR */
+#define N_SMSBLOCK 12 /* SMS block mode */
+#define N_HDLC 13 /* synchronous HDLC */
+#define N_SYNC_PPP 14 /* synchronous PPP */
+#define N_HCI 15 /* Bluetooth HCI UART */ \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/ipc-perm.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/ipc-perm.h
new file mode 100644
index 0000000000..ff13f53218
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/ipc-perm.h
@@ -0,0 +1,36 @@
+/* struct ipc_perm definition. Linux/powerpc version.
+ Copyright (C) 1995-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_IPC_H
+# error "Never use <bits/ipc-perm.h> directly; include <sys/ipc.h> instead."
+#endif
+
+/* Data structure used to pass permission information to IPC operations. */
+struct ipc_perm
+ {
+ __key_t __key; /* Key. */
+ __uid_t uid; /* Owner's user ID. */
+ __gid_t gid; /* Owner's group ID. */
+ __uid_t cuid; /* Creator's user ID. */
+ __gid_t cgid; /* Creator's group ID. */
+ __mode_t mode; /* Read/write permission. */
+ __uint32_t __seq; /* Sequence number. */
+ __uint32_t __pad1;
+ __uint64_t __glibc_reserved1;
+ __uint64_t __glibc_reserved2;
+ }; \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/iscanonical.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/iscanonical.h
new file mode 100644
index 0000000000..288b2f2d8a
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/iscanonical.h
@@ -0,0 +1,58 @@
+/* Define iscanonical macro. ldbl-128ibm version.
+ Copyright (C) 2016-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _MATH_H
+# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
+#endif
+
+#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)
+ __THROW __attribute__ ((__const__));
+# define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1)
+# define __iscanonical(x) ((void) (__typeof (x)) (x), 1)
+# if __HAVE_DISTINCT_FLOAT128
+# define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1)
+# endif
+
+/* Return nonzero value if X is canonical. In IEEE interchange binary
+ formats, all values are canonical, but the argument must still be
+ converted to its semantic type for any exceptions arising from the
+ conversion, before being discarded; in IBM long double, there are
+ encodings that are not consistently handled as corresponding to any
+ particular value of the type, and we return 0 for those. */
+# ifndef __cplusplus
+# define iscanonical(x) __MATH_TG ((x), __iscanonical, (x))
+# else
+/* In C++ mode, __MATH_TG cannot be used, because it relies on
+ __builtin_types_compatible_p, which is a C-only builtin. On the
+ other hand, overloading provides the means to distinguish between
+ the floating-point types. The overloading resolution will match
+ the correct parameter (regardless of type qualifiers (i.e.: const
+ and volatile)). */
+extern "C++" {
+inline int iscanonical (float __val) { return __iscanonicalf (__val); }
+inline int iscanonical (double __val) { return __iscanonical (__val); }
+inline int iscanonical (long double __val) { return __iscanonicall (__val); }
+# if __HAVE_DISTINCT_FLOAT128
+inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); }
+# endif
+}
+# endif /* __cplusplus */
+#endif /* __NO_LONG_DOUBLE_MATH */ \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/link.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/link.h
new file mode 100644
index 0000000000..fc234f741e
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/link.h
@@ -0,0 +1,156 @@
+/* Machine-specific declarations for dynamic linker interface. PowerPC version
+ Copyright (C) 2004-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _LINK_H
+# error "Never include <bits/link.h> directly; use <link.h> instead."
+#endif
+
+
+#if __ELF_NATIVE_CLASS == 32
+
+/* Registers for entry into PLT on PPC32. */
+typedef struct La_ppc32_regs
+{
+ uint32_t lr_reg[8];
+ double lr_fp[8];
+ uint32_t lr_vreg[12][4];
+ uint32_t lr_r1;
+ uint32_t lr_lr;
+} La_ppc32_regs;
+
+/* Return values for calls from PLT on PPC32. */
+typedef struct La_ppc32_retval
+{
+ uint32_t lrv_r3;
+ uint32_t lrv_r4;
+ double lrv_fp[8];
+ uint32_t lrv_v2[4];
+} La_ppc32_retval;
+
+
+__BEGIN_DECLS
+
+extern Elf32_Addr la_ppc32_gnu_pltenter (Elf32_Sym *__sym,
+ unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_ppc32_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_ppc32_gnu_pltexit (Elf32_Sym *__sym,
+ unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_ppc32_regs *__inregs,
+ La_ppc32_retval *__outregs,
+ const char *__symname);
+
+__END_DECLS
+
+#elif __ELF_NATIVE_CLASS == 64
+# if _CALL_ELF != 2
+
+/* Registers for entry into PLT on PPC64. */
+typedef struct La_ppc64_regs
+{
+ uint64_t lr_reg[8];
+ double lr_fp[13];
+ uint32_t __padding;
+ uint32_t lr_vrsave;
+ uint32_t lr_vreg[12][4];
+ uint64_t lr_r1;
+ uint64_t lr_lr;
+} La_ppc64_regs;
+
+/* Return values for calls from PLT on PPC64. */
+typedef struct La_ppc64_retval
+{
+ uint64_t lrv_r3;
+ uint64_t lrv_r4;
+ double lrv_fp[4]; /* f1-f4, float - complex long double. */
+ uint32_t lrv_v2[4]; /* v2. */
+} La_ppc64_retval;
+
+
+__BEGIN_DECLS
+
+extern Elf64_Addr la_ppc64_gnu_pltenter (Elf64_Sym *__sym,
+ unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_ppc64_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_ppc64_gnu_pltexit (Elf64_Sym *__sym,
+ unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_ppc64_regs *__inregs,
+ La_ppc64_retval *__outregs,
+ const char *__symname);
+
+__END_DECLS
+
+# else
+
+/* Registers for entry into PLT on PPC64 in the ELFv2 ABI. */
+typedef struct La_ppc64v2_regs
+{
+ uint64_t lr_reg[8];
+ double lr_fp[13];
+ uint32_t __padding;
+ uint32_t lr_vrsave;
+ uint32_t lr_vreg[12][4] __attribute__ ((aligned (16)));
+ uint64_t lr_r1;
+ uint64_t lr_lr;
+} La_ppc64v2_regs;
+
+/* Return values for calls from PLT on PPC64 in the ELFv2 ABI. */
+typedef struct La_ppc64v2_retval
+{
+ uint64_t lrv_r3;
+ uint64_t lrv_r4;
+ double lrv_fp[10];
+ uint32_t lrv_vreg[8][4] __attribute__ ((aligned (16)));
+} La_ppc64v2_retval;
+
+
+__BEGIN_DECLS
+
+extern Elf64_Addr la_ppc64v2_gnu_pltenter (Elf64_Sym *__sym,
+ unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_ppc64v2_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_ppc64v2_gnu_pltexit (Elf64_Sym *__sym,
+ unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_ppc64v2_regs *__inregs,
+ La_ppc64v2_retval *__outregs,
+ const char *__symname);
+
+__END_DECLS
+
+# endif
+#endif \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/long-double.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/long-double.h
new file mode 100644
index 0000000000..e3ec00d82b
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/long-double.h
@@ -0,0 +1,25 @@
+/* Properties of long double type. ldbl-opt version.
+ Copyright (C) 2016-2021 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 published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef __NO_LONG_DOUBLE_MATH
+# define __LONG_DOUBLE_MATH_OPTIONAL 1
+# ifndef __LONG_DOUBLE_128__
+# define __NO_LONG_DOUBLE_MATH 1
+# endif
+#endif
+#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/mman.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/mman.h
new file mode 100644
index 0000000000..c920654b28
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/mman.h
@@ -0,0 +1,53 @@
+/* Definitions for POSIX memory map interface. Linux/PowerPC version.
+ Copyright (C) 1997-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_MMAN_H
+# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
+#endif
+
+/* The following definitions basically come from the kernel headers.
+ But the kernel header is not namespace clean. */
+
+#define PROT_SAO 0x10 /* Strong Access Ordering. */
+
+/* These are Linux-specific. */
+#ifdef __USE_MISC
+# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
+# define MAP_DENYWRITE 0x00800 /* ETXTBSY */
+# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */
+# define MAP_LOCKED 0x00080 /* Lock the mapping. */
+# define MAP_NORESERVE 0x00040 /* Don't check for reservations. */
+# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */
+# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */
+# define MAP_STACK 0x20000 /* Allocation is for a stack. */
+# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
+# define MAP_SYNC 0x80000 /* Perform synchronous page
+ faults for the mapping. */
+# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap
+ underlying mapping. */
+#endif
+
+/* Flags for `mlockall'. */
+#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */
+#define MCL_FUTURE 0x4000 /* Lock all additions to address
+ space. */
+#define MCL_ONFAULT 0x8000 /* Lock all pages that are
+ faulted in. */
+
+/* Include generic Linux declarations. */
+#include <bits/mman-linux.h> \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/procfs.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/procfs.h
new file mode 100644
index 0000000000..eabe87ff35
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/procfs.h
@@ -0,0 +1,49 @@
+/* Types for registers for sys/procfs.h. PowerPC version.
+ Copyright (C) 1996-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_PROCFS_H
+# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
+#endif
+
+#include <signal.h>
+#include <sys/ucontext.h>
+
+/* These definitions are normally provided by ucontext.h via
+ asm/sigcontext.h, asm/ptrace.h, and asm/elf.h. Otherwise we define
+ them here. */
+#if !defined __PPC64_ELF_H && !defined _ASM_POWERPC_ELF_H
+#define ELF_NGREG 48 /* includes nip, msr, lr, etc. */
+#define ELF_NFPREG 33 /* includes fpscr */
+#if __WORDSIZE == 32
+# define ELF_NVRREG 33 /* includes vscr */
+#else
+# define ELF_NVRREG 34 /* includes vscr */
+#endif
+
+typedef unsigned long elf_greg_t;
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+typedef double elf_fpreg_t;
+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+
+/* Altivec registers */
+typedef struct {
+ unsigned int u[4];
+} __attribute__ ((__aligned__ (16))) elf_vrreg_t;
+typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG];
+#endif \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/pthread_stack_min.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..c8caed37b2
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/pthread_stack_min.h
@@ -0,0 +1,21 @@
+/* Definition of PTHREAD_STACK_MIN. Linux/PPC version.
+ Copyright (C) 2021 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; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages for systems with 64k
+ pages. */
+#define PTHREAD_STACK_MIN 131072 \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/setjmp.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/setjmp.h
new file mode 100644
index 0000000000..47eec4fe73
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/setjmp.h
@@ -0,0 +1,50 @@
+/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Define the machine-dependent type `jmp_buf'. PowerPC version. */
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
+/* The previous bits/setjmp.h had __jmp_buf defined as a structure.
+ We use an array of 'long int' instead, to make writing the
+ assembler easier. Naturally, user code should not depend on
+ either representation. */
+
+#include <bits/wordsize.h>
+
+/* The current powerpc 32-bit Altivec ABI specifies for SVR4 ABI and EABI
+ the vrsave must be at byte 248 & v20 at byte 256. So we must pad this
+ correctly on 32 bit. It also insists that vecregs are only gauranteed
+ 4 byte alignment so we need to use vperm in the setjmp/longjmp routines.
+ We have to version the code because members like int __mask_was_saved
+ in the jmp_buf will move as jmp_buf is now larger than 248 bytes. We
+ cannot keep the altivec jmp_buf backward compatible with the jmp_buf. */
+#ifndef _ASM
+# if __WORDSIZE == 64
+typedef long int __jmp_buf[64] __attribute__ ((__aligned__ (16)));
+# else
+/* The alignment is not essential, i.e.the buffer can be copied to a 4 byte
+ aligned buffer as per the ABI it is just added for performance reasons. */
+typedef long int __jmp_buf[64 + (12 * 4)] __attribute__ ((__aligned__ (16)));
+# endif
+#endif
+
+#endif /* bits/setjmp.h */ \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/sigstack.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/sigstack.h
new file mode 100644
index 0000000000..f2371950e2
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/sigstack.h
@@ -0,0 +1,32 @@
+/* sigstack, sigaltstack definitions.
+ Copyright (C) 1998-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_SIGSTACK_H
+#define _BITS_SIGSTACK_H 1
+
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
+# error "Never include this file directly. Use <signal.h> instead"
+#endif
+
+/* Minimum stack size for a signal handler. */
+#define MINSIGSTKSZ 4096
+
+/* System default stack size. */
+#define SIGSTKSZ 16384
+
+#endif /* bits/sigstack.h */ \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/socket-constants.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/socket-constants.h
new file mode 100644
index 0000000000..a6223eff27
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/socket-constants.h
@@ -0,0 +1,70 @@
+/* Socket constants which vary among Linux architectures. Version for POWER.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SOCKET_H
+# error "Never include <bits/socket-constants.h> directly; use <sys/socket.h> instead."
+#endif
+
+#define SOL_SOCKET 1
+#define SO_ACCEPTCONN 30
+#define SO_BROADCAST 6
+#define SO_DONTROUTE 5
+#define SO_ERROR 4
+#define SO_KEEPALIVE 9
+#define SO_LINGER 13
+#define SO_OOBINLINE 10
+#define SO_RCVBUF 8
+#define SO_RCVLOWAT 16
+#define SO_REUSEADDR 2
+#define SO_SNDBUF 7
+#define SO_SNDLOWAT 17
+#define SO_TYPE 3
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 18
+# define SO_SNDTIMEO 19
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 18
+# define SO_SNDTIMEO_OLD 19
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/struct_mutex.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/struct_mutex.h
new file mode 100644
index 0000000000..708b22e85a
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/struct_mutex.h
@@ -0,0 +1,63 @@
+/* PowerPC internal mutex struct definitions.
+ Copyright (C) 2019-2021 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
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _THREAD_MUTEX_INTERNAL_H
+#define _THREAD_MUTEX_INTERNAL_H 1
+
+struct __pthread_mutex_s
+{
+ int __lock;
+ unsigned int __count;
+ int __owner;
+#if __WORDSIZE == 64
+ unsigned int __nusers;
+#endif
+ /* KIND must stay at this position in the structure to maintain
+ binary compatibility with static initializers. */
+ int __kind;
+#if __WORDSIZE == 64
+ short __spins;
+ short __elision;
+ __pthread_list_t __list;
+# define __PTHREAD_MUTEX_HAVE_PREV 1
+#else
+ unsigned int __nusers;
+ __extension__ union
+ {
+ struct
+ {
+ short __espins;
+ short __elision;
+# define __spins __elision_data.__espins
+# define __elision __elision_data.__elision
+ } __elision_data;
+ __pthread_slist_t __list;
+ };
+# define __PTHREAD_MUTEX_HAVE_PREV 0
+#endif
+};
+
+#if __WORDSIZE == 64
+# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
+ 0, 0, 0, 0, __kind, 0, 0, { 0, 0 }
+#else
+# define __PTHREAD_MUTEX_INITIALIZER(__kind) \
+ 0, 0, 0, __kind, 0, { { 0, 0 } }
+#endif
+
+#endif \ No newline at end of file
diff --git a/lib/libc/include/mips-linux-gnu/bits/struct_rwlock.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/struct_rwlock.h
index 6355f539b9..5d5bc3f894 100644
--- a/lib/libc/include/mips-linux-gnu/bits/struct_rwlock.h
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/struct_rwlock.h
@@ -1,5 +1,6 @@
-/* MIPS internal rwlock struct definitions.
+/* PowerPC internal rwlock struct definitions.
Copyright (C) 2019-2021 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
@@ -27,45 +28,34 @@ struct __pthread_rwlock_arch_t
unsigned int __writers_futex;
unsigned int __pad3;
unsigned int __pad4;
-#if _MIPS_SIM == _ABI64
+#if __WORDSIZE == 64
int __cur_writer;
int __shared;
- unsigned long int __pad1;
+ unsigned char __rwelision;
+ unsigned char __pad1[7];
unsigned long int __pad2;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned int __flags;
-# else
-# if __BYTE_ORDER == __BIG_ENDIAN
- unsigned char __pad1;
+# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, {0, 0, 0, 0, 0, 0, 0 }
+#else
+ unsigned char __rwelision;
unsigned char __pad2;
unsigned char __shared;
/* FLAGS must stay at this position in the structure to maintain
binary compatibility. */
unsigned char __flags;
-# else
- /* FLAGS must stay at this position in the structure to maintain
- binary compatibility. */
- unsigned char __flags;
- unsigned char __shared;
- unsigned char __pad1;
- unsigned char __pad2;
-# endif
int __cur_writer;
+# define __PTHREAD_RWLOCK_ELISION_EXTRA 0
#endif
};
-#if _MIPS_SIM == _ABI64
+#if __WORDSIZE == 64
# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
+ 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags
#else
-# if __BYTE_ORDER == __BIG_ENDIAN
-# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
- 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
-# else
-# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
- 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0
-# endif
+# define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
+ 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0, __flags, 0
#endif
#endif \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/struct_stat.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/struct_stat.h
new file mode 100644
index 0000000000..3faed3a29b
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/struct_stat.h
@@ -0,0 +1,231 @@
+/* Definition for struct stat.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if !defined _SYS_STAT_H && !defined _FCNTL_H
+# error "Never include <bits/struct_stat.h> directly; use <sys/stat.h> instead."
+#endif
+
+#ifndef _BITS_STRUCT_STAT_H
+#define _BITS_STRUCT_STAT_H 1
+
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+struct stat
+ {
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
+ __dev_t st_dev; /* Device. */
+# ifndef __USE_FILE_OFFSET64
+ unsigned short int __pad1;
+ __ino_t st_ino; /* File serial number. */
+# else
+ __ino64_t st_ino; /* File serial number. */
+# endif
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ unsigned short int __pad2;
+# ifndef __USE_FILE_OFFSET64
+ __off_t st_size; /* Size of file, in bytes. */
+# else
+ __off64_t st_size; /* Size of file, in bytes. */
+# endif
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+
+# ifndef __USE_FILE_OFFSET64
+ __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
+# else
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+# endif
+# ifdef __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+# endif
+ unsigned long int __glibc_reserved4;
+ unsigned long int __glibc_reserved5;
+# endif /* __USE_TIME_BITS64 */
+ };
+
+# ifdef __USE_LARGEFILE64
+struct stat64
+ {
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
+ __dev_t st_dev; /* Device. */
+ __ino64_t st_ino; /* File serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ unsigned short int __pad2;
+ __off64_t st_size; /* Size of file, in bytes. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+# ifdef __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+# endif
+ unsigned long int __glibc_reserved4;
+ unsigned long int __glibc_reserved5;
+# endif /* __USE_TIME_BITS64 */
+ };
+# endif /* __USE_LARGEFILE64 */
+
+#else /* __WORDSIZE == 32 */
+
+struct stat
+ {
+ __dev_t st_dev; /* Device. */
+# ifndef __USE_FILE_OFFSET64
+ __ino_t st_ino; /* File serial number. */
+# else
+ __ino64_t st_ino; /* File serial number. */
+# endif
+ __nlink_t st_nlink; /* Link count. */
+ __mode_t st_mode; /* File mode. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ int __pad2;
+ __dev_t st_rdev; /* Device number, if device. */
+# ifndef __USE_FILE_OFFSET64
+ __off_t st_size; /* Size of file, in bytes. */
+# else
+ __off64_t st_size; /* Size of file, in bytes. */
+# endif
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+
+# ifndef __USE_FILE_OFFSET64
+ __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
+# else
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+# endif
+# ifdef __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+# endif
+ unsigned long int __glibc_reserved4;
+ unsigned long int __glibc_reserved5;
+ unsigned long int __glibc_reserved6;
+ };
+
+# ifdef __USE_LARGEFILE64
+struct stat64
+ {
+ __dev_t st_dev; /* Device. */
+ __ino64_t st_ino; /* File serial number. */
+ __nlink_t st_nlink; /* Link count. */
+ __mode_t st_mode; /* File mode. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ int __pad2;
+ __dev_t st_rdev; /* Device number, if device. */
+ __off64_t st_size; /* Size of file, in bytes. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+# ifdef __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+# endif
+ unsigned long int __glibc_reserved4;
+ unsigned long int __glibc_reserved5;
+ unsigned long int __glibc_reserved6;
+ };
+# endif /* __USE_LARGEFILE64 */
+#endif
+
+/* Tell code we have these members. */
+#define _STATBUF_ST_BLKSIZE
+#define _STATBUF_ST_RDEV
+/* Nanosecond resolution time values are supported. */
+#define _STATBUF_ST_NSEC
+
+#endif /* _BITS_STRUCT_STAT_H */ \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-baud.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-baud.h
new file mode 100644
index 0000000000..4ee2f824bf
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-baud.h
@@ -0,0 +1,45 @@
+/* termios baud rate selection definitions. Linux/powerpc version.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-baud.h> directly; use <termios.h> instead."
+#endif
+
+#ifdef __USE_MISC
+# define CBAUD 0000377
+# define CBAUDEX 0000020
+# define CMSPAR 010000000000 /* mark or space (stick) parity */
+# define CRTSCTS 020000000000 /* flow control */
+#endif
+
+#define B57600 00020
+#define B115200 00021
+#define B230400 00022
+#define B460800 00023
+#define B500000 00024
+#define B576000 00025
+#define B921600 00026
+#define B1000000 00027
+#define B1152000 00030
+#define B1500000 00031
+#define B2000000 00032
+#define B2500000 00033
+#define B3000000 00034
+#define B3500000 00035
+#define B4000000 00036
+#define __MAX_BAUD B4000000 \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_cc.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_cc.h
new file mode 100644
index 0000000000..32283b153f
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_cc.h
@@ -0,0 +1,41 @@
+/* termios c_cc symbolic constant definitions. Linux/powerpc version.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead."
+#endif
+
+/* c_cc characters */
+#define VINTR 0
+#define VQUIT 1
+#define VERASE 2
+#define VKILL 3
+#define VEOF 4
+#define VMIN 5
+#define VEOL 6
+#define VTIME 7
+#define VEOL2 8
+#define VSWTC 9
+
+#define VWERASE 10
+#define VREPRINT 11
+#define VSUSP 12
+#define VSTART 13
+#define VSTOP 14
+#define VLNEXT 15
+#define VDISCARD 16 \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_cflag.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_cflag.h
new file mode 100644
index 0000000000..01c2a123b5
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_cflag.h
@@ -0,0 +1,35 @@
+/* termios control mode definitions. Linux/powerpc version.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_cflag.h> directly; use <termios.h> instead."
+#endif
+
+#define CSIZE 00001400
+#define CS5 00000000
+#define CS6 00000400
+#define CS7 00001000
+#define CS8 00001400
+
+#define CSTOPB 00002000
+#define CREAD 00004000
+#define PARENB 00010000
+#define PARODD 00020000
+#define HUPCL 00040000
+
+#define CLOCAL 00100000 \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_iflag.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_iflag.h
new file mode 100644
index 0000000000..4df494e6dc
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_iflag.h
@@ -0,0 +1,38 @@
+/* termios input mode definitions. Linux/powerpc version.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_iflags.h> directly; use <termios.h> instead."
+#endif
+
+/* c_iflag bits */
+#define IGNBRK 0000001
+#define BRKINT 0000002
+#define IGNPAR 0000004
+#define PARMRK 0000010
+#define INPCK 0000020
+#define ISTRIP 0000040
+#define INLCR 0000100
+#define IGNCR 0000200
+#define ICRNL 0000400
+#define IXON 0001000
+#define IXOFF 0002000
+#define IXANY 0004000
+#define IUCLC 0010000
+#define IMAXBEL 0020000
+#define IUTF8 0040000 \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_lflag.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_lflag.h
new file mode 100644
index 0000000000..ee2291cc56
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_lflag.h
@@ -0,0 +1,45 @@
+/* termios local mode definitions. Linux/powerpc version.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_lflag.h> directly; use <termios.h> instead."
+#endif
+
+/* c_lflag bits */
+#define ISIG 0x00000080
+#define ICANON 0x00000100
+#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
+# define XCASE 0x00004000
+#endif
+#define ECHO 0x00000008
+#define ECHOE 0x00000002
+#define ECHOK 0x00000004
+#define ECHONL 0x00000010
+#define NOFLSH 0x80000000
+#define TOSTOP 0x00400000
+#ifdef __USE_MISC
+# define ECHOCTL 0x00000040
+# define ECHOPRT 0x00000020
+# define ECHOKE 0x00000001
+# define FLUSHO 0x00800000
+# define PENDIN 0x20000000
+#endif
+#define IEXTEN 0x00000400
+#ifdef __USE_MISC
+# define EXTPROC 0x10000000
+#endif \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_oflag.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_oflag.h
new file mode 100644
index 0000000000..a875d23d4f
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-c_oflag.h
@@ -0,0 +1,65 @@
+/* termios output mode definitions. Linux/powerpc version.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-c_oflag.h> directly; use <termios.h> instead."
+#endif
+
+/* c_oflag bits */
+#define OPOST 0000001
+#define ONLCR 0000002
+#define OLCUC 0000004
+
+#define OCRNL 0000010
+#define ONOCR 0000020
+#define ONLRET 0000040
+
+#define OFILL 00000100
+#define OFDEL 00000200
+#if defined __USE_MISC || defined __USE_XOPEN
+# define NLDLY 00001400
+# define NL0 00000000
+# define NL1 00000400
+# if defined __USE_MISC
+# define NL2 00001000
+# define NL3 00001400
+# endif
+# define TABDLY 00006000
+# define TAB0 00000000
+# define TAB1 00002000
+# define TAB2 00004000
+# define TAB3 00006000
+# define CRDLY 00030000
+# define CR0 00000000
+# define CR1 00010000
+# define CR2 00020000
+# define CR3 00030000
+# define FFDLY 00040000
+# define FF0 00000000
+# define FF1 00040000
+# define BSDLY 00100000
+# define BS0 00000000
+# define BS1 00100000
+#endif
+#define VTDLY 00200000
+#define VT0 00000000
+#define VT1 00200000
+
+#ifdef __USE_MISC
+# define XTABS 00006000
+#endif \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-misc.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-misc.h
new file mode 100644
index 0000000000..dc3fb15aa7
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/termios-misc.h
@@ -0,0 +1,72 @@
+/* termios baud platform specific definitions. Linux/powerpc version.
+ Copyright (C) 2019-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _TERMIOS_H
+# error "Never include <bits/termios-misc.h> directly; use <termios.h> instead."
+#endif
+
+#ifdef __USE_MISC
+
+struct sgttyb {
+ char sg_ispeed;
+ char sg_ospeed;
+ char sg_erase;
+ char sg_kill;
+ short sg_flags;
+};
+
+struct tchars {
+ char t_intrc;
+ char t_quitc;
+ char t_startc;
+ char t_stopc;
+ char t_eofc;
+ char t_brkc;
+};
+
+struct ltchars {
+ char t_suspc;
+ char t_dsuspc;
+ char t_rprntc;
+ char t_flushc;
+ char t_werasc;
+ char t_lnextc;
+};
+
+/* Used for packet mode */
+#define TIOCPKT_DATA 0
+#define TIOCPKT_FLUSHREAD 1
+#define TIOCPKT_FLUSHWRITE 2
+#define TIOCPKT_STOP 4
+#define TIOCPKT_START 8
+#define TIOCPKT_NOSTOP 16
+#define TIOCPKT_DOSTOP 32
+
+/* c_cc characters */
+#define _VINTR 0
+#define _VQUIT 1
+#define _VERASE 2
+#define _VKILL 3
+#define _VEOF 4
+#define _VMIN 5
+#define _VEOL 6
+#define _VTIME 7
+#define _VEOL2 8
+#define _VSWTC 9
+
+#endif /* __USE_MISC */ \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_msqid_ds.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_msqid_ds.h
new file mode 100644
index 0000000000..52cc930886
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_msqid_ds.h
@@ -0,0 +1,53 @@
+/* Linux/PowerPC implementation of the SysV message struct msqid_ds.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_MSG_H
+# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
+#endif
+
+#include <bits/types/time_t.h>
+
+/* Structure of record for one message inside the kernel.
+ The type `struct msg' is opaque. */
+struct msqid_ds
+{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
+ 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;
+#endif
+}; \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_semid_ds.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_semid_ds.h
new file mode 100644
index 0000000000..d70967d6e0
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_semid_ds.h
@@ -0,0 +1,43 @@
+/* PowerPC implementation of the semaphore struct semid_ds.
+ Copyright (C) 1995-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SEM_H
+# error "Never include <bits/types/struct_semid_ds.h> directly; use <sys/sem.h> instead."
+#endif
+
+/* Data structure describing a set of semaphores. */
+struct semid_ds
+{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
+ 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;
+#endif
+}; \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_shmid_ds.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_shmid_ds.h
new file mode 100644
index 0000000000..6a47b1c39f
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/types/struct_shmid_ds.h
@@ -0,0 +1,50 @@
+/* Linux/PowerPC implementation of the shared memory struct shmid_ds.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_SHM_H
+# error "Never include <bits/types/struct_shmid_ds.h> directly; use <sys/shm.h> instead."
+#endif
+
+/* Data structure describing a shared memory segment. */
+struct shmid_ds
+ {
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
+ 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;
+#endif
+ }; \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/bits/wordsize.h b/lib/libc/include/powerpc-linux-gnueabihf/bits/wordsize.h
new file mode 100644
index 0000000000..37836f9d4e
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/bits/wordsize.h
@@ -0,0 +1,11 @@
+/* Determine the wordsize from the preprocessor defines. */
+
+#if defined __powerpc64__
+# define __WORDSIZE 64
+# define __WORDSIZE_TIME64_COMPAT32 1
+#else
+# define __WORDSIZE 32
+# define __WORDSIZE_TIME64_COMPAT32 0
+# define __WORDSIZE32_SIZE_ULONG 0
+# define __WORDSIZE32_PTRDIFF_LONG 0
+#endif \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/fpu_control.h b/lib/libc/include/powerpc-linux-gnueabihf/fpu_control.h
new file mode 100644
index 0000000000..7f66352f1a
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/fpu_control.h
@@ -0,0 +1,114 @@
+/* FPU control word definitions. PowerPC version.
+ Copyright (C) 1996-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _FPU_CONTROL_H
+#define _FPU_CONTROL_H
+
+#if defined __SPE__ || (defined __NO_FPRS__ && !defined _SOFT_FLOAT)
+# error "SPE/e500 is no longer supported"
+#endif
+
+#ifdef _SOFT_FLOAT
+
+# define _FPU_RESERVED 0xffffffff
+# define _FPU_DEFAULT 0x00000000 /* Default value. */
+typedef unsigned int fpu_control_t;
+# define _FPU_GETCW(cw) (cw) = 0
+# define _FPU_SETCW(cw) (void) (cw)
+extern fpu_control_t __fpu_control;
+
+#else /* PowerPC 6xx floating-point. */
+
+/* rounding control */
+# define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */
+# define _FPU_RC_DOWN 0x03
+# define _FPU_RC_UP 0x02
+# define _FPU_RC_ZERO 0x01
+
+# define _FPU_MASK_RC (_FPU_RC_NEAREST|_FPU_RC_DOWN|_FPU_RC_UP|_FPU_RC_ZERO)
+
+# define _FPU_MASK_NI 0x04 /* non-ieee mode */
+
+/* masking of interrupts */
+# define _FPU_MASK_ZM 0x10 /* zero divide */
+# define _FPU_MASK_OM 0x40 /* overflow */
+# define _FPU_MASK_UM 0x20 /* underflow */
+# define _FPU_MASK_XM 0x08 /* inexact */
+# define _FPU_MASK_IM 0x80 /* invalid operation */
+
+# define _FPU_RESERVED 0xffffff00 /* These bits are reserved are not changed. */
+
+/* The fdlibm code requires no interrupts for exceptions. */
+# define _FPU_DEFAULT 0x00000000 /* Default value. */
+
+/* IEEE: same as above, but (some) exceptions;
+ we leave the 'inexact' exception off.
+ */
+# define _FPU_IEEE 0x000000f0
+
+/* Type of the control word. */
+typedef unsigned int fpu_control_t;
+
+/* Macros for accessing the hardware control word. */
+# define _FPU_GETCW(cw) \
+ ({union { double __d; unsigned long long __ll; } __u; \
+ __asm__ __volatile__("mffs %0" : "=f" (__u.__d)); \
+ (cw) = (fpu_control_t) __u.__ll; \
+ (fpu_control_t) __u.__ll; \
+ })
+
+# define _FPU_GET_RC_ISA300() \
+ ({union { double __d; unsigned long long __ll; } __u; \
+ __asm__ __volatile__( \
+ ".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
+ : "=f" (__u.__d)); \
+ (fpu_control_t) (__u.__ll & _FPU_MASK_RC); \
+ })
+
+# ifdef _ARCH_PWR9
+# define _FPU_GET_RC() _FPU_GET_RC_ISA300()
+# elif defined __BUILTIN_CPU_SUPPORTS__
+# define _FPU_GET_RC() \
+ ({fpu_control_t __rc; \
+ __rc = __glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
+ ? _FPU_GET_RC_ISA300 () \
+ : _FPU_GETCW (__rc) & _FPU_MASK_RC; \
+ __rc; \
+ })
+# else
+# define _FPU_GET_RC() \
+ ({fpu_control_t __rc = _FPU_GETCW (__rc) & _FPU_MASK_RC; \
+ __rc; \
+ })
+# endif
+
+# define _FPU_SETCW(cw) \
+ { union { double __d; unsigned long long __ll; } __u; \
+ register double __fr; \
+ __u.__ll = 0xfff80000LL << 32; /* This is a QNaN. */ \
+ __u.__ll |= (cw) & 0xffffffffLL; \
+ __fr = __u.__d; \
+ __asm__ __volatile__("mtfsf 255,%0" : : "f" (__fr)); \
+ }
+
+/* Default control word set at startup. */
+extern fpu_control_t __fpu_control;
+
+#endif /* PowerPC 6xx floating-point. */
+
+#endif /* _FPU_CONTROL_H */ \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/gnu/lib-names-32.h b/lib/libc/include/powerpc-linux-gnueabihf/gnu/lib-names-32.h
new file mode 100644
index 0000000000..7dfe5a7147
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/gnu/lib-names-32.h
@@ -0,0 +1,29 @@
+/* This file is automatically generated. */
+#ifndef __GNU_LIB_NAMES_H
+# error "Never use <gnu/lib-names-32.h> directly; include <gnu/lib-names.h> instead."
+#endif
+
+#define LD_SO "ld.so.1"
+#define LIBANL_SO "libanl.so.1"
+#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
+#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
+#define LIBC_SO "libc.so.6"
+#define LIBDL_SO "libdl.so.2"
+#define LIBGCC_S_SO "libgcc_s.so.1"
+#define LIBMVEC_SO "libmvec.so.1"
+#define LIBM_SO "libm.so.6"
+#define LIBNSL_SO "libnsl.so.1"
+#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
+#define LIBNSS_DB_SO "libnss_db.so.2"
+#define LIBNSS_DNS_SO "libnss_dns.so.2"
+#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_TEST1_SO "libnss_test1.so.2"
+#define LIBNSS_TEST2_SO "libnss_test2.so.2"
+#define LIBPTHREAD_SO "libpthread.so.0"
+#define LIBRESOLV_SO "libresolv.so.2"
+#define LIBRT_SO "librt.so.1"
+#define LIBTHREAD_DB_SO "libthread_db.so.1"
+#define LIBUTIL_SO "libutil.so.1" \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/gnu/lib-names.h b/lib/libc/include/powerpc-linux-gnueabihf/gnu/lib-names.h
new file mode 100644
index 0000000000..a6fbab8035
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/gnu/lib-names.h
@@ -0,0 +1,19 @@
+/* This file is automatically generated.
+ It defines macros to allow user program to find the shared
+ library files which come as part of GNU libc. */
+#ifndef __GNU_LIB_NAMES_H
+#define __GNU_LIB_NAMES_H 1
+
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+# include <gnu/lib-names-32.h>
+#endif
+#if __WORDSIZE == 64 && _CALL_ELF != 2
+# include <gnu/lib-names-64-v1.h>
+#endif
+#if __WORDSIZE == 64 && _CALL_ELF == 2
+# include <gnu/lib-names-64-v2.h>
+#endif
+
+#endif /* gnu/lib-names.h */ \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/gnu/stubs.h b/lib/libc/include/powerpc-linux-gnueabihf/gnu/stubs.h
new file mode 100644
index 0000000000..d130565a35
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/gnu/stubs.h
@@ -0,0 +1,15 @@
+/* This file is automatically generated.
+ This file selects the right generated file of `__stub_FUNCTION' macros
+ based on the architecture being compiled for. */
+
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+# include <gnu/stubs-32.h>
+#endif
+#if __WORDSIZE == 64 && _CALL_ELF != 2
+# include <gnu/stubs-64-v1.h>
+#endif
+#if __WORDSIZE == 64 && _CALL_ELF == 2
+# include <gnu/stubs-64-v2.h>
+#endif \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/ieee754.h b/lib/libc/include/powerpc-linux-gnueabihf/ieee754.h
new file mode 100644
index 0000000000..78bbb343c4
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/ieee754.h
@@ -0,0 +1,197 @@
+/* Copyright (C) 1992-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _IEEE754_H
+#define _IEEE754_H 1
+
+#include <features.h>
+
+#include <bits/endian.h>
+#include <bits/floatn.h>
+
+__BEGIN_DECLS
+
+union ieee754_float
+ {
+ float f;
+
+ /* This is the IEEE 754 single-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:8;
+ unsigned int mantissa:23;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ unsigned int mantissa:23;
+ unsigned int exponent:8;
+ 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:8;
+ unsigned int quiet_nan:1;
+ unsigned int mantissa:22;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ unsigned int mantissa:22;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:8;
+ unsigned int negative:1;
+#endif /* Little endian. */
+ } ieee_nan;
+ };
+
+#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
+
+
+union ieee754_double
+ {
+ double d;
+
+ /* This is the IEEE 754 double-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:11;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:20;
+ unsigned int mantissa1:32;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:20;
+ unsigned int exponent:11;
+ 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:11;
+ unsigned int quiet_nan:1;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:19;
+ unsigned int mantissa1:32;
+#else
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:19;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:11;
+ unsigned int negative:1;
+#endif
+ } ieee_nan;
+ };
+
+#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
+ long double is the sum of the values of the two parts. The most
+ significant part is required to be the value of the long double
+ rounded to the nearest double, as specified by IEEE. For Inf
+ values, the least significant part is required to be one of +0.0 or
+ -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
+ {
+# 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
+
+#endif /* ieee754.h */ \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/sys/ptrace.h b/lib/libc/include/powerpc-linux-gnueabihf/sys/ptrace.h
new file mode 100644
index 0000000000..a0134d5dfe
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/sys/ptrace.h
@@ -0,0 +1,272 @@
+/* `ptrace' debugger support interface. Linux/PowerPC version.
+ Copyright (C) 2001-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_PTRACE_H
+#define _SYS_PTRACE_H 1
+
+#include <features.h>
+#include <bits/types.h>
+
+__BEGIN_DECLS
+
+#if defined _LINUX_PTRACE_H || defined _ASM_POWERPC_PTRACE_H
+/* Do not let Linux headers macros interfere with enum __ptrace_request. */
+# undef PTRACE_ATTACH
+# undef PTRACE_CONT
+# undef PTRACE_DETACH
+# undef PTRACE_GET_DEBUGREG
+# undef PTRACE_GETEVENTMSG
+# undef PTRACE_GETEVRREGS
+# undef PTRACE_GETFPREGS
+# undef PTRACE_GETREGS
+# undef PTRACE_GETREGS64
+# undef PTRACE_GETREGSET
+# undef PTRACE_GETSIGINFO
+# undef PTRACE_GETSIGMASK
+# undef PTRACE_GET_SYSCALL_INFO
+# undef PTRACE_GETVRREGS
+# undef PTRACE_GETVSRREGS
+# undef PTRACE_INTERRUPT
+# undef PTRACE_KILL
+# undef PTRACE_LISTEN
+# undef PTRACE_PEEKDATA
+# undef PTRACE_PEEKSIGINFO
+# undef PTRACE_PEEKTEXT
+# undef PTRACE_POKEDATA
+# undef PTRACE_POKETEXT
+# undef PTRACE_SECCOMP_GET_FILTER
+# undef PTRACE_SECCOMP_GET_METADATA
+# undef PTRACE_SEIZE
+# undef PTRACE_SET_DEBUGREG
+# undef PTRACE_SETEVRREGS
+# undef PTRACE_SETFPREGS
+# undef PTRACE_SETOPTIONS
+# undef PTRACE_SETREGS
+# undef PTRACE_SETREGS64
+# undef PTRACE_SETREGSET
+# undef PTRACE_SETSIGINFO
+# undef PTRACE_SETSIGMASK
+# undef PTRACE_SETVRREGS
+# undef PTRACE_SETVSRREGS
+# undef PTRACE_SINGLEBLOCK
+# undef PTRACE_SINGLESTEP
+# undef PTRACE_SYSCALL
+# undef PTRACE_SYSCALL_INFO_NONE
+# undef PTRACE_SYSCALL_INFO_ENTRY
+# undef PTRACE_SYSCALL_INFO_EXIT
+# undef PTRACE_SYSCALL_INFO_SECCOMP
+# undef PTRACE_SYSEMU
+# undef PTRACE_SYSEMU_SINGLESTEP
+# undef PTRACE_TRACEME
+#endif
+
+/* Type of the REQUEST argument to `ptrace.' */
+enum __ptrace_request
+{
+ /* Indicate that the process making this request should be traced.
+ All signals received by this process can be intercepted by its
+ parent, and its parent can use the other `ptrace' requests. */
+ PTRACE_TRACEME = 0,
+#define PT_TRACE_ME PTRACE_TRACEME
+
+ /* Return the word in the process's text space at address ADDR. */
+ PTRACE_PEEKTEXT = 1,
+#define PT_READ_I PTRACE_PEEKTEXT
+
+ /* Return the word in the process's data space at address ADDR. */
+ PTRACE_PEEKDATA = 2,
+#define PT_READ_D PTRACE_PEEKDATA
+
+ /* Return the word in the process's user area at offset ADDR. */
+ PTRACE_PEEKUSER = 3,
+#define PT_READ_U PTRACE_PEEKUSER
+
+ /* Write the word DATA into the process's text space at address ADDR. */
+ PTRACE_POKETEXT = 4,
+#define PT_WRITE_I PTRACE_POKETEXT
+
+ /* Write the word DATA into the process's data space at address ADDR. */
+ PTRACE_POKEDATA = 5,
+#define PT_WRITE_D PTRACE_POKEDATA
+
+ /* Write the word DATA into the process's user area at offset ADDR. */
+ PTRACE_POKEUSER = 6,
+#define PT_WRITE_U PTRACE_POKEUSER
+
+ /* Continue the process. */
+ PTRACE_CONT = 7,
+#define PT_CONTINUE PTRACE_CONT
+
+ /* Kill the process. */
+ PTRACE_KILL = 8,
+#define PT_KILL PTRACE_KILL
+
+ /* Single step the process. */
+ PTRACE_SINGLESTEP = 9,
+#define PT_STEP PTRACE_SINGLESTEP
+
+ /* Get all general purpose registers used by a process. */
+ PTRACE_GETREGS = 12,
+#define PT_GETREGS PTRACE_GETREGS
+
+ /* Set all general purpose registers used by a process. */
+ PTRACE_SETREGS = 13,
+#define PT_SETREGS PTRACE_SETREGS
+
+ /* Get all floating point registers used by a process. */
+ PTRACE_GETFPREGS = 14,
+#define PT_GETFPREGS PTRACE_GETFPREGS
+
+ /* Set all floating point registers used by a process. */
+ PTRACE_SETFPREGS = 15,
+#define PT_SETFPREGS PTRACE_SETFPREGS
+
+ /* Attach to a process that is already running. */
+ PTRACE_ATTACH = 16,
+#define PT_ATTACH PTRACE_ATTACH
+
+ /* Detach from a process attached to with PTRACE_ATTACH. */
+ PTRACE_DETACH = 17,
+#define PT_DETACH PTRACE_DETACH
+
+ /* Get all altivec registers used by a process. */
+ PTRACE_GETVRREGS = 18,
+#define PT_GETVRREGS PTRACE_GETVRREGS
+
+ /* Set all altivec registers used by a process. */
+ PTRACE_SETVRREGS = 19,
+#define PT_SETVRREGS PTRACE_SETVRREGS
+
+ /* Get all SPE registers used by a process. */
+ PTRACE_GETEVRREGS = 20,
+#define PT_GETEVRREGS PTRACE_GETEVRREGS
+
+ /* Set all SPE registers used by a process. */
+ PTRACE_SETEVRREGS = 21,
+#define PT_SETEVRREGS PTRACE_SETEVRREGS
+
+ /* Same as PTRACE_GETREGS except a 32-bit process will obtain
+ the full 64-bit registers. Implemented by 64-bit kernels only. */
+ PTRACE_GETREGS64 = 22,
+#define PT_GETREGS64 PTRACE_GETREGS64
+
+ /* Same as PTRACE_SETREGS except a 32-bit process will set
+ the full 64-bit registers. Implemented by 64-bit kernels only. */
+ PTRACE_SETREGS64 = 23,
+#define PT_SETREGS64 PTRACE_SETREGS64
+
+ /* Continue and stop at the next entry to or return from syscall. */
+ PTRACE_SYSCALL = 24,
+#define PT_SYSCALL PTRACE_SYSCALL
+
+ /* Get a debug register of a process. */
+ PTRACE_GET_DEBUGREG = 25,
+#define PT_GET_DEBUGREG PTRACE_GET_DEBUGREG
+
+ /* Set a debug register of a process. */
+ PTRACE_SET_DEBUGREG = 26,
+#define PT_SET_DEBUGREG PTRACE_SET_DEBUGREG
+
+ /* Get the first 32 VSX registers of a process. */
+ PTRACE_GETVSRREGS = 27,
+#define PT_GETVSRREGS PTRACE_GETVSRREGS
+
+ /* Set the first 32 VSX registers of a process. */
+ PTRACE_SETVSRREGS = 28,
+#define PT_SETVSRREGS PTRACE_SETVSRREGS
+
+ /* Continue and stop at the next syscall, it will not be executed. */
+ PTRACE_SYSEMU = 29,
+#define PT_SYSEMU PTRACE_SYSEMU
+
+ /* Single step the process, the next syscall will not be executed. */
+ PTRACE_SYSEMU_SINGLESTEP = 30,
+#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
+
+ /* Execute process until next taken branch. */
+ PTRACE_SINGLEBLOCK = 256,
+#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
+
+ /* Set ptrace filter options. */
+ PTRACE_SETOPTIONS = 0x4200,
+#define PT_SETOPTIONS PTRACE_SETOPTIONS
+
+ /* Get last ptrace message. */
+ PTRACE_GETEVENTMSG = 0x4201,
+#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
+
+ /* Get siginfo for process. */
+ PTRACE_GETSIGINFO = 0x4202,
+#define PT_GETSIGINFO PTRACE_GETSIGINFO
+
+ /* Set new siginfo for process. */
+ PTRACE_SETSIGINFO = 0x4203,
+#define PT_SETSIGINFO PTRACE_SETSIGINFO
+
+ /* Get register content. */
+ PTRACE_GETREGSET = 0x4204,
+#define PTRACE_GETREGSET PTRACE_GETREGSET
+
+ /* Set register content. */
+ PTRACE_SETREGSET = 0x4205,
+#define PTRACE_SETREGSET PTRACE_SETREGSET
+
+ /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect
+ signal or group stop state. */
+ PTRACE_SEIZE = 0x4206,
+#define PTRACE_SEIZE PTRACE_SEIZE
+
+ /* Trap seized tracee. */
+ PTRACE_INTERRUPT = 0x4207,
+#define PTRACE_INTERRUPT PTRACE_INTERRUPT
+
+ /* Wait for next group event. */
+ PTRACE_LISTEN = 0x4208,
+#define PTRACE_LISTEN PTRACE_LISTEN
+
+ /* Retrieve siginfo_t structures without removing signals from a queue. */
+ PTRACE_PEEKSIGINFO = 0x4209,
+#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO
+
+ /* Get the mask of blocked signals. */
+ PTRACE_GETSIGMASK = 0x420a,
+#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK
+
+ /* Change the mask of blocked signals. */
+ PTRACE_SETSIGMASK = 0x420b,
+#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK
+
+ /* Get seccomp BPF filters. */
+ PTRACE_SECCOMP_GET_FILTER = 0x420c,
+#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER
+
+ /* Get seccomp BPF filter metadata. */
+ PTRACE_SECCOMP_GET_METADATA = 0x420d,
+#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA
+
+ /* Get information about system call. */
+ PTRACE_GET_SYSCALL_INFO = 0x420e
+#define PTRACE_GET_SYSCALL_INFO PTRACE_GET_SYSCALL_INFO
+};
+
+
+#include <bits/ptrace-shared.h>
+
+__END_DECLS
+
+#endif /* _SYS_PTRACE_H */ \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/sys/ucontext.h b/lib/libc/include/powerpc-linux-gnueabihf/sys/ucontext.h
new file mode 100644
index 0000000000..a48adedb95
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/sys/ucontext.h
@@ -0,0 +1,200 @@
+/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+
+#include <bits/types/sigset_t.h>
+#include <bits/types/stack_t.h>
+
+
+#ifdef __USE_MISC
+# define __ctx(fld) fld
+#else
+# define __ctx(fld) __ ## fld
+#endif
+
+struct __ctx(pt_regs);
+
+#if __WORDSIZE == 32
+
+/* Number of general registers. */
+# define __NGREG 48
+# ifdef __USE_MISC
+# define NGREG __NGREG
+# endif
+
+/* Container for all general registers. */
+typedef unsigned long gregset_t[__NGREG];
+
+/* Container for floating-point registers and status */
+typedef struct _libc_fpstate
+{
+ double __ctx(fpregs)[32];
+ double __ctx(fpscr);
+ unsigned int _pad[2];
+} fpregset_t;
+
+/* Container for Altivec/VMX registers and status.
+ Needs to be aligned on a 16-byte boundary. */
+typedef struct _libc_vrstate
+{
+ unsigned int __ctx(vrregs)[32][4];
+ unsigned int __ctx(vrsave);
+ unsigned int _pad[2];
+ unsigned int __ctx(vscr);
+} vrregset_t;
+
+/* Context to describe whole processor state. */
+typedef struct
+{
+ gregset_t __ctx(gregs);
+ fpregset_t __ctx(fpregs);
+ vrregset_t __ctx(vrregs) __attribute__((__aligned__(16)));
+} mcontext_t;
+
+#else
+
+/* For 64-bit kernels with Altivec support, a machine context is exactly
+ * a sigcontext. For older kernel (without Altivec) the sigcontext matches
+ * the mcontext upto but not including the v_regs field. For kernels that
+ * don't set AT_HWCAP or return AT_HWCAP without PPC_FEATURE_HAS_ALTIVEC the
+ * v_regs field may not exist and should not be referenced. The v_regs field
+ * can be referenced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC
+ * is set in AT_HWCAP. */
+
+/* Number of general registers. */
+# define __NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */
+# define __NFPREG 33 /* includes fp0-fp31 &fpscr. */
+# define __NVRREG 34 /* includes v0-v31, vscr, & vrsave in
+ split vectors */
+# ifdef __USE_MISC
+# define NGREG __NGREG
+# define NFPREG __NFPREG
+# define NVRREG __NVRREG
+# endif
+
+typedef unsigned long gregset_t[__NGREG];
+typedef double fpregset_t[__NFPREG];
+
+/* Container for Altivec/VMX Vector Status and Control Register. Only 32-bits
+ but can only be copied to/from a 128-bit vector register. So we allocated
+ a whole quadword speedup save/restore. */
+typedef struct _libc_vscr
+{
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ unsigned int __pad[3];
+ unsigned int __ctx(vscr_word);
+#else
+ unsigned int __ctx(vscr_word);
+ unsigned int __pad[3];
+#endif
+} vscr_t;
+
+/* Container for Altivec/VMX registers and status.
+ Must to be aligned on a 16-byte boundary. */
+typedef struct _libc_vrstate
+{
+ unsigned int __ctx(vrregs)[32][4];
+ vscr_t __ctx(vscr);
+ unsigned int __ctx(vrsave);
+ unsigned int __pad[3];
+} vrregset_t __attribute__((__aligned__(16)));
+
+typedef struct {
+ unsigned long __glibc_reserved[4];
+ int __ctx(signal);
+ int __pad0;
+ unsigned long __ctx(handler);
+ unsigned long __ctx(oldmask);
+ struct __ctx(pt_regs) *__ctx(regs);
+ gregset_t __ctx(gp_regs);
+ fpregset_t __ctx(fp_regs);
+/*
+ * To maintain compatibility with current implementations the sigcontext is
+ * extended by appending a pointer (v_regs) to a quadword type (elf_vrreg_t)
+ * followed by an unstructured (vmx_reserve) field of 69 doublewords. This
+ * allows the array of vector registers to be quadword aligned independent of
+ * the alignment of the containing sigcontext or ucontext. It is the
+ * responsibility of the code setting the sigcontext to set this pointer to
+ * either NULL (if this processor does not support the VMX feature) or the
+ * address of the first quadword within the allocated (vmx_reserve) area.
+ *
+ * The pointer (v_regs) of vector type (elf_vrreg_t) is essentially
+ * an array of 34 quadword entries. The entries with
+ * indexes 0-31 contain the corresponding vector registers. The entry with
+ * index 32 contains the vscr as the last word (offset 12) within the
+ * quadword. This allows the vscr to be stored as either a quadword (since
+ * it must be copied via a vector register to/from storage) or as a word.
+ * The entry with index 33 contains the vrsave as the first word (offset 0)
+ * within the quadword.
+ */
+ vrregset_t *__ctx(v_regs);
+ long __ctx(vmx_reserve)[__NVRREG+__NVRREG+1];
+} mcontext_t;
+
+#endif
+
+/* Userlevel context. */
+typedef struct ucontext_t
+ {
+ unsigned long int __ctx(uc_flags);
+ struct ucontext_t *uc_link;
+ stack_t uc_stack;
+#if __WORDSIZE == 32
+ /*
+ * These fields are set up this way to maximize source and
+ * binary compatibility with code written for the old
+ * ucontext_t definition, which didn't include space for the
+ * registers.
+ *
+ * Different versions of the kernel have stored the registers on
+ * signal delivery at different offsets from the ucontext struct.
+ * Programs should thus use the uc_mcontext.uc_regs pointer to
+ * find where the registers are actually stored. The registers
+ * will be stored within the ucontext_t struct but not necessarily
+ * at a fixed address. As a side-effect, this lets us achieve
+ * 16-byte alignment for the register storage space if the
+ * Altivec registers are to be saved, without requiring 16-byte
+ * alignment on the whole ucontext_t.
+ *
+ * The uc_mcontext.regs field is included for source compatibility
+ * with programs written against the older ucontext_t definition,
+ * and its name should therefore not change. The uc_pad field
+ * is for binary compatibility with programs compiled against the
+ * old ucontext_t; it ensures that uc_mcontext.regs and uc_sigmask
+ * are at the same offset as previously.
+ */
+ int __glibc_reserved1[7];
+ union __ctx(uc_regs_ptr) {
+ struct __ctx(pt_regs) *__ctx(regs);
+ mcontext_t *__ctx(uc_regs);
+ } uc_mcontext;
+ sigset_t uc_sigmask;
+ /* last for extensibility */
+ char __ctx(uc_reg_space)[sizeof (mcontext_t) + 12];
+#else /* 64-bit */
+ sigset_t uc_sigmask;
+ mcontext_t uc_mcontext; /* last for extensibility */
+#endif
+ } ucontext_t;
+
+#undef __ctx
+
+#endif /* sys/ucontext.h */ \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnueabihf/sys/user.h b/lib/libc/include/powerpc-linux-gnueabihf/sys/user.h
new file mode 100644
index 0000000000..c18c39983b
--- /dev/null
+++ b/lib/libc/include/powerpc-linux-gnueabihf/sys/user.h
@@ -0,0 +1,40 @@
+/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_USER_H
+
+#define _SYS_USER_H 1
+#include <stddef.h>
+#include <features.h>
+
+#include <asm/ptrace.h>
+
+struct user {
+ struct pt_regs regs; /* entire machine state */
+ size_t u_tsize; /* text size (pages) */
+ size_t u_dsize; /* data size (pages) */
+ size_t u_ssize; /* stack size (pages) */
+ unsigned long start_code; /* text starting address */
+ unsigned long start_data; /* data starting address */
+ unsigned long start_stack; /* stack starting address */
+ long int signal; /* signal causing core dump */
+ struct regs * u_ar0; /* help gdb find registers */
+ unsigned long magic; /* identifies a core file */
+ char u_comm[32]; /* user command name */
+};
+
+#endif /* sys/user.h */ \ No newline at end of file
diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/local_lim.h b/lib/libc/include/powerpc64-linux-gnu/bits/local_lim.h
deleted file mode 100644
index 5416e4d6cf..0000000000
--- a/lib/libc/include/powerpc64-linux-gnu/bits/local_lim.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux/PPC version.
- Copyright (C) 1993-2021 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; see the file COPYING.LIB. If
- not, see <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages for systems with 64k
- pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647) \ No newline at end of file
diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/pthread_stack_min.h b/lib/libc/include/powerpc64-linux-gnu/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..c8caed37b2
--- /dev/null
+++ b/lib/libc/include/powerpc64-linux-gnu/bits/pthread_stack_min.h
@@ -0,0 +1,21 @@
+/* Definition of PTHREAD_STACK_MIN. Linux/PPC version.
+ Copyright (C) 2021 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; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages for systems with 64k
+ pages. */
+#define PTHREAD_STACK_MIN 131072 \ No newline at end of file
diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h b/lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h
index 64f96f535c..a6223eff27 100644
--- a/lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h
+++ b/lib/libc/include/powerpc64-linux-gnu/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 10
#define SO_RCVBUF 8
#define SO_RCVLOWAT 16
-#define SO_RCVTIMEO 18
#define SO_REUSEADDR 2
#define SO_SNDBUF 7
#define SO_SNDLOWAT 17
-#define SO_SNDTIMEO 19
-#define SO_TYPE 3 \ No newline at end of file
+#define SO_TYPE 3
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 18
+# define SO_SNDTIMEO 19
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 18
+# define SO_SNDTIMEO_OLD 19
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif \ No newline at end of file
diff --git a/lib/libc/include/powerpc64-linux-gnu/bits/struct_stat.h b/lib/libc/include/powerpc64-linux-gnu/bits/struct_stat.h
index 805594defd..3faed3a29b 100644
--- a/lib/libc/include/powerpc64-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/powerpc64-linux-gnu/bits/struct_stat.h
@@ -26,35 +26,37 @@
#include <bits/wordsize.h>
#if __WORDSIZE == 32
-
struct stat
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
unsigned short int __pad1;
__ino_t st_ino; /* File serial number. */
-# else
+# else
__ino64_t st_ino; /* File serial number. */
-# endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-# else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-# endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-# else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# endif
-# ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -64,25 +66,28 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-# else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
+# endif /* __USE_TIME_BITS64 */
};
-
# ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
__ino64_t st_ino; /* File serial number. */
__mode_t st_mode; /* File mode. */
@@ -94,7 +99,7 @@ struct stat64
__off64_t st_size; /* Size of file, in bytes. */
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -104,19 +109,20 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-# else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
+# endif /* __USE_TIME_BITS64 */
};
# endif /* __USE_LARGEFILE64 */
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
index 65856a4231..52cc930886 100644
--- 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
@@ -20,23 +20,28 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
+# 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
+# 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
+# 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 */
@@ -44,4 +49,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
}; \ 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
index df168a5b57..d70967d6e0 100644
--- 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
@@ -23,17 +23,21 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# 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
+# else
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
-#endif
+# endif
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
}; \ 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
index 82e25d77a9..6a47b1c39f 100644
--- 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
@@ -23,8 +23,11 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned long int __shm_atime_high;
__time_t shm_atime; /* time of last shmat() */
unsigned long int __shm_dtime_high;
@@ -32,15 +35,16 @@ struct shmid_ds
unsigned long int __shm_ctime_high;
__time_t shm_ctime; /* time of last change by shmctl() */
unsigned long int __glibc_reserved4;
-#else
+# 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
+# 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;
+#endif
}; \ 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 22c0732548..d6398763ed 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
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
diff --git a/lib/libc/include/powerpc64-linux-gnu/sys/ptrace.h b/lib/libc/include/powerpc64-linux-gnu/sys/ptrace.h
index 5c5d5addee..a0134d5dfe 100644
--- a/lib/libc/include/powerpc64-linux-gnu/sys/ptrace.h
+++ b/lib/libc/include/powerpc64-linux-gnu/sys/ptrace.h
@@ -70,6 +70,8 @@ __BEGIN_DECLS
# undef PTRACE_SYSCALL_INFO_ENTRY
# undef PTRACE_SYSCALL_INFO_EXIT
# undef PTRACE_SYSCALL_INFO_SECCOMP
+# undef PTRACE_SYSEMU
+# undef PTRACE_SYSEMU_SINGLESTEP
# undef PTRACE_TRACEME
#endif
@@ -188,6 +190,14 @@ enum __ptrace_request
PTRACE_SETVSRREGS = 28,
#define PT_SETVSRREGS PTRACE_SETVSRREGS
+ /* Continue and stop at the next syscall, it will not be executed. */
+ PTRACE_SYSEMU = 29,
+#define PT_SYSEMU PTRACE_SYSEMU
+
+ /* Single step the process, the next syscall will not be executed. */
+ PTRACE_SYSEMU_SINGLESTEP = 30,
+#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
+
/* Execute process until next taken branch. */
PTRACE_SINGLEBLOCK = 256,
#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/local_lim.h b/lib/libc/include/powerpc64le-linux-gnu/bits/local_lim.h
deleted file mode 100644
index 5416e4d6cf..0000000000
--- a/lib/libc/include/powerpc64le-linux-gnu/bits/local_lim.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux/PPC version.
- Copyright (C) 1993-2021 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; see the file COPYING.LIB. If
- not, see <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. At least two pages for systems with 64k
- pages. */
-#define PTHREAD_STACK_MIN 131072
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647) \ No newline at end of file
diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/pthread_stack_min.h b/lib/libc/include/powerpc64le-linux-gnu/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..c8caed37b2
--- /dev/null
+++ b/lib/libc/include/powerpc64le-linux-gnu/bits/pthread_stack_min.h
@@ -0,0 +1,21 @@
+/* Definition of PTHREAD_STACK_MIN. Linux/PPC version.
+ Copyright (C) 2021 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; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. At least two pages for systems with 64k
+ pages. */
+#define PTHREAD_STACK_MIN 131072 \ No newline at end of file
diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/socket-constants.h b/lib/libc/include/powerpc64le-linux-gnu/bits/socket-constants.h
index 64f96f535c..a6223eff27 100644
--- a/lib/libc/include/powerpc64le-linux-gnu/bits/socket-constants.h
+++ b/lib/libc/include/powerpc64le-linux-gnu/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 10
#define SO_RCVBUF 8
#define SO_RCVLOWAT 16
-#define SO_RCVTIMEO 18
#define SO_REUSEADDR 2
#define SO_SNDBUF 7
#define SO_SNDLOWAT 17
-#define SO_SNDTIMEO 19
-#define SO_TYPE 3 \ No newline at end of file
+#define SO_TYPE 3
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 18
+# define SO_SNDTIMEO 19
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 35
+# define SO_TIMESTAMPING 37
+#else
+# define SO_RCVTIMEO_OLD 18
+# define SO_SNDTIMEO_OLD 19
+# define SO_RCVTIMEO_NEW 66
+# define SO_SNDTIMEO_NEW 67
+
+# define SO_TIMESTAMP_OLD 29
+# define SO_TIMESTAMPNS_OLD 35
+# define SO_TIMESTAMPING_OLD 37
+# define SO_TIMESTAMP_NEW 63
+# define SO_TIMESTAMPNS_NEW 64
+# define SO_TIMESTAMPING_NEW 65
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif \ No newline at end of file
diff --git a/lib/libc/include/powerpc64le-linux-gnu/bits/struct_stat.h b/lib/libc/include/powerpc64le-linux-gnu/bits/struct_stat.h
index 805594defd..3faed3a29b 100644
--- a/lib/libc/include/powerpc64le-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/powerpc64le-linux-gnu/bits/struct_stat.h
@@ -26,35 +26,37 @@
#include <bits/wordsize.h>
#if __WORDSIZE == 32
-
struct stat
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
unsigned short int __pad1;
__ino_t st_ino; /* File serial number. */
-# else
+# else
__ino64_t st_ino; /* File serial number. */
-# endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned short int __pad2;
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-# else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-# endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-# else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# endif
-# ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -64,25 +66,28 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-# else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
+# endif /* __USE_TIME_BITS64 */
};
-
# ifdef __USE_LARGEFILE64
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
__ino64_t st_ino; /* File serial number. */
__mode_t st_mode; /* File mode. */
@@ -94,7 +99,7 @@ struct stat64
__off64_t st_size; /* Size of file, in bytes. */
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -104,19 +109,20 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-# else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
+# endif /* __USE_TIME_BITS64 */
};
# endif /* __USE_LARGEFILE64 */
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
index 65856a4231..52cc930886 100644
--- 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
@@ -20,23 +20,28 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
+# 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
+# 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
+# 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 */
@@ -44,4 +49,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
}; \ 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
index df168a5b57..d70967d6e0 100644
--- 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
@@ -23,17 +23,21 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# 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
+# else
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
-#endif
+# endif
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
}; \ 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
index 82e25d77a9..6a47b1c39f 100644
--- 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
@@ -23,8 +23,11 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# if __TIMESIZE == 32
unsigned long int __shm_atime_high;
__time_t shm_atime; /* time of last shmat() */
unsigned long int __shm_dtime_high;
@@ -32,15 +35,16 @@ struct shmid_ds
unsigned long int __shm_ctime_high;
__time_t shm_ctime; /* time of last change by shmctl() */
unsigned long int __glibc_reserved4;
-#else
+# 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
+# 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;
+#endif
}; \ 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 b8e68b6c89..bcfc823b19 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
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
diff --git a/lib/libc/include/powerpc64le-linux-gnu/sys/ptrace.h b/lib/libc/include/powerpc64le-linux-gnu/sys/ptrace.h
index 5c5d5addee..a0134d5dfe 100644
--- a/lib/libc/include/powerpc64le-linux-gnu/sys/ptrace.h
+++ b/lib/libc/include/powerpc64le-linux-gnu/sys/ptrace.h
@@ -70,6 +70,8 @@ __BEGIN_DECLS
# undef PTRACE_SYSCALL_INFO_ENTRY
# undef PTRACE_SYSCALL_INFO_EXIT
# undef PTRACE_SYSCALL_INFO_SECCOMP
+# undef PTRACE_SYSEMU
+# undef PTRACE_SYSEMU_SINGLESTEP
# undef PTRACE_TRACEME
#endif
@@ -188,6 +190,14 @@ enum __ptrace_request
PTRACE_SETVSRREGS = 28,
#define PT_SETVSRREGS PTRACE_SETVSRREGS
+ /* Continue and stop at the next syscall, it will not be executed. */
+ PTRACE_SYSEMU = 29,
+#define PT_SYSEMU PTRACE_SYSEMU
+
+ /* Single step the process, the next syscall will not be executed. */
+ PTRACE_SYSEMU_SINGLESTEP = 30,
+#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
+
/* Execute process until next taken branch. */
PTRACE_SINGLEBLOCK = 256,
#define PT_STEPBLOCK PTRACE_SINGLEBLOCK
diff --git a/lib/libc/include/riscv64-linux-gnu/bits/statfs.h b/lib/libc/include/riscv64-linux-gnu/bits/statfs.h
deleted file mode 100644
index 94a6e610fb..0000000000
--- a/lib/libc/include/riscv64-linux-gnu/bits/statfs.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Copyright (C) 2011-2021 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Chris Metcalf <cmetcalf@tilera.com>, 2011.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library. If not, see
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_STATFS_H
-# error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
-#endif
-
-#include <bits/endian.h>
-#include <bits/types.h>
-#include <bits/wordsize.h>
-
-/* 64-bit libc uses the kernel's 'struct statfs', accessed via the
- statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64'
- and accesses it via the statfs64() syscall. All the various
- APIs offered by libc use the kernel shape for their struct statfs
- structure; the only difference is that 32-bit programs not
- using __USE_FILE_OFFSET64 only see the low 32 bits of some
- of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */
-
-#if defined __USE_FILE_OFFSET64
-# define __field64(type, type64, name) type64 name
-#elif __WORDSIZE == 64 || __STATFS_MATCHES_STATFS64
-# define __field64(type, type64, name) type name
-#elif __BYTE_ORDER == __LITTLE_ENDIAN
-# define __field64(type, type64, name) \
- type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
-#else
-# define __field64(type, type64, name) \
- int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
-#endif
-
-struct statfs
- {
- __SWORD_TYPE f_type;
- __SWORD_TYPE f_bsize;
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks);
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree);
- __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail);
- __field64(__fsfilcnt_t, __fsfilcnt64_t, f_files);
- __field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree);
- __fsid_t f_fsid;
- __SWORD_TYPE f_namelen;
- __SWORD_TYPE f_frsize;
- __SWORD_TYPE f_flags;
- __SWORD_TYPE f_spare[4];
- };
-
-#undef __field64
-
-#ifdef __USE_LARGEFILE64
-struct statfs64
- {
- __SWORD_TYPE f_type;
- __SWORD_TYPE f_bsize;
- __fsblkcnt64_t f_blocks;
- __fsblkcnt64_t f_bfree;
- __fsblkcnt64_t f_bavail;
- __fsfilcnt64_t f_files;
- __fsfilcnt64_t f_ffree;
- __fsid_t f_fsid;
- __SWORD_TYPE f_namelen;
- __SWORD_TYPE f_frsize;
- __SWORD_TYPE f_flags;
- __SWORD_TYPE f_spare[4];
- };
-#endif
-
-/* Tell code we have these members. */
-#define _STATFS_F_NAMELEN
-#define _STATFS_F_FRSIZE
-#define _STATFS_F_FLAGS \ No newline at end of file
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 c157deb8cf..e8d3a8e796 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
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
diff --git a/lib/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64d.h b/lib/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64d.h
new file mode 100644
index 0000000000..88de20ca0a
--- /dev/null
+++ b/lib/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64d.h
@@ -0,0 +1,30 @@
+/* This file is automatically generated. */
+#ifndef __GNU_LIB_NAMES_H
+# error "Never use <gnu/lib-names-lp64d.h> directly; include <gnu/lib-names.h> instead."
+#endif
+
+#define LD_LINUX_RISCV64_LP64D_SO "ld-linux-riscv64-lp64d.so.1"
+#define LD_SO "ld-linux-riscv64-lp64d.so.1"
+#define LIBANL_SO "libanl.so.1"
+#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
+#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
+#define LIBC_SO "libc.so.6"
+#define LIBDL_SO "libdl.so.2"
+#define LIBGCC_S_SO "libgcc_s.so.1"
+#define LIBMVEC_SO "libmvec.so.1"
+#define LIBM_SO "libm.so.6"
+#define LIBNSL_SO "libnsl.so.1"
+#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
+#define LIBNSS_DB_SO "libnss_db.so.2"
+#define LIBNSS_DNS_SO "libnss_dns.so.2"
+#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_TEST1_SO "libnss_test1.so.2"
+#define LIBNSS_TEST2_SO "libnss_test2.so.2"
+#define LIBPTHREAD_SO "libpthread.so.0"
+#define LIBRESOLV_SO "libresolv.so.2"
+#define LIBRT_SO "librt.so.1"
+#define LIBTHREAD_DB_SO "libthread_db.so.1"
+#define LIBUTIL_SO "libutil.so.1"
diff --git a/lib/libc/include/riscv64-linux-gnu/gnu/stubs-lp64d.h b/lib/libc/include/riscv64-linux-gnu/gnu/stubs-lp64d.h
new file mode 100644
index 0000000000..4d4c0d146a
--- /dev/null
+++ b/lib/libc/include/riscv64-linux-gnu/gnu/stubs-lp64d.h
@@ -0,0 +1,24 @@
+/* This file is automatically generated.
+ It defines a symbol `__stub_FUNCTION' for each function
+ in the C library which is a stub, meaning it will fail
+ every time called, usually setting errno to ENOSYS. */
+
+#ifdef _LIBC
+ #error Applications may not define the macro _LIBC
+#endif
+
+#define __stub___compat_bdflush
+#define __stub___compat_create_module
+#define __stub___compat_get_kernel_syms
+#define __stub___compat_query_module
+#define __stub___compat_uselib
+#define __stub_chflags
+#define __stub_fchflags
+#define __stub_fedisableexcept
+#define __stub_feenableexcept
+#define __stub_fegetexcept
+#define __stub_gtty
+#define __stub_revoke
+#define __stub_setlogin
+#define __stub_sigreturn
+#define __stub_stty
diff --git a/lib/libc/include/s390x-linux-gnu/bits/hwcap.h b/lib/libc/include/s390x-linux-gnu/bits/hwcap.h
index 5031d2e6a7..a60cd60094 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/hwcap.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/hwcap.h
@@ -45,4 +45,6 @@
#define HWCAP_S390_VXRS_EXT2 32768
#define HWCAP_S390_VXRS_PDE 65536
#define HWCAP_S390_SORT 131072
-#define HWCAP_S390_DFLT 262144 \ No newline at end of file
+#define HWCAP_S390_DFLT 262144
+#define HWCAP_S390_VXRS_PDE2 524288
+#define HWCAP_S390_NNPA 1048576 \ No newline at end of file
diff --git a/lib/libc/include/s390x-linux-gnu/bits/struct_stat.h b/lib/libc/include/s390x-linux-gnu/bits/struct_stat.h
index 47bee1f317..c925f4cc77 100644
--- a/lib/libc/include/s390x-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/s390x-linux-gnu/bits/struct_stat.h
@@ -65,32 +65,35 @@ struct stat
#else
struct stat
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
unsigned int __pad1;
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-# else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-# endif
+# endif
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
__dev_t st_rdev; /* Device number, if device. */
unsigned int __pad2;
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-# else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-# endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-# else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# endif
-# ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -100,25 +103,26 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-# else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
-# ifndef __USE_FILE_OFFSET64
+# endif
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-# else
+# else
__ino64_t st_ino; /* File serial number. */
+# endif
# endif
};
-#endif
+# endif
#ifdef __USE_LARGEFILE64
# if __WORDSIZE == 64
@@ -162,6 +166,9 @@ struct stat64
# else
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
unsigned int __pad1;
@@ -176,7 +183,7 @@ struct stat64
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -186,18 +193,19 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-# else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
-# endif
+# endif
__ino64_t st_ino; /* File serial number. */
+# endif
};
# endif
#endif
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 1f26b2ab53..d232144282 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
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
diff --git a/lib/libc/include/s390x-linux-gnu/sys/ptrace.h b/lib/libc/include/s390x-linux-gnu/sys/ptrace.h
index fc62cf8756..5c793731c2 100644
--- a/lib/libc/include/s390x-linux-gnu/sys/ptrace.h
+++ b/lib/libc/include/s390x-linux-gnu/sys/ptrace.h
@@ -39,6 +39,8 @@ __BEGIN_DECLS
# undef PTRACE_ATTACH
# undef PTRACE_DETACH
# undef PTRACE_SYSCALL
+# undef PTRACE_SYSEMU
+# undef PTRACE_SYSEMU_SINGLESTEP
# undef PTRACE_SETOPTIONS
# undef PTRACE_GETEVENTMSG
# undef PTRACE_GETSIGINFO
@@ -146,6 +148,14 @@ enum __ptrace_request
PTRACE_SYSCALL = 24,
#define PT_SYSCALL PTRACE_SYSCALL
+ /* Continue and stop at the next syscall, it will not be executed. */
+ PTRACE_SYSEMU = 31,
+#define PT_SYSEMU PTRACE_SYSEMU
+
+ /* Single step the process, the next syscall will not be executed. */
+ PTRACE_SYSEMU_SINGLESTEP = 32,
+#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
+
/* Set ptrace filter options. */
PTRACE_SETOPTIONS = 0x4200,
#define PT_SETOPTIONS PTRACE_SETOPTIONS
diff --git a/lib/libc/include/sparc-linux-gnu/bits/local_lim.h b/lib/libc/include/sparc-linux-gnu/bits/local_lim.h
deleted file mode 100644
index 0a1bc361e6..0000000000
--- a/lib/libc/include/sparc-linux-gnu/bits/local_lim.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux/SPARC version.
- Copyright (C) 1993-2021 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 Library General Public License as
- published by the Free Software Foundation; either version 2 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, see <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. We are free to choose a reasonable value. */
-#define PTHREAD_STACK_MIN 24576
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647) \ No newline at end of file
diff --git a/lib/libc/include/sparc-linux-gnu/bits/pthread_stack_min.h b/lib/libc/include/sparc-linux-gnu/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..220f9fcec3
--- /dev/null
+++ b/lib/libc/include/sparc-linux-gnu/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. Linux/SPARC version.
+ Copyright (C) 2021 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. We are free to choose a reasonable value. */
+#define PTHREAD_STACK_MIN 24576 \ No newline at end of file
diff --git a/lib/libc/include/sparc-linux-gnu/bits/socket-constants.h b/lib/libc/include/sparc-linux-gnu/bits/socket-constants.h
index 6d45cf834d..177bd23494 100644
--- a/lib/libc/include/sparc-linux-gnu/bits/socket-constants.h
+++ b/lib/libc/include/sparc-linux-gnu/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 256
#define SO_RCVBUF 4098
#define SO_RCVLOWAT 2048
-#define SO_RCVTIMEO 8192
#define SO_REUSEADDR 4
#define SO_SNDBUF 4097
#define SO_SNDLOWAT 4096
-#define SO_SNDTIMEO 16384
-#define SO_TYPE 4104 \ No newline at end of file
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 8192
+# define SO_SNDTIMEO 16384
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 33
+# define SO_TIMESTAMPING 35
+#else
+# define SO_RCVTIMEO_OLD 8192
+# define SO_SNDTIMEO_OLD 16384
+# define SO_RCVTIMEO_NEW 68
+# define SO_SNDTIMEO_NEW 69
+
+# define SO_TIMESTAMP_OLD 0x001d
+# define SO_TIMESTAMPNS_OLD 0x0021
+# define SO_TIMESTAMPING_OLD 0x0023
+# define SO_TIMESTAMP_NEW 0x0046
+# define SO_TIMESTAMPNS_NEW 0x0042
+# define SO_TIMESTAMPING_NEW 0x0043
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif \ 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
index 50be147d4c..d56c69e62f 100644
--- 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
@@ -20,23 +20,28 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
+# 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
+# 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
+# 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 */
@@ -44,4 +49,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
}; \ 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
index 0de6f97086..1eebddfb15 100644
--- 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
@@ -23,17 +23,21 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# 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
+# else
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
-#endif
+# endif
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
}; \ 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
index 742891265a..25d101b362 100644
--- 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
@@ -23,23 +23,27 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# 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
+# 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
+# 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;
+#endif
}; \ No newline at end of file
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 0f86fee604..c76c33569f 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
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/local_lim.h b/lib/libc/include/sparcv9-linux-gnu/bits/local_lim.h
deleted file mode 100644
index 0a1bc361e6..0000000000
--- a/lib/libc/include/sparcv9-linux-gnu/bits/local_lim.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Minimum guaranteed maximum values for system limits. Linux/SPARC version.
- Copyright (C) 1993-2021 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 Library General Public License as
- published by the Free Software Foundation; either version 2 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, see <https://www.gnu.org/licenses/>. */
-
-/* The kernel header pollutes the namespace with the NR_OPEN symbol
- and defines LINK_MAX although filesystems have different maxima. A
- similar thing is true for OPEN_MAX: the limit can be changed at
- runtime and therefore the macro must not be defined. Remove this
- after including the header if necessary. */
-#ifndef NR_OPEN
-# define __undef_NR_OPEN
-#endif
-#ifndef LINK_MAX
-# define __undef_LINK_MAX
-#endif
-#ifndef OPEN_MAX
-# define __undef_OPEN_MAX
-#endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
-
-/* The kernel sources contain a file with all the needed information. */
-#include <linux/limits.h>
-
-/* Have to remove NR_OPEN? */
-#ifdef __undef_NR_OPEN
-# undef NR_OPEN
-# undef __undef_NR_OPEN
-#endif
-/* Have to remove LINK_MAX? */
-#ifdef __undef_LINK_MAX
-# undef LINK_MAX
-# undef __undef_LINK_MAX
-#endif
-/* Have to remove OPEN_MAX? */
-#ifdef __undef_OPEN_MAX
-# undef OPEN_MAX
-# undef __undef_OPEN_MAX
-#endif
-/* Have to remove ARG_MAX? */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
-
-/* The number of data keys per process. */
-#define _POSIX_THREAD_KEYS_MAX 128
-/* This is the value this implementation supports. */
-#define PTHREAD_KEYS_MAX 1024
-
-/* Controlling the iterations of destructors for thread-specific data. */
-#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
-/* Number of iterations this implementation does. */
-#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
-
-/* The number of threads per process. */
-#define _POSIX_THREAD_THREADS_MAX 64
-/* We have no predefined limit on the number of threads. */
-#undef PTHREAD_THREADS_MAX
-
-/* Maximum amount by which a process can descrease its asynchronous I/O
- priority level. */
-#define AIO_PRIO_DELTA_MAX 20
-
-/* Minimum size for a thread. We are free to choose a reasonable value. */
-#define PTHREAD_STACK_MIN 24576
-
-/* Maximum number of timer expiration overruns. */
-#define DELAYTIMER_MAX 2147483647
-
-/* Maximum tty name length. */
-#define TTY_NAME_MAX 32
-
-/* Maximum login name length. This is arbitrary. */
-#define LOGIN_NAME_MAX 256
-
-/* Maximum host name length. */
-#define HOST_NAME_MAX 64
-
-/* Maximum message queue priority level. */
-#define MQ_PRIO_MAX 32768
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX (2147483647) \ No newline at end of file
diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/pthread_stack_min.h b/lib/libc/include/sparcv9-linux-gnu/bits/pthread_stack_min.h
new file mode 100644
index 0000000000..220f9fcec3
--- /dev/null
+++ b/lib/libc/include/sparcv9-linux-gnu/bits/pthread_stack_min.h
@@ -0,0 +1,20 @@
+/* Definition of PTHREAD_STACK_MIN. Linux/SPARC version.
+ Copyright (C) 2021 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 Library General Public License as
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If
+ not, see <https://www.gnu.org/licenses/>. */
+
+/* Minimum size for a thread. We are free to choose a reasonable value. */
+#define PTHREAD_STACK_MIN 24576 \ No newline at end of file
diff --git a/lib/libc/include/sparcv9-linux-gnu/bits/socket-constants.h b/lib/libc/include/sparcv9-linux-gnu/bits/socket-constants.h
index 6d45cf834d..177bd23494 100644
--- a/lib/libc/include/sparcv9-linux-gnu/bits/socket-constants.h
+++ b/lib/libc/include/sparcv9-linux-gnu/bits/socket-constants.h
@@ -30,9 +30,41 @@
#define SO_OOBINLINE 256
#define SO_RCVBUF 4098
#define SO_RCVLOWAT 2048
-#define SO_RCVTIMEO 8192
#define SO_REUSEADDR 4
#define SO_SNDBUF 4097
#define SO_SNDLOWAT 4096
-#define SO_SNDTIMEO 16384
-#define SO_TYPE 4104 \ No newline at end of file
+#define SO_TYPE 4104
+
+#if __TIMESIZE == 64
+# define SO_RCVTIMEO 8192
+# define SO_SNDTIMEO 16384
+# define SO_TIMESTAMP 29
+# define SO_TIMESTAMPNS 33
+# define SO_TIMESTAMPING 35
+#else
+# define SO_RCVTIMEO_OLD 8192
+# define SO_SNDTIMEO_OLD 16384
+# define SO_RCVTIMEO_NEW 68
+# define SO_SNDTIMEO_NEW 69
+
+# define SO_TIMESTAMP_OLD 0x001d
+# define SO_TIMESTAMPNS_OLD 0x0021
+# define SO_TIMESTAMPING_OLD 0x0023
+# define SO_TIMESTAMP_NEW 0x0046
+# define SO_TIMESTAMPNS_NEW 0x0042
+# define SO_TIMESTAMPING_NEW 0x0043
+
+# ifdef __USE_TIME_BITS64
+# define SO_RCVTIMEO SO_RCVTIMEO_NEW
+# define SO_SNDTIMEO SO_SNDTIMEO_NEW
+# define SO_TIMESTAMP SO_TIMESTAMP_NEW
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_NEW
+# define SO_TIMESTAMPING SO_TIMESTAMPING_NEW
+# else
+# define SO_RCVTIMEO SO_RCVTIMEO_OLD
+# define SO_SNDTIMEO SO_SNDTIMEO_OLD
+# define SO_TIMESTAMP SO_TIMESTAMP_OLD
+# define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD
+# define SO_TIMESTAMPING SO_TIMESTAMPING_OLD
+# endif
+#endif \ 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
index 50be147d4c..d56c69e62f 100644
--- 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
@@ -20,23 +20,28 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
struct msqid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_msqid64_ds_helper.h>
+#else
struct ipc_perm msg_perm; /* structure describing operation permission */
-#if __TIMESIZE == 32
+# 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
+# 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
+# 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 */
@@ -44,4 +49,5 @@ struct msqid_ds
__pid_t msg_lrpid; /* pid of last msgrcv() */
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
+#endif
}; \ 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
index 0de6f97086..1eebddfb15 100644
--- 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
@@ -23,17 +23,21 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# 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
+# else
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
-#endif
+# endif
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
}; \ 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
index 742891265a..25d101b362 100644
--- 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
@@ -23,23 +23,27 @@
/* Data structure describing a shared memory segment. */
struct shmid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_shmid64_ds_helper.h>
+#else
struct ipc_perm shm_perm; /* operation permission struct */
-#if __TIMESIZE == 32
+# 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
+# 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
+# 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;
+#endif
}; \ No newline at end of file
diff --git a/lib/libc/include/x86_64-linux-gnu/bits/struct_stat.h b/lib/libc/include/x86_64-linux-gnu/bits/struct_stat.h
index 4a34470345..b3674c73c4 100644
--- a/lib/libc/include/x86_64-linux-gnu/bits/struct_stat.h
+++ b/lib/libc/include/x86_64-linux-gnu/bits/struct_stat.h
@@ -25,43 +25,46 @@
struct stat
{
+#ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+#else
__dev_t st_dev; /* Device. */
-#ifndef __x86_64__
+# ifndef __x86_64__
unsigned short int __pad1;
-#endif
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# endif
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-#endif
-#ifndef __x86_64__
+# endif
+# ifndef __x86_64__
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
-#else
+# else
__nlink_t st_nlink; /* Link count. */
__mode_t st_mode; /* File mode. */
-#endif
+# endif
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
-#ifdef __x86_64__
+# ifdef __x86_64__
int __pad0;
-#endif
+# endif
__dev_t st_rdev; /* Device number, if device. */
-#ifndef __x86_64__
+# ifndef __x86_64__
unsigned short int __pad2;
-#endif
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# endif
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -71,58 +74,62 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
__syscall_ulong_t st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
__syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
__syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
-#endif
-#ifdef __x86_64__
+# endif
+# ifdef __x86_64__
__syscall_slong_t __glibc_reserved[3];
-#else
-# ifndef __USE_FILE_OFFSET64
+# else
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-# else
+# else
__ino64_t st_ino; /* File serial number. */
+# endif
# endif
-#endif
+#endif /* __USE_TIME_BITS64 */
};
#ifdef __USE_LARGEFILE64
/* Note stat64 has the same shape as stat for x86-64. */
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
-# ifdef __x86_64__
+# ifdef __x86_64__
__ino64_t st_ino; /* File serial number. */
__nlink_t st_nlink; /* Link count. */
__mode_t st_mode; /* File mode. */
-# else
+# else
unsigned int __pad1;
__ino_t __st_ino; /* 32bit file serial number. */
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
-# endif
+# endif
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
-# ifdef __x86_64__
+# ifdef __x86_64__
int __pad0;
__dev_t st_rdev; /* Device number, if device. */
__off_t st_size; /* Size of file, in bytes. */
-# else
+# else
__dev_t st_rdev; /* Device number, if device. */
unsigned int __pad2;
__off64_t st_size; /* Size of file, in bytes. */
-# endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -132,19 +139,20 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
__syscall_ulong_t st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
__syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
__syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
-# endif
-# ifdef __x86_64__
+# endif
+# ifdef __x86_64__
__syscall_slong_t __glibc_reserved[3];
-# else
+# else
__ino64_t st_ino; /* File serial number. */
-# endif
+# endif
+# endif /* __USE_TIME_BITS64 */
};
#endif
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
index 76ea9f63dc..6713836d1e 100644
--- 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
@@ -23,6 +23,9 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
__time_t sem_otime; /* last semop() time */
__syscall_ulong_t __sem_otime_high;
@@ -31,4 +34,5 @@ struct semid_ds
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
}; \ No newline at end of file
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 03d0df5edf..5c25d27fe6 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
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"
diff --git a/lib/libc/include/x86_64-linux-gnux32/bits/struct_stat.h b/lib/libc/include/x86_64-linux-gnux32/bits/struct_stat.h
index 4a34470345..b3674c73c4 100644
--- a/lib/libc/include/x86_64-linux-gnux32/bits/struct_stat.h
+++ b/lib/libc/include/x86_64-linux-gnux32/bits/struct_stat.h
@@ -25,43 +25,46 @@
struct stat
{
+#ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+#else
__dev_t st_dev; /* Device. */
-#ifndef __x86_64__
+# ifndef __x86_64__
unsigned short int __pad1;
-#endif
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# endif
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__ino_t st_ino; /* File serial number. */
-#else
+# else
__ino_t __st_ino; /* 32bit file serial number. */
-#endif
-#ifndef __x86_64__
+# endif
+# ifndef __x86_64__
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
-#else
+# else
__nlink_t st_nlink; /* Link count. */
__mode_t st_mode; /* File mode. */
-#endif
+# endif
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
-#ifdef __x86_64__
+# ifdef __x86_64__
int __pad0;
-#endif
+# endif
__dev_t st_rdev; /* Device number, if device. */
-#ifndef __x86_64__
+# ifndef __x86_64__
unsigned short int __pad2;
-#endif
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# endif
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__off_t st_size; /* Size of file, in bytes. */
-#else
+# else
__off64_t st_size; /* Size of file, in bytes. */
-#endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
-#if defined __x86_64__ || !defined __USE_FILE_OFFSET64
+# if defined __x86_64__ || !defined __USE_FILE_OFFSET64
__blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
-#else
+# else
__blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
-#endif
-#ifdef __USE_XOPEN2K8
+# endif
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -71,58 +74,62 @@ struct stat
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# define st_atime st_atim.tv_sec /* Backward compatibility. */
-# define st_mtime st_mtim.tv_sec
-# define st_ctime st_ctim.tv_sec
-#else
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+# else
__time_t st_atime; /* Time of last access. */
__syscall_ulong_t st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
__syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
__syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
-#endif
-#ifdef __x86_64__
+# endif
+# ifdef __x86_64__
__syscall_slong_t __glibc_reserved[3];
-#else
-# ifndef __USE_FILE_OFFSET64
+# else
+# ifndef __USE_FILE_OFFSET64
unsigned long int __glibc_reserved4;
unsigned long int __glibc_reserved5;
-# else
+# else
__ino64_t st_ino; /* File serial number. */
+# endif
# endif
-#endif
+#endif /* __USE_TIME_BITS64 */
};
#ifdef __USE_LARGEFILE64
/* Note stat64 has the same shape as stat for x86-64. */
struct stat64
{
+# ifdef __USE_TIME_BITS64
+# include <bits/struct_stat_time64_helper.h>
+# else
__dev_t st_dev; /* Device. */
-# ifdef __x86_64__
+# ifdef __x86_64__
__ino64_t st_ino; /* File serial number. */
__nlink_t st_nlink; /* Link count. */
__mode_t st_mode; /* File mode. */
-# else
+# else
unsigned int __pad1;
__ino_t __st_ino; /* 32bit file serial number. */
__mode_t st_mode; /* File mode. */
__nlink_t st_nlink; /* Link count. */
-# endif
+# endif
__uid_t st_uid; /* User ID of the file's owner. */
__gid_t st_gid; /* Group ID of the file's group.*/
-# ifdef __x86_64__
+# ifdef __x86_64__
int __pad0;
__dev_t st_rdev; /* Device number, if device. */
__off_t st_size; /* Size of file, in bytes. */
-# else
+# else
__dev_t st_rdev; /* Device number, if device. */
unsigned int __pad2;
__off64_t st_size; /* Size of file, in bytes. */
-# endif
+# endif
__blksize_t st_blksize; /* Optimal block size for I/O. */
__blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */
-# ifdef __USE_XOPEN2K8
+# ifdef __USE_XOPEN2K8
/* Nanosecond resolution timestamps are stored in a format
equivalent to 'struct timespec'. This is the type used
whenever possible but the Unix namespace rules do not allow the
@@ -132,19 +139,20 @@ struct stat64
struct timespec st_atim; /* Time of last access. */
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
-# else
+# else
__time_t st_atime; /* Time of last access. */
__syscall_ulong_t st_atimensec; /* Nscecs of last access. */
__time_t st_mtime; /* Time of last modification. */
__syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */
__time_t st_ctime; /* Time of last status change. */
__syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */
-# endif
-# ifdef __x86_64__
+# endif
+# ifdef __x86_64__
__syscall_slong_t __glibc_reserved[3];
-# else
+# else
__ino64_t st_ino; /* File serial number. */
-# endif
+# endif
+# endif /* __USE_TIME_BITS64 */
};
#endif
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
index 76ea9f63dc..6713836d1e 100644
--- 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
@@ -23,6 +23,9 @@
/* Data structure describing a set of semaphores. */
struct semid_ds
{
+#ifdef __USE_TIME_BITS64
+# include <bits/types/struct_semid64_ds_helper.h>
+#else
struct ipc_perm sem_perm; /* operation permission struct */
__time_t sem_otime; /* last semop() time */
__syscall_ulong_t __sem_otime_high;
@@ -31,4 +34,5 @@ struct semid_ds
__syscall_ulong_t sem_nsems; /* number of semaphores in set */
__syscall_ulong_t __glibc_reserved3;
__syscall_ulong_t __glibc_reserved4;
+#endif
}; \ No newline at end of file
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 cdc4ac90f9..95b469a00c 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
@@ -8,6 +8,7 @@
#define LIBANL_SO "libanl.so.1"
#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_MALLOC_DEBUG_SO "libc_malloc_debug.so.0"
#define LIBC_SO "libc.so.6"
#define LIBDL_SO "libdl.so.2"
#define LIBGCC_S_SO "libgcc_s.so.1"