From 5b6d26e97bb97d79782f3c77b02a997e361a1497 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 15 Dec 2021 18:59:59 -0700 Subject: [PATCH] glibc: fix inconsistency of mips ABI mapping Before this commit, glibc headers did the following mapping: * (zig) mipsel-linux-gnu => (glibc) mipsel-linux-gnu * (zig) mipsel-linux-gnu-soft => (glibc) (none) * (zig) mips-linux-gnu => (glibc) mips-linux-gnu * (zig) mips-linux-gnu-soft => (glibc) (none) While the glibc ABI stubs used the (zig) gnueabi and gnueabihf ABIs, and the stage2 available_libcs array listed: * (zig) mipsel-linux-gnu * (zig) mips-linux-gnu The problem is the mismatch between the ABI component of the headers and the stubs. This commit makes the following clarifications: * (zig) mips-linux-gnueabi means soft-float * (zig) mipsel-linux-gnueabi means soft-float * (zig) mips-linux-gnueabihf means hard-float * (zig) mipsel-linux-gnueabihf means hard-float Consequently, the glibc headers now do this mapping: * (zig) mips-linux-gnueabihf => (glibc) mips-linux-gnu * (zig) mipsel-linux-gnueabihf => (glibc) mipsel-linux-gnu * (zig) mips-linux-gnueabi => (glibc) mips-linux-gnu-soft * (zig) mipsel-linux-gnueabi => (glibc) mipsel-linux-gnu-soft The glibc ABI stubs are unchanged, and the stage2 available_libcs array's 2 entries are modified and it gains 2 more: * (zig) mipsel-linux-gnueabi * (zig) mipsel-linux-gnueabihf * (zig) mips-linux-gnueabi * (zig) mips-linux-gnueabihf Now everything is consistent. Zig no longer recognizes a `mips-linux-gnu` triple; one must use `mips-linux-gnueabi` (soft float) or `mips-linux-gnueabihf` (hard float). --- .../include/arm-linux-gnueabi/bits/floatn.h | 52 +++ .../bits/struct_rwlock.h | 44 +-- .../include/arm-linux-gnueabi/bits/wordsize.h | 21 ++ .../include/arm-linux-gnueabihf/bits/floatn.h | 52 +++ .../bits/struct_rwlock.h | 44 +-- .../arm-linux-gnueabihf/bits/wordsize.h | 21 ++ .../include/armeb-linux-gnueabi/bits/floatn.h | 52 +++ .../bits/struct_rwlock.h | 44 +-- .../armeb-linux-gnueabi/bits/wordsize.h | 21 ++ .../armeb-linux-gnueabihf/bits/floatn.h | 52 +++ .../bits/struct_rwlock.h | 44 +-- .../armeb-linux-gnueabihf/bits/wordsize.h | 21 ++ .../include/csky-linux-gnueabi/bits/floatn.h | 52 +++ .../csky-linux-gnueabi/bits/struct_rwlock.h | 61 ++++ .../csky-linux-gnueabi/bits/wordsize.h | 21 ++ .../csky-linux-gnueabihf/bits/floatn.h | 52 +++ .../csky-linux-gnueabihf/bits/struct_rwlock.h | 61 ++++ .../csky-linux-gnueabihf/bits/wordsize.h | 21 ++ lib/libc/include/generic-glibc/bits/floatn.h | 71 +++- .../generic-glibc/bits/struct_rwlock.h | 62 ++-- .../include/generic-glibc/bits/wordsize.h | 20 +- .../generic-glibc/gnu/lib-names-o32_soft.h | 29 ++ .../generic-glibc/gnu/stubs-o32_soft.h | 33 ++ lib/libc/include/m68k-linux-gnu/bits/floatn.h | 52 +++ .../m68k-linux-gnu/bits/struct_rwlock.h | 61 ++++ .../include/m68k-linux-gnu/bits/wordsize.h | 21 ++ lib/libc/include/mips-linux-gnu/bits/floatn.h | 97 ------ .../bits/dlfcn.h | 0 .../bits/errno.h | 0 .../bits/eventfd.h | 0 .../bits/inotify.h | 0 .../bits/ioctl-types.h | 0 .../bits/ipctypes.h | 0 .../bits/mman.h | 0 .../bits/poll.h | 0 .../bits/pthread_stack_min.h | 0 .../bits/pthreadtypes-arch.h | 0 .../bits/resource.h | 0 .../bits/semaphore.h | 0 .../bits/shmlba.h | 0 .../bits/sigaction.h | 0 .../bits/sigcontext.h | 0 .../bits/siginfo-arch.h | 0 .../bits/signalfd.h | 0 .../bits/signum-arch.h | 0 .../bits/socket-constants.h | 0 .../bits/socket_type.h | 0 .../bits/statfs.h | 0 .../bits/struct_mutex.h | 0 .../bits/termios-c_cc.h | 0 .../bits/termios-c_lflag.h | 0 .../bits/termios-struct.h | 0 .../bits/termios-tcflow.h | 0 .../bits/timerfd.h | 0 .../bits/types/stack_t.h | 0 .../bits/types/struct_msqid_ds.h | 0 .../bits/types/struct_semid_ds.h | 0 .../bits/types/struct_shmid_ds.h | 0 .../ieee754.h | 0 .../bits/dlfcn.h | 0 .../bits/errno.h | 0 .../bits/eventfd.h | 0 .../bits/inotify.h | 0 .../bits/ioctl-types.h | 0 .../bits/ipctypes.h | 0 .../bits/mman.h | 0 .../bits/poll.h | 0 .../bits/pthread_stack_min.h | 0 .../bits/pthreadtypes-arch.h | 0 .../bits/resource.h | 0 .../bits/semaphore.h | 0 .../bits/shmlba.h | 0 .../bits/sigaction.h | 0 .../bits/sigcontext.h | 0 .../bits/siginfo-arch.h | 0 .../bits/signalfd.h | 0 .../bits/signum-arch.h | 0 .../bits/socket-constants.h | 0 .../bits/socket_type.h | 0 .../bits/statfs.h | 0 .../bits/struct_mutex.h | 0 .../bits/termios-c_cc.h | 0 .../bits/termios-c_lflag.h | 0 .../bits/termios-struct.h | 0 .../bits/termios-tcflow.h | 0 .../bits/timerfd.h | 0 .../bits/types/stack_t.h | 0 .../bits/types/struct_msqid_ds.h | 0 .../bits/types/struct_semid_ds.h | 0 .../bits/types/struct_shmid_ds.h | 0 .../ieee754.h | 0 .../mips64-linux-gnuabi64/bits/floatn.h | 97 ------ .../mips64-linux-gnuabin32/bits/floatn.h | 97 ------ .../mips64el-linux-gnuabi64/bits/floatn.h | 97 ------ .../mips64el-linux-gnuabin32/bits/floatn.h | 97 ------ .../bits/struct_rwlock.h | 71 ---- .../mips64el-linux-gnuabin32/bits/wordsize.h | 31 -- .../include/mipsel-linux-gnu/bits/floatn.h | 97 ------ .../mipsel-linux-gnu/bits/struct_rwlock.h | 71 ---- .../include/mipsel-linux-gnu/bits/wordsize.h | 31 -- .../include/mipsel-linux-gnueabi/bits/dlfcn.h | 64 ++++ .../include/mipsel-linux-gnueabi/bits/errno.h | 52 +++ .../mipsel-linux-gnueabi/bits/eventfd.h | 31 ++ .../mipsel-linux-gnueabi/bits/inotify.h | 29 ++ .../mipsel-linux-gnueabi/bits/ioctl-types.h | 75 ++++ .../bits/ipctypes.h} | 24 +- .../include/mipsel-linux-gnueabi/bits/mman.h | 48 +++ .../include/mipsel-linux-gnueabi/bits/poll.h | 49 +++ .../bits/pthread_stack_min.h | 20 ++ .../bits/pthreadtypes-arch.h | 44 +++ .../mipsel-linux-gnueabi/bits/resource.h | 231 +++++++++++++ .../bits/semaphore.h} | 29 +- .../mipsel-linux-gnueabi/bits/shmlba.h | 24 ++ .../mipsel-linux-gnueabi/bits/sigaction.h | 94 +++++ .../mipsel-linux-gnueabi/bits/sigcontext.h | 82 +++++ .../mipsel-linux-gnueabi/bits/siginfo-arch.h | 13 + .../mipsel-linux-gnueabi/bits/signalfd.h | 29 ++ .../mipsel-linux-gnueabi/bits/signum-arch.h | 65 ++++ .../bits/socket-constants.h | 70 ++++ .../mipsel-linux-gnueabi/bits/socket_type.h | 55 +++ .../mipsel-linux-gnueabi/bits/statfs.h | 73 ++++ .../mipsel-linux-gnueabi/bits/struct_mutex.h | 56 +++ .../mipsel-linux-gnueabi/bits/termios-c_cc.h | 43 +++ .../bits/termios-c_lflag.h | 46 +++ .../bits/termios-struct.h | 34 ++ .../bits/termios-tcflow.h | 26 ++ .../mipsel-linux-gnueabi/bits/timerfd.h | 29 ++ .../mipsel-linux-gnueabi/bits/types/stack_t.h | 33 ++ .../bits/types/struct_msqid_ds.h | 62 ++++ .../bits/types/struct_semid_ds.h | 36 ++ .../bits/types/struct_shmid_ds.h | 53 +++ .../include/mipsel-linux-gnueabi/ieee754.h | 326 ++++++++++++++++++ .../mipsel-linux-gnueabihf/bits/dlfcn.h | 64 ++++ .../mipsel-linux-gnueabihf/bits/errno.h | 52 +++ .../mipsel-linux-gnueabihf/bits/eventfd.h | 31 ++ .../mipsel-linux-gnueabihf/bits/inotify.h | 29 ++ .../mipsel-linux-gnueabihf/bits/ioctl-types.h | 75 ++++ .../bits/ipctypes.h} | 24 +- .../mipsel-linux-gnueabihf/bits/mman.h | 48 +++ .../mipsel-linux-gnueabihf/bits/poll.h | 49 +++ .../bits/pthread_stack_min.h | 20 ++ .../bits/pthreadtypes-arch.h | 44 +++ .../mipsel-linux-gnueabihf/bits/resource.h | 231 +++++++++++++ .../bits/semaphore.h} | 29 +- .../mipsel-linux-gnueabihf/bits/shmlba.h | 24 ++ .../mipsel-linux-gnueabihf/bits/sigaction.h | 94 +++++ .../mipsel-linux-gnueabihf/bits/sigcontext.h | 82 +++++ .../bits/siginfo-arch.h | 13 + .../mipsel-linux-gnueabihf/bits/signalfd.h | 29 ++ .../mipsel-linux-gnueabihf/bits/signum-arch.h | 65 ++++ .../bits/socket-constants.h | 70 ++++ .../mipsel-linux-gnueabihf/bits/socket_type.h | 55 +++ .../mipsel-linux-gnueabihf/bits/statfs.h | 73 ++++ .../bits/struct_mutex.h | 56 +++ .../bits/termios-c_cc.h | 43 +++ .../bits/termios-c_lflag.h | 46 +++ .../bits/termios-struct.h | 34 ++ .../bits/termios-tcflow.h | 26 ++ .../mipsel-linux-gnueabihf/bits/timerfd.h | 29 ++ .../bits/types/stack_t.h | 33 ++ .../bits/types/struct_msqid_ds.h | 62 ++++ .../bits/types/struct_semid_ds.h | 36 ++ .../bits/types/struct_shmid_ds.h | 53 +++ .../include/mipsel-linux-gnueabihf/ieee754.h | 326 ++++++++++++++++++ src/target.zig | 6 +- test/tests.zig | 4 +- tools/process_headers.zig | 14 +- 167 files changed, 4793 insertions(+), 992 deletions(-) create mode 100644 lib/libc/include/arm-linux-gnueabi/bits/floatn.h rename lib/libc/include/{mips64-linux-gnuabi64 => arm-linux-gnueabi}/bits/struct_rwlock.h (64%) create mode 100644 lib/libc/include/arm-linux-gnueabi/bits/wordsize.h create mode 100644 lib/libc/include/arm-linux-gnueabihf/bits/floatn.h rename lib/libc/include/{mips-linux-gnu => arm-linux-gnueabihf}/bits/struct_rwlock.h (64%) create mode 100644 lib/libc/include/arm-linux-gnueabihf/bits/wordsize.h create mode 100644 lib/libc/include/armeb-linux-gnueabi/bits/floatn.h rename lib/libc/include/{mips64-linux-gnuabin32 => armeb-linux-gnueabi}/bits/struct_rwlock.h (64%) create mode 100644 lib/libc/include/armeb-linux-gnueabi/bits/wordsize.h create mode 100644 lib/libc/include/armeb-linux-gnueabihf/bits/floatn.h rename lib/libc/include/{mips64el-linux-gnuabi64 => armeb-linux-gnueabihf}/bits/struct_rwlock.h (64%) create mode 100644 lib/libc/include/armeb-linux-gnueabihf/bits/wordsize.h create mode 100644 lib/libc/include/csky-linux-gnueabi/bits/floatn.h create mode 100644 lib/libc/include/csky-linux-gnueabi/bits/struct_rwlock.h create mode 100644 lib/libc/include/csky-linux-gnueabi/bits/wordsize.h create mode 100644 lib/libc/include/csky-linux-gnueabihf/bits/floatn.h create mode 100644 lib/libc/include/csky-linux-gnueabihf/bits/struct_rwlock.h create mode 100644 lib/libc/include/csky-linux-gnueabihf/bits/wordsize.h create mode 100644 lib/libc/include/generic-glibc/gnu/lib-names-o32_soft.h create mode 100644 lib/libc/include/generic-glibc/gnu/stubs-o32_soft.h create mode 100644 lib/libc/include/m68k-linux-gnu/bits/floatn.h create mode 100644 lib/libc/include/m68k-linux-gnu/bits/struct_rwlock.h create mode 100644 lib/libc/include/m68k-linux-gnu/bits/wordsize.h delete mode 100644 lib/libc/include/mips-linux-gnu/bits/floatn.h rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/dlfcn.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/errno.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/eventfd.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/inotify.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/ioctl-types.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/ipctypes.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/mman.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/poll.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/pthread_stack_min.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/pthreadtypes-arch.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/resource.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/semaphore.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/shmlba.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/sigaction.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/sigcontext.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/siginfo-arch.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/signalfd.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/signum-arch.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/socket-constants.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/socket_type.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/statfs.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/struct_mutex.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/termios-c_cc.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/termios-c_lflag.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/termios-struct.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/termios-tcflow.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/timerfd.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/types/stack_t.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/types/struct_msqid_ds.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/types/struct_semid_ds.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/bits/types/struct_shmid_ds.h (100%) rename lib/libc/include/{mips-linux-gnu => mips-linux-gnueabi}/ieee754.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/dlfcn.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/errno.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/eventfd.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/inotify.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/ioctl-types.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/ipctypes.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/mman.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/poll.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/pthread_stack_min.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/pthreadtypes-arch.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/resource.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/semaphore.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/shmlba.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/sigaction.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/sigcontext.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/siginfo-arch.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/signalfd.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/signum-arch.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/socket-constants.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/socket_type.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/statfs.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/struct_mutex.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/termios-c_cc.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/termios-c_lflag.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/termios-struct.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/termios-tcflow.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/timerfd.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/types/stack_t.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/types/struct_msqid_ds.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/types/struct_semid_ds.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/bits/types/struct_shmid_ds.h (100%) rename lib/libc/include/{mipsel-linux-gnu => mips-linux-gnueabihf}/ieee754.h (100%) delete mode 100644 lib/libc/include/mips64-linux-gnuabi64/bits/floatn.h delete mode 100644 lib/libc/include/mips64-linux-gnuabin32/bits/floatn.h delete mode 100644 lib/libc/include/mips64el-linux-gnuabi64/bits/floatn.h delete mode 100644 lib/libc/include/mips64el-linux-gnuabin32/bits/floatn.h delete mode 100644 lib/libc/include/mips64el-linux-gnuabin32/bits/struct_rwlock.h delete mode 100644 lib/libc/include/mips64el-linux-gnuabin32/bits/wordsize.h delete mode 100644 lib/libc/include/mipsel-linux-gnu/bits/floatn.h delete mode 100644 lib/libc/include/mipsel-linux-gnu/bits/struct_rwlock.h delete mode 100644 lib/libc/include/mipsel-linux-gnu/bits/wordsize.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/dlfcn.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/errno.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/eventfd.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/inotify.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/ioctl-types.h rename lib/libc/include/{mips64-linux-gnuabi64/bits/wordsize.h => mipsel-linux-gnueabi/bits/ipctypes.h} (68%) create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/mman.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/poll.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/pthread_stack_min.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/pthreadtypes-arch.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/resource.h rename lib/libc/include/{mips64-linux-gnuabin32/bits/wordsize.h => mipsel-linux-gnueabi/bits/semaphore.h} (72%) create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/shmlba.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/sigaction.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/sigcontext.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/siginfo-arch.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/signalfd.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/signum-arch.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/socket-constants.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/socket_type.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/statfs.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/struct_mutex.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/termios-c_cc.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/termios-c_lflag.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/termios-struct.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/termios-tcflow.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/timerfd.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/types/stack_t.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_msqid_ds.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_semid_ds.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/bits/types/struct_shmid_ds.h create mode 100644 lib/libc/include/mipsel-linux-gnueabi/ieee754.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/dlfcn.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/errno.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/eventfd.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/inotify.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/ioctl-types.h rename lib/libc/include/{mips-linux-gnu/bits/wordsize.h => mipsel-linux-gnueabihf/bits/ipctypes.h} (68%) create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/mman.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/poll.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/pthread_stack_min.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/pthreadtypes-arch.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/resource.h rename lib/libc/include/{mips64el-linux-gnuabi64/bits/wordsize.h => mipsel-linux-gnueabihf/bits/semaphore.h} (72%) create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/shmlba.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/sigaction.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/sigcontext.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/siginfo-arch.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/signalfd.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/signum-arch.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/socket-constants.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/socket_type.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/statfs.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/struct_mutex.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/termios-c_cc.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/termios-c_lflag.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/termios-struct.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/termios-tcflow.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/timerfd.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/types/stack_t.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_msqid_ds.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_semid_ds.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/bits/types/struct_shmid_ds.h create mode 100644 lib/libc/include/mipsel-linux-gnueabihf/ieee754.h 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 + . */ + +/* 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 \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabi64/bits/struct_rwlock.h b/lib/libc/include/arm-linux-gnueabi/bits/struct_rwlock.h similarity index 64% rename from lib/libc/include/mips64-linux-gnuabi64/bits/struct_rwlock.h rename to lib/libc/include/arm-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/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 . */ -#ifndef _RWLOCK_INTERNAL_H -#define _RWLOCK_INTERNAL_H +#ifndef __RWLOCK_INTERNAL_H +#define __RWLOCK_INTERNAL_H + +#include + +/* 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/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 + . */ + +#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 + . */ + +/* 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 \ No newline at end of file diff --git a/lib/libc/include/mips-linux-gnu/bits/struct_rwlock.h b/lib/libc/include/arm-linux-gnueabihf/bits/struct_rwlock.h similarity index 64% rename from lib/libc/include/mips-linux-gnu/bits/struct_rwlock.h rename to lib/libc/include/arm-linux-gnueabihf/bits/struct_rwlock.h index 6355f539b9..7431c5597f 100644 --- a/lib/libc/include/mips-linux-gnu/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 . */ -#ifndef _RWLOCK_INTERNAL_H -#define _RWLOCK_INTERNAL_H +#ifndef __RWLOCK_INTERNAL_H +#define __RWLOCK_INTERNAL_H + +#include + +/* 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/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 + . */ + +#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 + . */ + +/* 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 \ No newline at end of file diff --git a/lib/libc/include/mips64-linux-gnuabin32/bits/struct_rwlock.h b/lib/libc/include/armeb-linux-gnueabi/bits/struct_rwlock.h similarity index 64% rename from lib/libc/include/mips64-linux-gnuabin32/bits/struct_rwlock.h rename to lib/libc/include/armeb-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/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 . */ -#ifndef _RWLOCK_INTERNAL_H -#define _RWLOCK_INTERNAL_H +#ifndef __RWLOCK_INTERNAL_H +#define __RWLOCK_INTERNAL_H + +#include + +/* 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/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 + . */ + +#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 + . */ + +/* 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 \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabi64/bits/struct_rwlock.h b/lib/libc/include/armeb-linux-gnueabihf/bits/struct_rwlock.h similarity index 64% rename from lib/libc/include/mips64el-linux-gnuabi64/bits/struct_rwlock.h rename to lib/libc/include/armeb-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/armeb-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 . */ -#ifndef _RWLOCK_INTERNAL_H -#define _RWLOCK_INTERNAL_H +#ifndef __RWLOCK_INTERNAL_H +#define __RWLOCK_INTERNAL_H + +#include + +/* 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-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 + . */ + +#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 + . */ + +/* 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 \ No newline at end of file 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 + . */ + +#ifndef __RWLOCK_INTERNAL_H +#define __RWLOCK_INTERNAL_H + +#include + +/* 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 + . */ + +#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/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 + . */ + +/* 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 \ No newline at end of file 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 + . */ + +#ifndef __RWLOCK_INTERNAL_H +#define __RWLOCK_INTERNAL_H + +#include + +/* 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 + . */ + +#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/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 . */ +#ifndef _BITS_FLOATN_H +#define _BITS_FLOATN_H + +#include +#include + /* Defined to 1 if the current compiler invocation provides a - floating-point type with the IEEE 754 binary128 format, and this glibc - includes corresponding *f128 interfaces for it. */ -#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. - E.g.: #define __CFLOAT128 _Complex _Float128. */ -# undef __CFLOAT128 +/* 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 \ No newline at end of file +#include + +#endif /* _BITS_FLOATN_H */ \ 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 . */ -#ifndef __RWLOCK_INTERNAL_H -#define __RWLOCK_INTERNAL_H - -#include - -/* 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 - 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 +#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 __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/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 . */ -#define __WORDSIZE 32 -#define __WORDSIZE_TIME64_COMPAT32 0 +#include + +#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/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 directly; include 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/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/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 + . */ + +/* 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 \ 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 + . */ + +#ifndef __RWLOCK_INTERNAL_H +#define __RWLOCK_INTERNAL_H + +#include + +/* 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/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 + . */ + +#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/mips-linux-gnu/bits/floatn.h b/lib/libc/include/mips-linux-gnu/bits/floatn.h deleted file mode 100644 index c05a5e55e0..0000000000 --- a/lib/libc/include/mips-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 - . */ - -#ifndef _BITS_FLOATN_H -#define _BITS_FLOATN_H - -#include -#include - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the IEEE 754 binary128 format, and this - glibc includes corresponding *f128 interfaces for it. */ -#ifndef __NO_LONG_DOUBLE_MATH -# define __HAVE_FLOAT128 1 -#else -/* glibc does not support _Float128 for platforms where long double is - normally binary128 when building with long double as binary64. - GCC's default for supported scalar modes does not support it either - in that case. */ -# define __HAVE_FLOAT128 0 -#endif - -/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct - from the default float, double and long double types in this glibc. */ -#define __HAVE_DISTINCT_FLOAT128 0 - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the right format for _Float64x, and this - glibc includes corresponding *f64x interfaces for it. */ -#define __HAVE_FLOAT64X __HAVE_FLOAT128 - -/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format - of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has - the format of _Float128, which must be different from that of long - double. */ -#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128 - -#ifndef __ASSEMBLER__ - -/* Defined to concatenate the literal suffix to be used with _Float128 - types, if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -/* The literal suffix f128 exists only since GCC 7.0. */ -# define __f128(x) x##l -# else -# define __f128(x) x##f128 -# endif -# endif - -/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -# define __CFLOAT128 _Complex long double -# else -# define __CFLOAT128 _Complex _Float128 -# endif -# endif - -/* The remaining of this file provides support for older compilers. */ -# if __HAVE_FLOAT128 - -/* The type _Float128 exists only since GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -typedef long double _Float128; -# endif - -/* Various built-in functions do not exist before GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) -# define __builtin_huge_valf128() (__builtin_huge_vall ()) -# define __builtin_inff128() (__builtin_infl ()) -# define __builtin_nanf128(x) (__builtin_nanl (x)) -# define __builtin_nansf128(x) (__builtin_nansl (x)) -# endif - -# endif - -#endif /* !__ASSEMBLER__. */ - -#include - -#endif /* _BITS_FLOATN_H */ \ No newline at end of file diff --git a/lib/libc/include/mips-linux-gnu/bits/dlfcn.h b/lib/libc/include/mips-linux-gnueabi/bits/dlfcn.h similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/dlfcn.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/errno.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/eventfd.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/inotify.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/ioctl-types.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/ipctypes.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/mman.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/poll.h rename to lib/libc/include/mips-linux-gnueabi/bits/poll.h diff --git a/lib/libc/include/mips-linux-gnu/bits/pthread_stack_min.h b/lib/libc/include/mips-linux-gnueabi/bits/pthread_stack_min.h similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/pthread_stack_min.h rename to lib/libc/include/mips-linux-gnueabi/bits/pthread_stack_min.h diff --git a/lib/libc/include/mips-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/mips-linux-gnueabi/bits/pthreadtypes-arch.h similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/pthreadtypes-arch.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/resource.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/semaphore.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/shmlba.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/sigaction.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/sigcontext.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/siginfo-arch.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/signalfd.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/signum-arch.h rename to lib/libc/include/mips-linux-gnueabi/bits/signum-arch.h diff --git a/lib/libc/include/mips-linux-gnu/bits/socket-constants.h b/lib/libc/include/mips-linux-gnueabi/bits/socket-constants.h similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/socket-constants.h rename to lib/libc/include/mips-linux-gnueabi/bits/socket-constants.h diff --git a/lib/libc/include/mips-linux-gnu/bits/socket_type.h b/lib/libc/include/mips-linux-gnueabi/bits/socket_type.h similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/socket_type.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/statfs.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/struct_mutex.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/termios-c_cc.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/termios-c_lflag.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/termios-struct.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/termios-tcflow.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/timerfd.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/types/stack_t.h rename to 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/types/struct_msqid_ds.h rename to lib/libc/include/mips-linux-gnueabi/bits/types/struct_msqid_ds.h diff --git a/lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h b/lib/libc/include/mips-linux-gnueabi/bits/types/struct_semid_ds.h similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/types/struct_semid_ds.h rename to lib/libc/include/mips-linux-gnueabi/bits/types/struct_semid_ds.h 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 similarity index 100% rename from lib/libc/include/mips-linux-gnu/bits/types/struct_shmid_ds.h rename to lib/libc/include/mips-linux-gnueabi/bits/types/struct_shmid_ds.h diff --git a/lib/libc/include/mips-linux-gnu/ieee754.h b/lib/libc/include/mips-linux-gnueabi/ieee754.h similarity index 100% rename from lib/libc/include/mips-linux-gnu/ieee754.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/dlfcn.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/errno.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/eventfd.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/inotify.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/ioctl-types.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/ipctypes.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/mman.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/poll.h rename to lib/libc/include/mips-linux-gnueabihf/bits/poll.h diff --git a/lib/libc/include/mipsel-linux-gnu/bits/pthread_stack_min.h b/lib/libc/include/mips-linux-gnueabihf/bits/pthread_stack_min.h similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/pthread_stack_min.h rename to lib/libc/include/mips-linux-gnueabihf/bits/pthread_stack_min.h diff --git a/lib/libc/include/mipsel-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/mips-linux-gnueabihf/bits/pthreadtypes-arch.h similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/pthreadtypes-arch.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/resource.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/semaphore.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/shmlba.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/sigaction.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/sigcontext.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/siginfo-arch.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/signalfd.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/signum-arch.h rename to lib/libc/include/mips-linux-gnueabihf/bits/signum-arch.h diff --git a/lib/libc/include/mipsel-linux-gnu/bits/socket-constants.h b/lib/libc/include/mips-linux-gnueabihf/bits/socket-constants.h similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/socket-constants.h rename to lib/libc/include/mips-linux-gnueabihf/bits/socket-constants.h diff --git a/lib/libc/include/mipsel-linux-gnu/bits/socket_type.h b/lib/libc/include/mips-linux-gnueabihf/bits/socket_type.h similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/socket_type.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/statfs.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/struct_mutex.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/termios-c_cc.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/termios-c_lflag.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/termios-struct.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/termios-tcflow.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/timerfd.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/types/stack_t.h rename to 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/types/struct_msqid_ds.h rename to lib/libc/include/mips-linux-gnueabihf/bits/types/struct_msqid_ds.h diff --git a/lib/libc/include/mipsel-linux-gnu/bits/types/struct_semid_ds.h b/lib/libc/include/mips-linux-gnueabihf/bits/types/struct_semid_ds.h similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/types/struct_semid_ds.h rename to lib/libc/include/mips-linux-gnueabihf/bits/types/struct_semid_ds.h 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 similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/bits/types/struct_shmid_ds.h rename to lib/libc/include/mips-linux-gnueabihf/bits/types/struct_shmid_ds.h diff --git a/lib/libc/include/mipsel-linux-gnu/ieee754.h b/lib/libc/include/mips-linux-gnueabihf/ieee754.h similarity index 100% rename from lib/libc/include/mipsel-linux-gnu/ieee754.h rename to 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 - . */ - -#ifndef _BITS_FLOATN_H -#define _BITS_FLOATN_H - -#include -#include - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the IEEE 754 binary128 format, and this - glibc includes corresponding *f128 interfaces for it. */ -#ifndef __NO_LONG_DOUBLE_MATH -# define __HAVE_FLOAT128 1 -#else -/* glibc does not support _Float128 for platforms where long double is - normally binary128 when building with long double as binary64. - GCC's default for supported scalar modes does not support it either - in that case. */ -# define __HAVE_FLOAT128 0 -#endif - -/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct - from the default float, double and long double types in this glibc. */ -#define __HAVE_DISTINCT_FLOAT128 0 - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the right format for _Float64x, and this - glibc includes corresponding *f64x interfaces for it. */ -#define __HAVE_FLOAT64X __HAVE_FLOAT128 - -/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format - of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has - the format of _Float128, which must be different from that of long - double. */ -#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128 - -#ifndef __ASSEMBLER__ - -/* Defined to concatenate the literal suffix to be used with _Float128 - types, if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -/* The literal suffix f128 exists only since GCC 7.0. */ -# define __f128(x) x##l -# else -# define __f128(x) x##f128 -# endif -# endif - -/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -# define __CFLOAT128 _Complex long double -# else -# define __CFLOAT128 _Complex _Float128 -# endif -# endif - -/* The remaining of this file provides support for older compilers. */ -# if __HAVE_FLOAT128 - -/* The type _Float128 exists only since GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -typedef long double _Float128; -# endif - -/* Various built-in functions do not exist before GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) -# define __builtin_huge_valf128() (__builtin_huge_vall ()) -# define __builtin_inff128() (__builtin_infl ()) -# define __builtin_nanf128(x) (__builtin_nanl (x)) -# define __builtin_nansf128(x) (__builtin_nansl (x)) -# endif - -# endif - -#endif /* !__ASSEMBLER__. */ - -#include - -#endif /* _BITS_FLOATN_H */ \ No newline at end of file diff --git a/lib/libc/include/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 - . */ - -#ifndef _BITS_FLOATN_H -#define _BITS_FLOATN_H - -#include -#include - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the IEEE 754 binary128 format, and this - glibc includes corresponding *f128 interfaces for it. */ -#ifndef __NO_LONG_DOUBLE_MATH -# define __HAVE_FLOAT128 1 -#else -/* glibc does not support _Float128 for platforms where long double is - normally binary128 when building with long double as binary64. - GCC's default for supported scalar modes does not support it either - in that case. */ -# define __HAVE_FLOAT128 0 -#endif - -/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct - from the default float, double and long double types in this glibc. */ -#define __HAVE_DISTINCT_FLOAT128 0 - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the right format for _Float64x, and this - glibc includes corresponding *f64x interfaces for it. */ -#define __HAVE_FLOAT64X __HAVE_FLOAT128 - -/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format - of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has - the format of _Float128, which must be different from that of long - double. */ -#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128 - -#ifndef __ASSEMBLER__ - -/* Defined to concatenate the literal suffix to be used with _Float128 - types, if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -/* The literal suffix f128 exists only since GCC 7.0. */ -# define __f128(x) x##l -# else -# define __f128(x) x##f128 -# endif -# endif - -/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -# define __CFLOAT128 _Complex long double -# else -# define __CFLOAT128 _Complex _Float128 -# endif -# endif - -/* The remaining of this file provides support for older compilers. */ -# if __HAVE_FLOAT128 - -/* The type _Float128 exists only since GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -typedef long double _Float128; -# endif - -/* Various built-in functions do not exist before GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) -# define __builtin_huge_valf128() (__builtin_huge_vall ()) -# define __builtin_inff128() (__builtin_infl ()) -# define __builtin_nanf128(x) (__builtin_nanl (x)) -# define __builtin_nansf128(x) (__builtin_nansl (x)) -# endif - -# endif - -#endif /* !__ASSEMBLER__. */ - -#include - -#endif /* _BITS_FLOATN_H */ \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-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 - . */ - -#ifndef _BITS_FLOATN_H -#define _BITS_FLOATN_H - -#include -#include - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the IEEE 754 binary128 format, and this - glibc includes corresponding *f128 interfaces for it. */ -#ifndef __NO_LONG_DOUBLE_MATH -# define __HAVE_FLOAT128 1 -#else -/* glibc does not support _Float128 for platforms where long double is - normally binary128 when building with long double as binary64. - GCC's default for supported scalar modes does not support it either - in that case. */ -# define __HAVE_FLOAT128 0 -#endif - -/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct - from the default float, double and long double types in this glibc. */ -#define __HAVE_DISTINCT_FLOAT128 0 - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the right format for _Float64x, and this - glibc includes corresponding *f64x interfaces for it. */ -#define __HAVE_FLOAT64X __HAVE_FLOAT128 - -/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format - of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has - the format of _Float128, which must be different from that of long - double. */ -#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128 - -#ifndef __ASSEMBLER__ - -/* Defined to concatenate the literal suffix to be used with _Float128 - types, if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -/* The literal suffix f128 exists only since GCC 7.0. */ -# define __f128(x) x##l -# else -# define __f128(x) x##f128 -# endif -# endif - -/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -# define __CFLOAT128 _Complex long double -# else -# define __CFLOAT128 _Complex _Float128 -# endif -# endif - -/* The remaining of this file provides support for older compilers. */ -# if __HAVE_FLOAT128 - -/* The type _Float128 exists only since GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -typedef long double _Float128; -# endif - -/* Various built-in functions do not exist before GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) -# define __builtin_huge_valf128() (__builtin_huge_vall ()) -# define __builtin_inff128() (__builtin_infl ()) -# define __builtin_nanf128(x) (__builtin_nanl (x)) -# define __builtin_nansf128(x) (__builtin_nansl (x)) -# endif - -# endif - -#endif /* !__ASSEMBLER__. */ - -#include - -#endif /* _BITS_FLOATN_H */ \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/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 - . */ - -#ifndef _BITS_FLOATN_H -#define _BITS_FLOATN_H - -#include -#include - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the IEEE 754 binary128 format, and this - glibc includes corresponding *f128 interfaces for it. */ -#ifndef __NO_LONG_DOUBLE_MATH -# define __HAVE_FLOAT128 1 -#else -/* glibc does not support _Float128 for platforms where long double is - normally binary128 when building with long double as binary64. - GCC's default for supported scalar modes does not support it either - in that case. */ -# define __HAVE_FLOAT128 0 -#endif - -/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct - from the default float, double and long double types in this glibc. */ -#define __HAVE_DISTINCT_FLOAT128 0 - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the right format for _Float64x, and this - glibc includes corresponding *f64x interfaces for it. */ -#define __HAVE_FLOAT64X __HAVE_FLOAT128 - -/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format - of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has - the format of _Float128, which must be different from that of long - double. */ -#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128 - -#ifndef __ASSEMBLER__ - -/* Defined to concatenate the literal suffix to be used with _Float128 - types, if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -/* The literal suffix f128 exists only since GCC 7.0. */ -# define __f128(x) x##l -# else -# define __f128(x) x##f128 -# endif -# endif - -/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -# define __CFLOAT128 _Complex long double -# else -# define __CFLOAT128 _Complex _Float128 -# endif -# endif - -/* The remaining of this file provides support for older compilers. */ -# if __HAVE_FLOAT128 - -/* The type _Float128 exists only since GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -typedef long double _Float128; -# endif - -/* Various built-in functions do not exist before GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) -# define __builtin_huge_valf128() (__builtin_huge_vall ()) -# define __builtin_inff128() (__builtin_infl ()) -# define __builtin_nanf128(x) (__builtin_nanl (x)) -# define __builtin_nansf128(x) (__builtin_nansl (x)) -# endif - -# endif - -#endif /* !__ASSEMBLER__. */ - -#include - -#endif /* _BITS_FLOATN_H */ \ No newline at end of file diff --git a/lib/libc/include/mips64el-linux-gnuabin32/bits/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 - . */ - -#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/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 - . */ - -#include - -#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 - . */ - -#ifndef _BITS_FLOATN_H -#define _BITS_FLOATN_H - -#include -#include - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the IEEE 754 binary128 format, and this - glibc includes corresponding *f128 interfaces for it. */ -#ifndef __NO_LONG_DOUBLE_MATH -# define __HAVE_FLOAT128 1 -#else -/* glibc does not support _Float128 for platforms where long double is - normally binary128 when building with long double as binary64. - GCC's default for supported scalar modes does not support it either - in that case. */ -# define __HAVE_FLOAT128 0 -#endif - -/* Defined to 1 if __HAVE_FLOAT128 is 1 and the type is ABI-distinct - from the default float, double and long double types in this glibc. */ -#define __HAVE_DISTINCT_FLOAT128 0 - -/* Defined to 1 if the current compiler invocation provides a - floating-point type with the right format for _Float64x, and this - glibc includes corresponding *f64x interfaces for it. */ -#define __HAVE_FLOAT64X __HAVE_FLOAT128 - -/* Defined to 1 if __HAVE_FLOAT64X is 1 and _Float64x has the format - of long double. Otherwise, if __HAVE_FLOAT64X is 1, _Float64x has - the format of _Float128, which must be different from that of long - double. */ -#define __HAVE_FLOAT64X_LONG_DOUBLE __HAVE_FLOAT128 - -#ifndef __ASSEMBLER__ - -/* Defined to concatenate the literal suffix to be used with _Float128 - types, if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -/* The literal suffix f128 exists only since GCC 7.0. */ -# define __f128(x) x##l -# else -# define __f128(x) x##f128 -# endif -# endif - -/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ -# if __HAVE_FLOAT128 -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -# define __CFLOAT128 _Complex long double -# else -# define __CFLOAT128 _Complex _Float128 -# endif -# endif - -/* The remaining of this file provides support for older compilers. */ -# if __HAVE_FLOAT128 - -/* The type _Float128 exists only since GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) || defined __cplusplus -typedef long double _Float128; -# endif - -/* Various built-in functions do not exist before GCC 7.0. */ -# if !__GNUC_PREREQ (7, 0) -# define __builtin_huge_valf128() (__builtin_huge_vall ()) -# define __builtin_inff128() (__builtin_infl ()) -# define __builtin_nanf128(x) (__builtin_nanl (x)) -# define __builtin_nansf128(x) (__builtin_nansl (x)) -# endif - -# endif - -#endif /* !__ASSEMBLER__. */ - -#include - -#endif /* _BITS_FLOATN_H */ \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-gnu/bits/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 - . */ - -#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 - . */ - -#include - -#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 + . */ + +#ifndef _DLFCN_H +# error "Never use directly; include 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 + . */ + +#ifndef _BITS_ERRNO_H + +#if !defined _ERRNO_H +# error "Never include directly; use instead." +#endif + +# include + +/* 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 + . */ + +#ifndef _SYS_EVENTFD_H +# error "Never use directly; include 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 + . */ + +#ifndef _SYS_INOTIFY_H +# error "Never use directly; include 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 + . */ + +#ifndef _SYS_IOCTL_H +# error "Never use directly; include instead." +#endif + +/* Get definition of constants for use with `ioctl'. */ +#include + +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-gnueabi/bits/ipctypes.h similarity index 68% rename from lib/libc/include/mips64-linux-gnuabi64/bits/wordsize.h rename to lib/libc/include/mipsel-linux-gnueabi/bits/ipctypes.h index 9e405e4e4e..aa6d3772af 100644 --- a/lib/libc/include/mips64-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 . */ -#include +/* + * Never include 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 -#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 + . */ + +#ifndef _SYS_MMAN_H +# error "Never use directly; include 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 + +#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 + . */ + +#ifndef _SYS_POLL_H +# error "Never use directly; include 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 + . */ + +/* 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 + . */ + +#ifndef _BITS_PTHREADTYPES_ARCH_H +#define _BITS_PTHREADTYPES_ARCH_H 1 + +#include + +#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 + . */ + +#ifndef _SYS_RESOURCE_H +# error "Never use directly; include instead." +#endif + +#include + +/* 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 +#include + +/* 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 similarity index 72% rename from lib/libc/include/mips64-linux-gnuabin32/bits/wordsize.h rename to 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 . */ -#include - -#define __WORDSIZE _MIPS_SZPTR - -#if _MIPS_SIM == _ABI64 -# define __WORDSIZE_TIME64_COMPAT32 1 -#else -# define __WORDSIZE_TIME64_COMPAT32 0 +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." #endif -#if __WORDSIZE == 32 -#define __WORDSIZE32_SIZE_ULONG 0 -#define __WORDSIZE32_PTRDIFF_LONG 0 -#endif \ No newline at end of file +#if _MIPS_SIM == _ABI64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-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 + . */ + +#ifndef _SYS_SHM_H +# error "Never use directly; include 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 + . */ + +#ifndef _BITS_SIGACTION_H +#define _BITS_SIGACTION_H 1 + +#ifndef _SIGNAL_H +# error "Never include directly; use 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 + . */ + +#ifndef _BITS_SIGCONTEXT_H +#define _BITS_SIGCONTEXT_H 1 + +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H +# error "Never use directly; include instead." +#endif + +#include + +#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 + . */ + +#ifndef _SYS_SIGNALFD_H +# error "Never use directly; include 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 + . */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use instead." +#endif + +/* Adjustments and additions to the signal number constants for + Linux/MIPS. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGPWR 19 /* Power failure imminent. */ + +/* Historical signals specified by POSIX. */ +#define SIGBUS 10 /* Bus error. */ +#define SIGSYS 12 /* Bad system call. */ + +/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */ +#define SIGURG 21 /* Urgent data is available at a socket. */ +#define SIGSTOP 23 /* Stop, unblockable. */ +#define SIGTSTP 24 /* Keyboard stop. */ +#define SIGCONT 25 /* Continue. */ +#define SIGCHLD 18 /* Child terminated or stopped. */ +#define SIGTTIN 26 /* Background read from control terminal. */ +#define SIGTTOU 27 /* Background write to control terminal. */ +#define SIGPOLL 22 /* Pollable event occurred (System V). */ +#define SIGXCPU 30 /* CPU time limit exceeded. */ +#define SIGVTALRM 28 /* Virtual timer expired. */ +#define SIGPROF 29 /* Profiling timer expired. */ +#define SIGXFSZ 31 /* File size limit exceeded. */ +#define SIGUSR1 16 /* User-defined signal 1. */ +#define SIGUSR2 17 /* User-defined signal 2. */ + +/* Nonstandard signals found in all modern POSIX systems + (including both BSD and Linux). */ +#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ + +/* Archaic names for compatibility. */ +#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ +#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */ +#define SIGCLD SIGCHLD /* Old System V name */ + +/* By default no real-time signals are supported. */ +#define __SIGRTMIN 32 +#define __SIGRTMAX 127 + +#endif /* included. */ \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-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 + . */ + +#ifndef _SYS_SOCKET_H +# error "Never include directly; use 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 + . */ + +#ifndef _SYS_SOCKET_H +# error "Never include directly; use 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 + . */ + +#ifndef _SYS_STATFS_H +# error "Never include directly; use instead." +#endif + +#include /* 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 + . */ + +#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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use 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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use 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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use 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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use 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 + . */ + +#ifndef _SYS_TIMERFD_H +# error "Never use directly; include 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 + . */ + +#ifndef __stack_t_defined +#define __stack_t_defined 1 + +#define __need_size_t +#include + +/* 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 + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ +#ifdef __USE_TIME_BITS64 +# include +#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 + . */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ +#ifdef __USE_TIME_BITS64 +# include +#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 + . */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use instead." +#endif + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { +#ifdef __USE_TIME_BITS64 +# include +#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 + . */ + +#ifndef _IEEE754_H +#define _IEEE754_H 1 + +#include + +#include + +#ifndef __LDBL_MANT_DIG__ +# include +# 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 + . */ + +#ifndef _DLFCN_H +# error "Never use directly; include 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 + . */ + +#ifndef _BITS_ERRNO_H + +#if !defined _ERRNO_H +# error "Never include directly; use instead." +#endif + +# include + +/* 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 + . */ + +#ifndef _SYS_EVENTFD_H +# error "Never use directly; include 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 + . */ + +#ifndef _SYS_INOTIFY_H +# error "Never use directly; include 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 + . */ + +#ifndef _SYS_IOCTL_H +# error "Never use directly; include instead." +#endif + +/* Get definition of constants for use with `ioctl'. */ +#include + +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/mips-linux-gnu/bits/wordsize.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/ipctypes.h similarity index 68% rename from lib/libc/include/mips-linux-gnu/bits/wordsize.h rename to lib/libc/include/mipsel-linux-gnueabihf/bits/ipctypes.h index 9e405e4e4e..aa6d3772af 100644 --- a/lib/libc/include/mips-linux-gnu/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 . */ -#include +/* + * Never include 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 -#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 + . */ + +#ifndef _SYS_MMAN_H +# error "Never use directly; include 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 + +#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 + . */ + +#ifndef _SYS_POLL_H +# error "Never use directly; include 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 + . */ + +/* 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 + . */ + +#ifndef _BITS_PTHREADTYPES_ARCH_H +#define _BITS_PTHREADTYPES_ARCH_H 1 + +#include + +#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 + . */ + +#ifndef _SYS_RESOURCE_H +# error "Never use directly; include instead." +#endif + +#include + +/* 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 +#include + +/* 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/mips64el-linux-gnuabi64/bits/wordsize.h b/lib/libc/include/mipsel-linux-gnueabihf/bits/semaphore.h similarity index 72% rename from lib/libc/include/mips64el-linux-gnuabi64/bits/wordsize.h rename to lib/libc/include/mipsel-linux-gnueabihf/bits/semaphore.h index 9e405e4e4e..73abfb8078 100644 --- a/lib/libc/include/mips64el-linux-gnuabi64/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 . */ -#include - -#define __WORDSIZE _MIPS_SZPTR - -#if _MIPS_SIM == _ABI64 -# define __WORDSIZE_TIME64_COMPAT32 1 -#else -# define __WORDSIZE_TIME64_COMPAT32 0 +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." #endif -#if __WORDSIZE == 32 -#define __WORDSIZE32_SIZE_ULONG 0 -#define __WORDSIZE32_PTRDIFF_LONG 0 -#endif \ No newline at end of file +#if _MIPS_SIM == _ABI64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-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 + . */ + +#ifndef _SYS_SHM_H +# error "Never use directly; include 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 + . */ + +#ifndef _BITS_SIGACTION_H +#define _BITS_SIGACTION_H 1 + +#ifndef _SIGNAL_H +# error "Never include directly; use 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 + . */ + +#ifndef _BITS_SIGCONTEXT_H +#define _BITS_SIGCONTEXT_H 1 + +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H +# error "Never use directly; include instead." +#endif + +#include + +#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 + . */ + +#ifndef _SYS_SIGNALFD_H +# error "Never use directly; include 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 + . */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use instead." +#endif + +/* Adjustments and additions to the signal number constants for + Linux/MIPS. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGPWR 19 /* Power failure imminent. */ + +/* Historical signals specified by POSIX. */ +#define SIGBUS 10 /* Bus error. */ +#define SIGSYS 12 /* Bad system call. */ + +/* New(er) POSIX signals (1003.1-2008, 1003.1-2013). */ +#define SIGURG 21 /* Urgent data is available at a socket. */ +#define SIGSTOP 23 /* Stop, unblockable. */ +#define SIGTSTP 24 /* Keyboard stop. */ +#define SIGCONT 25 /* Continue. */ +#define SIGCHLD 18 /* Child terminated or stopped. */ +#define SIGTTIN 26 /* Background read from control terminal. */ +#define SIGTTOU 27 /* Background write to control terminal. */ +#define SIGPOLL 22 /* Pollable event occurred (System V). */ +#define SIGXCPU 30 /* CPU time limit exceeded. */ +#define SIGVTALRM 28 /* Virtual timer expired. */ +#define SIGPROF 29 /* Profiling timer expired. */ +#define SIGXFSZ 31 /* File size limit exceeded. */ +#define SIGUSR1 16 /* User-defined signal 1. */ +#define SIGUSR2 17 /* User-defined signal 2. */ + +/* Nonstandard signals found in all modern POSIX systems + (including both BSD and Linux). */ +#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */ + +/* Archaic names for compatibility. */ +#define SIGIO SIGPOLL /* I/O now possible (4.2 BSD). */ +#define SIGIOT SIGABRT /* IOT instruction, abort() on a PDP-11. */ +#define SIGCLD SIGCHLD /* Old System V name */ + +/* By default no real-time signals are supported. */ +#define __SIGRTMIN 32 +#define __SIGRTMAX 127 + +#endif /* included. */ \ No newline at end of file diff --git a/lib/libc/include/mipsel-linux-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 + . */ + +#ifndef _SYS_SOCKET_H +# error "Never include directly; use 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 + . */ + +#ifndef _SYS_SOCKET_H +# error "Never include directly; use 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 + . */ + +#ifndef _SYS_STATFS_H +# error "Never include directly; use instead." +#endif + +#include /* 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 + . */ + +#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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use 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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use 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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use 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 + . */ + +#ifndef _TERMIOS_H +# error "Never include directly; use 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 + . */ + +#ifndef _SYS_TIMERFD_H +# error "Never use directly; include 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 + . */ + +#ifndef __stack_t_defined +#define __stack_t_defined 1 + +#define __need_size_t +#include + +/* 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 + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include + +/* Structure of record for one message inside the kernel. + The type `struct msg' is opaque. */ +struct msqid_ds +{ +#ifdef __USE_TIME_BITS64 +# include +#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 + . */ + +#ifndef _SYS_SEM_H +# error "Never include directly; use instead." +#endif + +/* Data structure describing a set of semaphores. */ +struct semid_ds +{ +#ifdef __USE_TIME_BITS64 +# include +#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 + . */ + +#ifndef _SYS_SHM_H +# error "Never include directly; use instead." +#endif + +/* Data structure describing a shared memory segment. */ +struct shmid_ds + { +#ifdef __USE_TIME_BITS64 +# include +#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 + . */ + +#ifndef _IEEE754_H +#define _IEEE754_H 1 + +#include + +#include + +#ifndef __LDBL_MANT_DIG__ +# include +# 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/src/target.zig b/src/target.zig index 5b2f6f5978..dbdf574aa0 100644 --- a/src/target.zig +++ b/src/target.zig @@ -44,9 +44,11 @@ pub const available_libcs = [_]ArchOsAbi{ .{ .arch = .mips64, .os = .linux, .abi = .gnuabi64 }, .{ .arch = .mips64, .os = .linux, .abi = .gnuabin32 }, .{ .arch = .mips64, .os = .linux, .abi = .musl }, - .{ .arch = .mipsel, .os = .linux, .abi = .gnu }, + .{ .arch = .mipsel, .os = .linux, .abi = .gnueabi }, + .{ .arch = .mipsel, .os = .linux, .abi = .gnueabihf }, .{ .arch = .mipsel, .os = .linux, .abi = .musl }, - .{ .arch = .mips, .os = .linux, .abi = .gnu }, + .{ .arch = .mips, .os = .linux, .abi = .gnueabi }, + .{ .arch = .mips, .os = .linux, .abi = .gnueabihf }, .{ .arch = .mips, .os = .linux, .abi = .musl }, .{ .arch = .powerpc64le, .os = .linux, .abi = .gnu }, .{ .arch = .powerpc64le, .os = .linux, .abi = .musl }, diff --git a/test/tests.zig b/test/tests.zig index 99d84d14a7..306f1e829c 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -189,7 +189,7 @@ const test_targets = blk: { // .target = .{ // .cpu_arch = .mips, // .os_tag = .linux, - // .abi = .gnu, + // .abi = .gnueabihf, // }, // .link_libc = true, //}, @@ -216,7 +216,7 @@ const test_targets = blk: { // .target = .{ // .cpu_arch = .mipsel, // .os_tag = .linux, - // .abi = .gnu, + // .abi = .gnueabihf, // }, // .link_libc = true, //}, diff --git a/tools/process_headers.zig b/tools/process_headers.zig index fea50b30df..125a2eb111 100644 --- a/tools/process_headers.zig +++ b/tools/process_headers.zig @@ -122,12 +122,22 @@ const glibc_targets = [_]LibCTarget{ LibCTarget{ .name = "mipsel-linux-gnu", .arch = MultiArch{ .specific = Arch.mipsel }, - .abi = MultiAbi{ .specific = Abi.gnu }, + .abi = MultiAbi{ .specific = Abi.gnueabihf }, + }, + LibCTarget{ + .name = "mipsel-linux-gnu-soft", + .arch = MultiArch{ .specific = Arch.mipsel }, + .abi = MultiAbi{ .specific = Abi.gnueabi }, }, LibCTarget{ .name = "mips-linux-gnu", .arch = MultiArch{ .specific = Arch.mips }, - .abi = MultiAbi{ .specific = Abi.gnu }, + .abi = MultiAbi{ .specific = Abi.gnueabihf }, + }, + LibCTarget{ + .name = "mips-linux-gnu-soft", + .arch = MultiArch{ .specific = Arch.mips }, + .abi = MultiAbi{ .specific = Abi.gnueabi }, }, LibCTarget{ .name = "powerpc64le-linux-gnu",