From ce76de35f1671bf7b75e98d6d61378edef382d60 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 7 Mar 2019 12:16:10 -0500 Subject: [PATCH] multi-arch glibc headers --- CMakeLists.txt | 1720 ++++++++++++----- README.md | 2 + libc/dummy/c.zig | 19 +- libc/dummy/c/i386.zig | 71 + libc/dummy/c/x86_64.zig | 2 + libc/dummy/dl.zig | 5 - libc/dummy/m.zig | 5 - libc/dummy/pthread.zig | 5 - libc/dummy/rt.zig | 5 - libc/glibc-include/bits/initspin.h | 1 - libc/glibc-include/net/ppp-comp.h | 1 - libc/glibc-include/nfs/nfs.h | 1 - libc/glibc-include/poll.h | 1 - libc/glibc-include/sys/errno.h | 1 - libc/glibc-include/sys/fcntl.h | 1 - libc/glibc-include/sys/signal.h | 1 - libc/glibc-include/sys/soundcard.h | 1 - libc/glibc-include/sys/stropts.h | 1 - libc/glibc-include/sys/unistd.h | 1 - libc/glibc-include/sys/vt.h | 1 - libc/glibc-include/syscall.h | 1 - libc/glibc-include/syslog.h | 1 - libc/glibc-include/wait.h | 1 - libc/glibc/sysdeps/csky/abiv2/start.S | 108 -- libc/glibc/sysdeps/csky/bits/endian.h | 9 - libc/glibc/sysdeps/csky/sysdep.h | 84 - .../unix/sysv/linux/alpha/asm/unistd.h | 489 ----- .../sysdeps/unix/sysv/linux/csky/asm/unistd.h | 10 - .../sysdeps/unix/sysv/linux/csky/sysdep.h | 534 ----- .../sysdeps/unix/sysv/linux/ia64/asm/break.h | 23 - .../sysdeps/unix/sysv/linux/ia64/asm/unistd.h | 344 ---- .../sysdeps/unix/sysv/linux/m68k/asm/unistd.h | 390 ---- .../unix/sysv/linux/microblaze/asm/unistd.h | 421 ---- .../sysdeps/wordsize-32/divdi3-symbol-hacks.h | 31 + .../aarch64-linux-gnu/asm/bitsperlong.h | 24 + .../aarch64-linux-gnu}/asm/unistd.h | 0 libc/include/aarch64-linux-gnu/bits/endian.h | 30 + libc/include/aarch64-linux-gnu/bits/fcntl.h | 61 + libc/include/aarch64-linux-gnu/bits/fenv.h | 82 + libc/include/aarch64-linux-gnu/bits/floatn.h | 97 + libc/include/aarch64-linux-gnu/bits/fp-fast.h | 34 + libc/include/aarch64-linux-gnu/bits/hwcap.h | 53 + libc/include/aarch64-linux-gnu/bits/ipc.h | 54 + libc/include/aarch64-linux-gnu/bits/link.h | 60 + .../aarch64-linux-gnu/bits/local_lim.h | 101 + .../aarch64-linux-gnu/bits/long-double.h | 20 + libc/include/aarch64-linux-gnu/bits/procfs.h | 35 + .../bits/pthreadtypes-arch.h | 71 + .../aarch64-linux-gnu/bits/semaphore.h | 39 + libc/include/aarch64-linux-gnu/bits/setjmp.h | 33 + .../include/aarch64-linux-gnu/bits/sigstack.h | 32 + libc/include/aarch64-linux-gnu/bits/stat.h | 171 ++ libc/include/aarch64-linux-gnu/bits/statfs.h | 86 + .../aarch64-linux-gnu/bits/typesizes.h | 84 + .../include/aarch64-linux-gnu/bits/wordsize.h | 28 + libc/include/aarch64-linux-gnu/fpu_control.h | 90 + .../aarch64-linux-gnu/gnu/lib-names-lp64.h | 31 + .../include/aarch64-linux-gnu/gnu/lib-names.h | 16 + .../aarch64-linux-gnu/gnu/stubs-lp64.h | 30 + libc/include/aarch64-linux-gnu/gnu/stubs.h | 12 + libc/include/aarch64-linux-gnu/ieee754.h | 170 ++ libc/include/aarch64-linux-gnu/sys/elf.h | 26 + libc/include/aarch64-linux-gnu/sys/ptrace.h | 148 ++ libc/include/aarch64-linux-gnu/sys/ucontext.h | 78 + libc/include/aarch64-linux-gnu/sys/user.h | 37 + .../aarch64_be-linux-gnu/asm/bitsperlong.h | 24 + .../include/aarch64_be-linux-gnu/asm/unistd.h | 21 + .../aarch64_be-linux-gnu/bits/endian.h | 30 + .../include/aarch64_be-linux-gnu/bits/fcntl.h | 61 + libc/include/aarch64_be-linux-gnu/bits/fenv.h | 82 + .../aarch64_be-linux-gnu/bits/floatn.h | 97 + .../aarch64_be-linux-gnu/bits/fp-fast.h | 34 + .../include/aarch64_be-linux-gnu/bits/hwcap.h | 53 + libc/include/aarch64_be-linux-gnu/bits/ipc.h | 54 + libc/include/aarch64_be-linux-gnu/bits/link.h | 60 + .../aarch64_be-linux-gnu/bits/local_lim.h | 101 + .../aarch64_be-linux-gnu/bits/long-double.h | 20 + .../aarch64_be-linux-gnu/bits/procfs.h | 35 + .../bits/pthreadtypes-arch.h | 71 + .../aarch64_be-linux-gnu/bits/semaphore.h | 39 + .../aarch64_be-linux-gnu/bits/setjmp.h | 33 + .../aarch64_be-linux-gnu/bits/sigstack.h | 32 + libc/include/aarch64_be-linux-gnu/bits/stat.h | 171 ++ .../aarch64_be-linux-gnu/bits/statfs.h | 86 + .../aarch64_be-linux-gnu/bits/typesizes.h | 84 + .../aarch64_be-linux-gnu/bits/wordsize.h | 28 + .../aarch64_be-linux-gnu/fpu_control.h | 90 + .../gnu/lib-names-lp64_be.h | 31 + .../aarch64_be-linux-gnu/gnu/lib-names.h | 16 + .../aarch64_be-linux-gnu/gnu/stubs-lp64_be.h | 30 + libc/include/aarch64_be-linux-gnu/gnu/stubs.h | 12 + libc/include/aarch64_be-linux-gnu/ieee754.h | 170 ++ libc/include/aarch64_be-linux-gnu/sys/elf.h | 26 + .../include/aarch64_be-linux-gnu/sys/ptrace.h | 148 ++ .../aarch64_be-linux-gnu/sys/ucontext.h | 78 + libc/include/aarch64_be-linux-gnu/sys/user.h | 37 + .../arm-linux-gnueabi}/asm/unistd.h | 0 libc/include/arm-linux-gnueabi/bits/endian.h | 10 + libc/include/arm-linux-gnueabi/bits/fcntl.h | 54 + libc/include/arm-linux-gnueabi/bits/fenv.h | 90 + libc/include/arm-linux-gnueabi/bits/floatn.h | 52 + libc/include/arm-linux-gnueabi/bits/hwcap.h | 45 + libc/include/arm-linux-gnueabi/bits/link.h | 65 + .../arm-linux-gnueabi/bits/long-double.h | 39 + .../arm-linux-gnueabi/bits/procfs-id.h | 25 + libc/include/arm-linux-gnueabi/bits/procfs.h | 34 + .../bits/pthreadtypes-arch.h | 37 +- .../arm-linux-gnueabi/bits/semaphore.h | 34 + libc/include/arm-linux-gnueabi/bits/setjmp.h | 36 + libc/include/arm-linux-gnueabi/bits/shmlba.h | 29 + libc/include/arm-linux-gnueabi/bits/stat.h | 172 ++ .../include/arm-linux-gnueabi/bits/wordsize.h | 21 + libc/include/arm-linux-gnueabi/fpu_control.h | 75 + .../include/arm-linux-gnueabi/gnu/lib-names.h | 14 + libc/include/arm-linux-gnueabi/gnu/stubs.h | 11 + libc/include/arm-linux-gnueabi/sys/ptrace.h | 208 ++ libc/include/arm-linux-gnueabi/sys/ucontext.h | 144 ++ libc/include/arm-linux-gnueabi/sys/user.h | 71 + libc/include/arm-linux-gnueabihf/asm/unistd.h | 41 + .../include/arm-linux-gnueabihf/bits/endian.h | 10 + libc/include/arm-linux-gnueabihf/bits/fcntl.h | 54 + libc/include/arm-linux-gnueabihf/bits/fenv.h | 90 + .../include/arm-linux-gnueabihf/bits/floatn.h | 52 + libc/include/arm-linux-gnueabihf/bits/hwcap.h | 45 + libc/include/arm-linux-gnueabihf/bits/link.h | 65 + .../arm-linux-gnueabihf/bits/long-double.h | 39 + .../arm-linux-gnueabihf/bits/procfs-id.h | 25 + .../include/arm-linux-gnueabihf/bits/procfs.h | 34 + .../bits/pthreadtypes-arch.h | 71 + .../arm-linux-gnueabihf/bits/semaphore.h | 34 + .../include/arm-linux-gnueabihf/bits/setjmp.h | 36 + .../include/arm-linux-gnueabihf/bits/shmlba.h | 29 + libc/include/arm-linux-gnueabihf/bits/stat.h | 172 ++ .../arm-linux-gnueabihf/bits/wordsize.h | 21 + .../include/arm-linux-gnueabihf/fpu_control.h | 75 + .../arm-linux-gnueabihf/gnu/lib-names.h | 14 + libc/include/arm-linux-gnueabihf/gnu/stubs.h | 11 + libc/include/arm-linux-gnueabihf/sys/ptrace.h | 208 ++ .../arm-linux-gnueabihf/sys/ucontext.h | 144 ++ libc/include/arm-linux-gnueabihf/sys/user.h | 71 + libc/include/armeb-linux-gnueabi/asm/unistd.h | 41 + .../include/armeb-linux-gnueabi/bits/endian.h | 10 + libc/include/armeb-linux-gnueabi/bits/fcntl.h | 54 + libc/include/armeb-linux-gnueabi/bits/fenv.h | 90 + .../include/armeb-linux-gnueabi/bits/floatn.h | 52 + libc/include/armeb-linux-gnueabi/bits/hwcap.h | 45 + libc/include/armeb-linux-gnueabi/bits/link.h | 65 + .../armeb-linux-gnueabi/bits/long-double.h | 39 + .../armeb-linux-gnueabi/bits/procfs-id.h | 25 + .../include/armeb-linux-gnueabi/bits/procfs.h | 34 + .../bits/pthreadtypes-arch.h | 71 + .../armeb-linux-gnueabi/bits/semaphore.h | 34 + .../include/armeb-linux-gnueabi/bits/setjmp.h | 36 + .../include/armeb-linux-gnueabi/bits/shmlba.h | 29 + libc/include/armeb-linux-gnueabi/bits/stat.h | 172 ++ .../armeb-linux-gnueabi/bits/wordsize.h | 21 + .../include/armeb-linux-gnueabi/fpu_control.h | 75 + .../armeb-linux-gnueabi/gnu/lib-names.h | 14 + libc/include/armeb-linux-gnueabi/gnu/stubs.h | 11 + libc/include/armeb-linux-gnueabi/sys/ptrace.h | 208 ++ .../armeb-linux-gnueabi/sys/ucontext.h | 144 ++ libc/include/armeb-linux-gnueabi/sys/user.h | 71 + .../armeb-linux-gnueabihf/asm/unistd.h | 41 + .../armeb-linux-gnueabihf/bits/endian.h | 10 + .../armeb-linux-gnueabihf/bits/fcntl.h | 54 + .../include/armeb-linux-gnueabihf/bits/fenv.h | 90 + .../armeb-linux-gnueabihf/bits/floatn.h | 52 + .../armeb-linux-gnueabihf/bits/hwcap.h | 45 + .../include/armeb-linux-gnueabihf/bits/link.h | 65 + .../armeb-linux-gnueabihf/bits/long-double.h | 39 + .../armeb-linux-gnueabihf/bits/procfs-id.h | 25 + .../armeb-linux-gnueabihf/bits/procfs.h | 34 + .../bits/pthreadtypes-arch.h | 71 + .../armeb-linux-gnueabihf/bits/semaphore.h | 34 + .../armeb-linux-gnueabihf/bits/setjmp.h | 36 + .../armeb-linux-gnueabihf/bits/shmlba.h | 29 + .../include/armeb-linux-gnueabihf/bits/stat.h | 172 ++ .../armeb-linux-gnueabihf/bits/wordsize.h | 21 + .../armeb-linux-gnueabihf/fpu_control.h | 75 + .../armeb-linux-gnueabihf/gnu/lib-names.h | 14 + .../include/armeb-linux-gnueabihf/gnu/stubs.h | 11 + .../armeb-linux-gnueabihf/sys/ptrace.h | 208 ++ .../armeb-linux-gnueabihf/sys/ucontext.h | 144 ++ libc/include/armeb-linux-gnueabihf/sys/user.h | 71 + .../generic-glibc}/a.out.h | 6 +- .../generic-glibc}/aio.h | 2 +- .../generic-glibc}/aliases.h | 2 +- .../generic-glibc}/alloca.h | 2 +- .../generic-glibc}/ar.h | 2 +- .../generic-glibc}/argp.h | 6 +- .../generic-glibc}/argz.h | 2 +- .../generic-glibc}/arpa/ftp.h | 2 +- .../generic-glibc}/arpa/inet.h | 2 +- .../generic-glibc}/arpa/nameser.h | 2 +- .../generic-glibc}/arpa/nameser_compat.h | 2 +- .../generic-glibc}/arpa/telnet.h | 2 +- .../generic-glibc}/arpa/tftp.h | 2 +- .../generic-glibc/asm-generic/bitsperlong.h | 16 + .../generic-glibc}/asm-generic/unistd.h | 0 .../generic-glibc}/asm/unistd_32.h | 0 .../generic-glibc}/asm/unistd_64.h | 0 .../generic-glibc}/assert.h | 2 +- libc/include/generic-glibc/bits/a.out.h | 7 + libc/include/generic-glibc/bits/argp-ldbl.h | 24 + .../generic-glibc}/bits/byteswap.h | 2 +- .../generic-glibc}/bits/cmathcalls.h | 2 +- .../generic-glibc}/bits/confname.h | 2 +- .../generic-glibc}/bits/cpu-set.h | 2 +- .../generic-glibc}/bits/dirent.h | 2 +- .../generic-glibc}/bits/dlfcn.h | 2 +- .../generic-glibc}/bits/elfclass.h | 2 +- libc/include/generic-glibc/bits/endian.h | 15 + .../include/generic-glibc/bits/environments.h | 87 + libc/include/generic-glibc/bits/epoll.h | 27 + libc/include/generic-glibc/bits/err-ldbl.h | 30 + .../generic-glibc}/bits/errno.h | 2 +- libc/include/generic-glibc/bits/error-ldbl.h | 24 + .../generic-glibc}/bits/error.h | 2 +- .../generic-glibc}/bits/eventfd.h | 2 +- .../generic-glibc}/bits/fcntl-linux.h | 2 +- libc/include/generic-glibc/bits/fcntl.h | 104 + .../generic-glibc}/bits/fcntl2.h | 2 +- libc/include/generic-glibc/bits/fenv.h | 113 ++ .../generic-glibc}/bits/fenvinline.h | 2 +- .../generic-glibc}/bits/floatn-common.h | 2 +- libc/include/generic-glibc/bits/floatn.h | 97 + .../generic-glibc/bits/flt-eval-method.h | 42 + .../generic-glibc}/bits/fp-fast.h | 2 +- libc/include/generic-glibc/bits/fp-logb.h | 28 + .../generic-glibc}/bits/getopt_core.h | 2 +- .../generic-glibc}/bits/getopt_ext.h | 2 +- .../generic-glibc}/bits/getopt_posix.h | 2 +- .../generic-glibc}/bits/hwcap.h | 2 +- .../generic-glibc}/bits/in.h | 2 +- .../generic-glibc/bits/indirect-return.h | 25 + libc/include/generic-glibc/bits/initspin.h | 1 + .../generic-glibc}/bits/inotify.h | 2 +- .../generic-glibc}/bits/ioctl-types.h | 2 +- .../generic-glibc}/bits/ioctls.h | 2 +- .../generic-glibc}/bits/ipc.h | 2 +- libc/include/generic-glibc/bits/ipctypes.h | 36 + libc/include/generic-glibc/bits/iscanonical.h | 28 + .../generic-glibc}/bits/libc-header-start.h | 2 +- .../bits/libm-simd-decl-stubs.h | 2 +- libc/include/generic-glibc/bits/link.h | 117 ++ .../generic-glibc}/bits/local_lim.h | 2 +- .../generic-glibc}/bits/locale.h | 2 +- libc/include/generic-glibc/bits/long-double.h | 23 + .../generic-glibc}/bits/math-finite.h | 2 +- .../generic-glibc/bits/math-vector-fortran.h | 19 + libc/include/generic-glibc/bits/math-vector.h | 27 + .../bits/mathcalls-helper-functions.h | 2 +- .../generic-glibc}/bits/mathcalls-narrow.h | 2 +- .../generic-glibc}/bits/mathcalls.h | 2 +- .../generic-glibc}/bits/mathdef.h | 2 +- .../generic-glibc}/bits/mathinline.h | 2 +- .../generic-glibc}/bits/mman-linux.h | 2 +- .../bits/mman-map-flags-generic.h | 2 +- .../generic-glibc}/bits/mman-shared.h | 2 +- libc/include/generic-glibc/bits/mman.h | 32 + .../generic-glibc}/bits/monetary-ldbl.h | 2 +- .../generic-glibc}/bits/mqueue.h | 2 +- .../generic-glibc}/bits/mqueue2.h | 2 +- .../generic-glibc}/bits/msq-pad.h | 2 +- .../generic-glibc}/bits/msq.h | 2 +- .../generic-glibc}/bits/netdb.h | 2 +- .../generic-glibc}/bits/param.h | 2 +- .../generic-glibc}/bits/poll.h | 2 +- .../generic-glibc}/bits/poll2.h | 2 +- .../generic-glibc}/bits/posix1_lim.h | 2 +- .../generic-glibc}/bits/posix2_lim.h | 2 +- .../generic-glibc}/bits/posix_opt.h | 7 +- libc/include/generic-glibc/bits/ppc.h | 33 + .../generic-glibc}/bits/printf-ldbl.h | 2 +- .../generic-glibc}/bits/procfs-extra.h | 2 +- libc/include/generic-glibc/bits/procfs-id.h | 25 + .../generic-glibc}/bits/procfs-prregset.h | 2 +- libc/include/generic-glibc/bits/procfs.h | 37 + .../generic-glibc/bits/pthreadtypes-arch.h | 89 + .../generic-glibc}/bits/pthreadtypes.h | 2 +- .../generic-glibc}/bits/ptrace-shared.h | 2 +- .../generic-glibc}/bits/resource.h | 2 +- .../generic-glibc}/bits/sched.h | 2 +- libc/include/generic-glibc/bits/select.h | 37 + .../generic-glibc}/bits/select2.h | 2 +- libc/include/generic-glibc/bits/sem-pad.h | 33 + .../generic-glibc}/bits/sem.h | 2 +- libc/include/generic-glibc/bits/semaphore.h | 36 + libc/include/generic-glibc/bits/setjmp.h | 73 + .../generic-glibc}/bits/setjmp2.h | 2 +- .../generic-glibc}/bits/shm-pad.h | 2 +- .../generic-glibc}/bits/shm.h | 2 +- .../generic-glibc}/bits/shmlba.h | 2 +- .../generic-glibc}/bits/sigaction.h | 2 +- libc/include/generic-glibc/bits/sigcontext.h | 37 + .../generic-glibc}/bits/sigevent-consts.h | 2 +- .../include/generic-glibc/bits/siginfo-arch.h | 7 + .../generic-glibc}/bits/siginfo-consts-arch.h | 2 +- .../generic-glibc}/bits/siginfo-consts.h | 2 +- .../generic-glibc}/bits/signalfd.h | 2 +- .../generic-glibc}/bits/signum-generic.h | 2 +- .../generic-glibc}/bits/signum.h | 2 +- .../generic-glibc}/bits/sigstack.h | 2 +- .../generic-glibc}/bits/sigthread.h | 2 +- .../generic-glibc}/bits/sockaddr.h | 2 +- .../generic-glibc}/bits/socket.h | 2 +- .../generic-glibc}/bits/socket2.h | 2 +- .../generic-glibc}/bits/socket_type.h | 2 +- .../generic-glibc}/bits/ss_flags.h | 2 +- .../generic-glibc}/bits/stab.def | 2 +- libc/include/generic-glibc/bits/stat.h | 263 +++ .../generic-glibc}/bits/statfs.h | 2 +- .../generic-glibc}/bits/statvfs.h | 2 +- .../generic-glibc}/bits/statx.h | 2 +- .../generic-glibc}/bits/stdint-intn.h | 2 +- .../generic-glibc}/bits/stdint-uintn.h | 2 +- .../generic-glibc}/bits/stdio-ldbl.h | 2 +- .../generic-glibc}/bits/stdio.h | 2 +- .../generic-glibc}/bits/stdio2.h | 2 +- .../generic-glibc}/bits/stdio_lim.h | 2 +- .../generic-glibc}/bits/stdlib-bsearch.h | 2 +- .../generic-glibc}/bits/stdlib-float.h | 2 +- .../generic-glibc}/bits/stdlib-ldbl.h | 2 +- .../generic-glibc}/bits/stdlib.h | 2 +- .../generic-glibc}/bits/string_fortified.h | 2 +- .../generic-glibc}/bits/strings_fortified.h | 2 +- .../generic-glibc}/bits/stropts.h | 2 +- .../generic-glibc}/bits/sys_errlist.h | 2 +- .../generic-glibc}/bits/syscall.h | 3 +- libc/include/generic-glibc/bits/sysctl.h | 1 + .../generic-glibc}/bits/syslog-ldbl.h | 2 +- .../generic-glibc}/bits/syslog-path.h | 2 +- .../generic-glibc}/bits/syslog.h | 2 +- .../generic-glibc}/bits/sysmacros.h | 2 +- .../generic-glibc}/bits/termios-baud.h | 2 +- .../generic-glibc}/bits/termios-c_cc.h | 2 +- .../generic-glibc}/bits/termios-c_cflag.h | 2 +- .../generic-glibc}/bits/termios-c_iflag.h | 2 +- .../generic-glibc}/bits/termios-c_lflag.h | 2 +- .../generic-glibc}/bits/termios-c_oflag.h | 2 +- .../generic-glibc}/bits/termios-misc.h | 2 +- .../generic-glibc}/bits/termios-struct.h | 2 +- .../generic-glibc}/bits/termios-tcflow.h | 2 +- .../generic-glibc}/bits/termios.h | 2 +- .../generic-glibc}/bits/thread-shared-types.h | 2 +- .../generic-glibc}/bits/time.h | 2 +- .../generic-glibc}/bits/time64.h | 2 +- .../generic-glibc}/bits/timerfd.h | 2 +- libc/include/generic-glibc/bits/timesize.h | 22 + .../generic-glibc}/bits/timex.h | 6 +- .../generic-glibc}/bits/types.h | 2 +- .../generic-glibc}/bits/types/FILE.h | 2 +- .../generic-glibc}/bits/types/__FILE.h | 2 +- .../generic-glibc}/bits/types/__fpos64_t.h | 2 +- .../generic-glibc}/bits/types/__fpos_t.h | 2 +- .../generic-glibc}/bits/types/__locale_t.h | 2 +- .../generic-glibc}/bits/types/__mbstate_t.h | 2 +- .../generic-glibc}/bits/types/__sigset_t.h | 2 +- .../generic-glibc}/bits/types/__sigval_t.h | 2 +- .../generic-glibc}/bits/types/clock_t.h | 2 +- .../generic-glibc}/bits/types/clockid_t.h | 2 +- .../bits/types/cookie_io_functions_t.h | 2 +- .../generic-glibc}/bits/types/error_t.h | 2 +- .../generic-glibc}/bits/types/locale_t.h | 2 +- .../generic-glibc}/bits/types/mbstate_t.h | 2 +- .../generic-glibc}/bits/types/res_state.h | 2 +- .../generic-glibc}/bits/types/sig_atomic_t.h | 2 +- .../generic-glibc}/bits/types/sigevent_t.h | 2 +- .../generic-glibc}/bits/types/siginfo_t.h | 2 +- .../generic-glibc}/bits/types/sigset_t.h | 2 +- .../generic-glibc}/bits/types/sigval_t.h | 2 +- .../generic-glibc}/bits/types/stack_t.h | 2 +- .../generic-glibc}/bits/types/struct_FILE.h | 2 +- .../generic-glibc}/bits/types/struct_iovec.h | 2 +- .../bits/types/struct_itimerspec.h | 2 +- .../bits/types/struct_osockaddr.h | 2 +- .../generic-glibc}/bits/types/struct_rusage.h | 2 +- .../bits/types/struct_sched_param.h | 2 +- .../bits/types/struct_sigstack.h | 2 +- .../bits/types/struct_timespec.h | 2 +- .../bits/types/struct_timeval.h | 2 +- .../generic-glibc}/bits/types/struct_tm.h | 2 +- .../generic-glibc}/bits/types/time_t.h | 2 +- .../generic-glibc}/bits/types/timer_t.h | 2 +- .../generic-glibc}/bits/types/wint_t.h | 2 +- libc/include/generic-glibc/bits/typesizes.h | 83 + .../generic-glibc}/bits/uintn-identity.h | 2 +- .../generic-glibc}/bits/uio-ext.h | 2 +- .../generic-glibc}/bits/uio_lim.h | 2 +- .../generic-glibc}/bits/unistd.h | 2 +- libc/include/generic-glibc/bits/unistd_ext.h | 36 + .../generic-glibc}/bits/utmp.h | 2 +- .../generic-glibc}/bits/utmpx.h | 2 +- .../generic-glibc}/bits/utsname.h | 2 +- .../generic-glibc}/bits/waitflags.h | 2 +- .../generic-glibc}/bits/waitstatus.h | 2 +- .../generic-glibc}/bits/wchar-ldbl.h | 2 +- .../generic-glibc}/bits/wchar.h | 2 +- .../generic-glibc}/bits/wchar2.h | 2 +- .../generic-glibc}/bits/wctype-wchar.h | 2 +- libc/include/generic-glibc/bits/wordsize.h | 31 + .../generic-glibc}/bits/xopen_lim.h | 2 +- libc/include/generic-glibc/bits/xtitypes.h | 33 + .../generic-glibc}/byteswap.h | 2 +- .../generic-glibc}/complex.h | 2 +- .../generic-glibc}/cpio.h | 2 +- .../generic-glibc}/crypt.h | 2 +- .../generic-glibc}/ctype.h | 2 +- .../generic-glibc}/dirent.h | 6 +- .../generic-glibc}/dlfcn.h | 2 +- .../generic-glibc}/elf.h | 2 +- .../generic-glibc}/endian.h | 2 +- .../generic-glibc}/envz.h | 2 +- .../generic-glibc}/err.h | 6 +- .../generic-glibc}/errno.h | 2 +- .../generic-glibc}/error.h | 14 +- .../generic-glibc}/execinfo.h | 2 +- .../generic-glibc}/fcntl.h | 2 +- .../generic-glibc}/features.h | 10 +- .../generic-glibc}/fenv.h | 2 +- .../generic-glibc}/fmtmsg.h | 2 +- .../generic-glibc}/fnmatch.h | 2 +- .../generic-glibc/fpregdef.h} | 12 +- libc/include/generic-glibc/fpu_control.h | 133 ++ .../generic-glibc}/fstab.h | 2 +- .../generic-glibc}/fts.h | 2 +- .../generic-glibc}/ftw.h | 2 +- .../generic-glibc}/gconv.h | 2 +- .../generic-glibc}/getopt.h | 2 +- .../generic-glibc}/glob.h | 16 +- .../generic-glibc}/gnu-versions.h | 2 +- libc/include/generic-glibc/gnu/lib-names-32.h | 31 + .../generic-glibc/gnu/lib-names-hard.h | 31 + .../generic-glibc/gnu/lib-names-n32_hard.h | 30 + .../generic-glibc/gnu/lib-names-n64_hard.h | 30 + .../generic-glibc/gnu/lib-names-o32_hard.h | 30 + .../generic-glibc/gnu/lib-names-soft.h | 31 + libc/include/generic-glibc/gnu/lib-names.h | 46 + .../generic-glibc}/gnu/libc-version.h | 2 +- libc/include/generic-glibc/gnu/stubs-32.h | 20 + libc/include/generic-glibc/gnu/stubs-hard.h | 27 + .../generic-glibc/gnu/stubs-n32_hard.h | 22 + .../generic-glibc/gnu/stubs-n64_hard.h | 22 + .../generic-glibc/gnu/stubs-o32_hard.h | 20 + libc/include/generic-glibc/gnu/stubs-soft.h | 27 + libc/include/generic-glibc/gnu/stubs.h | 42 + .../generic-glibc}/grp.h | 2 +- .../generic-glibc}/gshadow.h | 2 +- .../generic-glibc}/iconv.h | 2 +- .../generic-glibc}/ieee754.h | 2 +- .../generic-glibc}/ifaddrs.h | 2 +- .../generic-glibc}/inttypes.h | 2 +- .../generic-glibc}/langinfo.h | 2 +- .../generic-glibc}/lastlog.h | 2 +- .../generic-glibc}/libgen.h | 2 +- .../generic-glibc}/libintl.h | 2 +- .../generic-glibc}/limits.h | 2 +- .../generic-glibc}/link.h | 2 +- .../generic-glibc}/locale.h | 2 +- .../generic-glibc}/malloc.h | 2 +- .../generic-glibc}/math.h | 2 +- .../generic-glibc}/mcheck.h | 2 +- .../generic-glibc}/memory.h | 2 +- .../generic-glibc}/mntent.h | 2 +- .../generic-glibc}/monetary.h | 2 +- .../generic-glibc}/mqueue.h | 2 +- .../generic-glibc}/net/ethernet.h | 2 +- .../generic-glibc}/net/if.h | 2 +- .../generic-glibc}/net/if_arp.h | 2 +- .../generic-glibc}/net/if_packet.h | 2 +- .../generic-glibc}/net/if_ppp.h | 2 +- .../generic-glibc}/net/if_shaper.h | 2 +- .../generic-glibc}/net/if_slip.h | 2 +- libc/include/generic-glibc/net/ppp-comp.h | 1 + .../generic-glibc}/net/ppp_defs.h | 2 +- .../generic-glibc}/net/route.h | 2 +- .../generic-glibc}/netash/ash.h | 2 +- .../generic-glibc}/netatalk/at.h | 2 +- .../generic-glibc}/netax25/ax25.h | 2 +- .../generic-glibc}/netdb.h | 4 +- .../generic-glibc}/neteconet/ec.h | 2 +- .../generic-glibc}/netinet/ether.h | 2 +- .../generic-glibc}/netinet/icmp6.h | 2 +- .../generic-glibc}/netinet/if_ether.h | 2 +- .../generic-glibc}/netinet/if_fddi.h | 2 +- .../generic-glibc}/netinet/if_tr.h | 2 +- .../generic-glibc}/netinet/igmp.h | 2 +- .../generic-glibc}/netinet/in.h | 10 +- .../generic-glibc}/netinet/in_systm.h | 2 +- .../generic-glibc}/netinet/ip.h | 2 +- .../generic-glibc}/netinet/ip6.h | 2 +- .../generic-glibc}/netinet/ip_icmp.h | 12 +- .../generic-glibc}/netinet/tcp.h | 2 +- .../generic-glibc}/netinet/udp.h | 2 +- .../generic-glibc}/netipx/ipx.h | 2 +- .../generic-glibc}/netiucv/iucv.h | 2 +- .../generic-glibc}/netpacket/packet.h | 2 +- .../generic-glibc}/netrom/netrom.h | 2 +- .../generic-glibc}/netrose/rose.h | 2 +- libc/include/generic-glibc/nfs/nfs.h | 1 + .../generic-glibc}/nl_types.h | 2 +- .../generic-glibc}/nss.h | 2 +- .../generic-glibc}/obstack.h | 2 +- .../generic-glibc}/paths.h | 2 +- libc/include/generic-glibc/poll.h | 1 + .../generic-glibc}/printf.h | 2 +- .../generic-glibc}/proc_service.h | 2 +- .../generic-glibc}/protocols/routed.h | 2 +- .../generic-glibc}/protocols/rwhod.h | 2 +- .../generic-glibc}/protocols/talkd.h | 2 +- .../generic-glibc}/protocols/timed.h | 2 +- .../generic-glibc}/pthread.h | 2 +- .../generic-glibc}/pty.h | 2 +- .../generic-glibc}/pwd.h | 2 +- .../generic-glibc}/re_comp.h | 2 +- libc/include/generic-glibc/regdef.h | 25 + .../generic-glibc}/regex.h | 2 +- .../generic-glibc}/regexp.h | 2 +- .../generic-glibc}/resolv.h | 2 +- .../generic-glibc}/rpc/netdb.h | 2 +- .../generic-glibc}/sched.h | 2 +- .../generic-glibc}/scsi/scsi.h | 2 +- .../generic-glibc}/scsi/scsi_ioctl.h | 2 +- .../generic-glibc}/scsi/sg.h | 2 +- .../generic-glibc}/search.h | 2 +- .../generic-glibc}/semaphore.h | 2 +- .../generic-glibc}/setjmp.h | 2 +- libc/include/generic-glibc/sgidefs.h | 76 + .../generic-glibc}/sgtty.h | 2 +- .../generic-glibc}/shadow.h | 2 +- .../generic-glibc}/signal.h | 2 +- .../generic-glibc}/spawn.h | 67 +- .../generic-glibc}/stab.h | 2 +- .../generic-glibc}/stdc-predef.h | 2 +- .../generic-glibc}/stdint.h | 2 +- .../generic-glibc}/stdio.h | 2 +- .../generic-glibc}/stdio_ext.h | 2 +- .../generic-glibc}/stdlib.h | 2 +- .../generic-glibc}/string.h | 2 +- .../generic-glibc}/strings.h | 2 +- .../generic-glibc}/stropts.h | 2 +- .../generic-glibc}/sys/acct.h | 2 +- libc/include/generic-glibc/sys/asm.h | 498 +++++ .../generic-glibc}/sys/auxv.h | 2 +- .../generic-glibc}/sys/bitypes.h | 2 +- libc/include/generic-glibc/sys/cachectl.h | 41 + .../generic-glibc}/sys/cdefs.h | 6 +- .../generic-glibc}/sys/debugreg.h | 2 +- .../generic-glibc}/sys/dir.h | 2 +- libc/include/generic-glibc/sys/elf.h | 25 + .../generic-glibc}/sys/epoll.h | 2 +- libc/include/generic-glibc/sys/errno.h | 1 + .../generic-glibc}/sys/eventfd.h | 2 +- .../generic-glibc}/sys/fanotify.h | 2 +- libc/include/generic-glibc/sys/fcntl.h | 1 + .../generic-glibc}/sys/file.h | 2 +- libc/include/generic-glibc/sys/fpregdef.h | 118 ++ .../generic-glibc}/sys/fsuid.h | 2 +- .../generic-glibc}/sys/gmon.h | 2 +- .../generic-glibc}/sys/gmon_out.h | 2 +- .../generic-glibc}/sys/inotify.h | 2 +- libc/include/generic-glibc/sys/io.h | 47 + .../generic-glibc}/sys/ioctl.h | 2 +- .../generic-glibc}/sys/ipc.h | 2 +- .../generic-glibc}/sys/kd.h | 2 +- .../generic-glibc}/sys/klog.h | 2 +- .../generic-glibc}/sys/mman.h | 2 +- .../generic-glibc}/sys/mount.h | 2 +- .../generic-glibc}/sys/msg.h | 2 +- .../generic-glibc}/sys/mtio.h | 2 +- .../generic-glibc}/sys/param.h | 2 +- .../generic-glibc}/sys/pci.h | 2 +- .../generic-glibc}/sys/perm.h | 2 +- .../generic-glibc}/sys/personality.h | 2 +- libc/include/generic-glibc/sys/platform/ppc.h | 146 ++ .../generic-glibc}/sys/poll.h | 2 +- .../generic-glibc}/sys/prctl.h | 2 +- .../generic-glibc}/sys/procfs.h | 2 +- .../generic-glibc}/sys/profil.h | 2 +- libc/include/generic-glibc/sys/ptrace.h | 178 ++ .../generic-glibc}/sys/queue.h | 2 +- .../generic-glibc}/sys/quota.h | 2 +- .../generic-glibc}/sys/random.h | 2 +- .../generic-glibc}/sys/raw.h | 2 +- .../generic-glibc}/sys/reboot.h | 2 +- .../generic-glibc}/sys/reg.h | 2 +- libc/include/generic-glibc/sys/regdef.h | 81 + .../generic-glibc}/sys/resource.h | 2 +- .../generic-glibc}/sys/select.h | 2 +- .../generic-glibc}/sys/sem.h | 2 +- .../generic-glibc}/sys/sendfile.h | 2 +- .../generic-glibc}/sys/shm.h | 2 +- libc/include/generic-glibc/sys/signal.h | 1 + .../generic-glibc}/sys/signalfd.h | 2 +- .../generic-glibc}/sys/socket.h | 2 +- .../generic-glibc}/sys/socketvar.h | 2 +- libc/include/generic-glibc/sys/soundcard.h | 1 + .../generic-glibc}/sys/stat.h | 2 +- .../generic-glibc}/sys/statfs.h | 2 +- .../generic-glibc}/sys/statvfs.h | 2 +- libc/include/generic-glibc/sys/stropts.h | 1 + .../generic-glibc}/sys/swap.h | 2 +- .../generic-glibc}/sys/syscall.h | 2 +- .../generic-glibc}/sys/sysctl.h | 2 +- .../generic-glibc}/sys/sysinfo.h | 2 +- .../generic-glibc}/sys/syslog.h | 2 +- .../generic-glibc}/sys/sysmacros.h | 2 +- libc/include/generic-glibc/sys/sysmips.h | 42 + libc/include/generic-glibc/sys/tas.h | 70 + .../generic-glibc}/sys/termios.h | 2 +- .../generic-glibc}/sys/time.h | 8 +- .../generic-glibc}/sys/timeb.h | 2 +- .../generic-glibc}/sys/timerfd.h | 2 +- .../generic-glibc}/sys/times.h | 2 +- .../generic-glibc}/sys/timex.h | 2 +- .../generic-glibc}/sys/ttychars.h | 2 +- .../generic-glibc}/sys/ttydefaults.h | 2 +- .../generic-glibc}/sys/types.h | 2 +- libc/include/generic-glibc/sys/ucontext.h | 124 ++ .../generic-glibc}/sys/uio.h | 2 +- .../generic-glibc}/sys/un.h | 2 +- libc/include/generic-glibc/sys/unistd.h | 1 + libc/include/generic-glibc/sys/user.h | 210 ++ .../generic-glibc}/sys/utsname.h | 2 +- .../generic-glibc}/sys/vfs.h | 2 +- .../generic-glibc}/sys/vlimit.h | 2 +- .../generic-glibc}/sys/vm86.h | 2 +- libc/include/generic-glibc/sys/vt.h | 1 + .../generic-glibc}/sys/vtimes.h | 2 +- .../generic-glibc}/sys/wait.h | 2 +- .../generic-glibc}/sys/xattr.h | 2 +- libc/include/generic-glibc/syscall.h | 1 + .../generic-glibc}/sysexits.h | 2 +- libc/include/generic-glibc/syslog.h | 1 + .../generic-glibc}/tar.h | 2 +- .../generic-glibc}/termio.h | 2 +- .../generic-glibc}/termios.h | 2 +- .../generic-glibc}/tgmath.h | 2 +- .../generic-glibc}/thread_db.h | 2 +- .../generic-glibc}/threads.h | 2 +- .../generic-glibc}/time.h | 2 +- .../generic-glibc}/ttyent.h | 2 +- .../generic-glibc}/uchar.h | 2 +- .../generic-glibc}/ucontext.h | 2 +- .../generic-glibc}/ulimit.h | 2 +- .../generic-glibc}/unistd.h | 5 +- .../generic-glibc}/utime.h | 2 +- .../generic-glibc}/utmp.h | 2 +- .../generic-glibc}/utmpx.h | 2 +- .../generic-glibc}/values.h | 2 +- libc/include/generic-glibc/wait.h | 1 + .../generic-glibc}/wchar.h | 2 +- .../generic-glibc}/wctype.h | 2 +- .../generic-glibc}/wordexp.h | 6 +- .../i386-linux-gnu}/asm/unistd.h | 0 .../i386-linux-gnu}/bits/a.out.h | 2 +- .../i386-linux-gnu}/bits/endian.h | 2 +- .../i386-linux-gnu}/bits/environments.h | 2 +- .../i386-linux-gnu}/bits/epoll.h | 2 +- .../i386-linux-gnu}/bits/fcntl.h | 2 +- .../i386-linux-gnu}/bits/fenv.h | 2 +- .../i386-linux-gnu}/bits/floatn.h | 2 +- .../i386-linux-gnu}/bits/flt-eval-method.h | 2 +- .../i386-linux-gnu}/bits/fp-logb.h | 2 +- .../i386-linux-gnu}/bits/indirect-return.h | 2 +- .../i386-linux-gnu}/bits/ipctypes.h | 2 +- .../i386-linux-gnu}/bits/iscanonical.h | 2 +- .../i386-linux-gnu}/bits/link.h | 2 +- .../i386-linux-gnu}/bits/long-double.h | 2 +- .../i386-linux-gnu/bits/math-vector-fortran.h | 43 + .../i386-linux-gnu}/bits/math-vector.h | 2 +- .../i386-linux-gnu}/bits/mman.h | 2 +- .../i386-linux-gnu}/bits/procfs-id.h | 2 +- .../i386-linux-gnu}/bits/procfs.h | 4 +- .../i386-linux-gnu}/bits/pthreadtypes-arch.h | 2 +- .../i386-linux-gnu}/bits/select.h | 2 +- .../i386-linux-gnu}/bits/sem-pad.h | 2 +- .../i386-linux-gnu}/bits/semaphore.h | 2 +- .../i386-linux-gnu}/bits/setjmp.h | 2 +- .../i386-linux-gnu}/bits/sigcontext.h | 4 +- .../i386-linux-gnu}/bits/siginfo-arch.h | 2 +- .../i386-linux-gnu}/bits/stat.h | 2 +- .../i386-linux-gnu}/bits/sysctl.h | 2 +- .../i386-linux-gnu}/bits/timesize.h | 2 +- .../i386-linux-gnu}/bits/typesizes.h | 2 +- .../i386-linux-gnu}/bits/wordsize.h | 2 +- .../i386-linux-gnu}/bits/xtitypes.h | 2 +- .../i386-linux-gnu}/fpu_control.h | 2 +- .../i386-linux-gnu}/gnu/lib-names.h | 2 +- .../i386-linux-gnu}/gnu/stubs.h | 2 +- .../i386-linux-gnu}/sys/elf.h | 2 +- .../i386-linux-gnu}/sys/io.h | 2 +- .../i386-linux-gnu}/sys/ptrace.h | 2 +- .../i386-linux-gnu}/sys/ucontext.h | 2 +- .../i386-linux-gnu}/sys/user.h | 2 +- .../mips-linux-gnu}/asm/sgidefs.h | 0 .../mips-linux-gnu}/asm/unistd.h | 0 libc/include/mips-linux-gnu/bits/dlfcn.h | 64 + libc/include/mips-linux-gnu/bits/errno.h | 52 + libc/include/mips-linux-gnu/bits/eventfd.h | 31 + libc/include/mips-linux-gnu/bits/inotify.h | 29 + .../include/mips-linux-gnu/bits/ioctl-types.h | 75 + libc/include/mips-linux-gnu/bits/ipc.h | 54 + libc/include/mips-linux-gnu/bits/ipctypes.h | 31 + libc/include/mips-linux-gnu/bits/local_lim.h | 99 + libc/include/mips-linux-gnu/bits/mman.h | 48 + libc/include/mips-linux-gnu/bits/msq-pad.h | 31 + libc/include/mips-linux-gnu/bits/poll.h | 49 + libc/include/mips-linux-gnu/bits/resource.h | 231 +++ libc/include/mips-linux-gnu/bits/sem-pad.h | 24 + libc/include/mips-linux-gnu/bits/shm-pad.h | 26 + libc/include/mips-linux-gnu/bits/shmlba.h | 24 + libc/include/mips-linux-gnu/bits/sigaction.h | 94 + libc/include/mips-linux-gnu/bits/sigcontext.h | 82 + .../mips-linux-gnu/bits/siginfo-arch.h | 13 + libc/include/mips-linux-gnu/bits/signalfd.h | 29 + libc/include/mips-linux-gnu/bits/signum.h | 68 + .../include/mips-linux-gnu/bits/socket_type.h | 55 + libc/include/mips-linux-gnu/bits/statfs.h | 73 + .../mips-linux-gnu/bits/termios-c_cc.h | 43 + .../mips-linux-gnu/bits/termios-c_lflag.h | 46 + .../mips-linux-gnu/bits/termios-struct.h | 34 + .../mips-linux-gnu/bits/termios-tcflow.h | 26 + libc/include/mips-linux-gnu/bits/timerfd.h | 29 + .../mips-linux-gnu/bits/types/stack_t.h | 33 + libc/include/mips-linux-gnu/ieee754.h | 323 ++++ .../mips64-linux-gnuabi64/asm/sgidefs.h | 45 + .../mips64-linux-gnuabi64/asm/unistd.h | 1101 +++++++++++ .../mips64-linux-gnuabi64/bits/dlfcn.h | 64 + .../mips64-linux-gnuabi64/bits/errno.h | 52 + .../mips64-linux-gnuabi64/bits/eventfd.h | 31 + .../mips64-linux-gnuabi64/bits/inotify.h | 29 + .../mips64-linux-gnuabi64/bits/ioctl-types.h | 75 + libc/include/mips64-linux-gnuabi64/bits/ipc.h | 54 + .../mips64-linux-gnuabi64/bits/ipctypes.h | 31 + .../mips64-linux-gnuabi64/bits/local_lim.h | 99 + .../include/mips64-linux-gnuabi64/bits/mman.h | 48 + .../mips64-linux-gnuabi64/bits/msq-pad.h | 31 + .../include/mips64-linux-gnuabi64/bits/poll.h | 49 + .../mips64-linux-gnuabi64/bits/resource.h | 231 +++ .../mips64-linux-gnuabi64/bits/sem-pad.h | 24 + .../mips64-linux-gnuabi64/bits/shm-pad.h | 26 + .../mips64-linux-gnuabi64/bits/shmlba.h | 24 + .../mips64-linux-gnuabi64/bits/sigaction.h | 94 + .../mips64-linux-gnuabi64/bits/sigcontext.h | 82 + .../mips64-linux-gnuabi64/bits/siginfo-arch.h | 13 + .../mips64-linux-gnuabi64/bits/signalfd.h | 29 + .../mips64-linux-gnuabi64/bits/signum.h | 68 + .../mips64-linux-gnuabi64/bits/socket_type.h | 55 + .../mips64-linux-gnuabi64/bits/statfs.h | 73 + .../mips64-linux-gnuabi64/bits/termios-c_cc.h | 43 + .../bits/termios-c_lflag.h | 46 + .../bits/termios-struct.h | 34 + .../bits/termios-tcflow.h | 26 + .../mips64-linux-gnuabi64/bits/timerfd.h | 29 + .../bits/types/stack_t.h | 33 + libc/include/mips64-linux-gnuabi64/ieee754.h | 323 ++++ .../mips64-linux-gnuabin32/asm/sgidefs.h | 45 + .../mips64-linux-gnuabin32/asm/unistd.h | 1101 +++++++++++ .../mips64-linux-gnuabin32/bits/dlfcn.h | 64 + .../mips64-linux-gnuabin32/bits/errno.h | 52 + .../mips64-linux-gnuabin32/bits/eventfd.h | 31 + .../mips64-linux-gnuabin32/bits/inotify.h | 29 + .../mips64-linux-gnuabin32/bits/ioctl-types.h | 75 + .../include/mips64-linux-gnuabin32/bits/ipc.h | 54 + .../mips64-linux-gnuabin32/bits/ipctypes.h | 31 + .../mips64-linux-gnuabin32/bits/local_lim.h | 99 + .../mips64-linux-gnuabin32/bits/mman.h | 48 + .../mips64-linux-gnuabin32/bits/msq-pad.h | 31 + .../mips64-linux-gnuabin32/bits/poll.h | 49 + .../mips64-linux-gnuabin32/bits/resource.h | 231 +++ .../mips64-linux-gnuabin32/bits/sem-pad.h | 24 + .../mips64-linux-gnuabin32/bits/shm-pad.h | 26 + .../mips64-linux-gnuabin32/bits/shmlba.h | 24 + .../mips64-linux-gnuabin32/bits/sigaction.h | 94 + .../mips64-linux-gnuabin32/bits/sigcontext.h | 82 + .../bits/siginfo-arch.h | 13 + .../mips64-linux-gnuabin32/bits/signalfd.h | 29 + .../mips64-linux-gnuabin32/bits/signum.h | 68 + .../mips64-linux-gnuabin32/bits/socket_type.h | 55 + .../mips64-linux-gnuabin32/bits/statfs.h | 73 + .../bits/termios-c_cc.h | 43 + .../bits/termios-c_lflag.h | 46 + .../bits/termios-struct.h | 34 + .../bits/termios-tcflow.h | 26 + .../mips64-linux-gnuabin32/bits/timerfd.h | 29 + .../bits/types/stack_t.h | 33 + libc/include/mips64-linux-gnuabin32/ieee754.h | 323 ++++ .../mips64el-linux-gnuabi64/asm/sgidefs.h | 45 + .../mips64el-linux-gnuabi64/asm/unistd.h | 1101 +++++++++++ .../mips64el-linux-gnuabi64/bits/dlfcn.h | 64 + .../mips64el-linux-gnuabi64/bits/errno.h | 52 + .../mips64el-linux-gnuabi64/bits/eventfd.h | 31 + .../mips64el-linux-gnuabi64/bits/inotify.h | 29 + .../bits/ioctl-types.h | 75 + .../mips64el-linux-gnuabi64/bits/ipc.h | 54 + .../mips64el-linux-gnuabi64/bits/ipctypes.h | 31 + .../mips64el-linux-gnuabi64/bits/local_lim.h | 99 + .../mips64el-linux-gnuabi64/bits/mman.h | 48 + .../mips64el-linux-gnuabi64/bits/msq-pad.h | 31 + .../mips64el-linux-gnuabi64/bits/poll.h | 49 + .../mips64el-linux-gnuabi64/bits/resource.h | 231 +++ .../mips64el-linux-gnuabi64/bits/sem-pad.h | 24 + .../mips64el-linux-gnuabi64/bits/shm-pad.h | 26 + .../mips64el-linux-gnuabi64/bits/shmlba.h | 24 + .../mips64el-linux-gnuabi64/bits/sigaction.h | 94 + .../mips64el-linux-gnuabi64/bits/sigcontext.h | 82 + .../bits/siginfo-arch.h | 13 + .../mips64el-linux-gnuabi64/bits/signalfd.h | 29 + .../mips64el-linux-gnuabi64/bits/signum.h | 68 + .../bits/socket_type.h | 55 + .../mips64el-linux-gnuabi64/bits/statfs.h | 73 + .../bits/termios-c_cc.h | 43 + .../bits/termios-c_lflag.h | 46 + .../bits/termios-struct.h | 34 + .../bits/termios-tcflow.h | 26 + .../mips64el-linux-gnuabi64/bits/timerfd.h | 29 + .../bits/types/stack_t.h | 33 + .../include/mips64el-linux-gnuabi64/ieee754.h | 323 ++++ .../mips64el-linux-gnuabin32/asm/sgidefs.h | 45 + .../mips64el-linux-gnuabin32/asm/unistd.h | 1101 +++++++++++ .../mips64el-linux-gnuabin32/bits/dlfcn.h | 64 + .../mips64el-linux-gnuabin32/bits/errno.h | 52 + .../mips64el-linux-gnuabin32/bits/eventfd.h | 31 + .../mips64el-linux-gnuabin32/bits/inotify.h | 29 + .../bits/ioctl-types.h | 75 + .../mips64el-linux-gnuabin32/bits/ipc.h | 54 + .../mips64el-linux-gnuabin32/bits/ipctypes.h | 31 + .../mips64el-linux-gnuabin32/bits/local_lim.h | 99 + .../mips64el-linux-gnuabin32/bits/mman.h | 48 + .../mips64el-linux-gnuabin32/bits/msq-pad.h | 31 + .../mips64el-linux-gnuabin32/bits/poll.h | 49 + .../mips64el-linux-gnuabin32/bits/resource.h | 231 +++ .../mips64el-linux-gnuabin32/bits/sem-pad.h | 24 + .../mips64el-linux-gnuabin32/bits/shm-pad.h | 26 + .../mips64el-linux-gnuabin32/bits/shmlba.h | 24 + .../mips64el-linux-gnuabin32/bits/sigaction.h | 94 + .../bits/sigcontext.h | 82 + .../bits/siginfo-arch.h | 13 + .../mips64el-linux-gnuabin32/bits/signalfd.h | 29 + .../mips64el-linux-gnuabin32/bits/signum.h | 68 + .../bits/socket_type.h | 55 + .../mips64el-linux-gnuabin32/bits/statfs.h | 73 + .../bits/termios-c_cc.h | 43 + .../bits/termios-c_lflag.h | 46 + .../bits/termios-struct.h | 34 + .../bits/termios-tcflow.h | 26 + .../mips64el-linux-gnuabin32/bits/timerfd.h | 29 + .../bits/types/stack_t.h | 33 + .../mips64el-linux-gnuabin32/ieee754.h | 323 ++++ libc/include/mipsel-linux-gnu/asm/sgidefs.h | 45 + libc/include/mipsel-linux-gnu/asm/unistd.h | 1101 +++++++++++ libc/include/mipsel-linux-gnu/bits/dlfcn.h | 64 + libc/include/mipsel-linux-gnu/bits/errno.h | 52 + libc/include/mipsel-linux-gnu/bits/eventfd.h | 31 + libc/include/mipsel-linux-gnu/bits/inotify.h | 29 + .../mipsel-linux-gnu/bits/ioctl-types.h | 75 + libc/include/mipsel-linux-gnu/bits/ipc.h | 54 + libc/include/mipsel-linux-gnu/bits/ipctypes.h | 31 + .../include/mipsel-linux-gnu/bits/local_lim.h | 99 + libc/include/mipsel-linux-gnu/bits/mman.h | 48 + libc/include/mipsel-linux-gnu/bits/msq-pad.h | 31 + libc/include/mipsel-linux-gnu/bits/poll.h | 49 + libc/include/mipsel-linux-gnu/bits/resource.h | 231 +++ libc/include/mipsel-linux-gnu/bits/sem-pad.h | 24 + libc/include/mipsel-linux-gnu/bits/shm-pad.h | 26 + libc/include/mipsel-linux-gnu/bits/shmlba.h | 24 + .../include/mipsel-linux-gnu/bits/sigaction.h | 94 + .../mipsel-linux-gnu/bits/sigcontext.h | 82 + .../mipsel-linux-gnu/bits/siginfo-arch.h | 13 + libc/include/mipsel-linux-gnu/bits/signalfd.h | 29 + libc/include/mipsel-linux-gnu/bits/signum.h | 68 + .../mipsel-linux-gnu/bits/socket_type.h | 55 + libc/include/mipsel-linux-gnu/bits/statfs.h | 73 + .../mipsel-linux-gnu/bits/termios-c_cc.h | 43 + .../mipsel-linux-gnu/bits/termios-c_lflag.h | 46 + .../mipsel-linux-gnu/bits/termios-struct.h | 34 + .../mipsel-linux-gnu/bits/termios-tcflow.h | 26 + libc/include/mipsel-linux-gnu/bits/timerfd.h | 29 + .../mipsel-linux-gnu/bits/types/stack_t.h | 33 + libc/include/mipsel-linux-gnu/ieee754.h | 323 ++++ .../nios2-linux-gnu}/asm/unistd.h | 0 libc/include/nios2-linux-gnu/bits/endian.h | 12 + libc/include/nios2-linux-gnu/bits/fcntl.h | 56 + libc/include/nios2-linux-gnu/bits/fenv.h | 52 + libc/include/nios2-linux-gnu/bits/floatn.h | 52 + libc/include/nios2-linux-gnu/bits/link.h | 54 + .../nios2-linux-gnu/bits/long-double.h | 39 + libc/include/nios2-linux-gnu/bits/procfs.h | 34 + .../nios2-linux-gnu/bits/pthreadtypes-arch.h | 72 + libc/include/nios2-linux-gnu/bits/semaphore.h | 32 + libc/include/nios2-linux-gnu/bits/setjmp.h | 30 + libc/include/nios2-linux-gnu/bits/stat.h | 171 ++ libc/include/nios2-linux-gnu/bits/statfs.h | 86 + libc/include/nios2-linux-gnu/bits/typesizes.h | 84 + libc/include/nios2-linux-gnu/bits/wordsize.h | 21 + libc/include/nios2-linux-gnu/fpu_control.h | 38 + libc/include/nios2-linux-gnu/gnu/lib-names.h | 34 + libc/include/nios2-linux-gnu/gnu/stubs.h | 47 + .../nios2-linux-gnu/sys/cachectl.h} | 24 +- libc/include/nios2-linux-gnu/sys/ucontext.h | 61 + libc/include/nios2-linux-gnu/sys/user.h | 58 + .../powerpc-linux-gnu}/asm/unistd.h | 0 libc/include/powerpc-linux-gnu/bits/endian.h | 36 + .../powerpc-linux-gnu/bits/environments.h | 96 + libc/include/powerpc-linux-gnu/bits/fcntl.h | 62 + libc/include/powerpc-linux-gnu/bits/fenv.h | 180 ++ .../powerpc-linux-gnu/bits/fenvinline.h | 79 + libc/include/powerpc-linux-gnu/bits/floatn.h | 122 ++ libc/include/powerpc-linux-gnu/bits/fp-fast.h | 39 + libc/include/powerpc-linux-gnu/bits/hwcap.h | 76 + .../powerpc-linux-gnu/bits/ioctl-types.h | 77 + libc/include/powerpc-linux-gnu/bits/ipc.h | 54 + .../powerpc-linux-gnu/bits/iscanonical.h | 58 + libc/include/powerpc-linux-gnu/bits/link.h | 156 ++ .../powerpc-linux-gnu/bits/local_lim.h | 100 + .../powerpc-linux-gnu/bits/long-double.h | 24 + libc/include/powerpc-linux-gnu/bits/mman.h | 51 + libc/include/powerpc-linux-gnu/bits/msq-pad.h | 26 + libc/include/powerpc-linux-gnu/bits/procfs.h | 49 + .../bits/pthreadtypes-arch.h | 81 + libc/include/powerpc-linux-gnu/bits/sem-pad.h | 26 + .../powerpc-linux-gnu/bits/semaphore.h | 40 + libc/include/powerpc-linux-gnu/bits/setjmp.h | 50 + libc/include/powerpc-linux-gnu/bits/shm-pad.h | 28 + .../include/powerpc-linux-gnu/bits/sigstack.h | 32 + libc/include/powerpc-linux-gnu/bits/stat.h | 275 +++ .../powerpc-linux-gnu/bits/termios-baud.h | 45 + .../powerpc-linux-gnu/bits/termios-c_cc.h | 41 + .../powerpc-linux-gnu/bits/termios-c_cflag.h | 35 + .../powerpc-linux-gnu/bits/termios-c_iflag.h | 38 + .../powerpc-linux-gnu/bits/termios-c_lflag.h | 45 + .../powerpc-linux-gnu/bits/termios-c_oflag.h | 65 + .../powerpc-linux-gnu/bits/termios-misc.h | 72 + .../include/powerpc-linux-gnu/bits/wordsize.h | 11 + libc/include/powerpc-linux-gnu/fpu_control.h | 120 ++ .../powerpc-linux-gnu/gnu/lib-names-32.h | 30 + .../include/powerpc-linux-gnu/gnu/lib-names.h | 19 + libc/include/powerpc-linux-gnu/gnu/stubs.h | 15 + libc/include/powerpc-linux-gnu/ieee754.h | 133 ++ libc/include/powerpc-linux-gnu/sys/ptrace.h | 253 +++ libc/include/powerpc-linux-gnu/sys/ucontext.h | 200 ++ libc/include/powerpc-linux-gnu/sys/user.h | 40 + libc/include/powerpc64-linux-gnu/asm/unistd.h | 404 ++++ .../include/powerpc64-linux-gnu/bits/endian.h | 36 + .../powerpc64-linux-gnu/bits/environments.h | 96 + libc/include/powerpc64-linux-gnu/bits/fcntl.h | 62 + libc/include/powerpc64-linux-gnu/bits/fenv.h | 180 ++ .../powerpc64-linux-gnu/bits/fenvinline.h | 79 + .../include/powerpc64-linux-gnu/bits/floatn.h | 122 ++ .../powerpc64-linux-gnu/bits/fp-fast.h | 39 + libc/include/powerpc64-linux-gnu/bits/hwcap.h | 76 + .../powerpc64-linux-gnu/bits/ioctl-types.h | 77 + libc/include/powerpc64-linux-gnu/bits/ipc.h | 54 + .../powerpc64-linux-gnu/bits/iscanonical.h | 58 + libc/include/powerpc64-linux-gnu/bits/link.h | 156 ++ .../powerpc64-linux-gnu/bits/local_lim.h | 100 + .../powerpc64-linux-gnu/bits/long-double.h | 24 + libc/include/powerpc64-linux-gnu/bits/mman.h | 51 + .../powerpc64-linux-gnu/bits/msq-pad.h | 26 + .../include/powerpc64-linux-gnu/bits/procfs.h | 49 + .../bits/pthreadtypes-arch.h | 81 + .../powerpc64-linux-gnu/bits/sem-pad.h | 26 + .../powerpc64-linux-gnu/bits/semaphore.h | 40 + .../include/powerpc64-linux-gnu/bits/setjmp.h | 50 + .../powerpc64-linux-gnu/bits/shm-pad.h | 28 + .../powerpc64-linux-gnu/bits/sigstack.h | 32 + libc/include/powerpc64-linux-gnu/bits/stat.h | 275 +++ .../powerpc64-linux-gnu/bits/termios-baud.h | 45 + .../powerpc64-linux-gnu/bits/termios-c_cc.h | 41 + .../bits/termios-c_cflag.h | 35 + .../bits/termios-c_iflag.h | 38 + .../bits/termios-c_lflag.h | 45 + .../bits/termios-c_oflag.h | 65 + .../powerpc64-linux-gnu/bits/termios-misc.h | 72 + .../powerpc64-linux-gnu/bits/wordsize.h | 11 + .../include/powerpc64-linux-gnu/fpu_control.h | 120 ++ .../powerpc64-linux-gnu/gnu/lib-names-64-v1.h | 31 + .../powerpc64-linux-gnu/gnu/lib-names.h | 19 + .../powerpc64-linux-gnu/gnu/stubs-64-v1.h | 20 + libc/include/powerpc64-linux-gnu/gnu/stubs.h | 15 + libc/include/powerpc64-linux-gnu/ieee754.h | 133 ++ libc/include/powerpc64-linux-gnu/sys/ptrace.h | 253 +++ .../powerpc64-linux-gnu/sys/ucontext.h | 200 ++ libc/include/powerpc64-linux-gnu/sys/user.h | 40 + .../powerpc64le-linux-gnu/asm/unistd.h | 404 ++++ .../powerpc64le-linux-gnu/bits/endian.h | 36 + .../powerpc64le-linux-gnu/bits/environments.h | 96 + .../powerpc64le-linux-gnu/bits/fcntl.h | 62 + .../include/powerpc64le-linux-gnu/bits/fenv.h | 180 ++ .../powerpc64le-linux-gnu/bits/fenvinline.h | 79 + .../powerpc64le-linux-gnu/bits/floatn.h | 122 ++ .../powerpc64le-linux-gnu/bits/fp-fast.h | 39 + .../powerpc64le-linux-gnu/bits/hwcap.h | 76 + .../powerpc64le-linux-gnu/bits/ioctl-types.h | 77 + libc/include/powerpc64le-linux-gnu/bits/ipc.h | 54 + .../powerpc64le-linux-gnu/bits/iscanonical.h | 58 + .../include/powerpc64le-linux-gnu/bits/link.h | 156 ++ .../powerpc64le-linux-gnu/bits/local_lim.h | 100 + .../powerpc64le-linux-gnu/bits/long-double.h | 24 + .../include/powerpc64le-linux-gnu/bits/mman.h | 51 + .../powerpc64le-linux-gnu/bits/msq-pad.h | 26 + .../powerpc64le-linux-gnu/bits/procfs.h | 49 + .../bits/pthreadtypes-arch.h | 81 + .../powerpc64le-linux-gnu/bits/sem-pad.h | 26 + .../powerpc64le-linux-gnu/bits/semaphore.h | 40 + .../powerpc64le-linux-gnu/bits/setjmp.h | 50 + .../powerpc64le-linux-gnu/bits/shm-pad.h | 28 + .../powerpc64le-linux-gnu/bits/sigstack.h | 32 + .../include/powerpc64le-linux-gnu/bits/stat.h | 275 +++ .../powerpc64le-linux-gnu/bits/termios-baud.h | 45 + .../powerpc64le-linux-gnu/bits/termios-c_cc.h | 41 + .../bits/termios-c_cflag.h | 35 + .../bits/termios-c_iflag.h | 38 + .../bits/termios-c_lflag.h | 45 + .../bits/termios-c_oflag.h | 65 + .../powerpc64le-linux-gnu/bits/termios-misc.h | 72 + .../powerpc64le-linux-gnu/bits/wordsize.h | 11 + .../powerpc64le-linux-gnu/fpu_control.h | 120 ++ .../gnu/lib-names-64-v2.h | 31 + .../powerpc64le-linux-gnu/gnu/lib-names.h | 19 + .../powerpc64le-linux-gnu/gnu/stubs-64-v2.h | 20 + .../include/powerpc64le-linux-gnu/gnu/stubs.h | 15 + libc/include/powerpc64le-linux-gnu/ieee754.h | 133 ++ .../powerpc64le-linux-gnu/sys/ptrace.h | 253 +++ .../powerpc64le-linux-gnu/sys/ucontext.h | 200 ++ libc/include/powerpc64le-linux-gnu/sys/user.h | 40 + .../riscv64-linux-gnu}/asm/unistd.h | 0 libc/include/riscv64-linux-gnu/bits/endian.h | 5 + libc/include/riscv64-linux-gnu/bits/fcntl.h | 62 + libc/include/riscv64-linux-gnu/bits/fenv.h | 74 + libc/include/riscv64-linux-gnu/bits/floatn.h | 97 + libc/include/riscv64-linux-gnu/bits/link.h | 56 + .../riscv64-linux-gnu/bits/long-double.h | 20 + libc/include/riscv64-linux-gnu/bits/procfs.h | 31 + .../bits/pthreadtypes-arch.h | 68 + .../riscv64-linux-gnu/bits/semaphore.h | 33 + libc/include/riscv64-linux-gnu/bits/setjmp.h | 39 + .../riscv64-linux-gnu/bits/sigcontext.h | 31 + libc/include/riscv64-linux-gnu/bits/stat.h | 171 ++ libc/include/riscv64-linux-gnu/bits/statfs.h | 86 + .../riscv64-linux-gnu/bits/typesizes.h | 84 + .../include/riscv64-linux-gnu/bits/wordsize.h | 29 + libc/include/riscv64-linux-gnu/fpu_control.h | 74 + .../riscv64-linux-gnu/gnu/lib-names-lp64.h | 31 + .../include/riscv64-linux-gnu/gnu/lib-names.h | 16 + .../riscv64-linux-gnu/gnu/stubs-lp64.h | 47 + libc/include/riscv64-linux-gnu/gnu/stubs.h | 12 + libc/include/riscv64-linux-gnu/ieee754.h | 170 ++ libc/include/riscv64-linux-gnu/sys/asm.h | 63 + libc/include/riscv64-linux-gnu/sys/cachectl.h | 32 + libc/include/riscv64-linux-gnu/sys/ucontext.h | 110 ++ libc/include/riscv64-linux-gnu/sys/user.h | 23 + .../s390x-linux-gnu}/asm/unistd.h | 0 libc/include/s390x-linux-gnu/bits/elfclass.h | 38 + libc/include/s390x-linux-gnu/bits/endian.h | 7 + .../s390x-linux-gnu/bits/environments.h | 96 + libc/include/s390x-linux-gnu/bits/fcntl.h | 71 + libc/include/s390x-linux-gnu/bits/fenv.h | 100 + libc/include/s390x-linux-gnu/bits/floatn.h | 97 + .../s390x-linux-gnu/bits/flt-eval-method.h | 24 + libc/include/s390x-linux-gnu/bits/hwcap.h | 41 + libc/include/s390x-linux-gnu/bits/ipc.h | 60 + libc/include/s390x-linux-gnu/bits/link.h | 139 ++ .../s390x-linux-gnu/bits/long-double.h | 24 + .../s390x-linux-gnu/bits/procfs-extra.h | 75 + libc/include/s390x-linux-gnu/bits/procfs-id.h | 30 + libc/include/s390x-linux-gnu/bits/procfs.h | 29 + .../s390x-linux-gnu/bits/pthreadtypes-arch.h | 79 + libc/include/s390x-linux-gnu/bits/semaphore.h | 39 + libc/include/s390x-linux-gnu/bits/setjmp.h | 47 + libc/include/s390x-linux-gnu/bits/sigaction.h | 117 ++ libc/include/s390x-linux-gnu/bits/stat.h | 265 +++ libc/include/s390x-linux-gnu/bits/statfs.h | 69 + libc/include/s390x-linux-gnu/bits/typesizes.h | 89 + libc/include/s390x-linux-gnu/bits/utmp.h | 126 ++ libc/include/s390x-linux-gnu/bits/utmpx.h | 102 + libc/include/s390x-linux-gnu/bits/wordsize.h | 11 + libc/include/s390x-linux-gnu/bits/xtitypes.h | 33 + libc/include/s390x-linux-gnu/fpu_control.h | 43 + .../s390x-linux-gnu/gnu/lib-names-64.h | 31 + libc/include/s390x-linux-gnu/gnu/lib-names.h | 16 + libc/include/s390x-linux-gnu/gnu/stubs-64.h | 24 + libc/include/s390x-linux-gnu/gnu/stubs.h | 12 + libc/include/s390x-linux-gnu/ieee754.h | 170 ++ libc/include/s390x-linux-gnu/sys/elf.h | 25 + libc/include/s390x-linux-gnu/sys/ptrace.h | 225 +++ libc/include/s390x-linux-gnu/sys/ucontext.h | 95 + libc/include/s390x-linux-gnu/sys/user.h | 82 + libc/include/sparc-linux-gnu/a.out.h | 174 ++ .../sparc-linux-gnu}/asm/unistd.h | 0 libc/include/sparc-linux-gnu/bits/a.out.h | 13 + libc/include/sparc-linux-gnu/bits/endian.h | 12 + .../sparc-linux-gnu/bits/environments.h | 96 + libc/include/sparc-linux-gnu/bits/epoll.h | 27 + libc/include/sparc-linux-gnu/bits/errno.h | 53 + libc/include/sparc-linux-gnu/bits/eventfd.h | 31 + libc/include/sparc-linux-gnu/bits/fcntl.h | 101 + libc/include/sparc-linux-gnu/bits/fenv.h | 101 + libc/include/sparc-linux-gnu/bits/floatn.h | 97 + libc/include/sparc-linux-gnu/bits/hwcap.h | 51 + libc/include/sparc-linux-gnu/bits/inotify.h | 29 + libc/include/sparc-linux-gnu/bits/ioctls.h | 36 + libc/include/sparc-linux-gnu/bits/ipc.h | 61 + libc/include/sparc-linux-gnu/bits/link.h | 99 + libc/include/sparc-linux-gnu/bits/local_lim.h | 99 + .../sparc-linux-gnu/bits/long-double.h | 26 + libc/include/sparc-linux-gnu/bits/mman.h | 55 + libc/include/sparc-linux-gnu/bits/msq-pad.h | 26 + libc/include/sparc-linux-gnu/bits/poll.h | 49 + .../sparc-linux-gnu/bits/procfs-extra.h | 88 + libc/include/sparc-linux-gnu/bits/procfs-id.h | 30 + libc/include/sparc-linux-gnu/bits/procfs.h | 61 + .../sparc-linux-gnu/bits/pthreadtypes-arch.h | 81 + libc/include/sparc-linux-gnu/bits/resource.h | 238 +++ libc/include/sparc-linux-gnu/bits/sem-pad.h | 26 + libc/include/sparc-linux-gnu/bits/semaphore.h | 40 + libc/include/sparc-linux-gnu/bits/setjmp.h | 67 + libc/include/sparc-linux-gnu/bits/shm-pad.h | 28 + libc/include/sparc-linux-gnu/bits/shmlba.h | 29 + libc/include/sparc-linux-gnu/bits/sigaction.h | 89 + .../include/sparc-linux-gnu/bits/sigcontext.h | 82 + .../sparc-linux-gnu/bits/siginfo-arch.h | 17 + .../bits/siginfo-consts-arch.h | 12 + libc/include/sparc-linux-gnu/bits/signalfd.h | 29 + libc/include/sparc-linux-gnu/bits/signum.h | 39 + libc/include/sparc-linux-gnu/bits/sigstack.h | 32 + .../sparc-linux-gnu/bits/socket_type.h | 55 + libc/include/sparc-linux-gnu/bits/stat.h | 173 ++ .../sparc-linux-gnu/bits/termios-baud.h | 46 + .../sparc-linux-gnu/bits/termios-c_cc.h | 43 + .../sparc-linux-gnu/bits/termios-c_oflag.h | 64 + .../sparc-linux-gnu/bits/termios-struct.h | 34 + libc/include/sparc-linux-gnu/bits/timerfd.h | 29 + libc/include/sparc-linux-gnu/bits/typesizes.h | 83 + libc/include/sparc-linux-gnu/bits/wordsize.h | 11 + libc/include/sparc-linux-gnu/fpu_control.h | 72 + .../sparc-linux-gnu/gnu/lib-names-64.h | 31 + libc/include/sparc-linux-gnu/gnu/lib-names.h | 16 + libc/include/sparc-linux-gnu/gnu/stubs-64.h | 26 + libc/include/sparc-linux-gnu/gnu/stubs.h | 12 + libc/include/sparc-linux-gnu/ieee754.h | 170 ++ libc/include/sparc-linux-gnu/sys/ptrace.h | 229 +++ libc/include/sparc-linux-gnu/sys/ucontext.h | 304 +++ libc/include/sparc-linux-gnu/sys/user.h | 86 + libc/include/sparcv9-linux-gnu/a.out.h | 174 ++ libc/include/sparcv9-linux-gnu/asm/unistd.h | 453 +++++ libc/include/sparcv9-linux-gnu/bits/a.out.h | 13 + libc/include/sparcv9-linux-gnu/bits/endian.h | 12 + .../sparcv9-linux-gnu/bits/environments.h | 96 + libc/include/sparcv9-linux-gnu/bits/epoll.h | 27 + libc/include/sparcv9-linux-gnu/bits/errno.h | 53 + libc/include/sparcv9-linux-gnu/bits/eventfd.h | 31 + libc/include/sparcv9-linux-gnu/bits/fcntl.h | 101 + libc/include/sparcv9-linux-gnu/bits/fenv.h | 101 + libc/include/sparcv9-linux-gnu/bits/floatn.h | 97 + libc/include/sparcv9-linux-gnu/bits/hwcap.h | 51 + libc/include/sparcv9-linux-gnu/bits/inotify.h | 29 + libc/include/sparcv9-linux-gnu/bits/ioctls.h | 36 + libc/include/sparcv9-linux-gnu/bits/ipc.h | 61 + libc/include/sparcv9-linux-gnu/bits/link.h | 99 + .../sparcv9-linux-gnu/bits/local_lim.h | 99 + .../sparcv9-linux-gnu/bits/long-double.h | 26 + libc/include/sparcv9-linux-gnu/bits/mman.h | 55 + libc/include/sparcv9-linux-gnu/bits/msq-pad.h | 26 + libc/include/sparcv9-linux-gnu/bits/poll.h | 49 + .../sparcv9-linux-gnu/bits/procfs-extra.h | 88 + .../sparcv9-linux-gnu/bits/procfs-id.h | 30 + libc/include/sparcv9-linux-gnu/bits/procfs.h | 61 + .../bits/pthreadtypes-arch.h | 81 + .../include/sparcv9-linux-gnu/bits/resource.h | 238 +++ libc/include/sparcv9-linux-gnu/bits/sem-pad.h | 26 + .../sparcv9-linux-gnu/bits/semaphore.h | 40 + libc/include/sparcv9-linux-gnu/bits/setjmp.h | 67 + libc/include/sparcv9-linux-gnu/bits/shm-pad.h | 28 + libc/include/sparcv9-linux-gnu/bits/shmlba.h | 29 + .../sparcv9-linux-gnu/bits/sigaction.h | 89 + .../sparcv9-linux-gnu/bits/sigcontext.h | 82 + .../sparcv9-linux-gnu/bits/siginfo-arch.h | 17 + .../bits/siginfo-consts-arch.h | 12 + .../include/sparcv9-linux-gnu/bits/signalfd.h | 29 + libc/include/sparcv9-linux-gnu/bits/signum.h | 39 + .../include/sparcv9-linux-gnu/bits/sigstack.h | 32 + .../sparcv9-linux-gnu/bits/socket_type.h | 55 + libc/include/sparcv9-linux-gnu/bits/stat.h | 173 ++ .../sparcv9-linux-gnu/bits/termios-baud.h | 46 + .../sparcv9-linux-gnu/bits/termios-c_cc.h | 43 + .../sparcv9-linux-gnu/bits/termios-c_oflag.h | 64 + .../sparcv9-linux-gnu/bits/termios-struct.h | 34 + libc/include/sparcv9-linux-gnu/bits/timerfd.h | 29 + .../sparcv9-linux-gnu/bits/typesizes.h | 83 + .../include/sparcv9-linux-gnu/bits/wordsize.h | 11 + libc/include/sparcv9-linux-gnu/fpu_control.h | 72 + .../include/sparcv9-linux-gnu/gnu/lib-names.h | 16 + libc/include/sparcv9-linux-gnu/gnu/stubs-32.h | 26 + libc/include/sparcv9-linux-gnu/gnu/stubs.h | 12 + libc/include/sparcv9-linux-gnu/ieee754.h | 170 ++ libc/include/sparcv9-linux-gnu/sys/ptrace.h | 229 +++ libc/include/sparcv9-linux-gnu/sys/ucontext.h | 304 +++ libc/include/sparcv9-linux-gnu/sys/user.h | 86 + libc/include/x86_64-linux-gnu/asm/unistd.h | 18 + libc/include/x86_64-linux-gnu/bits/a.out.h | 11 + libc/include/x86_64-linux-gnu/bits/endian.h | 7 + .../x86_64-linux-gnu/bits/environments.h | 105 + libc/include/x86_64-linux-gnu/bits/epoll.h | 29 + libc/include/x86_64-linux-gnu/bits/fcntl.h | 61 + libc/include/x86_64-linux-gnu/bits/fenv.h | 170 ++ libc/include/x86_64-linux-gnu/bits/floatn.h | 121 ++ .../x86_64-linux-gnu/bits/flt-eval-method.h | 33 + libc/include/x86_64-linux-gnu/bits/fp-logb.h | 24 + .../x86_64-linux-gnu/bits/indirect-return.h | 37 + libc/include/x86_64-linux-gnu/bits/ipctypes.h | 33 + .../x86_64-linux-gnu/bits/iscanonical.h | 54 + libc/include/x86_64-linux-gnu/bits/link.h | 159 ++ .../x86_64-linux-gnu/bits/long-double.h | 20 + .../bits/math-vector-fortran.h | 43 + .../x86_64-linux-gnu/bits/math-vector.h | 63 + libc/include/x86_64-linux-gnu/bits/mman.h | 34 + .../include/x86_64-linux-gnu/bits/procfs-id.h | 30 + libc/include/x86_64-linux-gnu/bits/procfs.h | 50 + .../x86_64-linux-gnu/bits/pthreadtypes-arch.h | 106 + libc/include/x86_64-linux-gnu/bits/select.h | 63 + libc/include/x86_64-linux-gnu/bits/sem-pad.h | 24 + .../include/x86_64-linux-gnu/bits/semaphore.h | 40 + libc/include/x86_64-linux-gnu/bits/setjmp.h | 40 + .../x86_64-linux-gnu/bits/sigcontext.h | 196 ++ .../x86_64-linux-gnu/bits/siginfo-arch.h | 17 + libc/include/x86_64-linux-gnu/bits/stat.h | 210 ++ libc/include/x86_64-linux-gnu/bits/sysctl.h | 20 + libc/include/x86_64-linux-gnu/bits/timesize.h | 25 + .../include/x86_64-linux-gnu/bits/typesizes.h | 95 + libc/include/x86_64-linux-gnu/bits/wordsize.h | 17 + libc/include/x86_64-linux-gnu/bits/xtitypes.h | 33 + libc/include/x86_64-linux-gnu/fpu_control.h | 109 ++ .../x86_64-linux-gnu}/gnu/lib-names-64.h | 2 +- libc/include/x86_64-linux-gnu/gnu/lib-names.h | 17 + .../x86_64-linux-gnu}/gnu/stubs-64.h | 2 +- libc/include/x86_64-linux-gnu/gnu/stubs.h | 14 + libc/include/x86_64-linux-gnu/sys/elf.h | 29 + libc/include/x86_64-linux-gnu/sys/io.h | 183 ++ libc/include/x86_64-linux-gnu/sys/ptrace.h | 198 ++ libc/include/x86_64-linux-gnu/sys/ucontext.h | 262 +++ libc/include/x86_64-linux-gnu/sys/user.h | 180 ++ libc/include/x86_64-linux-gnux32/bits/a.out.h | 11 + .../include/x86_64-linux-gnux32/bits/endian.h | 7 + .../x86_64-linux-gnux32/bits/environments.h | 105 + libc/include/x86_64-linux-gnux32/bits/epoll.h | 29 + libc/include/x86_64-linux-gnux32/bits/fcntl.h | 61 + libc/include/x86_64-linux-gnux32/bits/fenv.h | 170 ++ .../include/x86_64-linux-gnux32/bits/floatn.h | 121 ++ .../bits/flt-eval-method.h | 33 + .../x86_64-linux-gnux32/bits/fp-logb.h | 24 + .../bits/indirect-return.h | 37 + .../x86_64-linux-gnux32/bits/ipctypes.h | 33 + .../x86_64-linux-gnux32/bits/iscanonical.h | 54 + libc/include/x86_64-linux-gnux32/bits/link.h | 159 ++ .../x86_64-linux-gnux32/bits/long-double.h | 20 + .../bits/math-vector-fortran.h | 43 + .../x86_64-linux-gnux32/bits/math-vector.h | 63 + libc/include/x86_64-linux-gnux32/bits/mman.h | 34 + .../x86_64-linux-gnux32/bits/procfs-id.h | 30 + .../include/x86_64-linux-gnux32/bits/procfs.h | 50 + .../bits/pthreadtypes-arch.h | 106 + .../include/x86_64-linux-gnux32/bits/select.h | 63 + .../x86_64-linux-gnux32/bits/sem-pad.h | 24 + .../x86_64-linux-gnux32/bits/semaphore.h | 40 + .../include/x86_64-linux-gnux32/bits/setjmp.h | 40 + .../x86_64-linux-gnux32/bits/sigcontext.h | 196 ++ .../x86_64-linux-gnux32/bits/siginfo-arch.h | 17 + libc/include/x86_64-linux-gnux32/bits/stat.h | 210 ++ .../include/x86_64-linux-gnux32/bits/sysctl.h | 20 + .../x86_64-linux-gnux32/bits/timesize.h | 25 + .../x86_64-linux-gnux32/bits/typesizes.h | 95 + .../x86_64-linux-gnux32/bits/wordsize.h | 17 + .../x86_64-linux-gnux32/bits/xtitypes.h | 33 + .../include/x86_64-linux-gnux32/fpu_control.h | 109 ++ .../x86_64-linux-gnux32/gnu/lib-names-x32.h | 31 + .../x86_64-linux-gnux32/gnu/lib-names.h | 17 + .../x86_64-linux-gnux32/gnu/stubs-x32.h | 28 + libc/include/x86_64-linux-gnux32/gnu/stubs.h | 14 + libc/include/x86_64-linux-gnux32/sys/elf.h | 29 + libc/include/x86_64-linux-gnux32/sys/io.h | 183 ++ libc/include/x86_64-linux-gnux32/sys/ptrace.h | 198 ++ .../x86_64-linux-gnux32/sys/ucontext.h | 262 +++ libc/include/x86_64-linux-gnux32/sys/user.h | 180 ++ src/all_types.hpp | 4 +- src/codegen.cpp | 49 +- src/link.cpp | 34 +- src/translate_c.cpp | 11 +- std/special/builtin.zig | 2 +- 1290 files changed, 60293 insertions(+), 3485 deletions(-) create mode 100644 libc/dummy/c/i386.zig create mode 100644 libc/dummy/c/x86_64.zig delete mode 100644 libc/glibc-include/bits/initspin.h delete mode 100644 libc/glibc-include/net/ppp-comp.h delete mode 100644 libc/glibc-include/nfs/nfs.h delete mode 100644 libc/glibc-include/poll.h delete mode 100644 libc/glibc-include/sys/errno.h delete mode 100644 libc/glibc-include/sys/fcntl.h delete mode 100644 libc/glibc-include/sys/signal.h delete mode 100644 libc/glibc-include/sys/soundcard.h delete mode 100644 libc/glibc-include/sys/stropts.h delete mode 100644 libc/glibc-include/sys/unistd.h delete mode 100644 libc/glibc-include/sys/vt.h delete mode 100644 libc/glibc-include/syscall.h delete mode 100644 libc/glibc-include/syslog.h delete mode 100644 libc/glibc-include/wait.h delete mode 100644 libc/glibc/sysdeps/csky/abiv2/start.S delete mode 100644 libc/glibc/sysdeps/csky/bits/endian.h delete mode 100644 libc/glibc/sysdeps/csky/sysdep.h delete mode 100644 libc/glibc/sysdeps/unix/sysv/linux/alpha/asm/unistd.h delete mode 100644 libc/glibc/sysdeps/unix/sysv/linux/csky/asm/unistd.h delete mode 100644 libc/glibc/sysdeps/unix/sysv/linux/csky/sysdep.h delete mode 100644 libc/glibc/sysdeps/unix/sysv/linux/ia64/asm/break.h delete mode 100644 libc/glibc/sysdeps/unix/sysv/linux/ia64/asm/unistd.h delete mode 100644 libc/glibc/sysdeps/unix/sysv/linux/m68k/asm/unistd.h delete mode 100644 libc/glibc/sysdeps/unix/sysv/linux/microblaze/asm/unistd.h create mode 100644 libc/glibc/sysdeps/wordsize-32/divdi3-symbol-hacks.h create mode 100644 libc/include/aarch64-linux-gnu/asm/bitsperlong.h rename libc/{glibc/sysdeps/unix/sysv/linux/aarch64 => include/aarch64-linux-gnu}/asm/unistd.h (100%) create mode 100644 libc/include/aarch64-linux-gnu/bits/endian.h create mode 100644 libc/include/aarch64-linux-gnu/bits/fcntl.h create mode 100644 libc/include/aarch64-linux-gnu/bits/fenv.h create mode 100644 libc/include/aarch64-linux-gnu/bits/floatn.h create mode 100644 libc/include/aarch64-linux-gnu/bits/fp-fast.h create mode 100644 libc/include/aarch64-linux-gnu/bits/hwcap.h create mode 100644 libc/include/aarch64-linux-gnu/bits/ipc.h create mode 100644 libc/include/aarch64-linux-gnu/bits/link.h create mode 100644 libc/include/aarch64-linux-gnu/bits/local_lim.h create mode 100644 libc/include/aarch64-linux-gnu/bits/long-double.h create mode 100644 libc/include/aarch64-linux-gnu/bits/procfs.h create mode 100644 libc/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h create mode 100644 libc/include/aarch64-linux-gnu/bits/semaphore.h create mode 100644 libc/include/aarch64-linux-gnu/bits/setjmp.h create mode 100644 libc/include/aarch64-linux-gnu/bits/sigstack.h create mode 100644 libc/include/aarch64-linux-gnu/bits/stat.h create mode 100644 libc/include/aarch64-linux-gnu/bits/statfs.h create mode 100644 libc/include/aarch64-linux-gnu/bits/typesizes.h create mode 100644 libc/include/aarch64-linux-gnu/bits/wordsize.h create mode 100644 libc/include/aarch64-linux-gnu/fpu_control.h create mode 100644 libc/include/aarch64-linux-gnu/gnu/lib-names-lp64.h create mode 100644 libc/include/aarch64-linux-gnu/gnu/lib-names.h create mode 100644 libc/include/aarch64-linux-gnu/gnu/stubs-lp64.h create mode 100644 libc/include/aarch64-linux-gnu/gnu/stubs.h create mode 100644 libc/include/aarch64-linux-gnu/ieee754.h create mode 100644 libc/include/aarch64-linux-gnu/sys/elf.h create mode 100644 libc/include/aarch64-linux-gnu/sys/ptrace.h create mode 100644 libc/include/aarch64-linux-gnu/sys/ucontext.h create mode 100644 libc/include/aarch64-linux-gnu/sys/user.h create mode 100644 libc/include/aarch64_be-linux-gnu/asm/bitsperlong.h create mode 100644 libc/include/aarch64_be-linux-gnu/asm/unistd.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/endian.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/fcntl.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/fenv.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/floatn.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/fp-fast.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/hwcap.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/ipc.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/link.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/local_lim.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/long-double.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/procfs.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/pthreadtypes-arch.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/semaphore.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/setjmp.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/sigstack.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/stat.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/statfs.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/typesizes.h create mode 100644 libc/include/aarch64_be-linux-gnu/bits/wordsize.h create mode 100644 libc/include/aarch64_be-linux-gnu/fpu_control.h create mode 100644 libc/include/aarch64_be-linux-gnu/gnu/lib-names-lp64_be.h create mode 100644 libc/include/aarch64_be-linux-gnu/gnu/lib-names.h create mode 100644 libc/include/aarch64_be-linux-gnu/gnu/stubs-lp64_be.h create mode 100644 libc/include/aarch64_be-linux-gnu/gnu/stubs.h create mode 100644 libc/include/aarch64_be-linux-gnu/ieee754.h create mode 100644 libc/include/aarch64_be-linux-gnu/sys/elf.h create mode 100644 libc/include/aarch64_be-linux-gnu/sys/ptrace.h create mode 100644 libc/include/aarch64_be-linux-gnu/sys/ucontext.h create mode 100644 libc/include/aarch64_be-linux-gnu/sys/user.h rename libc/{glibc/sysdeps/unix/sysv/linux/arm => include/arm-linux-gnueabi}/asm/unistd.h (100%) create mode 100644 libc/include/arm-linux-gnueabi/bits/endian.h create mode 100644 libc/include/arm-linux-gnueabi/bits/fcntl.h create mode 100644 libc/include/arm-linux-gnueabi/bits/fenv.h create mode 100644 libc/include/arm-linux-gnueabi/bits/floatn.h create mode 100644 libc/include/arm-linux-gnueabi/bits/hwcap.h create mode 100644 libc/include/arm-linux-gnueabi/bits/link.h create mode 100644 libc/include/arm-linux-gnueabi/bits/long-double.h create mode 100644 libc/include/arm-linux-gnueabi/bits/procfs-id.h create mode 100644 libc/include/arm-linux-gnueabi/bits/procfs.h rename libc/{glibc/sysdeps/csky/nptl => include/arm-linux-gnueabi}/bits/pthreadtypes-arch.h (64%) create mode 100644 libc/include/arm-linux-gnueabi/bits/semaphore.h create mode 100644 libc/include/arm-linux-gnueabi/bits/setjmp.h create mode 100644 libc/include/arm-linux-gnueabi/bits/shmlba.h create mode 100644 libc/include/arm-linux-gnueabi/bits/stat.h create mode 100644 libc/include/arm-linux-gnueabi/bits/wordsize.h create mode 100644 libc/include/arm-linux-gnueabi/fpu_control.h create mode 100644 libc/include/arm-linux-gnueabi/gnu/lib-names.h create mode 100644 libc/include/arm-linux-gnueabi/gnu/stubs.h create mode 100644 libc/include/arm-linux-gnueabi/sys/ptrace.h create mode 100644 libc/include/arm-linux-gnueabi/sys/ucontext.h create mode 100644 libc/include/arm-linux-gnueabi/sys/user.h create mode 100644 libc/include/arm-linux-gnueabihf/asm/unistd.h create mode 100644 libc/include/arm-linux-gnueabihf/bits/endian.h create mode 100644 libc/include/arm-linux-gnueabihf/bits/fcntl.h create mode 100644 libc/include/arm-linux-gnueabihf/bits/fenv.h create mode 100644 libc/include/arm-linux-gnueabihf/bits/floatn.h create mode 100644 libc/include/arm-linux-gnueabihf/bits/hwcap.h create mode 100644 libc/include/arm-linux-gnueabihf/bits/link.h create mode 100644 libc/include/arm-linux-gnueabihf/bits/long-double.h create mode 100644 libc/include/arm-linux-gnueabihf/bits/procfs-id.h create mode 100644 libc/include/arm-linux-gnueabihf/bits/procfs.h create mode 100644 libc/include/arm-linux-gnueabihf/bits/pthreadtypes-arch.h create mode 100644 libc/include/arm-linux-gnueabihf/bits/semaphore.h create mode 100644 libc/include/arm-linux-gnueabihf/bits/setjmp.h create mode 100644 libc/include/arm-linux-gnueabihf/bits/shmlba.h create mode 100644 libc/include/arm-linux-gnueabihf/bits/stat.h create mode 100644 libc/include/arm-linux-gnueabihf/bits/wordsize.h create mode 100644 libc/include/arm-linux-gnueabihf/fpu_control.h create mode 100644 libc/include/arm-linux-gnueabihf/gnu/lib-names.h create mode 100644 libc/include/arm-linux-gnueabihf/gnu/stubs.h create mode 100644 libc/include/arm-linux-gnueabihf/sys/ptrace.h create mode 100644 libc/include/arm-linux-gnueabihf/sys/ucontext.h create mode 100644 libc/include/arm-linux-gnueabihf/sys/user.h create mode 100644 libc/include/armeb-linux-gnueabi/asm/unistd.h create mode 100644 libc/include/armeb-linux-gnueabi/bits/endian.h create mode 100644 libc/include/armeb-linux-gnueabi/bits/fcntl.h create mode 100644 libc/include/armeb-linux-gnueabi/bits/fenv.h create mode 100644 libc/include/armeb-linux-gnueabi/bits/floatn.h create mode 100644 libc/include/armeb-linux-gnueabi/bits/hwcap.h create mode 100644 libc/include/armeb-linux-gnueabi/bits/link.h create mode 100644 libc/include/armeb-linux-gnueabi/bits/long-double.h create mode 100644 libc/include/armeb-linux-gnueabi/bits/procfs-id.h create mode 100644 libc/include/armeb-linux-gnueabi/bits/procfs.h create mode 100644 libc/include/armeb-linux-gnueabi/bits/pthreadtypes-arch.h create mode 100644 libc/include/armeb-linux-gnueabi/bits/semaphore.h create mode 100644 libc/include/armeb-linux-gnueabi/bits/setjmp.h create mode 100644 libc/include/armeb-linux-gnueabi/bits/shmlba.h create mode 100644 libc/include/armeb-linux-gnueabi/bits/stat.h create mode 100644 libc/include/armeb-linux-gnueabi/bits/wordsize.h create mode 100644 libc/include/armeb-linux-gnueabi/fpu_control.h create mode 100644 libc/include/armeb-linux-gnueabi/gnu/lib-names.h create mode 100644 libc/include/armeb-linux-gnueabi/gnu/stubs.h create mode 100644 libc/include/armeb-linux-gnueabi/sys/ptrace.h create mode 100644 libc/include/armeb-linux-gnueabi/sys/ucontext.h create mode 100644 libc/include/armeb-linux-gnueabi/sys/user.h create mode 100644 libc/include/armeb-linux-gnueabihf/asm/unistd.h create mode 100644 libc/include/armeb-linux-gnueabihf/bits/endian.h create mode 100644 libc/include/armeb-linux-gnueabihf/bits/fcntl.h create mode 100644 libc/include/armeb-linux-gnueabihf/bits/fenv.h create mode 100644 libc/include/armeb-linux-gnueabihf/bits/floatn.h create mode 100644 libc/include/armeb-linux-gnueabihf/bits/hwcap.h create mode 100644 libc/include/armeb-linux-gnueabihf/bits/link.h create mode 100644 libc/include/armeb-linux-gnueabihf/bits/long-double.h create mode 100644 libc/include/armeb-linux-gnueabihf/bits/procfs-id.h create mode 100644 libc/include/armeb-linux-gnueabihf/bits/procfs.h create mode 100644 libc/include/armeb-linux-gnueabihf/bits/pthreadtypes-arch.h create mode 100644 libc/include/armeb-linux-gnueabihf/bits/semaphore.h create mode 100644 libc/include/armeb-linux-gnueabihf/bits/setjmp.h create mode 100644 libc/include/armeb-linux-gnueabihf/bits/shmlba.h create mode 100644 libc/include/armeb-linux-gnueabihf/bits/stat.h create mode 100644 libc/include/armeb-linux-gnueabihf/bits/wordsize.h create mode 100644 libc/include/armeb-linux-gnueabihf/fpu_control.h create mode 100644 libc/include/armeb-linux-gnueabihf/gnu/lib-names.h create mode 100644 libc/include/armeb-linux-gnueabihf/gnu/stubs.h create mode 100644 libc/include/armeb-linux-gnueabihf/sys/ptrace.h create mode 100644 libc/include/armeb-linux-gnueabihf/sys/ucontext.h create mode 100644 libc/include/armeb-linux-gnueabihf/sys/user.h rename libc/{glibc-include => include/generic-glibc}/a.out.h (96%) rename libc/{glibc-include => include/generic-glibc}/aio.h (99%) rename libc/{glibc-include => include/generic-glibc}/aliases.h (98%) rename libc/{glibc-include => include/generic-glibc}/alloca.h (98%) rename libc/{glibc-include => include/generic-glibc}/ar.h (98%) rename libc/{glibc-include => include/generic-glibc}/argp.h (99%) rename libc/{glibc-include => include/generic-glibc}/argz.h (99%) rename libc/{glibc-include => include/generic-glibc}/arpa/ftp.h (99%) rename libc/{glibc-include => include/generic-glibc}/arpa/inet.h (99%) rename libc/{glibc-include => include/generic-glibc}/arpa/nameser.h (99%) rename libc/{glibc-include => include/generic-glibc}/arpa/nameser_compat.h (99%) rename libc/{glibc-include => include/generic-glibc}/arpa/telnet.h (99%) rename libc/{glibc-include => include/generic-glibc}/arpa/tftp.h (99%) create mode 100644 libc/include/generic-glibc/asm-generic/bitsperlong.h rename libc/{glibc/sysdeps/unix/sysv/linux/include => include/generic-glibc}/asm-generic/unistd.h (100%) rename libc/{glibc/sysdeps/unix/sysv/linux/include => include/generic-glibc}/asm/unistd_32.h (100%) rename libc/{glibc/sysdeps/unix/sysv/linux/include => include/generic-glibc}/asm/unistd_64.h (100%) rename libc/{glibc-include => include/generic-glibc}/assert.h (99%) create mode 100644 libc/include/generic-glibc/bits/a.out.h create mode 100644 libc/include/generic-glibc/bits/argp-ldbl.h rename libc/{glibc-include => include/generic-glibc}/bits/byteswap.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/cmathcalls.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/confname.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/cpu-set.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/dirent.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/dlfcn.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/elfclass.h (93%) create mode 100644 libc/include/generic-glibc/bits/endian.h create mode 100644 libc/include/generic-glibc/bits/environments.h create mode 100644 libc/include/generic-glibc/bits/epoll.h create mode 100644 libc/include/generic-glibc/bits/err-ldbl.h rename libc/{glibc-include => include/generic-glibc}/bits/errno.h (98%) create mode 100644 libc/include/generic-glibc/bits/error-ldbl.h rename libc/{glibc-include => include/generic-glibc}/bits/error.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/eventfd.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/fcntl-linux.h (99%) create mode 100644 libc/include/generic-glibc/bits/fcntl.h rename libc/{glibc-include => include/generic-glibc}/bits/fcntl2.h (99%) create mode 100644 libc/include/generic-glibc/bits/fenv.h rename libc/{glibc-include => include/generic-glibc}/bits/fenvinline.h (96%) rename libc/{glibc-include => include/generic-glibc}/bits/floatn-common.h (99%) create mode 100644 libc/include/generic-glibc/bits/floatn.h create mode 100644 libc/include/generic-glibc/bits/flt-eval-method.h rename libc/{glibc-include => include/generic-glibc}/bits/fp-fast.h (99%) create mode 100644 libc/include/generic-glibc/bits/fp-logb.h rename libc/{glibc-include => include/generic-glibc}/bits/getopt_core.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/getopt_ext.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/getopt_posix.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/hwcap.h (95%) rename libc/{glibc-include => include/generic-glibc}/bits/in.h (99%) create mode 100644 libc/include/generic-glibc/bits/indirect-return.h create mode 100644 libc/include/generic-glibc/bits/initspin.h rename libc/{glibc-include => include/generic-glibc}/bits/inotify.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/ioctl-types.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/ioctls.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/ipc.h (99%) create mode 100644 libc/include/generic-glibc/bits/ipctypes.h create mode 100644 libc/include/generic-glibc/bits/iscanonical.h rename libc/{glibc-include => include/generic-glibc}/bits/libc-header-start.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/libm-simd-decl-stubs.h (99%) create mode 100644 libc/include/generic-glibc/bits/link.h rename libc/{glibc-include => include/generic-glibc}/bits/local_lim.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/locale.h (98%) create mode 100644 libc/include/generic-glibc/bits/long-double.h rename libc/{glibc-include => include/generic-glibc}/bits/math-finite.h (99%) create mode 100644 libc/include/generic-glibc/bits/math-vector-fortran.h create mode 100644 libc/include/generic-glibc/bits/math-vector.h rename libc/{glibc-include => include/generic-glibc}/bits/mathcalls-helper-functions.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/mathcalls-narrow.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/mathcalls.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/mathdef.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/mathinline.h (97%) rename libc/{glibc-include => include/generic-glibc}/bits/mman-linux.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/mman-map-flags-generic.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/mman-shared.h (99%) create mode 100644 libc/include/generic-glibc/bits/mman.h rename libc/{glibc-include => include/generic-glibc}/bits/monetary-ldbl.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/mqueue.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/mqueue2.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/msq-pad.h (97%) rename libc/{glibc-include => include/generic-glibc}/bits/msq.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/netdb.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/param.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/poll.h (97%) rename libc/{glibc-include => include/generic-glibc}/bits/poll2.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/posix1_lim.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/posix2_lim.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/posix_opt.h (95%) create mode 100644 libc/include/generic-glibc/bits/ppc.h rename libc/{glibc-include => include/generic-glibc}/bits/printf-ldbl.h (96%) rename libc/{glibc-include => include/generic-glibc}/bits/procfs-extra.h (99%) create mode 100644 libc/include/generic-glibc/bits/procfs-id.h rename libc/{glibc-include => include/generic-glibc}/bits/procfs-prregset.h (96%) create mode 100644 libc/include/generic-glibc/bits/procfs.h create mode 100644 libc/include/generic-glibc/bits/pthreadtypes-arch.h rename libc/{glibc-include => include/generic-glibc}/bits/pthreadtypes.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/ptrace-shared.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/resource.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/sched.h (99%) create mode 100644 libc/include/generic-glibc/bits/select.h rename libc/{glibc-include => include/generic-glibc}/bits/select2.h (97%) create mode 100644 libc/include/generic-glibc/bits/sem-pad.h rename libc/{glibc-include => include/generic-glibc}/bits/sem.h (99%) create mode 100644 libc/include/generic-glibc/bits/semaphore.h create mode 100644 libc/include/generic-glibc/bits/setjmp.h rename libc/{glibc-include => include/generic-glibc}/bits/setjmp2.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/shm-pad.h (97%) rename libc/{glibc-include => include/generic-glibc}/bits/shm.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/shmlba.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/sigaction.h (99%) create mode 100644 libc/include/generic-glibc/bits/sigcontext.h rename libc/{glibc-include => include/generic-glibc}/bits/sigevent-consts.h (99%) create mode 100644 libc/include/generic-glibc/bits/siginfo-arch.h rename libc/{glibc-include => include/generic-glibc}/bits/siginfo-consts-arch.h (96%) rename libc/{glibc-include => include/generic-glibc}/bits/siginfo-consts.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/signalfd.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/signum-generic.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/signum.h (97%) rename libc/{glibc-include => include/generic-glibc}/bits/sigstack.h (97%) rename libc/{glibc-include => include/generic-glibc}/bits/sigthread.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/sockaddr.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/socket.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/socket2.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/socket_type.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/ss_flags.h (97%) rename libc/{glibc-include => include/generic-glibc}/bits/stab.def (99%) create mode 100644 libc/include/generic-glibc/bits/stat.h rename libc/{glibc-include => include/generic-glibc}/bits/statfs.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/statvfs.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/statx.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/stdint-intn.h (96%) rename libc/{glibc-include => include/generic-glibc}/bits/stdint-uintn.h (96%) rename libc/{glibc-include => include/generic-glibc}/bits/stdio-ldbl.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/stdio.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/stdio2.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/stdio_lim.h (97%) rename libc/{glibc-include => include/generic-glibc}/bits/stdlib-bsearch.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/stdlib-float.h (96%) rename libc/{glibc-include => include/generic-glibc}/bits/stdlib-ldbl.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/stdlib.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/string_fortified.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/strings_fortified.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/stropts.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/sys_errlist.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/syscall.h (99%) create mode 100644 libc/include/generic-glibc/bits/sysctl.h rename libc/{glibc-include => include/generic-glibc}/bits/syslog-ldbl.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/syslog-path.h (96%) rename libc/{glibc-include => include/generic-glibc}/bits/syslog.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/sysmacros.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/termios-baud.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/termios-c_cc.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/termios-c_cflag.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/termios-c_iflag.h (96%) rename libc/{glibc-include => include/generic-glibc}/bits/termios-c_lflag.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/termios-c_oflag.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/termios-misc.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/termios-struct.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/termios-tcflow.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/termios.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/thread-shared-types.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/time.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/time64.h (97%) rename libc/{glibc-include => include/generic-glibc}/bits/timerfd.h (99%) create mode 100644 libc/include/generic-glibc/bits/timesize.h rename libc/{glibc-include => include/generic-glibc}/bits/timex.h (97%) rename libc/{glibc-include => include/generic-glibc}/bits/types.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/types/FILE.h (96%) rename libc/{glibc-include => include/generic-glibc}/bits/types/__FILE.h (93%) rename libc/{glibc-include => include/generic-glibc}/bits/types/__fpos64_t.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/types/__fpos_t.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/types/__locale_t.h (97%) rename libc/{glibc-include => include/generic-glibc}/bits/types/__mbstate_t.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/types/__sigset_t.h (96%) rename libc/{glibc-include => include/generic-glibc}/bits/types/__sigval_t.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/types/clock_t.h (95%) rename libc/{glibc-include => include/generic-glibc}/bits/types/clockid_t.h (95%) rename libc/{glibc-include => include/generic-glibc}/bits/types/cookie_io_functions_t.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/types/error_t.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/types/locale_t.h (96%) rename libc/{glibc-include => include/generic-glibc}/bits/types/mbstate_t.h (94%) rename libc/{glibc-include => include/generic-glibc}/bits/types/res_state.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/types/sig_atomic_t.h (97%) rename libc/{glibc-include => include/generic-glibc}/bits/types/sigevent_t.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/types/siginfo_t.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/types/sigset_t.h (96%) rename libc/{glibc-include => include/generic-glibc}/bits/types/sigval_t.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/types/stack_t.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/types/struct_FILE.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/types/struct_iovec.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/types/struct_itimerspec.h (97%) rename libc/{glibc-include => include/generic-glibc}/bits/types/struct_osockaddr.h (97%) rename libc/{glibc-include => include/generic-glibc}/bits/types/struct_rusage.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/types/struct_sched_param.h (95%) rename libc/{glibc-include => include/generic-glibc}/bits/types/struct_sigstack.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/types/struct_timespec.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/types/struct_timeval.h (97%) rename libc/{glibc-include => include/generic-glibc}/bits/types/struct_tm.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/types/time_t.h (94%) rename libc/{glibc-include => include/generic-glibc}/bits/types/timer_t.h (95%) rename libc/{glibc-include => include/generic-glibc}/bits/types/wint_t.h (95%) create mode 100644 libc/include/generic-glibc/bits/typesizes.h rename libc/{glibc-include => include/generic-glibc}/bits/uintn-identity.h (97%) rename libc/{glibc-include => include/generic-glibc}/bits/uio-ext.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/uio_lim.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/unistd.h (99%) create mode 100644 libc/include/generic-glibc/bits/unistd_ext.h rename libc/{glibc-include => include/generic-glibc}/bits/utmp.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/utmpx.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/utsname.h (96%) rename libc/{glibc-include => include/generic-glibc}/bits/waitflags.h (96%) rename libc/{glibc-include => include/generic-glibc}/bits/waitstatus.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/wchar-ldbl.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/wchar.h (98%) rename libc/{glibc-include => include/generic-glibc}/bits/wchar2.h (99%) rename libc/{glibc-include => include/generic-glibc}/bits/wctype-wchar.h (99%) create mode 100644 libc/include/generic-glibc/bits/wordsize.h rename libc/{glibc-include => include/generic-glibc}/bits/xopen_lim.h (99%) create mode 100644 libc/include/generic-glibc/bits/xtitypes.h rename libc/{glibc-include => include/generic-glibc}/byteswap.h (98%) rename libc/{glibc-include => include/generic-glibc}/complex.h (99%) rename libc/{glibc-include => include/generic-glibc}/cpio.h (99%) rename libc/{glibc-include => include/generic-glibc}/crypt.h (99%) rename libc/{glibc-include => include/generic-glibc}/ctype.h (99%) rename libc/{glibc-include => include/generic-glibc}/dirent.h (99%) rename libc/{glibc-include => include/generic-glibc}/dlfcn.h (99%) rename libc/{glibc-include => include/generic-glibc}/elf.h (99%) rename libc/{glibc-include => include/generic-glibc}/endian.h (99%) rename libc/{glibc-include => include/generic-glibc}/envz.h (99%) rename libc/{glibc-include => include/generic-glibc}/err.h (96%) rename libc/{glibc-include => include/generic-glibc}/errno.h (98%) rename libc/{glibc-include => include/generic-glibc}/error.h (84%) rename libc/{glibc-include => include/generic-glibc}/execinfo.h (98%) rename libc/{glibc-include => include/generic-glibc}/fcntl.h (99%) rename libc/{glibc-include => include/generic-glibc}/features.h (98%) rename libc/{glibc-include => include/generic-glibc}/fenv.h (99%) rename libc/{glibc-include => include/generic-glibc}/fmtmsg.h (99%) rename libc/{glibc-include => include/generic-glibc}/fnmatch.h (98%) rename libc/{glibc/sysdeps/csky/dl-sysdep.h => include/generic-glibc/fpregdef.h} (71%) create mode 100644 libc/include/generic-glibc/fpu_control.h rename libc/{glibc-include => include/generic-glibc}/fstab.h (99%) rename libc/{glibc-include => include/generic-glibc}/fts.h (99%) rename libc/{glibc-include => include/generic-glibc}/ftw.h (99%) rename libc/{glibc-include => include/generic-glibc}/gconv.h (99%) rename libc/{glibc-include => include/generic-glibc}/getopt.h (98%) rename libc/{glibc-include => include/generic-glibc}/glob.h (96%) rename libc/{glibc-include => include/generic-glibc}/gnu-versions.h (98%) create mode 100644 libc/include/generic-glibc/gnu/lib-names-32.h create mode 100644 libc/include/generic-glibc/gnu/lib-names-hard.h create mode 100644 libc/include/generic-glibc/gnu/lib-names-n32_hard.h create mode 100644 libc/include/generic-glibc/gnu/lib-names-n64_hard.h create mode 100644 libc/include/generic-glibc/gnu/lib-names-o32_hard.h create mode 100644 libc/include/generic-glibc/gnu/lib-names-soft.h create mode 100644 libc/include/generic-glibc/gnu/lib-names.h rename libc/{glibc-include => include/generic-glibc}/gnu/libc-version.h (97%) create mode 100644 libc/include/generic-glibc/gnu/stubs-32.h create mode 100644 libc/include/generic-glibc/gnu/stubs-hard.h create mode 100644 libc/include/generic-glibc/gnu/stubs-n32_hard.h create mode 100644 libc/include/generic-glibc/gnu/stubs-n64_hard.h create mode 100644 libc/include/generic-glibc/gnu/stubs-o32_hard.h create mode 100644 libc/include/generic-glibc/gnu/stubs-soft.h create mode 100644 libc/include/generic-glibc/gnu/stubs.h rename libc/{glibc-include => include/generic-glibc}/grp.h (99%) rename libc/{glibc-include => include/generic-glibc}/gshadow.h (99%) rename libc/{glibc-include => include/generic-glibc}/iconv.h (98%) rename libc/{glibc-include => include/generic-glibc}/ieee754.h (99%) rename libc/{glibc-include => include/generic-glibc}/ifaddrs.h (99%) rename libc/{glibc-include => include/generic-glibc}/inttypes.h (99%) rename libc/{glibc-include => include/generic-glibc}/langinfo.h (99%) rename libc/{glibc-include => include/generic-glibc}/lastlog.h (85%) rename libc/{glibc-include => include/generic-glibc}/libgen.h (98%) rename libc/{glibc-include => include/generic-glibc}/libintl.h (99%) rename libc/{glibc-include => include/generic-glibc}/limits.h (99%) rename libc/{glibc-include => include/generic-glibc}/link.h (99%) rename libc/{glibc-include => include/generic-glibc}/locale.h (99%) rename libc/{glibc-include => include/generic-glibc}/malloc.h (99%) rename libc/{glibc-include => include/generic-glibc}/math.h (99%) rename libc/{glibc-include => include/generic-glibc}/mcheck.h (99%) rename libc/{glibc-include => include/generic-glibc}/memory.h (97%) rename libc/{glibc-include => include/generic-glibc}/mntent.h (99%) rename libc/{glibc-include => include/generic-glibc}/monetary.h (98%) rename libc/{glibc-include => include/generic-glibc}/mqueue.h (99%) rename libc/{glibc-include => include/generic-glibc}/net/ethernet.h (99%) rename libc/{glibc-include => include/generic-glibc}/net/if.h (99%) rename libc/{glibc-include => include/generic-glibc}/net/if_arp.h (99%) rename libc/{glibc-include => include/generic-glibc}/net/if_packet.h (99%) rename libc/{glibc-include => include/generic-glibc}/net/if_ppp.h (99%) rename libc/{glibc-include => include/generic-glibc}/net/if_shaper.h (98%) rename libc/{glibc-include => include/generic-glibc}/net/if_slip.h (96%) create mode 100644 libc/include/generic-glibc/net/ppp-comp.h rename libc/{glibc-include => include/generic-glibc}/net/ppp_defs.h (82%) rename libc/{glibc-include => include/generic-glibc}/net/route.h (99%) rename libc/{glibc-include => include/generic-glibc}/netash/ash.h (98%) rename libc/{glibc-include => include/generic-glibc}/netatalk/at.h (97%) rename libc/{glibc-include => include/generic-glibc}/netax25/ax25.h (99%) rename libc/{glibc-include => include/generic-glibc}/netdb.h (99%) rename libc/{glibc-include => include/generic-glibc}/neteconet/ec.h (99%) rename libc/{glibc-include => include/generic-glibc}/netinet/ether.h (98%) rename libc/{glibc-include => include/generic-glibc}/netinet/icmp6.h (99%) rename libc/{glibc-include => include/generic-glibc}/netinet/if_ether.h (99%) rename libc/{glibc-include => include/generic-glibc}/netinet/if_fddi.h (97%) rename libc/{glibc-include => include/generic-glibc}/netinet/if_tr.h (99%) rename libc/{glibc-include => include/generic-glibc}/netinet/igmp.h (99%) rename libc/{glibc-include => include/generic-glibc}/netinet/in.h (99%) rename libc/{glibc-include => include/generic-glibc}/netinet/in_systm.h (97%) rename libc/{glibc-include => include/generic-glibc}/netinet/ip.h (99%) rename libc/{glibc-include => include/generic-glibc}/netinet/ip6.h (99%) rename libc/{glibc-include => include/generic-glibc}/netinet/ip_icmp.h (96%) rename libc/{glibc-include => include/generic-glibc}/netinet/tcp.h (99%) rename libc/{glibc-include => include/generic-glibc}/netinet/udp.h (99%) rename libc/{glibc-include => include/generic-glibc}/netipx/ipx.h (99%) rename libc/{glibc-include => include/generic-glibc}/netiucv/iucv.h (99%) rename libc/{glibc-include => include/generic-glibc}/netpacket/packet.h (98%) rename libc/{glibc-include => include/generic-glibc}/netrom/netrom.h (98%) rename libc/{glibc-include => include/generic-glibc}/netrose/rose.h (99%) create mode 100644 libc/include/generic-glibc/nfs/nfs.h rename libc/{glibc-include => include/generic-glibc}/nl_types.h (98%) rename libc/{glibc-include => include/generic-glibc}/nss.h (98%) rename libc/{glibc-include => include/generic-glibc}/obstack.h (99%) rename libc/{glibc-include => include/generic-glibc}/paths.h (99%) create mode 100644 libc/include/generic-glibc/poll.h rename libc/{glibc-include => include/generic-glibc}/printf.h (99%) rename libc/{glibc-include => include/generic-glibc}/proc_service.h (99%) rename libc/{glibc-include => include/generic-glibc}/protocols/routed.h (99%) rename libc/{glibc-include => include/generic-glibc}/protocols/rwhod.h (98%) rename libc/{glibc-include => include/generic-glibc}/protocols/talkd.h (99%) rename libc/{glibc-include => include/generic-glibc}/protocols/timed.h (99%) rename libc/{glibc-include => include/generic-glibc}/pthread.h (99%) rename libc/{glibc-include => include/generic-glibc}/pty.h (98%) rename libc/{glibc-include => include/generic-glibc}/pwd.h (99%) rename libc/{glibc-include => include/generic-glibc}/re_comp.h (97%) create mode 100644 libc/include/generic-glibc/regdef.h rename libc/{glibc-include => include/generic-glibc}/regex.h (99%) rename libc/{glibc-include => include/generic-glibc}/regexp.h (98%) rename libc/{glibc-include => include/generic-glibc}/resolv.h (99%) rename libc/{glibc-include => include/generic-glibc}/rpc/netdb.h (99%) rename libc/{glibc-include => include/generic-glibc}/sched.h (99%) rename libc/{glibc-include => include/generic-glibc}/scsi/scsi.h (99%) rename libc/{glibc-include => include/generic-glibc}/scsi/scsi_ioctl.h (99%) rename libc/{glibc-include => include/generic-glibc}/scsi/sg.h (99%) rename libc/{glibc-include => include/generic-glibc}/search.h (99%) rename libc/{glibc-include => include/generic-glibc}/semaphore.h (98%) rename libc/{glibc-include => include/generic-glibc}/setjmp.h (99%) create mode 100644 libc/include/generic-glibc/sgidefs.h rename libc/{glibc-include => include/generic-glibc}/sgtty.h (98%) rename libc/{glibc-include => include/generic-glibc}/shadow.h (99%) rename libc/{glibc-include => include/generic-glibc}/signal.h (99%) rename libc/{glibc-include => include/generic-glibc}/spawn.h (82%) rename libc/{glibc-include => include/generic-glibc}/stab.h (90%) rename libc/{glibc-include => include/generic-glibc}/stdc-predef.h (99%) rename libc/{glibc-include => include/generic-glibc}/stdint.h (99%) rename libc/{glibc-include => include/generic-glibc}/stdio.h (99%) rename libc/{glibc-include => include/generic-glibc}/stdio_ext.h (99%) rename libc/{glibc-include => include/generic-glibc}/stdlib.h (99%) rename libc/{glibc-include => include/generic-glibc}/string.h (99%) rename libc/{glibc-include => include/generic-glibc}/strings.h (99%) rename libc/{glibc-include => include/generic-glibc}/stropts.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/acct.h (99%) create mode 100644 libc/include/generic-glibc/sys/asm.h rename libc/{glibc-include => include/generic-glibc}/sys/auxv.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/bitypes.h (73%) create mode 100644 libc/include/generic-glibc/sys/cachectl.h rename libc/{glibc-include => include/generic-glibc}/sys/cdefs.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/debugreg.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/dir.h (97%) create mode 100644 libc/include/generic-glibc/sys/elf.h rename libc/{glibc-include => include/generic-glibc}/sys/epoll.h (99%) create mode 100644 libc/include/generic-glibc/sys/errno.h rename libc/{glibc-include => include/generic-glibc}/sys/eventfd.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/fanotify.h (97%) create mode 100644 libc/include/generic-glibc/sys/fcntl.h rename libc/{glibc-include => include/generic-glibc}/sys/file.h (98%) create mode 100644 libc/include/generic-glibc/sys/fpregdef.h rename libc/{glibc-include => include/generic-glibc}/sys/fsuid.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/gmon.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/gmon_out.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/inotify.h (99%) create mode 100644 libc/include/generic-glibc/sys/io.h rename libc/{glibc-include => include/generic-glibc}/sys/ioctl.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/ipc.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/kd.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/klog.h (97%) rename libc/{glibc-include => include/generic-glibc}/sys/mman.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/mount.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/msg.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/mtio.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/param.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/pci.h (97%) rename libc/{glibc-include => include/generic-glibc}/sys/perm.h (97%) rename libc/{glibc-include => include/generic-glibc}/sys/personality.h (98%) create mode 100644 libc/include/generic-glibc/sys/platform/ppc.h rename libc/{glibc-include => include/generic-glibc}/sys/poll.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/prctl.h (97%) rename libc/{glibc-include => include/generic-glibc}/sys/procfs.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/profil.h (98%) create mode 100644 libc/include/generic-glibc/sys/ptrace.h rename libc/{glibc-include => include/generic-glibc}/sys/queue.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/quota.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/random.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/raw.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/reboot.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/reg.h (99%) create mode 100644 libc/include/generic-glibc/sys/regdef.h rename libc/{glibc-include => include/generic-glibc}/sys/resource.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/select.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/sem.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/sendfile.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/shm.h (98%) create mode 100644 libc/include/generic-glibc/sys/signal.h rename libc/{glibc-include => include/generic-glibc}/sys/signalfd.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/socket.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/socketvar.h (82%) create mode 100644 libc/include/generic-glibc/sys/soundcard.h rename libc/{glibc-include => include/generic-glibc}/sys/stat.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/statfs.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/statvfs.h (99%) create mode 100644 libc/include/generic-glibc/sys/stropts.h rename libc/{glibc-include => include/generic-glibc}/sys/swap.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/syscall.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/sysctl.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/sysinfo.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/syslog.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/sysmacros.h (98%) create mode 100644 libc/include/generic-glibc/sys/sysmips.h create mode 100644 libc/include/generic-glibc/sys/tas.h rename libc/{glibc-include => include/generic-glibc}/sys/termios.h (90%) rename libc/{glibc-include => include/generic-glibc}/sys/time.h (97%) rename libc/{glibc-include => include/generic-glibc}/sys/timeb.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/timerfd.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/times.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/timex.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/ttychars.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/ttydefaults.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/types.h (99%) create mode 100644 libc/include/generic-glibc/sys/ucontext.h rename libc/{glibc-include => include/generic-glibc}/sys/uio.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/un.h (98%) create mode 100644 libc/include/generic-glibc/sys/unistd.h create mode 100644 libc/include/generic-glibc/sys/user.h rename libc/{glibc-include => include/generic-glibc}/sys/utsname.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/vfs.h (85%) rename libc/{glibc-include => include/generic-glibc}/sys/vlimit.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/vm86.h (97%) create mode 100644 libc/include/generic-glibc/sys/vt.h rename libc/{glibc-include => include/generic-glibc}/sys/vtimes.h (98%) rename libc/{glibc-include => include/generic-glibc}/sys/wait.h (99%) rename libc/{glibc-include => include/generic-glibc}/sys/xattr.h (99%) create mode 100644 libc/include/generic-glibc/syscall.h rename libc/{glibc-include => include/generic-glibc}/sysexits.h (99%) create mode 100644 libc/include/generic-glibc/syslog.h rename libc/{glibc-include => include/generic-glibc}/tar.h (99%) rename libc/{glibc-include => include/generic-glibc}/termio.h (89%) rename libc/{glibc-include => include/generic-glibc}/termios.h (99%) rename libc/{glibc-include => include/generic-glibc}/tgmath.h (99%) rename libc/{glibc-include => include/generic-glibc}/thread_db.h (99%) rename libc/{glibc-include => include/generic-glibc}/threads.h (99%) rename libc/{glibc-include => include/generic-glibc}/time.h (99%) rename libc/{glibc-include => include/generic-glibc}/ttyent.h (99%) rename libc/{glibc-include => include/generic-glibc}/uchar.h (98%) rename libc/{glibc-include => include/generic-glibc}/ucontext.h (98%) rename libc/{glibc-include => include/generic-glibc}/ulimit.h (98%) rename libc/{glibc-include => include/generic-glibc}/unistd.h (99%) rename libc/{glibc-include => include/generic-glibc}/utime.h (98%) rename libc/{glibc-include => include/generic-glibc}/utmp.h (99%) rename libc/{glibc-include => include/generic-glibc}/utmpx.h (99%) rename libc/{glibc-include => include/generic-glibc}/values.h (98%) create mode 100644 libc/include/generic-glibc/wait.h rename libc/{glibc-include => include/generic-glibc}/wchar.h (99%) rename libc/{glibc-include => include/generic-glibc}/wctype.h (99%) rename libc/{glibc-include => include/generic-glibc}/wordexp.h (94%) rename libc/{glibc/sysdeps/unix/sysv/linux/x86 => include/i386-linux-gnu}/asm/unistd.h (100%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/a.out.h (97%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/endian.h (78%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/environments.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/epoll.h (95%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/fcntl.h (98%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/fenv.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/floatn.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/flt-eval-method.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/fp-logb.h (97%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/indirect-return.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/ipctypes.h (97%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/iscanonical.h (98%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/link.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/long-double.h (97%) create mode 100644 libc/include/i386-linux-gnu/bits/math-vector-fortran.h rename libc/{glibc-include => include/i386-linux-gnu}/bits/math-vector.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/mman.h (97%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/procfs-id.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/procfs.h (95%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/pthreadtypes-arch.h (98%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/select.h (97%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/sem-pad.h (96%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/semaphore.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/setjmp.h (97%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/sigcontext.h (97%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/siginfo-arch.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/stat.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/sysctl.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/timesize.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/typesizes.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/wordsize.h (98%) rename libc/{glibc-include => include/i386-linux-gnu}/bits/xtitypes.h (97%) rename libc/{glibc-include => include/i386-linux-gnu}/fpu_control.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/gnu/lib-names.h (93%) rename libc/{glibc-include => include/i386-linux-gnu}/gnu/stubs.h (98%) rename libc/{glibc-include => include/i386-linux-gnu}/sys/elf.h (97%) rename libc/{glibc-include => include/i386-linux-gnu}/sys/io.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/sys/ptrace.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/sys/ucontext.h (99%) rename libc/{glibc-include => include/i386-linux-gnu}/sys/user.h (99%) rename libc/{glibc/sysdeps/unix/sysv/linux/mips => include/mips-linux-gnu}/asm/sgidefs.h (100%) rename libc/{glibc/sysdeps/unix/sysv/linux/mips => include/mips-linux-gnu}/asm/unistd.h (100%) create mode 100644 libc/include/mips-linux-gnu/bits/dlfcn.h create mode 100644 libc/include/mips-linux-gnu/bits/errno.h create mode 100644 libc/include/mips-linux-gnu/bits/eventfd.h create mode 100644 libc/include/mips-linux-gnu/bits/inotify.h create mode 100644 libc/include/mips-linux-gnu/bits/ioctl-types.h create mode 100644 libc/include/mips-linux-gnu/bits/ipc.h create mode 100644 libc/include/mips-linux-gnu/bits/ipctypes.h create mode 100644 libc/include/mips-linux-gnu/bits/local_lim.h create mode 100644 libc/include/mips-linux-gnu/bits/mman.h create mode 100644 libc/include/mips-linux-gnu/bits/msq-pad.h create mode 100644 libc/include/mips-linux-gnu/bits/poll.h create mode 100644 libc/include/mips-linux-gnu/bits/resource.h create mode 100644 libc/include/mips-linux-gnu/bits/sem-pad.h create mode 100644 libc/include/mips-linux-gnu/bits/shm-pad.h create mode 100644 libc/include/mips-linux-gnu/bits/shmlba.h create mode 100644 libc/include/mips-linux-gnu/bits/sigaction.h create mode 100644 libc/include/mips-linux-gnu/bits/sigcontext.h create mode 100644 libc/include/mips-linux-gnu/bits/siginfo-arch.h create mode 100644 libc/include/mips-linux-gnu/bits/signalfd.h create mode 100644 libc/include/mips-linux-gnu/bits/signum.h create mode 100644 libc/include/mips-linux-gnu/bits/socket_type.h create mode 100644 libc/include/mips-linux-gnu/bits/statfs.h create mode 100644 libc/include/mips-linux-gnu/bits/termios-c_cc.h create mode 100644 libc/include/mips-linux-gnu/bits/termios-c_lflag.h create mode 100644 libc/include/mips-linux-gnu/bits/termios-struct.h create mode 100644 libc/include/mips-linux-gnu/bits/termios-tcflow.h create mode 100644 libc/include/mips-linux-gnu/bits/timerfd.h create mode 100644 libc/include/mips-linux-gnu/bits/types/stack_t.h create mode 100644 libc/include/mips-linux-gnu/ieee754.h create mode 100644 libc/include/mips64-linux-gnuabi64/asm/sgidefs.h create mode 100644 libc/include/mips64-linux-gnuabi64/asm/unistd.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/dlfcn.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/errno.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/eventfd.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/inotify.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/ioctl-types.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/ipc.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/ipctypes.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/local_lim.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/mman.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/msq-pad.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/poll.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/resource.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/sem-pad.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/shm-pad.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/shmlba.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/sigaction.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/sigcontext.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/siginfo-arch.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/signalfd.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/signum.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/socket_type.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/statfs.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/termios-c_cc.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/termios-c_lflag.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/termios-struct.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/termios-tcflow.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/timerfd.h create mode 100644 libc/include/mips64-linux-gnuabi64/bits/types/stack_t.h create mode 100644 libc/include/mips64-linux-gnuabi64/ieee754.h create mode 100644 libc/include/mips64-linux-gnuabin32/asm/sgidefs.h create mode 100644 libc/include/mips64-linux-gnuabin32/asm/unistd.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/dlfcn.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/errno.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/eventfd.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/inotify.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/ioctl-types.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/ipc.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/ipctypes.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/local_lim.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/mman.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/msq-pad.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/poll.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/resource.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/sem-pad.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/shm-pad.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/shmlba.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/sigaction.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/sigcontext.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/siginfo-arch.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/signalfd.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/signum.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/socket_type.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/statfs.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/termios-c_cc.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/termios-c_lflag.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/termios-struct.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/termios-tcflow.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/timerfd.h create mode 100644 libc/include/mips64-linux-gnuabin32/bits/types/stack_t.h create mode 100644 libc/include/mips64-linux-gnuabin32/ieee754.h create mode 100644 libc/include/mips64el-linux-gnuabi64/asm/sgidefs.h create mode 100644 libc/include/mips64el-linux-gnuabi64/asm/unistd.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/dlfcn.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/errno.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/eventfd.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/inotify.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/ioctl-types.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/ipc.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/ipctypes.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/local_lim.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/mman.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/poll.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/resource.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/sem-pad.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/shmlba.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/sigaction.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/sigcontext.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/siginfo-arch.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/signalfd.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/signum.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/socket_type.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/statfs.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/termios-c_cc.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/termios-c_lflag.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/termios-struct.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/termios-tcflow.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/timerfd.h create mode 100644 libc/include/mips64el-linux-gnuabi64/bits/types/stack_t.h create mode 100644 libc/include/mips64el-linux-gnuabi64/ieee754.h create mode 100644 libc/include/mips64el-linux-gnuabin32/asm/sgidefs.h create mode 100644 libc/include/mips64el-linux-gnuabin32/asm/unistd.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/dlfcn.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/errno.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/eventfd.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/inotify.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/ioctl-types.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/ipc.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/ipctypes.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/local_lim.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/mman.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/poll.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/resource.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/sem-pad.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/shm-pad.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/shmlba.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/sigaction.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/sigcontext.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/siginfo-arch.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/signalfd.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/signum.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/socket_type.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/statfs.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/termios-c_cc.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/termios-c_lflag.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/termios-struct.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/termios-tcflow.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/timerfd.h create mode 100644 libc/include/mips64el-linux-gnuabin32/bits/types/stack_t.h create mode 100644 libc/include/mips64el-linux-gnuabin32/ieee754.h create mode 100644 libc/include/mipsel-linux-gnu/asm/sgidefs.h create mode 100644 libc/include/mipsel-linux-gnu/asm/unistd.h create mode 100644 libc/include/mipsel-linux-gnu/bits/dlfcn.h create mode 100644 libc/include/mipsel-linux-gnu/bits/errno.h create mode 100644 libc/include/mipsel-linux-gnu/bits/eventfd.h create mode 100644 libc/include/mipsel-linux-gnu/bits/inotify.h create mode 100644 libc/include/mipsel-linux-gnu/bits/ioctl-types.h create mode 100644 libc/include/mipsel-linux-gnu/bits/ipc.h create mode 100644 libc/include/mipsel-linux-gnu/bits/ipctypes.h create mode 100644 libc/include/mipsel-linux-gnu/bits/local_lim.h create mode 100644 libc/include/mipsel-linux-gnu/bits/mman.h create mode 100644 libc/include/mipsel-linux-gnu/bits/msq-pad.h create mode 100644 libc/include/mipsel-linux-gnu/bits/poll.h create mode 100644 libc/include/mipsel-linux-gnu/bits/resource.h create mode 100644 libc/include/mipsel-linux-gnu/bits/sem-pad.h create mode 100644 libc/include/mipsel-linux-gnu/bits/shm-pad.h create mode 100644 libc/include/mipsel-linux-gnu/bits/shmlba.h create mode 100644 libc/include/mipsel-linux-gnu/bits/sigaction.h create mode 100644 libc/include/mipsel-linux-gnu/bits/sigcontext.h create mode 100644 libc/include/mipsel-linux-gnu/bits/siginfo-arch.h create mode 100644 libc/include/mipsel-linux-gnu/bits/signalfd.h create mode 100644 libc/include/mipsel-linux-gnu/bits/signum.h create mode 100644 libc/include/mipsel-linux-gnu/bits/socket_type.h create mode 100644 libc/include/mipsel-linux-gnu/bits/statfs.h create mode 100644 libc/include/mipsel-linux-gnu/bits/termios-c_cc.h create mode 100644 libc/include/mipsel-linux-gnu/bits/termios-c_lflag.h create mode 100644 libc/include/mipsel-linux-gnu/bits/termios-struct.h create mode 100644 libc/include/mipsel-linux-gnu/bits/termios-tcflow.h create mode 100644 libc/include/mipsel-linux-gnu/bits/timerfd.h create mode 100644 libc/include/mipsel-linux-gnu/bits/types/stack_t.h create mode 100644 libc/include/mipsel-linux-gnu/ieee754.h rename libc/{glibc/sysdeps/unix/sysv/linux/nios2 => include/nios2-linux-gnu}/asm/unistd.h (100%) create mode 100644 libc/include/nios2-linux-gnu/bits/endian.h create mode 100644 libc/include/nios2-linux-gnu/bits/fcntl.h create mode 100644 libc/include/nios2-linux-gnu/bits/fenv.h create mode 100644 libc/include/nios2-linux-gnu/bits/floatn.h create mode 100644 libc/include/nios2-linux-gnu/bits/link.h create mode 100644 libc/include/nios2-linux-gnu/bits/long-double.h create mode 100644 libc/include/nios2-linux-gnu/bits/procfs.h create mode 100644 libc/include/nios2-linux-gnu/bits/pthreadtypes-arch.h create mode 100644 libc/include/nios2-linux-gnu/bits/semaphore.h create mode 100644 libc/include/nios2-linux-gnu/bits/setjmp.h create mode 100644 libc/include/nios2-linux-gnu/bits/stat.h create mode 100644 libc/include/nios2-linux-gnu/bits/statfs.h create mode 100644 libc/include/nios2-linux-gnu/bits/typesizes.h create mode 100644 libc/include/nios2-linux-gnu/bits/wordsize.h create mode 100644 libc/include/nios2-linux-gnu/fpu_control.h create mode 100644 libc/include/nios2-linux-gnu/gnu/lib-names.h create mode 100644 libc/include/nios2-linux-gnu/gnu/stubs.h rename libc/{glibc/sysdeps/unix/sysv/linux/csky/kernel-features.h => include/nios2-linux-gnu/sys/cachectl.h} (61%) create mode 100644 libc/include/nios2-linux-gnu/sys/ucontext.h create mode 100644 libc/include/nios2-linux-gnu/sys/user.h rename libc/{glibc/sysdeps/unix/sysv/linux/powerpc => include/powerpc-linux-gnu}/asm/unistd.h (100%) create mode 100644 libc/include/powerpc-linux-gnu/bits/endian.h create mode 100644 libc/include/powerpc-linux-gnu/bits/environments.h create mode 100644 libc/include/powerpc-linux-gnu/bits/fcntl.h create mode 100644 libc/include/powerpc-linux-gnu/bits/fenv.h create mode 100644 libc/include/powerpc-linux-gnu/bits/fenvinline.h create mode 100644 libc/include/powerpc-linux-gnu/bits/floatn.h create mode 100644 libc/include/powerpc-linux-gnu/bits/fp-fast.h create mode 100644 libc/include/powerpc-linux-gnu/bits/hwcap.h create mode 100644 libc/include/powerpc-linux-gnu/bits/ioctl-types.h create mode 100644 libc/include/powerpc-linux-gnu/bits/ipc.h create mode 100644 libc/include/powerpc-linux-gnu/bits/iscanonical.h create mode 100644 libc/include/powerpc-linux-gnu/bits/link.h create mode 100644 libc/include/powerpc-linux-gnu/bits/local_lim.h create mode 100644 libc/include/powerpc-linux-gnu/bits/long-double.h create mode 100644 libc/include/powerpc-linux-gnu/bits/mman.h create mode 100644 libc/include/powerpc-linux-gnu/bits/msq-pad.h create mode 100644 libc/include/powerpc-linux-gnu/bits/procfs.h create mode 100644 libc/include/powerpc-linux-gnu/bits/pthreadtypes-arch.h create mode 100644 libc/include/powerpc-linux-gnu/bits/sem-pad.h create mode 100644 libc/include/powerpc-linux-gnu/bits/semaphore.h create mode 100644 libc/include/powerpc-linux-gnu/bits/setjmp.h create mode 100644 libc/include/powerpc-linux-gnu/bits/shm-pad.h create mode 100644 libc/include/powerpc-linux-gnu/bits/sigstack.h create mode 100644 libc/include/powerpc-linux-gnu/bits/stat.h create mode 100644 libc/include/powerpc-linux-gnu/bits/termios-baud.h create mode 100644 libc/include/powerpc-linux-gnu/bits/termios-c_cc.h create mode 100644 libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h create mode 100644 libc/include/powerpc-linux-gnu/bits/termios-c_iflag.h create mode 100644 libc/include/powerpc-linux-gnu/bits/termios-c_lflag.h create mode 100644 libc/include/powerpc-linux-gnu/bits/termios-c_oflag.h create mode 100644 libc/include/powerpc-linux-gnu/bits/termios-misc.h create mode 100644 libc/include/powerpc-linux-gnu/bits/wordsize.h create mode 100644 libc/include/powerpc-linux-gnu/fpu_control.h create mode 100644 libc/include/powerpc-linux-gnu/gnu/lib-names-32.h create mode 100644 libc/include/powerpc-linux-gnu/gnu/lib-names.h create mode 100644 libc/include/powerpc-linux-gnu/gnu/stubs.h create mode 100644 libc/include/powerpc-linux-gnu/ieee754.h create mode 100644 libc/include/powerpc-linux-gnu/sys/ptrace.h create mode 100644 libc/include/powerpc-linux-gnu/sys/ucontext.h create mode 100644 libc/include/powerpc-linux-gnu/sys/user.h create mode 100644 libc/include/powerpc64-linux-gnu/asm/unistd.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/endian.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/environments.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/fcntl.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/fenv.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/fenvinline.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/floatn.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/fp-fast.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/hwcap.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/ioctl-types.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/ipc.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/iscanonical.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/link.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/local_lim.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/long-double.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/mman.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/msq-pad.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/procfs.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/pthreadtypes-arch.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/sem-pad.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/semaphore.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/setjmp.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/shm-pad.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/sigstack.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/stat.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/termios-baud.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/termios-c_cc.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/termios-c_cflag.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/termios-c_iflag.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/termios-c_lflag.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/termios-c_oflag.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/termios-misc.h create mode 100644 libc/include/powerpc64-linux-gnu/bits/wordsize.h create mode 100644 libc/include/powerpc64-linux-gnu/fpu_control.h create mode 100644 libc/include/powerpc64-linux-gnu/gnu/lib-names-64-v1.h create mode 100644 libc/include/powerpc64-linux-gnu/gnu/lib-names.h create mode 100644 libc/include/powerpc64-linux-gnu/gnu/stubs-64-v1.h create mode 100644 libc/include/powerpc64-linux-gnu/gnu/stubs.h create mode 100644 libc/include/powerpc64-linux-gnu/ieee754.h create mode 100644 libc/include/powerpc64-linux-gnu/sys/ptrace.h create mode 100644 libc/include/powerpc64-linux-gnu/sys/ucontext.h create mode 100644 libc/include/powerpc64-linux-gnu/sys/user.h create mode 100644 libc/include/powerpc64le-linux-gnu/asm/unistd.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/endian.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/environments.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/fcntl.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/fenv.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/fenvinline.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/floatn.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/fp-fast.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/hwcap.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/ioctl-types.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/ipc.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/iscanonical.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/link.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/local_lim.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/long-double.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/mman.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/msq-pad.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/procfs.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/pthreadtypes-arch.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/sem-pad.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/semaphore.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/setjmp.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/shm-pad.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/sigstack.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/stat.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/termios-baud.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/termios-c_cc.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/termios-c_cflag.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/termios-c_iflag.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/termios-c_lflag.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/termios-c_oflag.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/termios-misc.h create mode 100644 libc/include/powerpc64le-linux-gnu/bits/wordsize.h create mode 100644 libc/include/powerpc64le-linux-gnu/fpu_control.h create mode 100644 libc/include/powerpc64le-linux-gnu/gnu/lib-names-64-v2.h create mode 100644 libc/include/powerpc64le-linux-gnu/gnu/lib-names.h create mode 100644 libc/include/powerpc64le-linux-gnu/gnu/stubs-64-v2.h create mode 100644 libc/include/powerpc64le-linux-gnu/gnu/stubs.h create mode 100644 libc/include/powerpc64le-linux-gnu/ieee754.h create mode 100644 libc/include/powerpc64le-linux-gnu/sys/ptrace.h create mode 100644 libc/include/powerpc64le-linux-gnu/sys/ucontext.h create mode 100644 libc/include/powerpc64le-linux-gnu/sys/user.h rename libc/{glibc/sysdeps/unix/sysv/linux/riscv => include/riscv64-linux-gnu}/asm/unistd.h (100%) create mode 100644 libc/include/riscv64-linux-gnu/bits/endian.h create mode 100644 libc/include/riscv64-linux-gnu/bits/fcntl.h create mode 100644 libc/include/riscv64-linux-gnu/bits/fenv.h create mode 100644 libc/include/riscv64-linux-gnu/bits/floatn.h create mode 100644 libc/include/riscv64-linux-gnu/bits/link.h create mode 100644 libc/include/riscv64-linux-gnu/bits/long-double.h create mode 100644 libc/include/riscv64-linux-gnu/bits/procfs.h create mode 100644 libc/include/riscv64-linux-gnu/bits/pthreadtypes-arch.h create mode 100644 libc/include/riscv64-linux-gnu/bits/semaphore.h create mode 100644 libc/include/riscv64-linux-gnu/bits/setjmp.h create mode 100644 libc/include/riscv64-linux-gnu/bits/sigcontext.h create mode 100644 libc/include/riscv64-linux-gnu/bits/stat.h create mode 100644 libc/include/riscv64-linux-gnu/bits/statfs.h create mode 100644 libc/include/riscv64-linux-gnu/bits/typesizes.h create mode 100644 libc/include/riscv64-linux-gnu/bits/wordsize.h create mode 100644 libc/include/riscv64-linux-gnu/fpu_control.h create mode 100644 libc/include/riscv64-linux-gnu/gnu/lib-names-lp64.h create mode 100644 libc/include/riscv64-linux-gnu/gnu/lib-names.h create mode 100644 libc/include/riscv64-linux-gnu/gnu/stubs-lp64.h create mode 100644 libc/include/riscv64-linux-gnu/gnu/stubs.h create mode 100644 libc/include/riscv64-linux-gnu/ieee754.h create mode 100644 libc/include/riscv64-linux-gnu/sys/asm.h create mode 100644 libc/include/riscv64-linux-gnu/sys/cachectl.h create mode 100644 libc/include/riscv64-linux-gnu/sys/ucontext.h create mode 100644 libc/include/riscv64-linux-gnu/sys/user.h rename libc/{glibc/sysdeps/unix/sysv/linux/s390 => include/s390x-linux-gnu}/asm/unistd.h (100%) create mode 100644 libc/include/s390x-linux-gnu/bits/elfclass.h create mode 100644 libc/include/s390x-linux-gnu/bits/endian.h create mode 100644 libc/include/s390x-linux-gnu/bits/environments.h create mode 100644 libc/include/s390x-linux-gnu/bits/fcntl.h create mode 100644 libc/include/s390x-linux-gnu/bits/fenv.h create mode 100644 libc/include/s390x-linux-gnu/bits/floatn.h create mode 100644 libc/include/s390x-linux-gnu/bits/flt-eval-method.h create mode 100644 libc/include/s390x-linux-gnu/bits/hwcap.h create mode 100644 libc/include/s390x-linux-gnu/bits/ipc.h create mode 100644 libc/include/s390x-linux-gnu/bits/link.h create mode 100644 libc/include/s390x-linux-gnu/bits/long-double.h create mode 100644 libc/include/s390x-linux-gnu/bits/procfs-extra.h create mode 100644 libc/include/s390x-linux-gnu/bits/procfs-id.h create mode 100644 libc/include/s390x-linux-gnu/bits/procfs.h create mode 100644 libc/include/s390x-linux-gnu/bits/pthreadtypes-arch.h create mode 100644 libc/include/s390x-linux-gnu/bits/semaphore.h create mode 100644 libc/include/s390x-linux-gnu/bits/setjmp.h create mode 100644 libc/include/s390x-linux-gnu/bits/sigaction.h create mode 100644 libc/include/s390x-linux-gnu/bits/stat.h create mode 100644 libc/include/s390x-linux-gnu/bits/statfs.h create mode 100644 libc/include/s390x-linux-gnu/bits/typesizes.h create mode 100644 libc/include/s390x-linux-gnu/bits/utmp.h create mode 100644 libc/include/s390x-linux-gnu/bits/utmpx.h create mode 100644 libc/include/s390x-linux-gnu/bits/wordsize.h create mode 100644 libc/include/s390x-linux-gnu/bits/xtitypes.h create mode 100644 libc/include/s390x-linux-gnu/fpu_control.h create mode 100644 libc/include/s390x-linux-gnu/gnu/lib-names-64.h create mode 100644 libc/include/s390x-linux-gnu/gnu/lib-names.h create mode 100644 libc/include/s390x-linux-gnu/gnu/stubs-64.h create mode 100644 libc/include/s390x-linux-gnu/gnu/stubs.h create mode 100644 libc/include/s390x-linux-gnu/ieee754.h create mode 100644 libc/include/s390x-linux-gnu/sys/elf.h create mode 100644 libc/include/s390x-linux-gnu/sys/ptrace.h create mode 100644 libc/include/s390x-linux-gnu/sys/ucontext.h create mode 100644 libc/include/s390x-linux-gnu/sys/user.h create mode 100644 libc/include/sparc-linux-gnu/a.out.h rename libc/{glibc/sysdeps/unix/sysv/linux/sparc => include/sparc-linux-gnu}/asm/unistd.h (100%) create mode 100644 libc/include/sparc-linux-gnu/bits/a.out.h create mode 100644 libc/include/sparc-linux-gnu/bits/endian.h create mode 100644 libc/include/sparc-linux-gnu/bits/environments.h create mode 100644 libc/include/sparc-linux-gnu/bits/epoll.h create mode 100644 libc/include/sparc-linux-gnu/bits/errno.h create mode 100644 libc/include/sparc-linux-gnu/bits/eventfd.h create mode 100644 libc/include/sparc-linux-gnu/bits/fcntl.h create mode 100644 libc/include/sparc-linux-gnu/bits/fenv.h create mode 100644 libc/include/sparc-linux-gnu/bits/floatn.h create mode 100644 libc/include/sparc-linux-gnu/bits/hwcap.h create mode 100644 libc/include/sparc-linux-gnu/bits/inotify.h create mode 100644 libc/include/sparc-linux-gnu/bits/ioctls.h create mode 100644 libc/include/sparc-linux-gnu/bits/ipc.h create mode 100644 libc/include/sparc-linux-gnu/bits/link.h create mode 100644 libc/include/sparc-linux-gnu/bits/local_lim.h create mode 100644 libc/include/sparc-linux-gnu/bits/long-double.h create mode 100644 libc/include/sparc-linux-gnu/bits/mman.h create mode 100644 libc/include/sparc-linux-gnu/bits/msq-pad.h create mode 100644 libc/include/sparc-linux-gnu/bits/poll.h create mode 100644 libc/include/sparc-linux-gnu/bits/procfs-extra.h create mode 100644 libc/include/sparc-linux-gnu/bits/procfs-id.h create mode 100644 libc/include/sparc-linux-gnu/bits/procfs.h create mode 100644 libc/include/sparc-linux-gnu/bits/pthreadtypes-arch.h create mode 100644 libc/include/sparc-linux-gnu/bits/resource.h create mode 100644 libc/include/sparc-linux-gnu/bits/sem-pad.h create mode 100644 libc/include/sparc-linux-gnu/bits/semaphore.h create mode 100644 libc/include/sparc-linux-gnu/bits/setjmp.h create mode 100644 libc/include/sparc-linux-gnu/bits/shm-pad.h create mode 100644 libc/include/sparc-linux-gnu/bits/shmlba.h create mode 100644 libc/include/sparc-linux-gnu/bits/sigaction.h create mode 100644 libc/include/sparc-linux-gnu/bits/sigcontext.h create mode 100644 libc/include/sparc-linux-gnu/bits/siginfo-arch.h create mode 100644 libc/include/sparc-linux-gnu/bits/siginfo-consts-arch.h create mode 100644 libc/include/sparc-linux-gnu/bits/signalfd.h create mode 100644 libc/include/sparc-linux-gnu/bits/signum.h create mode 100644 libc/include/sparc-linux-gnu/bits/sigstack.h create mode 100644 libc/include/sparc-linux-gnu/bits/socket_type.h create mode 100644 libc/include/sparc-linux-gnu/bits/stat.h create mode 100644 libc/include/sparc-linux-gnu/bits/termios-baud.h create mode 100644 libc/include/sparc-linux-gnu/bits/termios-c_cc.h create mode 100644 libc/include/sparc-linux-gnu/bits/termios-c_oflag.h create mode 100644 libc/include/sparc-linux-gnu/bits/termios-struct.h create mode 100644 libc/include/sparc-linux-gnu/bits/timerfd.h create mode 100644 libc/include/sparc-linux-gnu/bits/typesizes.h create mode 100644 libc/include/sparc-linux-gnu/bits/wordsize.h create mode 100644 libc/include/sparc-linux-gnu/fpu_control.h create mode 100644 libc/include/sparc-linux-gnu/gnu/lib-names-64.h create mode 100644 libc/include/sparc-linux-gnu/gnu/lib-names.h create mode 100644 libc/include/sparc-linux-gnu/gnu/stubs-64.h create mode 100644 libc/include/sparc-linux-gnu/gnu/stubs.h create mode 100644 libc/include/sparc-linux-gnu/ieee754.h create mode 100644 libc/include/sparc-linux-gnu/sys/ptrace.h create mode 100644 libc/include/sparc-linux-gnu/sys/ucontext.h create mode 100644 libc/include/sparc-linux-gnu/sys/user.h create mode 100644 libc/include/sparcv9-linux-gnu/a.out.h create mode 100644 libc/include/sparcv9-linux-gnu/asm/unistd.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/a.out.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/endian.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/environments.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/epoll.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/errno.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/eventfd.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/fcntl.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/fenv.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/floatn.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/hwcap.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/inotify.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/ioctls.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/ipc.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/link.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/local_lim.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/long-double.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/mman.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/msq-pad.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/poll.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/procfs-extra.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/procfs-id.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/procfs.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/pthreadtypes-arch.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/resource.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/sem-pad.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/semaphore.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/setjmp.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/shm-pad.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/shmlba.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/sigaction.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/sigcontext.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/siginfo-arch.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/siginfo-consts-arch.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/signalfd.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/signum.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/sigstack.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/socket_type.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/stat.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/termios-baud.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/termios-c_cc.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/termios-c_oflag.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/termios-struct.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/timerfd.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/typesizes.h create mode 100644 libc/include/sparcv9-linux-gnu/bits/wordsize.h create mode 100644 libc/include/sparcv9-linux-gnu/fpu_control.h create mode 100644 libc/include/sparcv9-linux-gnu/gnu/lib-names.h create mode 100644 libc/include/sparcv9-linux-gnu/gnu/stubs-32.h create mode 100644 libc/include/sparcv9-linux-gnu/gnu/stubs.h create mode 100644 libc/include/sparcv9-linux-gnu/ieee754.h create mode 100644 libc/include/sparcv9-linux-gnu/sys/ptrace.h create mode 100644 libc/include/sparcv9-linux-gnu/sys/ucontext.h create mode 100644 libc/include/sparcv9-linux-gnu/sys/user.h create mode 100644 libc/include/x86_64-linux-gnu/asm/unistd.h create mode 100644 libc/include/x86_64-linux-gnu/bits/a.out.h create mode 100644 libc/include/x86_64-linux-gnu/bits/endian.h create mode 100644 libc/include/x86_64-linux-gnu/bits/environments.h create mode 100644 libc/include/x86_64-linux-gnu/bits/epoll.h create mode 100644 libc/include/x86_64-linux-gnu/bits/fcntl.h create mode 100644 libc/include/x86_64-linux-gnu/bits/fenv.h create mode 100644 libc/include/x86_64-linux-gnu/bits/floatn.h create mode 100644 libc/include/x86_64-linux-gnu/bits/flt-eval-method.h create mode 100644 libc/include/x86_64-linux-gnu/bits/fp-logb.h create mode 100644 libc/include/x86_64-linux-gnu/bits/indirect-return.h create mode 100644 libc/include/x86_64-linux-gnu/bits/ipctypes.h create mode 100644 libc/include/x86_64-linux-gnu/bits/iscanonical.h create mode 100644 libc/include/x86_64-linux-gnu/bits/link.h create mode 100644 libc/include/x86_64-linux-gnu/bits/long-double.h create mode 100644 libc/include/x86_64-linux-gnu/bits/math-vector-fortran.h create mode 100644 libc/include/x86_64-linux-gnu/bits/math-vector.h create mode 100644 libc/include/x86_64-linux-gnu/bits/mman.h create mode 100644 libc/include/x86_64-linux-gnu/bits/procfs-id.h create mode 100644 libc/include/x86_64-linux-gnu/bits/procfs.h create mode 100644 libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h create mode 100644 libc/include/x86_64-linux-gnu/bits/select.h create mode 100644 libc/include/x86_64-linux-gnu/bits/sem-pad.h create mode 100644 libc/include/x86_64-linux-gnu/bits/semaphore.h create mode 100644 libc/include/x86_64-linux-gnu/bits/setjmp.h create mode 100644 libc/include/x86_64-linux-gnu/bits/sigcontext.h create mode 100644 libc/include/x86_64-linux-gnu/bits/siginfo-arch.h create mode 100644 libc/include/x86_64-linux-gnu/bits/stat.h create mode 100644 libc/include/x86_64-linux-gnu/bits/sysctl.h create mode 100644 libc/include/x86_64-linux-gnu/bits/timesize.h create mode 100644 libc/include/x86_64-linux-gnu/bits/typesizes.h create mode 100644 libc/include/x86_64-linux-gnu/bits/wordsize.h create mode 100644 libc/include/x86_64-linux-gnu/bits/xtitypes.h create mode 100644 libc/include/x86_64-linux-gnu/fpu_control.h rename libc/{glibc-include => include/x86_64-linux-gnu}/gnu/lib-names-64.h (96%) create mode 100644 libc/include/x86_64-linux-gnu/gnu/lib-names.h rename libc/{glibc-include => include/x86_64-linux-gnu}/gnu/stubs-64.h (96%) create mode 100644 libc/include/x86_64-linux-gnu/gnu/stubs.h create mode 100644 libc/include/x86_64-linux-gnu/sys/elf.h create mode 100644 libc/include/x86_64-linux-gnu/sys/io.h create mode 100644 libc/include/x86_64-linux-gnu/sys/ptrace.h create mode 100644 libc/include/x86_64-linux-gnu/sys/ucontext.h create mode 100644 libc/include/x86_64-linux-gnu/sys/user.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/a.out.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/endian.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/environments.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/epoll.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/fcntl.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/fenv.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/floatn.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/flt-eval-method.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/fp-logb.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/indirect-return.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/ipctypes.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/iscanonical.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/link.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/long-double.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/math-vector-fortran.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/math-vector.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/mman.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/procfs-id.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/procfs.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/pthreadtypes-arch.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/select.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/sem-pad.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/semaphore.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/setjmp.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/sigcontext.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/siginfo-arch.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/stat.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/sysctl.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/timesize.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/typesizes.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/wordsize.h create mode 100644 libc/include/x86_64-linux-gnux32/bits/xtitypes.h create mode 100644 libc/include/x86_64-linux-gnux32/fpu_control.h create mode 100644 libc/include/x86_64-linux-gnux32/gnu/lib-names-x32.h create mode 100644 libc/include/x86_64-linux-gnux32/gnu/lib-names.h create mode 100644 libc/include/x86_64-linux-gnux32/gnu/stubs-x32.h create mode 100644 libc/include/x86_64-linux-gnux32/gnu/stubs.h create mode 100644 libc/include/x86_64-linux-gnux32/sys/elf.h create mode 100644 libc/include/x86_64-linux-gnux32/sys/io.h create mode 100644 libc/include/x86_64-linux-gnux32/sys/ptrace.h create mode 100644 libc/include/x86_64-linux-gnux32/sys/ucontext.h create mode 100644 libc/include/x86_64-linux-gnux32/sys/user.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 18a142110f..90fe6fd711 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -807,450 +807,12 @@ set(ZIG_C_HEADER_FILES set(ZIG_LIBC_FILES "dummy/c.zig" + "dummy/c/i386.zig" + "dummy/c/x86_64.zig" "dummy/dl.zig" "dummy/m.zig" "dummy/pthread.zig" "dummy/rt.zig" - "glibc-include/a.out.h" - "glibc-include/aio.h" - "glibc-include/aliases.h" - "glibc-include/alloca.h" - "glibc-include/ar.h" - "glibc-include/argp.h" - "glibc-include/argz.h" - "glibc-include/arpa/ftp.h" - "glibc-include/arpa/inet.h" - "glibc-include/arpa/nameser.h" - "glibc-include/arpa/nameser_compat.h" - "glibc-include/arpa/telnet.h" - "glibc-include/arpa/tftp.h" - "glibc-include/assert.h" - "glibc-include/bits/a.out.h" - "glibc-include/bits/byteswap.h" - "glibc-include/bits/cmathcalls.h" - "glibc-include/bits/confname.h" - "glibc-include/bits/cpu-set.h" - "glibc-include/bits/dirent.h" - "glibc-include/bits/dlfcn.h" - "glibc-include/bits/elfclass.h" - "glibc-include/bits/endian.h" - "glibc-include/bits/environments.h" - "glibc-include/bits/epoll.h" - "glibc-include/bits/errno.h" - "glibc-include/bits/error.h" - "glibc-include/bits/eventfd.h" - "glibc-include/bits/fcntl-linux.h" - "glibc-include/bits/fcntl.h" - "glibc-include/bits/fcntl2.h" - "glibc-include/bits/fenv.h" - "glibc-include/bits/fenvinline.h" - "glibc-include/bits/floatn-common.h" - "glibc-include/bits/floatn.h" - "glibc-include/bits/flt-eval-method.h" - "glibc-include/bits/fp-fast.h" - "glibc-include/bits/fp-logb.h" - "glibc-include/bits/getopt_core.h" - "glibc-include/bits/getopt_ext.h" - "glibc-include/bits/getopt_posix.h" - "glibc-include/bits/hwcap.h" - "glibc-include/bits/in.h" - "glibc-include/bits/indirect-return.h" - "glibc-include/bits/initspin.h" - "glibc-include/bits/inotify.h" - "glibc-include/bits/ioctl-types.h" - "glibc-include/bits/ioctls.h" - "glibc-include/bits/ipc.h" - "glibc-include/bits/ipctypes.h" - "glibc-include/bits/iscanonical.h" - "glibc-include/bits/libc-header-start.h" - "glibc-include/bits/libm-simd-decl-stubs.h" - "glibc-include/bits/link.h" - "glibc-include/bits/local_lim.h" - "glibc-include/bits/locale.h" - "glibc-include/bits/long-double.h" - "glibc-include/bits/math-finite.h" - "glibc-include/bits/math-vector.h" - "glibc-include/bits/mathcalls-helper-functions.h" - "glibc-include/bits/mathcalls-narrow.h" - "glibc-include/bits/mathcalls.h" - "glibc-include/bits/mathdef.h" - "glibc-include/bits/mathinline.h" - "glibc-include/bits/mman-linux.h" - "glibc-include/bits/mman-map-flags-generic.h" - "glibc-include/bits/mman-shared.h" - "glibc-include/bits/mman.h" - "glibc-include/bits/monetary-ldbl.h" - "glibc-include/bits/mqueue.h" - "glibc-include/bits/mqueue2.h" - "glibc-include/bits/msq-pad.h" - "glibc-include/bits/msq.h" - "glibc-include/bits/netdb.h" - "glibc-include/bits/param.h" - "glibc-include/bits/poll.h" - "glibc-include/bits/poll2.h" - "glibc-include/bits/posix1_lim.h" - "glibc-include/bits/posix2_lim.h" - "glibc-include/bits/posix_opt.h" - "glibc-include/bits/printf-ldbl.h" - "glibc-include/bits/procfs-extra.h" - "glibc-include/bits/procfs-id.h" - "glibc-include/bits/procfs-prregset.h" - "glibc-include/bits/procfs.h" - "glibc-include/bits/pthreadtypes-arch.h" - "glibc-include/bits/pthreadtypes.h" - "glibc-include/bits/ptrace-shared.h" - "glibc-include/bits/resource.h" - "glibc-include/bits/sched.h" - "glibc-include/bits/select.h" - "glibc-include/bits/select2.h" - "glibc-include/bits/sem-pad.h" - "glibc-include/bits/sem.h" - "glibc-include/bits/semaphore.h" - "glibc-include/bits/setjmp.h" - "glibc-include/bits/setjmp2.h" - "glibc-include/bits/shm-pad.h" - "glibc-include/bits/shm.h" - "glibc-include/bits/shmlba.h" - "glibc-include/bits/sigaction.h" - "glibc-include/bits/sigcontext.h" - "glibc-include/bits/sigevent-consts.h" - "glibc-include/bits/siginfo-arch.h" - "glibc-include/bits/siginfo-consts-arch.h" - "glibc-include/bits/siginfo-consts.h" - "glibc-include/bits/signalfd.h" - "glibc-include/bits/signum-generic.h" - "glibc-include/bits/signum.h" - "glibc-include/bits/sigstack.h" - "glibc-include/bits/sigthread.h" - "glibc-include/bits/sockaddr.h" - "glibc-include/bits/socket.h" - "glibc-include/bits/socket2.h" - "glibc-include/bits/socket_type.h" - "glibc-include/bits/ss_flags.h" - "glibc-include/bits/stab.def" - "glibc-include/bits/stat.h" - "glibc-include/bits/statfs.h" - "glibc-include/bits/statvfs.h" - "glibc-include/bits/statx.h" - "glibc-include/bits/stdint-intn.h" - "glibc-include/bits/stdint-uintn.h" - "glibc-include/bits/stdio-ldbl.h" - "glibc-include/bits/stdio.h" - "glibc-include/bits/stdio2.h" - "glibc-include/bits/stdio_lim.h" - "glibc-include/bits/stdlib-bsearch.h" - "glibc-include/bits/stdlib-float.h" - "glibc-include/bits/stdlib-ldbl.h" - "glibc-include/bits/stdlib.h" - "glibc-include/bits/string_fortified.h" - "glibc-include/bits/strings_fortified.h" - "glibc-include/bits/stropts.h" - "glibc-include/bits/sys_errlist.h" - "glibc-include/bits/syscall.h" - "glibc-include/bits/sysctl.h" - "glibc-include/bits/syslog-ldbl.h" - "glibc-include/bits/syslog-path.h" - "glibc-include/bits/syslog.h" - "glibc-include/bits/sysmacros.h" - "glibc-include/bits/termios-baud.h" - "glibc-include/bits/termios-c_cc.h" - "glibc-include/bits/termios-c_cflag.h" - "glibc-include/bits/termios-c_iflag.h" - "glibc-include/bits/termios-c_lflag.h" - "glibc-include/bits/termios-c_oflag.h" - "glibc-include/bits/termios-misc.h" - "glibc-include/bits/termios-struct.h" - "glibc-include/bits/termios-tcflow.h" - "glibc-include/bits/termios.h" - "glibc-include/bits/thread-shared-types.h" - "glibc-include/bits/time.h" - "glibc-include/bits/time64.h" - "glibc-include/bits/timerfd.h" - "glibc-include/bits/timesize.h" - "glibc-include/bits/timex.h" - "glibc-include/bits/types.h" - "glibc-include/bits/types/FILE.h" - "glibc-include/bits/types/__FILE.h" - "glibc-include/bits/types/__fpos64_t.h" - "glibc-include/bits/types/__fpos_t.h" - "glibc-include/bits/types/__locale_t.h" - "glibc-include/bits/types/__mbstate_t.h" - "glibc-include/bits/types/__sigset_t.h" - "glibc-include/bits/types/__sigval_t.h" - "glibc-include/bits/types/clock_t.h" - "glibc-include/bits/types/clockid_t.h" - "glibc-include/bits/types/cookie_io_functions_t.h" - "glibc-include/bits/types/error_t.h" - "glibc-include/bits/types/locale_t.h" - "glibc-include/bits/types/mbstate_t.h" - "glibc-include/bits/types/res_state.h" - "glibc-include/bits/types/sig_atomic_t.h" - "glibc-include/bits/types/sigevent_t.h" - "glibc-include/bits/types/siginfo_t.h" - "glibc-include/bits/types/sigset_t.h" - "glibc-include/bits/types/sigval_t.h" - "glibc-include/bits/types/stack_t.h" - "glibc-include/bits/types/struct_FILE.h" - "glibc-include/bits/types/struct_iovec.h" - "glibc-include/bits/types/struct_itimerspec.h" - "glibc-include/bits/types/struct_osockaddr.h" - "glibc-include/bits/types/struct_rusage.h" - "glibc-include/bits/types/struct_sched_param.h" - "glibc-include/bits/types/struct_sigstack.h" - "glibc-include/bits/types/struct_timespec.h" - "glibc-include/bits/types/struct_timeval.h" - "glibc-include/bits/types/struct_tm.h" - "glibc-include/bits/types/time_t.h" - "glibc-include/bits/types/timer_t.h" - "glibc-include/bits/types/wint_t.h" - "glibc-include/bits/typesizes.h" - "glibc-include/bits/uintn-identity.h" - "glibc-include/bits/uio-ext.h" - "glibc-include/bits/uio_lim.h" - "glibc-include/bits/unistd.h" - "glibc-include/bits/utmp.h" - "glibc-include/bits/utmpx.h" - "glibc-include/bits/utsname.h" - "glibc-include/bits/waitflags.h" - "glibc-include/bits/waitstatus.h" - "glibc-include/bits/wchar-ldbl.h" - "glibc-include/bits/wchar.h" - "glibc-include/bits/wchar2.h" - "glibc-include/bits/wctype-wchar.h" - "glibc-include/bits/wordsize.h" - "glibc-include/bits/xopen_lim.h" - "glibc-include/bits/xtitypes.h" - "glibc-include/byteswap.h" - "glibc-include/complex.h" - "glibc-include/cpio.h" - "glibc-include/crypt.h" - "glibc-include/ctype.h" - "glibc-include/dirent.h" - "glibc-include/dlfcn.h" - "glibc-include/elf.h" - "glibc-include/endian.h" - "glibc-include/envz.h" - "glibc-include/err.h" - "glibc-include/errno.h" - "glibc-include/error.h" - "glibc-include/execinfo.h" - "glibc-include/fcntl.h" - "glibc-include/features.h" - "glibc-include/fenv.h" - "glibc-include/fmtmsg.h" - "glibc-include/fnmatch.h" - "glibc-include/fpu_control.h" - "glibc-include/fstab.h" - "glibc-include/fts.h" - "glibc-include/ftw.h" - "glibc-include/gconv.h" - "glibc-include/getopt.h" - "glibc-include/glob.h" - "glibc-include/gnu-versions.h" - "glibc-include/gnu/lib-names-64.h" - "glibc-include/gnu/lib-names.h" - "glibc-include/gnu/libc-version.h" - "glibc-include/gnu/stubs-64.h" - "glibc-include/gnu/stubs.h" - "glibc-include/grp.h" - "glibc-include/gshadow.h" - "glibc-include/iconv.h" - "glibc-include/ieee754.h" - "glibc-include/ifaddrs.h" - "glibc-include/inttypes.h" - "glibc-include/langinfo.h" - "glibc-include/lastlog.h" - "glibc-include/libgen.h" - "glibc-include/libintl.h" - "glibc-include/limits.h" - "glibc-include/link.h" - "glibc-include/locale.h" - "glibc-include/malloc.h" - "glibc-include/math.h" - "glibc-include/mcheck.h" - "glibc-include/memory.h" - "glibc-include/mntent.h" - "glibc-include/monetary.h" - "glibc-include/mqueue.h" - "glibc-include/net/ethernet.h" - "glibc-include/net/if.h" - "glibc-include/net/if_arp.h" - "glibc-include/net/if_packet.h" - "glibc-include/net/if_ppp.h" - "glibc-include/net/if_shaper.h" - "glibc-include/net/if_slip.h" - "glibc-include/net/ppp-comp.h" - "glibc-include/net/ppp_defs.h" - "glibc-include/net/route.h" - "glibc-include/netash/ash.h" - "glibc-include/netatalk/at.h" - "glibc-include/netax25/ax25.h" - "glibc-include/netdb.h" - "glibc-include/neteconet/ec.h" - "glibc-include/netinet/ether.h" - "glibc-include/netinet/icmp6.h" - "glibc-include/netinet/if_ether.h" - "glibc-include/netinet/if_fddi.h" - "glibc-include/netinet/if_tr.h" - "glibc-include/netinet/igmp.h" - "glibc-include/netinet/in.h" - "glibc-include/netinet/in_systm.h" - "glibc-include/netinet/ip.h" - "glibc-include/netinet/ip6.h" - "glibc-include/netinet/ip_icmp.h" - "glibc-include/netinet/tcp.h" - "glibc-include/netinet/udp.h" - "glibc-include/netipx/ipx.h" - "glibc-include/netiucv/iucv.h" - "glibc-include/netpacket/packet.h" - "glibc-include/netrom/netrom.h" - "glibc-include/netrose/rose.h" - "glibc-include/nfs/nfs.h" - "glibc-include/nl_types.h" - "glibc-include/nss.h" - "glibc-include/obstack.h" - "glibc-include/paths.h" - "glibc-include/poll.h" - "glibc-include/printf.h" - "glibc-include/proc_service.h" - "glibc-include/protocols/routed.h" - "glibc-include/protocols/rwhod.h" - "glibc-include/protocols/talkd.h" - "glibc-include/protocols/timed.h" - "glibc-include/pthread.h" - "glibc-include/pty.h" - "glibc-include/pwd.h" - "glibc-include/re_comp.h" - "glibc-include/regex.h" - "glibc-include/regexp.h" - "glibc-include/resolv.h" - "glibc-include/rpc/netdb.h" - "glibc-include/sched.h" - "glibc-include/scsi/scsi.h" - "glibc-include/scsi/scsi_ioctl.h" - "glibc-include/scsi/sg.h" - "glibc-include/search.h" - "glibc-include/semaphore.h" - "glibc-include/setjmp.h" - "glibc-include/sgtty.h" - "glibc-include/shadow.h" - "glibc-include/signal.h" - "glibc-include/spawn.h" - "glibc-include/stab.h" - "glibc-include/stdc-predef.h" - "glibc-include/stdint.h" - "glibc-include/stdio.h" - "glibc-include/stdio_ext.h" - "glibc-include/stdlib.h" - "glibc-include/string.h" - "glibc-include/strings.h" - "glibc-include/stropts.h" - "glibc-include/sys/acct.h" - "glibc-include/sys/auxv.h" - "glibc-include/sys/bitypes.h" - "glibc-include/sys/cdefs.h" - "glibc-include/sys/debugreg.h" - "glibc-include/sys/dir.h" - "glibc-include/sys/elf.h" - "glibc-include/sys/epoll.h" - "glibc-include/sys/errno.h" - "glibc-include/sys/eventfd.h" - "glibc-include/sys/fanotify.h" - "glibc-include/sys/fcntl.h" - "glibc-include/sys/file.h" - "glibc-include/sys/fsuid.h" - "glibc-include/sys/gmon.h" - "glibc-include/sys/gmon_out.h" - "glibc-include/sys/inotify.h" - "glibc-include/sys/io.h" - "glibc-include/sys/ioctl.h" - "glibc-include/sys/ipc.h" - "glibc-include/sys/kd.h" - "glibc-include/sys/klog.h" - "glibc-include/sys/mman.h" - "glibc-include/sys/mount.h" - "glibc-include/sys/msg.h" - "glibc-include/sys/mtio.h" - "glibc-include/sys/param.h" - "glibc-include/sys/pci.h" - "glibc-include/sys/perm.h" - "glibc-include/sys/personality.h" - "glibc-include/sys/poll.h" - "glibc-include/sys/prctl.h" - "glibc-include/sys/procfs.h" - "glibc-include/sys/profil.h" - "glibc-include/sys/ptrace.h" - "glibc-include/sys/queue.h" - "glibc-include/sys/quota.h" - "glibc-include/sys/random.h" - "glibc-include/sys/raw.h" - "glibc-include/sys/reboot.h" - "glibc-include/sys/reg.h" - "glibc-include/sys/resource.h" - "glibc-include/sys/select.h" - "glibc-include/sys/sem.h" - "glibc-include/sys/sendfile.h" - "glibc-include/sys/shm.h" - "glibc-include/sys/signal.h" - "glibc-include/sys/signalfd.h" - "glibc-include/sys/socket.h" - "glibc-include/sys/socketvar.h" - "glibc-include/sys/soundcard.h" - "glibc-include/sys/stat.h" - "glibc-include/sys/statfs.h" - "glibc-include/sys/statvfs.h" - "glibc-include/sys/stropts.h" - "glibc-include/sys/swap.h" - "glibc-include/sys/syscall.h" - "glibc-include/sys/sysctl.h" - "glibc-include/sys/sysinfo.h" - "glibc-include/sys/syslog.h" - "glibc-include/sys/sysmacros.h" - "glibc-include/sys/termios.h" - "glibc-include/sys/time.h" - "glibc-include/sys/timeb.h" - "glibc-include/sys/timerfd.h" - "glibc-include/sys/times.h" - "glibc-include/sys/timex.h" - "glibc-include/sys/ttychars.h" - "glibc-include/sys/ttydefaults.h" - "glibc-include/sys/types.h" - "glibc-include/sys/ucontext.h" - "glibc-include/sys/uio.h" - "glibc-include/sys/un.h" - "glibc-include/sys/unistd.h" - "glibc-include/sys/user.h" - "glibc-include/sys/utsname.h" - "glibc-include/sys/vfs.h" - "glibc-include/sys/vlimit.h" - "glibc-include/sys/vm86.h" - "glibc-include/sys/vt.h" - "glibc-include/sys/vtimes.h" - "glibc-include/sys/wait.h" - "glibc-include/sys/xattr.h" - "glibc-include/syscall.h" - "glibc-include/sysexits.h" - "glibc-include/syslog.h" - "glibc-include/tar.h" - "glibc-include/termio.h" - "glibc-include/termios.h" - "glibc-include/tgmath.h" - "glibc-include/thread_db.h" - "glibc-include/threads.h" - "glibc-include/time.h" - "glibc-include/ttyent.h" - "glibc-include/uchar.h" - "glibc-include/ucontext.h" - "glibc-include/ulimit.h" - "glibc-include/unistd.h" - "glibc-include/utime.h" - "glibc-include/utmp.h" - "glibc-include/utmpx.h" - "glibc-include/values.h" - "glibc-include/wait.h" - "glibc-include/wchar.h" - "glibc-include/wctype.h" - "glibc-include/wordexp.h" "glibc/bits/byteswap.h" "glibc/bits/endian.h" "glibc/bits/floatn-common.h" @@ -1366,11 +928,6 @@ set(ZIG_LIBC_FILES "glibc/sysdeps/arm/nptl/bits/pthreadtypes-arch.h" "glibc/sysdeps/arm/start.S" "glibc/sysdeps/arm/sysdep.h" - "glibc/sysdeps/csky/abiv2/start.S" - "glibc/sysdeps/csky/bits/endian.h" - "glibc/sysdeps/csky/dl-sysdep.h" - "glibc/sysdeps/csky/nptl/bits/pthreadtypes-arch.h" - "glibc/sysdeps/csky/sysdep.h" "glibc/sysdeps/generic/dl-dtprocnum.h" "glibc/sysdeps/generic/dl-sysdep.h" "glibc/sysdeps/generic/dwarf2.h" @@ -1503,24 +1060,18 @@ set(ZIG_LIBC_FILES "glibc/sysdeps/unix/powerpc/sysdep.h" "glibc/sysdeps/unix/sh/sysdep.h" "glibc/sysdeps/unix/sysdep.h" - "glibc/sysdeps/unix/sysv/linux/aarch64/asm/unistd.h" "glibc/sysdeps/unix/sysv/linux/aarch64/kernel-features.h" "glibc/sysdeps/unix/sysv/linux/aarch64/sys/elf.h" "glibc/sysdeps/unix/sysv/linux/aarch64/sysdep.h" - "glibc/sysdeps/unix/sysv/linux/alpha/asm/unistd.h" "glibc/sysdeps/unix/sysv/linux/alpha/bits/stat.h" "glibc/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h" "glibc/sysdeps/unix/sysv/linux/alpha/kernel-features.h" "glibc/sysdeps/unix/sysv/linux/alpha/sysdep.h" - "glibc/sysdeps/unix/sysv/linux/arm/asm/unistd.h" "glibc/sysdeps/unix/sysv/linux/arm/kernel-features.h" "glibc/sysdeps/unix/sysv/linux/arm/sys/elf.h" "glibc/sysdeps/unix/sysv/linux/arm/sysdep.h" "glibc/sysdeps/unix/sysv/linux/bits/stat.h" "glibc/sysdeps/unix/sysv/linux/bits/timex.h" - "glibc/sysdeps/unix/sysv/linux/csky/asm/unistd.h" - "glibc/sysdeps/unix/sysv/linux/csky/kernel-features.h" - "glibc/sysdeps/unix/sysv/linux/csky/sysdep.h" "glibc/sysdeps/unix/sysv/linux/dl-sysdep.h" "glibc/sysdeps/unix/sysv/linux/generic/bits/stat.h" "glibc/sysdeps/unix/sysv/linux/generic/bits/typesizes.h" @@ -1531,47 +1082,34 @@ set(ZIG_LIBC_FILES "glibc/sysdeps/unix/sysv/linux/i386/dl-sysdep.h" "glibc/sysdeps/unix/sysv/linux/i386/kernel-features.h" "glibc/sysdeps/unix/sysv/linux/i386/sysdep.h" - "glibc/sysdeps/unix/sysv/linux/ia64/asm/break.h" - "glibc/sysdeps/unix/sysv/linux/ia64/asm/unistd.h" "glibc/sysdeps/unix/sysv/linux/ia64/bits/endian.h" "glibc/sysdeps/unix/sysv/linux/ia64/bits/stat.h" "glibc/sysdeps/unix/sysv/linux/ia64/dl-sysdep.h" "glibc/sysdeps/unix/sysv/linux/ia64/kernel-features.h" "glibc/sysdeps/unix/sysv/linux/ia64/sysdep.h" - "glibc/sysdeps/unix/sysv/linux/include/asm-generic/unistd.h" - "glibc/sysdeps/unix/sysv/linux/include/asm/unistd_32.h" - "glibc/sysdeps/unix/sysv/linux/include/asm/unistd_64.h" "glibc/sysdeps/unix/sysv/linux/include/bits/syscall.h" "glibc/sysdeps/unix/sysv/linux/include/sys/timex.h" "glibc/sysdeps/unix/sysv/linux/kernel-features.h" - "glibc/sysdeps/unix/sysv/linux/m68k/asm/unistd.h" "glibc/sysdeps/unix/sysv/linux/m68k/bits/stat.h" "glibc/sysdeps/unix/sysv/linux/m68k/coldfire/sysdep.h" "glibc/sysdeps/unix/sysv/linux/m68k/kernel-features.h" "glibc/sysdeps/unix/sysv/linux/m68k/m680x0/sysdep.h" "glibc/sysdeps/unix/sysv/linux/m68k/sysdep.h" - "glibc/sysdeps/unix/sysv/linux/microblaze/asm/unistd.h" "glibc/sysdeps/unix/sysv/linux/microblaze/bits/stat.h" "glibc/sysdeps/unix/sysv/linux/microblaze/kernel-features.h" "glibc/sysdeps/unix/sysv/linux/microblaze/sysdep.h" - "glibc/sysdeps/unix/sysv/linux/mips/asm/sgidefs.h" - "glibc/sysdeps/unix/sysv/linux/mips/asm/unistd.h" "glibc/sysdeps/unix/sysv/linux/mips/bits/stat.h" "glibc/sysdeps/unix/sysv/linux/mips/kernel-features.h" "glibc/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h" "glibc/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h" "glibc/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h" - "glibc/sysdeps/unix/sysv/linux/nios2/asm/unistd.h" "glibc/sysdeps/unix/sysv/linux/nios2/sysdep.h" - "glibc/sysdeps/unix/sysv/linux/powerpc/asm/unistd.h" "glibc/sysdeps/unix/sysv/linux/powerpc/bits/stat.h" "glibc/sysdeps/unix/sysv/linux/powerpc/kernel-features.h" "glibc/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h" "glibc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h" - "glibc/sysdeps/unix/sysv/linux/riscv/asm/unistd.h" "glibc/sysdeps/unix/sysv/linux/riscv/kernel-features.h" "glibc/sysdeps/unix/sysv/linux/riscv/sysdep.h" - "glibc/sysdeps/unix/sysv/linux/s390/asm/unistd.h" "glibc/sysdeps/unix/sysv/linux/s390/bits/stat.h" "glibc/sysdeps/unix/sysv/linux/s390/bits/typesizes.h" "glibc/sysdeps/unix/sysv/linux/s390/kernel-features.h" @@ -1581,7 +1119,6 @@ set(ZIG_LIBC_FILES "glibc/sysdeps/unix/sysv/linux/sh/kernel-features.h" "glibc/sysdeps/unix/sysv/linux/sh/sh4/sysdep.h" "glibc/sysdeps/unix/sysv/linux/sh/sysdep.h" - "glibc/sysdeps/unix/sysv/linux/sparc/asm/unistd.h" "glibc/sysdeps/unix/sysv/linux/sparc/bits/stat.h" "glibc/sysdeps/unix/sysv/linux/sparc/bits/typesizes.h" "glibc/sysdeps/unix/sysv/linux/sparc/kernel-features.h" @@ -1591,7 +1128,6 @@ set(ZIG_LIBC_FILES "glibc/sysdeps/unix/sysv/linux/sys/syscall.h" "glibc/sysdeps/unix/sysv/linux/sys/timex.h" "glibc/sysdeps/unix/sysv/linux/sysdep.h" - "glibc/sysdeps/unix/sysv/linux/x86/asm/unistd.h" "glibc/sysdeps/unix/sysv/linux/x86/bits/stat.h" "glibc/sysdeps/unix/sysv/linux/x86/bits/typesizes.h" "glibc/sysdeps/unix/sysv/linux/x86/sys/elf.h" @@ -1599,6 +1135,7 @@ set(ZIG_LIBC_FILES "glibc/sysdeps/unix/sysv/linux/x86_64/sysdep.h" "glibc/sysdeps/unix/sysv/linux/x86_64/x32/sysdep.h" "glibc/sysdeps/unix/x86_64/sysdep.h" + "glibc/sysdeps/wordsize-32/divdi3-symbol-hacks.h" "glibc/sysdeps/x86/bits/endian.h" "glibc/sysdeps/x86/bits/select.h" "glibc/sysdeps/x86/bits/wordsize.h" @@ -1618,6 +1155,1257 @@ set(ZIG_LIBC_FILES "glibc/time/bits/types/struct_tm.h" "glibc/time/bits/types/time_t.h" "glibc/time/bits/types/timer_t.h" + "include/aarch64-linux-gnu/asm/bitsperlong.h" + "include/aarch64-linux-gnu/asm/unistd.h" + "include/aarch64-linux-gnu/bits/endian.h" + "include/aarch64-linux-gnu/bits/fcntl.h" + "include/aarch64-linux-gnu/bits/fenv.h" + "include/aarch64-linux-gnu/bits/floatn.h" + "include/aarch64-linux-gnu/bits/fp-fast.h" + "include/aarch64-linux-gnu/bits/hwcap.h" + "include/aarch64-linux-gnu/bits/ipc.h" + "include/aarch64-linux-gnu/bits/link.h" + "include/aarch64-linux-gnu/bits/local_lim.h" + "include/aarch64-linux-gnu/bits/long-double.h" + "include/aarch64-linux-gnu/bits/procfs.h" + "include/aarch64-linux-gnu/bits/pthreadtypes-arch.h" + "include/aarch64-linux-gnu/bits/semaphore.h" + "include/aarch64-linux-gnu/bits/setjmp.h" + "include/aarch64-linux-gnu/bits/sigstack.h" + "include/aarch64-linux-gnu/bits/stat.h" + "include/aarch64-linux-gnu/bits/statfs.h" + "include/aarch64-linux-gnu/bits/typesizes.h" + "include/aarch64-linux-gnu/bits/wordsize.h" + "include/aarch64-linux-gnu/fpu_control.h" + "include/aarch64-linux-gnu/gnu/lib-names-lp64.h" + "include/aarch64-linux-gnu/gnu/lib-names.h" + "include/aarch64-linux-gnu/gnu/stubs-lp64.h" + "include/aarch64-linux-gnu/gnu/stubs.h" + "include/aarch64-linux-gnu/ieee754.h" + "include/aarch64-linux-gnu/sys/elf.h" + "include/aarch64-linux-gnu/sys/ptrace.h" + "include/aarch64-linux-gnu/sys/ucontext.h" + "include/aarch64-linux-gnu/sys/user.h" + "include/aarch64_be-linux-gnu/asm/bitsperlong.h" + "include/aarch64_be-linux-gnu/asm/unistd.h" + "include/aarch64_be-linux-gnu/bits/endian.h" + "include/aarch64_be-linux-gnu/bits/fcntl.h" + "include/aarch64_be-linux-gnu/bits/fenv.h" + "include/aarch64_be-linux-gnu/bits/floatn.h" + "include/aarch64_be-linux-gnu/bits/fp-fast.h" + "include/aarch64_be-linux-gnu/bits/hwcap.h" + "include/aarch64_be-linux-gnu/bits/ipc.h" + "include/aarch64_be-linux-gnu/bits/link.h" + "include/aarch64_be-linux-gnu/bits/local_lim.h" + "include/aarch64_be-linux-gnu/bits/long-double.h" + "include/aarch64_be-linux-gnu/bits/procfs.h" + "include/aarch64_be-linux-gnu/bits/pthreadtypes-arch.h" + "include/aarch64_be-linux-gnu/bits/semaphore.h" + "include/aarch64_be-linux-gnu/bits/setjmp.h" + "include/aarch64_be-linux-gnu/bits/sigstack.h" + "include/aarch64_be-linux-gnu/bits/stat.h" + "include/aarch64_be-linux-gnu/bits/statfs.h" + "include/aarch64_be-linux-gnu/bits/typesizes.h" + "include/aarch64_be-linux-gnu/bits/wordsize.h" + "include/aarch64_be-linux-gnu/fpu_control.h" + "include/aarch64_be-linux-gnu/gnu/lib-names-lp64_be.h" + "include/aarch64_be-linux-gnu/gnu/lib-names.h" + "include/aarch64_be-linux-gnu/gnu/stubs-lp64_be.h" + "include/aarch64_be-linux-gnu/gnu/stubs.h" + "include/aarch64_be-linux-gnu/ieee754.h" + "include/aarch64_be-linux-gnu/sys/elf.h" + "include/aarch64_be-linux-gnu/sys/ptrace.h" + "include/aarch64_be-linux-gnu/sys/ucontext.h" + "include/aarch64_be-linux-gnu/sys/user.h" + "include/arm-linux-gnueabi/asm/unistd.h" + "include/arm-linux-gnueabi/bits/endian.h" + "include/arm-linux-gnueabi/bits/fcntl.h" + "include/arm-linux-gnueabi/bits/fenv.h" + "include/arm-linux-gnueabi/bits/floatn.h" + "include/arm-linux-gnueabi/bits/hwcap.h" + "include/arm-linux-gnueabi/bits/link.h" + "include/arm-linux-gnueabi/bits/long-double.h" + "include/arm-linux-gnueabi/bits/procfs-id.h" + "include/arm-linux-gnueabi/bits/procfs.h" + "include/arm-linux-gnueabi/bits/pthreadtypes-arch.h" + "include/arm-linux-gnueabi/bits/semaphore.h" + "include/arm-linux-gnueabi/bits/setjmp.h" + "include/arm-linux-gnueabi/bits/shmlba.h" + "include/arm-linux-gnueabi/bits/stat.h" + "include/arm-linux-gnueabi/bits/wordsize.h" + "include/arm-linux-gnueabi/fpu_control.h" + "include/arm-linux-gnueabi/gnu/lib-names.h" + "include/arm-linux-gnueabi/gnu/stubs.h" + "include/arm-linux-gnueabi/sys/ptrace.h" + "include/arm-linux-gnueabi/sys/ucontext.h" + "include/arm-linux-gnueabi/sys/user.h" + "include/arm-linux-gnueabihf/asm/unistd.h" + "include/arm-linux-gnueabihf/bits/endian.h" + "include/arm-linux-gnueabihf/bits/fcntl.h" + "include/arm-linux-gnueabihf/bits/fenv.h" + "include/arm-linux-gnueabihf/bits/floatn.h" + "include/arm-linux-gnueabihf/bits/hwcap.h" + "include/arm-linux-gnueabihf/bits/link.h" + "include/arm-linux-gnueabihf/bits/long-double.h" + "include/arm-linux-gnueabihf/bits/procfs-id.h" + "include/arm-linux-gnueabihf/bits/procfs.h" + "include/arm-linux-gnueabihf/bits/pthreadtypes-arch.h" + "include/arm-linux-gnueabihf/bits/semaphore.h" + "include/arm-linux-gnueabihf/bits/setjmp.h" + "include/arm-linux-gnueabihf/bits/shmlba.h" + "include/arm-linux-gnueabihf/bits/stat.h" + "include/arm-linux-gnueabihf/bits/wordsize.h" + "include/arm-linux-gnueabihf/fpu_control.h" + "include/arm-linux-gnueabihf/gnu/lib-names.h" + "include/arm-linux-gnueabihf/gnu/stubs.h" + "include/arm-linux-gnueabihf/sys/ptrace.h" + "include/arm-linux-gnueabihf/sys/ucontext.h" + "include/arm-linux-gnueabihf/sys/user.h" + "include/armeb-linux-gnueabi/asm/unistd.h" + "include/armeb-linux-gnueabi/bits/endian.h" + "include/armeb-linux-gnueabi/bits/fcntl.h" + "include/armeb-linux-gnueabi/bits/fenv.h" + "include/armeb-linux-gnueabi/bits/floatn.h" + "include/armeb-linux-gnueabi/bits/hwcap.h" + "include/armeb-linux-gnueabi/bits/link.h" + "include/armeb-linux-gnueabi/bits/long-double.h" + "include/armeb-linux-gnueabi/bits/procfs-id.h" + "include/armeb-linux-gnueabi/bits/procfs.h" + "include/armeb-linux-gnueabi/bits/pthreadtypes-arch.h" + "include/armeb-linux-gnueabi/bits/semaphore.h" + "include/armeb-linux-gnueabi/bits/setjmp.h" + "include/armeb-linux-gnueabi/bits/shmlba.h" + "include/armeb-linux-gnueabi/bits/stat.h" + "include/armeb-linux-gnueabi/bits/wordsize.h" + "include/armeb-linux-gnueabi/fpu_control.h" + "include/armeb-linux-gnueabi/gnu/lib-names.h" + "include/armeb-linux-gnueabi/gnu/stubs.h" + "include/armeb-linux-gnueabi/sys/ptrace.h" + "include/armeb-linux-gnueabi/sys/ucontext.h" + "include/armeb-linux-gnueabi/sys/user.h" + "include/armeb-linux-gnueabihf/asm/unistd.h" + "include/armeb-linux-gnueabihf/bits/endian.h" + "include/armeb-linux-gnueabihf/bits/fcntl.h" + "include/armeb-linux-gnueabihf/bits/fenv.h" + "include/armeb-linux-gnueabihf/bits/floatn.h" + "include/armeb-linux-gnueabihf/bits/hwcap.h" + "include/armeb-linux-gnueabihf/bits/link.h" + "include/armeb-linux-gnueabihf/bits/long-double.h" + "include/armeb-linux-gnueabihf/bits/procfs-id.h" + "include/armeb-linux-gnueabihf/bits/procfs.h" + "include/armeb-linux-gnueabihf/bits/pthreadtypes-arch.h" + "include/armeb-linux-gnueabihf/bits/semaphore.h" + "include/armeb-linux-gnueabihf/bits/setjmp.h" + "include/armeb-linux-gnueabihf/bits/shmlba.h" + "include/armeb-linux-gnueabihf/bits/stat.h" + "include/armeb-linux-gnueabihf/bits/wordsize.h" + "include/armeb-linux-gnueabihf/fpu_control.h" + "include/armeb-linux-gnueabihf/gnu/lib-names.h" + "include/armeb-linux-gnueabihf/gnu/stubs.h" + "include/armeb-linux-gnueabihf/sys/ptrace.h" + "include/armeb-linux-gnueabihf/sys/ucontext.h" + "include/armeb-linux-gnueabihf/sys/user.h" + "include/generic-glibc/a.out.h" + "include/generic-glibc/aio.h" + "include/generic-glibc/aliases.h" + "include/generic-glibc/alloca.h" + "include/generic-glibc/ar.h" + "include/generic-glibc/argp.h" + "include/generic-glibc/argz.h" + "include/generic-glibc/arpa/ftp.h" + "include/generic-glibc/arpa/inet.h" + "include/generic-glibc/arpa/nameser.h" + "include/generic-glibc/arpa/nameser_compat.h" + "include/generic-glibc/arpa/telnet.h" + "include/generic-glibc/arpa/tftp.h" + "include/generic-glibc/asm-generic/bitsperlong.h" + "include/generic-glibc/asm-generic/unistd.h" + "include/generic-glibc/asm/unistd_32.h" + "include/generic-glibc/asm/unistd_64.h" + "include/generic-glibc/assert.h" + "include/generic-glibc/bits/a.out.h" + "include/generic-glibc/bits/argp-ldbl.h" + "include/generic-glibc/bits/byteswap.h" + "include/generic-glibc/bits/cmathcalls.h" + "include/generic-glibc/bits/confname.h" + "include/generic-glibc/bits/cpu-set.h" + "include/generic-glibc/bits/dirent.h" + "include/generic-glibc/bits/dlfcn.h" + "include/generic-glibc/bits/elfclass.h" + "include/generic-glibc/bits/endian.h" + "include/generic-glibc/bits/environments.h" + "include/generic-glibc/bits/epoll.h" + "include/generic-glibc/bits/err-ldbl.h" + "include/generic-glibc/bits/errno.h" + "include/generic-glibc/bits/error-ldbl.h" + "include/generic-glibc/bits/error.h" + "include/generic-glibc/bits/eventfd.h" + "include/generic-glibc/bits/fcntl-linux.h" + "include/generic-glibc/bits/fcntl.h" + "include/generic-glibc/bits/fcntl2.h" + "include/generic-glibc/bits/fenv.h" + "include/generic-glibc/bits/fenvinline.h" + "include/generic-glibc/bits/floatn-common.h" + "include/generic-glibc/bits/floatn.h" + "include/generic-glibc/bits/flt-eval-method.h" + "include/generic-glibc/bits/fp-fast.h" + "include/generic-glibc/bits/fp-logb.h" + "include/generic-glibc/bits/getopt_core.h" + "include/generic-glibc/bits/getopt_ext.h" + "include/generic-glibc/bits/getopt_posix.h" + "include/generic-glibc/bits/hwcap.h" + "include/generic-glibc/bits/in.h" + "include/generic-glibc/bits/indirect-return.h" + "include/generic-glibc/bits/initspin.h" + "include/generic-glibc/bits/inotify.h" + "include/generic-glibc/bits/ioctl-types.h" + "include/generic-glibc/bits/ioctls.h" + "include/generic-glibc/bits/ipc.h" + "include/generic-glibc/bits/ipctypes.h" + "include/generic-glibc/bits/iscanonical.h" + "include/generic-glibc/bits/libc-header-start.h" + "include/generic-glibc/bits/libm-simd-decl-stubs.h" + "include/generic-glibc/bits/link.h" + "include/generic-glibc/bits/local_lim.h" + "include/generic-glibc/bits/locale.h" + "include/generic-glibc/bits/long-double.h" + "include/generic-glibc/bits/math-finite.h" + "include/generic-glibc/bits/math-vector-fortran.h" + "include/generic-glibc/bits/math-vector.h" + "include/generic-glibc/bits/mathcalls-helper-functions.h" + "include/generic-glibc/bits/mathcalls-narrow.h" + "include/generic-glibc/bits/mathcalls.h" + "include/generic-glibc/bits/mathdef.h" + "include/generic-glibc/bits/mathinline.h" + "include/generic-glibc/bits/mman-linux.h" + "include/generic-glibc/bits/mman-map-flags-generic.h" + "include/generic-glibc/bits/mman-shared.h" + "include/generic-glibc/bits/mman.h" + "include/generic-glibc/bits/monetary-ldbl.h" + "include/generic-glibc/bits/mqueue.h" + "include/generic-glibc/bits/mqueue2.h" + "include/generic-glibc/bits/msq-pad.h" + "include/generic-glibc/bits/msq.h" + "include/generic-glibc/bits/netdb.h" + "include/generic-glibc/bits/param.h" + "include/generic-glibc/bits/poll.h" + "include/generic-glibc/bits/poll2.h" + "include/generic-glibc/bits/posix1_lim.h" + "include/generic-glibc/bits/posix2_lim.h" + "include/generic-glibc/bits/posix_opt.h" + "include/generic-glibc/bits/ppc.h" + "include/generic-glibc/bits/printf-ldbl.h" + "include/generic-glibc/bits/procfs-extra.h" + "include/generic-glibc/bits/procfs-id.h" + "include/generic-glibc/bits/procfs-prregset.h" + "include/generic-glibc/bits/procfs.h" + "include/generic-glibc/bits/pthreadtypes-arch.h" + "include/generic-glibc/bits/pthreadtypes.h" + "include/generic-glibc/bits/ptrace-shared.h" + "include/generic-glibc/bits/resource.h" + "include/generic-glibc/bits/sched.h" + "include/generic-glibc/bits/select.h" + "include/generic-glibc/bits/select2.h" + "include/generic-glibc/bits/sem-pad.h" + "include/generic-glibc/bits/sem.h" + "include/generic-glibc/bits/semaphore.h" + "include/generic-glibc/bits/setjmp.h" + "include/generic-glibc/bits/setjmp2.h" + "include/generic-glibc/bits/shm-pad.h" + "include/generic-glibc/bits/shm.h" + "include/generic-glibc/bits/shmlba.h" + "include/generic-glibc/bits/sigaction.h" + "include/generic-glibc/bits/sigcontext.h" + "include/generic-glibc/bits/sigevent-consts.h" + "include/generic-glibc/bits/siginfo-arch.h" + "include/generic-glibc/bits/siginfo-consts-arch.h" + "include/generic-glibc/bits/siginfo-consts.h" + "include/generic-glibc/bits/signalfd.h" + "include/generic-glibc/bits/signum-generic.h" + "include/generic-glibc/bits/signum.h" + "include/generic-glibc/bits/sigstack.h" + "include/generic-glibc/bits/sigthread.h" + "include/generic-glibc/bits/sockaddr.h" + "include/generic-glibc/bits/socket.h" + "include/generic-glibc/bits/socket2.h" + "include/generic-glibc/bits/socket_type.h" + "include/generic-glibc/bits/ss_flags.h" + "include/generic-glibc/bits/stab.def" + "include/generic-glibc/bits/stat.h" + "include/generic-glibc/bits/statfs.h" + "include/generic-glibc/bits/statvfs.h" + "include/generic-glibc/bits/statx.h" + "include/generic-glibc/bits/stdint-intn.h" + "include/generic-glibc/bits/stdint-uintn.h" + "include/generic-glibc/bits/stdio-ldbl.h" + "include/generic-glibc/bits/stdio.h" + "include/generic-glibc/bits/stdio2.h" + "include/generic-glibc/bits/stdio_lim.h" + "include/generic-glibc/bits/stdlib-bsearch.h" + "include/generic-glibc/bits/stdlib-float.h" + "include/generic-glibc/bits/stdlib-ldbl.h" + "include/generic-glibc/bits/stdlib.h" + "include/generic-glibc/bits/string_fortified.h" + "include/generic-glibc/bits/strings_fortified.h" + "include/generic-glibc/bits/stropts.h" + "include/generic-glibc/bits/sys_errlist.h" + "include/generic-glibc/bits/syscall.h" + "include/generic-glibc/bits/sysctl.h" + "include/generic-glibc/bits/syslog-ldbl.h" + "include/generic-glibc/bits/syslog-path.h" + "include/generic-glibc/bits/syslog.h" + "include/generic-glibc/bits/sysmacros.h" + "include/generic-glibc/bits/termios-baud.h" + "include/generic-glibc/bits/termios-c_cc.h" + "include/generic-glibc/bits/termios-c_cflag.h" + "include/generic-glibc/bits/termios-c_iflag.h" + "include/generic-glibc/bits/termios-c_lflag.h" + "include/generic-glibc/bits/termios-c_oflag.h" + "include/generic-glibc/bits/termios-misc.h" + "include/generic-glibc/bits/termios-struct.h" + "include/generic-glibc/bits/termios-tcflow.h" + "include/generic-glibc/bits/termios.h" + "include/generic-glibc/bits/thread-shared-types.h" + "include/generic-glibc/bits/time.h" + "include/generic-glibc/bits/time64.h" + "include/generic-glibc/bits/timerfd.h" + "include/generic-glibc/bits/timesize.h" + "include/generic-glibc/bits/timex.h" + "include/generic-glibc/bits/types.h" + "include/generic-glibc/bits/types/FILE.h" + "include/generic-glibc/bits/types/__FILE.h" + "include/generic-glibc/bits/types/__fpos64_t.h" + "include/generic-glibc/bits/types/__fpos_t.h" + "include/generic-glibc/bits/types/__locale_t.h" + "include/generic-glibc/bits/types/__mbstate_t.h" + "include/generic-glibc/bits/types/__sigset_t.h" + "include/generic-glibc/bits/types/__sigval_t.h" + "include/generic-glibc/bits/types/clock_t.h" + "include/generic-glibc/bits/types/clockid_t.h" + "include/generic-glibc/bits/types/cookie_io_functions_t.h" + "include/generic-glibc/bits/types/error_t.h" + "include/generic-glibc/bits/types/locale_t.h" + "include/generic-glibc/bits/types/mbstate_t.h" + "include/generic-glibc/bits/types/res_state.h" + "include/generic-glibc/bits/types/sig_atomic_t.h" + "include/generic-glibc/bits/types/sigevent_t.h" + "include/generic-glibc/bits/types/siginfo_t.h" + "include/generic-glibc/bits/types/sigset_t.h" + "include/generic-glibc/bits/types/sigval_t.h" + "include/generic-glibc/bits/types/stack_t.h" + "include/generic-glibc/bits/types/struct_FILE.h" + "include/generic-glibc/bits/types/struct_iovec.h" + "include/generic-glibc/bits/types/struct_itimerspec.h" + "include/generic-glibc/bits/types/struct_osockaddr.h" + "include/generic-glibc/bits/types/struct_rusage.h" + "include/generic-glibc/bits/types/struct_sched_param.h" + "include/generic-glibc/bits/types/struct_sigstack.h" + "include/generic-glibc/bits/types/struct_timespec.h" + "include/generic-glibc/bits/types/struct_timeval.h" + "include/generic-glibc/bits/types/struct_tm.h" + "include/generic-glibc/bits/types/time_t.h" + "include/generic-glibc/bits/types/timer_t.h" + "include/generic-glibc/bits/types/wint_t.h" + "include/generic-glibc/bits/typesizes.h" + "include/generic-glibc/bits/uintn-identity.h" + "include/generic-glibc/bits/uio-ext.h" + "include/generic-glibc/bits/uio_lim.h" + "include/generic-glibc/bits/unistd.h" + "include/generic-glibc/bits/unistd_ext.h" + "include/generic-glibc/bits/utmp.h" + "include/generic-glibc/bits/utmpx.h" + "include/generic-glibc/bits/utsname.h" + "include/generic-glibc/bits/waitflags.h" + "include/generic-glibc/bits/waitstatus.h" + "include/generic-glibc/bits/wchar-ldbl.h" + "include/generic-glibc/bits/wchar.h" + "include/generic-glibc/bits/wchar2.h" + "include/generic-glibc/bits/wctype-wchar.h" + "include/generic-glibc/bits/wordsize.h" + "include/generic-glibc/bits/xopen_lim.h" + "include/generic-glibc/bits/xtitypes.h" + "include/generic-glibc/byteswap.h" + "include/generic-glibc/complex.h" + "include/generic-glibc/cpio.h" + "include/generic-glibc/crypt.h" + "include/generic-glibc/ctype.h" + "include/generic-glibc/dirent.h" + "include/generic-glibc/dlfcn.h" + "include/generic-glibc/elf.h" + "include/generic-glibc/endian.h" + "include/generic-glibc/envz.h" + "include/generic-glibc/err.h" + "include/generic-glibc/errno.h" + "include/generic-glibc/error.h" + "include/generic-glibc/execinfo.h" + "include/generic-glibc/fcntl.h" + "include/generic-glibc/features.h" + "include/generic-glibc/fenv.h" + "include/generic-glibc/fmtmsg.h" + "include/generic-glibc/fnmatch.h" + "include/generic-glibc/fpregdef.h" + "include/generic-glibc/fpu_control.h" + "include/generic-glibc/fstab.h" + "include/generic-glibc/fts.h" + "include/generic-glibc/ftw.h" + "include/generic-glibc/gconv.h" + "include/generic-glibc/getopt.h" + "include/generic-glibc/glob.h" + "include/generic-glibc/gnu-versions.h" + "include/generic-glibc/gnu/lib-names-32.h" + "include/generic-glibc/gnu/lib-names-hard.h" + "include/generic-glibc/gnu/lib-names-n32_hard.h" + "include/generic-glibc/gnu/lib-names-n64_hard.h" + "include/generic-glibc/gnu/lib-names-o32_hard.h" + "include/generic-glibc/gnu/lib-names-soft.h" + "include/generic-glibc/gnu/lib-names.h" + "include/generic-glibc/gnu/libc-version.h" + "include/generic-glibc/gnu/stubs-32.h" + "include/generic-glibc/gnu/stubs-hard.h" + "include/generic-glibc/gnu/stubs-n32_hard.h" + "include/generic-glibc/gnu/stubs-n64_hard.h" + "include/generic-glibc/gnu/stubs-o32_hard.h" + "include/generic-glibc/gnu/stubs-soft.h" + "include/generic-glibc/gnu/stubs.h" + "include/generic-glibc/grp.h" + "include/generic-glibc/gshadow.h" + "include/generic-glibc/iconv.h" + "include/generic-glibc/ieee754.h" + "include/generic-glibc/ifaddrs.h" + "include/generic-glibc/inttypes.h" + "include/generic-glibc/langinfo.h" + "include/generic-glibc/lastlog.h" + "include/generic-glibc/libgen.h" + "include/generic-glibc/libintl.h" + "include/generic-glibc/limits.h" + "include/generic-glibc/link.h" + "include/generic-glibc/locale.h" + "include/generic-glibc/malloc.h" + "include/generic-glibc/math.h" + "include/generic-glibc/mcheck.h" + "include/generic-glibc/memory.h" + "include/generic-glibc/mntent.h" + "include/generic-glibc/monetary.h" + "include/generic-glibc/mqueue.h" + "include/generic-glibc/net/ethernet.h" + "include/generic-glibc/net/if.h" + "include/generic-glibc/net/if_arp.h" + "include/generic-glibc/net/if_packet.h" + "include/generic-glibc/net/if_ppp.h" + "include/generic-glibc/net/if_shaper.h" + "include/generic-glibc/net/if_slip.h" + "include/generic-glibc/net/ppp-comp.h" + "include/generic-glibc/net/ppp_defs.h" + "include/generic-glibc/net/route.h" + "include/generic-glibc/netash/ash.h" + "include/generic-glibc/netatalk/at.h" + "include/generic-glibc/netax25/ax25.h" + "include/generic-glibc/netdb.h" + "include/generic-glibc/neteconet/ec.h" + "include/generic-glibc/netinet/ether.h" + "include/generic-glibc/netinet/icmp6.h" + "include/generic-glibc/netinet/if_ether.h" + "include/generic-glibc/netinet/if_fddi.h" + "include/generic-glibc/netinet/if_tr.h" + "include/generic-glibc/netinet/igmp.h" + "include/generic-glibc/netinet/in.h" + "include/generic-glibc/netinet/in_systm.h" + "include/generic-glibc/netinet/ip.h" + "include/generic-glibc/netinet/ip6.h" + "include/generic-glibc/netinet/ip_icmp.h" + "include/generic-glibc/netinet/tcp.h" + "include/generic-glibc/netinet/udp.h" + "include/generic-glibc/netipx/ipx.h" + "include/generic-glibc/netiucv/iucv.h" + "include/generic-glibc/netpacket/packet.h" + "include/generic-glibc/netrom/netrom.h" + "include/generic-glibc/netrose/rose.h" + "include/generic-glibc/nfs/nfs.h" + "include/generic-glibc/nl_types.h" + "include/generic-glibc/nss.h" + "include/generic-glibc/obstack.h" + "include/generic-glibc/paths.h" + "include/generic-glibc/poll.h" + "include/generic-glibc/printf.h" + "include/generic-glibc/proc_service.h" + "include/generic-glibc/protocols/routed.h" + "include/generic-glibc/protocols/rwhod.h" + "include/generic-glibc/protocols/talkd.h" + "include/generic-glibc/protocols/timed.h" + "include/generic-glibc/pthread.h" + "include/generic-glibc/pty.h" + "include/generic-glibc/pwd.h" + "include/generic-glibc/re_comp.h" + "include/generic-glibc/regdef.h" + "include/generic-glibc/regex.h" + "include/generic-glibc/regexp.h" + "include/generic-glibc/resolv.h" + "include/generic-glibc/rpc/netdb.h" + "include/generic-glibc/sched.h" + "include/generic-glibc/scsi/scsi.h" + "include/generic-glibc/scsi/scsi_ioctl.h" + "include/generic-glibc/scsi/sg.h" + "include/generic-glibc/search.h" + "include/generic-glibc/semaphore.h" + "include/generic-glibc/setjmp.h" + "include/generic-glibc/sgidefs.h" + "include/generic-glibc/sgtty.h" + "include/generic-glibc/shadow.h" + "include/generic-glibc/signal.h" + "include/generic-glibc/spawn.h" + "include/generic-glibc/stab.h" + "include/generic-glibc/stdc-predef.h" + "include/generic-glibc/stdint.h" + "include/generic-glibc/stdio.h" + "include/generic-glibc/stdio_ext.h" + "include/generic-glibc/stdlib.h" + "include/generic-glibc/string.h" + "include/generic-glibc/strings.h" + "include/generic-glibc/stropts.h" + "include/generic-glibc/sys/acct.h" + "include/generic-glibc/sys/asm.h" + "include/generic-glibc/sys/auxv.h" + "include/generic-glibc/sys/bitypes.h" + "include/generic-glibc/sys/cachectl.h" + "include/generic-glibc/sys/cdefs.h" + "include/generic-glibc/sys/debugreg.h" + "include/generic-glibc/sys/dir.h" + "include/generic-glibc/sys/elf.h" + "include/generic-glibc/sys/epoll.h" + "include/generic-glibc/sys/errno.h" + "include/generic-glibc/sys/eventfd.h" + "include/generic-glibc/sys/fanotify.h" + "include/generic-glibc/sys/fcntl.h" + "include/generic-glibc/sys/file.h" + "include/generic-glibc/sys/fpregdef.h" + "include/generic-glibc/sys/fsuid.h" + "include/generic-glibc/sys/gmon.h" + "include/generic-glibc/sys/gmon_out.h" + "include/generic-glibc/sys/inotify.h" + "include/generic-glibc/sys/io.h" + "include/generic-glibc/sys/ioctl.h" + "include/generic-glibc/sys/ipc.h" + "include/generic-glibc/sys/kd.h" + "include/generic-glibc/sys/klog.h" + "include/generic-glibc/sys/mman.h" + "include/generic-glibc/sys/mount.h" + "include/generic-glibc/sys/msg.h" + "include/generic-glibc/sys/mtio.h" + "include/generic-glibc/sys/param.h" + "include/generic-glibc/sys/pci.h" + "include/generic-glibc/sys/perm.h" + "include/generic-glibc/sys/personality.h" + "include/generic-glibc/sys/platform/ppc.h" + "include/generic-glibc/sys/poll.h" + "include/generic-glibc/sys/prctl.h" + "include/generic-glibc/sys/procfs.h" + "include/generic-glibc/sys/profil.h" + "include/generic-glibc/sys/ptrace.h" + "include/generic-glibc/sys/queue.h" + "include/generic-glibc/sys/quota.h" + "include/generic-glibc/sys/random.h" + "include/generic-glibc/sys/raw.h" + "include/generic-glibc/sys/reboot.h" + "include/generic-glibc/sys/reg.h" + "include/generic-glibc/sys/regdef.h" + "include/generic-glibc/sys/resource.h" + "include/generic-glibc/sys/select.h" + "include/generic-glibc/sys/sem.h" + "include/generic-glibc/sys/sendfile.h" + "include/generic-glibc/sys/shm.h" + "include/generic-glibc/sys/signal.h" + "include/generic-glibc/sys/signalfd.h" + "include/generic-glibc/sys/socket.h" + "include/generic-glibc/sys/socketvar.h" + "include/generic-glibc/sys/soundcard.h" + "include/generic-glibc/sys/stat.h" + "include/generic-glibc/sys/statfs.h" + "include/generic-glibc/sys/statvfs.h" + "include/generic-glibc/sys/stropts.h" + "include/generic-glibc/sys/swap.h" + "include/generic-glibc/sys/syscall.h" + "include/generic-glibc/sys/sysctl.h" + "include/generic-glibc/sys/sysinfo.h" + "include/generic-glibc/sys/syslog.h" + "include/generic-glibc/sys/sysmacros.h" + "include/generic-glibc/sys/sysmips.h" + "include/generic-glibc/sys/tas.h" + "include/generic-glibc/sys/termios.h" + "include/generic-glibc/sys/time.h" + "include/generic-glibc/sys/timeb.h" + "include/generic-glibc/sys/timerfd.h" + "include/generic-glibc/sys/times.h" + "include/generic-glibc/sys/timex.h" + "include/generic-glibc/sys/ttychars.h" + "include/generic-glibc/sys/ttydefaults.h" + "include/generic-glibc/sys/types.h" + "include/generic-glibc/sys/ucontext.h" + "include/generic-glibc/sys/uio.h" + "include/generic-glibc/sys/un.h" + "include/generic-glibc/sys/unistd.h" + "include/generic-glibc/sys/user.h" + "include/generic-glibc/sys/utsname.h" + "include/generic-glibc/sys/vfs.h" + "include/generic-glibc/sys/vlimit.h" + "include/generic-glibc/sys/vm86.h" + "include/generic-glibc/sys/vt.h" + "include/generic-glibc/sys/vtimes.h" + "include/generic-glibc/sys/wait.h" + "include/generic-glibc/sys/xattr.h" + "include/generic-glibc/syscall.h" + "include/generic-glibc/sysexits.h" + "include/generic-glibc/syslog.h" + "include/generic-glibc/tar.h" + "include/generic-glibc/termio.h" + "include/generic-glibc/termios.h" + "include/generic-glibc/tgmath.h" + "include/generic-glibc/thread_db.h" + "include/generic-glibc/threads.h" + "include/generic-glibc/time.h" + "include/generic-glibc/ttyent.h" + "include/generic-glibc/uchar.h" + "include/generic-glibc/ucontext.h" + "include/generic-glibc/ulimit.h" + "include/generic-glibc/unistd.h" + "include/generic-glibc/utime.h" + "include/generic-glibc/utmp.h" + "include/generic-glibc/utmpx.h" + "include/generic-glibc/values.h" + "include/generic-glibc/wait.h" + "include/generic-glibc/wchar.h" + "include/generic-glibc/wctype.h" + "include/generic-glibc/wordexp.h" + "include/i386-linux-gnu/asm/unistd.h" + "include/i386-linux-gnu/bits/a.out.h" + "include/i386-linux-gnu/bits/endian.h" + "include/i386-linux-gnu/bits/environments.h" + "include/i386-linux-gnu/bits/epoll.h" + "include/i386-linux-gnu/bits/fcntl.h" + "include/i386-linux-gnu/bits/fenv.h" + "include/i386-linux-gnu/bits/floatn.h" + "include/i386-linux-gnu/bits/flt-eval-method.h" + "include/i386-linux-gnu/bits/fp-logb.h" + "include/i386-linux-gnu/bits/indirect-return.h" + "include/i386-linux-gnu/bits/ipctypes.h" + "include/i386-linux-gnu/bits/iscanonical.h" + "include/i386-linux-gnu/bits/link.h" + "include/i386-linux-gnu/bits/long-double.h" + "include/i386-linux-gnu/bits/math-vector-fortran.h" + "include/i386-linux-gnu/bits/math-vector.h" + "include/i386-linux-gnu/bits/mman.h" + "include/i386-linux-gnu/bits/procfs-id.h" + "include/i386-linux-gnu/bits/procfs.h" + "include/i386-linux-gnu/bits/pthreadtypes-arch.h" + "include/i386-linux-gnu/bits/select.h" + "include/i386-linux-gnu/bits/sem-pad.h" + "include/i386-linux-gnu/bits/semaphore.h" + "include/i386-linux-gnu/bits/setjmp.h" + "include/i386-linux-gnu/bits/sigcontext.h" + "include/i386-linux-gnu/bits/siginfo-arch.h" + "include/i386-linux-gnu/bits/stat.h" + "include/i386-linux-gnu/bits/sysctl.h" + "include/i386-linux-gnu/bits/timesize.h" + "include/i386-linux-gnu/bits/typesizes.h" + "include/i386-linux-gnu/bits/wordsize.h" + "include/i386-linux-gnu/bits/xtitypes.h" + "include/i386-linux-gnu/fpu_control.h" + "include/i386-linux-gnu/gnu/lib-names.h" + "include/i386-linux-gnu/gnu/stubs.h" + "include/i386-linux-gnu/sys/elf.h" + "include/i386-linux-gnu/sys/io.h" + "include/i386-linux-gnu/sys/ptrace.h" + "include/i386-linux-gnu/sys/ucontext.h" + "include/i386-linux-gnu/sys/user.h" + "include/mips-linux-gnu/asm/sgidefs.h" + "include/mips-linux-gnu/asm/unistd.h" + "include/mips-linux-gnu/bits/dlfcn.h" + "include/mips-linux-gnu/bits/errno.h" + "include/mips-linux-gnu/bits/eventfd.h" + "include/mips-linux-gnu/bits/inotify.h" + "include/mips-linux-gnu/bits/ioctl-types.h" + "include/mips-linux-gnu/bits/ipc.h" + "include/mips-linux-gnu/bits/ipctypes.h" + "include/mips-linux-gnu/bits/local_lim.h" + "include/mips-linux-gnu/bits/mman.h" + "include/mips-linux-gnu/bits/msq-pad.h" + "include/mips-linux-gnu/bits/poll.h" + "include/mips-linux-gnu/bits/resource.h" + "include/mips-linux-gnu/bits/sem-pad.h" + "include/mips-linux-gnu/bits/shm-pad.h" + "include/mips-linux-gnu/bits/shmlba.h" + "include/mips-linux-gnu/bits/sigaction.h" + "include/mips-linux-gnu/bits/sigcontext.h" + "include/mips-linux-gnu/bits/siginfo-arch.h" + "include/mips-linux-gnu/bits/signalfd.h" + "include/mips-linux-gnu/bits/signum.h" + "include/mips-linux-gnu/bits/socket_type.h" + "include/mips-linux-gnu/bits/statfs.h" + "include/mips-linux-gnu/bits/termios-c_cc.h" + "include/mips-linux-gnu/bits/termios-c_lflag.h" + "include/mips-linux-gnu/bits/termios-struct.h" + "include/mips-linux-gnu/bits/termios-tcflow.h" + "include/mips-linux-gnu/bits/timerfd.h" + "include/mips-linux-gnu/bits/types/stack_t.h" + "include/mips-linux-gnu/ieee754.h" + "include/mips64-linux-gnuabi64/asm/sgidefs.h" + "include/mips64-linux-gnuabi64/asm/unistd.h" + "include/mips64-linux-gnuabi64/bits/dlfcn.h" + "include/mips64-linux-gnuabi64/bits/errno.h" + "include/mips64-linux-gnuabi64/bits/eventfd.h" + "include/mips64-linux-gnuabi64/bits/inotify.h" + "include/mips64-linux-gnuabi64/bits/ioctl-types.h" + "include/mips64-linux-gnuabi64/bits/ipc.h" + "include/mips64-linux-gnuabi64/bits/ipctypes.h" + "include/mips64-linux-gnuabi64/bits/local_lim.h" + "include/mips64-linux-gnuabi64/bits/mman.h" + "include/mips64-linux-gnuabi64/bits/msq-pad.h" + "include/mips64-linux-gnuabi64/bits/poll.h" + "include/mips64-linux-gnuabi64/bits/resource.h" + "include/mips64-linux-gnuabi64/bits/sem-pad.h" + "include/mips64-linux-gnuabi64/bits/shm-pad.h" + "include/mips64-linux-gnuabi64/bits/shmlba.h" + "include/mips64-linux-gnuabi64/bits/sigaction.h" + "include/mips64-linux-gnuabi64/bits/sigcontext.h" + "include/mips64-linux-gnuabi64/bits/siginfo-arch.h" + "include/mips64-linux-gnuabi64/bits/signalfd.h" + "include/mips64-linux-gnuabi64/bits/signum.h" + "include/mips64-linux-gnuabi64/bits/socket_type.h" + "include/mips64-linux-gnuabi64/bits/statfs.h" + "include/mips64-linux-gnuabi64/bits/termios-c_cc.h" + "include/mips64-linux-gnuabi64/bits/termios-c_lflag.h" + "include/mips64-linux-gnuabi64/bits/termios-struct.h" + "include/mips64-linux-gnuabi64/bits/termios-tcflow.h" + "include/mips64-linux-gnuabi64/bits/timerfd.h" + "include/mips64-linux-gnuabi64/bits/types/stack_t.h" + "include/mips64-linux-gnuabi64/ieee754.h" + "include/mips64-linux-gnuabin32/asm/sgidefs.h" + "include/mips64-linux-gnuabin32/asm/unistd.h" + "include/mips64-linux-gnuabin32/bits/dlfcn.h" + "include/mips64-linux-gnuabin32/bits/errno.h" + "include/mips64-linux-gnuabin32/bits/eventfd.h" + "include/mips64-linux-gnuabin32/bits/inotify.h" + "include/mips64-linux-gnuabin32/bits/ioctl-types.h" + "include/mips64-linux-gnuabin32/bits/ipc.h" + "include/mips64-linux-gnuabin32/bits/ipctypes.h" + "include/mips64-linux-gnuabin32/bits/local_lim.h" + "include/mips64-linux-gnuabin32/bits/mman.h" + "include/mips64-linux-gnuabin32/bits/msq-pad.h" + "include/mips64-linux-gnuabin32/bits/poll.h" + "include/mips64-linux-gnuabin32/bits/resource.h" + "include/mips64-linux-gnuabin32/bits/sem-pad.h" + "include/mips64-linux-gnuabin32/bits/shm-pad.h" + "include/mips64-linux-gnuabin32/bits/shmlba.h" + "include/mips64-linux-gnuabin32/bits/sigaction.h" + "include/mips64-linux-gnuabin32/bits/sigcontext.h" + "include/mips64-linux-gnuabin32/bits/siginfo-arch.h" + "include/mips64-linux-gnuabin32/bits/signalfd.h" + "include/mips64-linux-gnuabin32/bits/signum.h" + "include/mips64-linux-gnuabin32/bits/socket_type.h" + "include/mips64-linux-gnuabin32/bits/statfs.h" + "include/mips64-linux-gnuabin32/bits/termios-c_cc.h" + "include/mips64-linux-gnuabin32/bits/termios-c_lflag.h" + "include/mips64-linux-gnuabin32/bits/termios-struct.h" + "include/mips64-linux-gnuabin32/bits/termios-tcflow.h" + "include/mips64-linux-gnuabin32/bits/timerfd.h" + "include/mips64-linux-gnuabin32/bits/types/stack_t.h" + "include/mips64-linux-gnuabin32/ieee754.h" + "include/mips64el-linux-gnuabi64/asm/sgidefs.h" + "include/mips64el-linux-gnuabi64/asm/unistd.h" + "include/mips64el-linux-gnuabi64/bits/dlfcn.h" + "include/mips64el-linux-gnuabi64/bits/errno.h" + "include/mips64el-linux-gnuabi64/bits/eventfd.h" + "include/mips64el-linux-gnuabi64/bits/inotify.h" + "include/mips64el-linux-gnuabi64/bits/ioctl-types.h" + "include/mips64el-linux-gnuabi64/bits/ipc.h" + "include/mips64el-linux-gnuabi64/bits/ipctypes.h" + "include/mips64el-linux-gnuabi64/bits/local_lim.h" + "include/mips64el-linux-gnuabi64/bits/mman.h" + "include/mips64el-linux-gnuabi64/bits/msq-pad.h" + "include/mips64el-linux-gnuabi64/bits/poll.h" + "include/mips64el-linux-gnuabi64/bits/resource.h" + "include/mips64el-linux-gnuabi64/bits/sem-pad.h" + "include/mips64el-linux-gnuabi64/bits/shm-pad.h" + "include/mips64el-linux-gnuabi64/bits/shmlba.h" + "include/mips64el-linux-gnuabi64/bits/sigaction.h" + "include/mips64el-linux-gnuabi64/bits/sigcontext.h" + "include/mips64el-linux-gnuabi64/bits/siginfo-arch.h" + "include/mips64el-linux-gnuabi64/bits/signalfd.h" + "include/mips64el-linux-gnuabi64/bits/signum.h" + "include/mips64el-linux-gnuabi64/bits/socket_type.h" + "include/mips64el-linux-gnuabi64/bits/statfs.h" + "include/mips64el-linux-gnuabi64/bits/termios-c_cc.h" + "include/mips64el-linux-gnuabi64/bits/termios-c_lflag.h" + "include/mips64el-linux-gnuabi64/bits/termios-struct.h" + "include/mips64el-linux-gnuabi64/bits/termios-tcflow.h" + "include/mips64el-linux-gnuabi64/bits/timerfd.h" + "include/mips64el-linux-gnuabi64/bits/types/stack_t.h" + "include/mips64el-linux-gnuabi64/ieee754.h" + "include/mips64el-linux-gnuabin32/asm/sgidefs.h" + "include/mips64el-linux-gnuabin32/asm/unistd.h" + "include/mips64el-linux-gnuabin32/bits/dlfcn.h" + "include/mips64el-linux-gnuabin32/bits/errno.h" + "include/mips64el-linux-gnuabin32/bits/eventfd.h" + "include/mips64el-linux-gnuabin32/bits/inotify.h" + "include/mips64el-linux-gnuabin32/bits/ioctl-types.h" + "include/mips64el-linux-gnuabin32/bits/ipc.h" + "include/mips64el-linux-gnuabin32/bits/ipctypes.h" + "include/mips64el-linux-gnuabin32/bits/local_lim.h" + "include/mips64el-linux-gnuabin32/bits/mman.h" + "include/mips64el-linux-gnuabin32/bits/msq-pad.h" + "include/mips64el-linux-gnuabin32/bits/poll.h" + "include/mips64el-linux-gnuabin32/bits/resource.h" + "include/mips64el-linux-gnuabin32/bits/sem-pad.h" + "include/mips64el-linux-gnuabin32/bits/shm-pad.h" + "include/mips64el-linux-gnuabin32/bits/shmlba.h" + "include/mips64el-linux-gnuabin32/bits/sigaction.h" + "include/mips64el-linux-gnuabin32/bits/sigcontext.h" + "include/mips64el-linux-gnuabin32/bits/siginfo-arch.h" + "include/mips64el-linux-gnuabin32/bits/signalfd.h" + "include/mips64el-linux-gnuabin32/bits/signum.h" + "include/mips64el-linux-gnuabin32/bits/socket_type.h" + "include/mips64el-linux-gnuabin32/bits/statfs.h" + "include/mips64el-linux-gnuabin32/bits/termios-c_cc.h" + "include/mips64el-linux-gnuabin32/bits/termios-c_lflag.h" + "include/mips64el-linux-gnuabin32/bits/termios-struct.h" + "include/mips64el-linux-gnuabin32/bits/termios-tcflow.h" + "include/mips64el-linux-gnuabin32/bits/timerfd.h" + "include/mips64el-linux-gnuabin32/bits/types/stack_t.h" + "include/mips64el-linux-gnuabin32/ieee754.h" + "include/mipsel-linux-gnu/asm/sgidefs.h" + "include/mipsel-linux-gnu/asm/unistd.h" + "include/mipsel-linux-gnu/bits/dlfcn.h" + "include/mipsel-linux-gnu/bits/errno.h" + "include/mipsel-linux-gnu/bits/eventfd.h" + "include/mipsel-linux-gnu/bits/inotify.h" + "include/mipsel-linux-gnu/bits/ioctl-types.h" + "include/mipsel-linux-gnu/bits/ipc.h" + "include/mipsel-linux-gnu/bits/ipctypes.h" + "include/mipsel-linux-gnu/bits/local_lim.h" + "include/mipsel-linux-gnu/bits/mman.h" + "include/mipsel-linux-gnu/bits/msq-pad.h" + "include/mipsel-linux-gnu/bits/poll.h" + "include/mipsel-linux-gnu/bits/resource.h" + "include/mipsel-linux-gnu/bits/sem-pad.h" + "include/mipsel-linux-gnu/bits/shm-pad.h" + "include/mipsel-linux-gnu/bits/shmlba.h" + "include/mipsel-linux-gnu/bits/sigaction.h" + "include/mipsel-linux-gnu/bits/sigcontext.h" + "include/mipsel-linux-gnu/bits/siginfo-arch.h" + "include/mipsel-linux-gnu/bits/signalfd.h" + "include/mipsel-linux-gnu/bits/signum.h" + "include/mipsel-linux-gnu/bits/socket_type.h" + "include/mipsel-linux-gnu/bits/statfs.h" + "include/mipsel-linux-gnu/bits/termios-c_cc.h" + "include/mipsel-linux-gnu/bits/termios-c_lflag.h" + "include/mipsel-linux-gnu/bits/termios-struct.h" + "include/mipsel-linux-gnu/bits/termios-tcflow.h" + "include/mipsel-linux-gnu/bits/timerfd.h" + "include/mipsel-linux-gnu/bits/types/stack_t.h" + "include/mipsel-linux-gnu/ieee754.h" + "include/nios2-linux-gnu/asm/unistd.h" + "include/nios2-linux-gnu/bits/endian.h" + "include/nios2-linux-gnu/bits/fcntl.h" + "include/nios2-linux-gnu/bits/fenv.h" + "include/nios2-linux-gnu/bits/floatn.h" + "include/nios2-linux-gnu/bits/link.h" + "include/nios2-linux-gnu/bits/long-double.h" + "include/nios2-linux-gnu/bits/procfs.h" + "include/nios2-linux-gnu/bits/pthreadtypes-arch.h" + "include/nios2-linux-gnu/bits/semaphore.h" + "include/nios2-linux-gnu/bits/setjmp.h" + "include/nios2-linux-gnu/bits/stat.h" + "include/nios2-linux-gnu/bits/statfs.h" + "include/nios2-linux-gnu/bits/typesizes.h" + "include/nios2-linux-gnu/bits/wordsize.h" + "include/nios2-linux-gnu/fpu_control.h" + "include/nios2-linux-gnu/gnu/lib-names.h" + "include/nios2-linux-gnu/gnu/stubs.h" + "include/nios2-linux-gnu/sys/cachectl.h" + "include/nios2-linux-gnu/sys/ucontext.h" + "include/nios2-linux-gnu/sys/user.h" + "include/powerpc-linux-gnu/asm/unistd.h" + "include/powerpc-linux-gnu/bits/endian.h" + "include/powerpc-linux-gnu/bits/environments.h" + "include/powerpc-linux-gnu/bits/fcntl.h" + "include/powerpc-linux-gnu/bits/fenv.h" + "include/powerpc-linux-gnu/bits/fenvinline.h" + "include/powerpc-linux-gnu/bits/floatn.h" + "include/powerpc-linux-gnu/bits/fp-fast.h" + "include/powerpc-linux-gnu/bits/hwcap.h" + "include/powerpc-linux-gnu/bits/ioctl-types.h" + "include/powerpc-linux-gnu/bits/ipc.h" + "include/powerpc-linux-gnu/bits/iscanonical.h" + "include/powerpc-linux-gnu/bits/link.h" + "include/powerpc-linux-gnu/bits/local_lim.h" + "include/powerpc-linux-gnu/bits/long-double.h" + "include/powerpc-linux-gnu/bits/mman.h" + "include/powerpc-linux-gnu/bits/msq-pad.h" + "include/powerpc-linux-gnu/bits/procfs.h" + "include/powerpc-linux-gnu/bits/pthreadtypes-arch.h" + "include/powerpc-linux-gnu/bits/sem-pad.h" + "include/powerpc-linux-gnu/bits/semaphore.h" + "include/powerpc-linux-gnu/bits/setjmp.h" + "include/powerpc-linux-gnu/bits/shm-pad.h" + "include/powerpc-linux-gnu/bits/sigstack.h" + "include/powerpc-linux-gnu/bits/stat.h" + "include/powerpc-linux-gnu/bits/termios-baud.h" + "include/powerpc-linux-gnu/bits/termios-c_cc.h" + "include/powerpc-linux-gnu/bits/termios-c_cflag.h" + "include/powerpc-linux-gnu/bits/termios-c_iflag.h" + "include/powerpc-linux-gnu/bits/termios-c_lflag.h" + "include/powerpc-linux-gnu/bits/termios-c_oflag.h" + "include/powerpc-linux-gnu/bits/termios-misc.h" + "include/powerpc-linux-gnu/bits/wordsize.h" + "include/powerpc-linux-gnu/fpu_control.h" + "include/powerpc-linux-gnu/gnu/lib-names-32.h" + "include/powerpc-linux-gnu/gnu/lib-names.h" + "include/powerpc-linux-gnu/gnu/stubs.h" + "include/powerpc-linux-gnu/ieee754.h" + "include/powerpc-linux-gnu/sys/ptrace.h" + "include/powerpc-linux-gnu/sys/ucontext.h" + "include/powerpc-linux-gnu/sys/user.h" + "include/powerpc64-linux-gnu/asm/unistd.h" + "include/powerpc64-linux-gnu/bits/endian.h" + "include/powerpc64-linux-gnu/bits/environments.h" + "include/powerpc64-linux-gnu/bits/fcntl.h" + "include/powerpc64-linux-gnu/bits/fenv.h" + "include/powerpc64-linux-gnu/bits/fenvinline.h" + "include/powerpc64-linux-gnu/bits/floatn.h" + "include/powerpc64-linux-gnu/bits/fp-fast.h" + "include/powerpc64-linux-gnu/bits/hwcap.h" + "include/powerpc64-linux-gnu/bits/ioctl-types.h" + "include/powerpc64-linux-gnu/bits/ipc.h" + "include/powerpc64-linux-gnu/bits/iscanonical.h" + "include/powerpc64-linux-gnu/bits/link.h" + "include/powerpc64-linux-gnu/bits/local_lim.h" + "include/powerpc64-linux-gnu/bits/long-double.h" + "include/powerpc64-linux-gnu/bits/mman.h" + "include/powerpc64-linux-gnu/bits/msq-pad.h" + "include/powerpc64-linux-gnu/bits/procfs.h" + "include/powerpc64-linux-gnu/bits/pthreadtypes-arch.h" + "include/powerpc64-linux-gnu/bits/sem-pad.h" + "include/powerpc64-linux-gnu/bits/semaphore.h" + "include/powerpc64-linux-gnu/bits/setjmp.h" + "include/powerpc64-linux-gnu/bits/shm-pad.h" + "include/powerpc64-linux-gnu/bits/sigstack.h" + "include/powerpc64-linux-gnu/bits/stat.h" + "include/powerpc64-linux-gnu/bits/termios-baud.h" + "include/powerpc64-linux-gnu/bits/termios-c_cc.h" + "include/powerpc64-linux-gnu/bits/termios-c_cflag.h" + "include/powerpc64-linux-gnu/bits/termios-c_iflag.h" + "include/powerpc64-linux-gnu/bits/termios-c_lflag.h" + "include/powerpc64-linux-gnu/bits/termios-c_oflag.h" + "include/powerpc64-linux-gnu/bits/termios-misc.h" + "include/powerpc64-linux-gnu/bits/wordsize.h" + "include/powerpc64-linux-gnu/fpu_control.h" + "include/powerpc64-linux-gnu/gnu/lib-names-64-v1.h" + "include/powerpc64-linux-gnu/gnu/lib-names.h" + "include/powerpc64-linux-gnu/gnu/stubs-64-v1.h" + "include/powerpc64-linux-gnu/gnu/stubs.h" + "include/powerpc64-linux-gnu/ieee754.h" + "include/powerpc64-linux-gnu/sys/ptrace.h" + "include/powerpc64-linux-gnu/sys/ucontext.h" + "include/powerpc64-linux-gnu/sys/user.h" + "include/powerpc64le-linux-gnu/asm/unistd.h" + "include/powerpc64le-linux-gnu/bits/endian.h" + "include/powerpc64le-linux-gnu/bits/environments.h" + "include/powerpc64le-linux-gnu/bits/fcntl.h" + "include/powerpc64le-linux-gnu/bits/fenv.h" + "include/powerpc64le-linux-gnu/bits/fenvinline.h" + "include/powerpc64le-linux-gnu/bits/floatn.h" + "include/powerpc64le-linux-gnu/bits/fp-fast.h" + "include/powerpc64le-linux-gnu/bits/hwcap.h" + "include/powerpc64le-linux-gnu/bits/ioctl-types.h" + "include/powerpc64le-linux-gnu/bits/ipc.h" + "include/powerpc64le-linux-gnu/bits/iscanonical.h" + "include/powerpc64le-linux-gnu/bits/link.h" + "include/powerpc64le-linux-gnu/bits/local_lim.h" + "include/powerpc64le-linux-gnu/bits/long-double.h" + "include/powerpc64le-linux-gnu/bits/mman.h" + "include/powerpc64le-linux-gnu/bits/msq-pad.h" + "include/powerpc64le-linux-gnu/bits/procfs.h" + "include/powerpc64le-linux-gnu/bits/pthreadtypes-arch.h" + "include/powerpc64le-linux-gnu/bits/sem-pad.h" + "include/powerpc64le-linux-gnu/bits/semaphore.h" + "include/powerpc64le-linux-gnu/bits/setjmp.h" + "include/powerpc64le-linux-gnu/bits/shm-pad.h" + "include/powerpc64le-linux-gnu/bits/sigstack.h" + "include/powerpc64le-linux-gnu/bits/stat.h" + "include/powerpc64le-linux-gnu/bits/termios-baud.h" + "include/powerpc64le-linux-gnu/bits/termios-c_cc.h" + "include/powerpc64le-linux-gnu/bits/termios-c_cflag.h" + "include/powerpc64le-linux-gnu/bits/termios-c_iflag.h" + "include/powerpc64le-linux-gnu/bits/termios-c_lflag.h" + "include/powerpc64le-linux-gnu/bits/termios-c_oflag.h" + "include/powerpc64le-linux-gnu/bits/termios-misc.h" + "include/powerpc64le-linux-gnu/bits/wordsize.h" + "include/powerpc64le-linux-gnu/fpu_control.h" + "include/powerpc64le-linux-gnu/gnu/lib-names-64-v2.h" + "include/powerpc64le-linux-gnu/gnu/lib-names.h" + "include/powerpc64le-linux-gnu/gnu/stubs-64-v2.h" + "include/powerpc64le-linux-gnu/gnu/stubs.h" + "include/powerpc64le-linux-gnu/ieee754.h" + "include/powerpc64le-linux-gnu/sys/ptrace.h" + "include/powerpc64le-linux-gnu/sys/ucontext.h" + "include/powerpc64le-linux-gnu/sys/user.h" + "include/riscv64-linux-gnu/asm/unistd.h" + "include/riscv64-linux-gnu/bits/endian.h" + "include/riscv64-linux-gnu/bits/fcntl.h" + "include/riscv64-linux-gnu/bits/fenv.h" + "include/riscv64-linux-gnu/bits/floatn.h" + "include/riscv64-linux-gnu/bits/link.h" + "include/riscv64-linux-gnu/bits/long-double.h" + "include/riscv64-linux-gnu/bits/procfs.h" + "include/riscv64-linux-gnu/bits/pthreadtypes-arch.h" + "include/riscv64-linux-gnu/bits/semaphore.h" + "include/riscv64-linux-gnu/bits/setjmp.h" + "include/riscv64-linux-gnu/bits/sigcontext.h" + "include/riscv64-linux-gnu/bits/stat.h" + "include/riscv64-linux-gnu/bits/statfs.h" + "include/riscv64-linux-gnu/bits/typesizes.h" + "include/riscv64-linux-gnu/bits/wordsize.h" + "include/riscv64-linux-gnu/fpu_control.h" + "include/riscv64-linux-gnu/gnu/lib-names-lp64.h" + "include/riscv64-linux-gnu/gnu/lib-names.h" + "include/riscv64-linux-gnu/gnu/stubs-lp64.h" + "include/riscv64-linux-gnu/gnu/stubs.h" + "include/riscv64-linux-gnu/ieee754.h" + "include/riscv64-linux-gnu/sys/asm.h" + "include/riscv64-linux-gnu/sys/cachectl.h" + "include/riscv64-linux-gnu/sys/ucontext.h" + "include/riscv64-linux-gnu/sys/user.h" + "include/s390x-linux-gnu/asm/unistd.h" + "include/s390x-linux-gnu/bits/elfclass.h" + "include/s390x-linux-gnu/bits/endian.h" + "include/s390x-linux-gnu/bits/environments.h" + "include/s390x-linux-gnu/bits/fcntl.h" + "include/s390x-linux-gnu/bits/fenv.h" + "include/s390x-linux-gnu/bits/floatn.h" + "include/s390x-linux-gnu/bits/flt-eval-method.h" + "include/s390x-linux-gnu/bits/hwcap.h" + "include/s390x-linux-gnu/bits/ipc.h" + "include/s390x-linux-gnu/bits/link.h" + "include/s390x-linux-gnu/bits/long-double.h" + "include/s390x-linux-gnu/bits/procfs-extra.h" + "include/s390x-linux-gnu/bits/procfs-id.h" + "include/s390x-linux-gnu/bits/procfs.h" + "include/s390x-linux-gnu/bits/pthreadtypes-arch.h" + "include/s390x-linux-gnu/bits/semaphore.h" + "include/s390x-linux-gnu/bits/setjmp.h" + "include/s390x-linux-gnu/bits/sigaction.h" + "include/s390x-linux-gnu/bits/stat.h" + "include/s390x-linux-gnu/bits/statfs.h" + "include/s390x-linux-gnu/bits/typesizes.h" + "include/s390x-linux-gnu/bits/utmp.h" + "include/s390x-linux-gnu/bits/utmpx.h" + "include/s390x-linux-gnu/bits/wordsize.h" + "include/s390x-linux-gnu/bits/xtitypes.h" + "include/s390x-linux-gnu/fpu_control.h" + "include/s390x-linux-gnu/gnu/lib-names-64.h" + "include/s390x-linux-gnu/gnu/lib-names.h" + "include/s390x-linux-gnu/gnu/stubs-64.h" + "include/s390x-linux-gnu/gnu/stubs.h" + "include/s390x-linux-gnu/ieee754.h" + "include/s390x-linux-gnu/sys/elf.h" + "include/s390x-linux-gnu/sys/ptrace.h" + "include/s390x-linux-gnu/sys/ucontext.h" + "include/s390x-linux-gnu/sys/user.h" + "include/sparc-linux-gnu/a.out.h" + "include/sparc-linux-gnu/asm/unistd.h" + "include/sparc-linux-gnu/bits/a.out.h" + "include/sparc-linux-gnu/bits/endian.h" + "include/sparc-linux-gnu/bits/environments.h" + "include/sparc-linux-gnu/bits/epoll.h" + "include/sparc-linux-gnu/bits/errno.h" + "include/sparc-linux-gnu/bits/eventfd.h" + "include/sparc-linux-gnu/bits/fcntl.h" + "include/sparc-linux-gnu/bits/fenv.h" + "include/sparc-linux-gnu/bits/floatn.h" + "include/sparc-linux-gnu/bits/hwcap.h" + "include/sparc-linux-gnu/bits/inotify.h" + "include/sparc-linux-gnu/bits/ioctls.h" + "include/sparc-linux-gnu/bits/ipc.h" + "include/sparc-linux-gnu/bits/link.h" + "include/sparc-linux-gnu/bits/local_lim.h" + "include/sparc-linux-gnu/bits/long-double.h" + "include/sparc-linux-gnu/bits/mman.h" + "include/sparc-linux-gnu/bits/msq-pad.h" + "include/sparc-linux-gnu/bits/poll.h" + "include/sparc-linux-gnu/bits/procfs-extra.h" + "include/sparc-linux-gnu/bits/procfs-id.h" + "include/sparc-linux-gnu/bits/procfs.h" + "include/sparc-linux-gnu/bits/pthreadtypes-arch.h" + "include/sparc-linux-gnu/bits/resource.h" + "include/sparc-linux-gnu/bits/sem-pad.h" + "include/sparc-linux-gnu/bits/semaphore.h" + "include/sparc-linux-gnu/bits/setjmp.h" + "include/sparc-linux-gnu/bits/shm-pad.h" + "include/sparc-linux-gnu/bits/shmlba.h" + "include/sparc-linux-gnu/bits/sigaction.h" + "include/sparc-linux-gnu/bits/sigcontext.h" + "include/sparc-linux-gnu/bits/siginfo-arch.h" + "include/sparc-linux-gnu/bits/siginfo-consts-arch.h" + "include/sparc-linux-gnu/bits/signalfd.h" + "include/sparc-linux-gnu/bits/signum.h" + "include/sparc-linux-gnu/bits/sigstack.h" + "include/sparc-linux-gnu/bits/socket_type.h" + "include/sparc-linux-gnu/bits/stat.h" + "include/sparc-linux-gnu/bits/termios-baud.h" + "include/sparc-linux-gnu/bits/termios-c_cc.h" + "include/sparc-linux-gnu/bits/termios-c_oflag.h" + "include/sparc-linux-gnu/bits/termios-struct.h" + "include/sparc-linux-gnu/bits/timerfd.h" + "include/sparc-linux-gnu/bits/typesizes.h" + "include/sparc-linux-gnu/bits/wordsize.h" + "include/sparc-linux-gnu/fpu_control.h" + "include/sparc-linux-gnu/gnu/lib-names-64.h" + "include/sparc-linux-gnu/gnu/lib-names.h" + "include/sparc-linux-gnu/gnu/stubs-64.h" + "include/sparc-linux-gnu/gnu/stubs.h" + "include/sparc-linux-gnu/ieee754.h" + "include/sparc-linux-gnu/sys/ptrace.h" + "include/sparc-linux-gnu/sys/ucontext.h" + "include/sparc-linux-gnu/sys/user.h" + "include/sparcv9-linux-gnu/a.out.h" + "include/sparcv9-linux-gnu/asm/unistd.h" + "include/sparcv9-linux-gnu/bits/a.out.h" + "include/sparcv9-linux-gnu/bits/endian.h" + "include/sparcv9-linux-gnu/bits/environments.h" + "include/sparcv9-linux-gnu/bits/epoll.h" + "include/sparcv9-linux-gnu/bits/errno.h" + "include/sparcv9-linux-gnu/bits/eventfd.h" + "include/sparcv9-linux-gnu/bits/fcntl.h" + "include/sparcv9-linux-gnu/bits/fenv.h" + "include/sparcv9-linux-gnu/bits/floatn.h" + "include/sparcv9-linux-gnu/bits/hwcap.h" + "include/sparcv9-linux-gnu/bits/inotify.h" + "include/sparcv9-linux-gnu/bits/ioctls.h" + "include/sparcv9-linux-gnu/bits/ipc.h" + "include/sparcv9-linux-gnu/bits/link.h" + "include/sparcv9-linux-gnu/bits/local_lim.h" + "include/sparcv9-linux-gnu/bits/long-double.h" + "include/sparcv9-linux-gnu/bits/mman.h" + "include/sparcv9-linux-gnu/bits/msq-pad.h" + "include/sparcv9-linux-gnu/bits/poll.h" + "include/sparcv9-linux-gnu/bits/procfs-extra.h" + "include/sparcv9-linux-gnu/bits/procfs-id.h" + "include/sparcv9-linux-gnu/bits/procfs.h" + "include/sparcv9-linux-gnu/bits/pthreadtypes-arch.h" + "include/sparcv9-linux-gnu/bits/resource.h" + "include/sparcv9-linux-gnu/bits/sem-pad.h" + "include/sparcv9-linux-gnu/bits/semaphore.h" + "include/sparcv9-linux-gnu/bits/setjmp.h" + "include/sparcv9-linux-gnu/bits/shm-pad.h" + "include/sparcv9-linux-gnu/bits/shmlba.h" + "include/sparcv9-linux-gnu/bits/sigaction.h" + "include/sparcv9-linux-gnu/bits/sigcontext.h" + "include/sparcv9-linux-gnu/bits/siginfo-arch.h" + "include/sparcv9-linux-gnu/bits/siginfo-consts-arch.h" + "include/sparcv9-linux-gnu/bits/signalfd.h" + "include/sparcv9-linux-gnu/bits/signum.h" + "include/sparcv9-linux-gnu/bits/sigstack.h" + "include/sparcv9-linux-gnu/bits/socket_type.h" + "include/sparcv9-linux-gnu/bits/stat.h" + "include/sparcv9-linux-gnu/bits/termios-baud.h" + "include/sparcv9-linux-gnu/bits/termios-c_cc.h" + "include/sparcv9-linux-gnu/bits/termios-c_oflag.h" + "include/sparcv9-linux-gnu/bits/termios-struct.h" + "include/sparcv9-linux-gnu/bits/timerfd.h" + "include/sparcv9-linux-gnu/bits/typesizes.h" + "include/sparcv9-linux-gnu/bits/wordsize.h" + "include/sparcv9-linux-gnu/fpu_control.h" + "include/sparcv9-linux-gnu/gnu/lib-names.h" + "include/sparcv9-linux-gnu/gnu/stubs-32.h" + "include/sparcv9-linux-gnu/gnu/stubs.h" + "include/sparcv9-linux-gnu/ieee754.h" + "include/sparcv9-linux-gnu/sys/ptrace.h" + "include/sparcv9-linux-gnu/sys/ucontext.h" + "include/sparcv9-linux-gnu/sys/user.h" + "include/x86_64-linux-gnu/asm/unistd.h" + "include/x86_64-linux-gnu/bits/a.out.h" + "include/x86_64-linux-gnu/bits/endian.h" + "include/x86_64-linux-gnu/bits/environments.h" + "include/x86_64-linux-gnu/bits/epoll.h" + "include/x86_64-linux-gnu/bits/fcntl.h" + "include/x86_64-linux-gnu/bits/fenv.h" + "include/x86_64-linux-gnu/bits/floatn.h" + "include/x86_64-linux-gnu/bits/flt-eval-method.h" + "include/x86_64-linux-gnu/bits/fp-logb.h" + "include/x86_64-linux-gnu/bits/indirect-return.h" + "include/x86_64-linux-gnu/bits/ipctypes.h" + "include/x86_64-linux-gnu/bits/iscanonical.h" + "include/x86_64-linux-gnu/bits/link.h" + "include/x86_64-linux-gnu/bits/long-double.h" + "include/x86_64-linux-gnu/bits/math-vector-fortran.h" + "include/x86_64-linux-gnu/bits/math-vector.h" + "include/x86_64-linux-gnu/bits/mman.h" + "include/x86_64-linux-gnu/bits/procfs-id.h" + "include/x86_64-linux-gnu/bits/procfs.h" + "include/x86_64-linux-gnu/bits/pthreadtypes-arch.h" + "include/x86_64-linux-gnu/bits/select.h" + "include/x86_64-linux-gnu/bits/sem-pad.h" + "include/x86_64-linux-gnu/bits/semaphore.h" + "include/x86_64-linux-gnu/bits/setjmp.h" + "include/x86_64-linux-gnu/bits/sigcontext.h" + "include/x86_64-linux-gnu/bits/siginfo-arch.h" + "include/x86_64-linux-gnu/bits/stat.h" + "include/x86_64-linux-gnu/bits/sysctl.h" + "include/x86_64-linux-gnu/bits/timesize.h" + "include/x86_64-linux-gnu/bits/typesizes.h" + "include/x86_64-linux-gnu/bits/wordsize.h" + "include/x86_64-linux-gnu/bits/xtitypes.h" + "include/x86_64-linux-gnu/fpu_control.h" + "include/x86_64-linux-gnu/gnu/lib-names-64.h" + "include/x86_64-linux-gnu/gnu/lib-names.h" + "include/x86_64-linux-gnu/gnu/stubs-64.h" + "include/x86_64-linux-gnu/gnu/stubs.h" + "include/x86_64-linux-gnu/sys/elf.h" + "include/x86_64-linux-gnu/sys/io.h" + "include/x86_64-linux-gnu/sys/ptrace.h" + "include/x86_64-linux-gnu/sys/ucontext.h" + "include/x86_64-linux-gnu/sys/user.h" + "include/x86_64-linux-gnux32/bits/a.out.h" + "include/x86_64-linux-gnux32/bits/endian.h" + "include/x86_64-linux-gnux32/bits/environments.h" + "include/x86_64-linux-gnux32/bits/epoll.h" + "include/x86_64-linux-gnux32/bits/fcntl.h" + "include/x86_64-linux-gnux32/bits/fenv.h" + "include/x86_64-linux-gnux32/bits/floatn.h" + "include/x86_64-linux-gnux32/bits/flt-eval-method.h" + "include/x86_64-linux-gnux32/bits/fp-logb.h" + "include/x86_64-linux-gnux32/bits/indirect-return.h" + "include/x86_64-linux-gnux32/bits/ipctypes.h" + "include/x86_64-linux-gnux32/bits/iscanonical.h" + "include/x86_64-linux-gnux32/bits/link.h" + "include/x86_64-linux-gnux32/bits/long-double.h" + "include/x86_64-linux-gnux32/bits/math-vector-fortran.h" + "include/x86_64-linux-gnux32/bits/math-vector.h" + "include/x86_64-linux-gnux32/bits/mman.h" + "include/x86_64-linux-gnux32/bits/procfs-id.h" + "include/x86_64-linux-gnux32/bits/procfs.h" + "include/x86_64-linux-gnux32/bits/pthreadtypes-arch.h" + "include/x86_64-linux-gnux32/bits/select.h" + "include/x86_64-linux-gnux32/bits/sem-pad.h" + "include/x86_64-linux-gnux32/bits/semaphore.h" + "include/x86_64-linux-gnux32/bits/setjmp.h" + "include/x86_64-linux-gnux32/bits/sigcontext.h" + "include/x86_64-linux-gnux32/bits/siginfo-arch.h" + "include/x86_64-linux-gnux32/bits/stat.h" + "include/x86_64-linux-gnux32/bits/sysctl.h" + "include/x86_64-linux-gnux32/bits/timesize.h" + "include/x86_64-linux-gnux32/bits/typesizes.h" + "include/x86_64-linux-gnux32/bits/wordsize.h" + "include/x86_64-linux-gnux32/bits/xtitypes.h" + "include/x86_64-linux-gnux32/fpu_control.h" + "include/x86_64-linux-gnux32/gnu/lib-names-x32.h" + "include/x86_64-linux-gnux32/gnu/lib-names.h" + "include/x86_64-linux-gnux32/gnu/stubs-x32.h" + "include/x86_64-linux-gnux32/gnu/stubs.h" + "include/x86_64-linux-gnux32/sys/elf.h" + "include/x86_64-linux-gnux32/sys/io.h" + "include/x86_64-linux-gnux32/sys/ptrace.h" + "include/x86_64-linux-gnux32/sys/ucontext.h" + "include/x86_64-linux-gnux32/sys/user.h" ) set(ZIG_LIBUNWIND_FILES diff --git a/README.md b/README.md index 5244b49867..e605768c7e 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,8 @@ clarity. branch, and updates ziglang.org/download with links to pre-built binaries. * These targets have debug info capabilities and therefore produce stack traces on failed assertions. + * ([coming soon](https://github.com/ziglang/zig/issues/514)) libc is available + for this target even when cross compiling. #### Tier 2 Support diff --git a/libc/dummy/c.zig b/libc/dummy/c.zig index 21685dfac2..f4337bdb6e 100644 --- a/libc/dummy/c.zig +++ b/libc/dummy/c.zig @@ -1,11 +1,17 @@ -const builtin = @import("builtin"); -pub fn panic(msg: []const u8, error_return_trace: ?*builtin.StackTrace) noreturn { - unreachable; -} - // This file exists to create a libc.so file so that LLD has something to look at // and emit linker errors if an attempt to link against a non-existent C symbol happens. +const builtin = @import("builtin"); + +comptime { + switch (builtin.arch) { + builtin.Arch.i386 => _ = @import("c/i386.zig"), + builtin.Arch.x86_64 => _ = @import("c/x86_64.zig"), + else => {}, + } +} + +export fn @"error"() void {} export fn _Exit() void {} export fn _IO_2_1_stderr_() void {} export fn _IO_2_1_stdin_() void {} @@ -141,7 +147,6 @@ export fn _IO_wsetb() void {} export fn __abort_msg() void {} export fn __adjtimex() void {} export fn __after_morecore_hook() void {} -export fn __arch_prctl() void {} export fn __argz_count() void {} export fn __argz_next() void {} export fn __argz_stringify() void {} @@ -713,7 +718,6 @@ export fn alarm() void {} export fn aligned_alloc() void {} export fn alphasort() void {} export fn alphasort64() void {} -export fn arch_prctl() void {} export fn argp_err_exit_status() void {} export fn argp_error() void {} export fn argp_failure() void {} @@ -886,7 +890,6 @@ export fn erand48() void {} export fn erand48_r() void {} export fn err() void {} export fn errno() void {} -export fn @"error"() void {} export fn error_at_line() void {} export fn error_message_count() void {} export fn error_one_per_line() void {} diff --git a/libc/dummy/c/i386.zig b/libc/dummy/c/i386.zig new file mode 100644 index 0000000000..5a9c8cdcf0 --- /dev/null +++ b/libc/dummy/c/i386.zig @@ -0,0 +1,71 @@ +export fn @"__x86.get_pc_thunk.bx"() void {} +export fn _IO_stderr_() void {} +export fn _IO_stdin_() void {} +export fn _IO_stdout_() void {} +export fn _Unwind_Find_FDE() void {} +export fn ___brk_addr() void {} +export fn __deregister_frame() void {} +export fn __deregister_frame_info() void {} +export fn __deregister_frame_info_bases() void {} +export fn __divdi3() void {} +export fn __frame_state_for() void {} +export fn __memcpy_by2() void {} +export fn __memcpy_by4() void {} +export fn __memcpy_c() void {} +export fn __memcpy_g() void {} +export fn __mempcpy_by2() void {} +export fn __mempcpy_by4() void {} +export fn __mempcpy_byn() void {} +export fn __memset_cc() void {} +export fn __memset_ccn_by2() void {} +export fn __memset_ccn_by4() void {} +export fn __memset_cg() void {} +export fn __memset_gcn_by2() void {} +export fn __memset_gcn_by4() void {} +export fn __memset_gg() void {} +export fn __moddi3() void {} +export fn __modify_ldt() void {} +export fn __register_frame() void {} +export fn __register_frame_info() void {} +export fn __register_frame_info_bases() void {} +export fn __register_frame_info_table() void {} +export fn __register_frame_info_table_bases() void {} +export fn __register_frame_table() void {} +export fn __stpcpy_g() void {} +export fn __strcat_c() void {} +export fn __strcat_g() void {} +export fn __strchr_c() void {} +export fn __strchr_g() void {} +export fn __strchrnul_c() void {} +export fn __strchrnul_g() void {} +export fn __strcmp_gg() void {} +export fn __strcpy_g() void {} +export fn __strcspn_cg() void {} +export fn __strcspn_g() void {} +export fn __strlen_g() void {} +export fn __strncat_g() void {} +export fn __strncmp_g() void {} +export fn __strncpy_by2() void {} +export fn __strncpy_by4() void {} +export fn __strncpy_byn() void {} +export fn __strncpy_gg() void {} +export fn __strpbrk_cg() void {} +export fn __strpbrk_g() void {} +export fn __strrchr_c() void {} +export fn __strrchr_g() void {} +export fn __strspn_cg() void {} +export fn __strspn_g() void {} +export fn __strstr_cg() void {} +export fn __strstr_g() void {} +export fn __strtoq_internal() void {} +export fn __strtouq_internal() void {} +export fn __udivdi3() void {} +export fn __umoddi3() void {} +export fn __uname() void {} +export fn atexit() void {} +export fn gettid() void {} +export fn res_init() void {} +export fn scalbln() void {} +export fn scalblnf() void {} +export fn scalblnl() void {} +export fn vm86() void {} diff --git a/libc/dummy/c/x86_64.zig b/libc/dummy/c/x86_64.zig new file mode 100644 index 0000000000..3f566a021d --- /dev/null +++ b/libc/dummy/c/x86_64.zig @@ -0,0 +1,2 @@ +export fn arch_prctl() void {} +export fn __arch_prctl() void {} diff --git a/libc/dummy/dl.zig b/libc/dummy/dl.zig index 84d47cf4fa..e4cf3a20c3 100644 --- a/libc/dummy/dl.zig +++ b/libc/dummy/dl.zig @@ -1,8 +1,3 @@ -const builtin = @import("builtin"); -pub fn panic(msg: []const u8, error_return_trace: ?*builtin.StackTrace) noreturn { - unreachable; -} - // This file exists to create a libdl.so file so that LLD has something to look at // and emit linker errors if an attempt to link against a non-existent C symbol happens. diff --git a/libc/dummy/m.zig b/libc/dummy/m.zig index c24b30042c..abdd80b7a8 100644 --- a/libc/dummy/m.zig +++ b/libc/dummy/m.zig @@ -1,8 +1,3 @@ -const builtin = @import("builtin"); -pub fn panic(msg: []const u8, error_return_trace: ?*builtin.StackTrace) noreturn { - unreachable; -} - // This file exists to create a libm.so file so that LLD has something to look at // and emit linker errors if an attempt to link against a non-existent C symbol happens. diff --git a/libc/dummy/pthread.zig b/libc/dummy/pthread.zig index d0719e290f..be5e2f602c 100644 --- a/libc/dummy/pthread.zig +++ b/libc/dummy/pthread.zig @@ -1,8 +1,3 @@ -const builtin = @import("builtin"); -pub fn panic(msg: []const u8, error_return_trace: ?*builtin.StackTrace) noreturn { - unreachable; -} - // This file exists to create a libpthread.so file so that LLD has something to look at // and emit linker errors if an attempt to link against a non-existent C symbol happens. diff --git a/libc/dummy/rt.zig b/libc/dummy/rt.zig index c0fd9894e3..0327237977 100644 --- a/libc/dummy/rt.zig +++ b/libc/dummy/rt.zig @@ -1,8 +1,3 @@ -const builtin = @import("builtin"); -pub fn panic(msg: []const u8, error_return_trace: ?*builtin.StackTrace) noreturn { - unreachable; -} - // This file exists to create a librt.so file so that LLD has something to look at // and emit linker errors if an attempt to link against a non-existent C symbol happens. diff --git a/libc/glibc-include/bits/initspin.h b/libc/glibc-include/bits/initspin.h deleted file mode 100644 index 936f178497..0000000000 --- a/libc/glibc-include/bits/initspin.h +++ /dev/null @@ -1 +0,0 @@ -/* No thread support. */ diff --git a/libc/glibc-include/net/ppp-comp.h b/libc/glibc-include/net/ppp-comp.h deleted file mode 100644 index 4a992d5422..0000000000 --- a/libc/glibc-include/net/ppp-comp.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/libc/glibc-include/nfs/nfs.h b/libc/glibc-include/nfs/nfs.h deleted file mode 100644 index 61e4b656d7..0000000000 --- a/libc/glibc-include/nfs/nfs.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/libc/glibc-include/poll.h b/libc/glibc-include/poll.h deleted file mode 100644 index 06fb41ab89..0000000000 --- a/libc/glibc-include/poll.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/libc/glibc-include/sys/errno.h b/libc/glibc-include/sys/errno.h deleted file mode 100644 index 339f4fc10c..0000000000 --- a/libc/glibc-include/sys/errno.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/libc/glibc-include/sys/fcntl.h b/libc/glibc-include/sys/fcntl.h deleted file mode 100644 index cd304557e7..0000000000 --- a/libc/glibc-include/sys/fcntl.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/libc/glibc-include/sys/signal.h b/libc/glibc-include/sys/signal.h deleted file mode 100644 index 2e602dad89..0000000000 --- a/libc/glibc-include/sys/signal.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/libc/glibc-include/sys/soundcard.h b/libc/glibc-include/sys/soundcard.h deleted file mode 100644 index fade986fe4..0000000000 --- a/libc/glibc-include/sys/soundcard.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/libc/glibc-include/sys/stropts.h b/libc/glibc-include/sys/stropts.h deleted file mode 100644 index 5b5bc02f40..0000000000 --- a/libc/glibc-include/sys/stropts.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/libc/glibc-include/sys/unistd.h b/libc/glibc-include/sys/unistd.h deleted file mode 100644 index 1e823fbd53..0000000000 --- a/libc/glibc-include/sys/unistd.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/libc/glibc-include/sys/vt.h b/libc/glibc-include/sys/vt.h deleted file mode 100644 index 834abfbc8f..0000000000 --- a/libc/glibc-include/sys/vt.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/libc/glibc-include/syscall.h b/libc/glibc-include/syscall.h deleted file mode 100644 index 4c30578447..0000000000 --- a/libc/glibc-include/syscall.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/libc/glibc-include/syslog.h b/libc/glibc-include/syslog.h deleted file mode 100644 index 830b4928ad..0000000000 --- a/libc/glibc-include/syslog.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/libc/glibc-include/wait.h b/libc/glibc-include/wait.h deleted file mode 100644 index d01b81125f..0000000000 --- a/libc/glibc-include/wait.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/libc/glibc/sysdeps/csky/abiv2/start.S b/libc/glibc/sysdeps/csky/abiv2/start.S deleted file mode 100644 index 324ed69d32..0000000000 --- a/libc/glibc/sysdeps/csky/abiv2/start.S +++ /dev/null @@ -1,108 +0,0 @@ -/* Startup code compliant to the ELF C-SKY ABIV2. - Copyright (C) 2018-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library. If not, see - . */ - -/* We need to call: - __libc_start_main (int (*main) (int, char **, char **), int argc, - char **argv, void (*init) (void), void (*fini) (void), - void (*rtld_fini) (void), void *stack_end) - */ - -#include - - .text - .globl _start; - .type _start,@function; - .align 4; -_start: - subi sp, 8 - /* Clear the link register since this is the outermost frame. */ - movi lr, 0 - /* Pop argc off the stack and save a pointer to argv. */ - ldw a1, (sp, 8) /* Init argc for __libc_start_main. */ - addi a2, sp, 12 /* Init argv for __libc_start_main. */ - - /* Push stack limit. */ - stw a2, (sp, 8) - /* Push rtld_fini. */ - stw a0, (sp, 4) - -#ifdef SHARED - grs t0, .Lgetpc -.Lgetpc: - lrw gb, .Lgetpc@GOTPC - addu gb, t0 - lrw a3, __libc_csu_fini@GOT - ldr.w a3, (gb, a3 << 0) - stw a3, (sp, 0) - - lrw a3, __libc_csu_init@GOT - addu a3, gb - ldw a3, (a3, 0) - - lrw t0, main@GOT - addu t0, gb - ldw a0, (t0, 0) - lrw t1, __libc_start_main@PLT - ldr.w t1, (gb, t1 << 0) - jsr t1 - - lrw t1, abort@PLT - ldr.w t1, (gb, t1 << 0) - jsr t1 -#else - /* Fetch address of __libc_csu_fini. */ - lrw a0, __libc_csu_fini - /* Push __libc_csu_fini */ - stw a0, (sp, 0) - - /* Set up the other arguments in registers. */ - lrw a0, main - lrw a3, __libc_csu_init - /* Let the libc call main and exit with its return code. */ - jsri __libc_start_main - - /* Should never get here. */ - jsri abort -#endif /* !SHARED */ - .size _start,.-_start - - - /* Define a symbol for the first piece of initialized data. */ - .data - .globl __data_start -__data_start: - .long 0 - .weak data_start - data_start = __data_start diff --git a/libc/glibc/sysdeps/csky/bits/endian.h b/libc/glibc/sysdeps/csky/bits/endian.h deleted file mode 100644 index 51df38d8f9..0000000000 --- a/libc/glibc/sysdeps/csky/bits/endian.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _ENDIAN_H -# error "Never use directly; include instead." -#endif - -#ifdef __CSKYBE__ -# error "Big endian not supported for C-SKY." -#else -# define __BYTE_ORDER __LITTLE_ENDIAN -#endif diff --git a/libc/glibc/sysdeps/csky/sysdep.h b/libc/glibc/sysdeps/csky/sysdep.h deleted file mode 100644 index 984245d2cc..0000000000 --- a/libc/glibc/sysdeps/csky/sysdep.h +++ /dev/null @@ -1,84 +0,0 @@ -/* Assembler macros for C-SKY. - Copyright (C) 2018-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for 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 -#include - -#ifdef __ASSEMBLER__ - -# define ASM_SIZE_DIRECTIVE(name) .size name,.-name - -/* Define an entry point visible from C. */ -# define ENTRY(name) \ - .globl name; \ - .type name,@function; \ - .align 4; \ - name##:; \ - cfi_startproc; \ - CALL_MCOUNT - -# undef END -# define END(name) \ - cfi_endproc; \ - ASM_SIZE_DIRECTIVE(name) - -/* If compiled for profiling, call `mcount' at the start of each function. */ -# ifdef PROF -# ifdef __PIC__ -# define CALL_MCOUNT \ - subi sp, 4; \ - stw lr, (sp, 0); \ - grs t0, .Lgetpc; \ -.Lgetpc: \ - lrw gb, .Lgetpc@GOTPC; \ - addu gb, t0; \ - lrw t1, _mcount@PLT; \ - ldr.w t0, (gb, t1 << 0); \ - jmp t0; -# else -# define CALL_MCOUNT \ - subi sp, 4; \ - stw lr, (sp, 0); \ - jbsr _mcount; -# endif -# else -# define CALL_MCOUNT /* Do nothing. */ -# endif - -# if defined (__CK860__) -/* Instruction fetch will be faster when the label is 16 bytes aligned. - Filling with nop instruction to avoid extra jump. */ -# define LABLE_ALIGN \ - .balignw 16, 0x6c03 - -# define PRE_BNEZAD(R) - -# define BNEZAD(R, L) \ - bnezad R, L -# else -# define LABLE_ALIGN \ - .balignw 8, 0x6c03 - -# define PRE_BNEZAD(R) \ - subi R, 1 - -# define BNEZAD(R, L) \ - bnez R, L -# endif - -#endif diff --git a/libc/glibc/sysdeps/unix/sysv/linux/alpha/asm/unistd.h b/libc/glibc/sysdeps/unix/sysv/linux/alpha/asm/unistd.h deleted file mode 100644 index e153ca6e15..0000000000 --- a/libc/glibc/sysdeps/unix/sysv/linux/alpha/asm/unistd.h +++ /dev/null @@ -1,489 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _UAPI_ALPHA_UNISTD_H -#define _UAPI_ALPHA_UNISTD_H - -#define __NR_osf_syscall 0 /* not implemented */ -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_osf_old_open 5 /* not implemented */ -#define __NR_close 6 -#define __NR_osf_wait4 7 -#define __NR_osf_old_creat 8 /* not implemented */ -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_osf_execve 11 /* not implemented */ -#define __NR_chdir 12 -#define __NR_fchdir 13 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_chown 16 -#define __NR_brk 17 -#define __NR_osf_getfsstat 18 /* not implemented */ -#define __NR_lseek 19 -#define __NR_getxpid 20 -#define __NR_osf_mount 21 -#define __NR_umount 22 -#define __NR_setuid 23 -#define __NR_getxuid 24 -#define __NR_exec_with_loader 25 /* not implemented */ -#define __NR_ptrace 26 -#define __NR_osf_nrecvmsg 27 /* not implemented */ -#define __NR_osf_nsendmsg 28 /* not implemented */ -#define __NR_osf_nrecvfrom 29 /* not implemented */ -#define __NR_osf_naccept 30 /* not implemented */ -#define __NR_osf_ngetpeername 31 /* not implemented */ -#define __NR_osf_ngetsockname 32 /* not implemented */ -#define __NR_access 33 -#define __NR_osf_chflags 34 /* not implemented */ -#define __NR_osf_fchflags 35 /* not implemented */ -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_osf_old_stat 38 /* not implemented */ -#define __NR_setpgid 39 -#define __NR_osf_old_lstat 40 /* not implemented */ -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_osf_set_program_attributes 43 -#define __NR_osf_profil 44 /* not implemented */ -#define __NR_open 45 -#define __NR_osf_old_sigaction 46 /* not implemented */ -#define __NR_getxgid 47 -#define __NR_osf_sigprocmask 48 -#define __NR_osf_getlogin 49 /* not implemented */ -#define __NR_osf_setlogin 50 /* not implemented */ -#define __NR_acct 51 -#define __NR_sigpending 52 - -#define __NR_ioctl 54 -#define __NR_osf_reboot 55 /* not implemented */ -#define __NR_osf_revoke 56 /* not implemented */ -#define __NR_symlink 57 -#define __NR_readlink 58 -#define __NR_execve 59 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_osf_old_fstat 62 /* not implemented */ -#define __NR_getpgrp 63 -#define __NR_getpagesize 64 -#define __NR_osf_mremap 65 /* not implemented */ -#define __NR_vfork 66 -#define __NR_stat 67 -#define __NR_lstat 68 -#define __NR_osf_sbrk 69 /* not implemented */ -#define __NR_osf_sstk 70 /* not implemented */ -#define __NR_mmap 71 /* OSF/1 mmap is superset of Linux */ -#define __NR_osf_old_vadvise 72 /* not implemented */ -#define __NR_munmap 73 -#define __NR_mprotect 74 -#define __NR_madvise 75 -#define __NR_vhangup 76 -#define __NR_osf_kmodcall 77 /* not implemented */ -#define __NR_osf_mincore 78 /* not implemented */ -#define __NR_getgroups 79 -#define __NR_setgroups 80 -#define __NR_osf_old_getpgrp 81 /* not implemented */ -#define __NR_setpgrp 82 /* BSD alias for setpgid */ -#define __NR_osf_setitimer 83 -#define __NR_osf_old_wait 84 /* not implemented */ -#define __NR_osf_table 85 /* not implemented */ -#define __NR_osf_getitimer 86 -#define __NR_gethostname 87 -#define __NR_sethostname 88 -#define __NR_getdtablesize 89 -#define __NR_dup2 90 -#define __NR_fstat 91 -#define __NR_fcntl 92 -#define __NR_osf_select 93 -#define __NR_poll 94 -#define __NR_fsync 95 -#define __NR_setpriority 96 -#define __NR_socket 97 -#define __NR_connect 98 -#define __NR_accept 99 -#define __NR_getpriority 100 -#define __NR_send 101 -#define __NR_recv 102 -#define __NR_sigreturn 103 -#define __NR_bind 104 -#define __NR_setsockopt 105 -#define __NR_listen 106 -#define __NR_osf_plock 107 /* not implemented */ -#define __NR_osf_old_sigvec 108 /* not implemented */ -#define __NR_osf_old_sigblock 109 /* not implemented */ -#define __NR_osf_old_sigsetmask 110 /* not implemented */ -#define __NR_sigsuspend 111 -#define __NR_osf_sigstack 112 -#define __NR_recvmsg 113 -#define __NR_sendmsg 114 -#define __NR_osf_old_vtrace 115 /* not implemented */ -#define __NR_osf_gettimeofday 116 -#define __NR_osf_getrusage 117 -#define __NR_getsockopt 118 - -#define __NR_readv 120 -#define __NR_writev 121 -#define __NR_osf_settimeofday 122 -#define __NR_fchown 123 -#define __NR_fchmod 124 -#define __NR_recvfrom 125 -#define __NR_setreuid 126 -#define __NR_setregid 127 -#define __NR_rename 128 -#define __NR_truncate 129 -#define __NR_ftruncate 130 -#define __NR_flock 131 -#define __NR_setgid 132 -#define __NR_sendto 133 -#define __NR_shutdown 134 -#define __NR_socketpair 135 -#define __NR_mkdir 136 -#define __NR_rmdir 137 -#define __NR_osf_utimes 138 -#define __NR_osf_old_sigreturn 139 /* not implemented */ -#define __NR_osf_adjtime 140 /* not implemented */ -#define __NR_getpeername 141 -#define __NR_osf_gethostid 142 /* not implemented */ -#define __NR_osf_sethostid 143 /* not implemented */ -#define __NR_getrlimit 144 -#define __NR_setrlimit 145 -#define __NR_osf_old_killpg 146 /* not implemented */ -#define __NR_setsid 147 -#define __NR_quotactl 148 -#define __NR_osf_oldquota 149 /* not implemented */ -#define __NR_getsockname 150 - -#define __NR_osf_pid_block 153 /* not implemented */ -#define __NR_osf_pid_unblock 154 /* not implemented */ - -#define __NR_sigaction 156 -#define __NR_osf_sigwaitprim 157 /* not implemented */ -#define __NR_osf_nfssvc 158 /* not implemented */ -#define __NR_osf_getdirentries 159 -#define __NR_osf_statfs 160 -#define __NR_osf_fstatfs 161 - -#define __NR_osf_asynch_daemon 163 /* not implemented */ -#define __NR_osf_getfh 164 /* not implemented */ -#define __NR_osf_getdomainname 165 -#define __NR_setdomainname 166 - -#define __NR_osf_exportfs 169 /* not implemented */ - -#define __NR_osf_alt_plock 181 /* not implemented */ - -#define __NR_osf_getmnt 184 /* not implemented */ - -#define __NR_osf_alt_sigpending 187 /* not implemented */ -#define __NR_osf_alt_setsid 188 /* not implemented */ - -#define __NR_osf_swapon 199 -#define __NR_msgctl 200 -#define __NR_msgget 201 -#define __NR_msgrcv 202 -#define __NR_msgsnd 203 -#define __NR_semctl 204 -#define __NR_semget 205 -#define __NR_semop 206 -#define __NR_osf_utsname 207 -#define __NR_lchown 208 -#define __NR_osf_shmat 209 -#define __NR_shmctl 210 -#define __NR_shmdt 211 -#define __NR_shmget 212 -#define __NR_osf_mvalid 213 /* not implemented */ -#define __NR_osf_getaddressconf 214 /* not implemented */ -#define __NR_osf_msleep 215 /* not implemented */ -#define __NR_osf_mwakeup 216 /* not implemented */ -#define __NR_msync 217 -#define __NR_osf_signal 218 /* not implemented */ -#define __NR_osf_utc_gettime 219 /* not implemented */ -#define __NR_osf_utc_adjtime 220 /* not implemented */ - -#define __NR_osf_security 222 /* not implemented */ -#define __NR_osf_kloadcall 223 /* not implemented */ - -#define __NR_osf_stat 224 -#define __NR_osf_lstat 225 -#define __NR_osf_fstat 226 -#define __NR_osf_statfs64 227 -#define __NR_osf_fstatfs64 228 - -#define __NR_getpgid 233 -#define __NR_getsid 234 -#define __NR_sigaltstack 235 -#define __NR_osf_waitid 236 /* not implemented */ -#define __NR_osf_priocntlset 237 /* not implemented */ -#define __NR_osf_sigsendset 238 /* not implemented */ -#define __NR_osf_set_speculative 239 /* not implemented */ -#define __NR_osf_msfs_syscall 240 /* not implemented */ -#define __NR_osf_sysinfo 241 -#define __NR_osf_uadmin 242 /* not implemented */ -#define __NR_osf_fuser 243 /* not implemented */ -#define __NR_osf_proplist_syscall 244 -#define __NR_osf_ntp_adjtime 245 /* not implemented */ -#define __NR_osf_ntp_gettime 246 /* not implemented */ -#define __NR_osf_pathconf 247 /* not implemented */ -#define __NR_osf_fpathconf 248 /* not implemented */ - -#define __NR_osf_uswitch 250 /* not implemented */ -#define __NR_osf_usleep_thread 251 -#define __NR_osf_audcntl 252 /* not implemented */ -#define __NR_osf_audgen 253 /* not implemented */ -#define __NR_sysfs 254 -#define __NR_osf_subsys_info 255 /* not implemented */ -#define __NR_osf_getsysinfo 256 -#define __NR_osf_setsysinfo 257 -#define __NR_osf_afs_syscall 258 /* not implemented */ -#define __NR_osf_swapctl 259 /* not implemented */ -#define __NR_osf_memcntl 260 /* not implemented */ -#define __NR_osf_fdatasync 261 /* not implemented */ - -/* - * Ignore legacy syscalls that we don't use. - */ -#define __IGNORE_alarm -#define __IGNORE_creat -#define __IGNORE_getegid -#define __IGNORE_geteuid -#define __IGNORE_getgid -#define __IGNORE_getpid -#define __IGNORE_getppid -#define __IGNORE_getuid -#define __IGNORE_pause -#define __IGNORE_time -#define __IGNORE_utime -#define __IGNORE_umount2 - -/* - * Linux-specific system calls begin at 300 - */ -#define __NR_bdflush 300 -#define __NR_sethae 301 -#define __NR_mount 302 -#define __NR_old_adjtimex 303 -#define __NR_swapoff 304 -#define __NR_getdents 305 -#define __NR_create_module 306 -#define __NR_init_module 307 -#define __NR_delete_module 308 -#define __NR_get_kernel_syms 309 -#define __NR_syslog 310 -#define __NR_reboot 311 -#define __NR_clone 312 -#define __NR_uselib 313 -#define __NR_mlock 314 -#define __NR_munlock 315 -#define __NR_mlockall 316 -#define __NR_munlockall 317 -#define __NR_sysinfo 318 -#define __NR__sysctl 319 -/* 320 was sys_idle. */ -#define __NR_oldumount 321 -#define __NR_swapon 322 -#define __NR_times 323 -#define __NR_personality 324 -#define __NR_setfsuid 325 -#define __NR_setfsgid 326 -#define __NR_ustat 327 -#define __NR_statfs 328 -#define __NR_fstatfs 329 -#define __NR_sched_setparam 330 -#define __NR_sched_getparam 331 -#define __NR_sched_setscheduler 332 -#define __NR_sched_getscheduler 333 -#define __NR_sched_yield 334 -#define __NR_sched_get_priority_max 335 -#define __NR_sched_get_priority_min 336 -#define __NR_sched_rr_get_interval 337 -#define __NR_afs_syscall 338 -#define __NR_uname 339 -#define __NR_nanosleep 340 -#define __NR_mremap 341 -#define __NR_nfsservctl 342 -#define __NR_setresuid 343 -#define __NR_getresuid 344 -#define __NR_pciconfig_read 345 -#define __NR_pciconfig_write 346 -#define __NR_query_module 347 -#define __NR_prctl 348 -#define __NR_pread64 349 -#define __NR_pwrite64 350 -#define __NR_rt_sigreturn 351 -#define __NR_rt_sigaction 352 -#define __NR_rt_sigprocmask 353 -#define __NR_rt_sigpending 354 -#define __NR_rt_sigtimedwait 355 -#define __NR_rt_sigqueueinfo 356 -#define __NR_rt_sigsuspend 357 -#define __NR_select 358 -#define __NR_gettimeofday 359 -#define __NR_settimeofday 360 -#define __NR_getitimer 361 -#define __NR_setitimer 362 -#define __NR_utimes 363 -#define __NR_getrusage 364 -#define __NR_wait4 365 -#define __NR_adjtimex 366 -#define __NR_getcwd 367 -#define __NR_capget 368 -#define __NR_capset 369 -#define __NR_sendfile 370 -#define __NR_setresgid 371 -#define __NR_getresgid 372 -#define __NR_dipc 373 -#define __NR_pivot_root 374 -#define __NR_mincore 375 -#define __NR_pciconfig_iobase 376 -#define __NR_getdents64 377 -#define __NR_gettid 378 -#define __NR_readahead 379 -/* 380 is unused */ -#define __NR_tkill 381 -#define __NR_setxattr 382 -#define __NR_lsetxattr 383 -#define __NR_fsetxattr 384 -#define __NR_getxattr 385 -#define __NR_lgetxattr 386 -#define __NR_fgetxattr 387 -#define __NR_listxattr 388 -#define __NR_llistxattr 389 -#define __NR_flistxattr 390 -#define __NR_removexattr 391 -#define __NR_lremovexattr 392 -#define __NR_fremovexattr 393 -#define __NR_futex 394 -#define __NR_sched_setaffinity 395 -#define __NR_sched_getaffinity 396 -#define __NR_tuxcall 397 -#define __NR_io_setup 398 -#define __NR_io_destroy 399 -#define __NR_io_getevents 400 -#define __NR_io_submit 401 -#define __NR_io_cancel 402 -#define __NR_exit_group 405 -#define __NR_lookup_dcookie 406 -#define __NR_epoll_create 407 -#define __NR_epoll_ctl 408 -#define __NR_epoll_wait 409 -#define __NR_remap_file_pages 410 -#define __NR_set_tid_address 411 -#define __NR_restart_syscall 412 -#define __NR_fadvise64 413 -#define __NR_timer_create 414 -#define __NR_timer_settime 415 -#define __NR_timer_gettime 416 -#define __NR_timer_getoverrun 417 -#define __NR_timer_delete 418 -#define __NR_clock_settime 419 -#define __NR_clock_gettime 420 -#define __NR_clock_getres 421 -#define __NR_clock_nanosleep 422 -#define __NR_semtimedop 423 -#define __NR_tgkill 424 -#define __NR_stat64 425 -#define __NR_lstat64 426 -#define __NR_fstat64 427 -#define __NR_vserver 428 -#define __NR_mbind 429 -#define __NR_get_mempolicy 430 -#define __NR_set_mempolicy 431 -#define __NR_mq_open 432 -#define __NR_mq_unlink 433 -#define __NR_mq_timedsend 434 -#define __NR_mq_timedreceive 435 -#define __NR_mq_notify 436 -#define __NR_mq_getsetattr 437 -#define __NR_waitid 438 -#define __NR_add_key 439 -#define __NR_request_key 440 -#define __NR_keyctl 441 -#define __NR_ioprio_set 442 -#define __NR_ioprio_get 443 -#define __NR_inotify_init 444 -#define __NR_inotify_add_watch 445 -#define __NR_inotify_rm_watch 446 -#define __NR_fdatasync 447 -#define __NR_kexec_load 448 -#define __NR_migrate_pages 449 -#define __NR_openat 450 -#define __NR_mkdirat 451 -#define __NR_mknodat 452 -#define __NR_fchownat 453 -#define __NR_futimesat 454 -#define __NR_fstatat64 455 -#define __NR_unlinkat 456 -#define __NR_renameat 457 -#define __NR_linkat 458 -#define __NR_symlinkat 459 -#define __NR_readlinkat 460 -#define __NR_fchmodat 461 -#define __NR_faccessat 462 -#define __NR_pselect6 463 -#define __NR_ppoll 464 -#define __NR_unshare 465 -#define __NR_set_robust_list 466 -#define __NR_get_robust_list 467 -#define __NR_splice 468 -#define __NR_sync_file_range 469 -#define __NR_tee 470 -#define __NR_vmsplice 471 -#define __NR_move_pages 472 -#define __NR_getcpu 473 -#define __NR_epoll_pwait 474 -#define __NR_utimensat 475 -#define __NR_signalfd 476 -#define __NR_timerfd 477 -#define __NR_eventfd 478 -#define __NR_recvmmsg 479 -#define __NR_fallocate 480 -#define __NR_timerfd_create 481 -#define __NR_timerfd_settime 482 -#define __NR_timerfd_gettime 483 -#define __NR_signalfd4 484 -#define __NR_eventfd2 485 -#define __NR_epoll_create1 486 -#define __NR_dup3 487 -#define __NR_pipe2 488 -#define __NR_inotify_init1 489 -#define __NR_preadv 490 -#define __NR_pwritev 491 -#define __NR_rt_tgsigqueueinfo 492 -#define __NR_perf_event_open 493 -#define __NR_fanotify_init 494 -#define __NR_fanotify_mark 495 -#define __NR_prlimit64 496 -#define __NR_name_to_handle_at 497 -#define __NR_open_by_handle_at 498 -#define __NR_clock_adjtime 499 -#define __NR_syncfs 500 -#define __NR_setns 501 -#define __NR_accept4 502 -#define __NR_sendmmsg 503 -#define __NR_process_vm_readv 504 -#define __NR_process_vm_writev 505 -#define __NR_kcmp 506 -#define __NR_finit_module 507 -#define __NR_sched_setattr 508 -#define __NR_sched_getattr 509 -#define __NR_renameat2 510 -#define __NR_getrandom 511 -#define __NR_memfd_create 512 -#define __NR_execveat 513 -#define __NR_seccomp 514 -#define __NR_bpf 515 -#define __NR_userfaultfd 516 -#define __NR_membarrier 517 -#define __NR_mlock2 518 -#define __NR_copy_file_range 519 -#define __NR_preadv2 520 -#define __NR_pwritev2 521 -#define __NR_statx 522 - -/* Alpha doesn't have protection keys. */ -#define __IGNORE_pkey_mprotect -#define __IGNORE_pkey_alloc -#define __IGNORE_pkey_free - -#endif /* _UAPI_ALPHA_UNISTD_H */ diff --git a/libc/glibc/sysdeps/unix/sysv/linux/csky/asm/unistd.h b/libc/glibc/sysdeps/unix/sysv/linux/csky/asm/unistd.h deleted file mode 100644 index 224c9a9ab4..0000000000 --- a/libc/glibc/sysdeps/unix/sysv/linux/csky/asm/unistd.h +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -// Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. - -#define __ARCH_WANT_SYS_CLONE -#include - -#define __NR_set_thread_area (__NR_arch_specific_syscall + 0) -__SYSCALL(__NR_set_thread_area, sys_set_thread_area) -#define __NR_cacheflush (__NR_arch_specific_syscall + 1) -__SYSCALL(__NR_cacheflush, sys_cacheflush) diff --git a/libc/glibc/sysdeps/unix/sysv/linux/csky/sysdep.h b/libc/glibc/sysdeps/unix/sysv/linux/csky/sysdep.h deleted file mode 100644 index 5e37c9a4e4..0000000000 --- a/libc/glibc/sysdeps/unix/sysv/linux/csky/sysdep.h +++ /dev/null @@ -1,534 +0,0 @@ -/* Assembly macros for C-SKY. - Copyright (C) 2018-2019 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for 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 _LINUX_CSKY_SYSDEP_H -#define _LINUX_CSKY_SYSDEP_H 1 - -/* There is some commonality. */ -#include -#include -#include - -/* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */ -#include - -#include - -/* In order to get __set_errno() definition in INLINE_SYSCALL. */ -#ifndef __ASSEMBLER__ -# include -#endif - -#undef SYS_ify -#define SYS_ify(syscall_name) (__NR_##syscall_name) - -#ifdef __ASSEMBLER__ -/* Linux uses a negative return value to indicate syscall errors, - unlike most Unices, which use the condition codes' carry flag. - - Since version 2.1 the return value of a system call might be - negative even if the call succeeded. E.g., the `lseek' system call - might return a large offset. Therefore we must not anymore test - for < 0, but test for a real error by making sure the value in R0 - is a real error number. Linus said he will make sure the no syscall - returns a value in -1 .. -4095 as a valid result so we can safely - test with -4095. */ - -# undef PSEUDO -# define PSEUDO(name, syscall_name, args) \ - .text; \ - ENTRY (name); \ - DO_CALL (syscall_name, args); - -# define GETGB \ - grs t0, .Lgetpc; \ -.Lgetpc: \ - lrw gb, .Lgetpc@GOTPC; \ - addu gb, t0; - -# if IS_IN (libc) -# ifdef __PIC__ -# define PSEUDO_RET \ - btsti a0, 31; \ - bf 1f; \ - subi sp, 8; \ - st.w lr, (sp); \ - st.w gb, (sp, 4); \ - GETGB; \ - lrw a2, SYSCALL_ERROR@PLT; \ - add a2, gb; \ - ld.w a2, (a2); \ - jsr a2; \ - ld.w lr, (sp); \ - ld.w gb, (sp, 4); \ - addi sp, 8; \ -1: \ - rts -# else -# define PSEUDO_RET \ - btsti a0, 31; \ - bf 1f; \ - jmpi SYSCALL_ERROR; \ -1: \ - rts -# endif -# else -# ifdef __PIC__ -# define PSEUDO_RET \ - btsti a0, 31; \ - bf 1f; \ - subi sp, 8; \ - st.w lr, (sp); \ - st.w gb, (sp, 4); \ - GETGB; \ - bsr SYSCALL_ERROR; \ - ld.w lr, (sp); \ - ld.w gb, (sp, 4); \ - addi sp, 8; \ -1: \ - rts -# else -# define PSEUDO_RET \ - btsti a0, 31; \ - bt SYSCALL_ERROR; \ - rts -# endif -# endif - -# undef ret -# define ret PSEUDO_RET - -# undef PSEUDO_END -# define PSEUDO_END(name) \ - .align 4; \ - SYSCALL_ERROR_HANDLER; \ - END (name) - -# undef PSEUDO_NOERRNO -# define PSEUDO_NOERRNO(name, syscall_name, args) \ - .text; \ - ENTRY (name); \ - DO_CALL (syscall_name, args) - -# define PSEUDO_RET_NOERRNO rts - -# undef ret_NOERRNO -# define ret_NOERRNO PSEUDO_RET_NOERRNO - -# undef PSEUDO_END_NOERRNO -# define PSEUDO_END_NOERRNO(name) END (name) - -/* The function has to return the error code. */ -# undef PSEUDO_ERRVAL -# define PSEUDO_ERRVAL(name, syscall_name, args) \ - .text; \ - ENTRY (name) \ - DO_CALL (syscall_name, args); \ - not a0; \ - addi a0, 1 - -# undef PSEUDO_END_ERRVAL -# define PSEUDO_END_ERRVAL(name) END (name) - -# define ret_ERRVAL rts - -# if !IS_IN (libc) -# define SYSCALL_ERROR __local_syscall_error -# if RTLD_PRIVATE_ERRNO -# ifdef __PIC__ -# define SYSCALL_ERROR_HANDLER \ -__local_syscall_error: \ - lrw a1, rtld_errno@PLT; \ - addu a1, gb; \ - ldw a1, (a1); \ - rsubi a0, 0; \ - stw a0, (a1); \ - bmaski a0, 0; \ - rts -# else /* __PIC__ */ -# define SYSCALL_ERROR_HANDLER \ -__local_syscall_error: \ - lrw a1, rtld_errno; \ - rsubi a0, 0; \ - stw a0, (a1); \ - bmaski a0, 0; \ - rts -# endif /* __PIC__ */ -# else /* !RTLD_PRIVATE_ERRNO */ -# ifdef __PIC__ -# define SYSCALL_ERROR_HANDLER \ -__local_syscall_error: \ - subi sp, 8; \ - stw a0, (sp, 0); \ - stw r15, (sp, 4); \ - lrw a1, __errno_location@PLT; \ - add a1, gb; \ - ldw a1, (a1); \ - jsr a1; \ - ldw a1, (sp, 0); /* load errno*/ \ - ldw r15, (sp, 4); \ - addi sp, 8; \ - movi a2, 0; \ - rsub a1, a1, a2; \ - stw a1, (a0); \ - bmaski a0, 0; \ - rts -# else -# define SYSCALL_ERROR_HANDLER \ -__local_syscall_error: \ - subi sp, 8; \ - stw a0, (sp, 0); \ - stw r15, (sp, 4); \ - lrw a1, __errno_location; \ - jsr a1; \ - ldw a1, (sp, 0); /* load errno */ \ - ldw r15, (sp, 4); \ - addi sp, 8; \ - movi a2, 0; \ - rsub a1, a1, a2; \ - stw a1, (a0); \ - bmaski a0, 0; \ - rts -# endif /* __PIC__ */ -# endif/* RTLD_PRIVATE_ERROR */ -# else -# define SYSCALL_ERROR_HANDLER /* Nothing here; code in sysdep.S is used. */ -# define SYSCALL_ERROR __syscall_error -# endif/* IS_IN (libc) */ - -/* define DO_CALL */ -# undef DO_CALL -# define DO_CALL(syscall_name, args) \ - DOARGS_##args; \ - lrw r7, SYS_ify(syscall_name); \ - trap 0; \ - UNDOARGS_##args - -# undef DOARGS_0 -# define DOARGS_0 \ - subi sp, 8; \ - cfi_adjust_cfa_offset (8); \ - stw r7, (sp, 0); \ - cfi_rel_offset (r7, 0); - -# undef DOARGS_1 -# define DOARGS_1 DOARGS_0 -# undef DOARGS_2 -# define DOARGS_2 DOARGS_0 -# undef DOARGS_3 -# define DOARGS_3 DOARGS_0 -# undef DOARGS_4 -# define DOARGS_4 DOARGS_0 -# undef DOARGS_5 -# define DOARGS_5 \ - subi sp, 8; \ - cfi_adjust_cfa_offset (8); \ - stw r7, (sp, 0); \ - cfi_rel_offset (7, 0); \ - stw r4, (sp, 4); \ - cfi_rel_offset (4, 4); \ - ldw r4, (sp, 8) -# undef DOARGS_6 -# define DOARGS_6 \ - subi sp, 16; \ - cfi_adjust_cfa_offset (16); \ - stw r7, (sp, 0); \ - cfi_rel_offset (7, 0); \ - stw r4, (sp, 4); \ - cfi_rel_offset (4, 4); \ - stw r5, (sp, 8); \ - cfi_rel_offset (5, 8); \ - ldw r4, (sp, 16); \ - ldw r5, (sp, 20) - -# undef UNDOARGS_0 -# define UNDOARGS_0 \ - ldw r7, (sp, 0); \ - cfi_restore (r7); \ - addi sp, 8; \ - cfi_adjust_cfa_offset (-8); - -# undef UNDOARGS_1 -# define UNDOARGS_1 UNDOARGS_0 -# undef UNDOARGS_2 -# define UNDOARGS_2 UNDOARGS_0 -# undef UNDOARGS_3 -# define UNDOARGS_3 UNDOARGS_0 -# undef UNDOARGS_4 -# define UNDOARGS_4 UNDOARGS_0 -# undef UNDOARGS_5 -# define UNDOARGS_5 \ - ldw r7, (sp, 0); \ - cfi_restore (r4); \ - ldw r4, (sp, 4); \ - cfi_restore (r4); \ - addi sp, 8; \ - cfi_adjust_cfa_offset (-8); - -# undef UNDOARGS_6 -# define UNDOARGS_6 \ - ldw r7, (sp, 0); \ - cfi_restore (r7); \ - ldw r4, (sp, 4); \ - cfi_restore (r4); \ - ldw r5, (sp, 8); \ - cfi_restore (r5); \ - addi sp, 16; \ - cfi_adjust_cfa_offset (-16); - -#else /* not __ASSEMBLER__ */ - -/* Define a macro which expands into the inline wrapper code for a system - call. */ -# undef INLINE_SYSCALL -# define INLINE_SYSCALL(name, nr, args...) \ - ({ unsigned int _sys_result = INTERNAL_SYSCALL (name, , nr, args); \ - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (_sys_result,), 0)) \ - { \ - __set_errno (INTERNAL_SYSCALL_ERRNO (_sys_result, )); \ - _sys_result = (unsigned int) -1; \ - } \ - (int) _sys_result; }) - -# undef INTERNAL_SYSCALL_DECL -# define INTERNAL_SYSCALL_DECL(err) do { } while (0) - -# undef INTERNAL_SYSCALL_ERROR_P -# define INTERNAL_SYSCALL_ERROR_P(val, err) \ - ((unsigned int) (val) >= 0xffffff01u) - -# undef INTERNAL_SYSCALL_ERRNO -# define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) - -# undef INTERNAL_SYSCALL_RAW -# define INTERNAL_SYSCALL_RAW0(name, err, dummy...) \ - ({unsigned int __sys_result; \ - { \ - register int _a1 __asm__ ("a0"), _nr __asm__ ("r7"); \ - _nr = name; \ - __asm__ __volatile__ ("trap 0 \n\t" \ - : "=r" (_a1) \ - : "r" (_nr) \ - : "memory"); \ - __sys_result = _a1; \ - } \ - (int) __sys_result; }) - -# define INTERNAL_SYSCALL_RAW1(name, err, arg1) \ - ({unsigned int __sys_result; \ - register int _tmp_arg1 = (int)(arg1); \ - { \ - register int _a1 __asm__ ("a0"), _nr __asm__ ("r7"); \ - _a1 = _tmp_arg1; \ - _nr = name; \ - __asm__ __volatile__ ("trap 0 \n\t" \ - : "=r" (_a1) \ - : "r" (_nr), "r" (_a1) \ - : "memory"); \ - __sys_result = _a1; \ - } \ - (int) __sys_result; }) - -# define INTERNAL_SYSCALL_RAW2(name, err, arg1, arg2) \ - ({unsigned int __sys_result; \ - register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \ - { \ - register int _nr __asm__ ("r7"); \ - register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1"); \ - _a1 = _tmp_arg1, _a2 = _tmp_arg2; \ - _nr = name; \ - __asm__ __volatile__ ("trap 0 \n\t" \ - : "=r" (_a1) \ - : "r" (_nr), "r" (_a1), "r" (_a2) \ - : "memory"); \ - __sys_result = _a1; \ - } \ - (int) __sys_result; }) - -# define INTERNAL_SYSCALL_RAW3(name, err, arg1, arg2, arg3) \ - ({unsigned int __sys_result; \ - register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \ - register int _tmp_arg3 = (int)(arg3); \ - { \ - register int _nr __asm__ ("r7"); \ - register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1"); \ - register int _a3 __asm__ ("a2"); \ - _a1 = _tmp_arg1; \ - _a2 = _tmp_arg2; \ - _a3 = _tmp_arg3; \ - _nr = name; \ - __asm__ __volatile__ ("trap 0 \n\t" \ - : "=r" (_a1) \ - : "r" (_nr), "r" (_a1), "r" (_a2), \ - "r" (_a3) \ - : "memory"); \ - __sys_result = _a1; \ - } \ - (int) __sys_result; }) - -# define INTERNAL_SYSCALL_RAW4(name, err, arg1, arg2, arg3, arg4) \ - ({unsigned int __sys_result; \ - register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \ - register int _tmp_arg3 = (int)(arg3), _tmp_arg4 = (int)(arg4); \ - { \ - register int _nr __asm__ ("r7"); \ - register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1"); \ - register int _a3 __asm__ ("a2"), _a4 __asm__ ("a3"); \ - _a1 = _tmp_arg1, _a2 = _tmp_arg2, _a3 = _tmp_arg3; \ - _a4 = _tmp_arg4; \ - _nr = name; \ - __asm__ __volatile__ ("trap 0 \n\t" \ - : "=r" (_a1) \ - : "r" (_nr), "r" (_a1), "r" (_a2), \ - "r" (_a3), "r" (_a4) \ - : "memory"); \ - __sys_result = _a1; \ - } \ - (int) __sys_result; }) - -# define INTERNAL_SYSCALL_RAW5(name, err, arg1, arg2, arg3, arg4, \ - arg5) \ - ({unsigned int __sys_result; \ - register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \ - register int _tmp_arg3 = (int)(arg3), _tmp_arg4 = (int)(arg4); \ - register int _tmp_arg5 = (int)(arg5); \ - { \ - register int _nr __asm__ ("r7"); \ - register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1"); \ - register int _a3 __asm__ ("a2"), _a4 __asm__ ("a3"); \ - register int _a5 __asm__ ("r4"); \ - _a1 = _tmp_arg1, _a2 = _tmp_arg2, _a3 = _tmp_arg3; \ - _a4 = _tmp_arg4, _a5 = _tmp_arg5; \ - _nr = name; \ - __asm__ __volatile__ ("trap 0 \n\t" \ - : "=r" (_a1) \ - : "r" (_nr), "r" (_a1), "r" (_a2), \ - "r" (_a3), "r" (_a4), "r" (_a5) \ - : "memory"); \ - __sys_result = _a1; \ - } \ - (int) __sys_result; }) - -# define INTERNAL_SYSCALL_RAW6(name, err, arg1, arg2, arg3, arg4, \ - arg5, arg6) \ - ({unsigned int __sys_result; \ - register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \ - register int _tmp_arg3 = (int)(arg3), _tmp_arg4 = (int)(arg4); \ - register int _tmp_arg5 = (int)(arg5), _tmp_arg6 = (int)(arg6); \ - { \ - register int _nr __asm__ ("r7"); \ - register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1"); \ - register int _a3 __asm__ ("a2"), _a4 __asm__ ("a3"); \ - register int _a5 __asm__ ("r4"), _a6 __asm__ ("r5"); \ - _a1 = _tmp_arg1, _a2 = _tmp_arg2, _a3 = _tmp_arg3; \ - _a4 = _tmp_arg4, _a5 = _tmp_arg5, _a6 = _tmp_arg6; \ - _nr = name; \ - __asm__ __volatile__ ("trap 0 \n\t" \ - : "=r" (_a1) \ - : "r" (_nr), "r" (_a1), "r" (_a2), \ - "r" (_a3), "r" (_a4), "r" (_a5), \ - "r" (_a6) \ - : "memory"); \ - __sys_result = _a1; \ - } \ - (int) __sys_result; }) - -# define INTERNAL_SYSCALL_RAW7(name, err, arg1, arg2, arg3, arg4, \ - arg5, arg6, arg7) \ - ({unsigned int __sys_result; \ - register int _tmp_arg1 = (int)(arg1), _tmp_arg2 = (int)(arg2); \ - register int _tmp_arg3 = (int)(arg3), _tmp_arg4 = (int)(arg4); \ - register int _tmp_arg5 = (int)(arg5), _tmp_arg6 = (int)(arg6); \ - register int _tmp_arg7 = (int)(arg7); \ - { \ - register int _nr __asm__ ("r7"); \ - register int _a1 __asm__ ("a0"), _a2 __asm__ ("a1"); \ - register int _a3 __asm__ ("a2"), _a4 __asm__ ("a3"); \ - register int _a5 __asm__ ("r4"), _a6 __asm__ ("r5"); \ - register int _a7 __asm__ ("r6"); \ - _a1 = _tmp_arg1, _a2 = _tmp_arg2, _a3 = _tmp_arg3; \ - _a4 = _tmp_arg4, _a5 = _tmp_arg5, _a6 = _tmp_arg6; \ - _a7 = _tmp_arg7; \ - _nr = name; \ - __asm__ __volatile__ ("trap 0 \n\t" \ - : "=r" (_a1) \ - : "r" (_nr), "r" (_a1), "r" (_a2), \ - "r" (_a3), "r" (_a4), "r" (_a5), \ - "r" (_a6), "r" (_a7) \ - : "memory"); \ - __sys_result = _a1; \ - } \ - (int) __sys_result; }) - -# undef INTERNAL_SYSCALL -# define INTERNAL_SYSCALL(name, err, nr, args...) \ - INTERNAL_SYSCALL_RAW##nr(SYS_ify(name), err, args) - -# undef INTERNAL_SYSCALL_NCS -# define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ - INTERNAL_SYSCALL_RAW##nr (number, err, args) - -#endif /* __ASSEMBLER__ */ - -/* Pointer mangling support. */ -#if (IS_IN (rtld) || \ - (!defined SHARED && (IS_IN (libc) || IS_IN (libpthread)))) -# ifdef __ASSEMBLER__ -# define PTR_MANGLE(dst, src, guard) \ - grs t0, 1f; \ -1: \ - lrw guard, 1b@GOTPC; \ - addu t0, guard; \ - lrw guard, __pointer_chk_guard_local@GOT; \ - ldr.w guard, (t0, guard << 0); \ - ldw guard, (guard, 0); \ - xor dst, src, guard; -# define PTR_DEMANGLE(dst, src, guard) PTR_MANGLE (dst, src, guard) -# define PTR_MANGLE2(dst, src, guard) \ - xor dst, src, guard -# define PTR_DEMANGLE2(dst, src, guard) PTR_MANGLE2 (dst, src, guard) -# else -extern uintptr_t __pointer_chk_guard_local; -# define PTR_MANGLE(var) \ - (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local) -# define PTR_DEMANGLE(var) PTR_MANGLE (var) -# endif -#else -# ifdef __ASSEMBLER__ -# define PTR_MANGLE(dst, src, guard) \ - grs t0, 1f; \ -1: \ - lrw guard, 1b@GOTPC; \ - addu t0, guard; \ - lrw guard, __pointer_chk_guard@GOT; \ - ldr.w guard, (t0, guard << 0); \ - ldw guard, (guard, 0); \ - xor dst, src, guard; -# define PTR_DEMANGLE(dst, src, guard) PTR_MANGLE (dst, src, guard) -# define PTR_MANGLE2(dst, src, guard) \ - xor dst, src, guard -# define PTR_DEMANGLE2(dst, src, guard) PTR_MANGLE2 (dst, src, guard) -# else -extern uintptr_t __pointer_chk_guard; -# define PTR_MANGLE(var) \ - (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard) -# define PTR_DEMANGLE(var) PTR_MANGLE (var) -# endif -#endif - -#endif /* linux/csky/sysdep.h */ diff --git a/libc/glibc/sysdeps/unix/sysv/linux/ia64/asm/break.h b/libc/glibc/sysdeps/unix/sysv/linux/ia64/asm/break.h deleted file mode 100644 index 4ca110f0a9..0000000000 --- a/libc/glibc/sysdeps/unix/sysv/linux/ia64/asm/break.h +++ /dev/null @@ -1,23 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _ASM_IA64_BREAK_H -#define _ASM_IA64_BREAK_H - -/* - * IA-64 Linux break numbers. - * - * Copyright (C) 1999 Hewlett-Packard Co - * Copyright (C) 1999 David Mosberger-Tang - */ - -/* - * OS-specific debug break numbers: - */ -#define __IA64_BREAK_KDB 0x80100 -#define __IA64_BREAK_KPROBE 0x81000 /* .. 0x81fff */ - -/* - * OS-specific break numbers: - */ -#define __IA64_BREAK_SYSCALL 0x100000 - -#endif /* _ASM_IA64_BREAK_H */ diff --git a/libc/glibc/sysdeps/unix/sysv/linux/ia64/asm/unistd.h b/libc/glibc/sysdeps/unix/sysv/linux/ia64/asm/unistd.h deleted file mode 100644 index 5fe71d4a43..0000000000 --- a/libc/glibc/sysdeps/unix/sysv/linux/ia64/asm/unistd.h +++ /dev/null @@ -1,344 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * IA-64 Linux syscall numbers and inline-functions. - * - * Copyright (C) 1998-2005 Hewlett-Packard Co - * David Mosberger-Tang - */ -#ifndef _UAPI_ASM_IA64_UNISTD_H -#define _UAPI_ASM_IA64_UNISTD_H - - -#include - -#define __BREAK_SYSCALL __IA64_BREAK_SYSCALL - -#define __NR_ni_syscall 1024 -#define __NR_exit 1025 -#define __NR_read 1026 -#define __NR_write 1027 -#define __NR_open 1028 -#define __NR_close 1029 -#define __NR_creat 1030 -#define __NR_link 1031 -#define __NR_unlink 1032 -#define __NR_execve 1033 -#define __NR_chdir 1034 -#define __NR_fchdir 1035 -#define __NR_utimes 1036 -#define __NR_mknod 1037 -#define __NR_chmod 1038 -#define __NR_chown 1039 -#define __NR_lseek 1040 -#define __NR_getpid 1041 -#define __NR_getppid 1042 -#define __NR_mount 1043 -#define __NR_umount 1044 -#define __NR_setuid 1045 -#define __NR_getuid 1046 -#define __NR_geteuid 1047 -#define __NR_ptrace 1048 -#define __NR_access 1049 -#define __NR_sync 1050 -#define __NR_fsync 1051 -#define __NR_fdatasync 1052 -#define __NR_kill 1053 -#define __NR_rename 1054 -#define __NR_mkdir 1055 -#define __NR_rmdir 1056 -#define __NR_dup 1057 -#define __NR_pipe 1058 -#define __NR_times 1059 -#define __NR_brk 1060 -#define __NR_setgid 1061 -#define __NR_getgid 1062 -#define __NR_getegid 1063 -#define __NR_acct 1064 -#define __NR_ioctl 1065 -#define __NR_fcntl 1066 -#define __NR_umask 1067 -#define __NR_chroot 1068 -#define __NR_ustat 1069 -#define __NR_dup2 1070 -#define __NR_setreuid 1071 -#define __NR_setregid 1072 -#define __NR_getresuid 1073 -#define __NR_setresuid 1074 -#define __NR_getresgid 1075 -#define __NR_setresgid 1076 -#define __NR_getgroups 1077 -#define __NR_setgroups 1078 -#define __NR_getpgid 1079 -#define __NR_setpgid 1080 -#define __NR_setsid 1081 -#define __NR_getsid 1082 -#define __NR_sethostname 1083 -#define __NR_setrlimit 1084 -#define __NR_getrlimit 1085 -#define __NR_getrusage 1086 -#define __NR_gettimeofday 1087 -#define __NR_settimeofday 1088 -#define __NR_select 1089 -#define __NR_poll 1090 -#define __NR_symlink 1091 -#define __NR_readlink 1092 -#define __NR_uselib 1093 -#define __NR_swapon 1094 -#define __NR_swapoff 1095 -#define __NR_reboot 1096 -#define __NR_truncate 1097 -#define __NR_ftruncate 1098 -#define __NR_fchmod 1099 -#define __NR_fchown 1100 -#define __NR_getpriority 1101 -#define __NR_setpriority 1102 -#define __NR_statfs 1103 -#define __NR_fstatfs 1104 -#define __NR_gettid 1105 -#define __NR_semget 1106 -#define __NR_semop 1107 -#define __NR_semctl 1108 -#define __NR_msgget 1109 -#define __NR_msgsnd 1110 -#define __NR_msgrcv 1111 -#define __NR_msgctl 1112 -#define __NR_shmget 1113 -#define __NR_shmat 1114 -#define __NR_shmdt 1115 -#define __NR_shmctl 1116 -/* also known as klogctl() in GNU libc: */ -#define __NR_syslog 1117 -#define __NR_setitimer 1118 -#define __NR_getitimer 1119 -/* 1120 was __NR_old_stat */ -/* 1121 was __NR_old_lstat */ -/* 1122 was __NR_old_fstat */ -#define __NR_vhangup 1123 -#define __NR_lchown 1124 -#define __NR_remap_file_pages 1125 -#define __NR_wait4 1126 -#define __NR_sysinfo 1127 -#define __NR_clone 1128 -#define __NR_setdomainname 1129 -#define __NR_uname 1130 -#define __NR_adjtimex 1131 -/* 1132 was __NR_create_module */ -#define __NR_init_module 1133 -#define __NR_delete_module 1134 -/* 1135 was __NR_get_kernel_syms */ -/* 1136 was __NR_query_module */ -#define __NR_quotactl 1137 -#define __NR_bdflush 1138 -#define __NR_sysfs 1139 -#define __NR_personality 1140 -#define __NR_afs_syscall 1141 -#define __NR_setfsuid 1142 -#define __NR_setfsgid 1143 -#define __NR_getdents 1144 -#define __NR_flock 1145 -#define __NR_readv 1146 -#define __NR_writev 1147 -#define __NR_pread64 1148 -#define __NR_pwrite64 1149 -#define __NR__sysctl 1150 -#define __NR_mmap 1151 -#define __NR_munmap 1152 -#define __NR_mlock 1153 -#define __NR_mlockall 1154 -#define __NR_mprotect 1155 -#define __NR_mremap 1156 -#define __NR_msync 1157 -#define __NR_munlock 1158 -#define __NR_munlockall 1159 -#define __NR_sched_getparam 1160 -#define __NR_sched_setparam 1161 -#define __NR_sched_getscheduler 1162 -#define __NR_sched_setscheduler 1163 -#define __NR_sched_yield 1164 -#define __NR_sched_get_priority_max 1165 -#define __NR_sched_get_priority_min 1166 -#define __NR_sched_rr_get_interval 1167 -#define __NR_nanosleep 1168 -#define __NR_nfsservctl 1169 -#define __NR_prctl 1170 -/* 1171 is reserved for backwards compatibility with old __NR_getpagesize */ -#define __NR_mmap2 1172 -#define __NR_pciconfig_read 1173 -#define __NR_pciconfig_write 1174 -#define __NR_perfmonctl 1175 -#define __NR_sigaltstack 1176 -#define __NR_rt_sigaction 1177 -#define __NR_rt_sigpending 1178 -#define __NR_rt_sigprocmask 1179 -#define __NR_rt_sigqueueinfo 1180 -#define __NR_rt_sigreturn 1181 -#define __NR_rt_sigsuspend 1182 -#define __NR_rt_sigtimedwait 1183 -#define __NR_getcwd 1184 -#define __NR_capget 1185 -#define __NR_capset 1186 -#define __NR_sendfile 1187 -#define __NR_getpmsg 1188 -#define __NR_putpmsg 1189 -#define __NR_socket 1190 -#define __NR_bind 1191 -#define __NR_connect 1192 -#define __NR_listen 1193 -#define __NR_accept 1194 -#define __NR_getsockname 1195 -#define __NR_getpeername 1196 -#define __NR_socketpair 1197 -#define __NR_send 1198 -#define __NR_sendto 1199 -#define __NR_recv 1200 -#define __NR_recvfrom 1201 -#define __NR_shutdown 1202 -#define __NR_setsockopt 1203 -#define __NR_getsockopt 1204 -#define __NR_sendmsg 1205 -#define __NR_recvmsg 1206 -#define __NR_pivot_root 1207 -#define __NR_mincore 1208 -#define __NR_madvise 1209 -#define __NR_stat 1210 -#define __NR_lstat 1211 -#define __NR_fstat 1212 -#define __NR_clone2 1213 -#define __NR_getdents64 1214 -#define __NR_getunwind 1215 -#define __NR_readahead 1216 -#define __NR_setxattr 1217 -#define __NR_lsetxattr 1218 -#define __NR_fsetxattr 1219 -#define __NR_getxattr 1220 -#define __NR_lgetxattr 1221 -#define __NR_fgetxattr 1222 -#define __NR_listxattr 1223 -#define __NR_llistxattr 1224 -#define __NR_flistxattr 1225 -#define __NR_removexattr 1226 -#define __NR_lremovexattr 1227 -#define __NR_fremovexattr 1228 -#define __NR_tkill 1229 -#define __NR_futex 1230 -#define __NR_sched_setaffinity 1231 -#define __NR_sched_getaffinity 1232 -#define __NR_set_tid_address 1233 -#define __NR_fadvise64 1234 -#define __NR_tgkill 1235 -#define __NR_exit_group 1236 -#define __NR_lookup_dcookie 1237 -#define __NR_io_setup 1238 -#define __NR_io_destroy 1239 -#define __NR_io_getevents 1240 -#define __NR_io_submit 1241 -#define __NR_io_cancel 1242 -#define __NR_epoll_create 1243 -#define __NR_epoll_ctl 1244 -#define __NR_epoll_wait 1245 -#define __NR_restart_syscall 1246 -#define __NR_semtimedop 1247 -#define __NR_timer_create 1248 -#define __NR_timer_settime 1249 -#define __NR_timer_gettime 1250 -#define __NR_timer_getoverrun 1251 -#define __NR_timer_delete 1252 -#define __NR_clock_settime 1253 -#define __NR_clock_gettime 1254 -#define __NR_clock_getres 1255 -#define __NR_clock_nanosleep 1256 -#define __NR_fstatfs64 1257 -#define __NR_statfs64 1258 -#define __NR_mbind 1259 -#define __NR_get_mempolicy 1260 -#define __NR_set_mempolicy 1261 -#define __NR_mq_open 1262 -#define __NR_mq_unlink 1263 -#define __NR_mq_timedsend 1264 -#define __NR_mq_timedreceive 1265 -#define __NR_mq_notify 1266 -#define __NR_mq_getsetattr 1267 -#define __NR_kexec_load 1268 -#define __NR_vserver 1269 -#define __NR_waitid 1270 -#define __NR_add_key 1271 -#define __NR_request_key 1272 -#define __NR_keyctl 1273 -#define __NR_ioprio_set 1274 -#define __NR_ioprio_get 1275 -#define __NR_move_pages 1276 -#define __NR_inotify_init 1277 -#define __NR_inotify_add_watch 1278 -#define __NR_inotify_rm_watch 1279 -#define __NR_migrate_pages 1280 -#define __NR_openat 1281 -#define __NR_mkdirat 1282 -#define __NR_mknodat 1283 -#define __NR_fchownat 1284 -#define __NR_futimesat 1285 -#define __NR_newfstatat 1286 -#define __NR_unlinkat 1287 -#define __NR_renameat 1288 -#define __NR_linkat 1289 -#define __NR_symlinkat 1290 -#define __NR_readlinkat 1291 -#define __NR_fchmodat 1292 -#define __NR_faccessat 1293 -#define __NR_pselect6 1294 -#define __NR_ppoll 1295 -#define __NR_unshare 1296 -#define __NR_splice 1297 -#define __NR_set_robust_list 1298 -#define __NR_get_robust_list 1299 -#define __NR_sync_file_range 1300 -#define __NR_tee 1301 -#define __NR_vmsplice 1302 -#define __NR_fallocate 1303 -#define __NR_getcpu 1304 -#define __NR_epoll_pwait 1305 -#define __NR_utimensat 1306 -#define __NR_signalfd 1307 -#define __NR_timerfd 1308 -#define __NR_eventfd 1309 -#define __NR_timerfd_create 1310 -#define __NR_timerfd_settime 1311 -#define __NR_timerfd_gettime 1312 -#define __NR_signalfd4 1313 -#define __NR_eventfd2 1314 -#define __NR_epoll_create1 1315 -#define __NR_dup3 1316 -#define __NR_pipe2 1317 -#define __NR_inotify_init1 1318 -#define __NR_preadv 1319 -#define __NR_pwritev 1320 -#define __NR_rt_tgsigqueueinfo 1321 -#define __NR_recvmmsg 1322 -#define __NR_fanotify_init 1323 -#define __NR_fanotify_mark 1324 -#define __NR_prlimit64 1325 -#define __NR_name_to_handle_at 1326 -#define __NR_open_by_handle_at 1327 -#define __NR_clock_adjtime 1328 -#define __NR_syncfs 1329 -#define __NR_setns 1330 -#define __NR_sendmmsg 1331 -#define __NR_process_vm_readv 1332 -#define __NR_process_vm_writev 1333 -#define __NR_accept4 1334 -#define __NR_finit_module 1335 -#define __NR_sched_setattr 1336 -#define __NR_sched_getattr 1337 -#define __NR_renameat2 1338 -#define __NR_getrandom 1339 -#define __NR_memfd_create 1340 -#define __NR_bpf 1341 -#define __NR_execveat 1342 -#define __NR_userfaultfd 1343 -#define __NR_membarrier 1344 -#define __NR_kcmp 1345 -#define __NR_mlock2 1346 -#define __NR_copy_file_range 1347 -#define __NR_preadv2 1348 -#define __NR_pwritev2 1349 - -#endif /* _UAPI_ASM_IA64_UNISTD_H */ diff --git a/libc/glibc/sysdeps/unix/sysv/linux/m68k/asm/unistd.h b/libc/glibc/sysdeps/unix/sysv/linux/m68k/asm/unistd.h deleted file mode 100644 index de3054f8a6..0000000000 --- a/libc/glibc/sysdeps/unix/sysv/linux/m68k/asm/unistd.h +++ /dev/null @@ -1,390 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef _UAPI_ASM_M68K_UNISTD_H_ -#define _UAPI_ASM_M68K_UNISTD_H_ - -/* - * This file contains the system call numbers. - */ - -#define __NR_restart_syscall 0 -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_waitpid 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_time 13 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_chown 16 -/*#define __NR_break 17*/ -#define __NR_oldstat 18 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_stime 25 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_oldfstat 28 -#define __NR_pause 29 -#define __NR_utime 30 -/*#define __NR_stty 31*/ -/*#define __NR_gtty 32*/ -#define __NR_access 33 -#define __NR_nice 34 -/*#define __NR_ftime 35*/ -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -/*#define __NR_prof 44*/ -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_signal 48 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_umount2 52 -/*#define __NR_lock 53*/ -#define __NR_ioctl 54 -#define __NR_fcntl 55 -/*#define __NR_mpx 56*/ -#define __NR_setpgid 57 -/*#define __NR_ulimit 58*/ -/*#define __NR_oldolduname 59*/ -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sgetmask 68 -#define __NR_ssetmask 69 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrlimit 76 -#define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_select 82 -#define __NR_symlink 83 -#define __NR_oldlstat 84 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -/*#define __NR_profil 98*/ -#define __NR_statfs 99 -#define __NR_fstatfs 100 -/*#define __NR_ioperm 101*/ -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -/*#define __NR_olduname 109*/ -/*#define __NR_iopl 110*/ /* not supported */ -#define __NR_vhangup 111 -/*#define __NR_idle 112*/ /* Obsolete */ -/*#define __NR_vm86 113*/ /* not supported */ -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_cacheflush 123 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -/*#define __NR_afs_syscall 137*/ /* Syscall for Andrew File System */ -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_getpagesize 166 -#define __NR_query_module 167 -#define __NR_poll 168 -#define __NR_nfsservctl 169 -#define __NR_setresgid 170 -#define __NR_getresgid 171 -#define __NR_prctl 172 -#define __NR_rt_sigreturn 173 -#define __NR_rt_sigaction 174 -#define __NR_rt_sigprocmask 175 -#define __NR_rt_sigpending 176 -#define __NR_rt_sigtimedwait 177 -#define __NR_rt_sigqueueinfo 178 -#define __NR_rt_sigsuspend 179 -#define __NR_pread64 180 -#define __NR_pwrite64 181 -#define __NR_lchown 182 -#define __NR_getcwd 183 -#define __NR_capget 184 -#define __NR_capset 185 -#define __NR_sigaltstack 186 -#define __NR_sendfile 187 -#define __NR_getpmsg 188 /* some people actually want streams */ -#define __NR_putpmsg 189 /* some people actually want streams */ -#define __NR_vfork 190 -#define __NR_ugetrlimit 191 -#define __NR_mmap2 192 -#define __NR_truncate64 193 -#define __NR_ftruncate64 194 -#define __NR_stat64 195 -#define __NR_lstat64 196 -#define __NR_fstat64 197 -#define __NR_chown32 198 -#define __NR_getuid32 199 -#define __NR_getgid32 200 -#define __NR_geteuid32 201 -#define __NR_getegid32 202 -#define __NR_setreuid32 203 -#define __NR_setregid32 204 -#define __NR_getgroups32 205 -#define __NR_setgroups32 206 -#define __NR_fchown32 207 -#define __NR_setresuid32 208 -#define __NR_getresuid32 209 -#define __NR_setresgid32 210 -#define __NR_getresgid32 211 -#define __NR_lchown32 212 -#define __NR_setuid32 213 -#define __NR_setgid32 214 -#define __NR_setfsuid32 215 -#define __NR_setfsgid32 216 -#define __NR_pivot_root 217 -/* 218*/ -/* 219*/ -#define __NR_getdents64 220 -#define __NR_gettid 221 -#define __NR_tkill 222 -#define __NR_setxattr 223 -#define __NR_lsetxattr 224 -#define __NR_fsetxattr 225 -#define __NR_getxattr 226 -#define __NR_lgetxattr 227 -#define __NR_fgetxattr 228 -#define __NR_listxattr 229 -#define __NR_llistxattr 230 -#define __NR_flistxattr 231 -#define __NR_removexattr 232 -#define __NR_lremovexattr 233 -#define __NR_fremovexattr 234 -#define __NR_futex 235 -#define __NR_sendfile64 236 -#define __NR_mincore 237 -#define __NR_madvise 238 -#define __NR_fcntl64 239 -#define __NR_readahead 240 -#define __NR_io_setup 241 -#define __NR_io_destroy 242 -#define __NR_io_getevents 243 -#define __NR_io_submit 244 -#define __NR_io_cancel 245 -#define __NR_fadvise64 246 -#define __NR_exit_group 247 -#define __NR_lookup_dcookie 248 -#define __NR_epoll_create 249 -#define __NR_epoll_ctl 250 -#define __NR_epoll_wait 251 -#define __NR_remap_file_pages 252 -#define __NR_set_tid_address 253 -#define __NR_timer_create 254 -#define __NR_timer_settime 255 -#define __NR_timer_gettime 256 -#define __NR_timer_getoverrun 257 -#define __NR_timer_delete 258 -#define __NR_clock_settime 259 -#define __NR_clock_gettime 260 -#define __NR_clock_getres 261 -#define __NR_clock_nanosleep 262 -#define __NR_statfs64 263 -#define __NR_fstatfs64 264 -#define __NR_tgkill 265 -#define __NR_utimes 266 -#define __NR_fadvise64_64 267 -#define __NR_mbind 268 -#define __NR_get_mempolicy 269 -#define __NR_set_mempolicy 270 -#define __NR_mq_open 271 -#define __NR_mq_unlink 272 -#define __NR_mq_timedsend 273 -#define __NR_mq_timedreceive 274 -#define __NR_mq_notify 275 -#define __NR_mq_getsetattr 276 -#define __NR_waitid 277 -/*#define __NR_vserver 278*/ -#define __NR_add_key 279 -#define __NR_request_key 280 -#define __NR_keyctl 281 -#define __NR_ioprio_set 282 -#define __NR_ioprio_get 283 -#define __NR_inotify_init 284 -#define __NR_inotify_add_watch 285 -#define __NR_inotify_rm_watch 286 -#define __NR_migrate_pages 287 -#define __NR_openat 288 -#define __NR_mkdirat 289 -#define __NR_mknodat 290 -#define __NR_fchownat 291 -#define __NR_futimesat 292 -#define __NR_fstatat64 293 -#define __NR_unlinkat 294 -#define __NR_renameat 295 -#define __NR_linkat 296 -#define __NR_symlinkat 297 -#define __NR_readlinkat 298 -#define __NR_fchmodat 299 -#define __NR_faccessat 300 -#define __NR_pselect6 301 -#define __NR_ppoll 302 -#define __NR_unshare 303 -#define __NR_set_robust_list 304 -#define __NR_get_robust_list 305 -#define __NR_splice 306 -#define __NR_sync_file_range 307 -#define __NR_tee 308 -#define __NR_vmsplice 309 -#define __NR_move_pages 310 -#define __NR_sched_setaffinity 311 -#define __NR_sched_getaffinity 312 -#define __NR_kexec_load 313 -#define __NR_getcpu 314 -#define __NR_epoll_pwait 315 -#define __NR_utimensat 316 -#define __NR_signalfd 317 -#define __NR_timerfd_create 318 -#define __NR_eventfd 319 -#define __NR_fallocate 320 -#define __NR_timerfd_settime 321 -#define __NR_timerfd_gettime 322 -#define __NR_signalfd4 323 -#define __NR_eventfd2 324 -#define __NR_epoll_create1 325 -#define __NR_dup3 326 -#define __NR_pipe2 327 -#define __NR_inotify_init1 328 -#define __NR_preadv 329 -#define __NR_pwritev 330 -#define __NR_rt_tgsigqueueinfo 331 -#define __NR_perf_event_open 332 -#define __NR_get_thread_area 333 -#define __NR_set_thread_area 334 -#define __NR_atomic_cmpxchg_32 335 -#define __NR_atomic_barrier 336 -#define __NR_fanotify_init 337 -#define __NR_fanotify_mark 338 -#define __NR_prlimit64 339 -#define __NR_name_to_handle_at 340 -#define __NR_open_by_handle_at 341 -#define __NR_clock_adjtime 342 -#define __NR_syncfs 343 -#define __NR_setns 344 -#define __NR_process_vm_readv 345 -#define __NR_process_vm_writev 346 -#define __NR_kcmp 347 -#define __NR_finit_module 348 -#define __NR_sched_setattr 349 -#define __NR_sched_getattr 350 -#define __NR_renameat2 351 -#define __NR_getrandom 352 -#define __NR_memfd_create 353 -#define __NR_bpf 354 -#define __NR_execveat 355 -#define __NR_socket 356 -#define __NR_socketpair 357 -#define __NR_bind 358 -#define __NR_connect 359 -#define __NR_listen 360 -#define __NR_accept4 361 -#define __NR_getsockopt 362 -#define __NR_setsockopt 363 -#define __NR_getsockname 364 -#define __NR_getpeername 365 -#define __NR_sendto 366 -#define __NR_sendmsg 367 -#define __NR_recvfrom 368 -#define __NR_recvmsg 369 -#define __NR_shutdown 370 -#define __NR_recvmmsg 371 -#define __NR_sendmmsg 372 -#define __NR_userfaultfd 373 -#define __NR_membarrier 374 -#define __NR_mlock2 375 -#define __NR_copy_file_range 376 -#define __NR_preadv2 377 -#define __NR_pwritev2 378 -#define __NR_statx 379 - -#endif /* _UAPI_ASM_M68K_UNISTD_H_ */ diff --git a/libc/glibc/sysdeps/unix/sysv/linux/microblaze/asm/unistd.h b/libc/glibc/sysdeps/unix/sysv/linux/microblaze/asm/unistd.h deleted file mode 100644 index 7a9f16a764..0000000000 --- a/libc/glibc/sysdeps/unix/sysv/linux/microblaze/asm/unistd.h +++ /dev/null @@ -1,421 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * Copyright (C) 2007-2008 Michal Simek - * Copyright (C) 2006 Atmark Techno, Inc. - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file "COPYING" in the main directory of this archive - * for more details. - */ - -#ifndef _UAPI_ASM_MICROBLAZE_UNISTD_H -#define _UAPI_ASM_MICROBLAZE_UNISTD_H - -#define __NR_restart_syscall 0 /* ok */ -#define __NR_exit 1 /* ok */ -#define __NR_fork 2 /* not for no MMU - weird */ -#define __NR_read 3 /* ok */ -#define __NR_write 4 /* ok */ -#define __NR_open 5 /* openat */ -#define __NR_close 6 /* ok */ -#define __NR_waitpid 7 /* waitid */ -#define __NR_creat 8 /* openat */ -#define __NR_link 9 /* linkat */ -#define __NR_unlink 10 /* unlinkat */ -#define __NR_execve 11 /* ok */ -#define __NR_chdir 12 /* ok */ -#define __NR_time 13 /* obsolete -> sys_gettimeofday */ -#define __NR_mknod 14 /* mknodat */ -#define __NR_chmod 15 /* fchmodat */ -#define __NR_lchown 16 /* ok */ -#define __NR_break 17 /* don't know */ -#define __NR_oldstat 18 /* remove */ -#define __NR_lseek 19 /* ok */ -#define __NR_getpid 20 /* ok */ -#define __NR_mount 21 /* ok */ -#define __NR_umount 22 /* ok */ /* use only umount2 */ -#define __NR_setuid 23 /* ok */ -#define __NR_getuid 24 /* ok */ -#define __NR_stime 25 /* obsolete -> sys_settimeofday */ -#define __NR_ptrace 26 /* ok */ -#define __NR_alarm 27 /* obsolete -> sys_setitimer */ -#define __NR_oldfstat 28 /* remove */ -#define __NR_pause 29 /* obsolete -> sys_rt_sigtimedwait */ -#define __NR_utime 30 /* obsolete -> sys_utimesat */ -#define __NR_stty 31 /* remove */ -#define __NR_gtty 32 /* remove */ -#define __NR_access 33 /* faccessat */ -/* can be implemented by sys_setpriority */ -#define __NR_nice 34 -#define __NR_ftime 35 /* remove */ -#define __NR_sync 36 /* ok */ -#define __NR_kill 37 /* ok */ -#define __NR_rename 38 /* renameat */ -#define __NR_mkdir 39 /* mkdirat */ -#define __NR_rmdir 40 /* unlinkat */ -#define __NR_dup 41 /* ok */ -#define __NR_pipe 42 /* ok */ -#define __NR_times 43 /* ok */ -#define __NR_prof 44 /* remove */ -#define __NR_brk 45 /* ok -mmu, nommu specific */ -#define __NR_setgid 46 /* ok */ -#define __NR_getgid 47 /* ok */ -#define __NR_signal 48 /* obsolete -> sys_rt_sigaction */ -#define __NR_geteuid 49 /* ok */ -#define __NR_getegid 50 /* ok */ -#define __NR_acct 51 /* add it and then I can disable it */ -#define __NR_umount2 52 /* remove */ -#define __NR_lock 53 /* remove */ -#define __NR_ioctl 54 /* ok */ -#define __NR_fcntl 55 /* ok -> 64bit version*/ -#define __NR_mpx 56 /* remove */ -#define __NR_setpgid 57 /* ok */ -#define __NR_ulimit 58 /* remove */ -#define __NR_oldolduname 59 /* remove */ -#define __NR_umask 60 /* ok */ -#define __NR_chroot 61 /* ok */ -#define __NR_ustat 62 /* obsolete -> statfs64 */ -#define __NR_dup2 63 /* ok */ -#define __NR_getppid 64 /* ok */ -#define __NR_getpgrp 65 /* obsolete -> sys_getpgid */ -#define __NR_setsid 66 /* ok */ -#define __NR_sigaction 67 /* obsolete -> rt_sigaction */ -#define __NR_sgetmask 68 /* obsolete -> sys_rt_sigprocmask */ -#define __NR_ssetmask 69 /* obsolete ->sys_rt_sigprocmask */ -#define __NR_setreuid 70 /* ok */ -#define __NR_setregid 71 /* ok */ -#define __NR_sigsuspend 72 /* obsolete -> rt_sigsuspend */ -#define __NR_sigpending 73 /* obsolete -> sys_rt_sigpending */ -#define __NR_sethostname 74 /* ok */ -#define __NR_setrlimit 75 /* ok */ -#define __NR_getrlimit 76 /* ok Back compatible 2G limited rlimit */ -#define __NR_getrusage 77 /* ok */ -#define __NR_gettimeofday 78 /* ok */ -#define __NR_settimeofday 79 /* ok */ -#define __NR_getgroups 80 /* ok */ -#define __NR_setgroups 81 /* ok */ -#define __NR_select 82 /* obsolete -> sys_pselect6 */ -#define __NR_symlink 83 /* symlinkat */ -#define __NR_oldlstat 84 /* remove */ -#define __NR_readlink 85 /* obsolete -> sys_readlinkat */ -#define __NR_uselib 86 /* remove */ -#define __NR_swapon 87 /* ok */ -#define __NR_reboot 88 /* ok */ -#define __NR_readdir 89 /* remove ? */ -#define __NR_mmap 90 /* obsolete -> sys_mmap2 */ -#define __NR_munmap 91 /* ok - mmu and nommu */ -#define __NR_truncate 92 /* ok or truncate64 */ -#define __NR_ftruncate 93 /* ok or ftruncate64 */ -#define __NR_fchmod 94 /* ok */ -#define __NR_fchown 95 /* ok */ -#define __NR_getpriority 96 /* ok */ -#define __NR_setpriority 97 /* ok */ -#define __NR_profil 98 /* remove */ -#define __NR_statfs 99 /* ok or statfs64 */ -#define __NR_fstatfs 100 /* ok or fstatfs64 */ -#define __NR_ioperm 101 /* remove */ -#define __NR_socketcall 102 /* remove */ -#define __NR_syslog 103 /* ok */ -#define __NR_setitimer 104 /* ok */ -#define __NR_getitimer 105 /* ok */ -#define __NR_stat 106 /* remove */ -#define __NR_lstat 107 /* remove */ -#define __NR_fstat 108 /* remove */ -#define __NR_olduname 109 /* remove */ -#define __NR_iopl 110 /* remove */ -#define __NR_vhangup 111 /* ok */ -#define __NR_idle 112 /* remove */ -#define __NR_vm86old 113 /* remove */ -#define __NR_wait4 114 /* obsolete -> waitid */ -#define __NR_swapoff 115 /* ok */ -#define __NR_sysinfo 116 /* ok */ -#define __NR_ipc 117 /* remove - direct call */ -#define __NR_fsync 118 /* ok */ -#define __NR_sigreturn 119 /* obsolete -> sys_rt_sigreturn */ -#define __NR_clone 120 /* ok */ -#define __NR_setdomainname 121 /* ok */ -#define __NR_uname 122 /* remove */ -#define __NR_modify_ldt 123 /* remove */ -#define __NR_adjtimex 124 /* ok */ -#define __NR_mprotect 125 /* remove */ -#define __NR_sigprocmask 126 /* obsolete -> sys_rt_sigprocmask */ -#define __NR_create_module 127 /* remove */ -#define __NR_init_module 128 /* ok */ -#define __NR_delete_module 129 /* ok */ -#define __NR_get_kernel_syms 130 /* remove */ -#define __NR_quotactl 131 /* ok */ -#define __NR_getpgid 132 /* ok */ -#define __NR_fchdir 133 /* ok */ -#define __NR_bdflush 134 /* remove */ -#define __NR_sysfs 135 /* needed for busybox */ -#define __NR_personality 136 /* ok */ -#define __NR_afs_syscall 137 /* Syscall for Andrew File System */ -#define __NR_setfsuid 138 /* ok */ -#define __NR_setfsgid 139 /* ok */ -#define __NR__llseek 140 /* remove only lseek */ -#define __NR_getdents 141 /* ok or getdents64 */ -#define __NR__newselect 142 /* remove */ -#define __NR_flock 143 /* ok */ -#define __NR_msync 144 /* remove */ -#define __NR_readv 145 /* ok */ -#define __NR_writev 146 /* ok */ -#define __NR_getsid 147 /* ok */ -#define __NR_fdatasync 148 /* ok */ -#define __NR__sysctl 149 /* remove */ -#define __NR_mlock 150 /* ok - nommu or mmu */ -#define __NR_munlock 151 /* ok - nommu or mmu */ -#define __NR_mlockall 152 /* ok - nommu or mmu */ -#define __NR_munlockall 153 /* ok - nommu or mmu */ -#define __NR_sched_setparam 154 /* ok */ -#define __NR_sched_getparam 155 /* ok */ -#define __NR_sched_setscheduler 156 /* ok */ -#define __NR_sched_getscheduler 157 /* ok */ -#define __NR_sched_yield 158 /* ok */ -#define __NR_sched_get_priority_max 159 /* ok */ -#define __NR_sched_get_priority_min 160 /* ok */ -#define __NR_sched_rr_get_interval 161 /* ok */ -#define __NR_nanosleep 162 /* ok */ -#define __NR_mremap 163 /* ok - nommu or mmu */ -#define __NR_setresuid 164 /* ok */ -#define __NR_getresuid 165 /* ok */ -#define __NR_vm86 166 /* remove */ -#define __NR_query_module 167 /* ok */ -#define __NR_poll 168 /* obsolete -> sys_ppoll */ -#define __NR_nfsservctl 169 /* ok */ -#define __NR_setresgid 170 /* ok */ -#define __NR_getresgid 171 /* ok */ -#define __NR_prctl 172 /* ok */ -#define __NR_rt_sigreturn 173 /* ok */ -#define __NR_rt_sigaction 174 /* ok */ -#define __NR_rt_sigprocmask 175 /* ok */ -#define __NR_rt_sigpending 176 /* ok */ -#define __NR_rt_sigtimedwait 177 /* ok */ -#define __NR_rt_sigqueueinfo 178 /* ok */ -#define __NR_rt_sigsuspend 179 /* ok */ -#define __NR_pread64 180 /* ok */ -#define __NR_pwrite64 181 /* ok */ -#define __NR_chown 182 /* obsolete -> fchownat */ -#define __NR_getcwd 183 /* ok */ -#define __NR_capget 184 /* ok */ -#define __NR_capset 185 /* ok */ -#define __NR_sigaltstack 186 /* remove */ -#define __NR_sendfile 187 /* ok -> exist 64bit version*/ -#define __NR_getpmsg 188 /* remove */ -/* remove - some people actually want streams */ -#define __NR_putpmsg 189 -/* for noMMU - group with clone -> maybe remove */ -#define __NR_vfork 190 -#define __NR_ugetrlimit 191 /* remove - SuS compliant getrlimit */ -#define __NR_mmap2 192 /* ok */ -#define __NR_truncate64 193 /* ok */ -#define __NR_ftruncate64 194 /* ok */ -#define __NR_stat64 195 /* remove _ARCH_WANT_STAT64 */ -#define __NR_lstat64 196 /* remove _ARCH_WANT_STAT64 */ -#define __NR_fstat64 197 /* remove _ARCH_WANT_STAT64 */ -#define __NR_lchown32 198 /* ok - without 32 */ -#define __NR_getuid32 199 /* ok - without 32 */ -#define __NR_getgid32 200 /* ok - without 32 */ -#define __NR_geteuid32 201 /* ok - without 32 */ -#define __NR_getegid32 202 /* ok - without 32 */ -#define __NR_setreuid32 203 /* ok - without 32 */ -#define __NR_setregid32 204 /* ok - without 32 */ -#define __NR_getgroups32 205 /* ok - without 32 */ -#define __NR_setgroups32 206 /* ok - without 32 */ -#define __NR_fchown32 207 /* ok - without 32 */ -#define __NR_setresuid32 208 /* ok - without 32 */ -#define __NR_getresuid32 209 /* ok - without 32 */ -#define __NR_setresgid32 210 /* ok - without 32 */ -#define __NR_getresgid32 211 /* ok - without 32 */ -#define __NR_chown32 212 /* ok - without 32 -obsolete -> fchownat */ -#define __NR_setuid32 213 /* ok - without 32 */ -#define __NR_setgid32 214 /* ok - without 32 */ -#define __NR_setfsuid32 215 /* ok - without 32 */ -#define __NR_setfsgid32 216 /* ok - without 32 */ -#define __NR_pivot_root 217 /* ok */ -#define __NR_mincore 218 /* ok */ -#define __NR_madvise 219 /* ok */ -#define __NR_getdents64 220 /* ok */ -#define __NR_fcntl64 221 /* ok */ -/* 223 is unused */ -#define __NR_gettid 224 /* ok */ -#define __NR_readahead 225 /* ok */ -#define __NR_setxattr 226 /* ok */ -#define __NR_lsetxattr 227 /* ok */ -#define __NR_fsetxattr 228 /* ok */ -#define __NR_getxattr 229 /* ok */ -#define __NR_lgetxattr 230 /* ok */ -#define __NR_fgetxattr 231 /* ok */ -#define __NR_listxattr 232 /* ok */ -#define __NR_llistxattr 233 /* ok */ -#define __NR_flistxattr 234 /* ok */ -#define __NR_removexattr 235 /* ok */ -#define __NR_lremovexattr 236 /* ok */ -#define __NR_fremovexattr 237 /* ok */ -#define __NR_tkill 238 /* ok */ -#define __NR_sendfile64 239 /* ok */ -#define __NR_futex 240 /* ok */ -#define __NR_sched_setaffinity 241 /* ok */ -#define __NR_sched_getaffinity 242 /* ok */ -#define __NR_set_thread_area 243 /* remove */ -#define __NR_get_thread_area 244 /* remove */ -#define __NR_io_setup 245 /* ok */ -#define __NR_io_destroy 246 /* ok */ -#define __NR_io_getevents 247 /* ok */ -#define __NR_io_submit 248 /* ok */ -#define __NR_io_cancel 249 /* ok */ -#define __NR_fadvise64 250 /* remove -> sys_fadvise64_64 */ -/* 251 is available for reuse (was briefly sys_set_zone_reclaim) */ -#define __NR_exit_group 252 /* ok */ -#define __NR_lookup_dcookie 253 /* ok */ -#define __NR_epoll_create 254 /* ok */ -#define __NR_epoll_ctl 255 /* ok */ -#define __NR_epoll_wait 256 /* obsolete -> sys_epoll_pwait */ -#define __NR_remap_file_pages 257 /* only for mmu */ -#define __NR_set_tid_address 258 /* ok */ -#define __NR_timer_create 259 /* ok */ -#define __NR_timer_settime (__NR_timer_create+1) /* 260 */ /* ok */ -#define __NR_timer_gettime (__NR_timer_create+2) /* 261 */ /* ok */ -#define __NR_timer_getoverrun (__NR_timer_create+3) /* 262 */ /* ok */ -#define __NR_timer_delete (__NR_timer_create+4) /* 263 */ /* ok */ -#define __NR_clock_settime (__NR_timer_create+5) /* 264 */ /* ok */ -#define __NR_clock_gettime (__NR_timer_create+6) /* 265 */ /* ok */ -#define __NR_clock_getres (__NR_timer_create+7) /* 266 */ /* ok */ -#define __NR_clock_nanosleep (__NR_timer_create+8) /* 267 */ /* ok */ -#define __NR_statfs64 268 /* ok */ -#define __NR_fstatfs64 269 /* ok */ -#define __NR_tgkill 270 /* ok */ -#define __NR_utimes 271 /* obsolete -> sys_futimesat */ -#define __NR_fadvise64_64 272 /* ok */ -#define __NR_vserver 273 /* ok */ -#define __NR_mbind 274 /* only for mmu */ -#define __NR_get_mempolicy 275 /* only for mmu */ -#define __NR_set_mempolicy 276 /* only for mmu */ -#define __NR_mq_open 277 /* ok */ -#define __NR_mq_unlink (__NR_mq_open+1) /* 278 */ /* ok */ -#define __NR_mq_timedsend (__NR_mq_open+2) /* 279 */ /* ok */ -#define __NR_mq_timedreceive (__NR_mq_open+3) /* 280 */ /* ok */ -#define __NR_mq_notify (__NR_mq_open+4) /* 281 */ /* ok */ -#define __NR_mq_getsetattr (__NR_mq_open+5) /* 282 */ /* ok */ -#define __NR_kexec_load 283 /* ok */ -#define __NR_waitid 284 /* ok */ -/* #define __NR_sys_setaltroot 285 */ -#define __NR_add_key 286 /* ok */ -#define __NR_request_key 287 /* ok */ -#define __NR_keyctl 288 /* ok */ -#define __NR_ioprio_set 289 /* ok */ -#define __NR_ioprio_get 290 /* ok */ -#define __NR_inotify_init 291 /* ok */ -#define __NR_inotify_add_watch 292 /* ok */ -#define __NR_inotify_rm_watch 293 /* ok */ -#define __NR_migrate_pages 294 /* mmu */ -#define __NR_openat 295 /* ok */ -#define __NR_mkdirat 296 /* ok */ -#define __NR_mknodat 297 /* ok */ -#define __NR_fchownat 298 /* ok */ -#define __NR_futimesat 299 /* obsolete -> sys_utimesat */ -#define __NR_fstatat64 300 /* stat64 */ -#define __NR_unlinkat 301 /* ok */ -#define __NR_renameat 302 /* ok */ -#define __NR_linkat 303 /* ok */ -#define __NR_symlinkat 304 /* ok */ -#define __NR_readlinkat 305 /* ok */ -#define __NR_fchmodat 306 /* ok */ -#define __NR_faccessat 307 /* ok */ -#define __NR_pselect6 308 /* ok */ -#define __NR_ppoll 309 /* ok */ -#define __NR_unshare 310 /* ok */ -#define __NR_set_robust_list 311 /* ok */ -#define __NR_get_robust_list 312 /* ok */ -#define __NR_splice 313 /* ok */ -#define __NR_sync_file_range 314 /* ok */ -#define __NR_tee 315 /* ok */ -#define __NR_vmsplice 316 /* ok */ -#define __NR_move_pages 317 /* mmu */ -#define __NR_getcpu 318 /* ok */ -#define __NR_epoll_pwait 319 /* ok */ -#define __NR_utimensat 320 /* ok */ -#define __NR_signalfd 321 /* ok */ -#define __NR_timerfd_create 322 /* ok */ -#define __NR_eventfd 323 /* ok */ -#define __NR_fallocate 324 /* ok */ -#define __NR_semtimedop 325 /* ok - semaphore group */ -#define __NR_timerfd_settime 326 /* ok */ -#define __NR_timerfd_gettime 327 /* ok */ -/* sysv ipc syscalls */ -#define __NR_semctl 328 /* ok */ -#define __NR_semget 329 /* ok */ -#define __NR_semop 330 /* ok */ -#define __NR_msgctl 331 /* ok */ -#define __NR_msgget 332 /* ok */ -#define __NR_msgrcv 333 /* ok */ -#define __NR_msgsnd 334 /* ok */ -#define __NR_shmat 335 /* ok */ -#define __NR_shmctl 336 /* ok */ -#define __NR_shmdt 337 /* ok */ -#define __NR_shmget 338 /* ok */ - - -#define __NR_signalfd4 339 /* new */ -#define __NR_eventfd2 340 /* new */ -#define __NR_epoll_create1 341 /* new */ -#define __NR_dup3 342 /* new */ -#define __NR_pipe2 343 /* new */ -#define __NR_inotify_init1 344 /* new */ -#define __NR_socket 345 /* new */ -#define __NR_socketpair 346 /* new */ -#define __NR_bind 347 /* new */ -#define __NR_listen 348 /* new */ -#define __NR_accept 349 /* new */ -#define __NR_connect 350 /* new */ -#define __NR_getsockname 351 /* new */ -#define __NR_getpeername 352 /* new */ -#define __NR_sendto 353 /* new */ -#define __NR_send 354 /* new */ -#define __NR_recvfrom 355 /* new */ -#define __NR_recv 356 /* new */ -#define __NR_setsockopt 357 /* new */ -#define __NR_getsockopt 358 /* new */ -#define __NR_shutdown 359 /* new */ -#define __NR_sendmsg 360 /* new */ -#define __NR_recvmsg 361 /* new */ -#define __NR_accept4 362 /* new */ -#define __NR_preadv 363 /* new */ -#define __NR_pwritev 364 /* new */ -#define __NR_rt_tgsigqueueinfo 365 /* new */ -#define __NR_perf_event_open 366 /* new */ -#define __NR_recvmmsg 367 /* new */ -#define __NR_fanotify_init 368 -#define __NR_fanotify_mark 369 -#define __NR_prlimit64 370 -#define __NR_name_to_handle_at 371 -#define __NR_open_by_handle_at 372 -#define __NR_clock_adjtime 373 -#define __NR_syncfs 374 -#define __NR_setns 375 -#define __NR_sendmmsg 376 -#define __NR_process_vm_readv 377 -#define __NR_process_vm_writev 378 -#define __NR_kcmp 379 -#define __NR_finit_module 380 -#define __NR_sched_setattr 381 -#define __NR_sched_getattr 382 -#define __NR_renameat2 383 -#define __NR_seccomp 384 -#define __NR_getrandom 385 -#define __NR_memfd_create 386 -#define __NR_bpf 387 -#define __NR_execveat 388 -#define __NR_userfaultfd 389 -#define __NR_membarrier 390 -#define __NR_mlock2 391 -#define __NR_copy_file_range 392 -#define __NR_preadv2 393 -#define __NR_pwritev2 394 -#define __NR_pkey_mprotect 395 -#define __NR_pkey_alloc 396 -#define __NR_pkey_free 397 -#define __NR_statx 398 -#define __NR_io_pgetevents 399 -#define __NR_rseq 400 - -#endif /* _UAPI_ASM_MICROBLAZE_UNISTD_H */ diff --git a/libc/glibc/sysdeps/wordsize-32/divdi3-symbol-hacks.h b/libc/glibc/sysdeps/wordsize-32/divdi3-symbol-hacks.h new file mode 100644 index 0000000000..bf00d03893 --- /dev/null +++ b/libc/glibc/sysdeps/wordsize-32/divdi3-symbol-hacks.h @@ -0,0 +1,31 @@ +/* Hacks needed for divdi3 symbol manipulation. + Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* A very dirty trick: gcc emits references to __divdi3, __udivdi3, + __moddi3, and __umoddi3. These functions are exported and + therefore we get PLTs. Unnecessarily so. Changing gcc is a big + task which might not be worth it so we play tricks with the + assembler. + Note: in_divdi3_c is only used to avoid symbol alias on divdi3 + build itself. */ +#if !defined __ASSEMBLER__ && !defined in_divdi3_c && IS_IN (libc) && defined SHARED +asm ("__divdi3 = __divdi3_internal"); +asm ("__udivdi3 = __udivdi3_internal"); +asm ("__moddi3 = __moddi3_internal"); +asm ("__umoddi3 = __umoddi3_internal"); +#endif diff --git a/libc/include/aarch64-linux-gnu/asm/bitsperlong.h b/libc/include/aarch64-linux-gnu/asm/bitsperlong.h new file mode 100644 index 0000000000..485d60bee2 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/asm/bitsperlong.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef __ASM_BITSPERLONG_H +#define __ASM_BITSPERLONG_H + +#define __BITS_PER_LONG 64 + +#include + +#endif /* __ASM_BITSPERLONG_H */ diff --git a/libc/glibc/sysdeps/unix/sysv/linux/aarch64/asm/unistd.h b/libc/include/aarch64-linux-gnu/asm/unistd.h similarity index 100% rename from libc/glibc/sysdeps/unix/sysv/linux/aarch64/asm/unistd.h rename to libc/include/aarch64-linux-gnu/asm/unistd.h diff --git a/libc/include/aarch64-linux-gnu/bits/endian.h b/libc/include/aarch64-linux-gnu/bits/endian.h new file mode 100644 index 0000000000..b62d37d773 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/endian.h @@ -0,0 +1,30 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* AArch64 can be either big or little endian. */ +#ifdef __AARCH64EB__ +# define __BYTE_ORDER __BIG_ENDIAN +#else +# define __BYTE_ORDER __LITTLE_ENDIAN +#endif + +#define __FLOAT_WORD_ORDER __BYTE_ORDER \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/fcntl.h b/libc/include/aarch64-linux-gnu/bits/fcntl.h new file mode 100644 index 0000000000..d2dd7e88aa --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/fcntl.h @@ -0,0 +1,61 @@ +/* O_*, F_*, FD_* bit values for the AArch64 Linux ABI. + Copyright (C) 2011-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#define __O_DIRECTORY 040000 +#define __O_NOFOLLOW 0100000 +#define __O_DIRECT 0200000 + +#ifdef __ILP32__ +# define __O_LARGEFILE 0400000 +#else +# define __O_LARGEFILE 0 +#endif + +#ifdef __LP64__ +# define F_GETLK64 5 +# define F_SETLK64 6 +# define F_SETLKW64 7 +#endif + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/fenv.h b/libc/include/aarch64-linux-gnu/bits/fenv.h new file mode 100644 index 0000000000..2e080ee28d --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/fenv.h @@ -0,0 +1,82 @@ +/* Copyright (C) 2004-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + +/* Define bits representing exceptions in the FPSR status word. */ +enum + { + FE_INVALID = +#define FE_INVALID 1 + FE_INVALID, + FE_DIVBYZERO = +#define FE_DIVBYZERO 2 + FE_DIVBYZERO, + FE_OVERFLOW = +#define FE_OVERFLOW 4 + FE_OVERFLOW, + FE_UNDERFLOW = +#define FE_UNDERFLOW 8 + FE_UNDERFLOW, + FE_INEXACT = +#define FE_INEXACT 16 + FE_INEXACT, + }; + +/* Amount to shift by to convert an exception bit in FPSR to a an + exception bit mask in FPCR. */ +#define FE_EXCEPT_SHIFT 8 + +/* All supported exceptions. */ +#define FE_ALL_EXCEPT \ + (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) + +/* Define bits representing rounding modes in the FPCR Rmode field. */ +#define FE_TONEAREST 0x000000 +#define FE_UPWARD 0x400000 +#define FE_DOWNWARD 0x800000 +#define FE_TOWARDZERO 0xc00000 + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + +/* Type representing floating-point environment. */ +typedef struct + { + unsigned int __fpcr; + unsigned int __fpsr; + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((const fenv_t *) -1l) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exceptions are masked. */ +# define FE_NOMASK_ENV ((const fenv_t *) -2) +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef unsigned int femode_t; + +/* Default floating-point control modes. */ +# define FE_DFL_MODE ((const femode_t *) -1L) +#endif \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/floatn.h b/libc/include/aarch64-linux-gnu/bits/floatn.h new file mode 100644 index 0000000000..5e7e3f4d2e --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/floatn.h @@ -0,0 +1,97 @@ +/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/aarch64-linux-gnu/bits/fp-fast.h b/libc/include/aarch64-linux-gnu/bits/fp-fast.h new file mode 100644 index 0000000000..c502e67c75 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/fp-fast.h @@ -0,0 +1,34 @@ +/* Define FP_FAST_* macros. AArch64 version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +#ifdef __USE_ISOC99 + +/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l} + builtins are supported. */ +# define FP_FAST_FMA 1 +# define FP_FAST_FMAF 1 + +# ifdef __FP_FAST_FMAL +# define FP_FAST_FMAL 1 +# endif + +#endif \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/hwcap.h b/libc/include/aarch64-linux-gnu/bits/hwcap.h new file mode 100644 index 0000000000..bdeaa1e1d4 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/hwcap.h @@ -0,0 +1,53 @@ +/* Defines for bits in AT_HWCAP. AArch64 Linux version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined (_SYS_AUXV_H) +# error "Never include directly; use instead." +#endif + +/* The following must match the kernel's and update the + list together with sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c. */ +#define HWCAP_FP (1 << 0) +#define HWCAP_ASIMD (1 << 1) +#define HWCAP_EVTSTRM (1 << 2) +#define HWCAP_AES (1 << 3) +#define HWCAP_PMULL (1 << 4) +#define HWCAP_SHA1 (1 << 5) +#define HWCAP_SHA2 (1 << 6) +#define HWCAP_CRC32 (1 << 7) +#define HWCAP_ATOMICS (1 << 8) +#define HWCAP_FPHP (1 << 9) +#define HWCAP_ASIMDHP (1 << 10) +#define HWCAP_CPUID (1 << 11) +#define HWCAP_ASIMDRDM (1 << 12) +#define HWCAP_JSCVT (1 << 13) +#define HWCAP_FCMA (1 << 14) +#define HWCAP_LRCPC (1 << 15) +#define HWCAP_DCPOP (1 << 16) +#define HWCAP_SHA3 (1 << 17) +#define HWCAP_SM3 (1 << 18) +#define HWCAP_SM4 (1 << 19) +#define HWCAP_ASIMDDP (1 << 20) +#define HWCAP_SHA512 (1 << 21) +#define HWCAP_SVE (1 << 22) +#define HWCAP_ASIMDFHM (1 << 23) +#define HWCAP_DIT (1 << 24) +#define HWCAP_USCAT (1 << 25) +#define HWCAP_ILRCPC (1 << 26) +#define HWCAP_FLAGM (1 << 27) +#define HWCAP_SSBS (1 << 28) \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/ipc.h b/libc/include/aarch64-linux-gnu/bits/ipc.h new file mode 100644 index 0000000000..6edd48ba78 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/ipc.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IPC_H +# error "Never use directly; include instead." +#endif + +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#ifdef __USE_GNU +# define IPC_INFO 3 /* See ipcs. */ +#endif + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + __uid_t uid; /* Owner's user ID. */ + __gid_t gid; /* Owner's group ID. */ + __uid_t cuid; /* Creator's user ID. */ + __gid_t cgid; /* Creator's group ID. */ + unsigned int mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ + unsigned short int __pad1; + __syscall_ulong_t __glibc_reserved1; + __syscall_ulong_t __glibc_reserved2; + }; \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/link.h b/libc/include/aarch64-linux-gnu/bits/link.h new file mode 100644 index 0000000000..71f99857bc --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/link.h @@ -0,0 +1,60 @@ +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + +/* Registers for entry into PLT on AArch64. */ +typedef struct La_aarch64_regs +{ + uint64_t lr_xreg[8]; + uint64_t lr_dreg[8]; + uint64_t lr_sp; + uint64_t lr_lr; +} La_aarch64_regs; + +/* Return values for calls from PLT on AArch64. */ +typedef struct La_aarch64_retval +{ + /* Up to two integer registers can be used for a return value. */ + uint64_t lrv_xreg[2]; + /* Up to four D registers can be used for a return value. */ + uint64_t lrv_dreg[4]; + +} La_aarch64_retval; +__BEGIN_DECLS + +extern ElfW(Addr) +la_aarch64_gnu_pltenter (ElfW(Sym) *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_aarch64_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); + +extern unsigned int +la_aarch64_gnu_pltexit (ElfW(Sym) *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_aarch64_regs *__inregs, + La_aarch64_retval *__outregs, + const char *__symname); + +__END_DECLS \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/local_lim.h b/libc/include/aarch64-linux-gnu/bits/local_lim.h new file mode 100644 index 0000000000..738c65bc5a --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/local_lim.h @@ -0,0 +1,101 @@ +/* Minimum guaranteed maximum values for system limits. Linux version. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. At least two pages for systems with 64k + pages. */ +#define PTHREAD_STACK_MIN 131072 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/long-double.h b/libc/include/aarch64-linux-gnu/bits/long-double.h new file mode 100644 index 0000000000..12e30804a4 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/long-double.h @@ -0,0 +1,20 @@ +/* Properties of long double type. ldbl-128 version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* long double is distinct from double, so there is nothing to + define here. */ \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/procfs.h b/libc/include/aarch64-linux-gnu/bits/procfs.h new file mode 100644 index 0000000000..cdc07b27d9 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/procfs.h @@ -0,0 +1,35 @@ +/* Types for registers for sys/procfs.h. AArch64 version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +/* Type for a general-purpose register. */ +typedef __uint64_t elf_greg_t; + +/* And the whole bunch of them. We could have used `struct + pt_regs' directly in the typedef, but tradition says that + the register set is an array, which does have some peculiar + semantics, so leave it that way. */ +#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t)) +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +/* Register set for the floating-point registers. */ +typedef struct user_fpsimd_struct elf_fpregset_t; \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h b/libc/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..ef00f65b66 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h @@ -0,0 +1,71 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#ifdef __ILP32__ +# define __SIZEOF_PTHREAD_ATTR_T 32 +# define __SIZEOF_PTHREAD_MUTEX_T 32 +# define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +# define __SIZEOF_PTHREAD_CONDATTR_T 4 +# define __SIZEOF_PTHREAD_RWLOCK_T 48 +# define __SIZEOF_PTHREAD_BARRIER_T 20 +# define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +#else +# define __SIZEOF_PTHREAD_ATTR_T 64 +# define __SIZEOF_PTHREAD_MUTEX_T 48 +# define __SIZEOF_PTHREAD_MUTEXATTR_T 8 +# define __SIZEOF_PTHREAD_CONDATTR_T 8 +# define __SIZEOF_PTHREAD_RWLOCK_T 56 +# define __SIZEOF_PTHREAD_BARRIER_T 32 +# define __SIZEOF_PTHREAD_BARRIERATTR_T 8 +#endif +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 + +/* Definitions for internal mutex struct. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 0 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 +#define __PTHREAD_MUTEX_USE_UNION 0 + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +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; + int __cur_writer; + int __shared; + unsigned long int __pad1; + unsigned long int __pad2; + unsigned int __flags; +}; + +#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 + +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/semaphore.h b/libc/include/aarch64-linux-gnu/bits/semaphore.h new file mode 100644 index 0000000000..a15f480bd0 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/semaphore.h @@ -0,0 +1,39 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + + +#ifdef __ILP32__ +# define __SIZEOF_SEM_T 16 +#else +# define __SIZEOF_SEM_T 32 +#endif + + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/setjmp.h b/libc/include/aarch64-linux-gnu/bits/setjmp.h new file mode 100644 index 0000000000..407f86adc1 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/setjmp.h @@ -0,0 +1,33 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +#ifndef _ASM +/* Jump buffer contains: + x19-x28, x29(fp), x30(lr), (x31)sp, d8-d15. Other registers are not + saved. */ +__extension__ typedef unsigned long long __jmp_buf [22]; + +#endif +#endif \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/sigstack.h b/libc/include/aarch64-linux-gnu/bits/sigstack.h new file mode 100644 index 0000000000..8921d2a88b --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/sigstack.h @@ -0,0 +1,32 @@ +/* sigstack, sigaltstack definitions. + Copyright (C) 2015-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_SIGSTACK_H +#define _BITS_SIGSTACK_H 1 + +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H +# error "Never include this file directly. Use instead" +#endif + +/* Minimum stack size for a signal handler. */ +#define MINSIGSTKSZ 5120 + +/* System default stack size. */ +#define SIGSTKSZ 16384 + +#endif /* bits/sigstack.h */ \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/stat.h b/libc/include/aarch64-linux-gnu/bits/stat.h new file mode 100644 index 0000000000..4f23077263 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/stat.h @@ -0,0 +1,171 @@ +/* Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +#include +#include + +/* 64-bit libc uses the kernel's 'struct stat', accessed via the + stat() syscall; 32-bit libc uses the kernel's 'struct stat64' + and accesses it via the stat64() syscall. All the various + APIs offered by libc use the kernel shape for their struct stat + structure; the only difference is that 32-bit programs not + using __USE_FILE_OFFSET64 only see the low 32 bits of some + of the fields (specifically st_ino, st_size, and st_blocks). */ +#define _STAT_VER_KERNEL 0 +#define _STAT_VER_LINUX 0 +#define _STAT_VER _STAT_VER_KERNEL + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 0 + +#if defined __USE_FILE_OFFSET64 +# define __field64(type, type64, name) type64 name +#elif __WORDSIZE == 64 +# define __field64(type, type64, name) type name +#elif __BYTE_ORDER == __LITTLE_ENDIAN +# define __field64(type, type64, name) \ + type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad +#else +# define __field64(type, type64, name) \ + int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name +#endif + +struct stat + { + __dev_t st_dev; /* Device. */ + __field64(__ino_t, __ino64_t, st_ino); /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + __dev_t __pad1; + __field64(__off_t, __off64_t, st_size); /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + int __pad2; + __field64(__blkcnt_t, __blkcnt64_t, st_blocks); /* 512-byte blocks */ +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + int __glibc_reserved[2]; + }; + +#undef __field64 + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + __ino64_t st_ino; /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + __dev_t __pad1; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + int __pad2; + __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + int __glibc_reserved[2]; + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/statfs.h b/libc/include/aarch64-linux-gnu/bits/statfs.h new file mode 100644 index 0000000000..8da970d4a9 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/statfs.h @@ -0,0 +1,86 @@ +/* Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _SYS_STATFS_H +# error "Never include directly; use instead." +#endif + +#include +#include +#include + +/* 64-bit libc uses the kernel's 'struct statfs', accessed via the + statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64' + and accesses it via the statfs64() syscall. All the various + APIs offered by libc use the kernel shape for their struct statfs + structure; the only difference is that 32-bit programs not + using __USE_FILE_OFFSET64 only see the low 32 bits of some + of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */ + +#if defined __USE_FILE_OFFSET64 +# define __field64(type, type64, name) type64 name +#elif __WORDSIZE == 64 +# define __field64(type, type64, name) type name +#elif __BYTE_ORDER == __LITTLE_ENDIAN +# define __field64(type, type64, name) \ + type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad +#else +# define __field64(type, type64, name) \ + int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name +#endif + +struct statfs + { + __SWORD_TYPE f_type; + __SWORD_TYPE f_bsize; + __field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks); + __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree); + __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail); + __field64(__fsfilcnt_t, __fsfilcnt64_t, f_files); + __field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree); + __fsid_t f_fsid; + __SWORD_TYPE f_namelen; + __SWORD_TYPE f_frsize; + __SWORD_TYPE f_flags; + __SWORD_TYPE f_spare[4]; + }; + +#undef __field64 + +#ifdef __USE_LARGEFILE64 +struct statfs64 + { + __SWORD_TYPE f_type; + __SWORD_TYPE f_bsize; + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_bavail; + __fsfilcnt64_t f_files; + __fsfilcnt64_t f_ffree; + __fsid_t f_fsid; + __SWORD_TYPE f_namelen; + __SWORD_TYPE f_frsize; + __SWORD_TYPE f_flags; + __SWORD_TYPE f_spare[4]; + }; +#endif + +/* Tell code we have these members. */ +#define _STATFS_F_NAMELEN +#define _STATFS_F_FRSIZE +#define _STATFS_F_FLAGS \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/typesizes.h b/libc/include/aarch64-linux-gnu/bits/typesizes.h new file mode 100644 index 0000000000..8cfcacef57 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/typesizes.h @@ -0,0 +1,84 @@ +/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. + Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _BITS_TYPES_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_TYPESIZES_H +#define _BITS_TYPESIZES_H 1 + +/* See for the meaning of these macros. This file exists so + that need not vary across different GNU platforms. */ + +#define __DEV_T_TYPE __UQUAD_TYPE +#define __UID_T_TYPE __U32_TYPE +#define __GID_T_TYPE __U32_TYPE +#define __INO_T_TYPE __ULONGWORD_TYPE +#define __INO64_T_TYPE __UQUAD_TYPE +#define __MODE_T_TYPE __U32_TYPE +#define __NLINK_T_TYPE __U32_TYPE +#define __OFF_T_TYPE __SLONGWORD_TYPE +#define __OFF64_T_TYPE __SQUAD_TYPE +#define __PID_T_TYPE __S32_TYPE +#define __RLIM_T_TYPE __ULONGWORD_TYPE +#define __RLIM64_T_TYPE __UQUAD_TYPE +#define __BLKCNT_T_TYPE __SLONGWORD_TYPE +#define __BLKCNT64_T_TYPE __SQUAD_TYPE +#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE +#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE +#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE +#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __FSWORD_T_TYPE __SWORD_TYPE +#define __ID_T_TYPE __U32_TYPE +#define __CLOCK_T_TYPE __SLONGWORD_TYPE +#define __TIME_T_TYPE __SLONGWORD_TYPE +#define __USECONDS_T_TYPE __U32_TYPE +#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#define __DADDR_T_TYPE __S32_TYPE +#define __KEY_T_TYPE __S32_TYPE +#define __CLOCKID_T_TYPE __S32_TYPE +#define __TIMER_T_TYPE void * +#define __BLKSIZE_T_TYPE __S32_TYPE +#define __FSID_T_TYPE struct { int __val[2]; } +#define __SSIZE_T_TYPE __SWORD_TYPE +#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE +#define __CPU_MASK_TYPE __ULONGWORD_TYPE + +#ifdef __LP64__ +/* Tell the libc code that off_t and off64_t are actually the same type + for all ABI purposes, even if possibly expressed as different base types + for C type-checking purposes. */ +# define __OFF_T_MATCHES_OFF64_T 1 + +/* Same for ino_t and ino64_t. */ +# define __INO_T_MATCHES_INO64_T 1 + +/* And for __rlim_t and __rlim64_t. */ +# define __RLIM_T_MATCHES_RLIM64_T 1 +#else +# define __RLIM_T_MATCHES_RLIM64_T 0 +#endif + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + + +#endif /* bits/typesizes.h */ \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/bits/wordsize.h b/libc/include/aarch64-linux-gnu/bits/wordsize.h new file mode 100644 index 0000000000..52f24f0980 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/bits/wordsize.h @@ -0,0 +1,28 @@ +/* Determine the wordsize from the preprocessor defines. + + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifdef __LP64__ +# define __WORDSIZE 64 +#else +# define __WORDSIZE 32 +# define __WORDSIZE32_SIZE_ULONG 1 +# define __WORDSIZE32_PTRDIFF_LONG 1 +#endif + +#define __WORDSIZE_TIME64_COMPAT32 0 \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/fpu_control.h b/libc/include/aarch64-linux-gnu/fpu_control.h new file mode 100644 index 0000000000..eac02cfe26 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/fpu_control.h @@ -0,0 +1,90 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _AARCH64_FPU_CONTROL_H +#define _AARCH64_FPU_CONTROL_H + +#include + +/* Macros for accessing the FPCR and FPSR. */ + +#if __GNUC_PREREQ (6,0) +# define _FPU_GETCW(fpcr) (fpcr = __builtin_aarch64_get_fpcr ()) +# define _FPU_SETCW(fpcr) __builtin_aarch64_set_fpcr (fpcr) +# define _FPU_GETFPSR(fpsr) (fpsr = __builtin_aarch64_get_fpsr ()) +# define _FPU_SETFPSR(fpsr) __builtin_aarch64_set_fpsr (fpsr) +#else +# define _FPU_GETCW(fpcr) \ + __asm__ __volatile__ ("mrs %0, fpcr" : "=r" (fpcr)) + +# define _FPU_SETCW(fpcr) \ + __asm__ __volatile__ ("msr fpcr, %0" : : "r" (fpcr)) + +# define _FPU_GETFPSR(fpsr) \ + __asm__ __volatile__ ("mrs %0, fpsr" : "=r" (fpsr)) + +# define _FPU_SETFPSR(fpsr) \ + __asm__ __volatile__ ("msr fpsr, %0" : : "r" (fpsr)) +#endif + +/* Reserved bits should be preserved when modifying register + contents. These two masks indicate which bits in each of FPCR and + FPSR should not be changed. */ + +#define _FPU_RESERVED 0xfe0fe0ff +#define _FPU_FPSR_RESERVED 0x0fffffe0 + +#define _FPU_DEFAULT 0x00000000 +#define _FPU_FPSR_DEFAULT 0x00000000 + +/* Layout of FPCR and FPSR: + + | | | | | | | | + 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 + s s s s s s s s s s s + c c c c c c c c c c c c + N Z C V Q A D F R R S S S L L L I U U I U O D I I U U I U O D I + C H N Z M M T T B E E E D N N X F F Z O D N N X F F Z O + P O O R R Z N N N E K K E E E E E C K K C C C C C + D D I I P + E E D D + E E + */ + +#define _FPU_FPCR_RM_MASK 0xc00000 + +#define _FPU_FPCR_MASK_IXE 0x1000 +#define _FPU_FPCR_MASK_UFE 0x0800 +#define _FPU_FPCR_MASK_OFE 0x0400 +#define _FPU_FPCR_MASK_DZE 0x0200 +#define _FPU_FPCR_MASK_IOE 0x0100 + +#define _FPU_FPCR_IEEE \ + (_FPU_DEFAULT | _FPU_FPCR_MASK_IXE \ + | _FPU_FPCR_MASK_UFE | _FPU_FPCR_MASK_OFE \ + | _FPU_FPCR_MASK_DZE | _FPU_FPCR_MASK_IOE) + +#define _FPU_FPSR_IEEE 0 + +typedef unsigned int fpu_control_t; +typedef unsigned int fpu_fpsr_t; + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/gnu/lib-names-lp64.h b/libc/include/aarch64-linux-gnu/gnu/lib-names-lp64.h new file mode 100644 index 0000000000..f1923e9517 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/gnu/lib-names-lp64.h @@ -0,0 +1,31 @@ +/* This file is automatically generated. */ +#ifndef __GNU_LIB_NAMES_H +# error "Never use directly; include instead." +#endif + +#define LD_LINUX_AARCH64_SO "ld-linux-aarch64.so.1" +#define LD_SO "ld-linux-aarch64.so.1" +#define LIBANL_SO "libanl.so.1" +#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1" +#define LIBCRYPT_SO "libcrypt.so.1" +#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_NISPLUS_SO "libnss_nisplus.so.2" +#define LIBNSS_NIS_SO "libnss_nis.so.2" +#define LIBNSS_TEST1_SO "libnss_test1.so.2" +#define LIBNSS_TEST2_SO "libnss_test2.so.2" +#define LIBPTHREAD_SO "libpthread.so.0" +#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/libc/include/aarch64-linux-gnu/gnu/lib-names.h b/libc/include/aarch64-linux-gnu/gnu/lib-names.h new file mode 100644 index 0000000000..6e130f0356 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/gnu/lib-names.h @@ -0,0 +1,16 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#include + +#if !defined __AARCH64EB__ +# include +#endif +#if defined __AARCH64EB__ +# include +#endif + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/gnu/stubs-lp64.h b/libc/include/aarch64-linux-gnu/gnu/stubs-lp64.h new file mode 100644 index 0000000000..9a016fc113 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/gnu/stubs-lp64.h @@ -0,0 +1,30 @@ +/* This file is automatically generated. + It defines a symbol `__stub_FUNCTION' for each function + in the C library which is a stub, meaning it will fail + every time called, usually setting errno to ENOSYS. */ + +#ifdef _LIBC + #error Applications may not define the macro _LIBC +#endif + +#define __stub___compat_bdflush +#define __stub___compat_create_module +#define __stub___compat_get_kernel_syms +#define __stub___compat_query_module +#define __stub___compat_uselib +#define __stub_chflags +#define __stub_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_getmsg +#define __stub_getpmsg +#define __stub_gtty +#define __stub_lchmod +#define __stub_putmsg +#define __stub_putpmsg +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty +#define __stub_sysctl \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/gnu/stubs.h b/libc/include/aarch64-linux-gnu/gnu/stubs.h new file mode 100644 index 0000000000..5123e7b8fc --- /dev/null +++ b/libc/include/aarch64-linux-gnu/gnu/stubs.h @@ -0,0 +1,12 @@ +/* This file is automatically generated. + This file selects the right generated file of `__stub_FUNCTION' macros + based on the architecture being compiled for. */ + +#include + +#if !defined __AARCH64EB__ +# include +#endif +#if defined __AARCH64EB__ +# include +#endif \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/ieee754.h b/libc/include/aarch64-linux-gnu/ieee754.h new file mode 100644 index 0000000000..e347e4a6e5 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/ieee754.h @@ -0,0 +1,170 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +__BEGIN_DECLS + +union ieee754_float + { + float f; + + /* This is the IEEE 754 single-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int mantissa:23; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:23; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int quiet_nan:1; + unsigned int mantissa:22; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:22; + unsigned int quiet_nan:1; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee_nan; + }; + +#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ + + +union ieee754_double + { + double d; + + /* This is the IEEE 754 double-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:20; + unsigned int mantissa1:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:19; + unsigned int mantissa1:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ + + +union ieee854_long_double + { + long double d; + + /* This is the IEEE 854 quad-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:16; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:16; + unsigned int exponent:15; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:15; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:15; + unsigned int quiet_nan:1; + unsigned int exponent:15; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ + +__END_DECLS + +#endif /* ieee754.h */ \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/sys/elf.h b/libc/include/aarch64-linux-gnu/sys/elf.h new file mode 100644 index 0000000000..d7062a3a91 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/sys/elf.h @@ -0,0 +1,26 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_ELF_H +#define _SYS_ELF_H 1 + +#warning "This header is obsolete; use instead." + +#include + +#endif /* sys/elf.h */ \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/sys/ptrace.h b/libc/include/aarch64-linux-gnu/sys/ptrace.h new file mode 100644 index 0000000000..59b06682a9 --- /dev/null +++ b/libc/include/aarch64-linux-gnu/sys/ptrace.h @@ -0,0 +1,148 @@ +/* `ptrace' debugger support interface. Linux/AArch64 version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include +#include + +__BEGIN_DECLS + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Continue and stop at the next entry to or return from syscall. */ + PTRACE_SYSCALL = 24, +#define PT_SYSCALL PTRACE_SYSCALL + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + /* Retrieve siginfo_t structures without removing signals from a queue. */ + PTRACE_PEEKSIGINFO = 0x4209, +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO + + /* Get the mask of blocked signals. */ + PTRACE_GETSIGMASK = 0x420a, +#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK + + /* Change the mask of blocked signals. */ + PTRACE_SETSIGMASK = 0x420b, +#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK + + /* Get seccomp BPF filters. */ + PTRACE_SECCOMP_GET_FILTER = 0x420c, +#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER + + /* Get seccomp BPF filter metadata. */ + PTRACE_SECCOMP_GET_METADATA = 0x420d +#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA +}; + + +#include + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/sys/ucontext.h b/libc/include/aarch64-linux-gnu/sys/ucontext.h new file mode 100644 index 0000000000..273ba806dd --- /dev/null +++ b/libc/include/aarch64-linux-gnu/sys/ucontext.h @@ -0,0 +1,78 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* System V/AArch64 ABI compliant context switching support. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + +#ifdef __USE_MISC +# include + + +typedef elf_greg_t greg_t; + +/* Container for all general registers. */ +typedef elf_gregset_t gregset_t; + +/* Structure to describe FPU registers. */ +typedef elf_fpregset_t fpregset_t; +#endif + +/* Context to describe whole processor state. This only describes + the core registers; coprocessor registers get saved elsewhere + (e.g. in uc_regspace, or somewhere unspecified on the stack + during non-RT signal handlers). */ +typedef struct + { + unsigned long long int __ctx(fault_address); + unsigned long long int __ctx(regs)[31]; + unsigned long long int __ctx(sp); + unsigned long long int __ctx(pc); + unsigned long long int __ctx(pstate); + /* This field contains extension records for additional processor + state such as the FP/SIMD state. It has to match the definition + of the corresponding field in the sigcontext struct, see the + arch/arm64/include/uapi/asm/sigcontext.h linux header for details. */ + unsigned char __reserved[4096] __attribute__ ((__aligned__ (16))); + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long __ctx(uc_flags); + struct ucontext_t *uc_link; + stack_t uc_stack; + sigset_t uc_sigmask; + mcontext_t uc_mcontext; + } ucontext_t; + +#undef __ctx + +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/include/aarch64-linux-gnu/sys/user.h b/libc/include/aarch64-linux-gnu/sys/user.h new file mode 100644 index 0000000000..8daa97548a --- /dev/null +++ b/libc/include/aarch64-linux-gnu/sys/user.h @@ -0,0 +1,37 @@ +/* Copyright (C) 2009-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H +#define _SYS_USER_H 1 + +struct user_regs_struct +{ + unsigned long long regs[31]; + unsigned long long sp; + unsigned long long pc; + unsigned long long pstate; +}; + +struct user_fpsimd_struct +{ + __uint128_t vregs[32]; + unsigned int fpsr; + unsigned int fpcr; +}; + +#endif \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/asm/bitsperlong.h b/libc/include/aarch64_be-linux-gnu/asm/bitsperlong.h new file mode 100644 index 0000000000..485d60bee2 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/asm/bitsperlong.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef __ASM_BITSPERLONG_H +#define __ASM_BITSPERLONG_H + +#define __BITS_PER_LONG 64 + +#include + +#endif /* __ASM_BITSPERLONG_H */ diff --git a/libc/include/aarch64_be-linux-gnu/asm/unistd.h b/libc/include/aarch64_be-linux-gnu/asm/unistd.h new file mode 100644 index 0000000000..dae1584cf0 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/asm/unistd.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#define __ARCH_WANT_RENAMEAT +#define __ARCH_WANT_NEW_STAT + +#include diff --git a/libc/include/aarch64_be-linux-gnu/bits/endian.h b/libc/include/aarch64_be-linux-gnu/bits/endian.h new file mode 100644 index 0000000000..b62d37d773 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/endian.h @@ -0,0 +1,30 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* AArch64 can be either big or little endian. */ +#ifdef __AARCH64EB__ +# define __BYTE_ORDER __BIG_ENDIAN +#else +# define __BYTE_ORDER __LITTLE_ENDIAN +#endif + +#define __FLOAT_WORD_ORDER __BYTE_ORDER \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/fcntl.h b/libc/include/aarch64_be-linux-gnu/bits/fcntl.h new file mode 100644 index 0000000000..d2dd7e88aa --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/fcntl.h @@ -0,0 +1,61 @@ +/* O_*, F_*, FD_* bit values for the AArch64 Linux ABI. + Copyright (C) 2011-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#define __O_DIRECTORY 040000 +#define __O_NOFOLLOW 0100000 +#define __O_DIRECT 0200000 + +#ifdef __ILP32__ +# define __O_LARGEFILE 0400000 +#else +# define __O_LARGEFILE 0 +#endif + +#ifdef __LP64__ +# define F_GETLK64 5 +# define F_SETLK64 6 +# define F_SETLKW64 7 +#endif + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/fenv.h b/libc/include/aarch64_be-linux-gnu/bits/fenv.h new file mode 100644 index 0000000000..2e080ee28d --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/fenv.h @@ -0,0 +1,82 @@ +/* Copyright (C) 2004-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + +/* Define bits representing exceptions in the FPSR status word. */ +enum + { + FE_INVALID = +#define FE_INVALID 1 + FE_INVALID, + FE_DIVBYZERO = +#define FE_DIVBYZERO 2 + FE_DIVBYZERO, + FE_OVERFLOW = +#define FE_OVERFLOW 4 + FE_OVERFLOW, + FE_UNDERFLOW = +#define FE_UNDERFLOW 8 + FE_UNDERFLOW, + FE_INEXACT = +#define FE_INEXACT 16 + FE_INEXACT, + }; + +/* Amount to shift by to convert an exception bit in FPSR to a an + exception bit mask in FPCR. */ +#define FE_EXCEPT_SHIFT 8 + +/* All supported exceptions. */ +#define FE_ALL_EXCEPT \ + (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) + +/* Define bits representing rounding modes in the FPCR Rmode field. */ +#define FE_TONEAREST 0x000000 +#define FE_UPWARD 0x400000 +#define FE_DOWNWARD 0x800000 +#define FE_TOWARDZERO 0xc00000 + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + +/* Type representing floating-point environment. */ +typedef struct + { + unsigned int __fpcr; + unsigned int __fpsr; + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((const fenv_t *) -1l) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exceptions are masked. */ +# define FE_NOMASK_ENV ((const fenv_t *) -2) +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef unsigned int femode_t; + +/* Default floating-point control modes. */ +# define FE_DFL_MODE ((const femode_t *) -1L) +#endif \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/floatn.h b/libc/include/aarch64_be-linux-gnu/bits/floatn.h new file mode 100644 index 0000000000..5e7e3f4d2e --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/floatn.h @@ -0,0 +1,97 @@ +/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/aarch64_be-linux-gnu/bits/fp-fast.h b/libc/include/aarch64_be-linux-gnu/bits/fp-fast.h new file mode 100644 index 0000000000..c502e67c75 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/fp-fast.h @@ -0,0 +1,34 @@ +/* Define FP_FAST_* macros. AArch64 version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +#ifdef __USE_ISOC99 + +/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l} + builtins are supported. */ +# define FP_FAST_FMA 1 +# define FP_FAST_FMAF 1 + +# ifdef __FP_FAST_FMAL +# define FP_FAST_FMAL 1 +# endif + +#endif \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/hwcap.h b/libc/include/aarch64_be-linux-gnu/bits/hwcap.h new file mode 100644 index 0000000000..bdeaa1e1d4 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/hwcap.h @@ -0,0 +1,53 @@ +/* Defines for bits in AT_HWCAP. AArch64 Linux version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined (_SYS_AUXV_H) +# error "Never include directly; use instead." +#endif + +/* The following must match the kernel's and update the + list together with sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c. */ +#define HWCAP_FP (1 << 0) +#define HWCAP_ASIMD (1 << 1) +#define HWCAP_EVTSTRM (1 << 2) +#define HWCAP_AES (1 << 3) +#define HWCAP_PMULL (1 << 4) +#define HWCAP_SHA1 (1 << 5) +#define HWCAP_SHA2 (1 << 6) +#define HWCAP_CRC32 (1 << 7) +#define HWCAP_ATOMICS (1 << 8) +#define HWCAP_FPHP (1 << 9) +#define HWCAP_ASIMDHP (1 << 10) +#define HWCAP_CPUID (1 << 11) +#define HWCAP_ASIMDRDM (1 << 12) +#define HWCAP_JSCVT (1 << 13) +#define HWCAP_FCMA (1 << 14) +#define HWCAP_LRCPC (1 << 15) +#define HWCAP_DCPOP (1 << 16) +#define HWCAP_SHA3 (1 << 17) +#define HWCAP_SM3 (1 << 18) +#define HWCAP_SM4 (1 << 19) +#define HWCAP_ASIMDDP (1 << 20) +#define HWCAP_SHA512 (1 << 21) +#define HWCAP_SVE (1 << 22) +#define HWCAP_ASIMDFHM (1 << 23) +#define HWCAP_DIT (1 << 24) +#define HWCAP_USCAT (1 << 25) +#define HWCAP_ILRCPC (1 << 26) +#define HWCAP_FLAGM (1 << 27) +#define HWCAP_SSBS (1 << 28) \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/ipc.h b/libc/include/aarch64_be-linux-gnu/bits/ipc.h new file mode 100644 index 0000000000..6edd48ba78 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/ipc.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IPC_H +# error "Never use directly; include instead." +#endif + +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#ifdef __USE_GNU +# define IPC_INFO 3 /* See ipcs. */ +#endif + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + __uid_t uid; /* Owner's user ID. */ + __gid_t gid; /* Owner's group ID. */ + __uid_t cuid; /* Creator's user ID. */ + __gid_t cgid; /* Creator's group ID. */ + unsigned int mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ + unsigned short int __pad1; + __syscall_ulong_t __glibc_reserved1; + __syscall_ulong_t __glibc_reserved2; + }; \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/link.h b/libc/include/aarch64_be-linux-gnu/bits/link.h new file mode 100644 index 0000000000..71f99857bc --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/link.h @@ -0,0 +1,60 @@ +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + +/* Registers for entry into PLT on AArch64. */ +typedef struct La_aarch64_regs +{ + uint64_t lr_xreg[8]; + uint64_t lr_dreg[8]; + uint64_t lr_sp; + uint64_t lr_lr; +} La_aarch64_regs; + +/* Return values for calls from PLT on AArch64. */ +typedef struct La_aarch64_retval +{ + /* Up to two integer registers can be used for a return value. */ + uint64_t lrv_xreg[2]; + /* Up to four D registers can be used for a return value. */ + uint64_t lrv_dreg[4]; + +} La_aarch64_retval; +__BEGIN_DECLS + +extern ElfW(Addr) +la_aarch64_gnu_pltenter (ElfW(Sym) *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_aarch64_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); + +extern unsigned int +la_aarch64_gnu_pltexit (ElfW(Sym) *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_aarch64_regs *__inregs, + La_aarch64_retval *__outregs, + const char *__symname); + +__END_DECLS \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/local_lim.h b/libc/include/aarch64_be-linux-gnu/bits/local_lim.h new file mode 100644 index 0000000000..738c65bc5a --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/local_lim.h @@ -0,0 +1,101 @@ +/* Minimum guaranteed maximum values for system limits. Linux version. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. At least two pages for systems with 64k + pages. */ +#define PTHREAD_STACK_MIN 131072 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/long-double.h b/libc/include/aarch64_be-linux-gnu/bits/long-double.h new file mode 100644 index 0000000000..12e30804a4 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/long-double.h @@ -0,0 +1,20 @@ +/* Properties of long double type. ldbl-128 version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* long double is distinct from double, so there is nothing to + define here. */ \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/procfs.h b/libc/include/aarch64_be-linux-gnu/bits/procfs.h new file mode 100644 index 0000000000..cdc07b27d9 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/procfs.h @@ -0,0 +1,35 @@ +/* Types for registers for sys/procfs.h. AArch64 version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +/* Type for a general-purpose register. */ +typedef __uint64_t elf_greg_t; + +/* And the whole bunch of them. We could have used `struct + pt_regs' directly in the typedef, but tradition says that + the register set is an array, which does have some peculiar + semantics, so leave it that way. */ +#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t)) +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +/* Register set for the floating-point registers. */ +typedef struct user_fpsimd_struct elf_fpregset_t; \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/pthreadtypes-arch.h b/libc/include/aarch64_be-linux-gnu/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..ef00f65b66 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/pthreadtypes-arch.h @@ -0,0 +1,71 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#ifdef __ILP32__ +# define __SIZEOF_PTHREAD_ATTR_T 32 +# define __SIZEOF_PTHREAD_MUTEX_T 32 +# define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +# define __SIZEOF_PTHREAD_CONDATTR_T 4 +# define __SIZEOF_PTHREAD_RWLOCK_T 48 +# define __SIZEOF_PTHREAD_BARRIER_T 20 +# define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +#else +# define __SIZEOF_PTHREAD_ATTR_T 64 +# define __SIZEOF_PTHREAD_MUTEX_T 48 +# define __SIZEOF_PTHREAD_MUTEXATTR_T 8 +# define __SIZEOF_PTHREAD_CONDATTR_T 8 +# define __SIZEOF_PTHREAD_RWLOCK_T 56 +# define __SIZEOF_PTHREAD_BARRIER_T 32 +# define __SIZEOF_PTHREAD_BARRIERATTR_T 8 +#endif +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 + +/* Definitions for internal mutex struct. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 0 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 +#define __PTHREAD_MUTEX_USE_UNION 0 + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +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; + int __cur_writer; + int __shared; + unsigned long int __pad1; + unsigned long int __pad2; + unsigned int __flags; +}; + +#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 + +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/semaphore.h b/libc/include/aarch64_be-linux-gnu/bits/semaphore.h new file mode 100644 index 0000000000..a15f480bd0 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/semaphore.h @@ -0,0 +1,39 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + + +#ifdef __ILP32__ +# define __SIZEOF_SEM_T 16 +#else +# define __SIZEOF_SEM_T 32 +#endif + + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/setjmp.h b/libc/include/aarch64_be-linux-gnu/bits/setjmp.h new file mode 100644 index 0000000000..407f86adc1 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/setjmp.h @@ -0,0 +1,33 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +#ifndef _ASM +/* Jump buffer contains: + x19-x28, x29(fp), x30(lr), (x31)sp, d8-d15. Other registers are not + saved. */ +__extension__ typedef unsigned long long __jmp_buf [22]; + +#endif +#endif \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/sigstack.h b/libc/include/aarch64_be-linux-gnu/bits/sigstack.h new file mode 100644 index 0000000000..8921d2a88b --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/sigstack.h @@ -0,0 +1,32 @@ +/* sigstack, sigaltstack definitions. + Copyright (C) 2015-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_SIGSTACK_H +#define _BITS_SIGSTACK_H 1 + +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H +# error "Never include this file directly. Use instead" +#endif + +/* Minimum stack size for a signal handler. */ +#define MINSIGSTKSZ 5120 + +/* System default stack size. */ +#define SIGSTKSZ 16384 + +#endif /* bits/sigstack.h */ \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/stat.h b/libc/include/aarch64_be-linux-gnu/bits/stat.h new file mode 100644 index 0000000000..4f23077263 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/stat.h @@ -0,0 +1,171 @@ +/* Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +#include +#include + +/* 64-bit libc uses the kernel's 'struct stat', accessed via the + stat() syscall; 32-bit libc uses the kernel's 'struct stat64' + and accesses it via the stat64() syscall. All the various + APIs offered by libc use the kernel shape for their struct stat + structure; the only difference is that 32-bit programs not + using __USE_FILE_OFFSET64 only see the low 32 bits of some + of the fields (specifically st_ino, st_size, and st_blocks). */ +#define _STAT_VER_KERNEL 0 +#define _STAT_VER_LINUX 0 +#define _STAT_VER _STAT_VER_KERNEL + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 0 + +#if defined __USE_FILE_OFFSET64 +# define __field64(type, type64, name) type64 name +#elif __WORDSIZE == 64 +# define __field64(type, type64, name) type name +#elif __BYTE_ORDER == __LITTLE_ENDIAN +# define __field64(type, type64, name) \ + type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad +#else +# define __field64(type, type64, name) \ + int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name +#endif + +struct stat + { + __dev_t st_dev; /* Device. */ + __field64(__ino_t, __ino64_t, st_ino); /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + __dev_t __pad1; + __field64(__off_t, __off64_t, st_size); /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + int __pad2; + __field64(__blkcnt_t, __blkcnt64_t, st_blocks); /* 512-byte blocks */ +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + int __glibc_reserved[2]; + }; + +#undef __field64 + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + __ino64_t st_ino; /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + __dev_t __pad1; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + int __pad2; + __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + int __glibc_reserved[2]; + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/statfs.h b/libc/include/aarch64_be-linux-gnu/bits/statfs.h new file mode 100644 index 0000000000..8da970d4a9 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/statfs.h @@ -0,0 +1,86 @@ +/* Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _SYS_STATFS_H +# error "Never include directly; use instead." +#endif + +#include +#include +#include + +/* 64-bit libc uses the kernel's 'struct statfs', accessed via the + statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64' + and accesses it via the statfs64() syscall. All the various + APIs offered by libc use the kernel shape for their struct statfs + structure; the only difference is that 32-bit programs not + using __USE_FILE_OFFSET64 only see the low 32 bits of some + of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */ + +#if defined __USE_FILE_OFFSET64 +# define __field64(type, type64, name) type64 name +#elif __WORDSIZE == 64 +# define __field64(type, type64, name) type name +#elif __BYTE_ORDER == __LITTLE_ENDIAN +# define __field64(type, type64, name) \ + type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad +#else +# define __field64(type, type64, name) \ + int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name +#endif + +struct statfs + { + __SWORD_TYPE f_type; + __SWORD_TYPE f_bsize; + __field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks); + __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree); + __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail); + __field64(__fsfilcnt_t, __fsfilcnt64_t, f_files); + __field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree); + __fsid_t f_fsid; + __SWORD_TYPE f_namelen; + __SWORD_TYPE f_frsize; + __SWORD_TYPE f_flags; + __SWORD_TYPE f_spare[4]; + }; + +#undef __field64 + +#ifdef __USE_LARGEFILE64 +struct statfs64 + { + __SWORD_TYPE f_type; + __SWORD_TYPE f_bsize; + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_bavail; + __fsfilcnt64_t f_files; + __fsfilcnt64_t f_ffree; + __fsid_t f_fsid; + __SWORD_TYPE f_namelen; + __SWORD_TYPE f_frsize; + __SWORD_TYPE f_flags; + __SWORD_TYPE f_spare[4]; + }; +#endif + +/* Tell code we have these members. */ +#define _STATFS_F_NAMELEN +#define _STATFS_F_FRSIZE +#define _STATFS_F_FLAGS \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/typesizes.h b/libc/include/aarch64_be-linux-gnu/bits/typesizes.h new file mode 100644 index 0000000000..8cfcacef57 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/typesizes.h @@ -0,0 +1,84 @@ +/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. + Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _BITS_TYPES_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_TYPESIZES_H +#define _BITS_TYPESIZES_H 1 + +/* See for the meaning of these macros. This file exists so + that need not vary across different GNU platforms. */ + +#define __DEV_T_TYPE __UQUAD_TYPE +#define __UID_T_TYPE __U32_TYPE +#define __GID_T_TYPE __U32_TYPE +#define __INO_T_TYPE __ULONGWORD_TYPE +#define __INO64_T_TYPE __UQUAD_TYPE +#define __MODE_T_TYPE __U32_TYPE +#define __NLINK_T_TYPE __U32_TYPE +#define __OFF_T_TYPE __SLONGWORD_TYPE +#define __OFF64_T_TYPE __SQUAD_TYPE +#define __PID_T_TYPE __S32_TYPE +#define __RLIM_T_TYPE __ULONGWORD_TYPE +#define __RLIM64_T_TYPE __UQUAD_TYPE +#define __BLKCNT_T_TYPE __SLONGWORD_TYPE +#define __BLKCNT64_T_TYPE __SQUAD_TYPE +#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE +#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE +#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE +#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __FSWORD_T_TYPE __SWORD_TYPE +#define __ID_T_TYPE __U32_TYPE +#define __CLOCK_T_TYPE __SLONGWORD_TYPE +#define __TIME_T_TYPE __SLONGWORD_TYPE +#define __USECONDS_T_TYPE __U32_TYPE +#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#define __DADDR_T_TYPE __S32_TYPE +#define __KEY_T_TYPE __S32_TYPE +#define __CLOCKID_T_TYPE __S32_TYPE +#define __TIMER_T_TYPE void * +#define __BLKSIZE_T_TYPE __S32_TYPE +#define __FSID_T_TYPE struct { int __val[2]; } +#define __SSIZE_T_TYPE __SWORD_TYPE +#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE +#define __CPU_MASK_TYPE __ULONGWORD_TYPE + +#ifdef __LP64__ +/* Tell the libc code that off_t and off64_t are actually the same type + for all ABI purposes, even if possibly expressed as different base types + for C type-checking purposes. */ +# define __OFF_T_MATCHES_OFF64_T 1 + +/* Same for ino_t and ino64_t. */ +# define __INO_T_MATCHES_INO64_T 1 + +/* And for __rlim_t and __rlim64_t. */ +# define __RLIM_T_MATCHES_RLIM64_T 1 +#else +# define __RLIM_T_MATCHES_RLIM64_T 0 +#endif + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + + +#endif /* bits/typesizes.h */ \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/bits/wordsize.h b/libc/include/aarch64_be-linux-gnu/bits/wordsize.h new file mode 100644 index 0000000000..52f24f0980 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/bits/wordsize.h @@ -0,0 +1,28 @@ +/* Determine the wordsize from the preprocessor defines. + + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifdef __LP64__ +# define __WORDSIZE 64 +#else +# define __WORDSIZE 32 +# define __WORDSIZE32_SIZE_ULONG 1 +# define __WORDSIZE32_PTRDIFF_LONG 1 +#endif + +#define __WORDSIZE_TIME64_COMPAT32 0 \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/fpu_control.h b/libc/include/aarch64_be-linux-gnu/fpu_control.h new file mode 100644 index 0000000000..eac02cfe26 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/fpu_control.h @@ -0,0 +1,90 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _AARCH64_FPU_CONTROL_H +#define _AARCH64_FPU_CONTROL_H + +#include + +/* Macros for accessing the FPCR and FPSR. */ + +#if __GNUC_PREREQ (6,0) +# define _FPU_GETCW(fpcr) (fpcr = __builtin_aarch64_get_fpcr ()) +# define _FPU_SETCW(fpcr) __builtin_aarch64_set_fpcr (fpcr) +# define _FPU_GETFPSR(fpsr) (fpsr = __builtin_aarch64_get_fpsr ()) +# define _FPU_SETFPSR(fpsr) __builtin_aarch64_set_fpsr (fpsr) +#else +# define _FPU_GETCW(fpcr) \ + __asm__ __volatile__ ("mrs %0, fpcr" : "=r" (fpcr)) + +# define _FPU_SETCW(fpcr) \ + __asm__ __volatile__ ("msr fpcr, %0" : : "r" (fpcr)) + +# define _FPU_GETFPSR(fpsr) \ + __asm__ __volatile__ ("mrs %0, fpsr" : "=r" (fpsr)) + +# define _FPU_SETFPSR(fpsr) \ + __asm__ __volatile__ ("msr fpsr, %0" : : "r" (fpsr)) +#endif + +/* Reserved bits should be preserved when modifying register + contents. These two masks indicate which bits in each of FPCR and + FPSR should not be changed. */ + +#define _FPU_RESERVED 0xfe0fe0ff +#define _FPU_FPSR_RESERVED 0x0fffffe0 + +#define _FPU_DEFAULT 0x00000000 +#define _FPU_FPSR_DEFAULT 0x00000000 + +/* Layout of FPCR and FPSR: + + | | | | | | | | + 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 + s s s s s s s s s s s + c c c c c c c c c c c c + N Z C V Q A D F R R S S S L L L I U U I U O D I I U U I U O D I + C H N Z M M T T B E E E D N N X F F Z O D N N X F F Z O + P O O R R Z N N N E K K E E E E E C K K C C C C C + D D I I P + E E D D + E E + */ + +#define _FPU_FPCR_RM_MASK 0xc00000 + +#define _FPU_FPCR_MASK_IXE 0x1000 +#define _FPU_FPCR_MASK_UFE 0x0800 +#define _FPU_FPCR_MASK_OFE 0x0400 +#define _FPU_FPCR_MASK_DZE 0x0200 +#define _FPU_FPCR_MASK_IOE 0x0100 + +#define _FPU_FPCR_IEEE \ + (_FPU_DEFAULT | _FPU_FPCR_MASK_IXE \ + | _FPU_FPCR_MASK_UFE | _FPU_FPCR_MASK_OFE \ + | _FPU_FPCR_MASK_DZE | _FPU_FPCR_MASK_IOE) + +#define _FPU_FPSR_IEEE 0 + +typedef unsigned int fpu_control_t; +typedef unsigned int fpu_fpsr_t; + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/gnu/lib-names-lp64_be.h b/libc/include/aarch64_be-linux-gnu/gnu/lib-names-lp64_be.h new file mode 100644 index 0000000000..f5cf894313 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/gnu/lib-names-lp64_be.h @@ -0,0 +1,31 @@ +/* This file is automatically generated. */ +#ifndef __GNU_LIB_NAMES_H +# error "Never use directly; include instead." +#endif + +#define LD_LINUX_AARCH64_BE_SO "ld-linux-aarch64_be.so.1" +#define LD_SO "ld-linux-aarch64_be.so.1" +#define LIBANL_SO "libanl.so.1" +#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1" +#define LIBCRYPT_SO "libcrypt.so.1" +#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_NISPLUS_SO "libnss_nisplus.so.2" +#define LIBNSS_NIS_SO "libnss_nis.so.2" +#define LIBNSS_TEST1_SO "libnss_test1.so.2" +#define LIBNSS_TEST2_SO "libnss_test2.so.2" +#define LIBPTHREAD_SO "libpthread.so.0" +#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/libc/include/aarch64_be-linux-gnu/gnu/lib-names.h b/libc/include/aarch64_be-linux-gnu/gnu/lib-names.h new file mode 100644 index 0000000000..6e130f0356 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/gnu/lib-names.h @@ -0,0 +1,16 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#include + +#if !defined __AARCH64EB__ +# include +#endif +#if defined __AARCH64EB__ +# include +#endif + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/gnu/stubs-lp64_be.h b/libc/include/aarch64_be-linux-gnu/gnu/stubs-lp64_be.h new file mode 100644 index 0000000000..9a016fc113 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/gnu/stubs-lp64_be.h @@ -0,0 +1,30 @@ +/* This file is automatically generated. + It defines a symbol `__stub_FUNCTION' for each function + in the C library which is a stub, meaning it will fail + every time called, usually setting errno to ENOSYS. */ + +#ifdef _LIBC + #error Applications may not define the macro _LIBC +#endif + +#define __stub___compat_bdflush +#define __stub___compat_create_module +#define __stub___compat_get_kernel_syms +#define __stub___compat_query_module +#define __stub___compat_uselib +#define __stub_chflags +#define __stub_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_getmsg +#define __stub_getpmsg +#define __stub_gtty +#define __stub_lchmod +#define __stub_putmsg +#define __stub_putpmsg +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty +#define __stub_sysctl \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/gnu/stubs.h b/libc/include/aarch64_be-linux-gnu/gnu/stubs.h new file mode 100644 index 0000000000..5123e7b8fc --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/gnu/stubs.h @@ -0,0 +1,12 @@ +/* This file is automatically generated. + This file selects the right generated file of `__stub_FUNCTION' macros + based on the architecture being compiled for. */ + +#include + +#if !defined __AARCH64EB__ +# include +#endif +#if defined __AARCH64EB__ +# include +#endif \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/ieee754.h b/libc/include/aarch64_be-linux-gnu/ieee754.h new file mode 100644 index 0000000000..e347e4a6e5 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/ieee754.h @@ -0,0 +1,170 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +__BEGIN_DECLS + +union ieee754_float + { + float f; + + /* This is the IEEE 754 single-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int mantissa:23; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:23; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int quiet_nan:1; + unsigned int mantissa:22; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:22; + unsigned int quiet_nan:1; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee_nan; + }; + +#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ + + +union ieee754_double + { + double d; + + /* This is the IEEE 754 double-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:20; + unsigned int mantissa1:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:19; + unsigned int mantissa1:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ + + +union ieee854_long_double + { + long double d; + + /* This is the IEEE 854 quad-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:16; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:16; + unsigned int exponent:15; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:15; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:15; + unsigned int quiet_nan:1; + unsigned int exponent:15; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ + +__END_DECLS + +#endif /* ieee754.h */ \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/sys/elf.h b/libc/include/aarch64_be-linux-gnu/sys/elf.h new file mode 100644 index 0000000000..d7062a3a91 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/sys/elf.h @@ -0,0 +1,26 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_ELF_H +#define _SYS_ELF_H 1 + +#warning "This header is obsolete; use instead." + +#include + +#endif /* sys/elf.h */ \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/sys/ptrace.h b/libc/include/aarch64_be-linux-gnu/sys/ptrace.h new file mode 100644 index 0000000000..59b06682a9 --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/sys/ptrace.h @@ -0,0 +1,148 @@ +/* `ptrace' debugger support interface. Linux/AArch64 version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include +#include + +__BEGIN_DECLS + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Continue and stop at the next entry to or return from syscall. */ + PTRACE_SYSCALL = 24, +#define PT_SYSCALL PTRACE_SYSCALL + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + /* Retrieve siginfo_t structures without removing signals from a queue. */ + PTRACE_PEEKSIGINFO = 0x4209, +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO + + /* Get the mask of blocked signals. */ + PTRACE_GETSIGMASK = 0x420a, +#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK + + /* Change the mask of blocked signals. */ + PTRACE_SETSIGMASK = 0x420b, +#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK + + /* Get seccomp BPF filters. */ + PTRACE_SECCOMP_GET_FILTER = 0x420c, +#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER + + /* Get seccomp BPF filter metadata. */ + PTRACE_SECCOMP_GET_METADATA = 0x420d +#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA +}; + + +#include + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/sys/ucontext.h b/libc/include/aarch64_be-linux-gnu/sys/ucontext.h new file mode 100644 index 0000000000..273ba806dd --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/sys/ucontext.h @@ -0,0 +1,78 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* System V/AArch64 ABI compliant context switching support. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + +#ifdef __USE_MISC +# include + + +typedef elf_greg_t greg_t; + +/* Container for all general registers. */ +typedef elf_gregset_t gregset_t; + +/* Structure to describe FPU registers. */ +typedef elf_fpregset_t fpregset_t; +#endif + +/* Context to describe whole processor state. This only describes + the core registers; coprocessor registers get saved elsewhere + (e.g. in uc_regspace, or somewhere unspecified on the stack + during non-RT signal handlers). */ +typedef struct + { + unsigned long long int __ctx(fault_address); + unsigned long long int __ctx(regs)[31]; + unsigned long long int __ctx(sp); + unsigned long long int __ctx(pc); + unsigned long long int __ctx(pstate); + /* This field contains extension records for additional processor + state such as the FP/SIMD state. It has to match the definition + of the corresponding field in the sigcontext struct, see the + arch/arm64/include/uapi/asm/sigcontext.h linux header for details. */ + unsigned char __reserved[4096] __attribute__ ((__aligned__ (16))); + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long __ctx(uc_flags); + struct ucontext_t *uc_link; + stack_t uc_stack; + sigset_t uc_sigmask; + mcontext_t uc_mcontext; + } ucontext_t; + +#undef __ctx + +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/include/aarch64_be-linux-gnu/sys/user.h b/libc/include/aarch64_be-linux-gnu/sys/user.h new file mode 100644 index 0000000000..8daa97548a --- /dev/null +++ b/libc/include/aarch64_be-linux-gnu/sys/user.h @@ -0,0 +1,37 @@ +/* Copyright (C) 2009-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H +#define _SYS_USER_H 1 + +struct user_regs_struct +{ + unsigned long long regs[31]; + unsigned long long sp; + unsigned long long pc; + unsigned long long pstate; +}; + +struct user_fpsimd_struct +{ + __uint128_t vregs[32]; + unsigned int fpsr; + unsigned int fpcr; +}; + +#endif \ No newline at end of file diff --git a/libc/glibc/sysdeps/unix/sysv/linux/arm/asm/unistd.h b/libc/include/arm-linux-gnueabi/asm/unistd.h similarity index 100% rename from libc/glibc/sysdeps/unix/sysv/linux/arm/asm/unistd.h rename to libc/include/arm-linux-gnueabi/asm/unistd.h diff --git a/libc/include/arm-linux-gnueabi/bits/endian.h b/libc/include/arm-linux-gnueabi/bits/endian.h new file mode 100644 index 0000000000..8325d51253 --- /dev/null +++ b/libc/include/arm-linux-gnueabi/bits/endian.h @@ -0,0 +1,10 @@ +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* ARM can be either big or little endian. */ +#ifdef __ARMEB__ +#define __BYTE_ORDER __BIG_ENDIAN +#else +#define __BYTE_ORDER __LITTLE_ENDIAN +#endif \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/bits/fcntl.h b/libc/include/arm-linux-gnueabi/bits/fcntl.h new file mode 100644 index 0000000000..77edfb78fb --- /dev/null +++ b/libc/include/arm-linux-gnueabi/bits/fcntl.h @@ -0,0 +1,54 @@ +/* O_*, F_*, FD_* bit values for Linux. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#define __O_DIRECTORY 040000 /* Must be a directory. */ +#define __O_NOFOLLOW 0100000 /* Do not follow links. */ +#define __O_DIRECT 0200000 /* Direct disk access. */ +#define __O_LARGEFILE 0400000 + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/bits/fenv.h b/libc/include/arm-linux-gnueabi/bits/fenv.h new file mode 100644 index 0000000000..b8fbba6258 --- /dev/null +++ b/libc/include/arm-linux-gnueabi/bits/fenv.h @@ -0,0 +1,90 @@ +/* Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + +/* Define bits representing exceptions in the FPU status word. */ +enum + { + FE_INVALID = +#define FE_INVALID 1 + FE_INVALID, + FE_DIVBYZERO = +#define FE_DIVBYZERO 2 + FE_DIVBYZERO, + FE_OVERFLOW = +#define FE_OVERFLOW 4 + FE_OVERFLOW, + FE_UNDERFLOW = +#define FE_UNDERFLOW 8 + FE_UNDERFLOW, + FE_INEXACT = +#define FE_INEXACT 16 + FE_INEXACT, + }; + +/* Amount to shift by to convert an exception to a mask bit. */ +#define FE_EXCEPT_SHIFT 8 + +/* All supported exceptions. */ +#define FE_ALL_EXCEPT \ + (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) + +/* VFP supports all of the four defined rounding modes. */ +enum + { + FE_TONEAREST = +#define FE_TONEAREST 0 + FE_TONEAREST, + FE_UPWARD = +#define FE_UPWARD 0x400000 + FE_UPWARD, + FE_DOWNWARD = +#define FE_DOWNWARD 0x800000 + FE_DOWNWARD, + FE_TOWARDZERO = +#define FE_TOWARDZERO 0xc00000 + FE_TOWARDZERO + }; + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + +/* Type representing floating-point environment. */ +typedef struct + { + unsigned int __cw; + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((const fenv_t *) -1l) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exceptions are masked. */ +# define FE_NOMASK_ENV ((const fenv_t *) -2) +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef unsigned int femode_t; + +/* Default floating-point control modes. */ +# define FE_DFL_MODE ((const femode_t *) -1L) +#endif \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/bits/floatn.h b/libc/include/arm-linux-gnueabi/bits/floatn.h new file mode 100644 index 0000000000..24852b6800 --- /dev/null +++ b/libc/include/arm-linux-gnueabi/bits/floatn.h @@ -0,0 +1,52 @@ +/* Macros to control TS 18661-3 glibc features. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/arm-linux-gnueabi/bits/hwcap.h b/libc/include/arm-linux-gnueabi/bits/hwcap.h new file mode 100644 index 0000000000..a31befca4e --- /dev/null +++ b/libc/include/arm-linux-gnueabi/bits/hwcap.h @@ -0,0 +1,45 @@ +/* Defines for bits in AT_HWCAP. ARM Linux version. + Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined (_SYS_AUXV_H) && !defined (_LINUX_ARM_SYSDEP_H) +# error "Never include directly; use instead." +#endif + +/* The following must match the kernel's . */ +#define HWCAP_ARM_SWP 1 +#define HWCAP_ARM_HALF 2 +#define HWCAP_ARM_THUMB 4 +#define HWCAP_ARM_26BIT 8 +#define HWCAP_ARM_FAST_MULT 16 +#define HWCAP_ARM_FPA 32 +#define HWCAP_ARM_VFP 64 +#define HWCAP_ARM_EDSP 128 +#define HWCAP_ARM_JAVA 256 +#define HWCAP_ARM_IWMMXT 512 +#define HWCAP_ARM_CRUNCH 1024 +#define HWCAP_ARM_THUMBEE 2048 +#define HWCAP_ARM_NEON 4096 +#define HWCAP_ARM_VFPv3 8192 +#define HWCAP_ARM_VFPv3D16 16384 +#define HWCAP_ARM_TLS 32768 +#define HWCAP_ARM_VFPv4 65536 +#define HWCAP_ARM_IDIVA 131072 +#define HWCAP_ARM_IDIVT 262144 +#define HWCAP_ARM_VFPD32 524288 +#define HWCAP_ARM_LPAE 1048576 +#define HWCAP_ARM_EVTSTRM 2097152 \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/bits/link.h b/libc/include/arm-linux-gnueabi/bits/link.h new file mode 100644 index 0000000000..5dee177ce6 --- /dev/null +++ b/libc/include/arm-linux-gnueabi/bits/link.h @@ -0,0 +1,65 @@ +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + + +/* Registers for entry into PLT on ARM. */ +typedef struct La_arm_regs +{ + uint32_t lr_reg[4]; + uint32_t lr_sp; + uint32_t lr_lr; + /* Coprocessor registers used for argument passing. The data + stored here depends on the coprocessors available in the + system which are used for function calls in the current ABI. + VFP uses eight 64-bit registers, and iWMMXt uses ten. */ + uint32_t lr_coproc[42]; +} La_arm_regs; + +/* Return values for calls from PLT on ARM. */ +typedef struct La_arm_retval +{ + /* Up to four integer registers can be used for a return value in + some ABIs (APCS complex long double). */ + uint32_t lrv_reg[4]; + + /* Any coprocessor registers which might be used to return values + in the current ABI. */ + uint32_t lrv_coproc[12]; +} La_arm_retval; + + +__BEGIN_DECLS + +extern Elf32_Addr la_arm_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_arm_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_arm_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_arm_regs *__inregs, + La_arm_retval *__outregs, + const char *__symname); + +__END_DECLS \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/bits/long-double.h b/libc/include/arm-linux-gnueabi/bits/long-double.h new file mode 100644 index 0000000000..125807d07a --- /dev/null +++ b/libc/include/arm-linux-gnueabi/bits/long-double.h @@ -0,0 +1,39 @@ +/* Properties of long double type. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* This header is included by . + + If long double is ABI-compatible with double, it should define + __NO_LONG_DOUBLE_MATH to 1; otherwise, it should leave + __NO_LONG_DOUBLE_MATH undefined. + + If this build of the GNU C Library supports both long double + ABI-compatible with double and some other long double format not + ABI-compatible with double, it should define + __LONG_DOUBLE_MATH_OPTIONAL to 1; otherwise, it should leave + __LONG_DOUBLE_MATH_OPTIONAL undefined. + + If __NO_LONG_DOUBLE_MATH is already defined, this header must not + define anything; this is needed to work with the definition of + __NO_LONG_DOUBLE_MATH in nldbl-compat.h. */ + +/* In the default version of this header, long double is + ABI-compatible with double. */ +#ifndef __NO_LONG_DOUBLE_MATH +# define __NO_LONG_DOUBLE_MATH 1 +#endif \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/bits/procfs-id.h b/libc/include/arm-linux-gnueabi/bits/procfs-id.h new file mode 100644 index 0000000000..35582db16f --- /dev/null +++ b/libc/include/arm-linux-gnueabi/bits/procfs-id.h @@ -0,0 +1,25 @@ +/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +typedef unsigned short int __pr_uid_t; +typedef unsigned short int __pr_gid_t; \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/bits/procfs.h b/libc/include/arm-linux-gnueabi/bits/procfs.h new file mode 100644 index 0000000000..3e91a588d8 --- /dev/null +++ b/libc/include/arm-linux-gnueabi/bits/procfs.h @@ -0,0 +1,34 @@ +/* Types for registers for sys/procfs.h. Arm version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +/* Type for a general-purpose register. */ +typedef unsigned long elf_greg_t; + +/* And the whole bunch of them. We could have used `struct + user_regs' directly in the typedef, but tradition says that + the register set is an array, which does have some peculiar + semantics, so leave it that way. */ +#define ELF_NGREG (sizeof (struct user_regs) / sizeof (elf_greg_t)) +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +/* Register set for the floating-point registers. */ +typedef struct user_fpregs elf_fpregset_t; \ No newline at end of file diff --git a/libc/glibc/sysdeps/csky/nptl/bits/pthreadtypes-arch.h b/libc/include/arm-linux-gnueabi/bits/pthreadtypes-arch.h similarity index 64% rename from libc/glibc/sysdeps/csky/nptl/bits/pthreadtypes-arch.h rename to libc/include/arm-linux-gnueabi/bits/pthreadtypes-arch.h index 5a49114eac..c46bf4f3fd 100644 --- a/libc/glibc/sysdeps/csky/nptl/bits/pthreadtypes-arch.h +++ b/libc/include/arm-linux-gnueabi/bits/pthreadtypes-arch.h @@ -1,5 +1,4 @@ -/* Machine-specific pthread type layouts. C-SKY version. - Copyright (C) 2018-2019 Free Software Foundation, Inc. +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,28 +20,26 @@ #include -#define __SIZEOF_PTHREAD_ATTR_T 36 -#define __SIZEOF_PTHREAD_MUTEX_T 24 -#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 -#define __SIZEOF_PTHREAD_COND_T 48 -#define __SIZEOF_PTHREAD_CONDATTR_T 4 -#define __SIZEOF_PTHREAD_RWLOCK_T 32 -#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 -#define __SIZEOF_PTHREAD_BARRIER_T 20 -#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +#define __SIZEOF_PTHREAD_ATTR_T 36 +#define __SIZEOF_PTHREAD_MUTEX_T 24 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCK_T 32 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIER_T 20 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 -/* Data structure for mutex handling. */ +/* Data structure for mutex handling. */ #define __PTHREAD_COMPAT_PADDING_MID #define __PTHREAD_COMPAT_PADDING_END -#define __PTHREAD_MUTEX_LOCK_ELISION 0 -#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 -#define __PTHREAD_MUTEX_USE_UNION 1 +#define __PTHREAD_MUTEX_LOCK_ELISION 0 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 +#define __PTHREAD_MUTEX_USE_UNION 1 #define __LOCK_ALIGNMENT #define __ONCE_ALIGNMENT -/* Paddings in this structure are not strictly necessary on C-SKY. - They are left for extensibility as most other architecture do so. */ struct __pthread_rwlock_arch_t { unsigned int __readers; @@ -55,8 +52,12 @@ struct __pthread_rwlock_arch_t 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; @@ -67,4 +68,4 @@ struct __pthread_rwlock_arch_t #define __PTHREAD_RWLOCK_ELISION_EXTRA 0 -#endif +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/bits/semaphore.h b/libc/include/arm-linux-gnueabi/bits/semaphore.h new file mode 100644 index 0000000000..acde20be36 --- /dev/null +++ b/libc/include/arm-linux-gnueabi/bits/semaphore.h @@ -0,0 +1,34 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + + +#define __SIZEOF_SEM_T 16 + + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/bits/setjmp.h b/libc/include/arm-linux-gnueabi/bits/setjmp.h new file mode 100644 index 0000000000..2b50cca982 --- /dev/null +++ b/libc/include/arm-linux-gnueabi/bits/setjmp.h @@ -0,0 +1,36 @@ +/* Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 the machine-dependent type `jmp_buf'. ARM EABI version. */ + +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +#ifndef __ASSEMBLER__ +/* The exact set of registers saved may depend on the particular core + in use, as some coprocessor registers may need to be saved. The C + Library ABI requires that the buffer be 8-byte aligned, and + recommends that the buffer contain 64 words. The first 26 words + are occupied by sp, lr, v1-v6, sl, fp, and d8-d15. */ +typedef int __jmp_buf[64] __attribute__((__aligned__ (8))); +#endif + +#endif \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/bits/shmlba.h b/libc/include/arm-linux-gnueabi/bits/shmlba.h new file mode 100644 index 0000000000..53ceb23b31 --- /dev/null +++ b/libc/include/arm-linux-gnueabi/bits/shmlba.h @@ -0,0 +1,29 @@ +/* Define SHMLBA. ARM version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +__BEGIN_DECLS + +/* Segment low boundary address multiple. */ +#define SHMLBA (__getpagesize () << 2) +extern int __getpagesize (void) __THROW __attribute__ ((__const__)); + +__END_DECLS \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/bits/stat.h b/libc/include/arm-linux-gnueabi/bits/stat.h new file mode 100644 index 0000000000..16336f5ec1 --- /dev/null +++ b/libc/include/arm-linux-gnueabi/bits/stat.h @@ -0,0 +1,172 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_LINUX_OLD 1 +#define _STAT_VER_KERNEL 1 +#define _STAT_VER_SVR4 2 +#define _STAT_VER_LINUX 3 +#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 1 +#define _MKNOD_VER_SVR4 2 +#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ + + +struct stat + { + __dev_t st_dev; /* Device. */ + unsigned short int __pad1; +#ifndef __USE_FILE_OFFSET64 + __ino_t st_ino; /* File serial number. */ +#else + __ino_t __st_ino; /* 32bit file serial number. */ +#endif + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned short int __pad2; +#ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +#else + __off64_t st_size; /* Size of file, in bytes. */ +#endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +#ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +#else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#endif +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif +#ifndef __USE_FILE_OFFSET64 + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; +#else + __ino64_t st_ino; /* File serial number. */ +#endif + }; + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + unsigned int __pad1; + + __ino_t __st_ino; /* 32bit file serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + __ino64_t st_ino; /* File serial number. */ + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/bits/wordsize.h b/libc/include/arm-linux-gnueabi/bits/wordsize.h new file mode 100644 index 0000000000..3485a5acf2 --- /dev/null +++ b/libc/include/arm-linux-gnueabi/bits/wordsize.h @@ -0,0 +1,21 @@ +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/arm-linux-gnueabi/fpu_control.h b/libc/include/arm-linux-gnueabi/fpu_control.h new file mode 100644 index 0000000000..9d6c65112e --- /dev/null +++ b/libc/include/arm-linux-gnueabi/fpu_control.h @@ -0,0 +1,75 @@ +/* FPU control word definitions. ARM VFP version. + Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FPU_CONTROL_H +#define _FPU_CONTROL_H + +#if !(defined(_LIBC) && !defined(_LIBC_TEST)) && defined(__SOFTFP__) + +#define _FPU_RESERVED 0xffffffff +#define _FPU_DEFAULT 0x00000000 +typedef unsigned int fpu_control_t; +#define _FPU_GETCW(cw) (cw) = 0 +#define _FPU_SETCW(cw) (void) (cw) +extern fpu_control_t __fpu_control; + +#else + +/* masking of interrupts */ +#define _FPU_MASK_IM 0x00000100 /* invalid operation */ +#define _FPU_MASK_ZM 0x00000200 /* divide by zero */ +#define _FPU_MASK_OM 0x00000400 /* overflow */ +#define _FPU_MASK_UM 0x00000800 /* underflow */ +#define _FPU_MASK_PM 0x00001000 /* inexact */ + +#define _FPU_MASK_NZCV 0xf0000000 /* NZCV flags */ +#define _FPU_MASK_RM 0x00c00000 /* rounding mode */ +#define _FPU_MASK_EXCEPT 0x00001f1f /* all exception flags */ + +/* Some bits in the FPSCR are not yet defined. They must be preserved when + modifying the contents. */ +#define _FPU_RESERVED 0x00086060 +#define _FPU_DEFAULT 0x00000000 + +/* Default + exceptions enabled. */ +#define _FPU_IEEE (_FPU_DEFAULT | 0x00001f00) + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. */ +#ifdef __SOFTFP__ +/* This is fmrx %0, fpscr. */ +# define _FPU_GETCW(cw) \ + __asm__ __volatile__ ("mrc p10, 7, %0, cr1, cr0, 0" : "=r" (cw)) +/* This is fmxr fpscr, %0. */ +# define _FPU_SETCW(cw) \ + __asm__ __volatile__ ("mcr p10, 7, %0, cr1, cr0, 0" : : "r" (cw)) +#else +# define _FPU_GETCW(cw) \ + __asm__ __volatile__ ("vmrs %0, fpscr" : "=r" (cw)) +# define _FPU_SETCW(cw) \ + __asm__ __volatile__ ("vmsr fpscr, %0" : : "r" (cw)) +#endif + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* __SOFTFP__ */ + +#endif /* _FPU_CONTROL_H */ \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/gnu/lib-names.h b/libc/include/arm-linux-gnueabi/gnu/lib-names.h new file mode 100644 index 0000000000..96ed86de39 --- /dev/null +++ b/libc/include/arm-linux-gnueabi/gnu/lib-names.h @@ -0,0 +1,14 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#if !defined __ARM_PCS_VFP +# include +#endif +#if defined __ARM_PCS_VFP +# include +#endif + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/gnu/stubs.h b/libc/include/arm-linux-gnueabi/gnu/stubs.h new file mode 100644 index 0000000000..eb2222497a --- /dev/null +++ b/libc/include/arm-linux-gnueabi/gnu/stubs.h @@ -0,0 +1,11 @@ +/* This file is automatically generated. + This file selects the right generated file of `__stub_FUNCTION' macros + based on the architecture being compiled for. */ + + +#if !defined __ARM_PCS_VFP +# include +#endif +#if defined __ARM_PCS_VFP +# include +#endif \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/sys/ptrace.h b/libc/include/arm-linux-gnueabi/sys/ptrace.h new file mode 100644 index 0000000000..22d2bb12d4 --- /dev/null +++ b/libc/include/arm-linux-gnueabi/sys/ptrace.h @@ -0,0 +1,208 @@ +/* `ptrace' debugger support interface. Linux/ARM version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include +#include + +__BEGIN_DECLS + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Get all general purpose registers used by a process. */ + PTRACE_GETREGS = 12, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a process. */ + PTRACE_SETREGS = 13, +#define PT_SETREGS PTRACE_SETREGS + + /* Get all floating point registers used by a process. */ + PTRACE_GETFPREGS = 14, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a process. */ + PTRACE_SETFPREGS = 15, +#define PT_SETFPREGS PTRACE_SETFPREGS + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Get the iWMMXt state of a process. */ + PTRACE_GETWMMXREGS = 18, +#define PT_GETWMMXREGS PTRACE_GETWMMXREGS + + /* Set the iWMMXt state of a process. */ + PTRACE_SETWMMXREGS = 19, +#define PT_SETWMMXREGS PTRACE_SETWMMXREGS + + /* Get the thread pointer of a process. */ + PTRACE_GET_THREAD_AREA = 22, +#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA + + /* Change the syscall number of a process. */ + PTRACE_SET_SYSCALL = 23, +#define PT_SET_SYSCALL PTRACE_SET_SYSCALL + + /* Continue and stop at the next entry to or return from syscall. */ + PTRACE_SYSCALL = 24, +#define PT_SYSCALL PTRACE_SYSCALL + + /* Get the Crunch state of a process. */ + PTRACE_GETCRUNCHREGS = 25, +#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS + + /* Set the Crunch state of a process. */ + PTRACE_SETCRUNCHREGS = 26, +#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS + + /* Get all VFP registers used by a process. */ + PTRACE_GETVFPREGS = 27, +#define PT_GETVFPREGS PTRACE_GETVFPREGS + + /* Set all VFP registers used by a process. */ + PTRACE_SETVFPREGS = 28, +#define PT_SETVFPREGS PTRACE_SETVFPREGS + + /* Get all hardware breakpoint registers. */ + PTRACE_GETHBPREGS = 29, +#define PT_GETHBPREGS PTRACE_GETHBPREGS + + /* Set all hardware breakpoint registers. */ + PTRACE_SETHBPREGS = 30, +#define PT_SETHBPREGS PTRACE_SETHBPREGS + + /* Get the ELF fdpic loadmap address. */ + PTRACE_GETFDPIC = 31, +#define PT_GETFDPIC PTRACE_GETFDPIC + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + /* Retrieve siginfo_t structures without removing signals from a queue. */ + PTRACE_PEEKSIGINFO = 0x4209, +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO + + /* Get the mask of blocked signals. */ + PTRACE_GETSIGMASK = 0x420a, +#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK + + /* Change the mask of blocked signals. */ + PTRACE_SETSIGMASK = 0x420b, +#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK + + /* Get seccomp BPF filters. */ + PTRACE_SECCOMP_GET_FILTER = 0x420c, +#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER + + /* Get seccomp BPF filter metadata. */ + PTRACE_SECCOMP_GET_METADATA = 0x420d +#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA +}; + + +#include + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/sys/ucontext.h b/libc/include/arm-linux-gnueabi/sys/ucontext.h new file mode 100644 index 0000000000..79b51c3f94 --- /dev/null +++ b/libc/include/arm-linux-gnueabi/sys/ucontext.h @@ -0,0 +1,144 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* System V/ARM ABI compliant context switching support. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include + + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + +#ifdef __USE_MISC +typedef int greg_t; + +/* Number of general registers. */ +# define NGREG 18 + +/* Container for all general registers. */ +typedef greg_t gregset_t[NGREG]; + +/* Number of each register is the `gregset_t' array. */ +enum +{ + REG_R0 = 0, +# define REG_R0 REG_R0 + REG_R1 = 1, +# define REG_R1 REG_R1 + REG_R2 = 2, +# define REG_R2 REG_R2 + REG_R3 = 3, +# define REG_R3 REG_R3 + REG_R4 = 4, +# define REG_R4 REG_R4 + REG_R5 = 5, +# define REG_R5 REG_R5 + REG_R6 = 6, +# define REG_R6 REG_R6 + REG_R7 = 7, +# define REG_R7 REG_R7 + REG_R8 = 8, +# define REG_R8 REG_R8 + REG_R9 = 9, +# define REG_R9 REG_R9 + REG_R10 = 10, +# define REG_R10 REG_R10 + REG_R11 = 11, +# define REG_R11 REG_R11 + REG_R12 = 12, +# define REG_R12 REG_R12 + REG_R13 = 13, +# define REG_R13 REG_R13 + REG_R14 = 14, +# define REG_R14 REG_R14 + REG_R15 = 15 +# define REG_R15 REG_R15 +}; + +struct _libc_fpstate +{ + struct + { + unsigned int sign1:1; + unsigned int unused:15; + unsigned int sign2:1; + unsigned int exponent:14; + unsigned int j:1; + unsigned int mantissa1:31; + unsigned int mantissa0:32; + } fpregs[8]; + unsigned int fpsr:32; + unsigned int fpcr:32; + unsigned char ftype[8]; + unsigned int init_flag; +}; +/* Structure to describe FPU registers. */ +typedef struct _libc_fpstate fpregset_t; +#endif + +/* Context to describe whole processor state. This only describes + the core registers; coprocessor registers get saved elsewhere + (e.g. in uc_regspace, or somewhere unspecified on the stack + during non-RT signal handlers). */ +typedef struct + { + unsigned long int __ctx(trap_no); + unsigned long int __ctx(error_code); + unsigned long int __ctx(oldmask); + unsigned long int __ctx(arm_r0); + unsigned long int __ctx(arm_r1); + unsigned long int __ctx(arm_r2); + unsigned long int __ctx(arm_r3); + unsigned long int __ctx(arm_r4); + unsigned long int __ctx(arm_r5); + unsigned long int __ctx(arm_r6); + unsigned long int __ctx(arm_r7); + unsigned long int __ctx(arm_r8); + unsigned long int __ctx(arm_r9); + unsigned long int __ctx(arm_r10); + unsigned long int __ctx(arm_fp); + unsigned long int __ctx(arm_ip); + unsigned long int __ctx(arm_sp); + unsigned long int __ctx(arm_lr); + unsigned long int __ctx(arm_pc); + unsigned long int __ctx(arm_cpsr); + unsigned long int __ctx(fault_address); + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long __ctx(uc_flags); + struct ucontext_t *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; + unsigned long __ctx(uc_regspace)[128] __attribute__((__aligned__(8))); + } ucontext_t; + +#undef __ctx + +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabi/sys/user.h b/libc/include/arm-linux-gnueabi/sys/user.h new file mode 100644 index 0000000000..4916f5c018 --- /dev/null +++ b/libc/include/arm-linux-gnueabi/sys/user.h @@ -0,0 +1,71 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H +#define _SYS_USER_H 1 + +/* The whole purpose of this file is for GDB and GDB only. Don't read + too much into it. Don't use it for anything other than GDB unless + you know what you are doing. */ + +struct user_fpregs +{ + struct fp_reg + { + unsigned int sign1:1; + unsigned int unused:15; + unsigned int sign2:1; + unsigned int exponent:14; + unsigned int j:1; + unsigned int mantissa1:31; + unsigned int mantissa0:32; + } fpregs[8]; + unsigned int fpsr:32; + unsigned int fpcr:32; + unsigned char ftype[8]; + unsigned int init_flag; +}; + +struct user_regs +{ + unsigned long int uregs[18]; +}; + +struct user +{ + struct user_regs regs; /* General registers */ + int u_fpvalid; /* True if math co-processor being used. */ + + unsigned long int u_tsize; /* Text segment size (pages). */ + unsigned long int u_dsize; /* Data segment size (pages). */ + unsigned long int u_ssize; /* Stack segment size (pages). */ + + unsigned long start_code; /* Starting virtual address of text. */ + unsigned long start_stack; /* Starting virtual address of stack. */ + + long int signal; /* Signal that caused the core dump. */ + int reserved; /* No longer used */ + struct user_regs *u_ar0; /* help gdb to find the general registers. */ + + unsigned long magic; /* uniquely identify a core file */ + char u_comm[32]; /* User command that was responsible */ + int u_debugreg[8]; + struct user_fpregs u_fp; /* Floating point registers */ + struct user_fpregs *u_fp0; /* help gdb to find the FP registers. */ +}; + +#endif /* sys/user.h */ \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/asm/unistd.h b/libc/include/arm-linux-gnueabihf/asm/unistd.h new file mode 100644 index 0000000000..93ecf8aa4f --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/asm/unistd.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * arch/arm/include/asm/unistd.h + * + * Copyright (C) 2001-2005 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Please forward _all_ changes to this file to rmk@arm.linux.org.uk, + * no matter what the change is. Thanks! + */ +#ifndef _UAPI__ASM_ARM_UNISTD_H +#define _UAPI__ASM_ARM_UNISTD_H + +#define __NR_OABI_SYSCALL_BASE 0x900000 + +#if defined(__thumb__) || defined(__ARM_EABI__) +#define __NR_SYSCALL_BASE 0 +#include +#else +#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE +#include +#endif + +#include +#define __NR_sync_file_range2 __NR_arm_sync_file_range + +/* + * The following SWIs are ARM private. + */ +#define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) +#define __ARM_NR_breakpoint (__ARM_NR_BASE+1) +#define __ARM_NR_cacheflush (__ARM_NR_BASE+2) +#define __ARM_NR_usr26 (__ARM_NR_BASE+3) +#define __ARM_NR_usr32 (__ARM_NR_BASE+4) +#define __ARM_NR_set_tls (__ARM_NR_BASE+5) +#define __ARM_NR_get_tls (__ARM_NR_BASE+6) + +#endif /* _UAPI__ASM_ARM_UNISTD_H */ diff --git a/libc/include/arm-linux-gnueabihf/bits/endian.h b/libc/include/arm-linux-gnueabihf/bits/endian.h new file mode 100644 index 0000000000..8325d51253 --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/bits/endian.h @@ -0,0 +1,10 @@ +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* ARM can be either big or little endian. */ +#ifdef __ARMEB__ +#define __BYTE_ORDER __BIG_ENDIAN +#else +#define __BYTE_ORDER __LITTLE_ENDIAN +#endif \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/bits/fcntl.h b/libc/include/arm-linux-gnueabihf/bits/fcntl.h new file mode 100644 index 0000000000..77edfb78fb --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/bits/fcntl.h @@ -0,0 +1,54 @@ +/* O_*, F_*, FD_* bit values for Linux. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#define __O_DIRECTORY 040000 /* Must be a directory. */ +#define __O_NOFOLLOW 0100000 /* Do not follow links. */ +#define __O_DIRECT 0200000 /* Direct disk access. */ +#define __O_LARGEFILE 0400000 + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/bits/fenv.h b/libc/include/arm-linux-gnueabihf/bits/fenv.h new file mode 100644 index 0000000000..b8fbba6258 --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/bits/fenv.h @@ -0,0 +1,90 @@ +/* Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + +/* Define bits representing exceptions in the FPU status word. */ +enum + { + FE_INVALID = +#define FE_INVALID 1 + FE_INVALID, + FE_DIVBYZERO = +#define FE_DIVBYZERO 2 + FE_DIVBYZERO, + FE_OVERFLOW = +#define FE_OVERFLOW 4 + FE_OVERFLOW, + FE_UNDERFLOW = +#define FE_UNDERFLOW 8 + FE_UNDERFLOW, + FE_INEXACT = +#define FE_INEXACT 16 + FE_INEXACT, + }; + +/* Amount to shift by to convert an exception to a mask bit. */ +#define FE_EXCEPT_SHIFT 8 + +/* All supported exceptions. */ +#define FE_ALL_EXCEPT \ + (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) + +/* VFP supports all of the four defined rounding modes. */ +enum + { + FE_TONEAREST = +#define FE_TONEAREST 0 + FE_TONEAREST, + FE_UPWARD = +#define FE_UPWARD 0x400000 + FE_UPWARD, + FE_DOWNWARD = +#define FE_DOWNWARD 0x800000 + FE_DOWNWARD, + FE_TOWARDZERO = +#define FE_TOWARDZERO 0xc00000 + FE_TOWARDZERO + }; + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + +/* Type representing floating-point environment. */ +typedef struct + { + unsigned int __cw; + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((const fenv_t *) -1l) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exceptions are masked. */ +# define FE_NOMASK_ENV ((const fenv_t *) -2) +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef unsigned int femode_t; + +/* Default floating-point control modes. */ +# define FE_DFL_MODE ((const femode_t *) -1L) +#endif \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/bits/floatn.h b/libc/include/arm-linux-gnueabihf/bits/floatn.h new file mode 100644 index 0000000000..24852b6800 --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/bits/floatn.h @@ -0,0 +1,52 @@ +/* Macros to control TS 18661-3 glibc features. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/arm-linux-gnueabihf/bits/hwcap.h b/libc/include/arm-linux-gnueabihf/bits/hwcap.h new file mode 100644 index 0000000000..a31befca4e --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/bits/hwcap.h @@ -0,0 +1,45 @@ +/* Defines for bits in AT_HWCAP. ARM Linux version. + Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined (_SYS_AUXV_H) && !defined (_LINUX_ARM_SYSDEP_H) +# error "Never include directly; use instead." +#endif + +/* The following must match the kernel's . */ +#define HWCAP_ARM_SWP 1 +#define HWCAP_ARM_HALF 2 +#define HWCAP_ARM_THUMB 4 +#define HWCAP_ARM_26BIT 8 +#define HWCAP_ARM_FAST_MULT 16 +#define HWCAP_ARM_FPA 32 +#define HWCAP_ARM_VFP 64 +#define HWCAP_ARM_EDSP 128 +#define HWCAP_ARM_JAVA 256 +#define HWCAP_ARM_IWMMXT 512 +#define HWCAP_ARM_CRUNCH 1024 +#define HWCAP_ARM_THUMBEE 2048 +#define HWCAP_ARM_NEON 4096 +#define HWCAP_ARM_VFPv3 8192 +#define HWCAP_ARM_VFPv3D16 16384 +#define HWCAP_ARM_TLS 32768 +#define HWCAP_ARM_VFPv4 65536 +#define HWCAP_ARM_IDIVA 131072 +#define HWCAP_ARM_IDIVT 262144 +#define HWCAP_ARM_VFPD32 524288 +#define HWCAP_ARM_LPAE 1048576 +#define HWCAP_ARM_EVTSTRM 2097152 \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/bits/link.h b/libc/include/arm-linux-gnueabihf/bits/link.h new file mode 100644 index 0000000000..5dee177ce6 --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/bits/link.h @@ -0,0 +1,65 @@ +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + + +/* Registers for entry into PLT on ARM. */ +typedef struct La_arm_regs +{ + uint32_t lr_reg[4]; + uint32_t lr_sp; + uint32_t lr_lr; + /* Coprocessor registers used for argument passing. The data + stored here depends on the coprocessors available in the + system which are used for function calls in the current ABI. + VFP uses eight 64-bit registers, and iWMMXt uses ten. */ + uint32_t lr_coproc[42]; +} La_arm_regs; + +/* Return values for calls from PLT on ARM. */ +typedef struct La_arm_retval +{ + /* Up to four integer registers can be used for a return value in + some ABIs (APCS complex long double). */ + uint32_t lrv_reg[4]; + + /* Any coprocessor registers which might be used to return values + in the current ABI. */ + uint32_t lrv_coproc[12]; +} La_arm_retval; + + +__BEGIN_DECLS + +extern Elf32_Addr la_arm_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_arm_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_arm_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_arm_regs *__inregs, + La_arm_retval *__outregs, + const char *__symname); + +__END_DECLS \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/bits/long-double.h b/libc/include/arm-linux-gnueabihf/bits/long-double.h new file mode 100644 index 0000000000..125807d07a --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/bits/long-double.h @@ -0,0 +1,39 @@ +/* Properties of long double type. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* This header is included by . + + If long double is ABI-compatible with double, it should define + __NO_LONG_DOUBLE_MATH to 1; otherwise, it should leave + __NO_LONG_DOUBLE_MATH undefined. + + If this build of the GNU C Library supports both long double + ABI-compatible with double and some other long double format not + ABI-compatible with double, it should define + __LONG_DOUBLE_MATH_OPTIONAL to 1; otherwise, it should leave + __LONG_DOUBLE_MATH_OPTIONAL undefined. + + If __NO_LONG_DOUBLE_MATH is already defined, this header must not + define anything; this is needed to work with the definition of + __NO_LONG_DOUBLE_MATH in nldbl-compat.h. */ + +/* In the default version of this header, long double is + ABI-compatible with double. */ +#ifndef __NO_LONG_DOUBLE_MATH +# define __NO_LONG_DOUBLE_MATH 1 +#endif \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/bits/procfs-id.h b/libc/include/arm-linux-gnueabihf/bits/procfs-id.h new file mode 100644 index 0000000000..35582db16f --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/bits/procfs-id.h @@ -0,0 +1,25 @@ +/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +typedef unsigned short int __pr_uid_t; +typedef unsigned short int __pr_gid_t; \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/bits/procfs.h b/libc/include/arm-linux-gnueabihf/bits/procfs.h new file mode 100644 index 0000000000..3e91a588d8 --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/bits/procfs.h @@ -0,0 +1,34 @@ +/* Types for registers for sys/procfs.h. Arm version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +/* Type for a general-purpose register. */ +typedef unsigned long elf_greg_t; + +/* And the whole bunch of them. We could have used `struct + user_regs' directly in the typedef, but tradition says that + the register set is an array, which does have some peculiar + semantics, so leave it that way. */ +#define ELF_NGREG (sizeof (struct user_regs) / sizeof (elf_greg_t)) +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +/* Register set for the floating-point registers. */ +typedef struct user_fpregs elf_fpregset_t; \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/bits/pthreadtypes-arch.h b/libc/include/arm-linux-gnueabihf/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..c46bf4f3fd --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/bits/pthreadtypes-arch.h @@ -0,0 +1,71 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#define __SIZEOF_PTHREAD_ATTR_T 36 +#define __SIZEOF_PTHREAD_MUTEX_T 24 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCK_T 32 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIER_T 20 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +/* Data structure for mutex handling. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 0 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 +#define __PTHREAD_MUTEX_USE_UNION 1 + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +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 __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; +}; + +#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 + +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/bits/semaphore.h b/libc/include/arm-linux-gnueabihf/bits/semaphore.h new file mode 100644 index 0000000000..acde20be36 --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/bits/semaphore.h @@ -0,0 +1,34 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + + +#define __SIZEOF_SEM_T 16 + + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/bits/setjmp.h b/libc/include/arm-linux-gnueabihf/bits/setjmp.h new file mode 100644 index 0000000000..2b50cca982 --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/bits/setjmp.h @@ -0,0 +1,36 @@ +/* Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 the machine-dependent type `jmp_buf'. ARM EABI version. */ + +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +#ifndef __ASSEMBLER__ +/* The exact set of registers saved may depend on the particular core + in use, as some coprocessor registers may need to be saved. The C + Library ABI requires that the buffer be 8-byte aligned, and + recommends that the buffer contain 64 words. The first 26 words + are occupied by sp, lr, v1-v6, sl, fp, and d8-d15. */ +typedef int __jmp_buf[64] __attribute__((__aligned__ (8))); +#endif + +#endif \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/bits/shmlba.h b/libc/include/arm-linux-gnueabihf/bits/shmlba.h new file mode 100644 index 0000000000..53ceb23b31 --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/bits/shmlba.h @@ -0,0 +1,29 @@ +/* Define SHMLBA. ARM version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +__BEGIN_DECLS + +/* Segment low boundary address multiple. */ +#define SHMLBA (__getpagesize () << 2) +extern int __getpagesize (void) __THROW __attribute__ ((__const__)); + +__END_DECLS \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/bits/stat.h b/libc/include/arm-linux-gnueabihf/bits/stat.h new file mode 100644 index 0000000000..16336f5ec1 --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/bits/stat.h @@ -0,0 +1,172 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_LINUX_OLD 1 +#define _STAT_VER_KERNEL 1 +#define _STAT_VER_SVR4 2 +#define _STAT_VER_LINUX 3 +#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 1 +#define _MKNOD_VER_SVR4 2 +#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ + + +struct stat + { + __dev_t st_dev; /* Device. */ + unsigned short int __pad1; +#ifndef __USE_FILE_OFFSET64 + __ino_t st_ino; /* File serial number. */ +#else + __ino_t __st_ino; /* 32bit file serial number. */ +#endif + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned short int __pad2; +#ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +#else + __off64_t st_size; /* Size of file, in bytes. */ +#endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +#ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +#else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#endif +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif +#ifndef __USE_FILE_OFFSET64 + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; +#else + __ino64_t st_ino; /* File serial number. */ +#endif + }; + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + unsigned int __pad1; + + __ino_t __st_ino; /* 32bit file serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + __ino64_t st_ino; /* File serial number. */ + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/bits/wordsize.h b/libc/include/arm-linux-gnueabihf/bits/wordsize.h new file mode 100644 index 0000000000..3485a5acf2 --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/bits/wordsize.h @@ -0,0 +1,21 @@ +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/arm-linux-gnueabihf/fpu_control.h b/libc/include/arm-linux-gnueabihf/fpu_control.h new file mode 100644 index 0000000000..9d6c65112e --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/fpu_control.h @@ -0,0 +1,75 @@ +/* FPU control word definitions. ARM VFP version. + Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FPU_CONTROL_H +#define _FPU_CONTROL_H + +#if !(defined(_LIBC) && !defined(_LIBC_TEST)) && defined(__SOFTFP__) + +#define _FPU_RESERVED 0xffffffff +#define _FPU_DEFAULT 0x00000000 +typedef unsigned int fpu_control_t; +#define _FPU_GETCW(cw) (cw) = 0 +#define _FPU_SETCW(cw) (void) (cw) +extern fpu_control_t __fpu_control; + +#else + +/* masking of interrupts */ +#define _FPU_MASK_IM 0x00000100 /* invalid operation */ +#define _FPU_MASK_ZM 0x00000200 /* divide by zero */ +#define _FPU_MASK_OM 0x00000400 /* overflow */ +#define _FPU_MASK_UM 0x00000800 /* underflow */ +#define _FPU_MASK_PM 0x00001000 /* inexact */ + +#define _FPU_MASK_NZCV 0xf0000000 /* NZCV flags */ +#define _FPU_MASK_RM 0x00c00000 /* rounding mode */ +#define _FPU_MASK_EXCEPT 0x00001f1f /* all exception flags */ + +/* Some bits in the FPSCR are not yet defined. They must be preserved when + modifying the contents. */ +#define _FPU_RESERVED 0x00086060 +#define _FPU_DEFAULT 0x00000000 + +/* Default + exceptions enabled. */ +#define _FPU_IEEE (_FPU_DEFAULT | 0x00001f00) + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. */ +#ifdef __SOFTFP__ +/* This is fmrx %0, fpscr. */ +# define _FPU_GETCW(cw) \ + __asm__ __volatile__ ("mrc p10, 7, %0, cr1, cr0, 0" : "=r" (cw)) +/* This is fmxr fpscr, %0. */ +# define _FPU_SETCW(cw) \ + __asm__ __volatile__ ("mcr p10, 7, %0, cr1, cr0, 0" : : "r" (cw)) +#else +# define _FPU_GETCW(cw) \ + __asm__ __volatile__ ("vmrs %0, fpscr" : "=r" (cw)) +# define _FPU_SETCW(cw) \ + __asm__ __volatile__ ("vmsr fpscr, %0" : : "r" (cw)) +#endif + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* __SOFTFP__ */ + +#endif /* _FPU_CONTROL_H */ \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/gnu/lib-names.h b/libc/include/arm-linux-gnueabihf/gnu/lib-names.h new file mode 100644 index 0000000000..96ed86de39 --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/gnu/lib-names.h @@ -0,0 +1,14 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#if !defined __ARM_PCS_VFP +# include +#endif +#if defined __ARM_PCS_VFP +# include +#endif + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/gnu/stubs.h b/libc/include/arm-linux-gnueabihf/gnu/stubs.h new file mode 100644 index 0000000000..eb2222497a --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/gnu/stubs.h @@ -0,0 +1,11 @@ +/* This file is automatically generated. + This file selects the right generated file of `__stub_FUNCTION' macros + based on the architecture being compiled for. */ + + +#if !defined __ARM_PCS_VFP +# include +#endif +#if defined __ARM_PCS_VFP +# include +#endif \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/sys/ptrace.h b/libc/include/arm-linux-gnueabihf/sys/ptrace.h new file mode 100644 index 0000000000..22d2bb12d4 --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/sys/ptrace.h @@ -0,0 +1,208 @@ +/* `ptrace' debugger support interface. Linux/ARM version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include +#include + +__BEGIN_DECLS + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Get all general purpose registers used by a process. */ + PTRACE_GETREGS = 12, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a process. */ + PTRACE_SETREGS = 13, +#define PT_SETREGS PTRACE_SETREGS + + /* Get all floating point registers used by a process. */ + PTRACE_GETFPREGS = 14, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a process. */ + PTRACE_SETFPREGS = 15, +#define PT_SETFPREGS PTRACE_SETFPREGS + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Get the iWMMXt state of a process. */ + PTRACE_GETWMMXREGS = 18, +#define PT_GETWMMXREGS PTRACE_GETWMMXREGS + + /* Set the iWMMXt state of a process. */ + PTRACE_SETWMMXREGS = 19, +#define PT_SETWMMXREGS PTRACE_SETWMMXREGS + + /* Get the thread pointer of a process. */ + PTRACE_GET_THREAD_AREA = 22, +#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA + + /* Change the syscall number of a process. */ + PTRACE_SET_SYSCALL = 23, +#define PT_SET_SYSCALL PTRACE_SET_SYSCALL + + /* Continue and stop at the next entry to or return from syscall. */ + PTRACE_SYSCALL = 24, +#define PT_SYSCALL PTRACE_SYSCALL + + /* Get the Crunch state of a process. */ + PTRACE_GETCRUNCHREGS = 25, +#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS + + /* Set the Crunch state of a process. */ + PTRACE_SETCRUNCHREGS = 26, +#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS + + /* Get all VFP registers used by a process. */ + PTRACE_GETVFPREGS = 27, +#define PT_GETVFPREGS PTRACE_GETVFPREGS + + /* Set all VFP registers used by a process. */ + PTRACE_SETVFPREGS = 28, +#define PT_SETVFPREGS PTRACE_SETVFPREGS + + /* Get all hardware breakpoint registers. */ + PTRACE_GETHBPREGS = 29, +#define PT_GETHBPREGS PTRACE_GETHBPREGS + + /* Set all hardware breakpoint registers. */ + PTRACE_SETHBPREGS = 30, +#define PT_SETHBPREGS PTRACE_SETHBPREGS + + /* Get the ELF fdpic loadmap address. */ + PTRACE_GETFDPIC = 31, +#define PT_GETFDPIC PTRACE_GETFDPIC + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + /* Retrieve siginfo_t structures without removing signals from a queue. */ + PTRACE_PEEKSIGINFO = 0x4209, +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO + + /* Get the mask of blocked signals. */ + PTRACE_GETSIGMASK = 0x420a, +#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK + + /* Change the mask of blocked signals. */ + PTRACE_SETSIGMASK = 0x420b, +#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK + + /* Get seccomp BPF filters. */ + PTRACE_SECCOMP_GET_FILTER = 0x420c, +#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER + + /* Get seccomp BPF filter metadata. */ + PTRACE_SECCOMP_GET_METADATA = 0x420d +#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA +}; + + +#include + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/sys/ucontext.h b/libc/include/arm-linux-gnueabihf/sys/ucontext.h new file mode 100644 index 0000000000..79b51c3f94 --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/sys/ucontext.h @@ -0,0 +1,144 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* System V/ARM ABI compliant context switching support. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include + + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + +#ifdef __USE_MISC +typedef int greg_t; + +/* Number of general registers. */ +# define NGREG 18 + +/* Container for all general registers. */ +typedef greg_t gregset_t[NGREG]; + +/* Number of each register is the `gregset_t' array. */ +enum +{ + REG_R0 = 0, +# define REG_R0 REG_R0 + REG_R1 = 1, +# define REG_R1 REG_R1 + REG_R2 = 2, +# define REG_R2 REG_R2 + REG_R3 = 3, +# define REG_R3 REG_R3 + REG_R4 = 4, +# define REG_R4 REG_R4 + REG_R5 = 5, +# define REG_R5 REG_R5 + REG_R6 = 6, +# define REG_R6 REG_R6 + REG_R7 = 7, +# define REG_R7 REG_R7 + REG_R8 = 8, +# define REG_R8 REG_R8 + REG_R9 = 9, +# define REG_R9 REG_R9 + REG_R10 = 10, +# define REG_R10 REG_R10 + REG_R11 = 11, +# define REG_R11 REG_R11 + REG_R12 = 12, +# define REG_R12 REG_R12 + REG_R13 = 13, +# define REG_R13 REG_R13 + REG_R14 = 14, +# define REG_R14 REG_R14 + REG_R15 = 15 +# define REG_R15 REG_R15 +}; + +struct _libc_fpstate +{ + struct + { + unsigned int sign1:1; + unsigned int unused:15; + unsigned int sign2:1; + unsigned int exponent:14; + unsigned int j:1; + unsigned int mantissa1:31; + unsigned int mantissa0:32; + } fpregs[8]; + unsigned int fpsr:32; + unsigned int fpcr:32; + unsigned char ftype[8]; + unsigned int init_flag; +}; +/* Structure to describe FPU registers. */ +typedef struct _libc_fpstate fpregset_t; +#endif + +/* Context to describe whole processor state. This only describes + the core registers; coprocessor registers get saved elsewhere + (e.g. in uc_regspace, or somewhere unspecified on the stack + during non-RT signal handlers). */ +typedef struct + { + unsigned long int __ctx(trap_no); + unsigned long int __ctx(error_code); + unsigned long int __ctx(oldmask); + unsigned long int __ctx(arm_r0); + unsigned long int __ctx(arm_r1); + unsigned long int __ctx(arm_r2); + unsigned long int __ctx(arm_r3); + unsigned long int __ctx(arm_r4); + unsigned long int __ctx(arm_r5); + unsigned long int __ctx(arm_r6); + unsigned long int __ctx(arm_r7); + unsigned long int __ctx(arm_r8); + unsigned long int __ctx(arm_r9); + unsigned long int __ctx(arm_r10); + unsigned long int __ctx(arm_fp); + unsigned long int __ctx(arm_ip); + unsigned long int __ctx(arm_sp); + unsigned long int __ctx(arm_lr); + unsigned long int __ctx(arm_pc); + unsigned long int __ctx(arm_cpsr); + unsigned long int __ctx(fault_address); + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long __ctx(uc_flags); + struct ucontext_t *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; + unsigned long __ctx(uc_regspace)[128] __attribute__((__aligned__(8))); + } ucontext_t; + +#undef __ctx + +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/include/arm-linux-gnueabihf/sys/user.h b/libc/include/arm-linux-gnueabihf/sys/user.h new file mode 100644 index 0000000000..4916f5c018 --- /dev/null +++ b/libc/include/arm-linux-gnueabihf/sys/user.h @@ -0,0 +1,71 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H +#define _SYS_USER_H 1 + +/* The whole purpose of this file is for GDB and GDB only. Don't read + too much into it. Don't use it for anything other than GDB unless + you know what you are doing. */ + +struct user_fpregs +{ + struct fp_reg + { + unsigned int sign1:1; + unsigned int unused:15; + unsigned int sign2:1; + unsigned int exponent:14; + unsigned int j:1; + unsigned int mantissa1:31; + unsigned int mantissa0:32; + } fpregs[8]; + unsigned int fpsr:32; + unsigned int fpcr:32; + unsigned char ftype[8]; + unsigned int init_flag; +}; + +struct user_regs +{ + unsigned long int uregs[18]; +}; + +struct user +{ + struct user_regs regs; /* General registers */ + int u_fpvalid; /* True if math co-processor being used. */ + + unsigned long int u_tsize; /* Text segment size (pages). */ + unsigned long int u_dsize; /* Data segment size (pages). */ + unsigned long int u_ssize; /* Stack segment size (pages). */ + + unsigned long start_code; /* Starting virtual address of text. */ + unsigned long start_stack; /* Starting virtual address of stack. */ + + long int signal; /* Signal that caused the core dump. */ + int reserved; /* No longer used */ + struct user_regs *u_ar0; /* help gdb to find the general registers. */ + + unsigned long magic; /* uniquely identify a core file */ + char u_comm[32]; /* User command that was responsible */ + int u_debugreg[8]; + struct user_fpregs u_fp; /* Floating point registers */ + struct user_fpregs *u_fp0; /* help gdb to find the FP registers. */ +}; + +#endif /* sys/user.h */ \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/asm/unistd.h b/libc/include/armeb-linux-gnueabi/asm/unistd.h new file mode 100644 index 0000000000..93ecf8aa4f --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/asm/unistd.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * arch/arm/include/asm/unistd.h + * + * Copyright (C) 2001-2005 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Please forward _all_ changes to this file to rmk@arm.linux.org.uk, + * no matter what the change is. Thanks! + */ +#ifndef _UAPI__ASM_ARM_UNISTD_H +#define _UAPI__ASM_ARM_UNISTD_H + +#define __NR_OABI_SYSCALL_BASE 0x900000 + +#if defined(__thumb__) || defined(__ARM_EABI__) +#define __NR_SYSCALL_BASE 0 +#include +#else +#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE +#include +#endif + +#include +#define __NR_sync_file_range2 __NR_arm_sync_file_range + +/* + * The following SWIs are ARM private. + */ +#define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) +#define __ARM_NR_breakpoint (__ARM_NR_BASE+1) +#define __ARM_NR_cacheflush (__ARM_NR_BASE+2) +#define __ARM_NR_usr26 (__ARM_NR_BASE+3) +#define __ARM_NR_usr32 (__ARM_NR_BASE+4) +#define __ARM_NR_set_tls (__ARM_NR_BASE+5) +#define __ARM_NR_get_tls (__ARM_NR_BASE+6) + +#endif /* _UAPI__ASM_ARM_UNISTD_H */ diff --git a/libc/include/armeb-linux-gnueabi/bits/endian.h b/libc/include/armeb-linux-gnueabi/bits/endian.h new file mode 100644 index 0000000000..8325d51253 --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/bits/endian.h @@ -0,0 +1,10 @@ +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* ARM can be either big or little endian. */ +#ifdef __ARMEB__ +#define __BYTE_ORDER __BIG_ENDIAN +#else +#define __BYTE_ORDER __LITTLE_ENDIAN +#endif \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/bits/fcntl.h b/libc/include/armeb-linux-gnueabi/bits/fcntl.h new file mode 100644 index 0000000000..77edfb78fb --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/bits/fcntl.h @@ -0,0 +1,54 @@ +/* O_*, F_*, FD_* bit values for Linux. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#define __O_DIRECTORY 040000 /* Must be a directory. */ +#define __O_NOFOLLOW 0100000 /* Do not follow links. */ +#define __O_DIRECT 0200000 /* Direct disk access. */ +#define __O_LARGEFILE 0400000 + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/bits/fenv.h b/libc/include/armeb-linux-gnueabi/bits/fenv.h new file mode 100644 index 0000000000..b8fbba6258 --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/bits/fenv.h @@ -0,0 +1,90 @@ +/* Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + +/* Define bits representing exceptions in the FPU status word. */ +enum + { + FE_INVALID = +#define FE_INVALID 1 + FE_INVALID, + FE_DIVBYZERO = +#define FE_DIVBYZERO 2 + FE_DIVBYZERO, + FE_OVERFLOW = +#define FE_OVERFLOW 4 + FE_OVERFLOW, + FE_UNDERFLOW = +#define FE_UNDERFLOW 8 + FE_UNDERFLOW, + FE_INEXACT = +#define FE_INEXACT 16 + FE_INEXACT, + }; + +/* Amount to shift by to convert an exception to a mask bit. */ +#define FE_EXCEPT_SHIFT 8 + +/* All supported exceptions. */ +#define FE_ALL_EXCEPT \ + (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) + +/* VFP supports all of the four defined rounding modes. */ +enum + { + FE_TONEAREST = +#define FE_TONEAREST 0 + FE_TONEAREST, + FE_UPWARD = +#define FE_UPWARD 0x400000 + FE_UPWARD, + FE_DOWNWARD = +#define FE_DOWNWARD 0x800000 + FE_DOWNWARD, + FE_TOWARDZERO = +#define FE_TOWARDZERO 0xc00000 + FE_TOWARDZERO + }; + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + +/* Type representing floating-point environment. */ +typedef struct + { + unsigned int __cw; + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((const fenv_t *) -1l) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exceptions are masked. */ +# define FE_NOMASK_ENV ((const fenv_t *) -2) +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef unsigned int femode_t; + +/* Default floating-point control modes. */ +# define FE_DFL_MODE ((const femode_t *) -1L) +#endif \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/bits/floatn.h b/libc/include/armeb-linux-gnueabi/bits/floatn.h new file mode 100644 index 0000000000..24852b6800 --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/bits/floatn.h @@ -0,0 +1,52 @@ +/* Macros to control TS 18661-3 glibc features. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/armeb-linux-gnueabi/bits/hwcap.h b/libc/include/armeb-linux-gnueabi/bits/hwcap.h new file mode 100644 index 0000000000..a31befca4e --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/bits/hwcap.h @@ -0,0 +1,45 @@ +/* Defines for bits in AT_HWCAP. ARM Linux version. + Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined (_SYS_AUXV_H) && !defined (_LINUX_ARM_SYSDEP_H) +# error "Never include directly; use instead." +#endif + +/* The following must match the kernel's . */ +#define HWCAP_ARM_SWP 1 +#define HWCAP_ARM_HALF 2 +#define HWCAP_ARM_THUMB 4 +#define HWCAP_ARM_26BIT 8 +#define HWCAP_ARM_FAST_MULT 16 +#define HWCAP_ARM_FPA 32 +#define HWCAP_ARM_VFP 64 +#define HWCAP_ARM_EDSP 128 +#define HWCAP_ARM_JAVA 256 +#define HWCAP_ARM_IWMMXT 512 +#define HWCAP_ARM_CRUNCH 1024 +#define HWCAP_ARM_THUMBEE 2048 +#define HWCAP_ARM_NEON 4096 +#define HWCAP_ARM_VFPv3 8192 +#define HWCAP_ARM_VFPv3D16 16384 +#define HWCAP_ARM_TLS 32768 +#define HWCAP_ARM_VFPv4 65536 +#define HWCAP_ARM_IDIVA 131072 +#define HWCAP_ARM_IDIVT 262144 +#define HWCAP_ARM_VFPD32 524288 +#define HWCAP_ARM_LPAE 1048576 +#define HWCAP_ARM_EVTSTRM 2097152 \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/bits/link.h b/libc/include/armeb-linux-gnueabi/bits/link.h new file mode 100644 index 0000000000..5dee177ce6 --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/bits/link.h @@ -0,0 +1,65 @@ +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + + +/* Registers for entry into PLT on ARM. */ +typedef struct La_arm_regs +{ + uint32_t lr_reg[4]; + uint32_t lr_sp; + uint32_t lr_lr; + /* Coprocessor registers used for argument passing. The data + stored here depends on the coprocessors available in the + system which are used for function calls in the current ABI. + VFP uses eight 64-bit registers, and iWMMXt uses ten. */ + uint32_t lr_coproc[42]; +} La_arm_regs; + +/* Return values for calls from PLT on ARM. */ +typedef struct La_arm_retval +{ + /* Up to four integer registers can be used for a return value in + some ABIs (APCS complex long double). */ + uint32_t lrv_reg[4]; + + /* Any coprocessor registers which might be used to return values + in the current ABI. */ + uint32_t lrv_coproc[12]; +} La_arm_retval; + + +__BEGIN_DECLS + +extern Elf32_Addr la_arm_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_arm_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_arm_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_arm_regs *__inregs, + La_arm_retval *__outregs, + const char *__symname); + +__END_DECLS \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/bits/long-double.h b/libc/include/armeb-linux-gnueabi/bits/long-double.h new file mode 100644 index 0000000000..125807d07a --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/bits/long-double.h @@ -0,0 +1,39 @@ +/* Properties of long double type. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* This header is included by . + + If long double is ABI-compatible with double, it should define + __NO_LONG_DOUBLE_MATH to 1; otherwise, it should leave + __NO_LONG_DOUBLE_MATH undefined. + + If this build of the GNU C Library supports both long double + ABI-compatible with double and some other long double format not + ABI-compatible with double, it should define + __LONG_DOUBLE_MATH_OPTIONAL to 1; otherwise, it should leave + __LONG_DOUBLE_MATH_OPTIONAL undefined. + + If __NO_LONG_DOUBLE_MATH is already defined, this header must not + define anything; this is needed to work with the definition of + __NO_LONG_DOUBLE_MATH in nldbl-compat.h. */ + +/* In the default version of this header, long double is + ABI-compatible with double. */ +#ifndef __NO_LONG_DOUBLE_MATH +# define __NO_LONG_DOUBLE_MATH 1 +#endif \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/bits/procfs-id.h b/libc/include/armeb-linux-gnueabi/bits/procfs-id.h new file mode 100644 index 0000000000..35582db16f --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/bits/procfs-id.h @@ -0,0 +1,25 @@ +/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +typedef unsigned short int __pr_uid_t; +typedef unsigned short int __pr_gid_t; \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/bits/procfs.h b/libc/include/armeb-linux-gnueabi/bits/procfs.h new file mode 100644 index 0000000000..3e91a588d8 --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/bits/procfs.h @@ -0,0 +1,34 @@ +/* Types for registers for sys/procfs.h. Arm version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +/* Type for a general-purpose register. */ +typedef unsigned long elf_greg_t; + +/* And the whole bunch of them. We could have used `struct + user_regs' directly in the typedef, but tradition says that + the register set is an array, which does have some peculiar + semantics, so leave it that way. */ +#define ELF_NGREG (sizeof (struct user_regs) / sizeof (elf_greg_t)) +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +/* Register set for the floating-point registers. */ +typedef struct user_fpregs elf_fpregset_t; \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/bits/pthreadtypes-arch.h b/libc/include/armeb-linux-gnueabi/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..c46bf4f3fd --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/bits/pthreadtypes-arch.h @@ -0,0 +1,71 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#define __SIZEOF_PTHREAD_ATTR_T 36 +#define __SIZEOF_PTHREAD_MUTEX_T 24 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCK_T 32 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIER_T 20 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +/* Data structure for mutex handling. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 0 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 +#define __PTHREAD_MUTEX_USE_UNION 1 + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +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 __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; +}; + +#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 + +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/bits/semaphore.h b/libc/include/armeb-linux-gnueabi/bits/semaphore.h new file mode 100644 index 0000000000..acde20be36 --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/bits/semaphore.h @@ -0,0 +1,34 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + + +#define __SIZEOF_SEM_T 16 + + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/bits/setjmp.h b/libc/include/armeb-linux-gnueabi/bits/setjmp.h new file mode 100644 index 0000000000..2b50cca982 --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/bits/setjmp.h @@ -0,0 +1,36 @@ +/* Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 the machine-dependent type `jmp_buf'. ARM EABI version. */ + +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +#ifndef __ASSEMBLER__ +/* The exact set of registers saved may depend on the particular core + in use, as some coprocessor registers may need to be saved. The C + Library ABI requires that the buffer be 8-byte aligned, and + recommends that the buffer contain 64 words. The first 26 words + are occupied by sp, lr, v1-v6, sl, fp, and d8-d15. */ +typedef int __jmp_buf[64] __attribute__((__aligned__ (8))); +#endif + +#endif \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/bits/shmlba.h b/libc/include/armeb-linux-gnueabi/bits/shmlba.h new file mode 100644 index 0000000000..53ceb23b31 --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/bits/shmlba.h @@ -0,0 +1,29 @@ +/* Define SHMLBA. ARM version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +__BEGIN_DECLS + +/* Segment low boundary address multiple. */ +#define SHMLBA (__getpagesize () << 2) +extern int __getpagesize (void) __THROW __attribute__ ((__const__)); + +__END_DECLS \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/bits/stat.h b/libc/include/armeb-linux-gnueabi/bits/stat.h new file mode 100644 index 0000000000..16336f5ec1 --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/bits/stat.h @@ -0,0 +1,172 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_LINUX_OLD 1 +#define _STAT_VER_KERNEL 1 +#define _STAT_VER_SVR4 2 +#define _STAT_VER_LINUX 3 +#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 1 +#define _MKNOD_VER_SVR4 2 +#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ + + +struct stat + { + __dev_t st_dev; /* Device. */ + unsigned short int __pad1; +#ifndef __USE_FILE_OFFSET64 + __ino_t st_ino; /* File serial number. */ +#else + __ino_t __st_ino; /* 32bit file serial number. */ +#endif + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned short int __pad2; +#ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +#else + __off64_t st_size; /* Size of file, in bytes. */ +#endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +#ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +#else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#endif +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif +#ifndef __USE_FILE_OFFSET64 + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; +#else + __ino64_t st_ino; /* File serial number. */ +#endif + }; + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + unsigned int __pad1; + + __ino_t __st_ino; /* 32bit file serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + __ino64_t st_ino; /* File serial number. */ + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/bits/wordsize.h b/libc/include/armeb-linux-gnueabi/bits/wordsize.h new file mode 100644 index 0000000000..3485a5acf2 --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/bits/wordsize.h @@ -0,0 +1,21 @@ +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/armeb-linux-gnueabi/fpu_control.h b/libc/include/armeb-linux-gnueabi/fpu_control.h new file mode 100644 index 0000000000..9d6c65112e --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/fpu_control.h @@ -0,0 +1,75 @@ +/* FPU control word definitions. ARM VFP version. + Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FPU_CONTROL_H +#define _FPU_CONTROL_H + +#if !(defined(_LIBC) && !defined(_LIBC_TEST)) && defined(__SOFTFP__) + +#define _FPU_RESERVED 0xffffffff +#define _FPU_DEFAULT 0x00000000 +typedef unsigned int fpu_control_t; +#define _FPU_GETCW(cw) (cw) = 0 +#define _FPU_SETCW(cw) (void) (cw) +extern fpu_control_t __fpu_control; + +#else + +/* masking of interrupts */ +#define _FPU_MASK_IM 0x00000100 /* invalid operation */ +#define _FPU_MASK_ZM 0x00000200 /* divide by zero */ +#define _FPU_MASK_OM 0x00000400 /* overflow */ +#define _FPU_MASK_UM 0x00000800 /* underflow */ +#define _FPU_MASK_PM 0x00001000 /* inexact */ + +#define _FPU_MASK_NZCV 0xf0000000 /* NZCV flags */ +#define _FPU_MASK_RM 0x00c00000 /* rounding mode */ +#define _FPU_MASK_EXCEPT 0x00001f1f /* all exception flags */ + +/* Some bits in the FPSCR are not yet defined. They must be preserved when + modifying the contents. */ +#define _FPU_RESERVED 0x00086060 +#define _FPU_DEFAULT 0x00000000 + +/* Default + exceptions enabled. */ +#define _FPU_IEEE (_FPU_DEFAULT | 0x00001f00) + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. */ +#ifdef __SOFTFP__ +/* This is fmrx %0, fpscr. */ +# define _FPU_GETCW(cw) \ + __asm__ __volatile__ ("mrc p10, 7, %0, cr1, cr0, 0" : "=r" (cw)) +/* This is fmxr fpscr, %0. */ +# define _FPU_SETCW(cw) \ + __asm__ __volatile__ ("mcr p10, 7, %0, cr1, cr0, 0" : : "r" (cw)) +#else +# define _FPU_GETCW(cw) \ + __asm__ __volatile__ ("vmrs %0, fpscr" : "=r" (cw)) +# define _FPU_SETCW(cw) \ + __asm__ __volatile__ ("vmsr fpscr, %0" : : "r" (cw)) +#endif + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* __SOFTFP__ */ + +#endif /* _FPU_CONTROL_H */ \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/gnu/lib-names.h b/libc/include/armeb-linux-gnueabi/gnu/lib-names.h new file mode 100644 index 0000000000..96ed86de39 --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/gnu/lib-names.h @@ -0,0 +1,14 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#if !defined __ARM_PCS_VFP +# include +#endif +#if defined __ARM_PCS_VFP +# include +#endif + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/gnu/stubs.h b/libc/include/armeb-linux-gnueabi/gnu/stubs.h new file mode 100644 index 0000000000..eb2222497a --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/gnu/stubs.h @@ -0,0 +1,11 @@ +/* This file is automatically generated. + This file selects the right generated file of `__stub_FUNCTION' macros + based on the architecture being compiled for. */ + + +#if !defined __ARM_PCS_VFP +# include +#endif +#if defined __ARM_PCS_VFP +# include +#endif \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/sys/ptrace.h b/libc/include/armeb-linux-gnueabi/sys/ptrace.h new file mode 100644 index 0000000000..22d2bb12d4 --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/sys/ptrace.h @@ -0,0 +1,208 @@ +/* `ptrace' debugger support interface. Linux/ARM version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include +#include + +__BEGIN_DECLS + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Get all general purpose registers used by a process. */ + PTRACE_GETREGS = 12, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a process. */ + PTRACE_SETREGS = 13, +#define PT_SETREGS PTRACE_SETREGS + + /* Get all floating point registers used by a process. */ + PTRACE_GETFPREGS = 14, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a process. */ + PTRACE_SETFPREGS = 15, +#define PT_SETFPREGS PTRACE_SETFPREGS + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Get the iWMMXt state of a process. */ + PTRACE_GETWMMXREGS = 18, +#define PT_GETWMMXREGS PTRACE_GETWMMXREGS + + /* Set the iWMMXt state of a process. */ + PTRACE_SETWMMXREGS = 19, +#define PT_SETWMMXREGS PTRACE_SETWMMXREGS + + /* Get the thread pointer of a process. */ + PTRACE_GET_THREAD_AREA = 22, +#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA + + /* Change the syscall number of a process. */ + PTRACE_SET_SYSCALL = 23, +#define PT_SET_SYSCALL PTRACE_SET_SYSCALL + + /* Continue and stop at the next entry to or return from syscall. */ + PTRACE_SYSCALL = 24, +#define PT_SYSCALL PTRACE_SYSCALL + + /* Get the Crunch state of a process. */ + PTRACE_GETCRUNCHREGS = 25, +#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS + + /* Set the Crunch state of a process. */ + PTRACE_SETCRUNCHREGS = 26, +#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS + + /* Get all VFP registers used by a process. */ + PTRACE_GETVFPREGS = 27, +#define PT_GETVFPREGS PTRACE_GETVFPREGS + + /* Set all VFP registers used by a process. */ + PTRACE_SETVFPREGS = 28, +#define PT_SETVFPREGS PTRACE_SETVFPREGS + + /* Get all hardware breakpoint registers. */ + PTRACE_GETHBPREGS = 29, +#define PT_GETHBPREGS PTRACE_GETHBPREGS + + /* Set all hardware breakpoint registers. */ + PTRACE_SETHBPREGS = 30, +#define PT_SETHBPREGS PTRACE_SETHBPREGS + + /* Get the ELF fdpic loadmap address. */ + PTRACE_GETFDPIC = 31, +#define PT_GETFDPIC PTRACE_GETFDPIC + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + /* Retrieve siginfo_t structures without removing signals from a queue. */ + PTRACE_PEEKSIGINFO = 0x4209, +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO + + /* Get the mask of blocked signals. */ + PTRACE_GETSIGMASK = 0x420a, +#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK + + /* Change the mask of blocked signals. */ + PTRACE_SETSIGMASK = 0x420b, +#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK + + /* Get seccomp BPF filters. */ + PTRACE_SECCOMP_GET_FILTER = 0x420c, +#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER + + /* Get seccomp BPF filter metadata. */ + PTRACE_SECCOMP_GET_METADATA = 0x420d +#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA +}; + + +#include + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/sys/ucontext.h b/libc/include/armeb-linux-gnueabi/sys/ucontext.h new file mode 100644 index 0000000000..79b51c3f94 --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/sys/ucontext.h @@ -0,0 +1,144 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* System V/ARM ABI compliant context switching support. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include + + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + +#ifdef __USE_MISC +typedef int greg_t; + +/* Number of general registers. */ +# define NGREG 18 + +/* Container for all general registers. */ +typedef greg_t gregset_t[NGREG]; + +/* Number of each register is the `gregset_t' array. */ +enum +{ + REG_R0 = 0, +# define REG_R0 REG_R0 + REG_R1 = 1, +# define REG_R1 REG_R1 + REG_R2 = 2, +# define REG_R2 REG_R2 + REG_R3 = 3, +# define REG_R3 REG_R3 + REG_R4 = 4, +# define REG_R4 REG_R4 + REG_R5 = 5, +# define REG_R5 REG_R5 + REG_R6 = 6, +# define REG_R6 REG_R6 + REG_R7 = 7, +# define REG_R7 REG_R7 + REG_R8 = 8, +# define REG_R8 REG_R8 + REG_R9 = 9, +# define REG_R9 REG_R9 + REG_R10 = 10, +# define REG_R10 REG_R10 + REG_R11 = 11, +# define REG_R11 REG_R11 + REG_R12 = 12, +# define REG_R12 REG_R12 + REG_R13 = 13, +# define REG_R13 REG_R13 + REG_R14 = 14, +# define REG_R14 REG_R14 + REG_R15 = 15 +# define REG_R15 REG_R15 +}; + +struct _libc_fpstate +{ + struct + { + unsigned int sign1:1; + unsigned int unused:15; + unsigned int sign2:1; + unsigned int exponent:14; + unsigned int j:1; + unsigned int mantissa1:31; + unsigned int mantissa0:32; + } fpregs[8]; + unsigned int fpsr:32; + unsigned int fpcr:32; + unsigned char ftype[8]; + unsigned int init_flag; +}; +/* Structure to describe FPU registers. */ +typedef struct _libc_fpstate fpregset_t; +#endif + +/* Context to describe whole processor state. This only describes + the core registers; coprocessor registers get saved elsewhere + (e.g. in uc_regspace, or somewhere unspecified on the stack + during non-RT signal handlers). */ +typedef struct + { + unsigned long int __ctx(trap_no); + unsigned long int __ctx(error_code); + unsigned long int __ctx(oldmask); + unsigned long int __ctx(arm_r0); + unsigned long int __ctx(arm_r1); + unsigned long int __ctx(arm_r2); + unsigned long int __ctx(arm_r3); + unsigned long int __ctx(arm_r4); + unsigned long int __ctx(arm_r5); + unsigned long int __ctx(arm_r6); + unsigned long int __ctx(arm_r7); + unsigned long int __ctx(arm_r8); + unsigned long int __ctx(arm_r9); + unsigned long int __ctx(arm_r10); + unsigned long int __ctx(arm_fp); + unsigned long int __ctx(arm_ip); + unsigned long int __ctx(arm_sp); + unsigned long int __ctx(arm_lr); + unsigned long int __ctx(arm_pc); + unsigned long int __ctx(arm_cpsr); + unsigned long int __ctx(fault_address); + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long __ctx(uc_flags); + struct ucontext_t *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; + unsigned long __ctx(uc_regspace)[128] __attribute__((__aligned__(8))); + } ucontext_t; + +#undef __ctx + +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabi/sys/user.h b/libc/include/armeb-linux-gnueabi/sys/user.h new file mode 100644 index 0000000000..4916f5c018 --- /dev/null +++ b/libc/include/armeb-linux-gnueabi/sys/user.h @@ -0,0 +1,71 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H +#define _SYS_USER_H 1 + +/* The whole purpose of this file is for GDB and GDB only. Don't read + too much into it. Don't use it for anything other than GDB unless + you know what you are doing. */ + +struct user_fpregs +{ + struct fp_reg + { + unsigned int sign1:1; + unsigned int unused:15; + unsigned int sign2:1; + unsigned int exponent:14; + unsigned int j:1; + unsigned int mantissa1:31; + unsigned int mantissa0:32; + } fpregs[8]; + unsigned int fpsr:32; + unsigned int fpcr:32; + unsigned char ftype[8]; + unsigned int init_flag; +}; + +struct user_regs +{ + unsigned long int uregs[18]; +}; + +struct user +{ + struct user_regs regs; /* General registers */ + int u_fpvalid; /* True if math co-processor being used. */ + + unsigned long int u_tsize; /* Text segment size (pages). */ + unsigned long int u_dsize; /* Data segment size (pages). */ + unsigned long int u_ssize; /* Stack segment size (pages). */ + + unsigned long start_code; /* Starting virtual address of text. */ + unsigned long start_stack; /* Starting virtual address of stack. */ + + long int signal; /* Signal that caused the core dump. */ + int reserved; /* No longer used */ + struct user_regs *u_ar0; /* help gdb to find the general registers. */ + + unsigned long magic; /* uniquely identify a core file */ + char u_comm[32]; /* User command that was responsible */ + int u_debugreg[8]; + struct user_fpregs u_fp; /* Floating point registers */ + struct user_fpregs *u_fp0; /* help gdb to find the FP registers. */ +}; + +#endif /* sys/user.h */ \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/asm/unistd.h b/libc/include/armeb-linux-gnueabihf/asm/unistd.h new file mode 100644 index 0000000000..93ecf8aa4f --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/asm/unistd.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * arch/arm/include/asm/unistd.h + * + * Copyright (C) 2001-2005 Russell King + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Please forward _all_ changes to this file to rmk@arm.linux.org.uk, + * no matter what the change is. Thanks! + */ +#ifndef _UAPI__ASM_ARM_UNISTD_H +#define _UAPI__ASM_ARM_UNISTD_H + +#define __NR_OABI_SYSCALL_BASE 0x900000 + +#if defined(__thumb__) || defined(__ARM_EABI__) +#define __NR_SYSCALL_BASE 0 +#include +#else +#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE +#include +#endif + +#include +#define __NR_sync_file_range2 __NR_arm_sync_file_range + +/* + * The following SWIs are ARM private. + */ +#define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000) +#define __ARM_NR_breakpoint (__ARM_NR_BASE+1) +#define __ARM_NR_cacheflush (__ARM_NR_BASE+2) +#define __ARM_NR_usr26 (__ARM_NR_BASE+3) +#define __ARM_NR_usr32 (__ARM_NR_BASE+4) +#define __ARM_NR_set_tls (__ARM_NR_BASE+5) +#define __ARM_NR_get_tls (__ARM_NR_BASE+6) + +#endif /* _UAPI__ASM_ARM_UNISTD_H */ diff --git a/libc/include/armeb-linux-gnueabihf/bits/endian.h b/libc/include/armeb-linux-gnueabihf/bits/endian.h new file mode 100644 index 0000000000..8325d51253 --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/bits/endian.h @@ -0,0 +1,10 @@ +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +/* ARM can be either big or little endian. */ +#ifdef __ARMEB__ +#define __BYTE_ORDER __BIG_ENDIAN +#else +#define __BYTE_ORDER __LITTLE_ENDIAN +#endif \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/bits/fcntl.h b/libc/include/armeb-linux-gnueabihf/bits/fcntl.h new file mode 100644 index 0000000000..77edfb78fb --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/bits/fcntl.h @@ -0,0 +1,54 @@ +/* O_*, F_*, FD_* bit values for Linux. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#define __O_DIRECTORY 040000 /* Must be a directory. */ +#define __O_NOFOLLOW 0100000 /* Do not follow links. */ +#define __O_DIRECT 0200000 /* Direct disk access. */ +#define __O_LARGEFILE 0400000 + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/bits/fenv.h b/libc/include/armeb-linux-gnueabihf/bits/fenv.h new file mode 100644 index 0000000000..b8fbba6258 --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/bits/fenv.h @@ -0,0 +1,90 @@ +/* Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + +/* Define bits representing exceptions in the FPU status word. */ +enum + { + FE_INVALID = +#define FE_INVALID 1 + FE_INVALID, + FE_DIVBYZERO = +#define FE_DIVBYZERO 2 + FE_DIVBYZERO, + FE_OVERFLOW = +#define FE_OVERFLOW 4 + FE_OVERFLOW, + FE_UNDERFLOW = +#define FE_UNDERFLOW 8 + FE_UNDERFLOW, + FE_INEXACT = +#define FE_INEXACT 16 + FE_INEXACT, + }; + +/* Amount to shift by to convert an exception to a mask bit. */ +#define FE_EXCEPT_SHIFT 8 + +/* All supported exceptions. */ +#define FE_ALL_EXCEPT \ + (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT) + +/* VFP supports all of the four defined rounding modes. */ +enum + { + FE_TONEAREST = +#define FE_TONEAREST 0 + FE_TONEAREST, + FE_UPWARD = +#define FE_UPWARD 0x400000 + FE_UPWARD, + FE_DOWNWARD = +#define FE_DOWNWARD 0x800000 + FE_DOWNWARD, + FE_TOWARDZERO = +#define FE_TOWARDZERO 0xc00000 + FE_TOWARDZERO + }; + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + +/* Type representing floating-point environment. */ +typedef struct + { + unsigned int __cw; + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((const fenv_t *) -1l) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exceptions are masked. */ +# define FE_NOMASK_ENV ((const fenv_t *) -2) +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef unsigned int femode_t; + +/* Default floating-point control modes. */ +# define FE_DFL_MODE ((const femode_t *) -1L) +#endif \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/bits/floatn.h b/libc/include/armeb-linux-gnueabihf/bits/floatn.h new file mode 100644 index 0000000000..24852b6800 --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/bits/floatn.h @@ -0,0 +1,52 @@ +/* Macros to control TS 18661-3 glibc features. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/armeb-linux-gnueabihf/bits/hwcap.h b/libc/include/armeb-linux-gnueabihf/bits/hwcap.h new file mode 100644 index 0000000000..a31befca4e --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/bits/hwcap.h @@ -0,0 +1,45 @@ +/* Defines for bits in AT_HWCAP. ARM Linux version. + Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined (_SYS_AUXV_H) && !defined (_LINUX_ARM_SYSDEP_H) +# error "Never include directly; use instead." +#endif + +/* The following must match the kernel's . */ +#define HWCAP_ARM_SWP 1 +#define HWCAP_ARM_HALF 2 +#define HWCAP_ARM_THUMB 4 +#define HWCAP_ARM_26BIT 8 +#define HWCAP_ARM_FAST_MULT 16 +#define HWCAP_ARM_FPA 32 +#define HWCAP_ARM_VFP 64 +#define HWCAP_ARM_EDSP 128 +#define HWCAP_ARM_JAVA 256 +#define HWCAP_ARM_IWMMXT 512 +#define HWCAP_ARM_CRUNCH 1024 +#define HWCAP_ARM_THUMBEE 2048 +#define HWCAP_ARM_NEON 4096 +#define HWCAP_ARM_VFPv3 8192 +#define HWCAP_ARM_VFPv3D16 16384 +#define HWCAP_ARM_TLS 32768 +#define HWCAP_ARM_VFPv4 65536 +#define HWCAP_ARM_IDIVA 131072 +#define HWCAP_ARM_IDIVT 262144 +#define HWCAP_ARM_VFPD32 524288 +#define HWCAP_ARM_LPAE 1048576 +#define HWCAP_ARM_EVTSTRM 2097152 \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/bits/link.h b/libc/include/armeb-linux-gnueabihf/bits/link.h new file mode 100644 index 0000000000..5dee177ce6 --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/bits/link.h @@ -0,0 +1,65 @@ +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + + +/* Registers for entry into PLT on ARM. */ +typedef struct La_arm_regs +{ + uint32_t lr_reg[4]; + uint32_t lr_sp; + uint32_t lr_lr; + /* Coprocessor registers used for argument passing. The data + stored here depends on the coprocessors available in the + system which are used for function calls in the current ABI. + VFP uses eight 64-bit registers, and iWMMXt uses ten. */ + uint32_t lr_coproc[42]; +} La_arm_regs; + +/* Return values for calls from PLT on ARM. */ +typedef struct La_arm_retval +{ + /* Up to four integer registers can be used for a return value in + some ABIs (APCS complex long double). */ + uint32_t lrv_reg[4]; + + /* Any coprocessor registers which might be used to return values + in the current ABI. */ + uint32_t lrv_coproc[12]; +} La_arm_retval; + + +__BEGIN_DECLS + +extern Elf32_Addr la_arm_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_arm_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_arm_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_arm_regs *__inregs, + La_arm_retval *__outregs, + const char *__symname); + +__END_DECLS \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/bits/long-double.h b/libc/include/armeb-linux-gnueabihf/bits/long-double.h new file mode 100644 index 0000000000..125807d07a --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/bits/long-double.h @@ -0,0 +1,39 @@ +/* Properties of long double type. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* This header is included by . + + If long double is ABI-compatible with double, it should define + __NO_LONG_DOUBLE_MATH to 1; otherwise, it should leave + __NO_LONG_DOUBLE_MATH undefined. + + If this build of the GNU C Library supports both long double + ABI-compatible with double and some other long double format not + ABI-compatible with double, it should define + __LONG_DOUBLE_MATH_OPTIONAL to 1; otherwise, it should leave + __LONG_DOUBLE_MATH_OPTIONAL undefined. + + If __NO_LONG_DOUBLE_MATH is already defined, this header must not + define anything; this is needed to work with the definition of + __NO_LONG_DOUBLE_MATH in nldbl-compat.h. */ + +/* In the default version of this header, long double is + ABI-compatible with double. */ +#ifndef __NO_LONG_DOUBLE_MATH +# define __NO_LONG_DOUBLE_MATH 1 +#endif \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/bits/procfs-id.h b/libc/include/armeb-linux-gnueabihf/bits/procfs-id.h new file mode 100644 index 0000000000..35582db16f --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/bits/procfs-id.h @@ -0,0 +1,25 @@ +/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Arm version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +typedef unsigned short int __pr_uid_t; +typedef unsigned short int __pr_gid_t; \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/bits/procfs.h b/libc/include/armeb-linux-gnueabihf/bits/procfs.h new file mode 100644 index 0000000000..3e91a588d8 --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/bits/procfs.h @@ -0,0 +1,34 @@ +/* Types for registers for sys/procfs.h. Arm version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +/* Type for a general-purpose register. */ +typedef unsigned long elf_greg_t; + +/* And the whole bunch of them. We could have used `struct + user_regs' directly in the typedef, but tradition says that + the register set is an array, which does have some peculiar + semantics, so leave it that way. */ +#define ELF_NGREG (sizeof (struct user_regs) / sizeof (elf_greg_t)) +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +/* Register set for the floating-point registers. */ +typedef struct user_fpregs elf_fpregset_t; \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/bits/pthreadtypes-arch.h b/libc/include/armeb-linux-gnueabihf/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..c46bf4f3fd --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/bits/pthreadtypes-arch.h @@ -0,0 +1,71 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#define __SIZEOF_PTHREAD_ATTR_T 36 +#define __SIZEOF_PTHREAD_MUTEX_T 24 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCK_T 32 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIER_T 20 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +/* Data structure for mutex handling. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 0 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 +#define __PTHREAD_MUTEX_USE_UNION 1 + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +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 __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; +}; + +#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 + +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/bits/semaphore.h b/libc/include/armeb-linux-gnueabihf/bits/semaphore.h new file mode 100644 index 0000000000..acde20be36 --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/bits/semaphore.h @@ -0,0 +1,34 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + + +#define __SIZEOF_SEM_T 16 + + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/bits/setjmp.h b/libc/include/armeb-linux-gnueabihf/bits/setjmp.h new file mode 100644 index 0000000000..2b50cca982 --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/bits/setjmp.h @@ -0,0 +1,36 @@ +/* Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 the machine-dependent type `jmp_buf'. ARM EABI version. */ + +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +#ifndef __ASSEMBLER__ +/* The exact set of registers saved may depend on the particular core + in use, as some coprocessor registers may need to be saved. The C + Library ABI requires that the buffer be 8-byte aligned, and + recommends that the buffer contain 64 words. The first 26 words + are occupied by sp, lr, v1-v6, sl, fp, and d8-d15. */ +typedef int __jmp_buf[64] __attribute__((__aligned__ (8))); +#endif + +#endif \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/bits/shmlba.h b/libc/include/armeb-linux-gnueabihf/bits/shmlba.h new file mode 100644 index 0000000000..53ceb23b31 --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/bits/shmlba.h @@ -0,0 +1,29 @@ +/* Define SHMLBA. ARM version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +__BEGIN_DECLS + +/* Segment low boundary address multiple. */ +#define SHMLBA (__getpagesize () << 2) +extern int __getpagesize (void) __THROW __attribute__ ((__const__)); + +__END_DECLS \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/bits/stat.h b/libc/include/armeb-linux-gnueabihf/bits/stat.h new file mode 100644 index 0000000000..16336f5ec1 --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/bits/stat.h @@ -0,0 +1,172 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_LINUX_OLD 1 +#define _STAT_VER_KERNEL 1 +#define _STAT_VER_SVR4 2 +#define _STAT_VER_LINUX 3 +#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 1 +#define _MKNOD_VER_SVR4 2 +#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ + + +struct stat + { + __dev_t st_dev; /* Device. */ + unsigned short int __pad1; +#ifndef __USE_FILE_OFFSET64 + __ino_t st_ino; /* File serial number. */ +#else + __ino_t __st_ino; /* 32bit file serial number. */ +#endif + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned short int __pad2; +#ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +#else + __off64_t st_size; /* Size of file, in bytes. */ +#endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +#ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +#else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#endif +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif +#ifndef __USE_FILE_OFFSET64 + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; +#else + __ino64_t st_ino; /* File serial number. */ +#endif + }; + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + unsigned int __pad1; + + __ino_t __st_ino; /* 32bit file serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + __ino64_t st_ino; /* File serial number. */ + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/bits/wordsize.h b/libc/include/armeb-linux-gnueabihf/bits/wordsize.h new file mode 100644 index 0000000000..3485a5acf2 --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/bits/wordsize.h @@ -0,0 +1,21 @@ +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/armeb-linux-gnueabihf/fpu_control.h b/libc/include/armeb-linux-gnueabihf/fpu_control.h new file mode 100644 index 0000000000..9d6c65112e --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/fpu_control.h @@ -0,0 +1,75 @@ +/* FPU control word definitions. ARM VFP version. + Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FPU_CONTROL_H +#define _FPU_CONTROL_H + +#if !(defined(_LIBC) && !defined(_LIBC_TEST)) && defined(__SOFTFP__) + +#define _FPU_RESERVED 0xffffffff +#define _FPU_DEFAULT 0x00000000 +typedef unsigned int fpu_control_t; +#define _FPU_GETCW(cw) (cw) = 0 +#define _FPU_SETCW(cw) (void) (cw) +extern fpu_control_t __fpu_control; + +#else + +/* masking of interrupts */ +#define _FPU_MASK_IM 0x00000100 /* invalid operation */ +#define _FPU_MASK_ZM 0x00000200 /* divide by zero */ +#define _FPU_MASK_OM 0x00000400 /* overflow */ +#define _FPU_MASK_UM 0x00000800 /* underflow */ +#define _FPU_MASK_PM 0x00001000 /* inexact */ + +#define _FPU_MASK_NZCV 0xf0000000 /* NZCV flags */ +#define _FPU_MASK_RM 0x00c00000 /* rounding mode */ +#define _FPU_MASK_EXCEPT 0x00001f1f /* all exception flags */ + +/* Some bits in the FPSCR are not yet defined. They must be preserved when + modifying the contents. */ +#define _FPU_RESERVED 0x00086060 +#define _FPU_DEFAULT 0x00000000 + +/* Default + exceptions enabled. */ +#define _FPU_IEEE (_FPU_DEFAULT | 0x00001f00) + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. */ +#ifdef __SOFTFP__ +/* This is fmrx %0, fpscr. */ +# define _FPU_GETCW(cw) \ + __asm__ __volatile__ ("mrc p10, 7, %0, cr1, cr0, 0" : "=r" (cw)) +/* This is fmxr fpscr, %0. */ +# define _FPU_SETCW(cw) \ + __asm__ __volatile__ ("mcr p10, 7, %0, cr1, cr0, 0" : : "r" (cw)) +#else +# define _FPU_GETCW(cw) \ + __asm__ __volatile__ ("vmrs %0, fpscr" : "=r" (cw)) +# define _FPU_SETCW(cw) \ + __asm__ __volatile__ ("vmsr fpscr, %0" : : "r" (cw)) +#endif + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* __SOFTFP__ */ + +#endif /* _FPU_CONTROL_H */ \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/gnu/lib-names.h b/libc/include/armeb-linux-gnueabihf/gnu/lib-names.h new file mode 100644 index 0000000000..96ed86de39 --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/gnu/lib-names.h @@ -0,0 +1,14 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#if !defined __ARM_PCS_VFP +# include +#endif +#if defined __ARM_PCS_VFP +# include +#endif + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/gnu/stubs.h b/libc/include/armeb-linux-gnueabihf/gnu/stubs.h new file mode 100644 index 0000000000..eb2222497a --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/gnu/stubs.h @@ -0,0 +1,11 @@ +/* This file is automatically generated. + This file selects the right generated file of `__stub_FUNCTION' macros + based on the architecture being compiled for. */ + + +#if !defined __ARM_PCS_VFP +# include +#endif +#if defined __ARM_PCS_VFP +# include +#endif \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/sys/ptrace.h b/libc/include/armeb-linux-gnueabihf/sys/ptrace.h new file mode 100644 index 0000000000..22d2bb12d4 --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/sys/ptrace.h @@ -0,0 +1,208 @@ +/* `ptrace' debugger support interface. Linux/ARM version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include +#include + +__BEGIN_DECLS + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Get all general purpose registers used by a process. */ + PTRACE_GETREGS = 12, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a process. */ + PTRACE_SETREGS = 13, +#define PT_SETREGS PTRACE_SETREGS + + /* Get all floating point registers used by a process. */ + PTRACE_GETFPREGS = 14, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a process. */ + PTRACE_SETFPREGS = 15, +#define PT_SETFPREGS PTRACE_SETFPREGS + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Get the iWMMXt state of a process. */ + PTRACE_GETWMMXREGS = 18, +#define PT_GETWMMXREGS PTRACE_GETWMMXREGS + + /* Set the iWMMXt state of a process. */ + PTRACE_SETWMMXREGS = 19, +#define PT_SETWMMXREGS PTRACE_SETWMMXREGS + + /* Get the thread pointer of a process. */ + PTRACE_GET_THREAD_AREA = 22, +#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA + + /* Change the syscall number of a process. */ + PTRACE_SET_SYSCALL = 23, +#define PT_SET_SYSCALL PTRACE_SET_SYSCALL + + /* Continue and stop at the next entry to or return from syscall. */ + PTRACE_SYSCALL = 24, +#define PT_SYSCALL PTRACE_SYSCALL + + /* Get the Crunch state of a process. */ + PTRACE_GETCRUNCHREGS = 25, +#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS + + /* Set the Crunch state of a process. */ + PTRACE_SETCRUNCHREGS = 26, +#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS + + /* Get all VFP registers used by a process. */ + PTRACE_GETVFPREGS = 27, +#define PT_GETVFPREGS PTRACE_GETVFPREGS + + /* Set all VFP registers used by a process. */ + PTRACE_SETVFPREGS = 28, +#define PT_SETVFPREGS PTRACE_SETVFPREGS + + /* Get all hardware breakpoint registers. */ + PTRACE_GETHBPREGS = 29, +#define PT_GETHBPREGS PTRACE_GETHBPREGS + + /* Set all hardware breakpoint registers. */ + PTRACE_SETHBPREGS = 30, +#define PT_SETHBPREGS PTRACE_SETHBPREGS + + /* Get the ELF fdpic loadmap address. */ + PTRACE_GETFDPIC = 31, +#define PT_GETFDPIC PTRACE_GETFDPIC + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + /* Retrieve siginfo_t structures without removing signals from a queue. */ + PTRACE_PEEKSIGINFO = 0x4209, +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO + + /* Get the mask of blocked signals. */ + PTRACE_GETSIGMASK = 0x420a, +#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK + + /* Change the mask of blocked signals. */ + PTRACE_SETSIGMASK = 0x420b, +#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK + + /* Get seccomp BPF filters. */ + PTRACE_SECCOMP_GET_FILTER = 0x420c, +#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER + + /* Get seccomp BPF filter metadata. */ + PTRACE_SECCOMP_GET_METADATA = 0x420d +#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA +}; + + +#include + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/sys/ucontext.h b/libc/include/armeb-linux-gnueabihf/sys/ucontext.h new file mode 100644 index 0000000000..79b51c3f94 --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/sys/ucontext.h @@ -0,0 +1,144 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* System V/ARM ABI compliant context switching support. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include + + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + +#ifdef __USE_MISC +typedef int greg_t; + +/* Number of general registers. */ +# define NGREG 18 + +/* Container for all general registers. */ +typedef greg_t gregset_t[NGREG]; + +/* Number of each register is the `gregset_t' array. */ +enum +{ + REG_R0 = 0, +# define REG_R0 REG_R0 + REG_R1 = 1, +# define REG_R1 REG_R1 + REG_R2 = 2, +# define REG_R2 REG_R2 + REG_R3 = 3, +# define REG_R3 REG_R3 + REG_R4 = 4, +# define REG_R4 REG_R4 + REG_R5 = 5, +# define REG_R5 REG_R5 + REG_R6 = 6, +# define REG_R6 REG_R6 + REG_R7 = 7, +# define REG_R7 REG_R7 + REG_R8 = 8, +# define REG_R8 REG_R8 + REG_R9 = 9, +# define REG_R9 REG_R9 + REG_R10 = 10, +# define REG_R10 REG_R10 + REG_R11 = 11, +# define REG_R11 REG_R11 + REG_R12 = 12, +# define REG_R12 REG_R12 + REG_R13 = 13, +# define REG_R13 REG_R13 + REG_R14 = 14, +# define REG_R14 REG_R14 + REG_R15 = 15 +# define REG_R15 REG_R15 +}; + +struct _libc_fpstate +{ + struct + { + unsigned int sign1:1; + unsigned int unused:15; + unsigned int sign2:1; + unsigned int exponent:14; + unsigned int j:1; + unsigned int mantissa1:31; + unsigned int mantissa0:32; + } fpregs[8]; + unsigned int fpsr:32; + unsigned int fpcr:32; + unsigned char ftype[8]; + unsigned int init_flag; +}; +/* Structure to describe FPU registers. */ +typedef struct _libc_fpstate fpregset_t; +#endif + +/* Context to describe whole processor state. This only describes + the core registers; coprocessor registers get saved elsewhere + (e.g. in uc_regspace, or somewhere unspecified on the stack + during non-RT signal handlers). */ +typedef struct + { + unsigned long int __ctx(trap_no); + unsigned long int __ctx(error_code); + unsigned long int __ctx(oldmask); + unsigned long int __ctx(arm_r0); + unsigned long int __ctx(arm_r1); + unsigned long int __ctx(arm_r2); + unsigned long int __ctx(arm_r3); + unsigned long int __ctx(arm_r4); + unsigned long int __ctx(arm_r5); + unsigned long int __ctx(arm_r6); + unsigned long int __ctx(arm_r7); + unsigned long int __ctx(arm_r8); + unsigned long int __ctx(arm_r9); + unsigned long int __ctx(arm_r10); + unsigned long int __ctx(arm_fp); + unsigned long int __ctx(arm_ip); + unsigned long int __ctx(arm_sp); + unsigned long int __ctx(arm_lr); + unsigned long int __ctx(arm_pc); + unsigned long int __ctx(arm_cpsr); + unsigned long int __ctx(fault_address); + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long __ctx(uc_flags); + struct ucontext_t *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; + unsigned long __ctx(uc_regspace)[128] __attribute__((__aligned__(8))); + } ucontext_t; + +#undef __ctx + +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/include/armeb-linux-gnueabihf/sys/user.h b/libc/include/armeb-linux-gnueabihf/sys/user.h new file mode 100644 index 0000000000..4916f5c018 --- /dev/null +++ b/libc/include/armeb-linux-gnueabihf/sys/user.h @@ -0,0 +1,71 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H +#define _SYS_USER_H 1 + +/* The whole purpose of this file is for GDB and GDB only. Don't read + too much into it. Don't use it for anything other than GDB unless + you know what you are doing. */ + +struct user_fpregs +{ + struct fp_reg + { + unsigned int sign1:1; + unsigned int unused:15; + unsigned int sign2:1; + unsigned int exponent:14; + unsigned int j:1; + unsigned int mantissa1:31; + unsigned int mantissa0:32; + } fpregs[8]; + unsigned int fpsr:32; + unsigned int fpcr:32; + unsigned char ftype[8]; + unsigned int init_flag; +}; + +struct user_regs +{ + unsigned long int uregs[18]; +}; + +struct user +{ + struct user_regs regs; /* General registers */ + int u_fpvalid; /* True if math co-processor being used. */ + + unsigned long int u_tsize; /* Text segment size (pages). */ + unsigned long int u_dsize; /* Data segment size (pages). */ + unsigned long int u_ssize; /* Stack segment size (pages). */ + + unsigned long start_code; /* Starting virtual address of text. */ + unsigned long start_stack; /* Starting virtual address of stack. */ + + long int signal; /* Signal that caused the core dump. */ + int reserved; /* No longer used */ + struct user_regs *u_ar0; /* help gdb to find the general registers. */ + + unsigned long magic; /* uniquely identify a core file */ + char u_comm[32]; /* User command that was responsible */ + int u_debugreg[8]; + struct user_fpregs u_fp; /* Floating point registers */ + struct user_fpregs *u_fp0; /* help gdb to find the FP registers. */ +}; + +#endif /* sys/user.h */ \ No newline at end of file diff --git a/libc/glibc-include/a.out.h b/libc/include/generic-glibc/a.out.h similarity index 96% rename from libc/glibc-include/a.out.h rename to libc/include/generic-glibc/a.out.h index e3f4bdd08f..5682d0af28 100644 --- a/libc/glibc-include/a.out.h +++ b/libc/include/generic-glibc/a.out.h @@ -64,8 +64,8 @@ enum machine_type && N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC) #define _N_HDROFF(x) (1024 - sizeof (struct exec)) #define N_TXTOFF(x) \ - (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) : \ - (N_MAGIC(x) == QMAGIC ? 0 : sizeof (struct exec))) + (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) \ + : (N_MAGIC(x) == QMAGIC ? 0 : sizeof (struct exec))) #define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text) #define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data) #define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x)) @@ -135,4 +135,4 @@ struct relocation_info }; #endif /* no N_RELOCATION_INFO_DECLARED. */ -#endif /* __A_OUT_GNU_H__ */ +#endif /* __A_OUT_GNU_H__ */ \ No newline at end of file diff --git a/libc/glibc-include/aio.h b/libc/include/generic-glibc/aio.h similarity index 99% rename from libc/glibc-include/aio.h rename to libc/include/generic-glibc/aio.h index d1b97bf0e4..ed7b8bb86f 100644 --- a/libc/glibc-include/aio.h +++ b/libc/include/generic-glibc/aio.h @@ -242,4 +242,4 @@ extern int aio_fsync64 (int __operation, struct aiocb64 *__aiocbp) __END_DECLS -#endif /* aio.h */ +#endif /* aio.h */ \ No newline at end of file diff --git a/libc/glibc-include/aliases.h b/libc/include/generic-glibc/aliases.h similarity index 98% rename from libc/glibc-include/aliases.h rename to libc/include/generic-glibc/aliases.h index 67828ca7b6..a671290051 100644 --- a/libc/glibc-include/aliases.h +++ b/libc/include/generic-glibc/aliases.h @@ -60,4 +60,4 @@ extern int getaliasbyname_r (const char *__restrict __name, __END_DECLS -#endif /* aliases.h */ +#endif /* aliases.h */ \ No newline at end of file diff --git a/libc/glibc-include/alloca.h b/libc/include/generic-glibc/alloca.h similarity index 98% rename from libc/glibc-include/alloca.h rename to libc/include/generic-glibc/alloca.h index ff85901357..a1b60a3dbd 100644 --- a/libc/glibc-include/alloca.h +++ b/libc/include/generic-glibc/alloca.h @@ -37,4 +37,4 @@ extern void *alloca (size_t __size) __THROW; __END_DECLS -#endif /* alloca.h */ +#endif /* alloca.h */ \ No newline at end of file diff --git a/libc/glibc-include/ar.h b/libc/include/generic-glibc/ar.h similarity index 98% rename from libc/glibc-include/ar.h rename to libc/include/generic-glibc/ar.h index ef2303ecfe..d9aa7daad6 100644 --- a/libc/glibc-include/ar.h +++ b/libc/include/generic-glibc/ar.h @@ -44,4 +44,4 @@ struct ar_hdr __END_DECLS -#endif /* ar.h */ +#endif /* ar.h */ \ No newline at end of file diff --git a/libc/glibc-include/argp.h b/libc/include/generic-glibc/argp.h similarity index 99% rename from libc/glibc-include/argp.h rename to libc/include/generic-glibc/argp.h index fae6dfb3ef..ce61b300f4 100644 --- a/libc/glibc-include/argp.h +++ b/libc/include/generic-glibc/argp.h @@ -554,6 +554,10 @@ __NTH (__option_is_end (const struct argp_option *__opt)) # endif #endif /* Use extern inlines. */ +#ifdef __LDBL_COMPAT +# include +#endif + __END_DECLS -#endif /* argp.h */ +#endif /* argp.h */ \ No newline at end of file diff --git a/libc/glibc-include/argz.h b/libc/include/generic-glibc/argz.h similarity index 99% rename from libc/glibc-include/argz.h rename to libc/include/generic-glibc/argz.h index 53ff409948..c880c8bded 100644 --- a/libc/glibc-include/argz.h +++ b/libc/include/generic-glibc/argz.h @@ -153,4 +153,4 @@ __NTH (argz_next (const char *__argz, size_t __argz_len, __END_DECLS -#endif /* argz.h */ +#endif /* argz.h */ \ No newline at end of file diff --git a/libc/glibc-include/arpa/ftp.h b/libc/include/generic-glibc/arpa/ftp.h similarity index 99% rename from libc/glibc-include/arpa/ftp.h rename to libc/include/generic-glibc/arpa/ftp.h index e5b340db12..47e4fa9e2b 100644 --- a/libc/glibc-include/arpa/ftp.h +++ b/libc/include/generic-glibc/arpa/ftp.h @@ -102,4 +102,4 @@ char *modenames[] = {"0", "Stream", "Block", "Compressed" }; #define BLK_BYTECOUNT 2 /* Bytes in this block */ -#endif /* arpa/ftp.h */ +#endif /* arpa/ftp.h */ \ No newline at end of file diff --git a/libc/glibc-include/arpa/inet.h b/libc/include/generic-glibc/arpa/inet.h similarity index 99% rename from libc/glibc-include/arpa/inet.h rename to libc/include/generic-glibc/arpa/inet.h index 4db2087af8..580ec2e668 100644 --- a/libc/glibc-include/arpa/inet.h +++ b/libc/include/generic-glibc/arpa/inet.h @@ -102,4 +102,4 @@ extern char *inet_nsap_ntoa (int __len, const unsigned char *__cp, __END_DECLS -#endif /* arpa/inet.h */ +#endif /* arpa/inet.h */ \ No newline at end of file diff --git a/libc/glibc-include/arpa/nameser.h b/libc/include/generic-glibc/arpa/nameser.h similarity index 99% rename from libc/glibc-include/arpa/nameser.h rename to libc/include/generic-glibc/arpa/nameser.h index a99d5ec508..0e049d3f6a 100644 --- a/libc/glibc-include/arpa/nameser.h +++ b/libc/include/generic-glibc/arpa/nameser.h @@ -440,4 +440,4 @@ __END_DECLS #include #endif /* !_ARPA_NAMESER_H_ */ -/*! \file */ +/*! \file */ \ No newline at end of file diff --git a/libc/glibc-include/arpa/nameser_compat.h b/libc/include/generic-glibc/arpa/nameser_compat.h similarity index 99% rename from libc/glibc-include/arpa/nameser_compat.h rename to libc/include/generic-glibc/arpa/nameser_compat.h index f1c390f3b9..0c30d4636d 100644 --- a/libc/glibc-include/arpa/nameser_compat.h +++ b/libc/include/generic-glibc/arpa/nameser_compat.h @@ -218,4 +218,4 @@ typedef struct { #define PUTLONG NS_PUT32 #endif /* _ARPA_NAMESER_COMPAT_ */ -/*! \file */ +/*! \file */ \ No newline at end of file diff --git a/libc/glibc-include/arpa/telnet.h b/libc/include/generic-glibc/arpa/telnet.h similarity index 99% rename from libc/glibc-include/arpa/telnet.h rename to libc/include/generic-glibc/arpa/telnet.h index 3774c89285..ce7f5daba8 100644 --- a/libc/glibc-include/arpa/telnet.h +++ b/libc/include/generic-glibc/arpa/telnet.h @@ -313,4 +313,4 @@ extern char *enctype_names[]; #define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT) #define ENCTYPE_NAME(x) enctype_names[x] -#endif /* arpa/telnet.h */ +#endif /* arpa/telnet.h */ \ No newline at end of file diff --git a/libc/glibc-include/arpa/tftp.h b/libc/include/generic-glibc/arpa/tftp.h similarity index 99% rename from libc/glibc-include/arpa/tftp.h rename to libc/include/generic-glibc/arpa/tftp.h index 86e0b6e814..a2ea317060 100644 --- a/libc/glibc-include/arpa/tftp.h +++ b/libc/include/generic-glibc/arpa/tftp.h @@ -79,4 +79,4 @@ struct tftphdr { #define EEXISTS 6 /* file already exists */ #define ENOUSER 7 /* no such user */ -#endif /* arpa/tftp.h */ +#endif /* arpa/tftp.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/asm-generic/bitsperlong.h b/libc/include/generic-glibc/asm-generic/bitsperlong.h new file mode 100644 index 0000000000..693d9a40eb --- /dev/null +++ b/libc/include/generic-glibc/asm-generic/bitsperlong.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef _UAPI__ASM_GENERIC_BITS_PER_LONG +#define _UAPI__ASM_GENERIC_BITS_PER_LONG + +/* + * There seems to be no way of detecting this automatically from user + * space, so 64 bit architectures should override this in their + * bitsperlong.h. In particular, an architecture that supports + * both 32 and 64 bit user space must not rely on CONFIG_64BIT + * to decide it, but rather check a compiler provided macro. + */ +#ifndef __BITS_PER_LONG +#define __BITS_PER_LONG 32 +#endif + +#endif /* _UAPI__ASM_GENERIC_BITS_PER_LONG */ diff --git a/libc/glibc/sysdeps/unix/sysv/linux/include/asm-generic/unistd.h b/libc/include/generic-glibc/asm-generic/unistd.h similarity index 100% rename from libc/glibc/sysdeps/unix/sysv/linux/include/asm-generic/unistd.h rename to libc/include/generic-glibc/asm-generic/unistd.h diff --git a/libc/glibc/sysdeps/unix/sysv/linux/include/asm/unistd_32.h b/libc/include/generic-glibc/asm/unistd_32.h similarity index 100% rename from libc/glibc/sysdeps/unix/sysv/linux/include/asm/unistd_32.h rename to libc/include/generic-glibc/asm/unistd_32.h diff --git a/libc/glibc/sysdeps/unix/sysv/linux/include/asm/unistd_64.h b/libc/include/generic-glibc/asm/unistd_64.h similarity index 100% rename from libc/glibc/sysdeps/unix/sysv/linux/include/asm/unistd_64.h rename to libc/include/generic-glibc/asm/unistd_64.h diff --git a/libc/glibc-include/assert.h b/libc/include/generic-glibc/assert.h similarity index 99% rename from libc/glibc-include/assert.h rename to libc/include/generic-glibc/assert.h index 20fe320043..0a249c7d7c 100644 --- a/libc/glibc-include/assert.h +++ b/libc/include/generic-glibc/assert.h @@ -138,4 +138,4 @@ __END_DECLS #if defined __USE_ISOC11 && !defined __cplusplus # undef static_assert # define static_assert _Static_assert -#endif +#endif \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/a.out.h b/libc/include/generic-glibc/bits/a.out.h new file mode 100644 index 0000000000..c075e94124 --- /dev/null +++ b/libc/include/generic-glibc/bits/a.out.h @@ -0,0 +1,7 @@ +#ifndef __A_OUT_GNU_H__ +# error "Never use directly; include instead." +#endif + +/* Signal to users of this header that this architecture really doesn't + support a.out binary format. */ +#define __NO_A_OUT_SUPPORT 1 \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/argp-ldbl.h b/libc/include/generic-glibc/bits/argp-ldbl.h new file mode 100644 index 0000000000..2dc1602b62 --- /dev/null +++ b/libc/include/generic-glibc/bits/argp-ldbl.h @@ -0,0 +1,24 @@ +/* Redirections for argp functions for -mlong-double-64. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _ARGP_H +# error "Never include directly; use instead." +#endif + +__LDBL_REDIR_DECL (argp_error) +__LDBL_REDIR_DECL (argp_failure) \ No newline at end of file diff --git a/libc/glibc-include/bits/byteswap.h b/libc/include/generic-glibc/bits/byteswap.h similarity index 98% rename from libc/glibc-include/bits/byteswap.h rename to libc/include/generic-glibc/bits/byteswap.h index 83731c9eab..a4052e4506 100644 --- a/libc/glibc-include/bits/byteswap.h +++ b/libc/include/generic-glibc/bits/byteswap.h @@ -76,4 +76,4 @@ __bswap_64 (__uint64_t __bsx) #endif } -#endif /* _BITS_BYTESWAP_H */ +#endif /* _BITS_BYTESWAP_H */ \ No newline at end of file diff --git a/libc/glibc-include/bits/cmathcalls.h b/libc/include/generic-glibc/bits/cmathcalls.h similarity index 98% rename from libc/glibc-include/bits/cmathcalls.h rename to libc/include/generic-glibc/bits/cmathcalls.h index 57bd32de3b..2904cff060 100644 --- a/libc/glibc-include/bits/cmathcalls.h +++ b/libc/include/generic-glibc/bits/cmathcalls.h @@ -127,4 +127,4 @@ __MATHCALL (cproj, (_Mdouble_complex_ __z)); __MATHDECL (_Mdouble_,cimag, (_Mdouble_complex_ __z)); /* Real part of Z. */ -__MATHDECL (_Mdouble_,creal, (_Mdouble_complex_ __z)); +__MATHDECL (_Mdouble_,creal, (_Mdouble_complex_ __z)); \ No newline at end of file diff --git a/libc/glibc-include/bits/confname.h b/libc/include/generic-glibc/bits/confname.h similarity index 99% rename from libc/glibc-include/bits/confname.h rename to libc/include/generic-glibc/bits/confname.h index 1476f61402..620c912e25 100644 --- a/libc/glibc-include/bits/confname.h +++ b/libc/include/generic-glibc/bits/confname.h @@ -672,4 +672,4 @@ enum #define _CS_V6_ENV _CS_V6_ENV _CS_V7_ENV #define _CS_V7_ENV _CS_V7_ENV - }; + }; \ No newline at end of file diff --git a/libc/glibc-include/bits/cpu-set.h b/libc/include/generic-glibc/bits/cpu-set.h similarity index 99% rename from libc/glibc-include/bits/cpu-set.h rename to libc/include/generic-glibc/bits/cpu-set.h index b0bfe7963a..155f967827 100644 --- a/libc/glibc-include/bits/cpu-set.h +++ b/libc/include/generic-glibc/bits/cpu-set.h @@ -121,4 +121,4 @@ extern void __sched_cpufree (cpu_set_t *__set) __THROW; __END_DECLS -#endif /* bits/cpu-set.h */ +#endif /* bits/cpu-set.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/dirent.h b/libc/include/generic-glibc/bits/dirent.h similarity index 99% rename from libc/glibc-include/bits/dirent.h rename to libc/include/generic-glibc/bits/dirent.h index 866a006b3c..d35853ce22 100644 --- a/libc/glibc-include/bits/dirent.h +++ b/libc/include/generic-glibc/bits/dirent.h @@ -56,4 +56,4 @@ struct dirent64 # define _DIRENT_MATCHES_DIRENT64 1 #else # define _DIRENT_MATCHES_DIRENT64 0 -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/dlfcn.h b/libc/include/generic-glibc/bits/dlfcn.h similarity index 99% rename from libc/glibc-include/bits/dlfcn.h rename to libc/include/generic-glibc/bits/dlfcn.h index 8e311f745c..8a4e679bf5 100644 --- a/libc/glibc-include/bits/dlfcn.h +++ b/libc/include/generic-glibc/bits/dlfcn.h @@ -61,4 +61,4 @@ extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW; __END_DECLS -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/elfclass.h b/libc/include/generic-glibc/bits/elfclass.h similarity index 93% rename from libc/glibc-include/bits/elfclass.h rename to libc/include/generic-glibc/bits/elfclass.h index 180227d9e7..f474526335 100644 --- a/libc/glibc-include/bits/elfclass.h +++ b/libc/include/generic-glibc/bits/elfclass.h @@ -11,4 +11,4 @@ #define __ELF_NATIVE_CLASS __WORDSIZE /* The entries in the .hash table always have a size of 32 bits. */ -typedef uint32_t Elf_Symndx; +typedef uint32_t Elf_Symndx; \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/endian.h b/libc/include/generic-glibc/bits/endian.h new file mode 100644 index 0000000000..44b05652f1 --- /dev/null +++ b/libc/include/generic-glibc/bits/endian.h @@ -0,0 +1,15 @@ +/* The MIPS architecture has selectable endianness. + It exists in both little and big endian flavours and we + want to be able to share the installed header files between + both, so we define __BYTE_ORDER based on GCC's predefines. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#ifdef __MIPSEB +# define __BYTE_ORDER __BIG_ENDIAN +#endif +#ifdef __MIPSEL +# define __BYTE_ORDER __LITTLE_ENDIAN +#endif \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/environments.h b/libc/include/generic-glibc/bits/environments.h new file mode 100644 index 0000000000..28a2f5f220 --- /dev/null +++ b/libc/include/generic-glibc/bits/environments.h @@ -0,0 +1,87 @@ +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _UNISTD_H +# error "Never include this file directly. Use instead" +#endif + +#include + +/* This header should define the following symbols under the described + situations. A value `1' means that the model is always supported, + `-1' means it is never supported. Undefined means it cannot be + statically decided. + + _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type + _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type + + _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type + _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type + + The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, + _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, + _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were + used in previous versions of the Unix standard and are available + only for compatibility. +*/ + +#if __WORDSIZE == 64 + +/* We can never provide environments with 32-bit wide pointers. */ +# define _POSIX_V7_ILP32_OFF32 -1 +# define _POSIX_V7_ILP32_OFFBIG -1 +# define _POSIX_V6_ILP32_OFF32 -1 +# define _POSIX_V6_ILP32_OFFBIG -1 +# define _XBS5_ILP32_OFF32 -1 +# define _XBS5_ILP32_OFFBIG -1 +/* We also have no use (for now) for an environment with bigger pointers + and offsets. */ +# define _POSIX_V7_LPBIG_OFFBIG -1 +# define _POSIX_V6_LPBIG_OFFBIG -1 +# define _XBS5_LPBIG_OFFBIG -1 + +/* By default we have 64-bit wide `long int', pointers and `off_t'. */ +# define _POSIX_V7_LP64_OFF64 1 +# define _POSIX_V6_LP64_OFF64 1 +# define _XBS5_LP64_OFF64 1 + +#else /* __WORDSIZE == 32 */ + +/* By default we have 32-bit wide `int', `long int', pointers and `off_t' + and all platforms support LFS. */ +# define _POSIX_V7_ILP32_OFF32 1 +# define _POSIX_V7_ILP32_OFFBIG 1 +# define _POSIX_V6_ILP32_OFF32 1 +# define _POSIX_V6_ILP32_OFFBIG 1 +# define _XBS5_ILP32_OFF32 1 +# define _XBS5_ILP32_OFFBIG 1 + +/* We optionally provide an environment with the above size but an 64-bit + side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ + +/* We can never provide environments with 64-bit wide pointers. */ +# define _POSIX_V7_LP64_OFF64 -1 +# define _POSIX_V7_LPBIG_OFFBIG -1 +# define _POSIX_V6_LP64_OFF64 -1 +# define _POSIX_V6_LPBIG_OFFBIG -1 +# define _XBS5_LP64_OFF64 -1 +# define _XBS5_LPBIG_OFFBIG -1 + +/* CFLAGS. */ +#define __ILP32_OFFBIG_CFLAGS "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" + +#endif /* __WORDSIZE == 32 */ \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/epoll.h b/libc/include/generic-glibc/bits/epoll.h new file mode 100644 index 0000000000..d20c2e4c0f --- /dev/null +++ b/libc/include/generic-glibc/bits/epoll.h @@ -0,0 +1,27 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_EPOLL_H +# error "Never use directly; include instead." +#endif + +/* Flags to be passed to epoll_create1. */ +enum + { + EPOLL_CLOEXEC = 02000000 +#define EPOLL_CLOEXEC EPOLL_CLOEXEC + }; \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/err-ldbl.h b/libc/include/generic-glibc/bits/err-ldbl.h new file mode 100644 index 0000000000..3f962597a3 --- /dev/null +++ b/libc/include/generic-glibc/bits/err-ldbl.h @@ -0,0 +1,30 @@ +/* Redirections for err.h functions for -mlong-double-64. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _ERR_H +# error "Never include directly; use instead." +#endif + +__LDBL_REDIR_DECL (warn) +__LDBL_REDIR_DECL (vwarn) +__LDBL_REDIR_DECL (warnx) +__LDBL_REDIR_DECL (vwarnx) +__LDBL_REDIR_DECL (err) +__LDBL_REDIR_DECL (verr) +__LDBL_REDIR_DECL (errx) +__LDBL_REDIR_DECL (verrx) \ No newline at end of file diff --git a/libc/glibc-include/bits/errno.h b/libc/include/generic-glibc/bits/errno.h similarity index 98% rename from libc/glibc-include/bits/errno.h rename to libc/include/generic-glibc/bits/errno.h index ee8c3698a7..301cd0e35e 100644 --- a/libc/glibc-include/bits/errno.h +++ b/libc/include/generic-glibc/bits/errno.h @@ -50,4 +50,4 @@ # define EHWPOISON 133 # endif -#endif /* bits/errno.h. */ +#endif /* bits/errno.h. */ \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/error-ldbl.h b/libc/include/generic-glibc/bits/error-ldbl.h new file mode 100644 index 0000000000..601c708686 --- /dev/null +++ b/libc/include/generic-glibc/bits/error-ldbl.h @@ -0,0 +1,24 @@ +/* Redirections for error.h functions for -mlong-double-64. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _ERROR_H +# error "Never include directly; use instead." +#endif + +__LDBL_REDIR_DECL (error) +__LDBL_REDIR_DECL (error_at_line) \ No newline at end of file diff --git a/libc/glibc-include/bits/error.h b/libc/include/generic-glibc/bits/error.h similarity index 99% rename from libc/glibc-include/bits/error.h rename to libc/include/generic-glibc/bits/error.h index f7a4e7c1b0..cf3ef0b0de 100644 --- a/libc/glibc-include/bits/error.h +++ b/libc/include/generic-glibc/bits/error.h @@ -70,4 +70,4 @@ error_at_line (int __status, int __errnum, const char *__fname, else __error_at_line_alias (__status, __errnum, __fname, __line, __format, __va_arg_pack ()); -} +} \ No newline at end of file diff --git a/libc/glibc-include/bits/eventfd.h b/libc/include/generic-glibc/bits/eventfd.h similarity index 99% rename from libc/glibc-include/bits/eventfd.h rename to libc/include/generic-glibc/bits/eventfd.h index 7d77b4fb7d..9922a3d99d 100644 --- a/libc/glibc-include/bits/eventfd.h +++ b/libc/include/generic-glibc/bits/eventfd.h @@ -28,4 +28,4 @@ enum #define EFD_CLOEXEC EFD_CLOEXEC EFD_NONBLOCK = 00004000 #define EFD_NONBLOCK EFD_NONBLOCK - }; + }; \ No newline at end of file diff --git a/libc/glibc-include/bits/fcntl-linux.h b/libc/include/generic-glibc/bits/fcntl-linux.h similarity index 99% rename from libc/glibc-include/bits/fcntl-linux.h rename to libc/include/generic-glibc/bits/fcntl-linux.h index 4b4d6f7ae5..f993e3b6f3 100644 --- a/libc/glibc-include/bits/fcntl-linux.h +++ b/libc/include/generic-glibc/bits/fcntl-linux.h @@ -433,4 +433,4 @@ extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, #endif /* use GNU */ -__END_DECLS +__END_DECLS \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/fcntl.h b/libc/include/generic-glibc/bits/fcntl.h new file mode 100644 index 0000000000..9a0318a81a --- /dev/null +++ b/libc/include/generic-glibc/bits/fcntl.h @@ -0,0 +1,104 @@ +/* O_*, F_*, FD_* bit values for Linux. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#include + +#define O_APPEND 0x0008 +#define O_SYNC 0x4010 +#define O_NONBLOCK 0x0080 +#define O_CREAT 0x0100 /* not fcntl */ +#define O_TRUNC 0x0200 /* not fcntl */ +#define O_EXCL 0x0400 /* not fcntl */ +#define O_NOCTTY 0x0800 /* not fcntl */ +#define O_ASYNC 0x1000 + +#define __O_DIRECT 0x8000 /* Direct disk access hint. */ +#define __O_DSYNC 0x0010 /* Synchronize data. */ + +#if _MIPS_SIM == _ABI64 +/* Not necessary, files are always with 64bit off_t. */ +# define __O_LARGEFILE 0 +#else +# define __O_LARGEFILE 0x2000 /* Allow large file opens. */ +#endif + +#ifndef __USE_FILE_OFFSET64 +# define F_GETLK 14 /* Get record locking info. */ +# define F_SETLK 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW 7 /* Set record locking info (blocking). */ +#else +# define F_GETLK F_GETLK64 /* Get record locking info. */ +# define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ +# define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ +#endif + +#if _MIPS_SIM != _ABI64 +# define F_GETLK64 33 /* Get record locking info. */ +# define F_SETLK64 34 /* Set record locking info (non-blocking). */ +# define F_SETLKW64 35 /* Set record locking info (blocking). */ +#else +# define F_GETLK64 14 /* Get record locking info. */ +# define F_SETLK64 6 /* Set record locking info (non-blocking).*/ +# define F_SETLKW64 7 /* Set record locking info (blocking). */ +#endif + +#define __F_SETOWN 24 /* Get owner (process receiving SIGIO). */ +#define __F_GETOWN 23 /* Set owner (process receiving SIGIO). */ + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#if _MIPS_SIM != _ABI64 + /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit + fcntls in o32 and n32, never has this field. */ + long int l_sysid; +#endif +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ +#if ! defined __USE_FILE_OFFSET64 && _MIPS_SIM != _ABI64 + /* The 64-bit flock structure, used by the n64 ABI, and for 64-bit + flock in o32 and n32, never has this field. */ + long int __glibc_reserved0[4]; +#endif + }; +typedef struct flock flock_t; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/glibc-include/bits/fcntl2.h b/libc/include/generic-glibc/bits/fcntl2.h similarity index 99% rename from libc/glibc-include/bits/fcntl2.h rename to libc/include/generic-glibc/bits/fcntl2.h index 9194a1d32e..a152158a74 100644 --- a/libc/glibc-include/bits/fcntl2.h +++ b/libc/include/generic-glibc/bits/fcntl2.h @@ -169,4 +169,4 @@ openat64 (int __fd, const char *__path, int __oflag, ...) return __openat64_alias (__fd, __path, __oflag, __va_arg_pack ()); } # endif -#endif +#endif \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/fenv.h b/libc/include/generic-glibc/bits/fenv.h new file mode 100644 index 0000000000..ea132417bf --- /dev/null +++ b/libc/include/generic-glibc/bits/fenv.h @@ -0,0 +1,113 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + + +#ifdef __mips_hard_float + +/* Define bits representing the exception. We use the bit positions + of the appropriate bits in the FPU control word. */ +enum + { + FE_INEXACT = +# define FE_INEXACT 0x04 + FE_INEXACT, + FE_UNDERFLOW = +# define FE_UNDERFLOW 0x08 + FE_UNDERFLOW, + FE_OVERFLOW = +# define FE_OVERFLOW 0x10 + FE_OVERFLOW, + FE_DIVBYZERO = +# define FE_DIVBYZERO 0x20 + FE_DIVBYZERO, + FE_INVALID = +# define FE_INVALID 0x40 + FE_INVALID, + }; + +# define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +/* The MIPS FPU supports all of the four defined rounding modes. We + use again the bit positions in the FPU control word as the values + for the appropriate macros. */ +enum + { + FE_TONEAREST = +# define FE_TONEAREST 0x0 + FE_TONEAREST, + FE_TOWARDZERO = +# define FE_TOWARDZERO 0x1 + FE_TOWARDZERO, + FE_UPWARD = +# define FE_UPWARD 0x2 + FE_UPWARD, + FE_DOWNWARD = +# define FE_DOWNWARD 0x3 + FE_DOWNWARD + }; + +#else + +/* In the soft-float case, only rounding to nearest is supported, with + no exceptions. */ + +enum + { + __FE_UNDEFINED = -1, + + FE_TONEAREST = +# define FE_TONEAREST 0x0 + FE_TONEAREST + }; + +# define FE_ALL_EXCEPT 0 + +#endif + + +/* Type representing exception flags. */ +typedef unsigned short int fexcept_t; + + +/* Type representing floating-point environment. This function corresponds + to the layout of the block written by the `fstenv'. */ +typedef struct + { + unsigned int __fp_control_register; + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((const fenv_t *) -1) + +#if defined __USE_GNU && defined __mips_hard_float +/* Floating-point environment where none of the exception is masked. */ +# define FE_NOMASK_ENV ((const fenv_t *) -2) +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef unsigned int femode_t; + +/* Default floating-point control modes. */ +# define FE_DFL_MODE ((const femode_t *) -1L) +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/fenvinline.h b/libc/include/generic-glibc/bits/fenvinline.h similarity index 96% rename from libc/glibc-include/bits/fenvinline.h rename to libc/include/generic-glibc/bits/fenvinline.h index 42f77b5618..1367c80eaf 100644 --- a/libc/glibc-include/bits/fenvinline.h +++ b/libc/include/generic-glibc/bits/fenvinline.h @@ -5,4 +5,4 @@ /* Here is where the code would go. */ -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/floatn-common.h b/libc/include/generic-glibc/bits/floatn-common.h similarity index 99% rename from libc/glibc-include/bits/floatn-common.h rename to libc/include/generic-glibc/bits/floatn-common.h index 980bfdaf89..9ad81abbfb 100644 --- a/libc/glibc-include/bits/floatn-common.h +++ b/libc/include/generic-glibc/bits/floatn-common.h @@ -326,4 +326,4 @@ typedef _Float128 _Float64x; #endif /* !__ASSEMBLER__. */ -#endif /* _BITS_FLOATN_COMMON_H */ +#endif /* _BITS_FLOATN_COMMON_H */ \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/floatn.h b/libc/include/generic-glibc/bits/floatn.h new file mode 100644 index 0000000000..10e11d2573 --- /dev/null +++ b/libc/include/generic-glibc/bits/floatn.h @@ -0,0 +1,97 @@ +/* Macros to control TS 18661-3 glibc features on MIPS platforms. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/generic-glibc/bits/flt-eval-method.h b/libc/include/generic-glibc/bits/flt-eval-method.h new file mode 100644 index 0000000000..62def2881d --- /dev/null +++ b/libc/include/generic-glibc/bits/flt-eval-method.h @@ -0,0 +1,42 @@ +/* Define __GLIBC_FLT_EVAL_METHOD. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +/* __GLIBC_FLT_EVAL_METHOD is the value of FLT_EVAL_METHOD used to + determine the evaluation method typedefs such as float_t and + double_t. It must be a value from C11 or TS 18661-3:2015, and not + -1. */ + +/* In the default version of this header, follow __FLT_EVAL_METHOD__. + -1 is mapped to 2 (considering evaluation as long double to be a + conservatively safe assumption), and if __FLT_EVAL_METHOD__ is not + defined then assume there is no excess precision and use the value + 0. */ + +#ifdef __FLT_EVAL_METHOD__ +# if __FLT_EVAL_METHOD__ == -1 +# define __GLIBC_FLT_EVAL_METHOD 2 +# else +# define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__ +# endif +#else +# define __GLIBC_FLT_EVAL_METHOD 0 +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/fp-fast.h b/libc/include/generic-glibc/bits/fp-fast.h similarity index 99% rename from libc/glibc-include/bits/fp-fast.h rename to libc/include/generic-glibc/bits/fp-fast.h index bbd275e2f9..6d7cddf1d2 100644 --- a/libc/glibc-include/bits/fp-fast.h +++ b/libc/include/generic-glibc/bits/fp-fast.h @@ -36,4 +36,4 @@ # define FP_FAST_FMAL 1 # endif -#endif +#endif \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/fp-logb.h b/libc/include/generic-glibc/bits/fp-logb.h new file mode 100644 index 0000000000..ffbdcb2edc --- /dev/null +++ b/libc/include/generic-glibc/bits/fp-logb.h @@ -0,0 +1,28 @@ +/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +/* __FP_LOGB0_IS_MIN is defined to 1 if FP_ILOGB0 is INT_MIN, and 0 if + it is -INT_MAX. __FP_LOGBNAN_IS_MIN is defined to 1 if FP_ILOGBNAN + is INT_MIN, and 0 if it is INT_MAX. */ + +#define __FP_LOGB0_IS_MIN 0 +#define __FP_LOGBNAN_IS_MIN 0 \ No newline at end of file diff --git a/libc/glibc-include/bits/getopt_core.h b/libc/include/generic-glibc/bits/getopt_core.h similarity index 99% rename from libc/glibc-include/bits/getopt_core.h rename to libc/include/generic-glibc/bits/getopt_core.h index 5c983f331c..5973daf49b 100644 --- a/libc/glibc-include/bits/getopt_core.h +++ b/libc/include/generic-glibc/bits/getopt_core.h @@ -93,4 +93,4 @@ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __END_DECLS -#endif /* getopt_core.h */ +#endif /* getopt_core.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/getopt_ext.h b/libc/include/generic-glibc/bits/getopt_ext.h similarity index 99% rename from libc/glibc-include/bits/getopt_ext.h rename to libc/include/generic-glibc/bits/getopt_ext.h index e93c653321..648b6004bc 100644 --- a/libc/glibc-include/bits/getopt_ext.h +++ b/libc/include/generic-glibc/bits/getopt_ext.h @@ -74,4 +74,4 @@ extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, __END_DECLS -#endif /* getopt_ext.h */ +#endif /* getopt_ext.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/getopt_posix.h b/libc/include/generic-glibc/bits/getopt_posix.h similarity index 98% rename from libc/glibc-include/bits/getopt_posix.h rename to libc/include/generic-glibc/bits/getopt_posix.h index 0fb81fab1d..197a48e4fd 100644 --- a/libc/glibc-include/bits/getopt_posix.h +++ b/libc/include/generic-glibc/bits/getopt_posix.h @@ -48,4 +48,4 @@ extern int __posix_getopt (int ___argc, char *const *___argv, __END_DECLS -#endif /* getopt_posix.h */ +#endif /* getopt_posix.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/hwcap.h b/libc/include/generic-glibc/bits/hwcap.h similarity index 95% rename from libc/glibc-include/bits/hwcap.h rename to libc/include/generic-glibc/bits/hwcap.h index b86fd1ea1f..8be095a364 100644 --- a/libc/glibc-include/bits/hwcap.h +++ b/libc/include/generic-glibc/bits/hwcap.h @@ -20,4 +20,4 @@ # error "Never include directly; use instead." #endif -/* No bits defined for this architecture. */ +/* No bits defined for this architecture. */ \ No newline at end of file diff --git a/libc/glibc-include/bits/in.h b/libc/include/generic-glibc/bits/in.h similarity index 99% rename from libc/glibc-include/bits/in.h rename to libc/include/generic-glibc/bits/in.h index 662779968e..a33b7e7f14 100644 --- a/libc/glibc-include/bits/in.h +++ b/libc/include/generic-glibc/bits/in.h @@ -255,4 +255,4 @@ struct in_pktinfo #define IPV6_RTHDR_LOOSE 0 /* Hop doesn't need to be neighbour. */ #define IPV6_RTHDR_STRICT 1 /* Hop must be a neighbour. */ -#define IPV6_RTHDR_TYPE_0 0 /* IPv6 Routing header type 0. */ +#define IPV6_RTHDR_TYPE_0 0 /* IPv6 Routing header type 0. */ \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/indirect-return.h b/libc/include/generic-glibc/bits/indirect-return.h new file mode 100644 index 0000000000..5557372427 --- /dev/null +++ b/libc/include/generic-glibc/bits/indirect-return.h @@ -0,0 +1,25 @@ +/* Definition of __INDIRECT_RETURN. Generic version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _UCONTEXT_H +# error "Never include directly; use instead." +#endif + +/* __INDIRECT_RETURN is used on swapcontext to indicate if it requires + special compiler treatment. */ +#define __INDIRECT_RETURN \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/initspin.h b/libc/include/generic-glibc/bits/initspin.h new file mode 100644 index 0000000000..9d72ed0d4e --- /dev/null +++ b/libc/include/generic-glibc/bits/initspin.h @@ -0,0 +1 @@ +/* No thread support. */ \ No newline at end of file diff --git a/libc/glibc-include/bits/inotify.h b/libc/include/generic-glibc/bits/inotify.h similarity index 99% rename from libc/glibc-include/bits/inotify.h rename to libc/include/generic-glibc/bits/inotify.h index bfc2525e18..76cd436251 100644 --- a/libc/glibc-include/bits/inotify.h +++ b/libc/include/generic-glibc/bits/inotify.h @@ -26,4 +26,4 @@ enum #define IN_CLOEXEC IN_CLOEXEC IN_NONBLOCK = 00004000 #define IN_NONBLOCK IN_NONBLOCK - }; + }; \ No newline at end of file diff --git a/libc/glibc-include/bits/ioctl-types.h b/libc/include/generic-glibc/bits/ioctl-types.h similarity index 98% rename from libc/glibc-include/bits/ioctl-types.h rename to libc/include/generic-glibc/bits/ioctl-types.h index b7e04d527e..4ac9ac39ed 100644 --- a/libc/glibc-include/bits/ioctl-types.h +++ b/libc/include/generic-glibc/bits/ioctl-types.h @@ -74,4 +74,4 @@ struct termio #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 */ +#define N_HCI 15 /* Bluetooth HCI UART */ \ No newline at end of file diff --git a/libc/glibc-include/bits/ioctls.h b/libc/include/generic-glibc/bits/ioctls.h similarity index 98% rename from libc/glibc-include/bits/ioctls.h rename to libc/include/generic-glibc/bits/ioctls.h index e2166ef209..31b6ea7939 100644 --- a/libc/glibc-include/bits/ioctls.h +++ b/libc/include/generic-glibc/bits/ioctls.h @@ -105,4 +105,4 @@ * These 16 ioctl calls are protocol private */ -#define SIOCPROTOPRIVATE 0x89E0 /* to 89EF */ +#define SIOCPROTOPRIVATE 0x89E0 /* to 89EF */ \ No newline at end of file diff --git a/libc/glibc-include/bits/ipc.h b/libc/include/generic-glibc/bits/ipc.h similarity index 99% rename from libc/glibc-include/bits/ipc.h rename to libc/include/generic-glibc/bits/ipc.h index 6868b3eb45..e133bcfa70 100644 --- a/libc/glibc-include/bits/ipc.h +++ b/libc/include/generic-glibc/bits/ipc.h @@ -52,4 +52,4 @@ struct ipc_perm unsigned short int __pad2; __syscall_ulong_t __glibc_reserved1; __syscall_ulong_t __glibc_reserved2; - }; + }; \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/ipctypes.h b/libc/include/generic-glibc/bits/ipctypes.h new file mode 100644 index 0000000000..1b09d14f83 --- /dev/null +++ b/libc/include/generic-glibc/bits/ipctypes.h @@ -0,0 +1,36 @@ +/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. Generic. + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* + * Never include directly. + */ + +#ifndef _BITS_IPCTYPES_H +#define _BITS_IPCTYPES_H 1 + +#include + +/* Used in `struct shmid_ds'. */ +# if __WORDSIZE == 32 +typedef unsigned short int __ipc_pid_t; +# else +typedef int __ipc_pid_t; +# endif + + +#endif /* bits/ipctypes.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/iscanonical.h b/libc/include/generic-glibc/bits/iscanonical.h new file mode 100644 index 0000000000..3e73628588 --- /dev/null +++ b/libc/include/generic-glibc/bits/iscanonical.h @@ -0,0 +1,28 @@ +/* Define iscanonical macro. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +/* Return nonzero value if X is canonical. By default, we only have + IEEE interchange binary formats, in which all values are canonical, + but the argument must still be converted to its semantic type for + any exceptions arising from the conversion, before being + discarded. */ +#define iscanonical(x) ((void) (__typeof (x)) (x), 1) \ No newline at end of file diff --git a/libc/glibc-include/bits/libc-header-start.h b/libc/include/generic-glibc/bits/libc-header-start.h similarity index 99% rename from libc/glibc-include/bits/libc-header-start.h rename to libc/include/generic-glibc/bits/libc-header-start.h index 72efab29f2..5b216b35c2 100644 --- a/libc/glibc-include/bits/libc-header-start.h +++ b/libc/include/generic-glibc/bits/libc-header-start.h @@ -67,4 +67,4 @@ # define __GLIBC_USE_IEC_60559_TYPES_EXT 1 #else # define __GLIBC_USE_IEC_60559_TYPES_EXT 0 -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/libm-simd-decl-stubs.h b/libc/include/generic-glibc/bits/libm-simd-decl-stubs.h similarity index 99% rename from libc/glibc-include/bits/libm-simd-decl-stubs.h rename to libc/include/generic-glibc/bits/libm-simd-decl-stubs.h index 0774a90a56..8fef08aaa4 100644 --- a/libc/glibc-include/bits/libm-simd-decl-stubs.h +++ b/libc/include/generic-glibc/bits/libm-simd-decl-stubs.h @@ -98,4 +98,4 @@ #define __DECL_SIMD_powf32x #define __DECL_SIMD_powf64x #define __DECL_SIMD_powf128x -#endif +#endif \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/link.h b/libc/include/generic-glibc/bits/link.h new file mode 100644 index 0000000000..a497f46212 --- /dev/null +++ b/libc/include/generic-glibc/bits/link.h @@ -0,0 +1,117 @@ +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + +#include + +#if _MIPS_SIM == _ABIO32 + +/* Registers for entry into PLT on MIPS. */ +typedef struct La_mips_32_regs +{ + uint32_t lr_reg[4]; /* $a0 through $a3 */ + double lr_fpreg[2]; /* $f12 and $f14 */ + uint32_t lr_ra; + uint32_t lr_sp; +} La_mips_32_regs; + +/* Return values for calls from PLT on MIPS. */ +typedef struct La_mips_32_retval +{ + uint32_t lrv_v0; + uint32_t lrv_v1; + double lrv_f0; + double lrv_f2; +} La_mips_32_retval; + +#else + +typedef struct La_mips_64_regs +{ + uint64_t lr_reg[8]; /* $a0 through $a7 */ + double lr_fpreg[8]; /* $f12 throgh $f19 */ + uint64_t lr_ra; + uint64_t lr_sp; +} La_mips_64_regs; + +/* Return values for calls from PLT on MIPS. */ +typedef struct La_mips_64_retval +{ + uint64_t lrv_v0; + uint64_t lrv_v1; + double lrv_f0; + double lrv_f2; +} La_mips_64_retval; + +#endif + +__BEGIN_DECLS + +#if _MIPS_SIM == _ABIO32 + +extern Elf32_Addr la_mips_o32_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_mips_32_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_mips_o32_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_mips_32_regs *__inregs, + La_mips_32_retval *__outregs, + const char *__symname); + +#elif _MIPS_SIM == _ABIN32 + +extern Elf32_Addr la_mips_n32_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_mips_64_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_mips_n32_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_mips_64_regs *__inregs, + La_mips_64_retval *__outregs, + const char *__symname); + +#else + +extern Elf64_Addr la_mips_n64_gnu_pltenter (Elf64_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_mips_64_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_mips_n64_gnu_pltexit (Elf64_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_mips_64_regs *__inregs, + La_mips_64_retval *__outregs, + const char *__symname); + +#endif + +__END_DECLS \ No newline at end of file diff --git a/libc/glibc-include/bits/local_lim.h b/libc/include/generic-glibc/bits/local_lim.h similarity index 98% rename from libc/glibc-include/bits/local_lim.h rename to libc/include/generic-glibc/bits/local_lim.h index d3a2a17a32..7e7c583b72 100644 --- a/libc/glibc-include/bits/local_lim.h +++ b/libc/include/generic-glibc/bits/local_lim.h @@ -96,4 +96,4 @@ #define MQ_PRIO_MAX 32768 /* Maximum value the semaphore can have. */ -#define SEM_VALUE_MAX (2147483647) +#define SEM_VALUE_MAX (2147483647) \ No newline at end of file diff --git a/libc/glibc-include/bits/locale.h b/libc/include/generic-glibc/bits/locale.h similarity index 98% rename from libc/glibc-include/bits/locale.h rename to libc/include/generic-glibc/bits/locale.h index fd3f88639f..0e95b24b4f 100644 --- a/libc/glibc-include/bits/locale.h +++ b/libc/include/generic-glibc/bits/locale.h @@ -37,4 +37,4 @@ #define __LC_MEASUREMENT 11 #define __LC_IDENTIFICATION 12 -#endif /* bits/locale.h */ +#endif /* bits/locale.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/long-double.h b/libc/include/generic-glibc/bits/long-double.h new file mode 100644 index 0000000000..25f7f7637a --- /dev/null +++ b/libc/include/generic-glibc/bits/long-double.h @@ -0,0 +1,23 @@ +/* Properties of long double type. MIPS version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#if !defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _ABIO32 +# define __NO_LONG_DOUBLE_MATH 1 +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/math-finite.h b/libc/include/generic-glibc/bits/math-finite.h similarity index 99% rename from libc/glibc-include/bits/math-finite.h rename to libc/include/generic-glibc/bits/math-finite.h index 6141c12537..1e13b849f8 100644 --- a/libc/glibc-include/bits/math-finite.h +++ b/libc/include/generic-glibc/bits/math-finite.h @@ -194,4 +194,4 @@ __NTH (__REDIRFROM (tgamma, ) (_Mdouble_ __d)) #undef __MATH_REDIRCALL #undef __MATH_REDIRCALL_2 #undef __MATH_REDIRCALL_INTERNAL -#undef __MATH_REDIRCALL_X +#undef __MATH_REDIRCALL_X \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/math-vector-fortran.h b/libc/include/generic-glibc/bits/math-vector-fortran.h new file mode 100644 index 0000000000..2209132e2c --- /dev/null +++ b/libc/include/generic-glibc/bits/math-vector-fortran.h @@ -0,0 +1,19 @@ +! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*- +! Copyright (C) 2019 Free Software Foundation, Inc. +! This file is part of the GNU C Library. +! +! The GNU C Library is free software; you can redistribute it and/or +! modify it under the terms of the GNU Lesser General Public +! License as published by the Free Software Foundation; either +! version 2.1 of the License, or (at your option) any later version. +! +! The GNU C Library is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +! Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with the GNU C Library; if not, see +! . + +! No SIMD math functions are available for this platform. \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/math-vector.h b/libc/include/generic-glibc/bits/math-vector.h new file mode 100644 index 0000000000..ac56919a53 --- /dev/null +++ b/libc/include/generic-glibc/bits/math-vector.h @@ -0,0 +1,27 @@ +/* Platform-specific SIMD declarations of math functions. + Copyright (C) 2014-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _MATH_H +# error "Never include directly;\ + include instead." +#endif + +/* Get default empty definitions required for __MATHCALL_VEC unfolding. + Plaform-specific analogue of this header should redefine them with specific + SIMD declarations. */ +#include \ No newline at end of file diff --git a/libc/glibc-include/bits/mathcalls-helper-functions.h b/libc/include/generic-glibc/bits/mathcalls-helper-functions.h similarity index 98% rename from libc/glibc-include/bits/mathcalls-helper-functions.h rename to libc/include/generic-glibc/bits/mathcalls-helper-functions.h index 4b92cacafd..0f1b06ca57 100644 --- a/libc/glibc-include/bits/mathcalls-helper-functions.h +++ b/libc/include/generic-glibc/bits/mathcalls-helper-functions.h @@ -40,4 +40,4 @@ __MATHDECL_1 (int, __iseqsig,, (_Mdouble_ __x, _Mdouble_ __y)); /* Test for signaling NaN. */ __MATHDECL_1 (int, __issignaling,, (_Mdouble_ __value)) - __attribute__ ((__const__)); + __attribute__ ((__const__)); \ No newline at end of file diff --git a/libc/glibc-include/bits/mathcalls-narrow.h b/libc/include/generic-glibc/bits/mathcalls-narrow.h similarity index 99% rename from libc/glibc-include/bits/mathcalls-narrow.h rename to libc/include/generic-glibc/bits/mathcalls-narrow.h index edb9f8f73b..eb78fad4b5 100644 --- a/libc/glibc-include/bits/mathcalls-narrow.h +++ b/libc/include/generic-glibc/bits/mathcalls-narrow.h @@ -30,4 +30,4 @@ __MATHCALL_NARROW (__MATHCALL_NAME (div), __MATHCALL_REDIR_NAME (div), 2); __MATHCALL_NARROW (__MATHCALL_NAME (mul), __MATHCALL_REDIR_NAME (mul), 2); /* Subtract. */ -__MATHCALL_NARROW (__MATHCALL_NAME (sub), __MATHCALL_REDIR_NAME (sub), 2); +__MATHCALL_NARROW (__MATHCALL_NAME (sub), __MATHCALL_REDIR_NAME (sub), 2); \ No newline at end of file diff --git a/libc/glibc-include/bits/mathcalls.h b/libc/include/generic-glibc/bits/mathcalls.h similarity index 99% rename from libc/glibc-include/bits/mathcalls.h rename to libc/include/generic-glibc/bits/mathcalls.h index 3c3a77f482..82e98a1ba0 100644 --- a/libc/glibc-include/bits/mathcalls.h +++ b/libc/include/generic-glibc/bits/mathcalls.h @@ -394,4 +394,4 @@ __MATHDECL_1 (int, setpayloadsig,, (_Mdouble_ *__x, _Mdouble_ __payload)); && !__MATH_DECLARING_FLOATN /* Return X times (2 to the Nth power). */ __MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n)); -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/mathdef.h b/libc/include/generic-glibc/bits/mathdef.h similarity index 99% rename from libc/glibc-include/bits/mathdef.h rename to libc/include/generic-glibc/bits/mathdef.h index 56418d997f..c40b7a363e 100644 --- a/libc/glibc-include/bits/mathdef.h +++ b/libc/include/generic-glibc/bits/mathdef.h @@ -17,4 +17,4 @@ #ifndef _COMPLEX_H # error "Never use directly; include instead" -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/mathinline.h b/libc/include/generic-glibc/bits/mathinline.h similarity index 97% rename from libc/glibc-include/bits/mathinline.h rename to libc/include/generic-glibc/bits/mathinline.h index 02ec21b438..76a37688ed 100644 --- a/libc/glibc-include/bits/mathinline.h +++ b/libc/include/generic-glibc/bits/mathinline.h @@ -9,4 +9,4 @@ /* Here goes the real code. */ -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/mman-linux.h b/libc/include/generic-glibc/bits/mman-linux.h similarity index 99% rename from libc/glibc-include/bits/mman-linux.h rename to libc/include/generic-glibc/bits/mman-linux.h index 90c1d4e6a0..69a90c3a24 100644 --- a/libc/glibc-include/bits/mman-linux.h +++ b/libc/include/generic-glibc/bits/mman-linux.h @@ -108,4 +108,4 @@ faulted in. */ #endif -#include +#include \ No newline at end of file diff --git a/libc/glibc-include/bits/mman-map-flags-generic.h b/libc/include/generic-glibc/bits/mman-map-flags-generic.h similarity index 99% rename from libc/glibc-include/bits/mman-map-flags-generic.h rename to libc/include/generic-glibc/bits/mman-map-flags-generic.h index ff3c73ab88..eee570c7aa 100644 --- a/libc/glibc-include/bits/mman-map-flags-generic.h +++ b/libc/include/generic-glibc/bits/mman-map-flags-generic.h @@ -39,4 +39,4 @@ faults for the mapping. */ # define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap underlying mapping. */ -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/mman-shared.h b/libc/include/generic-glibc/bits/mman-shared.h similarity index 99% rename from libc/glibc-include/bits/mman-shared.h rename to libc/include/generic-glibc/bits/mman-shared.h index 43c49d4143..62c1ab9b13 100644 --- a/libc/glibc-include/bits/mman-shared.h +++ b/libc/include/generic-glibc/bits/mman-shared.h @@ -77,4 +77,4 @@ int pkey_mprotect (void *__addr, size_t __len, int __prot, int __pkey) __THROW; __END_DECLS -#endif /* __USE_GNU */ +#endif /* __USE_GNU */ \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/mman.h b/libc/include/generic-glibc/bits/mman.h new file mode 100644 index 0000000000..6b135d197e --- /dev/null +++ b/libc/include/generic-glibc/bits/mman.h @@ -0,0 +1,32 @@ +/* Definitions for POSIX memory map interface. Linux/generic version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +/* These definitions are appropriate for architectures that, in the + Linux kernel, either have no uapi/asm/mman.h, or have one that + includes asm-generic/mman.h without any changes or additions + relevant to glibc. If there are additions relevant to glibc, an + architecture-specific bits/mman.h is needed. */ + +#include + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/glibc-include/bits/monetary-ldbl.h b/libc/include/generic-glibc/bits/monetary-ldbl.h similarity index 99% rename from libc/glibc-include/bits/monetary-ldbl.h rename to libc/include/generic-glibc/bits/monetary-ldbl.h index 9623f66393..cd407c5d75 100644 --- a/libc/glibc-include/bits/monetary-ldbl.h +++ b/libc/include/generic-glibc/bits/monetary-ldbl.h @@ -24,4 +24,4 @@ __LDBL_REDIR_DECL (strfmon) #ifdef __USE_GNU __LDBL_REDIR_DECL (strfmon_l) -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/mqueue.h b/libc/include/generic-glibc/bits/mqueue.h similarity index 99% rename from libc/glibc-include/bits/mqueue.h rename to libc/include/generic-glibc/bits/mqueue.h index 017da00f42..5e5b50b304 100644 --- a/libc/glibc-include/bits/mqueue.h +++ b/libc/include/generic-glibc/bits/mqueue.h @@ -30,4 +30,4 @@ struct mq_attr __syscall_slong_t mq_msgsize; /* Maximum message size. */ __syscall_slong_t mq_curmsgs; /* Number of messages currently queued. */ __syscall_slong_t __pad[4]; -}; +}; \ No newline at end of file diff --git a/libc/glibc-include/bits/mqueue2.h b/libc/include/generic-glibc/bits/mqueue2.h similarity index 99% rename from libc/glibc-include/bits/mqueue2.h rename to libc/include/generic-glibc/bits/mqueue2.h index f9d95db0a5..26c63e0a44 100644 --- a/libc/glibc-include/bits/mqueue2.h +++ b/libc/include/generic-glibc/bits/mqueue2.h @@ -54,4 +54,4 @@ __NTH (mq_open (const char *__name, int __oflag, ...)) return __mq_open_2 (__name, __oflag); return __mq_open_alias (__name, __oflag, __va_arg_pack ()); -} +} \ No newline at end of file diff --git a/libc/glibc-include/bits/msq-pad.h b/libc/include/generic-glibc/bits/msq-pad.h similarity index 97% rename from libc/glibc-include/bits/msq-pad.h rename to libc/include/generic-glibc/bits/msq-pad.h index c98ef71012..5504b681a4 100644 --- a/libc/glibc-include/bits/msq-pad.h +++ b/libc/include/generic-glibc/bits/msq-pad.h @@ -28,4 +28,4 @@ 32-bit. */ #define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32) -#define __MSQ_PAD_BEFORE_TIME 0 +#define __MSQ_PAD_BEFORE_TIME 0 \ No newline at end of file diff --git a/libc/glibc-include/bits/msq.h b/libc/include/generic-glibc/bits/msq.h similarity index 99% rename from libc/glibc-include/bits/msq.h rename to libc/include/generic-glibc/bits/msq.h index d76c6f9a20..a3db8baf94 100644 --- a/libc/glibc-include/bits/msq.h +++ b/libc/include/generic-glibc/bits/msq.h @@ -83,4 +83,4 @@ struct msginfo unsigned short int msgseg; }; -#endif /* __USE_MISC */ +#endif /* __USE_MISC */ \ No newline at end of file diff --git a/libc/glibc-include/bits/netdb.h b/libc/include/generic-glibc/bits/netdb.h similarity index 99% rename from libc/glibc-include/bits/netdb.h rename to libc/include/generic-glibc/bits/netdb.h index 178d824bf4..5429eb43a8 100644 --- a/libc/glibc-include/bits/netdb.h +++ b/libc/include/generic-glibc/bits/netdb.h @@ -29,4 +29,4 @@ struct netent char **n_aliases; /* Alias list. */ int n_addrtype; /* Net address type. */ uint32_t n_net; /* Network number. */ -}; +}; \ No newline at end of file diff --git a/libc/glibc-include/bits/param.h b/libc/include/generic-glibc/bits/param.h similarity index 98% rename from libc/glibc-include/bits/param.h rename to libc/include/generic-glibc/bits/param.h index 53c0f9f136..5e450b4456 100644 --- a/libc/glibc-include/bits/param.h +++ b/libc/include/generic-glibc/bits/param.h @@ -39,4 +39,4 @@ long time and which seems to be usable. People should not use NOFILE and NCARGS anyway. */ #define NOFILE 256 -#define NCARGS 131072 +#define NCARGS 131072 \ No newline at end of file diff --git a/libc/glibc-include/bits/poll.h b/libc/include/generic-glibc/bits/poll.h similarity index 97% rename from libc/glibc-include/bits/poll.h rename to libc/include/generic-glibc/bits/poll.h index 50f0111fe5..438d3190f9 100644 --- a/libc/glibc-include/bits/poll.h +++ b/libc/include/generic-glibc/bits/poll.h @@ -46,4 +46,4 @@ the file descriptor. */ #define POLLERR 0x008 /* Error condition. */ #define POLLHUP 0x010 /* Hung up. */ -#define POLLNVAL 0x020 /* Invalid polling request. */ +#define POLLNVAL 0x020 /* Invalid polling request. */ \ No newline at end of file diff --git a/libc/glibc-include/bits/poll2.h b/libc/include/generic-glibc/bits/poll2.h similarity index 99% rename from libc/glibc-include/bits/poll2.h rename to libc/include/generic-glibc/bits/poll2.h index ff38ef7ae1..4307e9966d 100644 --- a/libc/glibc-include/bits/poll2.h +++ b/libc/include/generic-glibc/bits/poll2.h @@ -78,4 +78,4 @@ ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout, } #endif -__END_DECLS +__END_DECLS \ No newline at end of file diff --git a/libc/glibc-include/bits/posix1_lim.h b/libc/include/generic-glibc/bits/posix1_lim.h similarity index 99% rename from libc/glibc-include/bits/posix1_lim.h rename to libc/include/generic-glibc/bits/posix1_lim.h index 0b1cb6fc63..f5ca957b4b 100644 --- a/libc/glibc-include/bits/posix1_lim.h +++ b/libc/include/generic-glibc/bits/posix1_lim.h @@ -180,4 +180,4 @@ # define NGROUPS_MAX 8 #endif -#endif /* bits/posix1_lim.h */ +#endif /* bits/posix1_lim.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/posix2_lim.h b/libc/include/generic-glibc/bits/posix2_lim.h similarity index 98% rename from libc/glibc-include/bits/posix2_lim.h rename to libc/include/generic-glibc/bits/posix2_lim.h index 01a96d9f63..8ebd02f92e 100644 --- a/libc/glibc-include/bits/posix2_lim.h +++ b/libc/include/generic-glibc/bits/posix2_lim.h @@ -87,4 +87,4 @@ /* This value is defined like this in regex.h. */ #define RE_DUP_MAX (0x7fff) -#endif /* bits/posix2_lim.h */ +#endif /* bits/posix2_lim.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/posix_opt.h b/libc/include/generic-glibc/bits/posix_opt.h similarity index 95% rename from libc/glibc-include/bits/posix_opt.h rename to libc/include/generic-glibc/bits/posix_opt.h index b3bf5efd4d..3724ed7f2e 100644 --- a/libc/glibc-include/bits/posix_opt.h +++ b/libc/include/generic-glibc/bits/posix_opt.h @@ -25,7 +25,10 @@ /* Processes have a saved set-user-ID and a saved set-group-ID. */ #define _POSIX_SAVED_IDS 1 -/* Priority scheduling is supported. */ +/* Priority scheduling is not supported with the correct semantics, + but GNU/Linux applications expect that the corresponding interfaces + are available, even though the semantics do not meet the POSIX + requirements. See glibc bug 14829. */ #define _POSIX_PRIORITY_SCHEDULING 200809L /* Synchronizing file data is supported. */ @@ -188,4 +191,4 @@ /* Typed memory objects are not available. */ #define _POSIX_TYPED_MEMORY_OBJECTS -1 -#endif /* bits/posix_opt.h */ +#endif /* bits/posix_opt.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/ppc.h b/libc/include/generic-glibc/bits/ppc.h new file mode 100644 index 0000000000..14e7b74272 --- /dev/null +++ b/libc/include/generic-glibc/bits/ppc.h @@ -0,0 +1,33 @@ +/* Facilities specific to the PowerPC architecture on Linux + Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PPC_H +#define _BITS_PPC_H + +#ifndef _SYS_PLATFORM_PPC_H +# error "Never include this file directly; use instead." +#endif + +__BEGIN_DECLS + +/* Read the time base frequency. */ +extern uint64_t __ppc_get_timebase_freq (void); + +__END_DECLS + +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/printf-ldbl.h b/libc/include/generic-glibc/bits/printf-ldbl.h similarity index 96% rename from libc/glibc-include/bits/printf-ldbl.h rename to libc/include/generic-glibc/bits/printf-ldbl.h index f9bd86eb74..b3a4b5915a 100644 --- a/libc/glibc-include/bits/printf-ldbl.h +++ b/libc/include/generic-glibc/bits/printf-ldbl.h @@ -20,4 +20,4 @@ # error "Never include directly; use instead." #endif -__LDBL_REDIR_DECL (printf_size) +__LDBL_REDIR_DECL (printf_size) \ No newline at end of file diff --git a/libc/glibc-include/bits/procfs-extra.h b/libc/include/generic-glibc/bits/procfs-extra.h similarity index 99% rename from libc/glibc-include/bits/procfs-extra.h rename to libc/include/generic-glibc/bits/procfs-extra.h index 596ae34d9b..c4d6d56f88 100644 --- a/libc/glibc-include/bits/procfs-extra.h +++ b/libc/include/generic-glibc/bits/procfs-extra.h @@ -19,4 +19,4 @@ #ifndef _SYS_PROCFS_H # error "Never include directly; use instead." -#endif +#endif \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/procfs-id.h b/libc/include/generic-glibc/bits/procfs-id.h new file mode 100644 index 0000000000..063cda0183 --- /dev/null +++ b/libc/include/generic-glibc/bits/procfs-id.h @@ -0,0 +1,25 @@ +/* Types of pr_uid and pr_gid in struct elf_prpsinfo. Generic Linux version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +typedef unsigned int __pr_uid_t; +typedef unsigned int __pr_gid_t; \ No newline at end of file diff --git a/libc/glibc-include/bits/procfs-prregset.h b/libc/include/generic-glibc/bits/procfs-prregset.h similarity index 96% rename from libc/glibc-include/bits/procfs-prregset.h rename to libc/include/generic-glibc/bits/procfs-prregset.h index 780c1a74c3..5284632551 100644 --- a/libc/glibc-include/bits/procfs-prregset.h +++ b/libc/include/generic-glibc/bits/procfs-prregset.h @@ -22,4 +22,4 @@ #endif typedef elf_gregset_t __prgregset_t; -typedef elf_fpregset_t __prfpregset_t; +typedef elf_fpregset_t __prfpregset_t; \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/procfs.h b/libc/include/generic-glibc/bits/procfs.h new file mode 100644 index 0000000000..2c76f90246 --- /dev/null +++ b/libc/include/generic-glibc/bits/procfs.h @@ -0,0 +1,37 @@ +/* Types for registers for sys/procfs.h. MIPS version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +#include + +/* ELF register definitions */ +#define ELF_NGREG 45 +#define ELF_NFPREG 33 + +#if _MIPS_SIM == _ABIN32 +__extension__ typedef unsigned long long elf_greg_t; +#else +typedef unsigned long elf_greg_t; +#endif +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +typedef double elf_fpreg_t; +typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/pthreadtypes-arch.h b/libc/include/generic-glibc/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..0de6106f34 --- /dev/null +++ b/libc/include/generic-glibc/bits/pthreadtypes-arch.h @@ -0,0 +1,89 @@ +/* Machine-specific pthread type layouts. MIPS version. + Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +/* Data structure for mutex handling. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 0 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (_MIPS_SIM != _ABI64) +#define __PTHREAD_MUTEX_USE_UNION (_MIPS_SIM != _ABI64) + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +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 +}; + +#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 + +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/pthreadtypes.h b/libc/include/generic-glibc/bits/pthreadtypes.h similarity index 99% rename from libc/glibc-include/bits/pthreadtypes.h rename to libc/include/generic-glibc/bits/pthreadtypes.h index 1b2a174060..ba83958e96 100644 --- a/libc/glibc-include/bits/pthreadtypes.h +++ b/libc/include/generic-glibc/bits/pthreadtypes.h @@ -118,4 +118,4 @@ typedef union } pthread_barrierattr_t; #endif -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/ptrace-shared.h b/libc/include/generic-glibc/bits/ptrace-shared.h similarity index 99% rename from libc/glibc-include/bits/ptrace-shared.h rename to libc/include/generic-glibc/bits/ptrace-shared.h index 44c23961a1..98df8f3c4b 100644 --- a/libc/glibc-include/bits/ptrace-shared.h +++ b/libc/include/generic-glibc/bits/ptrace-shared.h @@ -82,4 +82,4 @@ struct __ptrace_seccomp_metadata appear (those that are used for the particular request) as: pid_t PID, void *ADDR, int DATA, void *ADDR2 after REQUEST. */ -extern long int ptrace (enum __ptrace_request __request, ...) __THROW; +extern long int ptrace (enum __ptrace_request __request, ...) __THROW; \ No newline at end of file diff --git a/libc/glibc-include/bits/resource.h b/libc/include/generic-glibc/bits/resource.h similarity index 99% rename from libc/glibc-include/bits/resource.h rename to libc/include/generic-glibc/bits/resource.h index d0411232bf..979f6a70cc 100644 --- a/libc/glibc-include/bits/resource.h +++ b/libc/include/generic-glibc/bits/resource.h @@ -220,4 +220,4 @@ extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource, # endif #endif -__END_DECLS +__END_DECLS \ No newline at end of file diff --git a/libc/glibc-include/bits/sched.h b/libc/include/generic-glibc/bits/sched.h similarity index 99% rename from libc/glibc-include/bits/sched.h rename to libc/include/generic-glibc/bits/sched.h index 828b878696..7eb5f3d69b 100644 --- a/libc/glibc-include/bits/sched.h +++ b/libc/include/generic-glibc/bits/sched.h @@ -95,4 +95,4 @@ extern int setns (int __fd, int __nstype) __THROW; __END_DECLS -#endif /* bits/sched.h */ +#endif /* bits/sched.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/select.h b/libc/include/generic-glibc/bits/select.h new file mode 100644 index 0000000000..fe9398c824 --- /dev/null +++ b/libc/include/generic-glibc/bits/select.h @@ -0,0 +1,37 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SELECT_H +# error "Never use directly; include instead." +#endif + + +/* We don't use `memset' because this would require a prototype and + the array isn't too big. */ +#define __FD_ZERO(s) \ + do { \ + unsigned int __i; \ + fd_set *__arr = (s); \ + for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ + __FDS_BITS (__arr)[__i] = 0; \ + } while (0) +#define __FD_SET(d, s) \ + ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d))) +#define __FD_CLR(d, s) \ + ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d))) +#define __FD_ISSET(d, s) \ + ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0) \ No newline at end of file diff --git a/libc/glibc-include/bits/select2.h b/libc/include/generic-glibc/bits/select2.h similarity index 97% rename from libc/glibc-include/bits/select2.h rename to libc/include/generic-glibc/bits/select2.h index dffdd054b2..53dd32bad6 100644 --- a/libc/glibc-include/bits/select2.h +++ b/libc/include/generic-glibc/bits/select2.h @@ -32,4 +32,4 @@ extern long int __fdelt_warn (long int __d) ? (0 <= __d && __d < __FD_SETSIZE \ ? (__d / __NFDBITS) \ : __fdelt_warn (__d)) \ - : __fdelt_chk (__d)); }) + : __fdelt_chk (__d)); }) \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/sem-pad.h b/libc/include/generic-glibc/bits/sem-pad.h new file mode 100644 index 0000000000..8eb3f121aa --- /dev/null +++ b/libc/include/generic-glibc/bits/sem-pad.h @@ -0,0 +1,33 @@ +/* Define where padding goes in struct semid_ds. Generic version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SEM_H +# error "Never use directly; include instead." +#endif + +#include + +/* On most architectures, padding goes after time fields for 32-bit + systems and is omitted for 64-bit systems. Some architectures pad + before time fields instead, or omit padding despite being 32-bit, + or include it despite being 64-bit. This must match the layout + used for struct semid64_ds in , as glibc does not do + layout conversions for this structure. */ + +#define __SEM_PAD_AFTER_TIME (__TIMESIZE == 32) +#define __SEM_PAD_BEFORE_TIME 0 \ No newline at end of file diff --git a/libc/glibc-include/bits/sem.h b/libc/include/generic-glibc/bits/sem.h similarity index 99% rename from libc/glibc-include/bits/sem.h rename to libc/include/generic-glibc/bits/sem.h index a216459010..a3e4d27e0f 100644 --- a/libc/glibc-include/bits/sem.h +++ b/libc/include/generic-glibc/bits/sem.h @@ -94,4 +94,4 @@ struct seminfo int semaem; }; -#endif /* __USE_MISC */ +#endif /* __USE_MISC */ \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/semaphore.h b/libc/include/generic-glibc/bits/semaphore.h new file mode 100644 index 0000000000..dadb5d8d8e --- /dev/null +++ b/libc/include/generic-glibc/bits/semaphore.h @@ -0,0 +1,36 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + +#if _MIPS_SIM == _ABI64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/setjmp.h b/libc/include/generic-glibc/bits/setjmp.h new file mode 100644 index 0000000000..8cc70890e6 --- /dev/null +++ b/libc/include/generic-glibc/bits/setjmp.h @@ -0,0 +1,73 @@ +/* Define the machine-dependent type `jmp_buf'. MIPS version. + Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MIPS_BITS_SETJMP_H +#define _MIPS_BITS_SETJMP_H 1 + +#if !defined(_SETJMP_H) && !defined(_PTHREAD_H) +# error "Never include directly; use instead." +#endif + +#include + +typedef struct __jmp_buf_internal_tag + { +#if _MIPS_SIM == _ABIO32 + /* Program counter. */ + void *__pc; + + /* Stack pointer. */ + void *__sp; + + /* Callee-saved registers s0 through s7. */ + int __regs[8]; + + /* The frame pointer. */ + void *__fp; + + /* The global pointer. */ + void *__gp; +#else + /* Program counter. */ + __extension__ long long __pc; + + /* Stack pointer. */ + __extension__ long long __sp; + + /* Callee-saved registers s0 through s7. */ + __extension__ long long __regs[8]; + + /* The frame pointer. */ + __extension__ long long __fp; + + /* The global pointer. */ + __extension__ long long __gp; +#endif + + /* Unused (was floating point status register). */ + int __glibc_reserved1; + + /* Callee-saved floating point registers. */ +#if _MIPS_SIM == _ABI64 + double __fpregs[8]; +#else + double __fpregs[6]; +#endif + } __jmp_buf[1]; + +#endif /* _MIPS_BITS_SETJMP_H */ \ No newline at end of file diff --git a/libc/glibc-include/bits/setjmp2.h b/libc/include/generic-glibc/bits/setjmp2.h similarity index 99% rename from libc/glibc-include/bits/setjmp2.h rename to libc/include/generic-glibc/bits/setjmp2.h index 8fc6b89cb4..0d4e20010b 100644 --- a/libc/glibc-include/bits/setjmp2.h +++ b/libc/include/generic-glibc/bits/setjmp2.h @@ -37,4 +37,4 @@ extern void __longjmp_chk (struct __jmp_buf_tag __env[1], int __val), # define longjmp __longjmp_chk # define _longjmp __longjmp_chk # define siglongjmp __longjmp_chk -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/shm-pad.h b/libc/include/generic-glibc/bits/shm-pad.h similarity index 97% rename from libc/glibc-include/bits/shm-pad.h rename to libc/include/generic-glibc/bits/shm-pad.h index d5779dfbd0..29fc0c3160 100644 --- a/libc/glibc-include/bits/shm-pad.h +++ b/libc/include/generic-glibc/bits/shm-pad.h @@ -34,4 +34,4 @@ #define __SHM_PAD_AFTER_TIME (__TIMESIZE == 32) #define __SHM_PAD_BEFORE_TIME 0 #define __SHM_SEGSZ_AFTER_TIME 0 -#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 +#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 \ No newline at end of file diff --git a/libc/glibc-include/bits/shm.h b/libc/include/generic-glibc/bits/shm.h similarity index 99% rename from libc/glibc-include/bits/shm.h rename to libc/include/generic-glibc/bits/shm.h index 037eb02eb5..67716266d7 100644 --- a/libc/glibc-include/bits/shm.h +++ b/libc/include/generic-glibc/bits/shm.h @@ -115,4 +115,4 @@ struct shm_info #endif /* __USE_MISC */ -__END_DECLS +__END_DECLS \ No newline at end of file diff --git a/libc/glibc-include/bits/shmlba.h b/libc/include/generic-glibc/bits/shmlba.h similarity index 98% rename from libc/glibc-include/bits/shmlba.h rename to libc/include/generic-glibc/bits/shmlba.h index 1a4cb63e94..ebe9044b07 100644 --- a/libc/glibc-include/bits/shmlba.h +++ b/libc/include/generic-glibc/bits/shmlba.h @@ -26,4 +26,4 @@ __BEGIN_DECLS #define SHMLBA (__getpagesize ()) extern int __getpagesize (void) __THROW __attribute__ ((__const__)); -__END_DECLS +__END_DECLS \ No newline at end of file diff --git a/libc/glibc-include/bits/sigaction.h b/libc/include/generic-glibc/bits/sigaction.h similarity index 99% rename from libc/glibc-include/bits/sigaction.h rename to libc/include/generic-glibc/bits/sigaction.h index a9beac87c2..6c825a65b6 100644 --- a/libc/glibc-include/bits/sigaction.h +++ b/libc/include/generic-glibc/bits/sigaction.h @@ -80,4 +80,4 @@ struct sigaction #define SIG_UNBLOCK 1 /* Unblock signals. */ #define SIG_SETMASK 2 /* Set the set of blocked signals. */ -#endif +#endif \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/sigcontext.h b/libc/include/generic-glibc/bits/sigcontext.h new file mode 100644 index 0000000000..6e04b340f9 --- /dev/null +++ b/libc/include/generic-glibc/bits/sigcontext.h @@ -0,0 +1,37 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#ifndef sigcontext_struct +/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but + we need sigcontext. */ +# define sigcontext_struct sigcontext + +# include + +/* The Linux kernel headers redefine NULL wrongly, so cleanup afterwards. */ +# define __need_NULL +# include +#endif + +#endif /* bits/sigcontext.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/sigevent-consts.h b/libc/include/generic-glibc/bits/sigevent-consts.h similarity index 99% rename from libc/glibc-include/bits/sigevent-consts.h rename to libc/include/generic-glibc/bits/sigevent-consts.h index e8766d82f4..bd3ee34ed8 100644 --- a/libc/glibc-include/bits/sigevent-consts.h +++ b/libc/include/generic-glibc/bits/sigevent-consts.h @@ -38,4 +38,4 @@ enum #define SIGEV_THREAD_ID SIGEV_THREAD_ID }; -#endif +#endif \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/siginfo-arch.h b/libc/include/generic-glibc/bits/siginfo-arch.h new file mode 100644 index 0000000000..59cd9e3066 --- /dev/null +++ b/libc/include/generic-glibc/bits/siginfo-arch.h @@ -0,0 +1,7 @@ +/* Architecture-specific adjustments to siginfo_t. */ +#ifndef _BITS_SIGINFO_ARCH_H +#define _BITS_SIGINFO_ARCH_H 1 + +/* This architecture has no adjustments to make to siginfo_t. */ + +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/siginfo-consts-arch.h b/libc/include/generic-glibc/bits/siginfo-consts-arch.h similarity index 96% rename from libc/glibc-include/bits/siginfo-consts-arch.h rename to libc/include/generic-glibc/bits/siginfo-consts-arch.h index 96b4edbccd..387a778ab9 100644 --- a/libc/glibc-include/bits/siginfo-consts-arch.h +++ b/libc/include/generic-glibc/bits/siginfo-consts-arch.h @@ -4,4 +4,4 @@ /* This architecture has no additional siginfo constants. */ -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/siginfo-consts.h b/libc/include/generic-glibc/bits/siginfo-consts.h similarity index 99% rename from libc/glibc-include/bits/siginfo-consts.h rename to libc/include/generic-glibc/bits/siginfo-consts.h index f8de957487..84be2420f4 100644 --- a/libc/glibc-include/bits/siginfo-consts.h +++ b/libc/include/generic-glibc/bits/siginfo-consts.h @@ -209,4 +209,4 @@ enum # include #endif -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/signalfd.h b/libc/include/generic-glibc/bits/signalfd.h similarity index 99% rename from libc/glibc-include/bits/signalfd.h rename to libc/include/generic-glibc/bits/signalfd.h index 6639c0af79..ee9044e73e 100644 --- a/libc/glibc-include/bits/signalfd.h +++ b/libc/include/generic-glibc/bits/signalfd.h @@ -26,4 +26,4 @@ enum #define SFD_CLOEXEC SFD_CLOEXEC SFD_NONBLOCK = 00004000 #define SFD_NONBLOCK SFD_NONBLOCK - }; + }; \ No newline at end of file diff --git a/libc/glibc-include/bits/signum-generic.h b/libc/include/generic-glibc/bits/signum-generic.h similarity index 99% rename from libc/glibc-include/bits/signum-generic.h rename to libc/include/generic-glibc/bits/signum-generic.h index 6fbbf20a31..70934ca324 100644 --- a/libc/glibc-include/bits/signum-generic.h +++ b/libc/include/generic-glibc/bits/signum-generic.h @@ -99,4 +99,4 @@ /* Biggest signal number + 1 (including real-time signals). */ #define _NSIG (__SIGRTMAX + 1) -#endif /* bits/signum-generic.h. */ +#endif /* bits/signum-generic.h. */ \ No newline at end of file diff --git a/libc/glibc-include/bits/signum.h b/libc/include/generic-glibc/bits/signum.h similarity index 97% rename from libc/glibc-include/bits/signum.h rename to libc/include/generic-glibc/bits/signum.h index 25b0d2a6cf..e8b3e40af2 100644 --- a/libc/glibc-include/bits/signum.h +++ b/libc/include/generic-glibc/bits/signum.h @@ -55,4 +55,4 @@ #undef __SIGRTMAX #define __SIGRTMAX 64 -#endif /* included. */ +#endif /* included. */ \ No newline at end of file diff --git a/libc/glibc-include/bits/sigstack.h b/libc/include/generic-glibc/bits/sigstack.h similarity index 97% rename from libc/glibc-include/bits/sigstack.h rename to libc/include/generic-glibc/bits/sigstack.h index e3a37f641e..21c08359f0 100644 --- a/libc/glibc-include/bits/sigstack.h +++ b/libc/include/generic-glibc/bits/sigstack.h @@ -29,4 +29,4 @@ /* System default stack size. */ #define SIGSTKSZ 8192 -#endif /* bits/sigstack.h */ +#endif /* bits/sigstack.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/sigthread.h b/libc/include/generic-glibc/bits/sigthread.h similarity index 98% rename from libc/glibc-include/bits/sigthread.h rename to libc/include/generic-glibc/bits/sigthread.h index b106939cef..6248041ce1 100644 --- a/libc/glibc-include/bits/sigthread.h +++ b/libc/include/generic-glibc/bits/sigthread.h @@ -41,4 +41,4 @@ extern int pthread_sigqueue (pthread_t __threadid, int __signo, const union sigval __value) __THROW; #endif -#endif /* bits/sigthread.h */ +#endif /* bits/sigthread.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/sockaddr.h b/libc/include/generic-glibc/bits/sockaddr.h similarity index 98% rename from libc/glibc-include/bits/sockaddr.h rename to libc/include/generic-glibc/bits/sockaddr.h index 2505246ec5..4ebdab50d5 100644 --- a/libc/glibc-include/bits/sockaddr.h +++ b/libc/include/generic-glibc/bits/sockaddr.h @@ -39,4 +39,4 @@ typedef unsigned short int sa_family_t; /* Size of struct sockaddr_storage. */ #define _SS_SIZE 128 -#endif /* bits/sockaddr.h */ +#endif /* bits/sockaddr.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/socket.h b/libc/include/generic-glibc/bits/socket.h similarity index 99% rename from libc/glibc-include/bits/socket.h rename to libc/include/generic-glibc/bits/socket.h index 99af01d2a4..75c0b750a1 100644 --- a/libc/glibc-include/bits/socket.h +++ b/libc/include/generic-glibc/bits/socket.h @@ -450,4 +450,4 @@ struct linger int l_linger; /* Time to linger. */ }; -#endif /* bits/socket.h */ +#endif /* bits/socket.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/socket2.h b/libc/include/generic-glibc/bits/socket2.h similarity index 99% rename from libc/glibc-include/bits/socket2.h rename to libc/include/generic-glibc/bits/socket2.h index a609592b5e..db09943be6 100644 --- a/libc/glibc-include/bits/socket2.h +++ b/libc/include/generic-glibc/bits/socket2.h @@ -74,4 +74,4 @@ recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, __addr, __addr_len); } return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len); -} +} \ No newline at end of file diff --git a/libc/glibc-include/bits/socket_type.h b/libc/include/generic-glibc/bits/socket_type.h similarity index 99% rename from libc/glibc-include/bits/socket_type.h rename to libc/include/generic-glibc/bits/socket_type.h index c0981fd0e5..8787d66a03 100644 --- a/libc/glibc-include/bits/socket_type.h +++ b/libc/include/generic-glibc/bits/socket_type.h @@ -52,4 +52,4 @@ enum __socket_type SOCK_NONBLOCK = 00004000 /* Atomically mark descriptor(s) as non-blocking. */ #define SOCK_NONBLOCK SOCK_NONBLOCK -}; +}; \ No newline at end of file diff --git a/libc/glibc-include/bits/ss_flags.h b/libc/include/generic-glibc/bits/ss_flags.h similarity index 97% rename from libc/glibc-include/bits/ss_flags.h rename to libc/include/generic-glibc/bits/ss_flags.h index 9a54cf81e2..31b46a9237 100644 --- a/libc/glibc-include/bits/ss_flags.h +++ b/libc/include/generic-glibc/bits/ss_flags.h @@ -32,4 +32,4 @@ enum #define SS_DISABLE SS_DISABLE }; -#endif /* bits/ss_flags.h */ +#endif /* bits/ss_flags.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/stab.def b/libc/include/generic-glibc/bits/stab.def similarity index 99% rename from libc/glibc-include/bits/stab.def rename to libc/include/generic-glibc/bits/stab.def index cca2cc8344..47cdddfd96 100644 --- a/libc/glibc-include/bits/stab.def +++ b/libc/include/generic-glibc/bits/stab.def @@ -230,4 +230,4 @@ __define_stab (N_LENG, 0xfe, "LENG") +-----------------------------------------------+ * 50 EHDECL is also MOD2. * 48 BSLINE is also BROWS. - */ + */ \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/stat.h b/libc/include/generic-glibc/bits/stat.h new file mode 100644 index 0000000000..7b6aa9487c --- /dev/null +++ b/libc/include/generic-glibc/bits/stat.h @@ -0,0 +1,263 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +#include + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_LINUX_OLD 1 +#define _STAT_VER_KERNEL 1 +#define _STAT_VER_SVR4 2 +#define _STAT_VER_LINUX 3 +#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 1 +#define _MKNOD_VER_SVR4 2 +#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ + + +#if _MIPS_SIM == _ABIO32 +/* Structure describing file characteristics. */ +struct stat + { + unsigned long int st_dev; + long int st_pad1[3]; +#ifndef __USE_FILE_OFFSET64 + __ino_t st_ino; /* File serial number. */ +#else + __ino64_t st_ino; /* File serial number. */ +#endif + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + unsigned long int st_rdev; /* Device number, if device. */ +#ifndef __USE_FILE_OFFSET64 + long int st_pad2[2]; + __off_t st_size; /* Size of file, in bytes. */ + /* SVR4 added this extra long to allow for expansion of off_t. */ + long int st_pad3; +#else + long int st_pad2[3]; + __off64_t st_size; /* Size of file, in bytes. */ +#endif +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ +#ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number of 512-byte blocks allocated. */ +#else + long int st_pad4; + __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */ +#endif + long int st_pad5[14]; + }; + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + unsigned long int st_dev; + long int st_pad1[3]; + __ino64_t st_ino; /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + unsigned long int st_rdev; /* Device number, if device. */ + long int st_pad2[3]; + __off64_t st_size; /* Size of file, in bytes. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + long int st_pad3; + __blkcnt64_t st_blocks; /* Number of 512-byte blocks allocated. */ + long int st_pad4[14]; + }; +#endif +#else +struct stat + { + __dev_t st_dev; + int st_pad1[3]; /* Reserved for st_dev expansion */ +#ifndef __USE_FILE_OFFSET64 + __ino_t st_ino; +#else + __ino64_t st_ino; +#endif + __mode_t st_mode; + __nlink_t st_nlink; + __uid_t st_uid; + __gid_t st_gid; + __dev_t st_rdev; +#if !defined __USE_FILE_OFFSET64 + unsigned int st_pad2[2]; /* Reserved for st_rdev expansion */ + __off_t st_size; + int st_pad3; +#else + unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */ + __off64_t st_size; +#endif +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + __blksize_t st_blksize; + unsigned int st_pad4; +#ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; +#else + __blkcnt64_t st_blocks; +#endif + int st_pad5[14]; + }; + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; + unsigned int st_pad1[3]; /* Reserved for st_dev expansion */ + __ino64_t st_ino; + __mode_t st_mode; + __nlink_t st_nlink; + __uid_t st_uid; + __gid_t st_gid; + __dev_t st_rdev; + unsigned int st_pad2[3]; /* Reserved for st_rdev expansion */ + __off64_t st_size; +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + __blksize_t st_blksize; + unsigned int st_pad3; + __blkcnt64_t st_blocks; + int st_pad4[14]; +}; +#endif +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/statfs.h b/libc/include/generic-glibc/bits/statfs.h similarity index 98% rename from libc/glibc-include/bits/statfs.h rename to libc/include/generic-glibc/bits/statfs.h index 3eff10ec27..b0f0560789 100644 --- a/libc/glibc-include/bits/statfs.h +++ b/libc/include/generic-glibc/bits/statfs.h @@ -66,4 +66,4 @@ struct statfs64 /* Tell code we have these members. */ #define _STATFS_F_NAMELEN #define _STATFS_F_FRSIZE -#define _STATFS_F_FLAGS +#define _STATFS_F_FLAGS \ No newline at end of file diff --git a/libc/glibc-include/bits/statvfs.h b/libc/include/generic-glibc/bits/statvfs.h similarity index 99% rename from libc/glibc-include/bits/statvfs.h rename to libc/include/generic-glibc/bits/statvfs.h index a15db6baeb..486c6b13f9 100644 --- a/libc/glibc-include/bits/statvfs.h +++ b/libc/include/generic-glibc/bits/statvfs.h @@ -106,4 +106,4 @@ enum ST_RELATIME = 4096 /* Update atime relative to mtime/ctime. */ # define ST_RELATIME ST_RELATIME #endif /* Use GNU. */ -}; +}; \ No newline at end of file diff --git a/libc/glibc-include/bits/statx.h b/libc/include/generic-glibc/bits/statx.h similarity index 99% rename from libc/glibc-include/bits/statx.h rename to libc/include/generic-glibc/bits/statx.h index cff14b2543..552e8cd16b 100644 --- a/libc/glibc-include/bits/statx.h +++ b/libc/include/generic-glibc/bits/statx.h @@ -88,4 +88,4 @@ int statx (int __dirfd, const char *__restrict __path, int __flags, unsigned int __mask, struct statx *__restrict __buf) __THROW __nonnull ((2, 5)); -__END_DECLS +__END_DECLS \ No newline at end of file diff --git a/libc/glibc-include/bits/stdint-intn.h b/libc/include/generic-glibc/bits/stdint-intn.h similarity index 96% rename from libc/glibc-include/bits/stdint-intn.h rename to libc/include/generic-glibc/bits/stdint-intn.h index fc7b43fc04..25d902cdf2 100644 --- a/libc/glibc-include/bits/stdint-intn.h +++ b/libc/include/generic-glibc/bits/stdint-intn.h @@ -26,4 +26,4 @@ typedef __int16_t int16_t; typedef __int32_t int32_t; typedef __int64_t int64_t; -#endif /* bits/stdint-intn.h */ +#endif /* bits/stdint-intn.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/stdint-uintn.h b/libc/include/generic-glibc/bits/stdint-uintn.h similarity index 96% rename from libc/glibc-include/bits/stdint-uintn.h rename to libc/include/generic-glibc/bits/stdint-uintn.h index e054f0b9f3..3ce1b861e7 100644 --- a/libc/glibc-include/bits/stdint-uintn.h +++ b/libc/include/generic-glibc/bits/stdint-uintn.h @@ -26,4 +26,4 @@ typedef __uint16_t uint16_t; typedef __uint32_t uint32_t; typedef __uint64_t uint64_t; -#endif /* bits/stdint-uintn.h */ +#endif /* bits/stdint-uintn.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/stdio-ldbl.h b/libc/include/generic-glibc/bits/stdio-ldbl.h similarity index 99% rename from libc/glibc-include/bits/stdio-ldbl.h rename to libc/include/generic-glibc/bits/stdio-ldbl.h index 97ad168a04..4b2a70883f 100644 --- a/libc/glibc-include/bits/stdio-ldbl.h +++ b/libc/include/generic-glibc/bits/stdio-ldbl.h @@ -89,4 +89,4 @@ __LDBL_REDIR_DECL (__obstack_printf_chk) __LDBL_REDIR_DECL (__obstack_vprintf_chk) # endif # endif -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/stdio.h b/libc/include/generic-glibc/bits/stdio.h similarity index 99% rename from libc/glibc-include/bits/stdio.h rename to libc/include/generic-glibc/bits/stdio.h index 2efa0c5c6b..50f3ca058e 100644 --- a/libc/glibc-include/bits/stdio.h +++ b/libc/include/generic-glibc/bits/stdio.h @@ -192,4 +192,4 @@ __NTH (ferror_unlocked (FILE *__stream)) /* Define helper macro. */ #undef __STDIO_INLINE -#endif /* bits/stdio.h. */ +#endif /* bits/stdio.h. */ \ No newline at end of file diff --git a/libc/glibc-include/bits/stdio2.h b/libc/include/generic-glibc/bits/stdio2.h similarity index 99% rename from libc/glibc-include/bits/stdio2.h rename to libc/include/generic-glibc/bits/stdio2.h index d1456f9927..ffb29f23d5 100644 --- a/libc/glibc-include/bits/stdio2.h +++ b/libc/include/generic-glibc/bits/stdio2.h @@ -383,4 +383,4 @@ fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, } #endif -#endif /* bits/stdio2.h. */ +#endif /* bits/stdio2.h. */ \ No newline at end of file diff --git a/libc/glibc-include/bits/stdio_lim.h b/libc/include/generic-glibc/bits/stdio_lim.h similarity index 97% rename from libc/glibc-include/bits/stdio_lim.h rename to libc/include/generic-glibc/bits/stdio_lim.h index f2e3601fcf..b907b33f57 100644 --- a/libc/glibc-include/bits/stdio_lim.h +++ b/libc/include/generic-glibc/bits/stdio_lim.h @@ -36,4 +36,4 @@ #undef FOPEN_MAX #define FOPEN_MAX 16 -#endif /* bits/stdio_lim.h */ +#endif /* bits/stdio_lim.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/stdlib-bsearch.h b/libc/include/generic-glibc/bits/stdlib-bsearch.h similarity index 99% rename from libc/glibc-include/bits/stdlib-bsearch.h rename to libc/include/generic-glibc/bits/stdlib-bsearch.h index 60bb70c2d2..f1253f2031 100644 --- a/libc/glibc-include/bits/stdlib-bsearch.h +++ b/libc/include/generic-glibc/bits/stdlib-bsearch.h @@ -40,4 +40,4 @@ bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, } return NULL; -} +} \ No newline at end of file diff --git a/libc/glibc-include/bits/stdlib-float.h b/libc/include/generic-glibc/bits/stdlib-float.h similarity index 96% rename from libc/glibc-include/bits/stdlib-float.h rename to libc/include/generic-glibc/bits/stdlib-float.h index b6f4877cf6..05823e3173 100644 --- a/libc/glibc-include/bits/stdlib-float.h +++ b/libc/include/generic-glibc/bits/stdlib-float.h @@ -26,4 +26,4 @@ __NTH (atof (const char *__nptr)) { return strtod (__nptr, (char **) NULL); } -#endif /* Optimizing and Inlining. */ +#endif /* Optimizing and Inlining. */ \ No newline at end of file diff --git a/libc/glibc-include/bits/stdlib-ldbl.h b/libc/include/generic-glibc/bits/stdlib-ldbl.h similarity index 99% rename from libc/glibc-include/bits/stdlib-ldbl.h rename to libc/include/generic-glibc/bits/stdlib-ldbl.h index ca460fa3b6..7260cd5400 100644 --- a/libc/glibc-include/bits/stdlib-ldbl.h +++ b/libc/include/generic-glibc/bits/stdlib-ldbl.h @@ -38,4 +38,4 @@ __LDBL_REDIR1_DECL (qfcvt, fcvt) __LDBL_REDIR1_DECL (qgcvt, gcvt) __LDBL_REDIR1_DECL (qecvt_r, ecvt_r) __LDBL_REDIR1_DECL (qfcvt_r, fcvt_r) -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/stdlib.h b/libc/include/generic-glibc/bits/stdlib.h similarity index 99% rename from libc/glibc-include/bits/stdlib.h rename to libc/include/generic-glibc/bits/stdlib.h index 38eb546561..5ce9d17d41 100644 --- a/libc/glibc-include/bits/stdlib.h +++ b/libc/include/generic-glibc/bits/stdlib.h @@ -152,4 +152,4 @@ __NTH (wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, return __wcstombs_chk_warn (__dst, __src, __len, __bos (__dst)); } return __wcstombs_alias (__dst, __src, __len); -} +} \ No newline at end of file diff --git a/libc/glibc-include/bits/string_fortified.h b/libc/include/generic-glibc/bits/string_fortified.h similarity index 99% rename from libc/glibc-include/bits/string_fortified.h rename to libc/include/generic-glibc/bits/string_fortified.h index afeaba5361..1e9bd06680 100644 --- a/libc/glibc-include/bits/string_fortified.h +++ b/libc/include/generic-glibc/bits/string_fortified.h @@ -136,4 +136,4 @@ __NTH (strncat (char *__restrict __dest, const char *__restrict __src, return __builtin___strncat_chk (__dest, __src, __len, __bos (__dest)); } -#endif /* bits/string_fortified.h */ +#endif /* bits/string_fortified.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/strings_fortified.h b/libc/include/generic-glibc/bits/strings_fortified.h similarity index 99% rename from libc/glibc-include/bits/strings_fortified.h rename to libc/include/generic-glibc/bits/strings_fortified.h index f8088a6423..77696022f4 100644 --- a/libc/glibc-include/bits/strings_fortified.h +++ b/libc/include/generic-glibc/bits/strings_fortified.h @@ -31,4 +31,4 @@ __NTH (bzero (void *__dest, size_t __len)) (void) __builtin___memset_chk (__dest, '\0', __len, __bos0 (__dest)); } -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/stropts.h b/libc/include/generic-glibc/bits/stropts.h similarity index 99% rename from libc/glibc-include/bits/stropts.h rename to libc/include/generic-glibc/bits/stropts.h index 1e8742f3b6..7248aae1c8 100644 --- a/libc/glibc-include/bits/stropts.h +++ b/libc/include/generic-glibc/bits/stropts.h @@ -227,4 +227,4 @@ struct str_list struct str_mlist *sl_modlist; }; -#endif /* bits/stropts.h */ +#endif /* bits/stropts.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/sys_errlist.h b/libc/include/generic-glibc/bits/sys_errlist.h similarity index 99% rename from libc/glibc-include/bits/sys_errlist.h rename to libc/include/generic-glibc/bits/sys_errlist.h index 0311b736ca..ed5216ef84 100644 --- a/libc/glibc-include/bits/sys_errlist.h +++ b/libc/include/generic-glibc/bits/sys_errlist.h @@ -29,4 +29,4 @@ extern const char *const sys_errlist[]; #ifdef __USE_GNU extern int _sys_nerr; extern const char *const _sys_errlist[]; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/syscall.h b/libc/include/generic-glibc/bits/syscall.h similarity index 99% rename from libc/glibc-include/bits/syscall.h rename to libc/include/generic-glibc/bits/syscall.h index 56eb5178d0..6ac44124c1 100644 --- a/libc/glibc-include/bits/syscall.h +++ b/libc/include/generic-glibc/bits/syscall.h @@ -2317,5 +2317,4 @@ #ifdef __NR_writev # define SYS_writev __NR_writev -#endif - +#endif \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/sysctl.h b/libc/include/generic-glibc/bits/sysctl.h new file mode 100644 index 0000000000..d47dd78ea1 --- /dev/null +++ b/libc/include/generic-glibc/bits/sysctl.h @@ -0,0 +1 @@ +/* Empty file. */ \ No newline at end of file diff --git a/libc/glibc-include/bits/syslog-ldbl.h b/libc/include/generic-glibc/bits/syslog-ldbl.h similarity index 99% rename from libc/glibc-include/bits/syslog-ldbl.h rename to libc/include/generic-glibc/bits/syslog-ldbl.h index e3117552ae..310c8e5914 100644 --- a/libc/glibc-include/bits/syslog-ldbl.h +++ b/libc/include/generic-glibc/bits/syslog-ldbl.h @@ -32,4 +32,4 @@ __LDBL_REDIR_DECL (__syslog_chk) # ifdef __USE_MISC __LDBL_REDIR_DECL (__vsyslog_chk) # endif -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/syslog-path.h b/libc/include/generic-glibc/bits/syslog-path.h similarity index 96% rename from libc/glibc-include/bits/syslog-path.h rename to libc/include/generic-glibc/bits/syslog-path.h index 5b97fa7db5..d2c7facd41 100644 --- a/libc/glibc-include/bits/syslog-path.h +++ b/libc/include/generic-glibc/bits/syslog-path.h @@ -25,4 +25,4 @@ #define _PATH_LOG "/dev/log" -#endif /* bits/syslog-path.h */ +#endif /* bits/syslog-path.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/syslog.h b/libc/include/generic-glibc/bits/syslog.h similarity index 99% rename from libc/glibc-include/bits/syslog.h rename to libc/include/generic-glibc/bits/syslog.h index 86d94536ee..b5d3b1253a 100644 --- a/libc/glibc-include/bits/syslog.h +++ b/libc/include/generic-glibc/bits/syslog.h @@ -46,4 +46,4 @@ vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap) { __vsyslog_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __ap); } -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/sysmacros.h b/libc/include/generic-glibc/bits/sysmacros.h similarity index 98% rename from libc/glibc-include/bits/sysmacros.h rename to libc/include/generic-glibc/bits/sysmacros.h index 226023de7e..9826bee454 100644 --- a/libc/glibc-include/bits/sysmacros.h +++ b/libc/include/generic-glibc/bits/sysmacros.h @@ -71,4 +71,4 @@ return __dev; \ } -#endif /* bits/sysmacros.h */ +#endif /* bits/sysmacros.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/termios-baud.h b/libc/include/generic-glibc/bits/termios-baud.h similarity index 98% rename from libc/glibc-include/bits/termios-baud.h rename to libc/include/generic-glibc/bits/termios-baud.h index 7258d67eb5..0a45696eb0 100644 --- a/libc/glibc-include/bits/termios-baud.h +++ b/libc/include/generic-glibc/bits/termios-baud.h @@ -45,4 +45,4 @@ #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 -#define __MAX_BAUD B4000000 +#define __MAX_BAUD B4000000 \ No newline at end of file diff --git a/libc/glibc-include/bits/termios-c_cc.h b/libc/include/generic-glibc/bits/termios-c_cc.h similarity index 98% rename from libc/glibc-include/bits/termios-c_cc.h rename to libc/include/generic-glibc/bits/termios-c_cc.h index 9f587c58e8..d8989f0e57 100644 --- a/libc/glibc-include/bits/termios-c_cc.h +++ b/libc/include/generic-glibc/bits/termios-c_cc.h @@ -37,4 +37,4 @@ #define VDISCARD 13 #define VWERASE 14 #define VLNEXT 15 -#define VEOL2 16 +#define VEOL2 16 \ No newline at end of file diff --git a/libc/glibc-include/bits/termios-c_cflag.h b/libc/include/generic-glibc/bits/termios-c_cflag.h similarity index 98% rename from libc/glibc-include/bits/termios-c_cflag.h rename to libc/include/generic-glibc/bits/termios-c_cflag.h index 1da79b7e18..b89364c194 100644 --- a/libc/glibc-include/bits/termios-c_cflag.h +++ b/libc/include/generic-glibc/bits/termios-c_cflag.h @@ -31,4 +31,4 @@ #define PARENB 0000400 #define PARODD 0001000 #define HUPCL 0002000 -#define CLOCAL 0004000 +#define CLOCAL 0004000 \ No newline at end of file diff --git a/libc/glibc-include/bits/termios-c_iflag.h b/libc/include/generic-glibc/bits/termios-c_iflag.h similarity index 96% rename from libc/glibc-include/bits/termios-c_iflag.h rename to libc/include/generic-glibc/bits/termios-c_iflag.h index 519dc1fec9..260a6991bf 100644 --- a/libc/glibc-include/bits/termios-c_iflag.h +++ b/libc/include/generic-glibc/bits/termios-c_iflag.h @@ -37,4 +37,4 @@ #define IXOFF 0010000 /* Enable start/stop input control. */ #define IMAXBEL 0020000 /* Ring bell when input queue is full (not in POSIX). */ -#define IUTF8 0040000 /* Input is UTF8 (not in POSIX). */ +#define IUTF8 0040000 /* Input is UTF8 (not in POSIX). */ \ No newline at end of file diff --git a/libc/glibc-include/bits/termios-c_lflag.h b/libc/include/generic-glibc/bits/termios-c_lflag.h similarity index 99% rename from libc/glibc-include/bits/termios-c_lflag.h rename to libc/include/generic-glibc/bits/termios-c_lflag.h index 6e177082d6..7283177b37 100644 --- a/libc/glibc-include/bits/termios-c_lflag.h +++ b/libc/include/generic-glibc/bits/termios-c_lflag.h @@ -55,4 +55,4 @@ processing. */ #ifdef __USE_MISC # define EXTPROC 0200000 -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/termios-c_oflag.h b/libc/include/generic-glibc/bits/termios-c_oflag.h similarity index 99% rename from libc/glibc-include/bits/termios-c_oflag.h rename to libc/include/generic-glibc/bits/termios-c_oflag.h index 0b90f81dc0..ea059ffb53 100644 --- a/libc/glibc-include/bits/termios-c_oflag.h +++ b/libc/include/generic-glibc/bits/termios-c_oflag.h @@ -58,4 +58,4 @@ #ifdef __USE_MISC # define XTABS 0014000 -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/termios-misc.h b/libc/include/generic-glibc/bits/termios-misc.h similarity index 99% rename from libc/glibc-include/bits/termios-misc.h rename to libc/include/generic-glibc/bits/termios-misc.h index 8a151fab1b..cb6aa40196 100644 --- a/libc/glibc-include/bits/termios-misc.h +++ b/libc/include/generic-glibc/bits/termios-misc.h @@ -18,4 +18,4 @@ #ifndef _TERMIOS_H # error "Never include directly; use instead." -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/termios-struct.h b/libc/include/generic-glibc/bits/termios-struct.h similarity index 99% rename from libc/glibc-include/bits/termios-struct.h rename to libc/include/generic-glibc/bits/termios-struct.h index af5c1b1f35..d36d804dea 100644 --- a/libc/glibc-include/bits/termios-struct.h +++ b/libc/include/generic-glibc/bits/termios-struct.h @@ -33,4 +33,4 @@ struct termios speed_t c_ospeed; /* output speed */ #define _HAVE_STRUCT_TERMIOS_C_ISPEED 1 #define _HAVE_STRUCT_TERMIOS_C_OSPEED 1 - }; + }; \ No newline at end of file diff --git a/libc/glibc-include/bits/termios-tcflow.h b/libc/include/generic-glibc/bits/termios-tcflow.h similarity index 98% rename from libc/glibc-include/bits/termios-tcflow.h rename to libc/include/generic-glibc/bits/termios-tcflow.h index 3832d50ce2..cff2b50ae3 100644 --- a/libc/glibc-include/bits/termios-tcflow.h +++ b/libc/include/generic-glibc/bits/termios-tcflow.h @@ -23,4 +23,4 @@ /* tcsetattr uses these. */ #define TCSANOW 0 #define TCSADRAIN 1 -#define TCSAFLUSH 2 +#define TCSAFLUSH 2 \ No newline at end of file diff --git a/libc/glibc-include/bits/termios.h b/libc/include/generic-glibc/bits/termios.h similarity index 98% rename from libc/glibc-include/bits/termios.h rename to libc/include/generic-glibc/bits/termios.h index 997231cd03..0a7b44245a 100644 --- a/libc/glibc-include/bits/termios.h +++ b/libc/include/generic-glibc/bits/termios.h @@ -73,4 +73,4 @@ typedef unsigned int tcflag_t; #include -#include +#include \ No newline at end of file diff --git a/libc/glibc-include/bits/thread-shared-types.h b/libc/include/generic-glibc/bits/thread-shared-types.h similarity index 99% rename from libc/glibc-include/bits/thread-shared-types.h rename to libc/include/generic-glibc/bits/thread-shared-types.h index aec0a121d0..e29c1693eb 100644 --- a/libc/glibc-include/bits/thread-shared-types.h +++ b/libc/include/generic-glibc/bits/thread-shared-types.h @@ -195,4 +195,4 @@ struct __pthread_cond_s unsigned int __g_signals[2]; }; -#endif /* _THREAD_SHARED_TYPES_H */ +#endif /* _THREAD_SHARED_TYPES_H */ \ No newline at end of file diff --git a/libc/glibc-include/bits/time.h b/libc/include/generic-glibc/bits/time.h similarity index 99% rename from libc/glibc-include/bits/time.h rename to libc/include/generic-glibc/bits/time.h index a6f6cc9923..d4e4b39011 100644 --- a/libc/glibc-include/bits/time.h +++ b/libc/include/generic-glibc/bits/time.h @@ -80,4 +80,4 @@ extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW; __END_DECLS #endif /* use GNU */ -#endif /* bits/time.h */ +#endif /* bits/time.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/time64.h b/libc/include/generic-glibc/bits/time64.h similarity index 97% rename from libc/glibc-include/bits/time64.h rename to libc/include/generic-glibc/bits/time64.h index c0f8a24d8a..79be9dbdd3 100644 --- a/libc/glibc-include/bits/time64.h +++ b/libc/include/generic-glibc/bits/time64.h @@ -33,4 +33,4 @@ # define __TIME64_T_TYPE __SQUAD_TYPE #endif -#endif /* bits/time64.h */ +#endif /* bits/time64.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/timerfd.h b/libc/include/generic-glibc/bits/timerfd.h similarity index 99% rename from libc/glibc-include/bits/timerfd.h rename to libc/include/generic-glibc/bits/timerfd.h index 5a083b2396..5c765a54eb 100644 --- a/libc/glibc-include/bits/timerfd.h +++ b/libc/include/generic-glibc/bits/timerfd.h @@ -26,4 +26,4 @@ enum #define TFD_CLOEXEC TFD_CLOEXEC TFD_NONBLOCK = 00004000 #define TFD_NONBLOCK TFD_NONBLOCK - }; + }; \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/timesize.h b/libc/include/generic-glibc/bits/timesize.h new file mode 100644 index 0000000000..87ca919823 --- /dev/null +++ b/libc/include/generic-glibc/bits/timesize.h @@ -0,0 +1,22 @@ +/* Bit size of the time_t type at glibc build time, general case. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +/* Size in bits of the 'time_t' type of the default ABI. */ +#define __TIMESIZE __WORDSIZE \ No newline at end of file diff --git a/libc/glibc-include/bits/timex.h b/libc/include/generic-glibc/bits/timex.h similarity index 97% rename from libc/glibc-include/bits/timex.h rename to libc/include/generic-glibc/bits/timex.h index 6b466417ff..d6b311bd66 100644 --- a/libc/glibc-include/bits/timex.h +++ b/libc/include/generic-glibc/bits/timex.h @@ -104,7 +104,7 @@ struct timex #define STA_CLK 0x8000 /* clock source (0 = A, 1 = B) (ro) */ /* Read-only bits */ -#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \ - STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) +#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER \ + | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) -#endif /* bits/timex.h */ +#endif /* bits/timex.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/types.h b/libc/include/generic-glibc/bits/types.h similarity index 99% rename from libc/glibc-include/bits/types.h rename to libc/include/generic-glibc/bits/types.h index 27e065c3be..124eb5cb58 100644 --- a/libc/glibc-include/bits/types.h +++ b/libc/include/generic-glibc/bits/types.h @@ -221,4 +221,4 @@ __STD_TYPE __TIME64_T_TYPE __time64_t; /* Seconds since the Epoch. */ #undef __STD_TYPE -#endif /* bits/types.h */ +#endif /* bits/types.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/types/FILE.h b/libc/include/generic-glibc/bits/types/FILE.h similarity index 96% rename from libc/glibc-include/bits/types/FILE.h rename to libc/include/generic-glibc/bits/types/FILE.h index f268263209..7be60b90da 100644 --- a/libc/glibc-include/bits/types/FILE.h +++ b/libc/include/generic-glibc/bits/types/FILE.h @@ -6,4 +6,4 @@ struct _IO_FILE; /* The opaque type of streams. This is the definition used elsewhere. */ typedef struct _IO_FILE FILE; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/__FILE.h b/libc/include/generic-glibc/bits/types/__FILE.h similarity index 93% rename from libc/glibc-include/bits/types/__FILE.h rename to libc/include/generic-glibc/bits/types/__FILE.h index 06dd79bc83..5977e2728e 100644 --- a/libc/glibc-include/bits/types/__FILE.h +++ b/libc/include/generic-glibc/bits/types/__FILE.h @@ -4,4 +4,4 @@ struct _IO_FILE; typedef struct _IO_FILE __FILE; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/__fpos64_t.h b/libc/include/generic-glibc/bits/types/__fpos64_t.h similarity index 98% rename from libc/glibc-include/bits/types/__fpos64_t.h rename to libc/include/generic-glibc/bits/types/__fpos64_t.h index 06a6891154..b476af477d 100644 --- a/libc/glibc-include/bits/types/__fpos64_t.h +++ b/libc/include/generic-glibc/bits/types/__fpos64_t.h @@ -13,4 +13,4 @@ typedef struct _G_fpos64_t __mbstate_t __state; } __fpos64_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/__fpos_t.h b/libc/include/generic-glibc/bits/types/__fpos_t.h similarity index 98% rename from libc/glibc-include/bits/types/__fpos_t.h rename to libc/include/generic-glibc/bits/types/__fpos_t.h index bb04576651..6d1d87921a 100644 --- a/libc/glibc-include/bits/types/__fpos_t.h +++ b/libc/include/generic-glibc/bits/types/__fpos_t.h @@ -13,4 +13,4 @@ typedef struct _G_fpos_t __mbstate_t __state; } __fpos_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/__locale_t.h b/libc/include/generic-glibc/bits/types/__locale_t.h similarity index 97% rename from libc/glibc-include/bits/types/__locale_t.h rename to libc/include/generic-glibc/bits/types/__locale_t.h index 028dd05d0e..e10c17ea45 100644 --- a/libc/glibc-include/bits/types/__locale_t.h +++ b/libc/include/generic-glibc/bits/types/__locale_t.h @@ -41,4 +41,4 @@ struct __locale_struct typedef struct __locale_struct *__locale_t; -#endif /* bits/types/__locale_t.h */ +#endif /* bits/types/__locale_t.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/types/__mbstate_t.h b/libc/include/generic-glibc/bits/types/__mbstate_t.h similarity index 98% rename from libc/glibc-include/bits/types/__mbstate_t.h rename to libc/include/generic-glibc/bits/types/__mbstate_t.h index 1d8a4e28d1..b70f593480 100644 --- a/libc/glibc-include/bits/types/__mbstate_t.h +++ b/libc/include/generic-glibc/bits/types/__mbstate_t.h @@ -20,4 +20,4 @@ typedef struct } __value; /* Value so far. */ } __mbstate_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/__sigset_t.h b/libc/include/generic-glibc/bits/types/__sigset_t.h similarity index 96% rename from libc/glibc-include/bits/types/__sigset_t.h rename to libc/include/generic-glibc/bits/types/__sigset_t.h index e2f18acf30..8085dbb160 100644 --- a/libc/glibc-include/bits/types/__sigset_t.h +++ b/libc/include/generic-glibc/bits/types/__sigset_t.h @@ -7,4 +7,4 @@ typedef struct unsigned long int __val[_SIGSET_NWORDS]; } __sigset_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/__sigval_t.h b/libc/include/generic-glibc/bits/types/__sigval_t.h similarity index 99% rename from libc/glibc-include/bits/types/__sigval_t.h rename to libc/include/generic-glibc/bits/types/__sigval_t.h index 5fdd289a8b..41dbe90169 100644 --- a/libc/glibc-include/bits/types/__sigval_t.h +++ b/libc/include/generic-glibc/bits/types/__sigval_t.h @@ -38,4 +38,4 @@ union __sigval typedef union __sigval __sigval_t; #endif -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/clock_t.h b/libc/include/generic-glibc/bits/types/clock_t.h similarity index 95% rename from libc/glibc-include/bits/types/clock_t.h rename to libc/include/generic-glibc/bits/types/clock_t.h index ce97248f88..91aa9d0799 100644 --- a/libc/glibc-include/bits/types/clock_t.h +++ b/libc/include/generic-glibc/bits/types/clock_t.h @@ -6,4 +6,4 @@ /* Returned by `clock'. */ typedef __clock_t clock_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/clockid_t.h b/libc/include/generic-glibc/bits/types/clockid_t.h similarity index 95% rename from libc/glibc-include/bits/types/clockid_t.h rename to libc/include/generic-glibc/bits/types/clockid_t.h index b17c7da853..cf0611002f 100644 --- a/libc/glibc-include/bits/types/clockid_t.h +++ b/libc/include/generic-glibc/bits/types/clockid_t.h @@ -6,4 +6,4 @@ /* Clock ID used in clock and timer functions. */ typedef __clockid_t clockid_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/cookie_io_functions_t.h b/libc/include/generic-glibc/bits/types/cookie_io_functions_t.h similarity index 99% rename from libc/glibc-include/bits/types/cookie_io_functions_t.h rename to libc/include/generic-glibc/bits/types/cookie_io_functions_t.h index e3b6cd44a9..347ed487cf 100644 --- a/libc/glibc-include/bits/types/cookie_io_functions_t.h +++ b/libc/include/generic-glibc/bits/types/cookie_io_functions_t.h @@ -60,4 +60,4 @@ typedef struct _IO_cookie_io_functions_t cookie_close_function_t *close; /* Close file. */ } cookie_io_functions_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/error_t.h b/libc/include/generic-glibc/bits/types/error_t.h similarity index 99% rename from libc/glibc-include/bits/types/error_t.h rename to libc/include/generic-glibc/bits/types/error_t.h index 9c9cfe6c9b..8fcce919c1 100644 --- a/libc/glibc-include/bits/types/error_t.h +++ b/libc/include/generic-glibc/bits/types/error_t.h @@ -21,4 +21,4 @@ typedef int error_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/locale_t.h b/libc/include/generic-glibc/bits/types/locale_t.h similarity index 96% rename from libc/glibc-include/bits/types/locale_t.h rename to libc/include/generic-glibc/bits/types/locale_t.h index fb1e14e84b..a73720ca8c 100644 --- a/libc/glibc-include/bits/types/locale_t.h +++ b/libc/include/generic-glibc/bits/types/locale_t.h @@ -23,4 +23,4 @@ typedef __locale_t locale_t; -#endif /* bits/types/locale_t.h */ +#endif /* bits/types/locale_t.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/types/mbstate_t.h b/libc/include/generic-glibc/bits/types/mbstate_t.h similarity index 94% rename from libc/glibc-include/bits/types/mbstate_t.h rename to libc/include/generic-glibc/bits/types/mbstate_t.h index 8d1baa5c3b..876bf32137 100644 --- a/libc/glibc-include/bits/types/mbstate_t.h +++ b/libc/include/generic-glibc/bits/types/mbstate_t.h @@ -5,4 +5,4 @@ typedef __mbstate_t mbstate_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/res_state.h b/libc/include/generic-glibc/bits/types/res_state.h similarity index 98% rename from libc/glibc-include/bits/types/res_state.h rename to libc/include/generic-glibc/bits/types/res_state.h index 2544a627f6..2b4060274d 100644 --- a/libc/glibc-include/bits/types/res_state.h +++ b/libc/include/generic-glibc/bits/types/res_state.h @@ -58,4 +58,4 @@ struct __res_state { typedef struct __res_state *res_state; -#endif /* __res_state_defined */ +#endif /* __res_state_defined */ \ No newline at end of file diff --git a/libc/glibc-include/bits/types/sig_atomic_t.h b/libc/include/generic-glibc/bits/types/sig_atomic_t.h similarity index 97% rename from libc/glibc-include/bits/types/sig_atomic_t.h rename to libc/include/generic-glibc/bits/types/sig_atomic_t.h index 47eaa28311..f07c207827 100644 --- a/libc/glibc-include/bits/types/sig_atomic_t.h +++ b/libc/include/generic-glibc/bits/types/sig_atomic_t.h @@ -7,4 +7,4 @@ possibility of a signal arriving in the middle of the operation. */ typedef __sig_atomic_t sig_atomic_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/sigevent_t.h b/libc/include/generic-glibc/bits/types/sigevent_t.h similarity index 99% rename from libc/glibc-include/bits/types/sigevent_t.h rename to libc/include/generic-glibc/bits/types/sigevent_t.h index e8b28de7e3..8573d00bf5 100644 --- a/libc/glibc-include/bits/types/sigevent_t.h +++ b/libc/include/generic-glibc/bits/types/sigevent_t.h @@ -45,4 +45,4 @@ typedef struct sigevent #define sigev_notify_function _sigev_un._sigev_thread._function #define sigev_notify_attributes _sigev_un._sigev_thread._attribute -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/siginfo_t.h b/libc/include/generic-glibc/bits/types/siginfo_t.h similarity index 99% rename from libc/glibc-include/bits/types/siginfo_t.h rename to libc/include/generic-glibc/bits/types/siginfo_t.h index 43c4e009a4..10cbe9cc8f 100644 --- a/libc/glibc-include/bits/types/siginfo_t.h +++ b/libc/include/generic-glibc/bits/types/siginfo_t.h @@ -148,4 +148,4 @@ typedef struct # define si_arch _sifields._sigsys._arch #endif -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/sigset_t.h b/libc/include/generic-glibc/bits/types/sigset_t.h similarity index 96% rename from libc/glibc-include/bits/types/sigset_t.h rename to libc/include/generic-glibc/bits/types/sigset_t.h index 8b27e9112d..c5cc69452c 100644 --- a/libc/glibc-include/bits/types/sigset_t.h +++ b/libc/include/generic-glibc/bits/types/sigset_t.h @@ -6,4 +6,4 @@ /* A set of signals to be blocked, unblocked, or waited for. */ typedef __sigset_t sigset_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/sigval_t.h b/libc/include/generic-glibc/bits/types/sigval_t.h similarity index 98% rename from libc/glibc-include/bits/types/sigval_t.h rename to libc/include/generic-glibc/bits/types/sigval_t.h index a05d7f469f..cddd8c7ab2 100644 --- a/libc/glibc-include/bits/types/sigval_t.h +++ b/libc/include/generic-glibc/bits/types/sigval_t.h @@ -15,4 +15,4 @@ typedef __sigval_t sigval_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/stack_t.h b/libc/include/generic-glibc/bits/types/stack_t.h similarity index 99% rename from libc/glibc-include/bits/types/stack_t.h rename to libc/include/generic-glibc/bits/types/stack_t.h index 5af7a91df0..b41fefd5c9 100644 --- a/libc/glibc-include/bits/types/stack_t.h +++ b/libc/include/generic-glibc/bits/types/stack_t.h @@ -30,4 +30,4 @@ typedef struct size_t ss_size; } stack_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/struct_FILE.h b/libc/include/generic-glibc/bits/types/struct_FILE.h similarity index 99% rename from libc/glibc-include/bits/types/struct_FILE.h rename to libc/include/generic-glibc/bits/types/struct_FILE.h index b725459e58..88d164686f 100644 --- a/libc/glibc-include/bits/types/struct_FILE.h +++ b/libc/include/generic-glibc/bits/types/struct_FILE.h @@ -117,4 +117,4 @@ struct _IO_FILE_complete #define _IO_USER_LOCK 0x8000 /* Many more flag bits are defined internally. */ -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/struct_iovec.h b/libc/include/generic-glibc/bits/types/struct_iovec.h similarity index 99% rename from libc/glibc-include/bits/types/struct_iovec.h rename to libc/include/generic-glibc/bits/types/struct_iovec.h index 58261ba27f..a3937da5e3 100644 --- a/libc/glibc-include/bits/types/struct_iovec.h +++ b/libc/include/generic-glibc/bits/types/struct_iovec.h @@ -29,4 +29,4 @@ struct iovec size_t iov_len; /* Length of data. */ }; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/struct_itimerspec.h b/libc/include/generic-glibc/bits/types/struct_itimerspec.h similarity index 97% rename from libc/glibc-include/bits/types/struct_itimerspec.h rename to libc/include/generic-glibc/bits/types/struct_itimerspec.h index 17cc1ac86d..2960d0d73b 100644 --- a/libc/glibc-include/bits/types/struct_itimerspec.h +++ b/libc/include/generic-glibc/bits/types/struct_itimerspec.h @@ -11,4 +11,4 @@ struct itimerspec struct timespec it_value; }; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/struct_osockaddr.h b/libc/include/generic-glibc/bits/types/struct_osockaddr.h similarity index 97% rename from libc/glibc-include/bits/types/struct_osockaddr.h rename to libc/include/generic-glibc/bits/types/struct_osockaddr.h index e0bf59d383..e4d3c4ec91 100644 --- a/libc/glibc-include/bits/types/struct_osockaddr.h +++ b/libc/include/generic-glibc/bits/types/struct_osockaddr.h @@ -9,4 +9,4 @@ struct osockaddr unsigned char sa_data[14]; }; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/struct_rusage.h b/libc/include/generic-glibc/bits/types/struct_rusage.h similarity index 99% rename from libc/glibc-include/bits/types/struct_rusage.h rename to libc/include/generic-glibc/bits/types/struct_rusage.h index 50079b574e..9abe8f8d30 100644 --- a/libc/glibc-include/bits/types/struct_rusage.h +++ b/libc/include/generic-glibc/bits/types/struct_rusage.h @@ -128,4 +128,4 @@ struct rusage }; }; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/struct_sched_param.h b/libc/include/generic-glibc/bits/types/struct_sched_param.h similarity index 95% rename from libc/glibc-include/bits/types/struct_sched_param.h rename to libc/include/generic-glibc/bits/types/struct_sched_param.h index 8bf92c0fb0..3f933d7fed 100644 --- a/libc/glibc-include/bits/types/struct_sched_param.h +++ b/libc/include/generic-glibc/bits/types/struct_sched_param.h @@ -25,4 +25,4 @@ struct sched_param int sched_priority; }; -#endif /* bits/types/struct_sched_param.h */ +#endif /* bits/types/struct_sched_param.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/types/struct_sigstack.h b/libc/include/generic-glibc/bits/types/struct_sigstack.h similarity index 99% rename from libc/glibc-include/bits/types/struct_sigstack.h rename to libc/include/generic-glibc/bits/types/struct_sigstack.h index e4a7fc5171..dce240f435 100644 --- a/libc/glibc-include/bits/types/struct_sigstack.h +++ b/libc/include/generic-glibc/bits/types/struct_sigstack.h @@ -26,4 +26,4 @@ struct sigstack int ss_onstack; /* Nonzero if executing on this stack. */ }; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/struct_timespec.h b/libc/include/generic-glibc/bits/types/struct_timespec.h similarity index 98% rename from libc/glibc-include/bits/types/struct_timespec.h rename to libc/include/generic-glibc/bits/types/struct_timespec.h index 5b77c52b4f..549169d773 100644 --- a/libc/glibc-include/bits/types/struct_timespec.h +++ b/libc/include/generic-glibc/bits/types/struct_timespec.h @@ -12,4 +12,4 @@ struct timespec __syscall_slong_t tv_nsec; /* Nanoseconds. */ }; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/struct_timeval.h b/libc/include/generic-glibc/bits/types/struct_timeval.h similarity index 97% rename from libc/glibc-include/bits/types/struct_timeval.h rename to libc/include/generic-glibc/bits/types/struct_timeval.h index 70394ce886..5144612f07 100644 --- a/libc/glibc-include/bits/types/struct_timeval.h +++ b/libc/include/generic-glibc/bits/types/struct_timeval.h @@ -10,4 +10,4 @@ struct timeval __time_t tv_sec; /* Seconds. */ __suseconds_t tv_usec; /* Microseconds. */ }; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/struct_tm.h b/libc/include/generic-glibc/bits/types/struct_tm.h similarity index 99% rename from libc/glibc-include/bits/types/struct_tm.h rename to libc/include/generic-glibc/bits/types/struct_tm.h index b13b631228..a849518413 100644 --- a/libc/glibc-include/bits/types/struct_tm.h +++ b/libc/include/generic-glibc/bits/types/struct_tm.h @@ -25,4 +25,4 @@ struct tm # endif }; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/time_t.h b/libc/include/generic-glibc/bits/types/time_t.h similarity index 94% rename from libc/glibc-include/bits/types/time_t.h rename to libc/include/generic-glibc/bits/types/time_t.h index ab8287c6fe..cba3ced0ec 100644 --- a/libc/glibc-include/bits/types/time_t.h +++ b/libc/include/generic-glibc/bits/types/time_t.h @@ -6,4 +6,4 @@ /* Returned by `time'. */ typedef __time_t time_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/timer_t.h b/libc/include/generic-glibc/bits/types/timer_t.h similarity index 95% rename from libc/glibc-include/bits/types/timer_t.h rename to libc/include/generic-glibc/bits/types/timer_t.h index d71a4130e2..c2259da1a2 100644 --- a/libc/glibc-include/bits/types/timer_t.h +++ b/libc/include/generic-glibc/bits/types/timer_t.h @@ -6,4 +6,4 @@ /* Timer ID returned by `timer_create'. */ typedef __timer_t timer_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/types/wint_t.h b/libc/include/generic-glibc/bits/types/wint_t.h similarity index 95% rename from libc/glibc-include/bits/types/wint_t.h rename to libc/include/generic-glibc/bits/types/wint_t.h index fbd63dbc84..0b541993ab 100644 --- a/libc/glibc-include/bits/types/wint_t.h +++ b/libc/include/generic-glibc/bits/types/wint_t.h @@ -20,4 +20,4 @@ typedef __WINT_TYPE__ wint_t; #endif /* _WINT_T */ -#endif /* bits/types/wint_t.h */ +#endif /* bits/types/wint_t.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/typesizes.h b/libc/include/generic-glibc/bits/typesizes.h new file mode 100644 index 0000000000..3b14877438 --- /dev/null +++ b/libc/include/generic-glibc/bits/typesizes.h @@ -0,0 +1,83 @@ +/* bits/typesizes.h -- underlying types for *_t. Generic version. + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_TYPES_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_TYPESIZES_H +#define _BITS_TYPESIZES_H 1 + +/* See for the meaning of these macros. This file exists so + that need not vary across different GNU platforms. */ + +#define __DEV_T_TYPE __UQUAD_TYPE +#define __UID_T_TYPE __U32_TYPE +#define __GID_T_TYPE __U32_TYPE +#define __INO_T_TYPE __ULONGWORD_TYPE +#define __INO64_T_TYPE __UQUAD_TYPE +#define __MODE_T_TYPE __U32_TYPE +#define __NLINK_T_TYPE __UWORD_TYPE +#define __OFF_T_TYPE __SLONGWORD_TYPE +#define __OFF64_T_TYPE __SQUAD_TYPE +#define __PID_T_TYPE __S32_TYPE +#define __RLIM_T_TYPE __ULONGWORD_TYPE +#define __RLIM64_T_TYPE __UQUAD_TYPE +#define __BLKCNT_T_TYPE __SLONGWORD_TYPE +#define __BLKCNT64_T_TYPE __SQUAD_TYPE +#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE +#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE +#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE +#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __FSWORD_T_TYPE __SWORD_TYPE +#define __ID_T_TYPE __U32_TYPE +#define __CLOCK_T_TYPE __SLONGWORD_TYPE +#define __TIME_T_TYPE __SLONGWORD_TYPE +#define __USECONDS_T_TYPE __U32_TYPE +#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#define __DADDR_T_TYPE __S32_TYPE +#define __KEY_T_TYPE __S32_TYPE +#define __CLOCKID_T_TYPE __S32_TYPE +#define __TIMER_T_TYPE void * +#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE +#define __FSID_T_TYPE struct { int __val[2]; } +#define __SSIZE_T_TYPE __SWORD_TYPE +#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE +#define __CPU_MASK_TYPE __ULONGWORD_TYPE + +#ifdef __LP64__ +/* Tell the libc code that off_t and off64_t are actually the same type + for all ABI purposes, even if possibly expressed as different base types + for C type-checking purposes. */ +# define __OFF_T_MATCHES_OFF64_T 1 + +/* Same for ino_t and ino64_t. */ +# define __INO_T_MATCHES_INO64_T 1 + +/* And for rlim_t and rlim64_t. */ +# define __RLIM_T_MATCHES_RLIM64_T 1 +#else +# define __RLIM_T_MATCHES_RLIM64_T 0 +#endif + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + + +#endif /* bits/typesizes.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/uintn-identity.h b/libc/include/generic-glibc/bits/uintn-identity.h similarity index 97% rename from libc/glibc-include/bits/uintn-identity.h rename to libc/include/generic-glibc/bits/uintn-identity.h index 23824f9f77..dab940a94d 100644 --- a/libc/glibc-include/bits/uintn-identity.h +++ b/libc/include/generic-glibc/bits/uintn-identity.h @@ -47,4 +47,4 @@ __uint64_identity (__uint64_t __x) return __x; } -#endif /* _BITS_UINTN_IDENTITY_H. */ +#endif /* _BITS_UINTN_IDENTITY_H. */ \ No newline at end of file diff --git a/libc/glibc-include/bits/uio-ext.h b/libc/include/generic-glibc/bits/uio-ext.h similarity index 98% rename from libc/glibc-include/bits/uio-ext.h rename to libc/include/generic-glibc/bits/uio-ext.h index c4ea63df0b..da9a4971b5 100644 --- a/libc/glibc-include/bits/uio-ext.h +++ b/libc/include/generic-glibc/bits/uio-ext.h @@ -50,4 +50,4 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec, __END_DECLS -#endif /* bits/uio-ext.h */ +#endif /* bits/uio-ext.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/uio_lim.h b/libc/include/generic-glibc/bits/uio_lim.h similarity index 99% rename from libc/glibc-include/bits/uio_lim.h rename to libc/include/generic-glibc/bits/uio_lim.h index 022b94487b..b725c44f7b 100644 --- a/libc/glibc-include/bits/uio_lim.h +++ b/libc/include/generic-glibc/bits/uio_lim.h @@ -29,4 +29,4 @@ this large value the readv/writev call will not fail because of this. */ #define __IOV_MAX 1024 -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/unistd.h b/libc/include/generic-glibc/bits/unistd.h similarity index 99% rename from libc/glibc-include/bits/unistd.h rename to libc/include/generic-glibc/bits/unistd.h index 4267bbb29a..45fa1d6a8a 100644 --- a/libc/glibc-include/bits/unistd.h +++ b/libc/include/generic-glibc/bits/unistd.h @@ -382,4 +382,4 @@ __NTH (getdomainname (char *__buf, size_t __buflen)) } return __getdomainname_alias (__buf, __buflen); } -#endif +#endif \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/unistd_ext.h b/libc/include/generic-glibc/bits/unistd_ext.h new file mode 100644 index 0000000000..4ce5a98207 --- /dev/null +++ b/libc/include/generic-glibc/bits/unistd_ext.h @@ -0,0 +1,36 @@ +/* System-specific extensions of , Linux version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _UNISTD_H +# error "Never include directly; use instead." +#endif + +#ifdef __USE_GNU + +/* Return the kernel thread ID (TID) of the current thread. The + returned value is not subject to caching. Most Linux system calls + accept a TID in place of a PID. Using the TID to change properties + of a thread that has been created using pthread_create can lead to + undefined behavior (comparable to manipulating file descriptors + directly that have not been created explicitly). Note that a TID + uniquely identifies a thread only while this thread is running; a + TID can be reused once a thread has exited, even if the thread is + not detached and has not been joined. */ +extern __pid_t gettid (void) __THROW; + +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/utmp.h b/libc/include/generic-glibc/bits/utmp.h similarity index 99% rename from libc/glibc-include/bits/utmp.h rename to libc/include/generic-glibc/bits/utmp.h index 7357034cb6..ee3a0dfc43 100644 --- a/libc/glibc-include/bits/utmp.h +++ b/libc/include/generic-glibc/bits/utmp.h @@ -123,4 +123,4 @@ struct utmp #define _HAVE_UT_PID 1 #define _HAVE_UT_ID 1 #define _HAVE_UT_TV 1 -#define _HAVE_UT_HOST 1 +#define _HAVE_UT_HOST 1 \ No newline at end of file diff --git a/libc/glibc-include/bits/utmpx.h b/libc/include/generic-glibc/bits/utmpx.h similarity index 99% rename from libc/glibc-include/bits/utmpx.h rename to libc/include/generic-glibc/bits/utmpx.h index 472a7d57d3..bb8a11ee12 100644 --- a/libc/glibc-include/bits/utmpx.h +++ b/libc/include/generic-glibc/bits/utmpx.h @@ -99,4 +99,4 @@ struct utmpx #ifdef __USE_GNU # define ACCOUNTING 9 /* System accounting. */ -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/utsname.h b/libc/include/generic-glibc/bits/utsname.h similarity index 96% rename from libc/glibc-include/bits/utsname.h rename to libc/include/generic-glibc/bits/utsname.h index 07bda3926d..03d6b3d7d9 100644 --- a/libc/glibc-include/bits/utsname.h +++ b/libc/include/generic-glibc/bits/utsname.h @@ -25,4 +25,4 @@ /* Linux provides as additional information in the `struct utsname' the name of the current domain. Define _UTSNAME_DOMAIN_LENGTH to a value != 0 to activate this entry. */ -#define _UTSNAME_DOMAIN_LENGTH _UTSNAME_LENGTH +#define _UTSNAME_DOMAIN_LENGTH _UTSNAME_LENGTH \ No newline at end of file diff --git a/libc/glibc-include/bits/waitflags.h b/libc/include/generic-glibc/bits/waitflags.h similarity index 96% rename from libc/glibc-include/bits/waitflags.h rename to libc/include/generic-glibc/bits/waitflags.h index 790cfb3eef..d7a8d1558f 100644 --- a/libc/glibc-include/bits/waitflags.h +++ b/libc/include/generic-glibc/bits/waitflags.h @@ -36,4 +36,4 @@ #define __WNOTHREAD 0x20000000 /* Don't wait on children of other threads in this group */ #define __WALL 0x40000000 /* Wait for any child. */ -#define __WCLONE 0x80000000 /* Wait for cloned process. */ +#define __WCLONE 0x80000000 /* Wait for cloned process. */ \ No newline at end of file diff --git a/libc/glibc-include/bits/waitstatus.h b/libc/include/generic-glibc/bits/waitstatus.h similarity index 98% rename from libc/glibc-include/bits/waitstatus.h rename to libc/include/generic-glibc/bits/waitstatus.h index 9d08786c04..c85b9ea5fb 100644 --- a/libc/glibc-include/bits/waitstatus.h +++ b/libc/include/generic-glibc/bits/waitstatus.h @@ -56,4 +56,4 @@ #define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) #define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) #define __W_CONTINUED 0xffff -#define __WCOREFLAG 0x80 +#define __WCOREFLAG 0x80 \ No newline at end of file diff --git a/libc/glibc-include/bits/wchar-ldbl.h b/libc/include/generic-glibc/bits/wchar-ldbl.h similarity index 99% rename from libc/glibc-include/bits/wchar-ldbl.h rename to libc/include/generic-glibc/bits/wchar-ldbl.h index a3378014f3..cf6cdcfc91 100644 --- a/libc/glibc-include/bits/wchar-ldbl.h +++ b/libc/include/generic-glibc/bits/wchar-ldbl.h @@ -64,4 +64,4 @@ __LDBL_REDIR_DECL (__wprintf_chk) __LDBL_REDIR_DECL (__vfwprintf_chk) __LDBL_REDIR_DECL (__vwprintf_chk) # endif -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/wchar.h b/libc/include/generic-glibc/bits/wchar.h similarity index 98% rename from libc/glibc-include/bits/wchar.h rename to libc/include/generic-glibc/bits/wchar.h index f21912d2a7..214cd83b48 100644 --- a/libc/glibc-include/bits/wchar.h +++ b/libc/include/generic-glibc/bits/wchar.h @@ -46,4 +46,4 @@ # define __WCHAR_MIN (-__WCHAR_MAX - 1) #endif -#endif /* bits/wchar.h */ +#endif /* bits/wchar.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/wchar2.h b/libc/include/generic-glibc/bits/wchar2.h similarity index 99% rename from libc/glibc-include/bits/wchar2.h rename to libc/include/generic-glibc/bits/wchar2.h index 81603d560b..fc915e5cd0 100644 --- a/libc/glibc-include/bits/wchar2.h +++ b/libc/include/generic-glibc/bits/wchar2.h @@ -590,4 +590,4 @@ __NTH (wcsnrtombs (char *__restrict __dst, const wchar_t **__restrict __src, } return __wcsnrtombs_alias (__dst, __src, __nwc, __len, __ps); } -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/wctype-wchar.h b/libc/include/generic-glibc/bits/wctype-wchar.h similarity index 99% rename from libc/glibc-include/bits/wctype-wchar.h rename to libc/include/generic-glibc/bits/wctype-wchar.h index 22ae0abdeb..78ccf69a0e 100644 --- a/libc/glibc-include/bits/wctype-wchar.h +++ b/libc/include/generic-glibc/bits/wctype-wchar.h @@ -170,4 +170,4 @@ extern wint_t towupper (wint_t __wc) __THROW; __END_DECLS -#endif /* bits/wctype-wchar.h. */ +#endif /* bits/wctype-wchar.h. */ \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/wordsize.h b/libc/include/generic-glibc/bits/wordsize.h new file mode 100644 index 0000000000..5ac68ef994 --- /dev/null +++ b/libc/include/generic-glibc/bits/wordsize.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/glibc-include/bits/xopen_lim.h b/libc/include/generic-glibc/bits/xopen_lim.h similarity index 99% rename from libc/glibc-include/bits/xopen_lim.h rename to libc/include/generic-glibc/bits/xopen_lim.h index b76a94bd14..bfb27a3b58 100644 --- a/libc/glibc-include/bits/xopen_lim.h +++ b/libc/include/generic-glibc/bits/xopen_lim.h @@ -145,4 +145,4 @@ # endif #endif -#endif /* bits/xopen_lim.h */ +#endif /* bits/xopen_lim.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/bits/xtitypes.h b/libc/include/generic-glibc/bits/xtitypes.h new file mode 100644 index 0000000000..a84ace3507 --- /dev/null +++ b/libc/include/generic-glibc/bits/xtitypes.h @@ -0,0 +1,33 @@ +/* bits/xtitypes.h -- Define some types used by . Generic. + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _STROPTS_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_XTITYPES_H +#define _BITS_XTITYPES_H 1 + +#include + +/* This type is used by some structs in . */ +typedef __SLONGWORD_TYPE __t_scalar_t; +typedef __ULONGWORD_TYPE __t_uscalar_t; + + +#endif /* bits/xtitypes.h */ \ No newline at end of file diff --git a/libc/glibc-include/byteswap.h b/libc/include/generic-glibc/byteswap.h similarity index 98% rename from libc/glibc-include/byteswap.h rename to libc/include/generic-glibc/byteswap.h index b1941914c0..c34d216f83 100644 --- a/libc/glibc-include/byteswap.h +++ b/libc/include/generic-glibc/byteswap.h @@ -36,4 +36,4 @@ /* Return a value with all bytes in the 64 bit argument swapped. */ #define bswap_64(x) __bswap_64 (x) -#endif /* byteswap.h */ +#endif /* byteswap.h */ \ No newline at end of file diff --git a/libc/glibc-include/complex.h b/libc/include/generic-glibc/complex.h similarity index 99% rename from libc/glibc-include/complex.h rename to libc/include/generic-glibc/complex.h index f3e1d846f8..ab0298b798 100644 --- a/libc/glibc-include/complex.h +++ b/libc/include/generic-glibc/complex.h @@ -221,4 +221,4 @@ __BEGIN_DECLS __END_DECLS -#endif /* complex.h */ +#endif /* complex.h */ \ No newline at end of file diff --git a/libc/glibc-include/cpio.h b/libc/include/generic-glibc/cpio.h similarity index 99% rename from libc/glibc-include/cpio.h rename to libc/include/generic-glibc/cpio.h index ff41fe2154..1a7ef80162 100644 --- a/libc/glibc-include/cpio.h +++ b/libc/include/generic-glibc/cpio.h @@ -70,4 +70,4 @@ #define C_ISCTG 0110000 #define C_ISREG 0100000 -#endif /* cpio.h */ +#endif /* cpio.h */ \ No newline at end of file diff --git a/libc/glibc-include/crypt.h b/libc/include/generic-glibc/crypt.h similarity index 99% rename from libc/glibc-include/crypt.h rename to libc/include/generic-glibc/crypt.h index 65061deb9d..941ab7f2de 100644 --- a/libc/glibc-include/crypt.h +++ b/libc/include/generic-glibc/crypt.h @@ -67,4 +67,4 @@ extern char *crypt_r (const char *__phrase, const char *__salt, __END_DECLS -#endif /* crypt.h */ +#endif /* crypt.h */ \ No newline at end of file diff --git a/libc/glibc-include/ctype.h b/libc/include/generic-glibc/ctype.h similarity index 99% rename from libc/glibc-include/ctype.h rename to libc/include/generic-glibc/ctype.h index 78a455e227..2f6b7e1c3d 100644 --- a/libc/glibc-include/ctype.h +++ b/libc/include/generic-glibc/ctype.h @@ -326,4 +326,4 @@ extern int toupper_l (int __c, locale_t __l) __THROW; __END_DECLS -#endif /* ctype.h */ +#endif /* ctype.h */ \ No newline at end of file diff --git a/libc/glibc-include/dirent.h b/libc/include/generic-glibc/dirent.h similarity index 99% rename from libc/glibc-include/dirent.h rename to libc/include/generic-glibc/dirent.h index 9494360ce8..ae3518630e 100644 --- a/libc/glibc-include/dirent.h +++ b/libc/include/generic-glibc/dirent.h @@ -86,8 +86,8 @@ typedef __ino64_t ino64_t; # ifdef _DIRENT_HAVE_D_RECLEN # define _D_ALLOC_NAMLEN(d) (((char *) (d) + (d)->d_reclen) - &(d)->d_name[0]) # else -# define _D_ALLOC_NAMLEN(d) (sizeof (d)->d_name > 1 ? sizeof (d)->d_name : \ - _D_EXACT_NAMLEN (d) + 1) +# define _D_ALLOC_NAMLEN(d) (sizeof (d)->d_name > 1 ? sizeof (d)->d_name \ + : _D_EXACT_NAMLEN (d) + 1) # endif #endif @@ -401,4 +401,4 @@ extern int versionsort64 (const struct dirent64 **__e1, __END_DECLS -#endif /* dirent.h */ +#endif /* dirent.h */ \ No newline at end of file diff --git a/libc/glibc-include/dlfcn.h b/libc/include/generic-glibc/dlfcn.h similarity index 99% rename from libc/glibc-include/dlfcn.h rename to libc/include/generic-glibc/dlfcn.h index 896ad6fc9b..ae3e773941 100644 --- a/libc/glibc-include/dlfcn.h +++ b/libc/include/generic-glibc/dlfcn.h @@ -187,4 +187,4 @@ typedef struct __END_DECLS -#endif /* dlfcn.h */ +#endif /* dlfcn.h */ \ No newline at end of file diff --git a/libc/glibc-include/elf.h b/libc/include/generic-glibc/elf.h similarity index 99% rename from libc/glibc-include/elf.h rename to libc/include/generic-glibc/elf.h index 47a514a389..6ad2855896 100644 --- a/libc/glibc-include/elf.h +++ b/libc/include/generic-glibc/elf.h @@ -3998,4 +3998,4 @@ enum __END_DECLS -#endif /* elf.h */ +#endif /* elf.h */ \ No newline at end of file diff --git a/libc/glibc-include/endian.h b/libc/include/generic-glibc/endian.h similarity index 99% rename from libc/glibc-include/endian.h rename to libc/include/generic-glibc/endian.h index e62b735625..ab72a4ec09 100644 --- a/libc/glibc-include/endian.h +++ b/libc/include/generic-glibc/endian.h @@ -94,4 +94,4 @@ # endif #endif -#endif /* endian.h */ +#endif /* endian.h */ \ No newline at end of file diff --git a/libc/glibc-include/envz.h b/libc/include/generic-glibc/envz.h similarity index 99% rename from libc/glibc-include/envz.h rename to libc/include/generic-glibc/envz.h index ebc52f45f4..8d885acf1e 100644 --- a/libc/glibc-include/envz.h +++ b/libc/include/generic-glibc/envz.h @@ -70,4 +70,4 @@ extern void envz_strip (char **__restrict __envz, __END_DECLS -#endif /* envz.h */ +#endif /* envz.h */ \ No newline at end of file diff --git a/libc/glibc-include/err.h b/libc/include/generic-glibc/err.h similarity index 96% rename from libc/glibc-include/err.h rename to libc/include/generic-glibc/err.h index 4690d04d6a..230d69151a 100644 --- a/libc/glibc-include/err.h +++ b/libc/include/generic-glibc/err.h @@ -52,6 +52,10 @@ extern void errx (int __status, const char *__format, ...) extern void verrx (int __status, const char *, __gnuc_va_list) __attribute__ ((__noreturn__, __format__ (__printf__, 2, 0))); +#ifdef __LDBL_COMPAT +# include +#endif + __END_DECLS -#endif /* err.h */ +#endif /* err.h */ \ No newline at end of file diff --git a/libc/glibc-include/errno.h b/libc/include/generic-glibc/errno.h similarity index 98% rename from libc/glibc-include/errno.h rename to libc/include/generic-glibc/errno.h index dde2107b75..38e844ad1c 100644 --- a/libc/glibc-include/errno.h +++ b/libc/include/generic-glibc/errno.h @@ -52,4 +52,4 @@ extern char *program_invocation_short_name; __END_DECLS #endif /* !__ASSEMBLER__ */ -#endif /* errno.h */ +#endif /* errno.h */ \ No newline at end of file diff --git a/libc/glibc-include/error.h b/libc/include/generic-glibc/error.h similarity index 84% rename from libc/glibc-include/error.h rename to libc/include/generic-glibc/error.h index 34d4a6d4c6..4762169d11 100644 --- a/libc/glibc-include/error.h +++ b/libc/include/generic-glibc/error.h @@ -47,11 +47,17 @@ extern unsigned int error_message_count; variable controls whether this mode is selected or not. */ extern int error_one_per_line; - -#if defined __extern_always_inline && defined __va_arg_pack -# include +#ifdef __LDBL_COMPAT +# include +#else +/* Do not inline error and error_at_line when long double has the same + size of double, because that would invalidate the redirections to the + compatibility functions. */ +# if defined __extern_always_inline && defined __va_arg_pack +# include +# endif #endif __END_DECLS -#endif /* error.h */ +#endif /* error.h */ \ No newline at end of file diff --git a/libc/glibc-include/execinfo.h b/libc/include/generic-glibc/execinfo.h similarity index 98% rename from libc/glibc-include/execinfo.h rename to libc/include/generic-glibc/execinfo.h index 0c361451b4..84ed135d29 100644 --- a/libc/glibc-include/execinfo.h +++ b/libc/include/generic-glibc/execinfo.h @@ -40,4 +40,4 @@ extern void backtrace_symbols_fd (void *const *__array, int __size, int __fd) __END_DECLS -#endif /* execinfo.h */ +#endif /* execinfo.h */ \ No newline at end of file diff --git a/libc/glibc-include/fcntl.h b/libc/include/generic-glibc/fcntl.h similarity index 99% rename from libc/glibc-include/fcntl.h rename to libc/include/generic-glibc/fcntl.h index 7af8dfba69..131089e8f3 100644 --- a/libc/glibc-include/fcntl.h +++ b/libc/include/generic-glibc/fcntl.h @@ -330,4 +330,4 @@ extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len); __END_DECLS -#endif /* fcntl.h */ +#endif /* fcntl.h */ \ No newline at end of file diff --git a/libc/glibc-include/features.h b/libc/include/generic-glibc/features.h similarity index 98% rename from libc/glibc-include/features.h rename to libc/include/generic-glibc/features.h index ba272078cf..0a952454ef 100644 --- a/libc/glibc-include/features.h +++ b/libc/include/generic-glibc/features.h @@ -414,10 +414,10 @@ instance, with GCC, -std=gnu11 will have C99-compliant scanf with or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the old extension. */ -#if defined __USE_GNU && \ - (defined __cplusplus \ - ? (__cplusplus < 201103L && !defined __GXX_EXPERIMENTAL_CXX0X__) \ - : (!defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L)) +#if (defined __USE_GNU \ + && (defined __cplusplus \ + ? (__cplusplus < 201103L && !defined __GXX_EXPERIMENTAL_CXX0X__) \ + : (!defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L))) # define __GLIBC_USE_DEPRECATED_SCANF 1 #else # define __GLIBC_USE_DEPRECATED_SCANF 0 @@ -474,4 +474,4 @@ #include -#endif /* features.h */ +#endif /* features.h */ \ No newline at end of file diff --git a/libc/glibc-include/fenv.h b/libc/include/generic-glibc/fenv.h similarity index 99% rename from libc/glibc-include/fenv.h rename to libc/include/generic-glibc/fenv.h index 8722269e0d..7d402ffd2e 100644 --- a/libc/glibc-include/fenv.h +++ b/libc/include/generic-glibc/fenv.h @@ -171,4 +171,4 @@ extern int fegetexcept (void) __THROW; __END_DECLS -#endif /* fenv.h */ +#endif /* fenv.h */ \ No newline at end of file diff --git a/libc/glibc-include/fmtmsg.h b/libc/include/generic-glibc/fmtmsg.h similarity index 99% rename from libc/glibc-include/fmtmsg.h rename to libc/include/generic-glibc/fmtmsg.h index 495c156b76..23a647dff5 100644 --- a/libc/glibc-include/fmtmsg.h +++ b/libc/include/generic-glibc/fmtmsg.h @@ -102,4 +102,4 @@ extern int addseverity (int __severity, const char *__string) __THROW; __END_DECLS -#endif /* fmtmsg.h */ +#endif /* fmtmsg.h */ \ No newline at end of file diff --git a/libc/glibc-include/fnmatch.h b/libc/include/generic-glibc/fnmatch.h similarity index 98% rename from libc/glibc-include/fnmatch.h rename to libc/include/generic-glibc/fnmatch.h index fa4d56aeb7..82be4e6d2e 100644 --- a/libc/glibc-include/fnmatch.h +++ b/libc/include/generic-glibc/fnmatch.h @@ -59,4 +59,4 @@ extern int fnmatch (const char *__pattern, const char *__name, int __flags); } #endif -#endif /* fnmatch.h */ +#endif /* fnmatch.h */ \ No newline at end of file diff --git a/libc/glibc/sysdeps/csky/dl-sysdep.h b/libc/include/generic-glibc/fpregdef.h similarity index 71% rename from libc/glibc/sysdeps/csky/dl-sysdep.h rename to libc/include/generic-glibc/fpregdef.h index 66df46308d..81d5bc90ee 100644 --- a/libc/glibc/sysdeps/csky/dl-sysdep.h +++ b/libc/include/generic-glibc/fpregdef.h @@ -1,5 +1,4 @@ -/* System-specific settings for dynamic linker code. C-SKY version. - Copyright (C) 2018-2019 Free Software Foundation, Inc. +/* Copyright (C) 1991-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,8 +15,9 @@ License along with the GNU C Library. If not, see . */ -#include_next +#ifndef _FPREGDEF_H +#define _FPREGDEF_H -/* _dl_argv cannot be attribute_relro, because _dl_start_user - might write into it after _dl_start returns. */ -#define DL_ARGV_NOT_RELRO 1 +#include + +#endif /* _FPREGDEF_H */ \ No newline at end of file diff --git a/libc/include/generic-glibc/fpu_control.h b/libc/include/generic-glibc/fpu_control.h new file mode 100644 index 0000000000..fd9c1247ed --- /dev/null +++ b/libc/include/generic-glibc/fpu_control.h @@ -0,0 +1,133 @@ +/* FPU control word bits. Mips version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Olaf Flebbe and Ralf Baechle. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FPU_CONTROL_H +#define _FPU_CONTROL_H + +/* MIPS FPU floating point control register bits. + * + * 31-25 -> floating point conditions code bits 7-1. These bits are only + * available in MIPS IV. + * 24 -> flush denormalized results to zero instead of + * causing unimplemented operation exception. This bit is only + * available for MIPS III and newer. + * 23 -> Condition bit + * 22-21 -> reserved for architecture implementers + * 20 -> reserved (read as 0, write with 0) + * 19 -> IEEE 754-2008 non-arithmetic ABS.fmt and NEG.fmt enable + * 18 -> IEEE 754-2008 recommended NaN encoding enable + * 17 -> cause bit for unimplemented operation + * 16 -> cause bit for invalid exception + * 15 -> cause bit for division by zero exception + * 14 -> cause bit for overflow exception + * 13 -> cause bit for underflow exception + * 12 -> cause bit for inexact exception + * 11 -> enable exception for invalid exception + * 10 -> enable exception for division by zero exception + * 9 -> enable exception for overflow exception + * 8 -> enable exception for underflow exception + * 7 -> enable exception for inexact exception + * 6 -> flag invalid exception + * 5 -> flag division by zero exception + * 4 -> flag overflow exception + * 3 -> flag underflow exception + * 2 -> flag inexact exception + * 1-0 -> rounding control + * + * + * Rounding Control: + * 00 - rounding to nearest (RN) + * 01 - rounding toward zero (RZ) + * 10 - rounding (up) toward plus infinity (RP) + * 11 - rounding (down)toward minus infinity (RM) + */ + +#include + +#ifdef __mips_soft_float + +#define _FPU_RESERVED 0xffffffff +#define _FPU_DEFAULT 0x00000000 +typedef unsigned int fpu_control_t; +#define _FPU_GETCW(cw) (cw) = 0 +#define _FPU_SETCW(cw) (void) (cw) +extern fpu_control_t __fpu_control; + +#else /* __mips_soft_float */ + +/* Masks for interrupts. */ +#define _FPU_MASK_V 0x0800 /* Invalid operation */ +#define _FPU_MASK_Z 0x0400 /* Division by zero */ +#define _FPU_MASK_O 0x0200 /* Overflow */ +#define _FPU_MASK_U 0x0100 /* Underflow */ +#define _FPU_MASK_I 0x0080 /* Inexact operation */ + +/* Flush denormalized numbers to zero. */ +#define _FPU_FLUSH_TZ 0x1000000 + +/* IEEE 754-2008 compliance control. */ +#define _FPU_ABS2008 0x80000 +#define _FPU_NAN2008 0x40000 + +/* Rounding control. */ +#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */ +#define _FPU_RC_ZERO 0x1 +#define _FPU_RC_UP 0x2 +#define _FPU_RC_DOWN 0x3 +/* Mask for rounding control. */ +#define _FPU_RC_MASK 0x3 + +#define _FPU_RESERVED 0xfe8c0000 /* Reserved bits in cw, incl ABS/NAN2008. */ + + +/* The fdlibm code requires strict IEEE double precision arithmetic, + and no interrupts for exceptions, rounding to nearest. */ +#ifdef __mips_nan2008 +# define _FPU_DEFAULT 0x000C0000 +#else +# define _FPU_DEFAULT 0x00000000 +#endif + +/* IEEE: same as above, but exceptions. */ +#ifdef __mips_nan2008 +# define _FPU_IEEE 0x000C0F80 +#else +# define _FPU_IEEE 0x00000F80 +#endif + +/* Type of the control word. */ +typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__))); + +/* Macros for accessing the hardware control word. */ +extern fpu_control_t __mips_fpu_getcw (void) __THROW; +extern void __mips_fpu_setcw (fpu_control_t) __THROW; +#ifdef __mips16 +# define _FPU_GETCW(cw) do { (cw) = __mips_fpu_getcw (); } while (0) +# define _FPU_SETCW(cw) __mips_fpu_setcw (cw) +#else +# define _FPU_GETCW(cw) __asm__ volatile ("cfc1 %0,$31" : "=r" (cw)) +# define _FPU_SETCW(cw) __asm__ volatile ("ctc1 %0,$31" : : "r" (cw)) +#endif + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* __mips_soft_float */ + +#endif /* fpu_control.h */ \ No newline at end of file diff --git a/libc/glibc-include/fstab.h b/libc/include/generic-glibc/fstab.h similarity index 99% rename from libc/glibc-include/fstab.h rename to libc/include/generic-glibc/fstab.h index 9f17e1b96a..df06c6a3e4 100644 --- a/libc/glibc-include/fstab.h +++ b/libc/include/generic-glibc/fstab.h @@ -76,4 +76,4 @@ extern void endfsent (void) __THROW; __END_DECLS -#endif /* fstab.h */ +#endif /* fstab.h */ \ No newline at end of file diff --git a/libc/glibc-include/fts.h b/libc/include/generic-glibc/fts.h similarity index 99% rename from libc/glibc-include/fts.h rename to libc/include/generic-glibc/fts.h index acfa260f07..79488cead3 100644 --- a/libc/glibc-include/fts.h +++ b/libc/include/generic-glibc/fts.h @@ -212,4 +212,4 @@ int fts64_set (FTS64 *, FTSENT64 *, int) __THROW; #endif __END_DECLS -#endif /* fts.h */ +#endif /* fts.h */ \ No newline at end of file diff --git a/libc/glibc-include/ftw.h b/libc/include/generic-glibc/ftw.h similarity index 99% rename from libc/glibc-include/ftw.h rename to libc/include/generic-glibc/ftw.h index 1ef67f7f3c..5bf8022270 100644 --- a/libc/glibc-include/ftw.h +++ b/libc/include/generic-glibc/ftw.h @@ -174,4 +174,4 @@ extern int nftw64 (const char *__dir, __nftw64_func_t __func, __END_DECLS -#endif /* ftw.h */ +#endif /* ftw.h */ \ No newline at end of file diff --git a/libc/glibc-include/gconv.h b/libc/include/generic-glibc/gconv.h similarity index 99% rename from libc/glibc-include/gconv.h rename to libc/include/generic-glibc/gconv.h index 12fd775604..700ee97ee9 100644 --- a/libc/glibc-include/gconv.h +++ b/libc/include/generic-glibc/gconv.h @@ -151,4 +151,4 @@ extern int __gconv_transliterate (struct __gconv_step *step, unsigned char **outbufstart, size_t *irreversible); -#endif /* gconv.h */ +#endif /* gconv.h */ \ No newline at end of file diff --git a/libc/glibc-include/getopt.h b/libc/include/generic-glibc/getopt.h similarity index 98% rename from libc/glibc-include/getopt.h rename to libc/include/generic-glibc/getopt.h index 844d237c37..1fdd5e9868 100644 --- a/libc/glibc-include/getopt.h +++ b/libc/include/generic-glibc/getopt.h @@ -35,4 +35,4 @@ #include #include -#endif /* getopt.h */ +#endif /* getopt.h */ \ No newline at end of file diff --git a/libc/glibc-include/glob.h b/libc/include/generic-glibc/glob.h similarity index 96% rename from libc/glibc-include/glob.h rename to libc/include/generic-glibc/glob.h index a5f3fe15d3..7455af54d0 100644 --- a/libc/glibc-include/glob.h +++ b/libc/include/generic-glibc/glob.h @@ -54,14 +54,14 @@ typedef __SIZE_TYPE__ size_t; # define GLOB_ONLYDIR (1 << 13)/* Match only directories. */ # define GLOB_TILDE_CHECK (1 << 14)/* Like GLOB_TILDE but return an error if the user name is not available. */ -# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \ - GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \ - GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE| \ - GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK) +# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS \ + |GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND \ + |GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE \ + |GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK) #else -# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \ - GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \ - GLOB_PERIOD) +# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS \ + |GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND \ + |GLOB_PERIOD) #endif /* Error returns from `glob'. */ @@ -178,4 +178,4 @@ extern int glob_pattern_p (const char *__pattern, int __quote) __THROW; __END_DECLS -#endif /* glob.h */ +#endif /* glob.h */ \ No newline at end of file diff --git a/libc/glibc-include/gnu-versions.h b/libc/include/generic-glibc/gnu-versions.h similarity index 98% rename from libc/glibc-include/gnu-versions.h rename to libc/include/generic-glibc/gnu-versions.h index 6db552a700..9a096f270a 100644 --- a/libc/glibc-include/gnu-versions.h +++ b/libc/include/generic-glibc/gnu-versions.h @@ -49,4 +49,4 @@ #define _GNU_GETOPT_INTERFACE_VERSION 2 /* vs posix/getopt.c and posix/getopt1.c */ -#endif /* gnu-versions.h */ +#endif /* gnu-versions.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/gnu/lib-names-32.h b/libc/include/generic-glibc/gnu/lib-names-32.h new file mode 100644 index 0000000000..910a12d444 --- /dev/null +++ b/libc/include/generic-glibc/gnu/lib-names-32.h @@ -0,0 +1,31 @@ +/* This file is automatically generated. */ +#ifndef __GNU_LIB_NAMES_H +# error "Never use directly; include instead." +#endif + +#define LD_LINUX_SO "ld-linux.so.2" +#define LD_SO "ld-linux.so.2" +#define LIBANL_SO "libanl.so.1" +#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1" +#define LIBCRYPT_SO "libcrypt.so.1" +#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_NISPLUS_SO "libnss_nisplus.so.2" +#define LIBNSS_NIS_SO "libnss_nis.so.2" +#define LIBNSS_TEST1_SO "libnss_test1.so.2" +#define LIBNSS_TEST2_SO "libnss_test2.so.2" +#define LIBPTHREAD_SO "libpthread.so.0" +#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/libc/include/generic-glibc/gnu/lib-names-hard.h b/libc/include/generic-glibc/gnu/lib-names-hard.h new file mode 100644 index 0000000000..9c4e7c164e --- /dev/null +++ b/libc/include/generic-glibc/gnu/lib-names-hard.h @@ -0,0 +1,31 @@ +/* This file is automatically generated. */ +#ifndef __GNU_LIB_NAMES_H +# error "Never use directly; include instead." +#endif + +#define LD_LINUX_ARMHF_SO "ld-linux-armhf.so.3" +#define LD_SO "ld-linux-armhf.so.3" +#define LIBANL_SO "libanl.so.1" +#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1" +#define LIBCRYPT_SO "libcrypt.so.1" +#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_NISPLUS_SO "libnss_nisplus.so.2" +#define LIBNSS_NIS_SO "libnss_nis.so.2" +#define LIBNSS_TEST1_SO "libnss_test1.so.2" +#define LIBNSS_TEST2_SO "libnss_test2.so.2" +#define LIBPTHREAD_SO "libpthread.so.0" +#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/libc/include/generic-glibc/gnu/lib-names-n32_hard.h b/libc/include/generic-glibc/gnu/lib-names-n32_hard.h new file mode 100644 index 0000000000..d6c1d96f7e --- /dev/null +++ b/libc/include/generic-glibc/gnu/lib-names-n32_hard.h @@ -0,0 +1,30 @@ +/* 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_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_NISPLUS_SO "libnss_nisplus.so.2" +#define LIBNSS_NIS_SO "libnss_nis.so.2" +#define LIBNSS_TEST1_SO "libnss_test1.so.2" +#define LIBNSS_TEST2_SO "libnss_test2.so.2" +#define LIBPTHREAD_SO "libpthread.so.0" +#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/libc/include/generic-glibc/gnu/lib-names-n64_hard.h b/libc/include/generic-glibc/gnu/lib-names-n64_hard.h new file mode 100644 index 0000000000..b5af4b1542 --- /dev/null +++ b/libc/include/generic-glibc/gnu/lib-names-n64_hard.h @@ -0,0 +1,30 @@ +/* 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_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_NISPLUS_SO "libnss_nisplus.so.2" +#define LIBNSS_NIS_SO "libnss_nis.so.2" +#define LIBNSS_TEST1_SO "libnss_test1.so.2" +#define LIBNSS_TEST2_SO "libnss_test2.so.2" +#define LIBPTHREAD_SO "libpthread.so.0" +#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/libc/include/generic-glibc/gnu/lib-names-o32_hard.h b/libc/include/generic-glibc/gnu/lib-names-o32_hard.h new file mode 100644 index 0000000000..4746766acf --- /dev/null +++ b/libc/include/generic-glibc/gnu/lib-names-o32_hard.h @@ -0,0 +1,30 @@ +/* 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_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_NISPLUS_SO "libnss_nisplus.so.2" +#define LIBNSS_NIS_SO "libnss_nis.so.2" +#define LIBNSS_TEST1_SO "libnss_test1.so.2" +#define LIBNSS_TEST2_SO "libnss_test2.so.2" +#define LIBPTHREAD_SO "libpthread.so.0" +#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/libc/include/generic-glibc/gnu/lib-names-soft.h b/libc/include/generic-glibc/gnu/lib-names-soft.h new file mode 100644 index 0000000000..14dc0082b0 --- /dev/null +++ b/libc/include/generic-glibc/gnu/lib-names-soft.h @@ -0,0 +1,31 @@ +/* This file is automatically generated. */ +#ifndef __GNU_LIB_NAMES_H +# error "Never use directly; include instead." +#endif + +#define LD_LINUX_SO "ld-linux.so.3" +#define LD_SO "ld-linux.so.3" +#define LIBANL_SO "libanl.so.1" +#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1" +#define LIBCRYPT_SO "libcrypt.so.1" +#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_NISPLUS_SO "libnss_nisplus.so.2" +#define LIBNSS_NIS_SO "libnss_nis.so.2" +#define LIBNSS_TEST1_SO "libnss_test1.so.2" +#define LIBNSS_TEST2_SO "libnss_test2.so.2" +#define LIBPTHREAD_SO "libpthread.so.0" +#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/libc/include/generic-glibc/gnu/lib-names.h b/libc/include/generic-glibc/gnu/lib-names.h new file mode 100644 index 0000000000..fcfc96cef1 --- /dev/null +++ b/libc/include/generic-glibc/gnu/lib-names.h @@ -0,0 +1,46 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#include + +#if !defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_ABI32) +# include +#endif +#if !defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_ABI32) +# include +#endif +#if defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_ABI32) +# include +#endif +#if defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_ABI32) +# include +#endif +#if !defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_NABI32) +# include +#endif +#if !defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_NABI32) +# include +#endif +#if defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_NABI32) +# include +#endif +#if defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_NABI32) +# include +#endif +#if !defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_ABI64) +# include +#endif +#if !defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_ABI64) +# include +#endif +#if defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_ABI64) +# include +#endif +#if defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_ABI64) +# include +#endif + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/glibc-include/gnu/libc-version.h b/libc/include/generic-glibc/gnu/libc-version.h similarity index 97% rename from libc/glibc-include/gnu/libc-version.h rename to libc/include/generic-glibc/gnu/libc-version.h index 0e2e91b6e6..c44452d4ac 100644 --- a/libc/glibc-include/gnu/libc-version.h +++ b/libc/include/generic-glibc/gnu/libc-version.h @@ -31,4 +31,4 @@ extern const char *gnu_get_libc_version (void) __THROW; __END_DECLS -#endif /* gnu/libc-version.h */ +#endif /* gnu/libc-version.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/gnu/stubs-32.h b/libc/include/generic-glibc/gnu/stubs-32.h new file mode 100644 index 0000000000..f5b3f7db15 --- /dev/null +++ b/libc/include/generic-glibc/gnu/stubs-32.h @@ -0,0 +1,20 @@ +/* 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_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_gtty +#define __stub_lchmod +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty \ No newline at end of file diff --git a/libc/include/generic-glibc/gnu/stubs-hard.h b/libc/include/generic-glibc/gnu/stubs-hard.h new file mode 100644 index 0000000000..8fa59209a2 --- /dev/null +++ b/libc/include/generic-glibc/gnu/stubs-hard.h @@ -0,0 +1,27 @@ +/* This file is automatically generated. + It defines a symbol `__stub_FUNCTION' for each function + in the C library which is a stub, meaning it will fail + every time called, usually setting errno to ENOSYS. */ + +#ifdef _LIBC + #error Applications may not define the macro _LIBC +#endif + +#define __stub___compat_create_module +#define __stub___compat_get_kernel_syms +#define __stub___compat_query_module +#define __stub_chflags +#define __stub_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_getmsg +#define __stub_getpmsg +#define __stub_gtty +#define __stub_lchmod +#define __stub_putmsg +#define __stub_putpmsg +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty \ No newline at end of file diff --git a/libc/include/generic-glibc/gnu/stubs-n32_hard.h b/libc/include/generic-glibc/gnu/stubs-n32_hard.h new file mode 100644 index 0000000000..a09b281b5e --- /dev/null +++ b/libc/include/generic-glibc/gnu/stubs-n32_hard.h @@ -0,0 +1,22 @@ +/* This file is automatically generated. + It defines a symbol `__stub_FUNCTION' for each function + in the C library which is a stub, meaning it will fail + every time called, usually setting errno to ENOSYS. */ + +#ifdef _LIBC + #error Applications may not define the macro _LIBC +#endif + +#define __stub___compat_bdflush +#define __stub___compat_uselib +#define __stub_chflags +#define __stub_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_gtty +#define __stub_lchmod +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty \ No newline at end of file diff --git a/libc/include/generic-glibc/gnu/stubs-n64_hard.h b/libc/include/generic-glibc/gnu/stubs-n64_hard.h new file mode 100644 index 0000000000..a09b281b5e --- /dev/null +++ b/libc/include/generic-glibc/gnu/stubs-n64_hard.h @@ -0,0 +1,22 @@ +/* This file is automatically generated. + It defines a symbol `__stub_FUNCTION' for each function + in the C library which is a stub, meaning it will fail + every time called, usually setting errno to ENOSYS. */ + +#ifdef _LIBC + #error Applications may not define the macro _LIBC +#endif + +#define __stub___compat_bdflush +#define __stub___compat_uselib +#define __stub_chflags +#define __stub_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_gtty +#define __stub_lchmod +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty \ No newline at end of file diff --git a/libc/include/generic-glibc/gnu/stubs-o32_hard.h b/libc/include/generic-glibc/gnu/stubs-o32_hard.h new file mode 100644 index 0000000000..f5b3f7db15 --- /dev/null +++ b/libc/include/generic-glibc/gnu/stubs-o32_hard.h @@ -0,0 +1,20 @@ +/* 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_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_gtty +#define __stub_lchmod +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty \ No newline at end of file diff --git a/libc/include/generic-glibc/gnu/stubs-soft.h b/libc/include/generic-glibc/gnu/stubs-soft.h new file mode 100644 index 0000000000..8fa59209a2 --- /dev/null +++ b/libc/include/generic-glibc/gnu/stubs-soft.h @@ -0,0 +1,27 @@ +/* This file is automatically generated. + It defines a symbol `__stub_FUNCTION' for each function + in the C library which is a stub, meaning it will fail + every time called, usually setting errno to ENOSYS. */ + +#ifdef _LIBC + #error Applications may not define the macro _LIBC +#endif + +#define __stub___compat_create_module +#define __stub___compat_get_kernel_syms +#define __stub___compat_query_module +#define __stub_chflags +#define __stub_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_getmsg +#define __stub_getpmsg +#define __stub_gtty +#define __stub_lchmod +#define __stub_putmsg +#define __stub_putpmsg +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty \ No newline at end of file diff --git a/libc/include/generic-glibc/gnu/stubs.h b/libc/include/generic-glibc/gnu/stubs.h new file mode 100644 index 0000000000..96ececfa31 --- /dev/null +++ b/libc/include/generic-glibc/gnu/stubs.h @@ -0,0 +1,42 @@ +/* This file is automatically generated. + This file selects the right generated file of `__stub_FUNCTION' macros + based on the architecture being compiled for. */ + +#include + +#if !defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_ABI32) +# include +#endif +#if !defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_ABI32) +# include +#endif +#if defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_ABI32) +# include +#endif +#if defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_ABI32) +# include +#endif +#if !defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_NABI32) +# include +#endif +#if !defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_NABI32) +# include +#endif +#if defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_NABI32) +# include +#endif +#if defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_NABI32) +# include +#endif +#if !defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_ABI64) +# include +#endif +#if !defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_ABI64) +# include +#endif +#if defined(__mips_nan2008) && defined(__mips_soft_float) && (_MIPS_SIM == _MIPS_SIM_ABI64) +# include +#endif +#if defined(__mips_nan2008) && defined(__mips_hard_float) && (_MIPS_SIM == _MIPS_SIM_ABI64) +# include +#endif \ No newline at end of file diff --git a/libc/glibc-include/grp.h b/libc/include/generic-glibc/grp.h similarity index 99% rename from libc/glibc-include/grp.h rename to libc/include/generic-glibc/grp.h index 0663c8f83c..98248f0ec4 100644 --- a/libc/glibc-include/grp.h +++ b/libc/include/generic-glibc/grp.h @@ -200,4 +200,4 @@ extern int initgroups (const char *__user, __gid_t __group); __END_DECLS -#endif /* grp.h */ +#endif /* grp.h */ \ No newline at end of file diff --git a/libc/glibc-include/gshadow.h b/libc/include/generic-glibc/gshadow.h similarity index 99% rename from libc/glibc-include/gshadow.h rename to libc/include/generic-glibc/gshadow.h index c1998083e6..c193898c77 100644 --- a/libc/glibc-include/gshadow.h +++ b/libc/include/generic-glibc/gshadow.h @@ -125,4 +125,4 @@ extern int fgetsgent_r (FILE *__stream, struct sgrp *__result_buf, __END_DECLS -#endif /* gshadow.h */ +#endif /* gshadow.h */ \ No newline at end of file diff --git a/libc/glibc-include/iconv.h b/libc/include/generic-glibc/iconv.h similarity index 98% rename from libc/glibc-include/iconv.h rename to libc/include/generic-glibc/iconv.h index 9585ec268e..009a0bdae2 100644 --- a/libc/glibc-include/iconv.h +++ b/libc/include/generic-glibc/iconv.h @@ -52,4 +52,4 @@ extern int iconv_close (iconv_t __cd); __END_DECLS -#endif /* iconv.h */ +#endif /* iconv.h */ \ No newline at end of file diff --git a/libc/glibc-include/ieee754.h b/libc/include/generic-glibc/ieee754.h similarity index 99% rename from libc/glibc-include/ieee754.h rename to libc/include/generic-glibc/ieee754.h index a88cbb6943..017e197b75 100644 --- a/libc/glibc-include/ieee754.h +++ b/libc/include/generic-glibc/ieee754.h @@ -195,4 +195,4 @@ union ieee854_long_double __END_DECLS -#endif /* ieee754.h */ +#endif /* ieee754.h */ \ No newline at end of file diff --git a/libc/glibc-include/ifaddrs.h b/libc/include/generic-glibc/ifaddrs.h similarity index 99% rename from libc/glibc-include/ifaddrs.h rename to libc/include/generic-glibc/ifaddrs.h index dd48ff2fdf..8e3d2a29bd 100644 --- a/libc/glibc-include/ifaddrs.h +++ b/libc/include/generic-glibc/ifaddrs.h @@ -70,4 +70,4 @@ extern void freeifaddrs (struct ifaddrs *__ifa) __THROW; __END_DECLS -#endif /* ifaddrs.h */ +#endif /* ifaddrs.h */ \ No newline at end of file diff --git a/libc/glibc-include/inttypes.h b/libc/include/generic-glibc/inttypes.h similarity index 99% rename from libc/glibc-include/inttypes.h rename to libc/include/generic-glibc/inttypes.h index ddcb171b09..022f637443 100644 --- a/libc/glibc-include/inttypes.h +++ b/libc/include/generic-glibc/inttypes.h @@ -431,4 +431,4 @@ __NTH (wcstoumax (const __gwchar_t *__restrict nptr, __END_DECLS -#endif /* inttypes.h */ +#endif /* inttypes.h */ \ No newline at end of file diff --git a/libc/glibc-include/langinfo.h b/libc/include/generic-glibc/langinfo.h similarity index 99% rename from libc/glibc-include/langinfo.h rename to libc/include/generic-glibc/langinfo.h index 84d2662e55..21af0ba68c 100644 --- a/libc/glibc-include/langinfo.h +++ b/libc/include/generic-glibc/langinfo.h @@ -671,4 +671,4 @@ extern char *nl_langinfo_l (nl_item __item, locale_t __l); __END_DECLS -#endif /* langinfo.h */ +#endif /* langinfo.h */ \ No newline at end of file diff --git a/libc/glibc-include/lastlog.h b/libc/include/generic-glibc/lastlog.h similarity index 85% rename from libc/glibc-include/lastlog.h rename to libc/include/generic-glibc/lastlog.h index 8cc4254364..ecedc0641f 100644 --- a/libc/glibc-include/lastlog.h +++ b/libc/include/generic-glibc/lastlog.h @@ -1,4 +1,4 @@ /* This header file is used in 4.3BSD to define `struct lastlog', which we define in . */ -#include +#include \ No newline at end of file diff --git a/libc/glibc-include/libgen.h b/libc/include/generic-glibc/libgen.h similarity index 98% rename from libc/glibc-include/libgen.h rename to libc/include/generic-glibc/libgen.h index 23d60d60f5..756a914c9b 100644 --- a/libc/glibc-include/libgen.h +++ b/libc/include/generic-glibc/libgen.h @@ -36,4 +36,4 @@ extern char *__xpg_basename (char *__path) __THROW; __END_DECLS -#endif /* libgen.h */ +#endif /* libgen.h */ \ No newline at end of file diff --git a/libc/glibc-include/libintl.h b/libc/include/generic-glibc/libintl.h similarity index 99% rename from libc/glibc-include/libintl.h rename to libc/include/generic-glibc/libintl.h index f03eda0b6f..cd0dadb4c4 100644 --- a/libc/glibc-include/libintl.h +++ b/libc/include/generic-glibc/libintl.h @@ -120,4 +120,4 @@ extern char *bind_textdomain_codeset (const char *__domainname, __END_DECLS -#endif /* libintl.h */ +#endif /* libintl.h */ \ No newline at end of file diff --git a/libc/glibc-include/limits.h b/libc/include/generic-glibc/limits.h similarity index 99% rename from libc/glibc-include/limits.h rename to libc/include/generic-glibc/limits.h index 08bb5248be..5eb71cbbde 100644 --- a/libc/glibc-include/limits.h +++ b/libc/include/generic-glibc/limits.h @@ -189,4 +189,4 @@ #ifdef __USE_XOPEN # include -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/link.h b/libc/include/generic-glibc/link.h similarity index 99% rename from libc/glibc-include/link.h rename to libc/include/generic-glibc/link.h index 7a463bc2bf..90cf2730ac 100644 --- a/libc/glibc-include/link.h +++ b/libc/include/generic-glibc/link.h @@ -191,4 +191,4 @@ __END_DECLS #endif -#endif /* link.h */ +#endif /* link.h */ \ No newline at end of file diff --git a/libc/glibc-include/locale.h b/libc/include/generic-glibc/locale.h similarity index 99% rename from libc/glibc-include/locale.h rename to libc/include/generic-glibc/locale.h index 7d8a435fe3..90f1985b11 100644 --- a/libc/glibc-include/locale.h +++ b/libc/include/generic-glibc/locale.h @@ -194,4 +194,4 @@ extern locale_t uselocale (locale_t __dataset) __THROW; __END_DECLS -#endif /* locale.h */ +#endif /* locale.h */ \ No newline at end of file diff --git a/libc/glibc-include/malloc.h b/libc/include/generic-glibc/malloc.h similarity index 99% rename from libc/glibc-include/malloc.h rename to libc/include/generic-glibc/malloc.h index 4428edc06f..79b8e4aded 100644 --- a/libc/glibc-include/malloc.h +++ b/libc/include/generic-glibc/malloc.h @@ -161,4 +161,4 @@ extern void __malloc_check_init (void) __THROW __MALLOC_DEPRECATED; __END_DECLS -#endif /* malloc.h */ +#endif /* malloc.h */ \ No newline at end of file diff --git a/libc/glibc-include/math.h b/libc/include/generic-glibc/math.h similarity index 99% rename from libc/glibc-include/math.h rename to libc/include/generic-glibc/math.h index ffbc24af09..4a9cc395f8 100644 --- a/libc/glibc-include/math.h +++ b/libc/include/generic-glibc/math.h @@ -1553,4 +1553,4 @@ iseqsig (_T1 __x, _T2 __y) throw () __END_DECLS -#endif /* math.h */ +#endif /* math.h */ \ No newline at end of file diff --git a/libc/glibc-include/mcheck.h b/libc/include/generic-glibc/mcheck.h similarity index 99% rename from libc/glibc-include/mcheck.h rename to libc/include/generic-glibc/mcheck.h index 6290288c69..1feb2df973 100644 --- a/libc/glibc-include/mcheck.h +++ b/libc/include/generic-glibc/mcheck.h @@ -57,4 +57,4 @@ extern void mtrace (void) __THROW; extern void muntrace (void) __THROW; __END_DECLS -#endif /* mcheck.h */ +#endif /* mcheck.h */ \ No newline at end of file diff --git a/libc/glibc-include/memory.h b/libc/include/generic-glibc/memory.h similarity index 97% rename from libc/glibc-include/memory.h rename to libc/include/generic-glibc/memory.h index f96893e220..09a9893564 100644 --- a/libc/glibc-include/memory.h +++ b/libc/include/generic-glibc/memory.h @@ -30,4 +30,4 @@ #endif /* string.h */ -#endif /* memory.h */ +#endif /* memory.h */ \ No newline at end of file diff --git a/libc/glibc-include/mntent.h b/libc/include/generic-glibc/mntent.h similarity index 99% rename from libc/glibc-include/mntent.h rename to libc/include/generic-glibc/mntent.h index 38f530348e..ce9129ae3d 100644 --- a/libc/glibc-include/mntent.h +++ b/libc/include/generic-glibc/mntent.h @@ -92,4 +92,4 @@ extern char *hasmntopt (const struct mntent *__mnt, __END_DECLS -#endif /* mntent.h */ +#endif /* mntent.h */ \ No newline at end of file diff --git a/libc/glibc-include/monetary.h b/libc/include/generic-glibc/monetary.h similarity index 98% rename from libc/glibc-include/monetary.h rename to libc/include/generic-glibc/monetary.h index 1cecd05012..c226c11e07 100644 --- a/libc/glibc-include/monetary.h +++ b/libc/include/generic-glibc/monetary.h @@ -56,4 +56,4 @@ extern ssize_t strfmon_l (char *__restrict __s, size_t __maxsize, __END_DECLS -#endif /* monetary.h */ +#endif /* monetary.h */ \ No newline at end of file diff --git a/libc/glibc-include/mqueue.h b/libc/include/generic-glibc/mqueue.h similarity index 99% rename from libc/glibc-include/mqueue.h rename to libc/include/generic-glibc/mqueue.h index 308a52c1bc..bb686c7852 100644 --- a/libc/glibc-include/mqueue.h +++ b/libc/include/generic-glibc/mqueue.h @@ -95,4 +95,4 @@ extern int mq_timedsend (mqd_t __mqdes, const char *__msg_ptr, __END_DECLS -#endif /* mqueue.h */ +#endif /* mqueue.h */ \ No newline at end of file diff --git a/libc/glibc-include/net/ethernet.h b/libc/include/generic-glibc/net/ethernet.h similarity index 99% rename from libc/glibc-include/net/ethernet.h rename to libc/include/generic-glibc/net/ethernet.h index 7e49297de6..b2cac55c7c 100644 --- a/libc/glibc-include/net/ethernet.h +++ b/libc/include/generic-glibc/net/ethernet.h @@ -81,4 +81,4 @@ struct ether_header __END_DECLS -#endif /* net/ethernet.h */ +#endif /* net/ethernet.h */ \ No newline at end of file diff --git a/libc/glibc-include/net/if.h b/libc/include/generic-glibc/net/if.h similarity index 99% rename from libc/glibc-include/net/if.h rename to libc/include/generic-glibc/net/if.h index 303d092739..bab1fa605d 100644 --- a/libc/glibc-include/net/if.h +++ b/libc/include/generic-glibc/net/if.h @@ -201,4 +201,4 @@ extern void if_freenameindex (struct if_nameindex *__ptr) __THROW; __END_DECLS -#endif /* net/if.h */ +#endif /* net/if.h */ \ No newline at end of file diff --git a/libc/glibc-include/net/if_arp.h b/libc/include/generic-glibc/net/if_arp.h similarity index 99% rename from libc/glibc-include/net/if_arp.h rename to libc/include/generic-glibc/net/if_arp.h index f64dcfd9d8..94da234f01 100644 --- a/libc/glibc-include/net/if_arp.h +++ b/libc/include/generic-glibc/net/if_arp.h @@ -180,4 +180,4 @@ struct arpd_request __END_DECLS -#endif /* net/if_arp.h */ +#endif /* net/if_arp.h */ \ No newline at end of file diff --git a/libc/glibc-include/net/if_packet.h b/libc/include/generic-glibc/net/if_packet.h similarity index 99% rename from libc/glibc-include/net/if_packet.h rename to libc/include/generic-glibc/net/if_packet.h index e2411d299e..171360234e 100644 --- a/libc/glibc-include/net/if_packet.h +++ b/libc/include/generic-glibc/net/if_packet.h @@ -33,4 +33,4 @@ struct sockaddr_pkt unsigned short spkt_protocol; }; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/net/if_ppp.h b/libc/include/generic-glibc/net/if_ppp.h similarity index 99% rename from libc/glibc-include/net/if_ppp.h rename to libc/include/generic-glibc/net/if_ppp.h index 31a20766f0..740a849d9a 100644 --- a/libc/glibc-include/net/if_ppp.h +++ b/libc/include/generic-glibc/net/if_ppp.h @@ -168,4 +168,4 @@ struct ifpppcstatsreq { __END_DECLS -#endif /* net/if_ppp.h */ +#endif /* net/if_ppp.h */ \ No newline at end of file diff --git a/libc/glibc-include/net/if_shaper.h b/libc/include/generic-glibc/net/if_shaper.h similarity index 98% rename from libc/glibc-include/net/if_shaper.h rename to libc/include/generic-glibc/net/if_shaper.h index 77ab6306ac..be307d1591 100644 --- a/libc/glibc-include/net/if_shaper.h +++ b/libc/include/generic-glibc/net/if_shaper.h @@ -55,4 +55,4 @@ struct shaperconf __END_DECLS -#endif /* net/if_shaper.h */ +#endif /* net/if_shaper.h */ \ No newline at end of file diff --git a/libc/glibc-include/net/if_slip.h b/libc/include/generic-glibc/net/if_slip.h similarity index 96% rename from libc/glibc-include/net/if_slip.h rename to libc/include/generic-glibc/net/if_slip.h index a141bb8760..4468bb2e40 100644 --- a/libc/glibc-include/net/if_slip.h +++ b/libc/include/generic-glibc/net/if_slip.h @@ -21,4 +21,4 @@ /* We can use the kernel header. */ #include -#endif /* net/if_slip.h. */ +#endif /* net/if_slip.h. */ \ No newline at end of file diff --git a/libc/include/generic-glibc/net/ppp-comp.h b/libc/include/generic-glibc/net/ppp-comp.h new file mode 100644 index 0000000000..352313f1c1 --- /dev/null +++ b/libc/include/generic-glibc/net/ppp-comp.h @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/libc/glibc-include/net/ppp_defs.h b/libc/include/generic-glibc/net/ppp_defs.h similarity index 82% rename from libc/glibc-include/net/ppp_defs.h rename to libc/include/generic-glibc/net/ppp_defs.h index 5e492e9dbf..084836abad 100644 --- a/libc/glibc-include/net/ppp_defs.h +++ b/libc/include/generic-glibc/net/ppp_defs.h @@ -5,4 +5,4 @@ #include #include -#endif /* net/ppp_defs.h */ +#endif /* net/ppp_defs.h */ \ No newline at end of file diff --git a/libc/glibc-include/net/route.h b/libc/include/generic-glibc/net/route.h similarity index 99% rename from libc/glibc-include/net/route.h rename to libc/include/generic-glibc/net/route.h index a6bda2157f..a3fccf0d4d 100644 --- a/libc/glibc-include/net/route.h +++ b/libc/include/generic-glibc/net/route.h @@ -141,4 +141,4 @@ struct in6_rtmsg #define RTMSG_AR_FAILED 0x51 /* Address Resolution failed. */ -#endif /* net/route.h */ +#endif /* net/route.h */ \ No newline at end of file diff --git a/libc/glibc-include/netash/ash.h b/libc/include/generic-glibc/netash/ash.h similarity index 98% rename from libc/glibc-include/netash/ash.h rename to libc/include/generic-glibc/netash/ash.h index 89d00fd5c7..32e295ed5f 100644 --- a/libc/glibc-include/netash/ash.h +++ b/libc/include/generic-glibc/netash/ash.h @@ -36,4 +36,4 @@ struct sockaddr_ash #define ASH_CHANNEL_CONTROL 1 #define ASH_CHANNEL_REALTIME 2 -#endif /* netash/ash.h */ +#endif /* netash/ash.h */ \ No newline at end of file diff --git a/libc/glibc-include/netatalk/at.h b/libc/include/generic-glibc/netatalk/at.h similarity index 97% rename from libc/glibc-include/netatalk/at.h rename to libc/include/generic-glibc/netatalk/at.h index 61fb67590c..6059953b86 100644 --- a/libc/glibc-include/netatalk/at.h +++ b/libc/include/generic-glibc/netatalk/at.h @@ -25,4 +25,4 @@ #define SOL_ATALK 258 /* sockopt level for atalk */ -#endif /* netatalk/at.h */ +#endif /* netatalk/at.h */ \ No newline at end of file diff --git a/libc/glibc-include/netax25/ax25.h b/libc/include/generic-glibc/netax25/ax25.h similarity index 99% rename from libc/glibc-include/netax25/ax25.h rename to libc/include/generic-glibc/netax25/ax25.h index 7101927dce..b3bee3f857 100644 --- a/libc/glibc-include/netax25/ax25.h +++ b/libc/include/generic-glibc/netax25/ax25.h @@ -167,4 +167,4 @@ struct ax25_parms_struct unsigned short values[AX25_MAX_VALUES]; }; -#endif /* netax25/ax25.h */ +#endif /* netax25/ax25.h */ \ No newline at end of file diff --git a/libc/glibc-include/netdb.h b/libc/include/generic-glibc/netdb.h similarity index 99% rename from libc/glibc-include/netdb.h rename to libc/include/generic-glibc/netdb.h index 6c1af6aee1..b203c3316d 100644 --- a/libc/glibc-include/netdb.h +++ b/libc/include/generic-glibc/netdb.h @@ -1,4 +1,4 @@ - /* Copyright (C) 1996-2019 Free Software Foundation, Inc. +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -710,4 +710,4 @@ extern int gai_cancel (struct gaicb *__gaicbp) __THROW; __END_DECLS -#endif /* netdb.h */ +#endif /* netdb.h */ \ No newline at end of file diff --git a/libc/glibc-include/neteconet/ec.h b/libc/include/generic-glibc/neteconet/ec.h similarity index 99% rename from libc/glibc-include/neteconet/ec.h rename to libc/include/generic-glibc/neteconet/ec.h index 452d1d080c..2a18f3c84f 100644 --- a/libc/glibc-include/neteconet/ec.h +++ b/libc/include/generic-glibc/neteconet/ec.h @@ -48,4 +48,4 @@ struct sockaddr_ec #define ECTYPE_TRANSMIT_LINE_JAMMED 5 #define ECTYPE_TRANSMIT_NOT_PRESENT 6 -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/netinet/ether.h b/libc/include/generic-glibc/netinet/ether.h similarity index 98% rename from libc/glibc-include/netinet/ether.h rename to libc/include/generic-glibc/netinet/ether.h index 227bd3ec7c..9a8cfd6692 100644 --- a/libc/glibc-include/netinet/ether.h +++ b/libc/include/generic-glibc/netinet/ether.h @@ -52,4 +52,4 @@ extern int ether_line (const char *__line, struct ether_addr *__addr, __END_DECLS #endif /* Use misc. */ -#endif /* netinet/ether.h */ +#endif /* netinet/ether.h */ \ No newline at end of file diff --git a/libc/glibc-include/netinet/icmp6.h b/libc/include/generic-glibc/netinet/icmp6.h similarity index 99% rename from libc/glibc-include/netinet/icmp6.h rename to libc/include/generic-glibc/netinet/icmp6.h index 92e84cfd21..db162d85e9 100644 --- a/libc/glibc-include/netinet/icmp6.h +++ b/libc/include/generic-glibc/netinet/icmp6.h @@ -342,4 +342,4 @@ struct nd_opt_home_agent_info uint16_t nd_opt_home_agent_info_lifetime; }; -#endif /* netinet/icmpv6.h */ +#endif /* netinet/icmpv6.h */ \ No newline at end of file diff --git a/libc/glibc-include/netinet/if_ether.h b/libc/include/generic-glibc/netinet/if_ether.h similarity index 99% rename from libc/glibc-include/netinet/if_ether.h rename to libc/include/generic-glibc/netinet/if_ether.h index 2c0750000f..e8df7b6ac8 100644 --- a/libc/glibc-include/netinet/if_ether.h +++ b/libc/include/generic-glibc/netinet/if_ether.h @@ -101,4 +101,4 @@ struct ether_arp { __END_DECLS #endif /* __USE_MISC */ -#endif /* netinet/if_ether.h */ +#endif /* netinet/if_ether.h */ \ No newline at end of file diff --git a/libc/glibc-include/netinet/if_fddi.h b/libc/include/generic-glibc/netinet/if_fddi.h similarity index 97% rename from libc/glibc-include/netinet/if_fddi.h rename to libc/include/generic-glibc/netinet/if_fddi.h index 2e4bb939f2..93038b44d0 100644 --- a/libc/glibc-include/netinet/if_fddi.h +++ b/libc/include/generic-glibc/netinet/if_fddi.h @@ -31,4 +31,4 @@ struct fddi_header { }; #endif -#endif /* netinet/if_fddi.h */ +#endif /* netinet/if_fddi.h */ \ No newline at end of file diff --git a/libc/glibc-include/netinet/if_tr.h b/libc/include/generic-glibc/netinet/if_tr.h similarity index 99% rename from libc/glibc-include/netinet/if_tr.h rename to libc/include/generic-glibc/netinet/if_tr.h index 9db6b7a6b5..78d6e95983 100644 --- a/libc/glibc-include/netinet/if_tr.h +++ b/libc/include/generic-glibc/netinet/if_tr.h @@ -107,4 +107,4 @@ struct trn_hdr #endif -#endif /* netinet/if_tr.h */ +#endif /* netinet/if_tr.h */ \ No newline at end of file diff --git a/libc/glibc-include/netinet/igmp.h b/libc/include/generic-glibc/netinet/igmp.h similarity index 99% rename from libc/glibc-include/netinet/igmp.h rename to libc/include/generic-glibc/netinet/igmp.h index dccdb11eda..f4052af414 100644 --- a/libc/glibc-include/netinet/igmp.h +++ b/libc/include/generic-glibc/netinet/igmp.h @@ -122,4 +122,4 @@ __END_DECLS #endif -#endif /* netinet/igmp.h */ +#endif /* netinet/igmp.h */ \ No newline at end of file diff --git a/libc/glibc-include/netinet/in.h b/libc/include/generic-glibc/netinet/in.h similarity index 99% rename from libc/glibc-include/netinet/in.h rename to libc/include/generic-glibc/netinet/in.h index 31284eb145..8d0a0e2dcb 100644 --- a/libc/glibc-include/netinet/in.h +++ b/libc/include/generic-glibc/netinet/in.h @@ -241,10 +241,10 @@ struct sockaddr_in struct in_addr sin_addr; /* Internet address. */ /* Pad to size of `struct sockaddr'. */ - unsigned char sin_zero[sizeof (struct sockaddr) - - __SOCKADDR_COMMON_SIZE - - sizeof (in_port_t) - - sizeof (struct in_addr)]; + unsigned char sin_zero[sizeof (struct sockaddr) + - __SOCKADDR_COMMON_SIZE + - sizeof (in_port_t) + - sizeof (struct in_addr)]; }; #if !__USE_KERNEL_IPV6_DEFS @@ -629,4 +629,4 @@ extern int setsourcefilter (int __s, uint32_t __interface_addr, __END_DECLS -#endif /* netinet/in.h */ +#endif /* netinet/in.h */ \ No newline at end of file diff --git a/libc/glibc-include/netinet/in_systm.h b/libc/include/generic-glibc/netinet/in_systm.h similarity index 97% rename from libc/glibc-include/netinet/in_systm.h rename to libc/include/generic-glibc/netinet/in_systm.h index 2b3c74281b..39e22c836a 100644 --- a/libc/glibc-include/netinet/in_systm.h +++ b/libc/include/generic-glibc/netinet/in_systm.h @@ -37,4 +37,4 @@ typedef uint32_t n_time; /* ms since 00:00 GMT, byte rev */ __END_DECLS -#endif /* netinet/in_systm.h */ +#endif /* netinet/in_systm.h */ \ No newline at end of file diff --git a/libc/glibc-include/netinet/ip.h b/libc/include/generic-glibc/netinet/ip.h similarity index 99% rename from libc/glibc-include/netinet/ip.h rename to libc/include/generic-glibc/netinet/ip.h index 13b03ff79f..260c6ed6b4 100644 --- a/libc/glibc-include/netinet/ip.h +++ b/libc/include/generic-glibc/netinet/ip.h @@ -299,4 +299,4 @@ struct ip_timestamp __END_DECLS -#endif /* netinet/ip.h */ +#endif /* netinet/ip.h */ \ No newline at end of file diff --git a/libc/glibc-include/netinet/ip6.h b/libc/include/generic-glibc/netinet/ip6.h similarity index 99% rename from libc/glibc-include/netinet/ip6.h rename to libc/include/generic-glibc/netinet/ip6.h index 157a27d2df..e596a9d442 100644 --- a/libc/glibc-include/netinet/ip6.h +++ b/libc/include/generic-glibc/netinet/ip6.h @@ -185,4 +185,4 @@ struct ip6_opt_router # define IP6_ALERT_AN 0x0200 #endif -#endif /* netinet/ip6.h */ +#endif /* netinet/ip6.h */ \ No newline at end of file diff --git a/libc/glibc-include/netinet/ip_icmp.h b/libc/include/generic-glibc/netinet/ip_icmp.h similarity index 96% rename from libc/glibc-include/netinet/ip_icmp.h rename to libc/include/generic-glibc/netinet/ip_icmp.h index e6b00fcca8..fde3a57536 100644 --- a/libc/glibc-include/netinet/ip_icmp.h +++ b/libc/include/generic-glibc/netinet/ip_icmp.h @@ -269,14 +269,14 @@ struct icmp #define ICMP_PARAMPROB_OPTABSENT 1 /* req. opt. absent */ #define ICMP_INFOTYPE(type) \ - ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \ - (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \ - (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \ - (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ - (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) + ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO \ + || (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT \ + || (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY \ + || (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY \ + || (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) #endif /* __USE_MISC */ __END_DECLS -#endif /* netinet/ip_icmp.h */ +#endif /* netinet/ip_icmp.h */ \ No newline at end of file diff --git a/libc/glibc-include/netinet/tcp.h b/libc/include/generic-glibc/netinet/tcp.h similarity index 99% rename from libc/glibc-include/netinet/tcp.h rename to libc/include/generic-glibc/netinet/tcp.h index 1a164a9649..8b2fd6e469 100644 --- a/libc/glibc-include/netinet/tcp.h +++ b/libc/include/generic-glibc/netinet/tcp.h @@ -345,4 +345,4 @@ struct tcp_zerocopy_receive #endif /* Misc. */ -#endif /* netinet/tcp.h */ +#endif /* netinet/tcp.h */ \ No newline at end of file diff --git a/libc/glibc-include/netinet/udp.h b/libc/include/generic-glibc/netinet/udp.h similarity index 99% rename from libc/glibc-include/netinet/udp.h rename to libc/include/generic-glibc/netinet/udp.h index fc82bae381..409f88b2cf 100644 --- a/libc/glibc-include/netinet/udp.h +++ b/libc/include/generic-glibc/netinet/udp.h @@ -92,4 +92,4 @@ struct udphdr #define SOL_UDP 17 /* sockopt level for UDP */ -#endif /* netinet/udp.h */ +#endif /* netinet/udp.h */ \ No newline at end of file diff --git a/libc/glibc-include/netipx/ipx.h b/libc/include/generic-glibc/netipx/ipx.h similarity index 99% rename from libc/glibc-include/netipx/ipx.h rename to libc/include/generic-glibc/netipx/ipx.h index 6ccbb8846f..61ef23842a 100644 --- a/libc/glibc-include/netipx/ipx.h +++ b/libc/include/generic-glibc/netipx/ipx.h @@ -108,4 +108,4 @@ struct ipx_route_def __END_DECLS -#endif /* netipx/ipx.h */ +#endif /* netipx/ipx.h */ \ No newline at end of file diff --git a/libc/glibc-include/netiucv/iucv.h b/libc/include/generic-glibc/netiucv/iucv.h similarity index 99% rename from libc/glibc-include/netiucv/iucv.h rename to libc/include/generic-glibc/netiucv/iucv.h index 820f6f0da2..6e7a6e924e 100644 --- a/libc/glibc-include/netiucv/iucv.h +++ b/libc/include/generic-glibc/netiucv/iucv.h @@ -45,4 +45,4 @@ __END_DECLS /* IUCV related control messages (scm) */ #define SCM_IUCV_TRGCLS 0x0001 /* Target class control message */ -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/netpacket/packet.h b/libc/include/generic-glibc/netpacket/packet.h similarity index 98% rename from libc/glibc-include/netpacket/packet.h rename to libc/include/generic-glibc/netpacket/packet.h index 5e0e12d9ff..ab6f56d704 100644 --- a/libc/glibc-include/netpacket/packet.h +++ b/libc/include/generic-glibc/netpacket/packet.h @@ -78,4 +78,4 @@ struct packet_mreq #define PACKET_MR_ALLMULTI 2 #define PACKET_MR_UNICAST 3 -#endif /* netpacket/packet.h */ +#endif /* netpacket/packet.h */ \ No newline at end of file diff --git a/libc/glibc-include/netrom/netrom.h b/libc/include/generic-glibc/netrom/netrom.h similarity index 98% rename from libc/glibc-include/netrom/netrom.h rename to libc/include/generic-glibc/netrom/netrom.h index a117b9a9de..02ac57cbd2 100644 --- a/libc/glibc-include/netrom/netrom.h +++ b/libc/include/generic-glibc/netrom/netrom.h @@ -80,4 +80,4 @@ struct nr_ctl_struct unsigned long arg; }; -#endif /* netrom/netrom.h */ +#endif /* netrom/netrom.h */ \ No newline at end of file diff --git a/libc/glibc-include/netrose/rose.h b/libc/include/generic-glibc/netrose/rose.h similarity index 99% rename from libc/glibc-include/netrose/rose.h rename to libc/include/generic-glibc/netrose/rose.h index ab2afb383e..9a1fd4e4e3 100644 --- a/libc/glibc-include/netrose/rose.h +++ b/libc/include/generic-glibc/netrose/rose.h @@ -115,4 +115,4 @@ struct rose_facilities_struct ax25_address fail_call; }; -#endif /* netrose/rose.h */ +#endif /* netrose/rose.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/nfs/nfs.h b/libc/include/generic-glibc/nfs/nfs.h new file mode 100644 index 0000000000..b3b6618c01 --- /dev/null +++ b/libc/include/generic-glibc/nfs/nfs.h @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/libc/glibc-include/nl_types.h b/libc/include/generic-glibc/nl_types.h similarity index 98% rename from libc/glibc-include/nl_types.h rename to libc/include/generic-glibc/nl_types.h index f6abf755f8..a6959c250f 100644 --- a/libc/glibc-include/nl_types.h +++ b/libc/include/generic-glibc/nl_types.h @@ -51,4 +51,4 @@ extern int catclose (nl_catd __catalog) __THROW __nonnull ((1)); __END_DECLS -#endif /* nl_types.h */ +#endif /* nl_types.h */ \ No newline at end of file diff --git a/libc/glibc-include/nss.h b/libc/include/generic-glibc/nss.h similarity index 98% rename from libc/glibc-include/nss.h rename to libc/include/generic-glibc/nss.h index 9d4f33e999..0ab00b3976 100644 --- a/libc/glibc-include/nss.h +++ b/libc/include/generic-glibc/nss.h @@ -60,4 +60,4 @@ extern int __nss_configure_lookup (const char *__dbname, __END_DECLS -#endif /* nss.h */ +#endif /* nss.h */ \ No newline at end of file diff --git a/libc/glibc-include/obstack.h b/libc/include/generic-glibc/obstack.h similarity index 99% rename from libc/glibc-include/obstack.h rename to libc/include/generic-glibc/obstack.h index 479c4ec19f..41182e5e76 100644 --- a/libc/glibc-include/obstack.h +++ b/libc/include/generic-glibc/obstack.h @@ -512,4 +512,4 @@ extern int obstack_exit_failure; } /* C++ */ #endif -#endif /* obstack.h */ +#endif /* obstack.h */ \ No newline at end of file diff --git a/libc/glibc-include/paths.h b/libc/include/generic-glibc/paths.h similarity index 99% rename from libc/glibc-include/paths.h rename to libc/include/generic-glibc/paths.h index 1342ab3a96..3513850ad8 100644 --- a/libc/glibc-include/paths.h +++ b/libc/include/generic-glibc/paths.h @@ -72,4 +72,4 @@ #define _PATH_VARRUN "/var/run/" #define _PATH_VARTMP "/var/tmp/" -#endif /* !_PATHS_H_ */ +#endif /* !_PATHS_H_ */ \ No newline at end of file diff --git a/libc/include/generic-glibc/poll.h b/libc/include/generic-glibc/poll.h new file mode 100644 index 0000000000..5a862ad6e2 --- /dev/null +++ b/libc/include/generic-glibc/poll.h @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/libc/glibc-include/printf.h b/libc/include/generic-glibc/printf.h similarity index 99% rename from libc/glibc-include/printf.h rename to libc/include/generic-glibc/printf.h index 0172b234f1..9d84edb8de 100644 --- a/libc/glibc-include/printf.h +++ b/libc/include/generic-glibc/printf.h @@ -188,4 +188,4 @@ extern int printf_size_info (const struct printf_info *__restrict __END_DECLS -#endif /* printf.h */ +#endif /* printf.h */ \ No newline at end of file diff --git a/libc/glibc-include/proc_service.h b/libc/include/generic-glibc/proc_service.h similarity index 99% rename from libc/glibc-include/proc_service.h rename to libc/include/generic-glibc/proc_service.h index 4aa52c6390..6453259309 100644 --- a/libc/glibc-include/proc_service.h +++ b/libc/include/generic-glibc/proc_service.h @@ -92,4 +92,4 @@ extern ps_err_e ps_lcontinue (struct ps_prochandle *, lwpid_t); __END_DECLS -#endif /* proc_service.h */ +#endif /* proc_service.h */ \ No newline at end of file diff --git a/libc/glibc-include/protocols/routed.h b/libc/include/generic-glibc/protocols/routed.h similarity index 99% rename from libc/glibc-include/protocols/routed.h rename to libc/include/generic-glibc/protocols/routed.h index adb1767dca..e68ee6eaa0 100644 --- a/libc/glibc-include/protocols/routed.h +++ b/libc/include/generic-glibc/protocols/routed.h @@ -98,4 +98,4 @@ char *ripcmds[RIPCMD_MAX] = #define EXPIRE_TIME 180 /* time to mark entry invalid */ #define GARBAGE_TIME 240 /* time to garbage collect */ -#endif /* protocols/routed.h */ +#endif /* protocols/routed.h */ \ No newline at end of file diff --git a/libc/glibc-include/protocols/rwhod.h b/libc/include/generic-glibc/protocols/rwhod.h similarity index 98% rename from libc/glibc-include/protocols/rwhod.h rename to libc/include/generic-glibc/protocols/rwhod.h index 446d6f97b8..d9afaada65 100644 --- a/libc/glibc-include/protocols/rwhod.h +++ b/libc/include/generic-glibc/protocols/rwhod.h @@ -64,4 +64,4 @@ struct whod { /* We used to define _PATH_RWHODIR here but it's now in . */ #include -#endif /* protocols/rwhod.h */ +#endif /* protocols/rwhod.h */ \ No newline at end of file diff --git a/libc/glibc-include/protocols/talkd.h b/libc/include/generic-glibc/protocols/talkd.h similarity index 99% rename from libc/glibc-include/protocols/talkd.h rename to libc/include/generic-glibc/protocols/talkd.h index 09bd8a90ba..2778f83c7d 100644 --- a/libc/glibc-include/protocols/talkd.h +++ b/libc/include/generic-glibc/protocols/talkd.h @@ -112,4 +112,4 @@ typedef struct { /* RING_WAIT should be 10's of seconds less than MAX_LIFE */ #define RING_WAIT 30 /* time to wait before resending invitation */ -#endif /* protocols/talkd.h */ +#endif /* protocols/talkd.h */ \ No newline at end of file diff --git a/libc/glibc-include/protocols/timed.h b/libc/include/generic-glibc/protocols/timed.h similarity index 99% rename from libc/glibc-include/protocols/timed.h rename to libc/include/generic-glibc/protocols/timed.h index cabdce44a6..8c800ebaf9 100644 --- a/libc/glibc-include/protocols/timed.h +++ b/libc/include/generic-glibc/protocols/timed.h @@ -96,4 +96,4 @@ char *tsptype[TSPTYPENUMBER] = "TEST", "SETDATE", "SETDATEREQ", "LOOP" }; #endif -#endif /* protocols/timed.h */ +#endif /* protocols/timed.h */ \ No newline at end of file diff --git a/libc/glibc-include/pthread.h b/libc/include/generic-glibc/pthread.h similarity index 99% rename from libc/glibc-include/pthread.h rename to libc/include/generic-glibc/pthread.h index 704a3c48d6..0edb831a05 100644 --- a/libc/glibc-include/pthread.h +++ b/libc/include/generic-glibc/pthread.h @@ -1159,4 +1159,4 @@ __NTH (pthread_equal (pthread_t __thread1, pthread_t __thread2)) __END_DECLS -#endif /* pthread.h */ +#endif /* pthread.h */ \ No newline at end of file diff --git a/libc/glibc-include/pty.h b/libc/include/generic-glibc/pty.h similarity index 98% rename from libc/glibc-include/pty.h rename to libc/include/generic-glibc/pty.h index cac107cc0d..c58f91d871 100644 --- a/libc/glibc-include/pty.h +++ b/libc/include/generic-glibc/pty.h @@ -45,4 +45,4 @@ extern int forkpty (int *__amaster, char *__name, __END_DECLS -#endif /* pty.h */ +#endif /* pty.h */ \ No newline at end of file diff --git a/libc/glibc-include/pwd.h b/libc/include/generic-glibc/pwd.h similarity index 99% rename from libc/glibc-include/pwd.h rename to libc/include/generic-glibc/pwd.h index 1002ed39b6..fc27f27b55 100644 --- a/libc/glibc-include/pwd.h +++ b/libc/include/generic-glibc/pwd.h @@ -186,4 +186,4 @@ extern int getpw (__uid_t __uid, char *__buffer); __END_DECLS -#endif /* pwd.h */ +#endif /* pwd.h */ \ No newline at end of file diff --git a/libc/glibc-include/re_comp.h b/libc/include/generic-glibc/re_comp.h similarity index 97% rename from libc/glibc-include/re_comp.h rename to libc/include/generic-glibc/re_comp.h index b78d5fff79..286d6def40 100644 --- a/libc/glibc-include/re_comp.h +++ b/libc/include/generic-glibc/re_comp.h @@ -22,4 +22,4 @@ this name. */ #include -#endif /* re_comp.h */ +#endif /* re_comp.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/regdef.h b/libc/include/generic-glibc/regdef.h new file mode 100644 index 0000000000..1dda0c1d14 --- /dev/null +++ b/libc/include/generic-glibc/regdef.h @@ -0,0 +1,25 @@ +/* Copyright (C) 1994-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ralf Baechle . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _REGDEF_H +#define _REGDEF_H + +#include +#include + +#endif /* _REGDEF_H */ \ No newline at end of file diff --git a/libc/glibc-include/regex.h b/libc/include/generic-glibc/regex.h similarity index 99% rename from libc/glibc-include/regex.h rename to libc/include/generic-glibc/regex.h index 840e51508e..07ad6904bd 100644 --- a/libc/glibc-include/regex.h +++ b/libc/include/generic-glibc/regex.h @@ -655,4 +655,4 @@ extern void regfree (regex_t *__preg); } #endif /* C++ */ -#endif /* regex.h */ +#endif /* regex.h */ \ No newline at end of file diff --git a/libc/glibc-include/regexp.h b/libc/include/generic-glibc/regexp.h similarity index 98% rename from libc/glibc-include/regexp.h rename to libc/include/generic-glibc/regexp.h index 30c97cfec0..a6859a8150 100644 --- a/libc/glibc-include/regexp.h +++ b/libc/include/generic-glibc/regexp.h @@ -30,4 +30,4 @@ #error "The GNU C Library no longer implements ." #error "Please update your code to use instead (no trailing 'p')." -#endif /* regexp.h */ +#endif /* regexp.h */ \ No newline at end of file diff --git a/libc/glibc-include/resolv.h b/libc/include/generic-glibc/resolv.h similarity index 99% rename from libc/glibc-include/resolv.h rename to libc/include/generic-glibc/resolv.h index 80a523e5e4..8dba91c802 100644 --- a/libc/glibc-include/resolv.h +++ b/libc/include/generic-glibc/resolv.h @@ -301,4 +301,4 @@ void res_nclose (res_state) __THROW; __END_DECLS -#endif /* !_RESOLV_H_ */ +#endif /* !_RESOLV_H_ */ \ No newline at end of file diff --git a/libc/glibc-include/rpc/netdb.h b/libc/include/generic-glibc/rpc/netdb.h similarity index 99% rename from libc/glibc-include/rpc/netdb.h rename to libc/include/generic-glibc/rpc/netdb.h index 529a4ada21..14121a6dba 100644 --- a/libc/glibc-include/rpc/netdb.h +++ b/libc/include/generic-glibc/rpc/netdb.h @@ -71,4 +71,4 @@ extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer, __END_DECLS -#endif /* rpc/netdb.h */ +#endif /* rpc/netdb.h */ \ No newline at end of file diff --git a/libc/glibc-include/sched.h b/libc/include/generic-glibc/sched.h similarity index 99% rename from libc/glibc-include/sched.h rename to libc/include/generic-glibc/sched.h index 90ef6fcfd1..6eb7011789 100644 --- a/libc/glibc-include/sched.h +++ b/libc/include/generic-glibc/sched.h @@ -128,4 +128,4 @@ extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, __END_DECLS -#endif /* sched.h */ +#endif /* sched.h */ \ No newline at end of file diff --git a/libc/glibc-include/scsi/scsi.h b/libc/include/generic-glibc/scsi/scsi.h similarity index 99% rename from libc/glibc-include/scsi/scsi.h rename to libc/include/generic-glibc/scsi/scsi.h index f7be1a9681..7b09167bd3 100644 --- a/libc/glibc-include/scsi/scsi.h +++ b/libc/include/generic-glibc/scsi/scsi.h @@ -222,4 +222,4 @@ struct ccs_modesel_head /* Used to get the bus number for a device. */ #define SCSI_IOCTL_GET_BUS_NUMBER 0x5386 -#endif /* scsi/scsi.h */ +#endif /* scsi/scsi.h */ \ No newline at end of file diff --git a/libc/glibc-include/scsi/scsi_ioctl.h b/libc/include/generic-glibc/scsi/scsi_ioctl.h similarity index 99% rename from libc/glibc-include/scsi/scsi_ioctl.h rename to libc/include/generic-glibc/scsi/scsi_ioctl.h index e8ddefe99c..4943136506 100644 --- a/libc/glibc-include/scsi/scsi_ioctl.h +++ b/libc/include/generic-glibc/scsi/scsi_ioctl.h @@ -28,4 +28,4 @@ #define SCSI_IOCTL_DOORLOCK 0x5380 /* Lock the eject mechanism. */ #define SCSI_IOCTL_DOORUNLOCK 0x5381 /* Unlock the mechanism. */ -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/scsi/sg.h b/libc/include/generic-glibc/scsi/sg.h similarity index 99% rename from libc/glibc-include/scsi/sg.h rename to libc/include/generic-glibc/scsi/sg.h index 1f0b5a156a..f6bb1fdee4 100644 --- a/libc/glibc-include/scsi/sg.h +++ b/libc/include/generic-glibc/scsi/sg.h @@ -273,4 +273,4 @@ struct sg_header #define SG_DEF_UNDERRUN_FLAG 0 -#endif /* scsi/sg.h */ +#endif /* scsi/sg.h */ \ No newline at end of file diff --git a/libc/glibc-include/search.h b/libc/include/generic-glibc/search.h similarity index 99% rename from libc/glibc-include/search.h rename to libc/include/generic-glibc/search.h index 47e8a43436..f0dd98bc79 100644 --- a/libc/glibc-include/search.h +++ b/libc/include/generic-glibc/search.h @@ -171,4 +171,4 @@ extern void *lsearch (const void *__key, void *__base, __END_DECLS -#endif /* search.h */ +#endif /* search.h */ \ No newline at end of file diff --git a/libc/glibc-include/semaphore.h b/libc/include/generic-glibc/semaphore.h similarity index 98% rename from libc/glibc-include/semaphore.h rename to libc/include/generic-glibc/semaphore.h index 41ff92765e..c3d78053e9 100644 --- a/libc/glibc-include/semaphore.h +++ b/libc/include/generic-glibc/semaphore.h @@ -74,4 +74,4 @@ extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval) __END_DECLS -#endif /* semaphore.h */ +#endif /* semaphore.h */ \ No newline at end of file diff --git a/libc/glibc-include/setjmp.h b/libc/include/generic-glibc/setjmp.h similarity index 99% rename from libc/glibc-include/setjmp.h rename to libc/include/generic-glibc/setjmp.h index 3d09c98cc9..e2e00228fa 100644 --- a/libc/glibc-include/setjmp.h +++ b/libc/include/generic-glibc/setjmp.h @@ -102,4 +102,4 @@ extern void siglongjmp (sigjmp_buf __env, int __val) __END_DECLS -#endif /* setjmp.h */ +#endif /* setjmp.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/sgidefs.h b/libc/include/generic-glibc/sgidefs.h new file mode 100644 index 0000000000..a22a208cea --- /dev/null +++ b/libc/include/generic-glibc/sgidefs.h @@ -0,0 +1,76 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ralf Baechle . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _SGIDEFS_H +#define _SGIDEFS_H 1 + +/* + * A crude hack to stop + */ +#undef __ASM_SGIDEFS_H +#define __ASM_SGIDEFS_H + +/* + * And remove any damage it might have already done + */ +#undef _MIPS_ISA_MIPS1 +#undef _MIPS_ISA_MIPS2 +#undef _MIPS_ISA_MIPS3 +#undef _MIPS_ISA_MIPS4 +#undef _MIPS_ISA_MIPS5 +#undef _MIPS_ISA_MIPS32 +#undef _MIPS_ISA_MIPS64 + +#undef _MIPS_SIM_ABI32 +#undef _MIPS_SIM_NABI32 +#undef _MIPS_SIM_ABI64 + +/* + * Definitions for the ISA level + */ +#define _MIPS_ISA_MIPS1 1 +#define _MIPS_ISA_MIPS2 2 +#define _MIPS_ISA_MIPS3 3 +#define _MIPS_ISA_MIPS4 4 +#define _MIPS_ISA_MIPS5 5 +#define _MIPS_ISA_MIPS32 6 +#define _MIPS_ISA_MIPS64 7 + +/* + * Subprogram calling convention + */ +#ifndef _ABIO32 +# define _ABIO32 1 +#endif +#define _MIPS_SIM_ABI32 _ABIO32 + +#ifndef _ABIN32 +# define _ABIN32 2 +#endif +#define _MIPS_SIM_NABI32 _ABIN32 + +#ifndef _ABI64 +# define _ABI64 3 +#endif +#define _MIPS_SIM_ABI64 _ABI64 + +#ifndef _ABIO64 +# define _ABIO64 4 +#endif + +#endif /* sgidefs.h */ \ No newline at end of file diff --git a/libc/glibc-include/sgtty.h b/libc/include/generic-glibc/sgtty.h similarity index 98% rename from libc/glibc-include/sgtty.h rename to libc/include/generic-glibc/sgtty.h index 8617a30d56..20b10efaa3 100644 --- a/libc/glibc-include/sgtty.h +++ b/libc/include/generic-glibc/sgtty.h @@ -37,4 +37,4 @@ extern int stty (int __fd, const struct sgttyb *__params) __THROW; __END_DECLS -#endif /* sgtty.h */ +#endif /* sgtty.h */ \ No newline at end of file diff --git a/libc/glibc-include/shadow.h b/libc/include/generic-glibc/shadow.h similarity index 99% rename from libc/glibc-include/shadow.h rename to libc/include/generic-glibc/shadow.h index d8635db0b1..9e7fbd09b5 100644 --- a/libc/glibc-include/shadow.h +++ b/libc/include/generic-glibc/shadow.h @@ -149,4 +149,4 @@ extern int ulckpwdf (void) __THROW; __END_DECLS -#endif /* shadow.h */ +#endif /* shadow.h */ \ No newline at end of file diff --git a/libc/glibc-include/signal.h b/libc/include/generic-glibc/signal.h similarity index 99% rename from libc/glibc-include/signal.h rename to libc/include/generic-glibc/signal.h index ee591fcb2d..944f3179aa 100644 --- a/libc/glibc-include/signal.h +++ b/libc/include/generic-glibc/signal.h @@ -372,4 +372,4 @@ extern int __libc_current_sigrtmax (void) __THROW; __END_DECLS -#endif /* not signal.h */ +#endif /* not signal.h */ \ No newline at end of file diff --git a/libc/glibc-include/spawn.h b/libc/include/generic-glibc/spawn.h similarity index 82% rename from libc/glibc-include/spawn.h rename to libc/include/generic-glibc/spawn.h index 7305b0cc23..4391078604 100644 --- a/libc/glibc-include/spawn.h +++ b/libc/include/generic-glibc/spawn.h @@ -75,7 +75,8 @@ extern int posix_spawn (pid_t *__restrict __pid, __file_actions, const posix_spawnattr_t *__restrict __attrp, char *const __argv[__restrict_arr], - char *const __envp[__restrict_arr]); + char *const __envp[__restrict_arr]) + __nonnull ((2, 5)); /* Similar to `posix_spawn' but search for FILE in the PATH. @@ -84,85 +85,97 @@ extern int posix_spawn (pid_t *__restrict __pid, extern int posix_spawnp (pid_t *__pid, const char *__file, const posix_spawn_file_actions_t *__file_actions, const posix_spawnattr_t *__attrp, - char *const __argv[], char *const __envp[]); + char *const __argv[], char *const __envp[]) + __nonnull ((2, 5)); /* Initialize data structure with attributes for `spawn' to default values. */ -extern int posix_spawnattr_init (posix_spawnattr_t *__attr) __THROW; +extern int posix_spawnattr_init (posix_spawnattr_t *__attr) + __THROW __nonnull ((1)); /* Free resources associated with ATTR. */ -extern int posix_spawnattr_destroy (posix_spawnattr_t *__attr) __THROW; +extern int posix_spawnattr_destroy (posix_spawnattr_t *__attr) + __THROW __nonnull ((1)); /* Store signal mask for signals with default handling from ATTR in SIGDEFAULT. */ extern int posix_spawnattr_getsigdefault (const posix_spawnattr_t * __restrict __attr, sigset_t *__restrict __sigdefault) - __THROW; + __THROW __nonnull ((1, 2)); /* Set signal mask for signals with default handling in ATTR to SIGDEFAULT. */ extern int posix_spawnattr_setsigdefault (posix_spawnattr_t *__restrict __attr, const sigset_t *__restrict __sigdefault) - __THROW; + __THROW __nonnull ((1, 2)); /* Store signal mask for the new process from ATTR in SIGMASK. */ extern int posix_spawnattr_getsigmask (const posix_spawnattr_t *__restrict __attr, - sigset_t *__restrict __sigmask) __THROW; + sigset_t *__restrict __sigmask) + __THROW __nonnull ((1, 2)); /* Set signal mask for the new process in ATTR to SIGMASK. */ extern int posix_spawnattr_setsigmask (posix_spawnattr_t *__restrict __attr, const sigset_t *__restrict __sigmask) - __THROW; + __THROW __nonnull ((1, 2)); /* Get flag word from the attribute structure. */ extern int posix_spawnattr_getflags (const posix_spawnattr_t *__restrict __attr, - short int *__restrict __flags) __THROW; + short int *__restrict __flags) + __THROW __nonnull ((1, 2)); /* Store flags in the attribute structure. */ extern int posix_spawnattr_setflags (posix_spawnattr_t *_attr, - short int __flags) __THROW; + short int __flags) + __THROW __nonnull ((1)); /* Get process group ID from the attribute structure. */ extern int posix_spawnattr_getpgroup (const posix_spawnattr_t *__restrict __attr, pid_t *__restrict __pgroup) - __THROW; + __THROW __nonnull ((1, 2)); /* Store process group ID in the attribute structure. */ extern int posix_spawnattr_setpgroup (posix_spawnattr_t *__attr, - pid_t __pgroup) __THROW; + pid_t __pgroup) + __THROW __nonnull ((1)); /* Get scheduling policy from the attribute structure. */ extern int posix_spawnattr_getschedpolicy (const posix_spawnattr_t * __restrict __attr, int *__restrict __schedpolicy) - __THROW; + __THROW __nonnull ((1, 2)); /* Store scheduling policy in the attribute structure. */ extern int posix_spawnattr_setschedpolicy (posix_spawnattr_t *__attr, - int __schedpolicy) __THROW; + int __schedpolicy) + __THROW __nonnull ((1)); /* Get scheduling parameters from the attribute structure. */ extern int posix_spawnattr_getschedparam (const posix_spawnattr_t * __restrict __attr, struct sched_param *__restrict - __schedparam) __THROW; + __schedparam) + __THROW __nonnull ((1, 2)); /* Store scheduling parameters in the attribute structure. */ extern int posix_spawnattr_setschedparam (posix_spawnattr_t *__restrict __attr, const struct sched_param * - __restrict __schedparam) __THROW; + __restrict __schedparam) + __THROW __nonnull ((1, 2)); /* Initialize data structure for file attribute for `spawn' call. */ extern int posix_spawn_file_actions_init (posix_spawn_file_actions_t * - __file_actions) __THROW; + __file_actions) + __THROW __nonnull ((1)); /* Free resources associated with FILE-ACTIONS. */ extern int posix_spawn_file_actions_destroy (posix_spawn_file_actions_t * - __file_actions) __THROW; + __file_actions) + __THROW __nonnull ((1)); /* Add an action to FILE-ACTIONS which tells the implementation to call `open' for the given file during the `spawn' call. */ @@ -171,33 +184,37 @@ extern int posix_spawn_file_actions_addopen (posix_spawn_file_actions_t * int __fd, const char *__restrict __path, int __oflag, mode_t __mode) - __THROW; + __THROW __nonnull ((1, 3)); /* Add an action to FILE-ACTIONS which tells the implementation to call `close' for the given file descriptor during the `spawn' call. */ extern int posix_spawn_file_actions_addclose (posix_spawn_file_actions_t * __file_actions, int __fd) - __THROW; + __THROW __nonnull ((1)); /* Add an action to FILE-ACTIONS which tells the implementation to call `dup2' for the given file descriptors during the `spawn' call. */ extern int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t * __file_actions, - int __fd, int __newfd) __THROW; + int __fd, int __newfd) + __THROW __nonnull ((1)); #ifdef __USE_GNU /* Add an action changing the directory to PATH during spawn. This affects the subsequent file actions. */ -extern int posix_spawn_file_actions_addchdir_np (posix_spawn_file_actions_t *, - const char *__path) __THROW; +extern int posix_spawn_file_actions_addchdir_np (posix_spawn_file_actions_t * + __restrict __actions, + const char *__restrict __path) + __THROW __nonnull ((1, 2)); /* Add an action changing the directory to FD during spawn. This affects the subsequent file actions. FD is not duplicated and must be open when the file action is executed. */ extern int posix_spawn_file_actions_addfchdir_np (posix_spawn_file_actions_t *, - int __fd) __THROW; + int __fd) + __THROW __nonnull ((1)); #endif __END_DECLS -#endif /* spawn.h */ +#endif /* spawn.h */ \ No newline at end of file diff --git a/libc/glibc-include/stab.h b/libc/include/generic-glibc/stab.h similarity index 90% rename from libc/glibc-include/stab.h rename to libc/include/generic-glibc/stab.h index 9dc3c32ecb..46cc1aee6b 100644 --- a/libc/glibc-include/stab.h +++ b/libc/include/generic-glibc/stab.h @@ -14,4 +14,4 @@ LAST_UNUSED_STAB_CODE #undef __define_stab -#endif /* __GNU_STAB_ */ +#endif /* __GNU_STAB_ */ \ No newline at end of file diff --git a/libc/glibc-include/stdc-predef.h b/libc/include/generic-glibc/stdc-predef.h similarity index 99% rename from libc/glibc-include/stdc-predef.h rename to libc/include/generic-glibc/stdc-predef.h index 5cc5eef22f..78afe72d4b 100644 --- a/libc/glibc-include/stdc-predef.h +++ b/libc/include/generic-glibc/stdc-predef.h @@ -57,4 +57,4 @@ - 3 additional Zanabazar Square characters */ #define __STDC_ISO_10646__ 201706L -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/stdint.h b/libc/include/generic-glibc/stdint.h similarity index 99% rename from libc/glibc-include/stdint.h rename to libc/include/generic-glibc/stdint.h index 1ad538fc48..8867249d22 100644 --- a/libc/glibc-include/stdint.h +++ b/libc/include/generic-glibc/stdint.h @@ -316,4 +316,4 @@ typedef __uintmax_t uintmax_t; #endif -#endif /* stdint.h */ +#endif /* stdint.h */ \ No newline at end of file diff --git a/libc/glibc-include/stdio.h b/libc/include/generic-glibc/stdio.h similarity index 99% rename from libc/glibc-include/stdio.h rename to libc/include/generic-glibc/stdio.h index b63ee88a77..2aee4e206e 100644 --- a/libc/glibc-include/stdio.h +++ b/libc/include/generic-glibc/stdio.h @@ -872,4 +872,4 @@ extern int __overflow (FILE *, int); __END_DECLS -#endif /* included. */ +#endif /* included. */ \ No newline at end of file diff --git a/libc/glibc-include/stdio_ext.h b/libc/include/generic-glibc/stdio_ext.h similarity index 99% rename from libc/glibc-include/stdio_ext.h rename to libc/include/generic-glibc/stdio_ext.h index 4fad1840fb..dfe1c1167b 100644 --- a/libc/glibc-include/stdio_ext.h +++ b/libc/include/generic-glibc/stdio_ext.h @@ -83,4 +83,4 @@ extern int __fsetlocking (FILE *__fp, int __type) __THROW; __END_DECLS -#endif /* stdio_ext.h */ +#endif /* stdio_ext.h */ \ No newline at end of file diff --git a/libc/glibc-include/stdlib.h b/libc/include/generic-glibc/stdlib.h similarity index 99% rename from libc/glibc-include/stdlib.h rename to libc/include/generic-glibc/stdlib.h index 15debe1e31..152d7c0148 100644 --- a/libc/glibc-include/stdlib.h +++ b/libc/include/generic-glibc/stdlib.h @@ -1019,4 +1019,4 @@ extern int ttyslot (void) __THROW; __END_DECLS -#endif /* stdlib.h */ +#endif /* stdlib.h */ \ No newline at end of file diff --git a/libc/glibc-include/string.h b/libc/include/generic-glibc/string.h similarity index 99% rename from libc/glibc-include/string.h rename to libc/include/generic-glibc/string.h index c38eea971f..bd5aa6e740 100644 --- a/libc/glibc-include/string.h +++ b/libc/include/generic-glibc/string.h @@ -497,4 +497,4 @@ extern char *basename (const char *__filename) __THROW __nonnull ((1)); __END_DECLS -#endif /* string.h */ +#endif /* string.h */ \ No newline at end of file diff --git a/libc/glibc-include/strings.h b/libc/include/generic-glibc/strings.h similarity index 99% rename from libc/glibc-include/strings.h rename to libc/include/generic-glibc/strings.h index 5428bc4feb..12f1af49cd 100644 --- a/libc/glibc-include/strings.h +++ b/libc/include/generic-glibc/strings.h @@ -145,4 +145,4 @@ __END_DECLS # endif #endif -#endif /* strings.h */ +#endif /* strings.h */ \ No newline at end of file diff --git a/libc/glibc-include/stropts.h b/libc/include/generic-glibc/stropts.h similarity index 99% rename from libc/glibc-include/stropts.h rename to libc/include/generic-glibc/stropts.h index 97b9428ee8..4f13402a1b 100644 --- a/libc/glibc-include/stropts.h +++ b/libc/include/generic-glibc/stropts.h @@ -89,4 +89,4 @@ extern int fdetach (const char *__path) __THROW; __END_DECLS -#endif /* stropts.h */ +#endif /* stropts.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/acct.h b/libc/include/generic-glibc/sys/acct.h similarity index 99% rename from libc/glibc-include/sys/acct.h rename to libc/include/generic-glibc/sys/acct.h index 619824fe4b..cd1bc7ce89 100644 --- a/libc/glibc-include/sys/acct.h +++ b/libc/include/generic-glibc/sys/acct.h @@ -103,4 +103,4 @@ extern int acct (const char *__filename) __THROW; __END_DECLS -#endif /* sys/acct.h */ +#endif /* sys/acct.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/asm.h b/libc/include/generic-glibc/sys/asm.h new file mode 100644 index 0000000000..42a2a02387 --- /dev/null +++ b/libc/include/generic-glibc/sys/asm.h @@ -0,0 +1,498 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ralf Baechle . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_ASM_H +#define _SYS_ASM_H + +#include + +#ifndef CAT +# define __CAT(str1,str2) str1##str2 +# define CAT(str1,str2) __CAT(str1,str2) +#endif + +/* Redefined as nonempty in the internal header. */ +#define __mips_cfi_startproc /* Empty. */ +#define __mips_cfi_endproc /* Empty. */ + +/* + * Macros to handle different pointer/register sizes for 32/64-bit code + * + * 64 bit address space isn't used yet, so we may use the R3000 32 bit + * defines for now. + */ +#if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32 +# define PTR .word +# define PTRSIZE 4 +# define PTRLOG 2 +#elif _MIPS_SIM == _ABI64 +# define PTR .dword +# define PTRSIZE 8 +# define PTRLOG 3 +#endif + +/* + * PIC specific declarations + */ +#if _MIPS_SIM == _ABIO32 +# ifdef __PIC__ +# define CPRESTORE(register) \ + .cprestore register +# define CPLOAD(register) \ + .cpload register +# else +# define CPRESTORE(register) +# define CPLOAD(register) +# endif + +# define CPADD(register) \ + .cpadd register + +/* + * Set gp when at 1st instruction + */ +# define SETUP_GP \ + .set noreorder; \ + .cpload $25; \ + .set reorder +/* Set gp when not at 1st instruction */ +# define SETUP_GPX(r) \ + .set noreorder; \ + move r, $31; /* Save old ra. */ \ + bal 10f; /* Find addr of cpload. */ \ + nop; \ +10: \ + .cpload $31; \ + move $31, r; \ + .set reorder +# define SETUP_GPX_L(r, l) \ + .set noreorder; \ + move r, $31; /* Save old ra. */ \ + bal l; /* Find addr of cpload. */ \ + nop; \ +l: \ + .cpload $31; \ + move $31, r; \ + .set reorder +# define SAVE_GP(x) \ + .cprestore x /* Save gp trigger t9/jalr conversion. */ +# define SETUP_GP64(a, b) +# define SETUP_GPX64(a, b) +# define SETUP_GPX64_L(cp_reg, ra_save, l) +# define RESTORE_GP64 +# define USE_ALT_CP(a) +#else /* _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 */ +/* + * For callee-saved gp calling convention: + */ +# define SETUP_GP +# define SETUP_GPX(r) +# define SETUP_GPX_L(r, l) +# define SAVE_GP(x) + +# define SETUP_GP64(gpoffset, proc) \ + .cpsetup $25, gpoffset, proc +# define SETUP_GPX64(cp_reg, ra_save) \ + move ra_save, $31; /* Save old ra. */ \ + .set noreorder; \ + bal 10f; /* Find addr of .cpsetup. */ \ + nop; \ +10: \ + .set reorder; \ + .cpsetup $31, cp_reg, 10b; \ + move $31, ra_save +# define SETUP_GPX64_L(cp_reg, ra_save, l) \ + move ra_save, $31; /* Save old ra. */ \ + .set noreorder; \ + bal l; /* Find addr of .cpsetup. */ \ + nop; \ +l: \ + .set reorder; \ + .cpsetup $31, cp_reg, l; \ + move $31, ra_save +# define RESTORE_GP64 \ + .cpreturn +/* Use alternate register for context pointer. */ +# define USE_ALT_CP(reg) \ + .cplocal reg +#endif /* _MIPS_SIM != _ABIO32 */ + +/* + * Stack Frame Definitions + */ +#if _MIPS_SIM == _ABIO32 +# define NARGSAVE 4 /* Space for 4 argument registers must be allocated. */ +#endif +#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 +# define NARGSAVE 0 /* No caller responsibilities. */ +#endif + + +/* + * LEAF - declare leaf routine + */ +#define LEAF(symbol) \ + .globl symbol; \ + .align 2; \ + .type symbol,@function; \ + .ent symbol,0; \ +symbol: .frame sp,0,ra; \ + __mips_cfi_startproc + +/* + * NESTED - declare nested routine entry point + */ +#define NESTED(symbol, framesize, rpc) \ + .globl symbol; \ + .align 2; \ + .type symbol,@function; \ + .ent symbol,0; \ +symbol: .frame sp, framesize, rpc; \ + __mips_cfi_startproc + +/* + * END - mark end of function + */ +#ifndef END +# define END(function) \ + __mips_cfi_endproc; \ + .end function; \ + .size function,.-function +#endif + +/* + * EXPORT - export definition of symbol + */ +#define EXPORT(symbol) \ + .globl symbol; \ +symbol: __mips_cfi_startproc + +/* + * ABS - export absolute symbol + */ +#define ABS(symbol,value) \ + .globl symbol; \ +symbol = value + +#define PANIC(msg) \ + .set push; \ + .set reorder; \ + la a0,8f; \ + jal panic; \ +9: b 9b; \ + .set pop; \ + TEXT(msg) + +/* + * Print formated string + */ +#define PRINT(string) \ + .set push; \ + .set reorder; \ + la a0,8f; \ + jal printk; \ + .set pop; \ + TEXT(string) + +#define TEXT(msg) \ + .data; \ +8: .asciiz msg; \ + .previous; + +/* + * Build text tables + */ +#define TTABLE(string) \ + .text; \ + .word 1f; \ + .previous; \ + .data; \ +1: .asciz string; \ + .previous + +/* + * MIPS IV pref instruction. + * Use with .set noreorder only! + * + * MIPS IV implementations are free to treat this as a nop. The R5000 + * is one of them. So we should have an option not to use this instruction. + */ +#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) \ + || (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64) +# define PREF(hint,addr) \ + pref hint,addr +# define PREFX(hint,addr) \ + prefx hint,addr +#else +# define PREF(hint,addr) +# define PREFX(hint,addr) +#endif + +/* + * MIPS ISA IV/V movn/movz instructions and equivalents for older CPUs. + */ +#if _MIPS_ISA == _MIPS_ISA_MIPS1 +# define MOVN(rd,rs,rt) \ + .set push; \ + .set reorder; \ + beqz rt,9f; \ + move rd,rs; \ + .set pop; \ +9: +# define MOVZ(rd,rs,rt) \ + .set push; \ + .set reorder; \ + bnez rt,9f; \ + move rd,rt; \ + .set pop; \ +9: +#endif /* _MIPS_ISA == _MIPS_ISA_MIPS1 */ +#if (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) +# define MOVN(rd,rs,rt) \ + .set push; \ + .set noreorder; \ + bnezl rt,9f; \ + move rd,rs; \ + .set pop; \ +9: +# define MOVZ(rd,rs,rt) \ + .set push; \ + .set noreorder; \ + beqzl rt,9f; \ + movz rd,rs; \ + .set pop; \ +9: +#endif /* (_MIPS_ISA == _MIPS_ISA_MIPS2) || (_MIPS_ISA == _MIPS_ISA_MIPS3) */ +#if (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) \ + || (_MIPS_ISA == _MIPS_ISA_MIPS32) || (_MIPS_ISA == _MIPS_ISA_MIPS64) +# define MOVN(rd,rs,rt) \ + movn rd,rs,rt +# define MOVZ(rd,rs,rt) \ + movz rd,rs,rt +#endif /* (_MIPS_ISA == _MIPS_ISA_MIPS4) || (_MIPS_ISA == _MIPS_ISA_MIPS5) */ + +/* + * Stack alignment + */ +#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 +# define ALSZ 15 +# define ALMASK ~15 +#else +# define ALSZ 7 +# define ALMASK ~7 +#endif + +/* + * Size of a register + */ +#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 +# define SZREG 8 +#else +# define SZREG 4 +#endif + +/* + * Use the following macros in assemblercode to load/store registers, + * pointers etc. + */ +#if (SZREG == 4) +# define REG_S sw +# define REG_L lw +#else +# define REG_S sd +# define REG_L ld +#endif + +/* + * How to add/sub/load/store/shift C int variables. + */ +#if (_MIPS_SZINT == 32) +# define INT_ADD add +# define INT_ADDI addi +# define INT_ADDU addu +# define INT_ADDIU addiu +# define INT_SUB sub +# define INT_SUBI subi +# define INT_SUBU subu +# define INT_SUBIU subu +# define INT_L lw +# define INT_S sw +#endif + +#if (_MIPS_SZINT == 64) +# define INT_ADD dadd +# define INT_ADDI daddi +# define INT_ADDU daddu +# define INT_ADDIU daddiu +# define INT_SUB dsub +# define INT_SUBI dsubi +# define INT_SUBU dsubu +# define INT_SUBIU dsubu +# define INT_L ld +# define INT_S sd +#endif + +/* + * How to add/sub/load/store/shift C long variables. + */ +#if (_MIPS_SZLONG == 32) +# define LONG_ADD add +# define LONG_ADDI addi +# define LONG_ADDU addu +# define LONG_ADDIU addiu +# define LONG_SUB sub +# define LONG_SUBI subi +# define LONG_SUBU subu +# define LONG_SUBIU subu +# define LONG_L lw +# define LONG_S sw +# define LONG_SLL sll +# define LONG_SLLV sllv +# define LONG_SRL srl +# define LONG_SRLV srlv +# define LONG_SRA sra +# define LONG_SRAV srav +#endif + +#if (_MIPS_SZLONG == 64) +# define LONG_ADD dadd +# define LONG_ADDI daddi +# define LONG_ADDU daddu +# define LONG_ADDIU daddiu +# define LONG_SUB dsub +# define LONG_SUBI dsubi +# define LONG_SUBU dsubu +# define LONG_SUBIU dsubu +# define LONG_L ld +# define LONG_S sd +# define LONG_SLL dsll +# define LONG_SLLV dsllv +# define LONG_SRL dsrl +# define LONG_SRLV dsrlv +# define LONG_SRA dsra +# define LONG_SRAV dsrav +#endif + +/* + * How to add/sub/load/store/shift pointers. + */ +#if (_MIPS_SIM == _ABIO32 && _MIPS_SZPTR == 32) +# define PTR_ADD add +# define PTR_ADDI addi +# define PTR_ADDU addu +# define PTR_ADDIU addiu +# define PTR_SUB sub +# define PTR_SUBI subi +# define PTR_SUBU subu +# define PTR_SUBIU subu +# define PTR_L lw +# define PTR_LA la +# define PTR_S sw +# define PTR_SLL sll +# define PTR_SLLV sllv +# define PTR_SRL srl +# define PTR_SRLV srlv +# define PTR_SRA sra +# define PTR_SRAV srav + +# define PTR_SCALESHIFT 2 +#endif + +#if _MIPS_SIM == _ABIN32 +# define PTR_ADD add +# define PTR_ADDI addi +# define PTR_SUB sub +# define PTR_SUBI subi +#if !defined __mips_isa_rev || __mips_isa_rev < 6 +# define PTR_ADDU add /* no u */ +# define PTR_ADDIU addi /* no u */ +# define PTR_SUBU sub /* no u */ +# define PTR_SUBIU sub /* no u */ +#else +# define PTR_ADDU addu +# define PTR_ADDIU addiu +# define PTR_SUBU subu +# define PTR_SUBIU subu +#endif +# define PTR_L lw +# define PTR_LA la +# define PTR_S sw +# define PTR_SLL sll +# define PTR_SLLV sllv +# define PTR_SRL srl +# define PTR_SRLV srlv +# define PTR_SRA sra +# define PTR_SRAV srav + +# define PTR_SCALESHIFT 2 +#endif + +#if (_MIPS_SIM == _ABIO32 && _MIPS_SZPTR == 64 /* o64??? */) \ + || _MIPS_SIM == _ABI64 +# define PTR_ADD dadd +# define PTR_ADDI daddi +# define PTR_ADDU daddu +# define PTR_ADDIU daddiu +# define PTR_SUB dsub +# define PTR_SUBI dsubi +# define PTR_SUBU dsubu +# define PTR_SUBIU dsubu +# define PTR_L ld +# define PTR_LA dla +# define PTR_S sd +# define PTR_SLL dsll +# define PTR_SLLV dsllv +# define PTR_SRL dsrl +# define PTR_SRLV dsrlv +# define PTR_SRA dsra +# define PTR_SRAV dsrav + +# define PTR_SCALESHIFT 3 +#endif + +/* + * Some cp0 registers were extended to 64bit for MIPS III. + */ +#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) \ + || (_MIPS_ISA == _MIPS_ISA_MIPS32) +# define MFC0 mfc0 +# define MTC0 mtc0 +#endif +#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) \ + || (_MIPS_ISA == _MIPS_ISA_MIPS5) || (_MIPS_ISA == _MIPS_ISA_MIPS64) +# define MFC0 dmfc0 +# define MTC0 dmtc0 +#endif + +/* The MIPS architectures do not have a uniform memory model. Particular + platforms may provide additional guarantees - for instance, the R4000 + LL and SC instructions implicitly perform a SYNC, and the 4K promises + strong ordering. + + However, in the absence of those guarantees, we must assume weak ordering + and SYNC explicitly where necessary. + + Some obsolete MIPS processors may not support the SYNC instruction. This + applies to "true" MIPS I processors; most of the processors which compile + using MIPS I implement parts of MIPS II. */ + +#ifndef MIPS_SYNC +# define MIPS_SYNC sync +#endif + +#endif /* sys/asm.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/auxv.h b/libc/include/generic-glibc/sys/auxv.h similarity index 98% rename from libc/glibc-include/sys/auxv.h rename to libc/include/generic-glibc/sys/auxv.h index 68363b364d..064ca2841b 100644 --- a/libc/glibc-include/sys/auxv.h +++ b/libc/include/generic-glibc/sys/auxv.h @@ -33,4 +33,4 @@ extern unsigned long int getauxval (unsigned long int __type) __END_DECLS -#endif /* sys/auxv.h */ +#endif /* sys/auxv.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/bitypes.h b/libc/include/generic-glibc/sys/bitypes.h similarity index 73% rename from libc/glibc-include/sys/bitypes.h rename to libc/include/generic-glibc/sys/bitypes.h index 3a9860f713..9f2ff0a90e 100644 --- a/libc/glibc-include/sys/bitypes.h +++ b/libc/include/generic-glibc/sys/bitypes.h @@ -1,3 +1,3 @@ /* The GNU defines all the necessary types. */ -#include +#include \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/cachectl.h b/libc/include/generic-glibc/sys/cachectl.h new file mode 100644 index 0000000000..29fa4fd54c --- /dev/null +++ b/libc/include/generic-glibc/sys/cachectl.h @@ -0,0 +1,41 @@ +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_CACHECTL_H +#define _SYS_CACHECTL_H 1 + +#include + +/* + * Get the kernel definition for the op bits. + */ +#include + +__BEGIN_DECLS + +#ifdef __USE_MISC +extern int cachectl (void *__addr, const int __nbytes, const int __op) __THROW; +#endif +extern int __cachectl (void *__addr, const int __nbytes, const int __op) __THROW; +#ifdef __USE_MISC +extern int cacheflush (void *__addr, const int __nbytes, const int __op) __THROW; +#endif +extern int _flush_cache (char *__addr, const int __nbytes, const int __op) __THROW; + +__END_DECLS + +#endif /* sys/cachectl.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/cdefs.h b/libc/include/generic-glibc/sys/cdefs.h similarity index 99% rename from libc/glibc-include/sys/cdefs.h rename to libc/include/generic-glibc/sys/cdefs.h index 88bc7ac942..5b813a0f44 100644 --- a/libc/glibc-include/sys/cdefs.h +++ b/libc/include/generic-glibc/sys/cdefs.h @@ -256,8 +256,8 @@ /* Since version 4.5, gcc also allows one to specify the message printed when a deprecated function is used. clang claims to be gcc 4.2, but may also support this feature. */ -#if __GNUC_PREREQ (4,5) || \ - __glibc_clang_has_extension (__attribute_deprecated_with_message__) +#if __GNUC_PREREQ (4,5) \ + || __glibc_clang_has_extension (__attribute_deprecated_with_message__) # define __attribute_deprecated_msg__(msg) \ __attribute__ ((__deprecated__ (msg))) #else @@ -514,4 +514,4 @@ # define __HAVE_GENERIC_SELECTION 0 #endif -#endif /* sys/cdefs.h */ +#endif /* sys/cdefs.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/debugreg.h b/libc/include/generic-glibc/sys/debugreg.h similarity index 99% rename from libc/glibc-include/sys/debugreg.h rename to libc/include/generic-glibc/sys/debugreg.h index 0feb4e56f9..a870a9f3ba 100644 --- a/libc/glibc-include/sys/debugreg.h +++ b/libc/include/generic-glibc/sys/debugreg.h @@ -85,4 +85,4 @@ #define DR_LOCAL_SLOWDOWN (0x100) /* Local slow the pipeline */ #define DR_GLOBAL_SLOWDOWN (0x200) /* Global slow the pipeline */ -#endif /* sys/debugreg.h */ +#endif /* sys/debugreg.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/dir.h b/libc/include/generic-glibc/sys/dir.h similarity index 97% rename from libc/glibc-include/sys/dir.h rename to libc/include/generic-glibc/sys/dir.h index 4ef5c5e1fe..2176d5ec64 100644 --- a/libc/glibc-include/sys/dir.h +++ b/libc/include/generic-glibc/sys/dir.h @@ -24,4 +24,4 @@ #define direct dirent -#endif /* sys/dir.h */ +#endif /* sys/dir.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/elf.h b/libc/include/generic-glibc/sys/elf.h new file mode 100644 index 0000000000..ea214a1530 --- /dev/null +++ b/libc/include/generic-glibc/sys/elf.h @@ -0,0 +1,25 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_ELF_H +#define _SYS_ELF_H 1 + +#warning "This header is obsolete; use instead." + +#include + +#endif /* sys/elf.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/epoll.h b/libc/include/generic-glibc/sys/epoll.h similarity index 99% rename from libc/glibc-include/sys/epoll.h rename to libc/include/generic-glibc/sys/epoll.h index 51ec53dbca..cf4f949fb3 100644 --- a/libc/glibc-include/sys/epoll.h +++ b/libc/include/generic-glibc/sys/epoll.h @@ -135,4 +135,4 @@ extern int epoll_pwait (int __epfd, struct epoll_event *__events, __END_DECLS -#endif /* sys/epoll.h */ +#endif /* sys/epoll.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/errno.h b/libc/include/generic-glibc/sys/errno.h new file mode 100644 index 0000000000..679ce128ea --- /dev/null +++ b/libc/include/generic-glibc/sys/errno.h @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/libc/glibc-include/sys/eventfd.h b/libc/include/generic-glibc/sys/eventfd.h similarity index 98% rename from libc/glibc-include/sys/eventfd.h rename to libc/include/generic-glibc/sys/eventfd.h index d0a9d4c4a8..57eb4d0a75 100644 --- a/libc/glibc-include/sys/eventfd.h +++ b/libc/include/generic-glibc/sys/eventfd.h @@ -41,4 +41,4 @@ extern int eventfd_write (int __fd, eventfd_t __value); __END_DECLS -#endif /* sys/eventfd.h */ +#endif /* sys/eventfd.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/fanotify.h b/libc/include/generic-glibc/sys/fanotify.h similarity index 97% rename from libc/glibc-include/sys/fanotify.h rename to libc/include/generic-glibc/sys/fanotify.h index a37b9b6eb3..87d409605b 100644 --- a/libc/glibc-include/sys/fanotify.h +++ b/libc/include/generic-glibc/sys/fanotify.h @@ -35,4 +35,4 @@ extern int fanotify_mark (int __fanotify_fd, unsigned int __flags, __END_DECLS -#endif /* sys/fanotify.h */ +#endif /* sys/fanotify.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/fcntl.h b/libc/include/generic-glibc/sys/fcntl.h new file mode 100644 index 0000000000..b0a9c39043 --- /dev/null +++ b/libc/include/generic-glibc/sys/fcntl.h @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/libc/glibc-include/sys/file.h b/libc/include/generic-glibc/sys/file.h similarity index 98% rename from libc/glibc-include/sys/file.h rename to libc/include/generic-glibc/sys/file.h index 13f0b49415..15002e36f5 100644 --- a/libc/glibc-include/sys/file.h +++ b/libc/include/generic-glibc/sys/file.h @@ -52,4 +52,4 @@ extern int flock (int __fd, int __operation) __THROW; __END_DECLS -#endif /* sys/file.h */ +#endif /* sys/file.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/fpregdef.h b/libc/include/generic-glibc/sys/fpregdef.h new file mode 100644 index 0000000000..2705ae6953 --- /dev/null +++ b/libc/include/generic-glibc/sys/fpregdef.h @@ -0,0 +1,118 @@ +/* Copyright (C) 1991-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_FPREGDEF_H +#define _SYS_FPREGDEF_H + +#include + +/* Commonalities first, individualities next... */ + +#define fv0 $f0 /* return value */ +#define fv1 $f2 + +#if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32 +#define fs0 $f20 /* callee saved */ +#define fs1 $f22 +#define fs2 $f24 +#define fs3 $f26 +#define fs4 $f28 +#define fs5 $f30 +#endif /* _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32 */ + +#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 +#define fa0 $f12 /* argument registers */ +#define fa1 $f13 +#define fa2 $f14 +#define fa3 $f15 +#define fa4 $f16 +#define fa5 $f17 +#define fa6 $f18 +#define fa7 $f19 + +#define ft0 $f4 /* caller saved */ +#define ft1 $f5 +#define ft2 $f6 +#define ft3 $f7 +#define ft4 $f8 +#define ft5 $f9 +#define ft6 $f10 +#define ft7 $f11 +#endif /* _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 */ + +#if _MIPS_SIM == _ABIO32 +#define fv0f $f1 /* return value, high part */ +#define fv1f $f3 + +#define fa0 $f12 /* argument registers */ +#define fa0f $f13 +#define fa1 $f14 +#define fa1f $f15 + +#define ft0 $f4 /* caller saved */ +#define ft0f $f5 +#define ft1 $f6 +#define ft1f $f7 +#define ft2 $f8 +#define ft2f $f9 +#define ft3 $f10 +#define ft3f $f11 +#define ft4 $f16 +#define ft4f $f17 +#define ft5 $f18 +#define ft5f $f19 + +#define fs0f $f21 /* callee saved, high part */ +#define fs1f $f23 +#define fs2f $f25 +#define fs3f $f27 +#define fs4f $f29 +#define fs5f $f31 +#endif /* _MIPS_SIM == _ABIO32 */ + +#if _MIPS_SIM == _ABI64 +#define ft8 $f20 /* caller saved */ +#define ft9 $f21 +#define ft10 $f22 +#define ft11 $f23 +#define ft12 $f1 +#define ft13 $f3 + +#define fs0 $f24 /* callee saved */ +#define fs1 $f25 +#define fs2 $f26 +#define fs3 $f27 +#define fs4 $f28 +#define fs5 $f29 +#define fs6 $f30 +#define fs7 $f31 +#endif /* _MIPS_SIM == _ABI64 */ + +#if _MIPS_SIM == _ABIN32 +#define ft8 $f21 /* caller saved */ +#define ft9 $f23 +#define ft10 $f25 +#define ft11 $f27 +#define ft12 $f29 +#define ft13 $f31 +#define ft14 $f1 +#define ft15 $f3 +#endif /* _MIPS_SIM == _ABIN32 */ + +#define fcr31 $31 /* FPU status register */ + +#endif /* sys/fpregdef.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/fsuid.h b/libc/include/generic-glibc/sys/fsuid.h similarity index 98% rename from libc/glibc-include/sys/fsuid.h rename to libc/include/generic-glibc/sys/fsuid.h index 54bd2d9c60..374c938c60 100644 --- a/libc/glibc-include/sys/fsuid.h +++ b/libc/include/generic-glibc/sys/fsuid.h @@ -32,4 +32,4 @@ extern int setfsgid (__gid_t __gid) __THROW; __END_DECLS -#endif /* fsuid.h */ +#endif /* fsuid.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/gmon.h b/libc/include/generic-glibc/sys/gmon.h similarity index 99% rename from libc/glibc-include/sys/gmon.h rename to libc/include/generic-glibc/sys/gmon.h index b4cc3b043a..e227e4e7f6 100644 --- a/libc/glibc-include/sys/gmon.h +++ b/libc/include/generic-glibc/sys/gmon.h @@ -198,4 +198,4 @@ extern void _mcleanup (void) __THROW; __END_DECLS -#endif /* sys/gmon.h */ +#endif /* sys/gmon.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/gmon_out.h b/libc/include/generic-glibc/sys/gmon_out.h similarity index 98% rename from libc/glibc-include/sys/gmon_out.h rename to libc/include/generic-glibc/sys/gmon_out.h index 417c6c8c04..4955418ae5 100644 --- a/libc/glibc-include/sys/gmon_out.h +++ b/libc/include/generic-glibc/sys/gmon_out.h @@ -76,4 +76,4 @@ struct gmon_cg_arc_record __END_DECLS -#endif /* sys/gmon_out.h */ +#endif /* sys/gmon_out.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/inotify.h b/libc/include/generic-glibc/sys/inotify.h similarity index 99% rename from libc/glibc-include/sys/inotify.h rename to libc/include/generic-glibc/sys/inotify.h index 4b59b8e376..9358c4bb21 100644 --- a/libc/glibc-include/sys/inotify.h +++ b/libc/include/generic-glibc/sys/inotify.h @@ -97,4 +97,4 @@ extern int inotify_rm_watch (int __fd, int __wd) __THROW; __END_DECLS -#endif /* sys/inotify.h */ +#endif /* sys/inotify.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/io.h b/libc/include/generic-glibc/sys/io.h new file mode 100644 index 0000000000..ba1a73b093 --- /dev/null +++ b/libc/include/generic-glibc/sys/io.h @@ -0,0 +1,47 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IO_H + +#define _SYS_IO_H 1 +#include + +__BEGIN_DECLS + +/* If TURN_ON is TRUE, request for permission to do direct i/o on the + port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O + permission off for that range. This call requires root privileges. */ +extern int ioperm (unsigned long int __from, unsigned long int __num, + int __turn_on) __THROW; + +/* Set the I/O privilege level to LEVEL. If LEVEL is nonzero, + permission to access any I/O port is granted. This call requires + root privileges. */ +extern int iopl (int __level) __THROW; + +/* The functions that actually perform reads and writes. */ +extern unsigned char inb (unsigned long int __port) __THROW; +extern unsigned short int inw (unsigned long int __port) __THROW; +extern unsigned long int inl (unsigned long int __port) __THROW; + +extern void outb (unsigned char __value, unsigned long int __port) __THROW; +extern void outw (unsigned short __value, unsigned long int __port) __THROW; +extern void outl (unsigned long __value, unsigned long int __port) __THROW; + +__END_DECLS + +#endif /* _SYS_IO_H */ \ No newline at end of file diff --git a/libc/glibc-include/sys/ioctl.h b/libc/include/generic-glibc/sys/ioctl.h similarity index 98% rename from libc/glibc-include/sys/ioctl.h rename to libc/include/generic-glibc/sys/ioctl.h index 522d40d19e..0eef3b9c76 100644 --- a/libc/glibc-include/sys/ioctl.h +++ b/libc/include/generic-glibc/sys/ioctl.h @@ -42,4 +42,4 @@ extern int ioctl (int __fd, unsigned long int __request, ...) __THROW; __END_DECLS -#endif /* sys/ioctl.h */ +#endif /* sys/ioctl.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/ipc.h b/libc/include/generic-glibc/sys/ipc.h similarity index 98% rename from libc/glibc-include/sys/ipc.h rename to libc/include/generic-glibc/sys/ipc.h index 516e275d49..63e917a561 100644 --- a/libc/glibc-include/sys/ipc.h +++ b/libc/include/generic-glibc/sys/ipc.h @@ -51,4 +51,4 @@ extern key_t ftok (const char *__pathname, int __proj_id) __THROW; __END_DECLS -#endif /* sys/ipc.h */ +#endif /* sys/ipc.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/kd.h b/libc/include/generic-glibc/sys/kd.h similarity index 98% rename from libc/glibc-include/sys/kd.h rename to libc/include/generic-glibc/sys/kd.h index c92217c03a..5288b63504 100644 --- a/libc/glibc-include/sys/kd.h +++ b/libc/include/generic-glibc/sys/kd.h @@ -31,4 +31,4 @@ # undef __undef_LINUX_TYPES_H #endif -#endif /* sys/kd.h */ +#endif /* sys/kd.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/klog.h b/libc/include/generic-glibc/sys/klog.h similarity index 97% rename from libc/glibc-include/sys/klog.h rename to libc/include/generic-glibc/sys/klog.h index ef2eadedc2..65d63e15a3 100644 --- a/libc/glibc-include/sys/klog.h +++ b/libc/include/generic-glibc/sys/klog.h @@ -30,4 +30,4 @@ extern int klogctl (int __type, char *__bufp, int __len) __THROW; __END_DECLS -#endif /* _SYS_KLOG_H */ +#endif /* _SYS_KLOG_H */ \ No newline at end of file diff --git a/libc/glibc-include/sys/mman.h b/libc/include/generic-glibc/sys/mman.h similarity index 99% rename from libc/glibc-include/sys/mman.h rename to libc/include/generic-glibc/sys/mman.h index b27512063b..a6ca6b2421 100644 --- a/libc/glibc-include/sys/mman.h +++ b/libc/include/generic-glibc/sys/mman.h @@ -148,4 +148,4 @@ extern int shm_unlink (const char *__name); __END_DECLS -#endif /* sys/mman.h */ +#endif /* sys/mman.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/mount.h b/libc/include/generic-glibc/sys/mount.h similarity index 99% rename from libc/glibc-include/sys/mount.h rename to libc/include/generic-glibc/sys/mount.h index 01e3428b88..0dad8fd43a 100644 --- a/libc/glibc-include/sys/mount.h +++ b/libc/include/generic-glibc/sys/mount.h @@ -147,4 +147,4 @@ extern int umount2 (const char *__special_file, int __flags) __THROW; __END_DECLS -#endif /* _SYS_MOUNT_H */ +#endif /* _SYS_MOUNT_H */ \ No newline at end of file diff --git a/libc/glibc-include/sys/msg.h b/libc/include/generic-glibc/sys/msg.h similarity index 99% rename from libc/glibc-include/sys/msg.h rename to libc/include/generic-glibc/sys/msg.h index 1ce4672cc1..66dd700aae 100644 --- a/libc/glibc-include/sys/msg.h +++ b/libc/include/generic-glibc/sys/msg.h @@ -79,4 +79,4 @@ extern int msgsnd (int __msqid, const void *__msgp, size_t __msgsz, __END_DECLS -#endif /* sys/msg.h */ +#endif /* sys/msg.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/mtio.h b/libc/include/generic-glibc/sys/mtio.h similarity index 99% rename from libc/glibc-include/sys/mtio.h rename to libc/include/generic-glibc/sys/mtio.h index 69a1dce02d..5e4a217705 100644 --- a/libc/glibc-include/sys/mtio.h +++ b/libc/include/generic-glibc/sys/mtio.h @@ -273,4 +273,4 @@ struct mtconfiginfo # define DEFTAPE "/dev/tape" #endif -#endif /* mtio.h */ +#endif /* mtio.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/param.h b/libc/include/generic-glibc/sys/param.h similarity index 99% rename from libc/glibc-include/sys/param.h rename to libc/include/generic-glibc/sys/param.h index bf988a9769..dce2138d07 100644 --- a/libc/glibc-include/sys/param.h +++ b/libc/include/generic-glibc/sys/param.h @@ -103,4 +103,4 @@ #define MAX(a,b) (((a)>(b))?(a):(b)) -#endif /* sys/param.h */ +#endif /* sys/param.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/pci.h b/libc/include/generic-glibc/sys/pci.h similarity index 97% rename from libc/glibc-include/sys/pci.h rename to libc/include/generic-glibc/sys/pci.h index 704bea8713..3fa1ec585b 100644 --- a/libc/glibc-include/sys/pci.h +++ b/libc/include/generic-glibc/sys/pci.h @@ -21,4 +21,4 @@ /* We use the constants from the kernel. */ #include -#endif /* sys/pci.h */ +#endif /* sys/pci.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/perm.h b/libc/include/generic-glibc/sys/perm.h similarity index 97% rename from libc/glibc-include/sys/perm.h rename to libc/include/generic-glibc/sys/perm.h index 51794311cd..1caa905489 100644 --- a/libc/glibc-include/sys/perm.h +++ b/libc/include/generic-glibc/sys/perm.h @@ -32,4 +32,4 @@ extern int iopl (int __level) __THROW; __END_DECLS -#endif /* _SYS_PERM_H */ +#endif /* _SYS_PERM_H */ \ No newline at end of file diff --git a/libc/glibc-include/sys/personality.h b/libc/include/generic-glibc/sys/personality.h similarity index 98% rename from libc/glibc-include/sys/personality.h rename to libc/include/generic-glibc/sys/personality.h index 60c624c8d8..7fb977039f 100644 --- a/libc/glibc-include/sys/personality.h +++ b/libc/include/generic-glibc/sys/personality.h @@ -77,4 +77,4 @@ extern int personality (unsigned long int __persona) __THROW; __END_DECLS -#endif /* sys/personality.h */ +#endif /* sys/personality.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/platform/ppc.h b/libc/include/generic-glibc/sys/platform/ppc.h new file mode 100644 index 0000000000..4697806a1a --- /dev/null +++ b/libc/include/generic-glibc/sys/platform/ppc.h @@ -0,0 +1,146 @@ +/* Facilities specific to the PowerPC architecture + Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PLATFORM_PPC_H +#define _SYS_PLATFORM_PPC_H 1 + +#include +#include +#include + +/* Read the Time Base Register. */ +static __inline__ uint64_t +__ppc_get_timebase (void) +{ +#if __GNUC_PREREQ (4, 8) + return __builtin_ppc_get_timebase (); +#else +# ifdef __powerpc64__ + uint64_t __tb; + /* "volatile" is necessary here, because the user expects this assembly + isn't moved after an optimization. */ + __asm__ volatile ("mfspr %0, 268" : "=r" (__tb)); + return __tb; +# else /* not __powerpc64__ */ + uint32_t __tbu, __tbl, __tmp; \ + __asm__ volatile ("0:\n\t" + "mftbu %0\n\t" + "mftbl %1\n\t" + "mftbu %2\n\t" + "cmpw %0, %2\n\t" + "bne- 0b" + : "=r" (__tbu), "=r" (__tbl), "=r" (__tmp)); + return (((uint64_t) __tbu << 32) | __tbl); +# endif /* not __powerpc64__ */ +#endif +} + +/* The following functions provide hints about the usage of shared processor + resources, as defined in ISA 2.06 and newer. */ + +/* Provides a hint that performance will probably be improved if shared + resources dedicated to the executing processor are released for use by other + processors. */ +static __inline__ void +__ppc_yield (void) +{ + __asm__ volatile ("or 27,27,27"); +} + +/* Provides a hint that performance will probably be improved if shared + resources dedicated to the executing processor are released until + all outstanding storage accesses to caching-inhibited storage have been + completed. */ +static __inline__ void +__ppc_mdoio (void) +{ + __asm__ volatile ("or 29,29,29"); +} + +/* Provides a hint that performance will probably be improved if shared + resources dedicated to the executing processor are released until all + outstanding storage accesses to cacheable storage for which the data is not + in the cache have been completed. */ +static __inline__ void +__ppc_mdoom (void) +{ + __asm__ volatile ("or 30,30,30"); +} + + +/* ISA 2.05 and beyond support the Program Priority Register (PPR) to adjust + thread priorities based on lock acquisition, wait and release. The ISA + defines the use of form 'or Rx,Rx,Rx' as the way to modify the PRI field. + The unprivileged priorities are: + Rx = 1 (low) + Rx = 2 (medium) + Rx = 6 (medium-low/normal) + The 'or' instruction form is a nop in previous hardware, so it is safe to + use unguarded. The default value is 'medium'. + */ + +static __inline__ void +__ppc_set_ppr_med (void) +{ + __asm__ volatile ("or 2,2,2"); +} + +static __inline__ void +__ppc_set_ppr_med_low (void) +{ + __asm__ volatile ("or 6,6,6"); +} + +static __inline__ void +__ppc_set_ppr_low (void) +{ + __asm__ volatile ("or 1,1,1"); +} + +/* Power ISA 2.07 (Book II, Chapter 3) extends the priorities that can be set + to the Program Priority Register (PPR). The form 'or Rx,Rx,Rx' is used to + modify the PRI field of the PPR, the same way as described above. + The new priority levels are: + Rx = 31 (very low) + Rx = 5 (medium high) + Any program can set the priority to very low, low, medium low, and medium, + as these are unprivileged. + The medium high priority, on the other hand, is privileged, and may only be + set during certain time intervals by problem-state programs. If the program + priority is medium high when the time interval expires or if an attempt is + made to set the priority to medium high when it is not allowed, the PRI + field is set to medium. + */ + +#ifdef _ARCH_PWR8 + +static __inline__ void +__ppc_set_ppr_very_low (void) +{ + __asm__ volatile ("or 31,31,31"); +} + +static __inline__ void +__ppc_set_ppr_med_high (void) +{ + __asm__ volatile ("or 5,5,5"); +} + +#endif + +#endif /* sys/platform/ppc.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/poll.h b/libc/include/generic-glibc/sys/poll.h similarity index 99% rename from libc/glibc-include/sys/poll.h rename to libc/include/generic-glibc/sys/poll.h index 6711a1518d..31dfc07ce5 100644 --- a/libc/glibc-include/sys/poll.h +++ b/libc/include/generic-glibc/sys/poll.h @@ -73,4 +73,4 @@ __END_DECLS # include #endif -#endif /* sys/poll.h */ +#endif /* sys/poll.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/prctl.h b/libc/include/generic-glibc/sys/prctl.h similarity index 97% rename from libc/glibc-include/sys/prctl.h rename to libc/include/generic-glibc/sys/prctl.h index 74ddcccfe9..994a8bee13 100644 --- a/libc/glibc-include/sys/prctl.h +++ b/libc/include/generic-glibc/sys/prctl.h @@ -28,4 +28,4 @@ extern int prctl (int __option, ...) __THROW; __END_DECLS -#endif /* sys/prctl.h */ +#endif /* sys/prctl.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/procfs.h b/libc/include/generic-glibc/sys/procfs.h similarity index 99% rename from libc/glibc-include/sys/procfs.h rename to libc/include/generic-glibc/sys/procfs.h index d24c19138a..22f46606d4 100644 --- a/libc/glibc-include/sys/procfs.h +++ b/libc/include/generic-glibc/sys/procfs.h @@ -123,4 +123,4 @@ __END_DECLS types. */ #include -#endif /* sys/procfs.h. */ +#endif /* sys/procfs.h. */ \ No newline at end of file diff --git a/libc/glibc-include/sys/profil.h b/libc/include/generic-glibc/sys/profil.h similarity index 98% rename from libc/glibc-include/sys/profil.h rename to libc/include/generic-glibc/sys/profil.h index ba99ac8634..f4a12d930e 100644 --- a/libc/glibc-include/sys/profil.h +++ b/libc/include/generic-glibc/sys/profil.h @@ -57,4 +57,4 @@ extern int sprofil (struct prof *__profp, int __profcnt, __END_DECLS -#endif /* profil.h */ +#endif /* profil.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/ptrace.h b/libc/include/generic-glibc/sys/ptrace.h new file mode 100644 index 0000000000..96798ed23e --- /dev/null +++ b/libc/include/generic-glibc/sys/ptrace.h @@ -0,0 +1,178 @@ +/* `ptrace' debugger support interface. Linux version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include +#include + +__BEGIN_DECLS + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Get all general purpose registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETREGS = 12, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETREGS = 13, +#define PT_SETREGS PTRACE_SETREGS + + /* Get all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETFPREGS = 14, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETFPREGS = 15, +#define PT_SETFPREGS PTRACE_SETFPREGS + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Get all extended floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETFPXREGS = 18, +#define PT_GETFPXREGS PTRACE_GETFPXREGS + + /* Set all extended floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETFPXREGS = 19, +#define PT_SETFPXREGS PTRACE_SETFPXREGS + + /* Continue and stop at the next entry to or return from syscall. */ + PTRACE_SYSCALL = 24, +#define PT_SYSCALL PTRACE_SYSCALL + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + /* Retrieve siginfo_t structures without removing signals from a queue. */ + PTRACE_PEEKSIGINFO = 0x4209, +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO + + /* Get the mask of blocked signals. */ + PTRACE_GETSIGMASK = 0x420a, +#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK + + /* Change the mask of blocked signals. */ + PTRACE_SETSIGMASK = 0x420b, +#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK + + /* Get seccomp BPF filters. */ + PTRACE_SECCOMP_GET_FILTER = 0x420c, +#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER + + /* Get seccomp BPF filter metadata. */ + PTRACE_SECCOMP_GET_METADATA = 0x420d +#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA +}; + + +#include + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ \ No newline at end of file diff --git a/libc/glibc-include/sys/queue.h b/libc/include/generic-glibc/sys/queue.h similarity index 99% rename from libc/glibc-include/sys/queue.h rename to libc/include/generic-glibc/sys/queue.h index daf4553d33..5661c71d08 100644 --- a/libc/glibc-include/sys/queue.h +++ b/libc/include/generic-glibc/sys/queue.h @@ -571,4 +571,4 @@ struct { \ ? ((head)->cqh_last) \ : (elm->field.cqe_prev)) -#endif /* sys/queue.h */ +#endif /* sys/queue.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/quota.h b/libc/include/generic-glibc/sys/quota.h similarity index 99% rename from libc/glibc-include/sys/quota.h rename to libc/include/generic-glibc/sys/quota.h index 18b9f2e317..ac1bac6f5b 100644 --- a/libc/glibc-include/sys/quota.h +++ b/libc/include/generic-glibc/sys/quota.h @@ -132,4 +132,4 @@ extern int quotactl (int __cmd, const char *__special, int __id, __END_DECLS -#endif /* sys/quota.h */ +#endif /* sys/quota.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/random.h b/libc/include/generic-glibc/sys/random.h similarity index 98% rename from libc/glibc-include/sys/random.h rename to libc/include/generic-glibc/sys/random.h index 2297edf2f2..3fb74dea71 100644 --- a/libc/glibc-include/sys/random.h +++ b/libc/include/generic-glibc/sys/random.h @@ -39,4 +39,4 @@ int getentropy (void *__buffer, size_t __length) __wur; __END_DECLS -#endif /* _SYS_RANDOM_H */ +#endif /* _SYS_RANDOM_H */ \ No newline at end of file diff --git a/libc/glibc-include/sys/raw.h b/libc/include/generic-glibc/sys/raw.h similarity index 98% rename from libc/glibc-include/sys/raw.h rename to libc/include/generic-glibc/sys/raw.h index b4e5a82b6e..e29ecdba86 100644 --- a/libc/glibc-include/sys/raw.h +++ b/libc/include/generic-glibc/sys/raw.h @@ -35,4 +35,4 @@ struct raw_config_request uint64_t block_minor; }; -#endif /* sys/raw.h */ +#endif /* sys/raw.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/reboot.h b/libc/include/generic-glibc/sys/reboot.h similarity index 98% rename from libc/glibc-include/sys/reboot.h rename to libc/include/generic-glibc/sys/reboot.h index b92b1c983c..d70c3e2cd6 100644 --- a/libc/glibc-include/sys/reboot.h +++ b/libc/include/generic-glibc/sys/reboot.h @@ -51,4 +51,4 @@ extern int reboot (int __howto) __THROW; __END_DECLS -#endif /* _SYS_REBOOT_H */ +#endif /* _SYS_REBOOT_H */ \ No newline at end of file diff --git a/libc/glibc-include/sys/reg.h b/libc/include/generic-glibc/sys/reg.h similarity index 99% rename from libc/glibc-include/sys/reg.h rename to libc/include/generic-glibc/sys/reg.h index 2140f338e3..3f02ddc8e2 100644 --- a/libc/glibc-include/sys/reg.h +++ b/libc/include/generic-glibc/sys/reg.h @@ -74,4 +74,4 @@ # define SS 16 #endif -#endif +#endif \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/regdef.h b/libc/include/generic-glibc/sys/regdef.h new file mode 100644 index 0000000000..d28efcf2b8 --- /dev/null +++ b/libc/include/generic-glibc/sys/regdef.h @@ -0,0 +1,81 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ralf Baechle . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_REGDEF_H +#define _SYS_REGDEF_H + +#include + +/* + * Symbolic register names for 32 bit ABI + */ +#define zero $0 /* wired zero */ +#define AT $1 /* assembler temp - uppercase because of ".set at" */ +#define v0 $2 /* return value */ +#define v1 $3 +#define a0 $4 /* argument registers */ +#define a1 $5 +#define a2 $6 +#define a3 $7 +#if _MIPS_SIM != _ABIO32 +#define a4 $8 +#define a5 $9 +#define a6 $10 +#define a7 $11 +#define t0 $12 +#define t1 $13 +#define t2 $14 +#define t3 $15 +#define ta0 a4 +#define ta1 a5 +#define ta2 a6 +#define ta3 a7 +#else /* if _MIPS_SIM == _ABIO32 */ +#define t0 $8 /* caller saved */ +#define t1 $9 +#define t2 $10 +#define t3 $11 +#define t4 $12 +#define t5 $13 +#define t6 $14 +#define t7 $15 +#define ta0 t4 +#define ta1 t5 +#define ta2 t6 +#define ta3 t7 +#endif /* _MIPS_SIM == _ABIO32 */ +#define s0 $16 /* callee saved */ +#define s1 $17 +#define s2 $18 +#define s3 $19 +#define s4 $20 +#define s5 $21 +#define s6 $22 +#define s7 $23 +#define t8 $24 /* caller saved */ +#define t9 $25 +#define jp $25 /* PIC jump register */ +#define k0 $26 /* kernel scratch */ +#define k1 $27 +#define gp $28 /* global pointer */ +#define sp $29 /* stack pointer */ +#define fp $30 /* frame pointer */ +#define s8 $30 /* same like fp! */ +#define ra $31 /* return address */ + +#endif /* _SYS_REGDEF_H */ \ No newline at end of file diff --git a/libc/glibc-include/sys/resource.h b/libc/include/generic-glibc/sys/resource.h similarity index 99% rename from libc/glibc-include/sys/resource.h rename to libc/include/generic-glibc/sys/resource.h index 928646b074..c4c495d702 100644 --- a/libc/glibc-include/sys/resource.h +++ b/libc/include/generic-glibc/sys/resource.h @@ -99,4 +99,4 @@ extern int setpriority (__priority_which_t __which, id_t __who, int __prio) __END_DECLS -#endif /* sys/resource.h */ +#endif /* sys/resource.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/select.h b/libc/include/generic-glibc/sys/select.h similarity index 99% rename from libc/glibc-include/sys/select.h rename to libc/include/generic-glibc/sys/select.h index 8b10702bdc..db01e66677 100644 --- a/libc/glibc-include/sys/select.h +++ b/libc/include/generic-glibc/sys/select.h @@ -125,4 +125,4 @@ extern int pselect (int __nfds, fd_set *__restrict __readfds, __END_DECLS -#endif /* sys/select.h */ +#endif /* sys/select.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/sem.h b/libc/include/generic-glibc/sys/sem.h similarity index 98% rename from libc/glibc-include/sys/sem.h rename to libc/include/generic-glibc/sys/sem.h index ea9b66e1ee..c6c07dc22e 100644 --- a/libc/glibc-include/sys/sem.h +++ b/libc/include/generic-glibc/sys/sem.h @@ -64,4 +64,4 @@ extern int semtimedop (int __semid, struct sembuf *__sops, size_t __nsops, __END_DECLS -#endif /* sys/sem.h */ +#endif /* sys/sem.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/sendfile.h b/libc/include/generic-glibc/sys/sendfile.h similarity index 98% rename from libc/glibc-include/sys/sendfile.h rename to libc/include/generic-glibc/sys/sendfile.h index b21c0857be..108b368650 100644 --- a/libc/glibc-include/sys/sendfile.h +++ b/libc/include/generic-glibc/sys/sendfile.h @@ -48,4 +48,4 @@ extern ssize_t sendfile64 (int __out_fd, int __in_fd, __off64_t *__offset, __END_DECLS -#endif /* sys/sendfile.h */ +#endif /* sys/sendfile.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/shm.h b/libc/include/generic-glibc/sys/shm.h similarity index 98% rename from libc/glibc-include/sys/shm.h rename to libc/include/generic-glibc/sys/shm.h index c15f419f09..e59c210931 100644 --- a/libc/glibc-include/sys/shm.h +++ b/libc/include/generic-glibc/sys/shm.h @@ -60,4 +60,4 @@ extern int shmdt (const void *__shmaddr) __THROW; __END_DECLS -#endif /* sys/shm.h */ +#endif /* sys/shm.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/signal.h b/libc/include/generic-glibc/sys/signal.h new file mode 100644 index 0000000000..aeb77288f3 --- /dev/null +++ b/libc/include/generic-glibc/sys/signal.h @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/libc/glibc-include/sys/signalfd.h b/libc/include/generic-glibc/sys/signalfd.h similarity index 98% rename from libc/glibc-include/sys/signalfd.h rename to libc/include/generic-glibc/sys/signalfd.h index 13fd8b43fc..602c67b858 100644 --- a/libc/glibc-include/sys/signalfd.h +++ b/libc/include/generic-glibc/sys/signalfd.h @@ -59,4 +59,4 @@ extern int signalfd (int __fd, const sigset_t *__mask, int __flags) __END_DECLS -#endif /* sys/signalfd.h */ +#endif /* sys/signalfd.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/socket.h b/libc/include/generic-glibc/sys/socket.h similarity index 99% rename from libc/glibc-include/sys/socket.h rename to libc/include/generic-glibc/sys/socket.h index 6f242d088b..01598993a5 100644 --- a/libc/glibc-include/sys/socket.h +++ b/libc/include/generic-glibc/sys/socket.h @@ -271,4 +271,4 @@ extern int isfdtype (int __fd, int __fdtype) __THROW; __END_DECLS -#endif /* sys/socket.h */ +#endif /* sys/socket.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/socketvar.h b/libc/include/generic-glibc/sys/socketvar.h similarity index 82% rename from libc/glibc-include/sys/socketvar.h rename to libc/include/generic-glibc/sys/socketvar.h index b177158d0b..a2aa07c350 100644 --- a/libc/glibc-include/sys/socketvar.h +++ b/libc/include/generic-glibc/sys/socketvar.h @@ -1,3 +1,3 @@ /* This header is used on many systems but for GNU we have everything already defined in the standard header. */ -#include +#include \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/soundcard.h b/libc/include/generic-glibc/sys/soundcard.h new file mode 100644 index 0000000000..afeb11d822 --- /dev/null +++ b/libc/include/generic-glibc/sys/soundcard.h @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/libc/glibc-include/sys/stat.h b/libc/include/generic-glibc/sys/stat.h similarity index 99% rename from libc/glibc-include/sys/stat.h rename to libc/include/generic-glibc/sys/stat.h index 2de5eb65d9..1b50da1b47 100644 --- a/libc/glibc-include/sys/stat.h +++ b/libc/include/generic-glibc/sys/stat.h @@ -534,4 +534,4 @@ __NTH (fstatat64 (int __fd, const char *__filename, struct stat64 *__statbuf, __END_DECLS -#endif /* sys/stat.h */ +#endif /* sys/stat.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/statfs.h b/libc/include/generic-glibc/sys/statfs.h similarity index 98% rename from libc/glibc-include/sys/statfs.h rename to libc/include/generic-glibc/sys/statfs.h index 3d0e9f8966..d3c1071f79 100644 --- a/libc/glibc-include/sys/statfs.h +++ b/libc/include/generic-glibc/sys/statfs.h @@ -64,4 +64,4 @@ extern int fstatfs64 (int __fildes, struct statfs64 *__buf) __END_DECLS -#endif /* sys/statfs.h */ +#endif /* sys/statfs.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/statvfs.h b/libc/include/generic-glibc/sys/statvfs.h similarity index 99% rename from libc/glibc-include/sys/statvfs.h rename to libc/include/generic-glibc/sys/statvfs.h index 89abf02447..5324cfe99a 100644 --- a/libc/glibc-include/sys/statvfs.h +++ b/libc/include/generic-glibc/sys/statvfs.h @@ -87,4 +87,4 @@ extern int fstatvfs64 (int __fildes, struct statvfs64 *__buf) __END_DECLS -#endif /* sys/statvfs.h */ +#endif /* sys/statvfs.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/stropts.h b/libc/include/generic-glibc/sys/stropts.h new file mode 100644 index 0000000000..2715213842 --- /dev/null +++ b/libc/include/generic-glibc/sys/stropts.h @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/libc/glibc-include/sys/swap.h b/libc/include/generic-glibc/sys/swap.h similarity index 98% rename from libc/glibc-include/sys/swap.h rename to libc/include/generic-glibc/sys/swap.h index 3c97214031..43558d68a7 100644 --- a/libc/glibc-include/sys/swap.h +++ b/libc/include/generic-glibc/sys/swap.h @@ -40,4 +40,4 @@ extern int swapoff (const char *__path) __THROW; __END_DECLS -#endif /* _SYS_SWAP_H */ +#endif /* _SYS_SWAP_H */ \ No newline at end of file diff --git a/libc/glibc-include/sys/syscall.h b/libc/include/generic-glibc/sys/syscall.h similarity index 99% rename from libc/glibc-include/sys/syscall.h rename to libc/include/generic-glibc/sys/syscall.h index c0fc63b736..4d98b1f177 100644 --- a/libc/glibc-include/sys/syscall.h +++ b/libc/include/generic-glibc/sys/syscall.h @@ -31,4 +31,4 @@ # include #endif -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/sys/sysctl.h b/libc/include/generic-glibc/sys/sysctl.h similarity index 98% rename from libc/glibc-include/sys/sysctl.h rename to libc/include/generic-glibc/sys/sysctl.h index 0f6e71ba7e..b1ebb39054 100644 --- a/libc/glibc-include/sys/sysctl.h +++ b/libc/include/generic-glibc/sys/sysctl.h @@ -70,4 +70,4 @@ extern int sysctl (int *__name, int __nlen, void *__oldval, __END_DECLS -#endif /* _SYS_SYSCTL_H */ +#endif /* _SYS_SYSCTL_H */ \ No newline at end of file diff --git a/libc/glibc-include/sys/sysinfo.h b/libc/include/generic-glibc/sys/sysinfo.h similarity index 98% rename from libc/glibc-include/sys/sysinfo.h rename to libc/include/generic-glibc/sys/sysinfo.h index c6e6e432ea..364684b0ee 100644 --- a/libc/glibc-include/sys/sysinfo.h +++ b/libc/include/generic-glibc/sys/sysinfo.h @@ -44,4 +44,4 @@ extern long int get_avphys_pages (void) __THROW; __END_DECLS -#endif /* sys/sysinfo.h */ +#endif /* sys/sysinfo.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/syslog.h b/libc/include/generic-glibc/sys/syslog.h similarity index 99% rename from libc/glibc-include/sys/syslog.h rename to libc/include/generic-glibc/sys/syslog.h index ee01478c4b..05b95a4bf1 100644 --- a/libc/glibc-include/sys/syslog.h +++ b/libc/include/generic-glibc/sys/syslog.h @@ -212,4 +212,4 @@ extern void vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap) __END_DECLS -#endif /* sys/syslog.h */ +#endif /* sys/syslog.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/sysmacros.h b/libc/include/generic-glibc/sys/sysmacros.h similarity index 98% rename from libc/glibc-include/sys/sysmacros.h rename to libc/include/generic-glibc/sys/sysmacros.h index aeaec23d7d..a623d52fc6 100644 --- a/libc/glibc-include/sys/sysmacros.h +++ b/libc/include/generic-glibc/sys/sysmacros.h @@ -61,4 +61,4 @@ __END_DECLS #define minor(dev) gnu_dev_minor (dev) #define makedev(maj, min) gnu_dev_makedev (maj, min) -#endif /* sys/sysmacros.h */ +#endif /* sys/sysmacros.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/sysmips.h b/libc/include/generic-glibc/sys/sysmips.h new file mode 100644 index 0000000000..fd84d70fe2 --- /dev/null +++ b/libc/include/generic-glibc/sys/sysmips.h @@ -0,0 +1,42 @@ +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_SYSMIPS_H +#define _SYS_SYSMIPS_H 1 + +#include + +/* + * Commands for the sysmips(2) call + * + * sysmips(2) is deprecated - though some existing software uses it. + * We only support the following commands. Sysmips exists for compatibility + * purposes only so new software should avoid it. + */ +#define SETNAME 1 /* set hostname */ +#define FLUSH_CACHE 3 /* writeback and invalidate caches */ +#define MIPS_FIXADE 7 /* control address error fixing */ +#define MIPS_RDNVRAM 10 /* read NVRAM */ +#define MIPS_ATOMIC_SET 2001 /* atomically set variable */ + +__BEGIN_DECLS + +extern int sysmips (const int __cmd, ...) __THROW; + +__END_DECLS + +#endif /* sys/sysmips.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/tas.h b/libc/include/generic-glibc/sys/tas.h new file mode 100644 index 0000000000..28762068aa --- /dev/null +++ b/libc/include/generic-glibc/sys/tas.h @@ -0,0 +1,70 @@ +/* Copyright (C) 2000-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Maciej W. Rozycki , 2000. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_TAS_H +#define _SYS_TAS_H 1 + +#include +#include + +__BEGIN_DECLS + +extern int _test_and_set (int *__p, int __v) + __THROW __attribute__ ((__nomips16__)); + +#ifdef __USE_EXTERN_INLINES + +# ifndef _EXTERN_INLINE +# define _EXTERN_INLINE __extern_inline +# endif + +_EXTERN_INLINE int __attribute__ ((__nomips16__)) +__NTH (_test_and_set (int *__p, int __v)) +{ + int __r, __t; + + /* The R5900 reports itself as MIPS III but it does not have LL/SC. */ + __asm__ __volatile__ + ("/* Inline test and set */\n" + ".set push\n\t" +#if _MIPS_SIM == _ABIO32 && (__mips < 2 || defined (_MIPS_ARCH_R5900)) + ".set mips2\n\t" +#endif + "sync\n\t" + "1:\n\t" + "ll %0,%3\n\t" + "move %1,%4\n\t" + "beq %0,%4,2f\n\t" + "sc %1,%2\n\t" + "beqz %1,1b\n" + "sync\n\t" + ".set pop\n\t" + "2:\n\t" + "/* End test and set */" + : "=&r" (__r), "=&r" (__t), "=m" (*__p) + : "m" (*__p), "r" (__v) + : "memory"); + + return __r; +} + +#endif /* __USE_EXTERN_INLINES */ + +__END_DECLS + +#endif /* sys/tas.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/termios.h b/libc/include/generic-glibc/sys/termios.h similarity index 90% rename from libc/glibc-include/sys/termios.h rename to libc/include/generic-glibc/sys/termios.h index 3e18805ab4..f4df301a71 100644 --- a/libc/glibc-include/sys/termios.h +++ b/libc/include/generic-glibc/sys/termios.h @@ -1,4 +1,4 @@ #ifndef _SYS_TERMIOS_H #define _SYS_TERMIOS_H #include -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/sys/time.h b/libc/include/generic-glibc/sys/time.h similarity index 97% rename from libc/glibc-include/sys/time.h rename to libc/include/generic-glibc/sys/time.h index 9d65b2f686..a70f3814ac 100644 --- a/libc/glibc-include/sys/time.h +++ b/libc/include/generic-glibc/sys/time.h @@ -159,9 +159,9 @@ extern int futimesat (int __fd, const char *__file, # define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) # define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) # define timercmp(a, b, CMP) \ - (((a)->tv_sec == (b)->tv_sec) ? \ - ((a)->tv_usec CMP (b)->tv_usec) : \ - ((a)->tv_sec CMP (b)->tv_sec)) + (((a)->tv_sec == (b)->tv_sec) \ + ? ((a)->tv_usec CMP (b)->tv_usec) \ + : ((a)->tv_sec CMP (b)->tv_sec)) # define timeradd(a, b, result) \ do { \ (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ @@ -185,4 +185,4 @@ extern int futimesat (int __fd, const char *__file, __END_DECLS -#endif /* sys/time.h */ +#endif /* sys/time.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/timeb.h b/libc/include/generic-glibc/sys/timeb.h similarity index 98% rename from libc/glibc-include/sys/timeb.h rename to libc/include/generic-glibc/sys/timeb.h index 6333e8074d..1a7089f6fd 100644 --- a/libc/glibc-include/sys/timeb.h +++ b/libc/include/generic-glibc/sys/timeb.h @@ -40,4 +40,4 @@ extern int ftime (struct timeb *__timebuf); __END_DECLS -#endif /* sys/timeb.h */ +#endif /* sys/timeb.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/timerfd.h b/libc/include/generic-glibc/sys/timerfd.h similarity index 98% rename from libc/glibc-include/sys/timerfd.h rename to libc/include/generic-glibc/sys/timerfd.h index 5e5ad351a0..4e535c29b0 100644 --- a/libc/glibc-include/sys/timerfd.h +++ b/libc/include/generic-glibc/sys/timerfd.h @@ -52,4 +52,4 @@ extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW; __END_DECLS -#endif /* sys/timerfd.h */ +#endif /* sys/timerfd.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/times.h b/libc/include/generic-glibc/sys/times.h similarity index 98% rename from libc/glibc-include/sys/times.h rename to libc/include/generic-glibc/sys/times.h index 34173bf990..c64844865b 100644 --- a/libc/glibc-include/sys/times.h +++ b/libc/include/generic-glibc/sys/times.h @@ -47,4 +47,4 @@ extern clock_t times (struct tms *__buffer) __THROW; __END_DECLS -#endif /* sys/times.h */ +#endif /* sys/times.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/timex.h b/libc/include/generic-glibc/sys/timex.h similarity index 98% rename from libc/glibc-include/sys/timex.h rename to libc/include/generic-glibc/sys/timex.h index c71ace1d3d..e469d8237c 100644 --- a/libc/glibc-include/sys/timex.h +++ b/libc/include/generic-glibc/sys/timex.h @@ -68,4 +68,4 @@ extern int ntp_adjtime (struct timex *__tntx) __THROW; __END_DECLS -#endif /* sys/timex.h */ +#endif /* sys/timex.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/ttychars.h b/libc/include/generic-glibc/sys/ttychars.h similarity index 98% rename from libc/glibc-include/sys/ttychars.h rename to libc/include/generic-glibc/sys/ttychars.h index 7043f60f81..4927326667 100644 --- a/libc/glibc-include/sys/ttychars.h +++ b/libc/include/generic-glibc/sys/ttychars.h @@ -58,4 +58,4 @@ struct ttychars { #include /* to pick up character defaults */ #endif -#endif /* sys/ttychars.h */ +#endif /* sys/ttychars.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/ttydefaults.h b/libc/include/generic-glibc/sys/ttydefaults.h similarity index 99% rename from libc/glibc-include/sys/ttydefaults.h rename to libc/include/generic-glibc/sys/ttydefaults.h index 9be168b831..946b906946 100644 --- a/libc/glibc-include/sys/ttydefaults.h +++ b/libc/include/generic-glibc/sys/ttydefaults.h @@ -97,4 +97,4 @@ cc_t ttydefchars[NCCS] = { CDISCARD, CMIN, CTIME, CSTATUS, _POSIX_VDISABLE }; #undef TTYDEFCHARS -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/sys/types.h b/libc/include/generic-glibc/sys/types.h similarity index 99% rename from libc/glibc-include/sys/types.h rename to libc/include/generic-glibc/sys/types.h index 27129c5c23..9122889780 100644 --- a/libc/glibc-include/sys/types.h +++ b/libc/include/generic-glibc/sys/types.h @@ -246,4 +246,4 @@ typedef __fsfilcnt64_t fsfilcnt64_t; /* Type to count file system inodes. */ __END_DECLS -#endif /* sys/types.h */ +#endif /* sys/types.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/ucontext.h b/libc/include/generic-glibc/sys/ucontext.h new file mode 100644 index 0000000000..de2e9206e8 --- /dev/null +++ b/libc/include/generic-glibc/sys/ucontext.h @@ -0,0 +1,124 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* Don't rely on this, the interface is currently messed up and may need to + be broken to be fixed. */ +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include + +#include + + +/* Type for general register. Even in o32 we assume 64-bit registers, + like the kernel. */ +__extension__ typedef unsigned long long int greg_t; + +/* Number of general registers. */ +#define __NGREG 32 +#define __NFPREG 32 +#ifdef __USE_MISC +# define NGREG __NGREG +# define NFPREG __NFPREG +#endif + +/* Container for all general registers. */ +typedef greg_t gregset_t[__NGREG]; + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + +/* Container for all FPU registers. */ +typedef struct { + union { + double __ctx(fp_dregs)[__NFPREG]; + struct { + float _fp_fregs; + unsigned int _fp_pad; + } __ctx(fp_fregs)[__NFPREG]; + } __ctx(fp_r); +} fpregset_t; + + +/* Context to describe whole processor state. */ +#if _MIPS_SIM == _ABIO32 +/* Earlier versions of glibc for mips had an entirely different + definition of mcontext_t, that didn't even resemble the + corresponding kernel data structure. Fortunately, makecontext, + [gs]etcontext et all were not implemented back then, so this can + still be rectified. */ +typedef struct + { + unsigned int __ctx(regmask); + unsigned int __ctx(status); + greg_t __ctx(pc); + gregset_t __ctx(gregs); + fpregset_t __ctx(fpregs); + unsigned int __ctx(fp_owned); + unsigned int __ctx(fpc_csr); + unsigned int __ctx(fpc_eir); + unsigned int __ctx(used_math); + unsigned int __ctx(dsp); + greg_t __ctx(mdhi); + greg_t __ctx(mdlo); + unsigned long __ctx(hi1); + unsigned long __ctx(lo1); + unsigned long __ctx(hi2); + unsigned long __ctx(lo2); + unsigned long __ctx(hi3); + unsigned long __ctx(lo3); + } mcontext_t; +#else +typedef struct + { + gregset_t __ctx(gregs); + fpregset_t __ctx(fpregs); + greg_t __ctx(mdhi); + greg_t __ctx(hi1); + greg_t __ctx(hi2); + greg_t __ctx(hi3); + greg_t __ctx(mdlo); + greg_t __ctx(lo1); + greg_t __ctx(lo2); + greg_t __ctx(lo3); + greg_t __ctx(pc); + unsigned int __ctx(fpc_csr); + unsigned int __ctx(used_math); + unsigned int __ctx(dsp); + unsigned int __glibc_reserved1; + } mcontext_t; +#endif + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long int __ctx(uc_flags); + struct ucontext_t *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; + } ucontext_t; + +#undef __ctx + +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/uio.h b/libc/include/generic-glibc/sys/uio.h similarity index 99% rename from libc/glibc-include/sys/uio.h rename to libc/include/generic-glibc/sys/uio.h index ec1ca4af82..1ed202cb1c 100644 --- a/libc/glibc-include/sys/uio.h +++ b/libc/include/generic-glibc/sys/uio.h @@ -168,4 +168,4 @@ __END_DECLS # include #endif -#endif /* sys/uio.h */ +#endif /* sys/uio.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/un.h b/libc/include/generic-glibc/sys/un.h similarity index 98% rename from libc/glibc-include/sys/un.h rename to libc/include/generic-glibc/sys/un.h index 12683607ce..d29209d0bc 100644 --- a/libc/glibc-include/sys/un.h +++ b/libc/include/generic-glibc/sys/un.h @@ -43,4 +43,4 @@ struct sockaddr_un __END_DECLS -#endif /* sys/un.h */ +#endif /* sys/un.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/unistd.h b/libc/include/generic-glibc/sys/unistd.h new file mode 100644 index 0000000000..dfe3400d59 --- /dev/null +++ b/libc/include/generic-glibc/sys/unistd.h @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/user.h b/libc/include/generic-glibc/sys/user.h new file mode 100644 index 0000000000..375540a114 --- /dev/null +++ b/libc/include/generic-glibc/sys/user.h @@ -0,0 +1,210 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H +#define _SYS_USER_H 1 + +#include +#include + +/* The whole purpose of this file is for GDB and GDB only. Don't read + too much into it. Don't use it for anything other than GDB unless + you know what you are doing. */ + +/* #include */ +/* Instead of including the kernel header, that will vary depending on + whether the 32- or the 64-bit kernel is installed, we paste its + contents here. Note that the fact that the file is inline here, + instead of included separately, doesn't change in any way the + licensing status of a program that includes user.h. Since this is + for gdb alone, and gdb is GPLed, no surprises here. */ +#if _MIPS_SIM == _ABIO32 +/* + * Various register offset definitions for debuggers, core file + * examiners and whatnot. + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1995, 1999 by Ralf Baechle + */ +#ifndef __ASM_MIPS_REG_H +#define __ASM_MIPS_REG_H + +/* + * This defines/structures correspond to the register layout on stack - + * if the order here is changed, it needs to be updated in + * include/asm-mips/stackframe.h + */ +#define EF_REG0 6 +#define EF_REG1 7 +#define EF_REG2 8 +#define EF_REG3 9 +#define EF_REG4 10 +#define EF_REG5 11 +#define EF_REG6 12 +#define EF_REG7 13 +#define EF_REG8 14 +#define EF_REG9 15 +#define EF_REG10 16 +#define EF_REG11 17 +#define EF_REG12 18 +#define EF_REG13 19 +#define EF_REG14 20 +#define EF_REG15 21 +#define EF_REG16 22 +#define EF_REG17 23 +#define EF_REG18 24 +#define EF_REG19 25 +#define EF_REG20 26 +#define EF_REG21 27 +#define EF_REG22 28 +#define EF_REG23 29 +#define EF_REG24 30 +#define EF_REG25 31 +/* + * k0/k1 unsaved + */ +#define EF_REG28 34 +#define EF_REG29 35 +#define EF_REG30 36 +#define EF_REG31 37 + +/* + * Saved special registers + */ +#define EF_LO 38 +#define EF_HI 39 + +#define EF_CP0_EPC 40 +#define EF_CP0_BADVADDR 41 +#define EF_CP0_STATUS 42 +#define EF_CP0_CAUSE 43 + +#define EF_SIZE 180 /* size in bytes */ + +#endif /* __ASM_MIPS_REG_H */ + +#else /* _MIPS_SIM != _ABIO32 */ + +/* + * Various register offset definitions for debuggers, core file + * examiners and whatnot. + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1995, 1999 Ralf Baechle + * Copyright (C) 1995, 1999 Silicon Graphics + */ +#ifndef _ASM_REG_H +#define _ASM_REG_H + +/* + * This defines/structures correspond to the register layout on stack - + * if the order here is changed, it needs to be updated in + * include/asm-mips/stackframe.h + */ +#define EF_REG0 0 +#define EF_REG1 1 +#define EF_REG2 2 +#define EF_REG3 3 +#define EF_REG4 4 +#define EF_REG5 5 +#define EF_REG6 6 +#define EF_REG7 7 +#define EF_REG8 8 +#define EF_REG9 9 +#define EF_REG10 10 +#define EF_REG11 11 +#define EF_REG12 12 +#define EF_REG13 13 +#define EF_REG14 14 +#define EF_REG15 15 +#define EF_REG16 16 +#define EF_REG17 17 +#define EF_REG18 18 +#define EF_REG19 19 +#define EF_REG20 20 +#define EF_REG21 21 +#define EF_REG22 22 +#define EF_REG23 23 +#define EF_REG24 24 +#define EF_REG25 25 +/* + * k0/k1 unsaved + */ +#define EF_REG28 28 +#define EF_REG29 29 +#define EF_REG30 30 +#define EF_REG31 31 + +/* + * Saved special registers + */ +#define EF_LO 32 +#define EF_HI 33 + +#define EF_CP0_EPC 34 +#define EF_CP0_BADVADDR 35 +#define EF_CP0_STATUS 36 +#define EF_CP0_CAUSE 37 + +#define EF_SIZE 304 /* size in bytes */ + +#endif /* _ASM_REG_H */ + +#endif /* _MIPS_SIM != _ABIO32 */ + +#if _MIPS_SIM == _ABIO32 + +struct user +{ + unsigned long regs[EF_SIZE/4+64]; /* integer and fp regs */ + size_t u_tsize; /* text size (pages) */ + size_t u_dsize; /* data size (pages) */ + size_t u_ssize; /* stack size (pages) */ + unsigned long start_code; /* text starting address */ + unsigned long start_data; /* data starting address */ + unsigned long start_stack; /* stack starting address */ + long int signal; /* signal causing core dump */ + void* u_ar0; /* help gdb find registers */ + unsigned long magic; /* identifies a core file */ + char u_comm[32]; /* user command name */ +}; + +#else + +struct user { + __extension__ unsigned long regs[EF_SIZE/8+64]; /* integer and fp regs */ + __extension__ unsigned long u_tsize; /* text size (pages) */ + __extension__ unsigned long u_dsize; /* data size (pages) */ + __extension__ unsigned long u_ssize; /* stack size (pages) */ + __extension__ unsigned long long start_code; /* text starting address */ + __extension__ unsigned long long start_data; /* data starting address */ + __extension__ unsigned long long start_stack; /* stack starting address */ + __extension__ long long signal; /* signal causing core dump */ + __extension__ unsigned long long u_ar0; /* help gdb find registers */ + __extension__ unsigned long long magic; /* identifies a core file */ + char u_comm[32]; /* user command name */ +}; + +#endif + +#endif /* _SYS_USER_H */ \ No newline at end of file diff --git a/libc/glibc-include/sys/utsname.h b/libc/include/generic-glibc/sys/utsname.h similarity index 98% rename from libc/glibc-include/sys/utsname.h rename to libc/include/generic-glibc/sys/utsname.h index ec30f77dc9..d5bc376107 100644 --- a/libc/glibc-include/sys/utsname.h +++ b/libc/include/generic-glibc/sys/utsname.h @@ -83,4 +83,4 @@ extern int uname (struct utsname *__name) __THROW; __END_DECLS -#endif /* sys/utsname.h */ +#endif /* sys/utsname.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/vfs.h b/libc/include/generic-glibc/sys/vfs.h similarity index 85% rename from libc/glibc-include/sys/vfs.h rename to libc/include/generic-glibc/sys/vfs.h index fa22d31c4c..85b3b52bc9 100644 --- a/libc/glibc-include/sys/vfs.h +++ b/libc/include/generic-glibc/sys/vfs.h @@ -1,4 +1,4 @@ /* Other systems declare `struct statfs' et al in , so we have this file to be compatible with programs expecting it. */ -#include +#include \ No newline at end of file diff --git a/libc/glibc-include/sys/vlimit.h b/libc/include/generic-glibc/sys/vlimit.h similarity index 98% rename from libc/glibc-include/sys/vlimit.h rename to libc/include/generic-glibc/sys/vlimit.h index ff47ac4ebf..ae952be532 100644 --- a/libc/glibc-include/sys/vlimit.h +++ b/libc/include/generic-glibc/sys/vlimit.h @@ -64,4 +64,4 @@ extern int vlimit (enum __vlimit_resource __resource, int __value) __THROW; __END_DECLS -#endif /* sys/vlimit.h */ +#endif /* sys/vlimit.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/vm86.h b/libc/include/generic-glibc/sys/vm86.h similarity index 97% rename from libc/glibc-include/sys/vm86.h rename to libc/include/generic-glibc/sys/vm86.h index 39c718d9e7..b05aa000d1 100644 --- a/libc/glibc-include/sys/vm86.h +++ b/libc/include/generic-glibc/sys/vm86.h @@ -35,4 +35,4 @@ extern int vm86 (unsigned long int __subfunction, __END_DECLS # endif -#endif /* _SYS_VM86_H */ +#endif /* _SYS_VM86_H */ \ No newline at end of file diff --git a/libc/include/generic-glibc/sys/vt.h b/libc/include/generic-glibc/sys/vt.h new file mode 100644 index 0000000000..58335f1df3 --- /dev/null +++ b/libc/include/generic-glibc/sys/vt.h @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/libc/glibc-include/sys/vtimes.h b/libc/include/generic-glibc/sys/vtimes.h similarity index 98% rename from libc/glibc-include/sys/vtimes.h rename to libc/include/generic-glibc/sys/vtimes.h index 603c980c5e..a054f7e3ca 100644 --- a/libc/glibc-include/sys/vtimes.h +++ b/libc/include/generic-glibc/sys/vtimes.h @@ -65,4 +65,4 @@ extern int vtimes (struct vtimes * __current, struct vtimes * __child) __THROW; __END_DECLS -#endif /* sys/vtimes.h */ +#endif /* sys/vtimes.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/wait.h b/libc/include/generic-glibc/sys/wait.h similarity index 99% rename from libc/glibc-include/sys/wait.h rename to libc/include/generic-glibc/sys/wait.h index 9bd4399ed7..8b1487070a 100644 --- a/libc/glibc-include/sys/wait.h +++ b/libc/include/generic-glibc/sys/wait.h @@ -157,4 +157,4 @@ extern __pid_t wait4 (__pid_t __pid, int *__stat_loc, int __options, __END_DECLS -#endif /* sys/wait.h */ +#endif /* sys/wait.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/xattr.h b/libc/include/generic-glibc/sys/xattr.h similarity index 99% rename from libc/glibc-include/sys/xattr.h rename to libc/include/generic-glibc/sys/xattr.h index f1143f892c..2e08206dc4 100644 --- a/libc/glibc-include/sys/xattr.h +++ b/libc/include/generic-glibc/sys/xattr.h @@ -102,4 +102,4 @@ extern int fremovexattr (int __fd, const char *__name) __THROW; __END_DECLS -#endif /* sys/xattr.h */ +#endif /* sys/xattr.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/syscall.h b/libc/include/generic-glibc/syscall.h new file mode 100644 index 0000000000..f2043aa85b --- /dev/null +++ b/libc/include/generic-glibc/syscall.h @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/libc/glibc-include/sysexits.h b/libc/include/generic-glibc/sysexits.h similarity index 99% rename from libc/glibc-include/sysexits.h rename to libc/include/generic-glibc/sysexits.h index 37246b6e75..97eb66e4d6 100644 --- a/libc/glibc-include/sysexits.h +++ b/libc/include/generic-glibc/sysexits.h @@ -111,4 +111,4 @@ #define EX__MAX 78 /* maximum listed value */ -#endif /* sysexits.h */ +#endif /* sysexits.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/syslog.h b/libc/include/generic-glibc/syslog.h new file mode 100644 index 0000000000..c8e6c91d19 --- /dev/null +++ b/libc/include/generic-glibc/syslog.h @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/libc/glibc-include/tar.h b/libc/include/generic-glibc/tar.h similarity index 99% rename from libc/glibc-include/tar.h rename to libc/include/generic-glibc/tar.h index 24f5fe412e..1427bf1722 100644 --- a/libc/glibc-include/tar.h +++ b/libc/include/generic-glibc/tar.h @@ -109,4 +109,4 @@ #define TVERSION "00" #define TVERSLEN 2 -#endif /* tar.h */ +#endif /* tar.h */ \ No newline at end of file diff --git a/libc/glibc-include/termio.h b/libc/include/generic-glibc/termio.h similarity index 89% rename from libc/glibc-include/termio.h rename to libc/include/generic-glibc/termio.h index 0e610f0c56..a3f32a79f5 100644 --- a/libc/glibc-include/termio.h +++ b/libc/include/generic-glibc/termio.h @@ -3,4 +3,4 @@ defined in instead. */ #include -#include +#include \ No newline at end of file diff --git a/libc/glibc-include/termios.h b/libc/include/generic-glibc/termios.h similarity index 99% rename from libc/glibc-include/termios.h rename to libc/include/generic-glibc/termios.h index 223420883d..6f481b0d88 100644 --- a/libc/glibc-include/termios.h +++ b/libc/include/generic-glibc/termios.h @@ -106,4 +106,4 @@ extern __pid_t tcgetsid (int __fd) __THROW; __END_DECLS -#endif /* termios.h */ +#endif /* termios.h */ \ No newline at end of file diff --git a/libc/glibc-include/tgmath.h b/libc/include/generic-glibc/tgmath.h similarity index 99% rename from libc/glibc-include/tgmath.h rename to libc/include/generic-glibc/tgmath.h index d37a1567f8..3b5c792783 100644 --- a/libc/glibc-include/tgmath.h +++ b/libc/include/generic-glibc/tgmath.h @@ -761,4 +761,4 @@ /* Real part of Z. */ #define creal(Val) __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME (Val, creal) -#endif /* tgmath.h */ +#endif /* tgmath.h */ \ No newline at end of file diff --git a/libc/glibc-include/thread_db.h b/libc/include/generic-glibc/thread_db.h similarity index 99% rename from libc/glibc-include/thread_db.h rename to libc/include/generic-glibc/thread_db.h index d134acaa24..9b07bc2a7d 100644 --- a/libc/glibc-include/thread_db.h +++ b/libc/include/generic-glibc/thread_db.h @@ -455,4 +455,4 @@ extern td_err_e td_thr_dbsuspend (const td_thrhandle_t *__th); /* Resume execution of thread TH. */ extern td_err_e td_thr_dbresume (const td_thrhandle_t *__th); -#endif /* thread_db.h */ +#endif /* thread_db.h */ \ No newline at end of file diff --git a/libc/glibc-include/threads.h b/libc/include/generic-glibc/threads.h similarity index 99% rename from libc/glibc-include/threads.h rename to libc/include/generic-glibc/threads.h index ef08337b7b..e6dd2342b2 100644 --- a/libc/glibc-include/threads.h +++ b/libc/include/generic-glibc/threads.h @@ -204,4 +204,4 @@ extern void tss_delete (tss_t __tss_id); __END_DECLS -#endif /* _THREADS_H */ +#endif /* _THREADS_H */ \ No newline at end of file diff --git a/libc/glibc-include/time.h b/libc/include/generic-glibc/time.h similarity index 99% rename from libc/glibc-include/time.h rename to libc/include/generic-glibc/time.h index cba6d15260..57a7a7b381 100644 --- a/libc/glibc-include/time.h +++ b/libc/include/generic-glibc/time.h @@ -306,4 +306,4 @@ extern int getdate_r (const char *__restrict __string, __END_DECLS -#endif /* time.h. */ +#endif /* time.h. */ \ No newline at end of file diff --git a/libc/glibc-include/ttyent.h b/libc/include/generic-glibc/ttyent.h similarity index 99% rename from libc/glibc-include/ttyent.h rename to libc/include/generic-glibc/ttyent.h index fe418a5377..9f59a1eeda 100644 --- a/libc/glibc-include/ttyent.h +++ b/libc/include/generic-glibc/ttyent.h @@ -62,4 +62,4 @@ extern int endttyent (void) __THROW; __END_DECLS -#endif /* ttyent.h */ +#endif /* ttyent.h */ \ No newline at end of file diff --git a/libc/glibc-include/uchar.h b/libc/include/generic-glibc/uchar.h similarity index 98% rename from libc/glibc-include/uchar.h rename to libc/include/generic-glibc/uchar.h index 315a01540f..30b4948623 100644 --- a/libc/glibc-include/uchar.h +++ b/libc/include/generic-glibc/uchar.h @@ -64,4 +64,4 @@ extern size_t c32rtomb (char *__restrict __s, char32_t __c32, __END_DECLS -#endif /* uchar.h */ +#endif /* uchar.h */ \ No newline at end of file diff --git a/libc/glibc-include/ucontext.h b/libc/include/generic-glibc/ucontext.h similarity index 98% rename from libc/glibc-include/ucontext.h rename to libc/include/generic-glibc/ucontext.h index ab97224e1a..b038eb8431 100644 --- a/libc/glibc-include/ucontext.h +++ b/libc/include/generic-glibc/ucontext.h @@ -53,4 +53,4 @@ extern void makecontext (ucontext_t *__ucp, void (*__func) (void), __END_DECLS -#endif /* ucontext.h */ +#endif /* ucontext.h */ \ No newline at end of file diff --git a/libc/glibc-include/ulimit.h b/libc/include/generic-glibc/ulimit.h similarity index 98% rename from libc/glibc-include/ulimit.h rename to libc/include/generic-glibc/ulimit.h index 6fd6a05ed7..b85f09ae30 100644 --- a/libc/glibc-include/ulimit.h +++ b/libc/include/generic-glibc/ulimit.h @@ -44,4 +44,4 @@ extern long int ulimit (int __cmd, ...) __THROW; __END_DECLS -#endif /* ulimit.h */ +#endif /* ulimit.h */ \ No newline at end of file diff --git a/libc/glibc-include/unistd.h b/libc/include/generic-glibc/unistd.h similarity index 99% rename from libc/glibc-include/unistd.h rename to libc/include/generic-glibc/unistd.h index f67452122b..3274b30b57 100644 --- a/libc/glibc-include/unistd.h +++ b/libc/include/generic-glibc/unistd.h @@ -1166,6 +1166,9 @@ int getentropy (void *__buffer, size_t __length) __wur; # include #endif +/* System-specific extensions. */ +#include + __END_DECLS -#endif /* unistd.h */ +#endif /* unistd.h */ \ No newline at end of file diff --git a/libc/glibc-include/utime.h b/libc/include/generic-glibc/utime.h similarity index 98% rename from libc/glibc-include/utime.h rename to libc/include/generic-glibc/utime.h index 982e00d736..23d276a073 100644 --- a/libc/glibc-include/utime.h +++ b/libc/include/generic-glibc/utime.h @@ -47,4 +47,4 @@ extern int utime (const char *__file, __END_DECLS -#endif /* utime.h */ +#endif /* utime.h */ \ No newline at end of file diff --git a/libc/glibc-include/utmp.h b/libc/include/generic-glibc/utmp.h similarity index 99% rename from libc/glibc-include/utmp.h rename to libc/include/generic-glibc/utmp.h index 168c159b7b..ebe1cba7a6 100644 --- a/libc/glibc-include/utmp.h +++ b/libc/include/generic-glibc/utmp.h @@ -93,4 +93,4 @@ extern int getutline_r (const struct utmp *__line, __END_DECLS -#endif /* utmp.h */ +#endif /* utmp.h */ \ No newline at end of file diff --git a/libc/glibc-include/utmpx.h b/libc/include/generic-glibc/utmpx.h similarity index 99% rename from libc/glibc-include/utmpx.h rename to libc/include/generic-glibc/utmpx.h index 927410234d..2860f0e1d9 100644 --- a/libc/glibc-include/utmpx.h +++ b/libc/include/generic-glibc/utmpx.h @@ -122,4 +122,4 @@ extern void getutmpx (const struct utmp *__utmp, struct utmpx *__utmpx); __END_DECLS -#endif /* utmpx.h */ +#endif /* utmpx.h */ \ No newline at end of file diff --git a/libc/glibc-include/values.h b/libc/include/generic-glibc/values.h similarity index 98% rename from libc/glibc-include/values.h rename to libc/include/generic-glibc/values.h index ae987a5675..c383e1adbc 100644 --- a/libc/glibc-include/values.h +++ b/libc/include/generic-glibc/values.h @@ -65,4 +65,4 @@ # define BITSPERBYTE CHAR_BIT #endif -#endif /* values.h */ +#endif /* values.h */ \ No newline at end of file diff --git a/libc/include/generic-glibc/wait.h b/libc/include/generic-glibc/wait.h new file mode 100644 index 0000000000..6f268fcaec --- /dev/null +++ b/libc/include/generic-glibc/wait.h @@ -0,0 +1 @@ +#include \ No newline at end of file diff --git a/libc/glibc-include/wchar.h b/libc/include/generic-glibc/wchar.h similarity index 99% rename from libc/glibc-include/wchar.h rename to libc/include/generic-glibc/wchar.h index 20deca90bf..42a24c956e 100644 --- a/libc/glibc-include/wchar.h +++ b/libc/include/generic-glibc/wchar.h @@ -854,4 +854,4 @@ extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, __END_DECLS -#endif /* wchar.h */ +#endif /* wchar.h */ \ No newline at end of file diff --git a/libc/glibc-include/wctype.h b/libc/include/generic-glibc/wctype.h similarity index 99% rename from libc/glibc-include/wctype.h rename to libc/include/generic-glibc/wctype.h index 7b1d556fbe..38d11e930c 100644 --- a/libc/glibc-include/wctype.h +++ b/libc/include/generic-glibc/wctype.h @@ -145,4 +145,4 @@ extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, __END_DECLS -#endif /* wctype.h */ +#endif /* wctype.h */ \ No newline at end of file diff --git a/libc/glibc-include/wordexp.h b/libc/include/generic-glibc/wordexp.h similarity index 94% rename from libc/glibc-include/wordexp.h rename to libc/include/generic-glibc/wordexp.h index 148b9e1e70..b4f270a1ce 100644 --- a/libc/glibc-include/wordexp.h +++ b/libc/include/generic-glibc/wordexp.h @@ -33,8 +33,8 @@ enum WRDE_REUSE = (1 << 3), /* Reuse storage in PWORDEXP. */ WRDE_SHOWERR = (1 << 4), /* Don't redirect stderr to /dev/null. */ WRDE_UNDEF = (1 << 5), /* Error for expanding undefined variables. */ - __WRDE_FLAGS = (WRDE_DOOFFS | WRDE_APPEND | WRDE_NOCMD | - WRDE_REUSE | WRDE_SHOWERR | WRDE_UNDEF) + __WRDE_FLAGS = (WRDE_DOOFFS | WRDE_APPEND | WRDE_NOCMD + | WRDE_REUSE | WRDE_SHOWERR | WRDE_UNDEF) }; /* Structure describing a word-expansion run. */ @@ -67,4 +67,4 @@ extern void wordfree (wordexp_t *__wordexp) __THROW; __END_DECLS -#endif /* wordexp.h */ +#endif /* wordexp.h */ \ No newline at end of file diff --git a/libc/glibc/sysdeps/unix/sysv/linux/x86/asm/unistd.h b/libc/include/i386-linux-gnu/asm/unistd.h similarity index 100% rename from libc/glibc/sysdeps/unix/sysv/linux/x86/asm/unistd.h rename to libc/include/i386-linux-gnu/asm/unistd.h diff --git a/libc/glibc-include/bits/a.out.h b/libc/include/i386-linux-gnu/bits/a.out.h similarity index 97% rename from libc/glibc-include/bits/a.out.h rename to libc/include/i386-linux-gnu/bits/a.out.h index 0e4a7c911f..3c81a52dbb 100644 --- a/libc/glibc-include/bits/a.out.h +++ b/libc/include/i386-linux-gnu/bits/a.out.h @@ -8,4 +8,4 @@ support a.out binary format. */ #define __NO_A_OUT_SUPPORT 1 -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/endian.h b/libc/include/i386-linux-gnu/bits/endian.h similarity index 78% rename from libc/glibc-include/bits/endian.h rename to libc/include/i386-linux-gnu/bits/endian.h index 5a56c726f7..35c898d0ec 100644 --- a/libc/glibc-include/bits/endian.h +++ b/libc/include/i386-linux-gnu/bits/endian.h @@ -4,4 +4,4 @@ # error "Never use directly; include instead." #endif -#define __BYTE_ORDER __LITTLE_ENDIAN +#define __BYTE_ORDER __LITTLE_ENDIAN \ No newline at end of file diff --git a/libc/glibc-include/bits/environments.h b/libc/include/i386-linux-gnu/bits/environments.h similarity index 99% rename from libc/glibc-include/bits/environments.h rename to libc/include/i386-linux-gnu/bits/environments.h index d64486c1f2..76f12fe085 100644 --- a/libc/glibc-include/bits/environments.h +++ b/libc/include/i386-linux-gnu/bits/environments.h @@ -102,4 +102,4 @@ # define __ILP32_OFFBIG_LDFLAGS "-m32" #endif #define __LP64_OFF64_CFLAGS "-m64" -#define __LP64_OFF64_LDFLAGS "-m64" +#define __LP64_OFF64_LDFLAGS "-m64" \ No newline at end of file diff --git a/libc/glibc-include/bits/epoll.h b/libc/include/i386-linux-gnu/bits/epoll.h similarity index 95% rename from libc/glibc-include/bits/epoll.h rename to libc/include/i386-linux-gnu/bits/epoll.h index 162874aba3..205d42ad63 100644 --- a/libc/glibc-include/bits/epoll.h +++ b/libc/include/i386-linux-gnu/bits/epoll.h @@ -26,4 +26,4 @@ enum #define EPOLL_CLOEXEC EPOLL_CLOEXEC }; -#define __EPOLL_PACKED __attribute__ ((__packed__)) +#define __EPOLL_PACKED __attribute__ ((__packed__)) \ No newline at end of file diff --git a/libc/glibc-include/bits/fcntl.h b/libc/include/i386-linux-gnu/bits/fcntl.h similarity index 98% rename from libc/glibc-include/bits/fcntl.h rename to libc/include/i386-linux-gnu/bits/fcntl.h index d10e215b70..d3229a6782 100644 --- a/libc/glibc-include/bits/fcntl.h +++ b/libc/include/i386-linux-gnu/bits/fcntl.h @@ -58,4 +58,4 @@ struct flock64 #endif /* Include generic Linux declarations. */ -#include +#include \ No newline at end of file diff --git a/libc/glibc-include/bits/fenv.h b/libc/include/i386-linux-gnu/bits/fenv.h similarity index 99% rename from libc/glibc-include/bits/fenv.h rename to libc/include/i386-linux-gnu/bits/fenv.h index 3f876e01a7..74151486b4 100644 --- a/libc/glibc-include/bits/fenv.h +++ b/libc/include/i386-linux-gnu/bits/fenv.h @@ -167,4 +167,4 @@ __NTH (feraiseexcept (int __excepts)) } __END_DECLS -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/floatn.h b/libc/include/i386-linux-gnu/bits/floatn.h similarity index 99% rename from libc/glibc-include/bits/floatn.h rename to libc/include/i386-linux-gnu/bits/floatn.h index d157c926ad..1d7ba69ea8 100644 --- a/libc/glibc-include/bits/floatn.h +++ b/libc/include/i386-linux-gnu/bits/floatn.h @@ -118,4 +118,4 @@ typedef __float128 _Float128; #include -#endif /* _BITS_FLOATN_H */ +#endif /* _BITS_FLOATN_H */ \ No newline at end of file diff --git a/libc/glibc-include/bits/flt-eval-method.h b/libc/include/i386-linux-gnu/bits/flt-eval-method.h similarity index 99% rename from libc/glibc-include/bits/flt-eval-method.h rename to libc/include/i386-linux-gnu/bits/flt-eval-method.h index 90abe019db..87e06c4354 100644 --- a/libc/glibc-include/bits/flt-eval-method.h +++ b/libc/include/i386-linux-gnu/bits/flt-eval-method.h @@ -30,4 +30,4 @@ # define __GLIBC_FLT_EVAL_METHOD 0 #else # define __GLIBC_FLT_EVAL_METHOD 2 -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/fp-logb.h b/libc/include/i386-linux-gnu/bits/fp-logb.h similarity index 97% rename from libc/glibc-include/bits/fp-logb.h rename to libc/include/i386-linux-gnu/bits/fp-logb.h index 1f21ea9bca..f3e55ea50c 100644 --- a/libc/glibc-include/bits/fp-logb.h +++ b/libc/include/i386-linux-gnu/bits/fp-logb.h @@ -21,4 +21,4 @@ #endif #define __FP_LOGB0_IS_MIN 1 -#define __FP_LOGBNAN_IS_MIN 1 +#define __FP_LOGBNAN_IS_MIN 1 \ No newline at end of file diff --git a/libc/glibc-include/bits/indirect-return.h b/libc/include/i386-linux-gnu/bits/indirect-return.h similarity index 99% rename from libc/glibc-include/bits/indirect-return.h rename to libc/include/i386-linux-gnu/bits/indirect-return.h index d5ba741341..fd170e8a42 100644 --- a/libc/glibc-include/bits/indirect-return.h +++ b/libc/include/i386-linux-gnu/bits/indirect-return.h @@ -34,4 +34,4 @@ # endif #else # define __INDIRECT_RETURN -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/ipctypes.h b/libc/include/i386-linux-gnu/bits/ipctypes.h similarity index 97% rename from libc/glibc-include/bits/ipctypes.h rename to libc/include/i386-linux-gnu/bits/ipctypes.h index 54f6876eb1..2b471d1e52 100644 --- a/libc/glibc-include/bits/ipctypes.h +++ b/libc/include/i386-linux-gnu/bits/ipctypes.h @@ -30,4 +30,4 @@ typedef int __ipc_pid_t; typedef unsigned short int __ipc_pid_t; # endif -#endif /* bits/ipctypes.h */ +#endif /* bits/ipctypes.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/iscanonical.h b/libc/include/i386-linux-gnu/bits/iscanonical.h similarity index 98% rename from libc/glibc-include/bits/iscanonical.h rename to libc/include/i386-linux-gnu/bits/iscanonical.h index 8563584ea0..1fa01edaad 100644 --- a/libc/glibc-include/bits/iscanonical.h +++ b/libc/include/i386-linux-gnu/bits/iscanonical.h @@ -51,4 +51,4 @@ inline int iscanonical (long double __val) { return __iscanonicall (__val); } inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); } # endif } -#endif /* __cplusplus */ +#endif /* __cplusplus */ \ No newline at end of file diff --git a/libc/glibc-include/bits/link.h b/libc/include/i386-linux-gnu/bits/link.h similarity index 99% rename from libc/glibc-include/bits/link.h rename to libc/include/i386-linux-gnu/bits/link.h index 37a4a49e04..2724980f6b 100644 --- a/libc/glibc-include/bits/link.h +++ b/libc/include/i386-linux-gnu/bits/link.h @@ -156,4 +156,4 @@ extern unsigned int la_x32_gnu_pltexit (Elf32_Sym *__sym, __END_DECLS -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/long-double.h b/libc/include/i386-linux-gnu/bits/long-double.h similarity index 97% rename from libc/glibc-include/bits/long-double.h rename to libc/include/i386-linux-gnu/bits/long-double.h index 8d60650e85..6a582416cf 100644 --- a/libc/glibc-include/bits/long-double.h +++ b/libc/include/i386-linux-gnu/bits/long-double.h @@ -17,4 +17,4 @@ . */ /* long double is distinct from double, so there is nothing to - define here. */ + define here. */ \ No newline at end of file diff --git a/libc/include/i386-linux-gnu/bits/math-vector-fortran.h b/libc/include/i386-linux-gnu/bits/math-vector-fortran.h new file mode 100644 index 0000000000..fc3aa3e3b2 --- /dev/null +++ b/libc/include/i386-linux-gnu/bits/math-vector-fortran.h @@ -0,0 +1,43 @@ +! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*- +! Copyright (C) 2019 Free Software Foundation, Inc. +! This file is part of the GNU C Library. +! +! The GNU C Library is free software; you can redistribute it and/or +! modify it under the terms of the GNU Lesser General Public +! License as published by the Free Software Foundation; either +! version 2.1 of the License, or (at your option) any later version. +! +! The GNU C Library is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +! Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with the GNU C Library; if not, see +! . + +!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (sin) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (sinf) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (sincos) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (log) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (logf) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (exp) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64') + +!GCC$ builtin (cos) attributes simd (notinbranch) if('x32') +!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32') +!GCC$ builtin (sin) attributes simd (notinbranch) if('x32') +!GCC$ builtin (sinf) attributes simd (notinbranch) if('x32') +!GCC$ builtin (sincos) attributes simd (notinbranch) if('x32') +!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x32') +!GCC$ builtin (log) attributes simd (notinbranch) if('x32') +!GCC$ builtin (logf) attributes simd (notinbranch) if('x32') +!GCC$ builtin (exp) attributes simd (notinbranch) if('x32') +!GCC$ builtin (expf) attributes simd (notinbranch) if('x32') +!GCC$ builtin (pow) attributes simd (notinbranch) if('x32') +!GCC$ builtin (powf) attributes simd (notinbranch) if('x32') \ No newline at end of file diff --git a/libc/glibc-include/bits/math-vector.h b/libc/include/i386-linux-gnu/bits/math-vector.h similarity index 99% rename from libc/glibc-include/bits/math-vector.h rename to libc/include/i386-linux-gnu/bits/math-vector.h index e684a12d92..67e2c8aea8 100644 --- a/libc/glibc-include/bits/math-vector.h +++ b/libc/include/i386-linux-gnu/bits/math-vector.h @@ -60,4 +60,4 @@ # define __DECL_SIMD_powf __DECL_SIMD_x86_64 # endif -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/mman.h b/libc/include/i386-linux-gnu/bits/mman.h similarity index 97% rename from libc/glibc-include/bits/mman.h rename to libc/include/i386-linux-gnu/bits/mman.h index 41951c1d03..90f3588b6e 100644 --- a/libc/glibc-include/bits/mman.h +++ b/libc/include/i386-linux-gnu/bits/mman.h @@ -31,4 +31,4 @@ #include /* Include generic Linux declarations. */ -#include +#include \ No newline at end of file diff --git a/libc/glibc-include/bits/procfs-id.h b/libc/include/i386-linux-gnu/bits/procfs-id.h similarity index 99% rename from libc/glibc-include/bits/procfs-id.h rename to libc/include/i386-linux-gnu/bits/procfs-id.h index d9ac0f87bc..79f85bfd44 100644 --- a/libc/glibc-include/bits/procfs-id.h +++ b/libc/include/i386-linux-gnu/bits/procfs-id.h @@ -27,4 +27,4 @@ typedef unsigned short int __pr_gid_t; #else typedef unsigned int __pr_uid_t; typedef unsigned int __pr_gid_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/procfs.h b/libc/include/i386-linux-gnu/bits/procfs.h similarity index 95% rename from libc/glibc-include/bits/procfs.h rename to libc/include/i386-linux-gnu/bits/procfs.h index b57bf8fd25..ea3cbfe1be 100644 --- a/libc/glibc-include/bits/procfs.h +++ b/libc/include/i386-linux-gnu/bits/procfs.h @@ -31,7 +31,7 @@ typedef unsigned long elf_greg_t; user_regs_struct' directly in the typedef, but tradition says that the register set is an array, which does have some peculiar semantics, so leave it that way. */ -#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) +#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t)) typedef elf_greg_t elf_gregset_t[ELF_NGREG]; #ifndef __x86_64__ @@ -47,4 +47,4 @@ typedef struct user_fpxregs_struct elf_fpxregset_t; the Pentium III SSE registers in addition to the classic floating-point stuff. */ typedef struct user_fpregs_struct elf_fpregset_t; -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/pthreadtypes-arch.h b/libc/include/i386-linux-gnu/bits/pthreadtypes-arch.h similarity index 98% rename from libc/glibc-include/bits/pthreadtypes-arch.h rename to libc/include/i386-linux-gnu/bits/pthreadtypes-arch.h index 4eac75bcc1..7c5701b0b8 100644 --- a/libc/glibc-include/bits/pthreadtypes-arch.h +++ b/libc/include/i386-linux-gnu/bits/pthreadtypes-arch.h @@ -103,4 +103,4 @@ struct __pthread_rwlock_arch_t # define __cleanup_fct_attribute __attribute__ ((__regparm__ (1))) #endif -#endif /* bits/pthreadtypes.h */ +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/select.h b/libc/include/i386-linux-gnu/bits/select.h similarity index 97% rename from libc/glibc-include/bits/select.h rename to libc/include/i386-linux-gnu/bits/select.h index 1da802af06..24d5067c62 100644 --- a/libc/glibc-include/bits/select.h +++ b/libc/include/i386-linux-gnu/bits/select.h @@ -60,4 +60,4 @@ #define __FD_CLR(d, set) \ ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d))) #define __FD_ISSET(d, set) \ - ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0) + ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0) \ No newline at end of file diff --git a/libc/glibc-include/bits/sem-pad.h b/libc/include/i386-linux-gnu/bits/sem-pad.h similarity index 96% rename from libc/glibc-include/bits/sem-pad.h rename to libc/include/i386-linux-gnu/bits/sem-pad.h index b694b9e573..bd8df25ace 100644 --- a/libc/glibc-include/bits/sem-pad.h +++ b/libc/include/i386-linux-gnu/bits/sem-pad.h @@ -21,4 +21,4 @@ #endif #define __SEM_PAD_AFTER_TIME 1 -#define __SEM_PAD_BEFORE_TIME 0 +#define __SEM_PAD_BEFORE_TIME 0 \ No newline at end of file diff --git a/libc/glibc-include/bits/semaphore.h b/libc/include/i386-linux-gnu/bits/semaphore.h similarity index 99% rename from libc/glibc-include/bits/semaphore.h rename to libc/include/i386-linux-gnu/bits/semaphore.h index dea739f452..c5733e31f4 100644 --- a/libc/glibc-include/bits/semaphore.h +++ b/libc/include/i386-linux-gnu/bits/semaphore.h @@ -37,4 +37,4 @@ typedef union { char __size[__SIZEOF_SEM_T]; long int __align; -} sem_t; +} sem_t; \ No newline at end of file diff --git a/libc/glibc-include/bits/setjmp.h b/libc/include/i386-linux-gnu/bits/setjmp.h similarity index 97% rename from libc/glibc-include/bits/setjmp.h rename to libc/include/i386-linux-gnu/bits/setjmp.h index bb0af2aac1..aec176f8d2 100644 --- a/libc/glibc-include/bits/setjmp.h +++ b/libc/include/i386-linux-gnu/bits/setjmp.h @@ -37,4 +37,4 @@ typedef int __jmp_buf[6]; #endif -#endif /* bits/setjmp.h */ +#endif /* bits/setjmp.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/sigcontext.h b/libc/include/i386-linux-gnu/bits/sigcontext.h similarity index 97% rename from libc/glibc-include/bits/sigcontext.h rename to libc/include/i386-linux-gnu/bits/sigcontext.h index f31c8a1e37..481a8a7bb5 100644 --- a/libc/glibc-include/bits/sigcontext.h +++ b/libc/include/i386-linux-gnu/bits/sigcontext.h @@ -26,7 +26,7 @@ #define FP_XSTATE_MAGIC1 0x46505853U #define FP_XSTATE_MAGIC2 0x46505845U -#define FP_XSTATE_MAGIC2_SIZE sizeof(FP_XSTATE_MAGIC2) +#define FP_XSTATE_MAGIC2_SIZE sizeof (FP_XSTATE_MAGIC2) struct _fpx_sw_bytes { @@ -193,4 +193,4 @@ struct _xstate struct _ymmh_state ymmh; }; -#endif /* _BITS_SIGCONTEXT_H */ +#endif /* _BITS_SIGCONTEXT_H */ \ No newline at end of file diff --git a/libc/glibc-include/bits/siginfo-arch.h b/libc/include/i386-linux-gnu/bits/siginfo-arch.h similarity index 99% rename from libc/glibc-include/bits/siginfo-arch.h rename to libc/include/i386-linux-gnu/bits/siginfo-arch.h index 7688a8d66d..0f430f0772 100644 --- a/libc/glibc-include/bits/siginfo-arch.h +++ b/libc/include/i386-linux-gnu/bits/siginfo-arch.h @@ -14,4 +14,4 @@ typedef __clock_t __attribute__ ((__aligned__ (4))) __sigchld_clock_t; # define __SI_CLOCK_T __sigchld_clock_t #endif -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/stat.h b/libc/include/i386-linux-gnu/bits/stat.h similarity index 99% rename from libc/glibc-include/bits/stat.h rename to libc/include/i386-linux-gnu/bits/stat.h index d074b15237..ee7f88c463 100644 --- a/libc/glibc-include/bits/stat.h +++ b/libc/include/i386-linux-gnu/bits/stat.h @@ -207,4 +207,4 @@ struct stat64 # define UTIME_OMIT ((1l << 30) - 2l) #endif -#endif /* bits/stat.h */ +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/sysctl.h b/libc/include/i386-linux-gnu/bits/sysctl.h similarity index 99% rename from libc/glibc-include/bits/sysctl.h rename to libc/include/i386-linux-gnu/bits/sysctl.h index 318c073de1..6b29199909 100644 --- a/libc/glibc-include/bits/sysctl.h +++ b/libc/include/i386-linux-gnu/bits/sysctl.h @@ -17,4 +17,4 @@ #if defined __x86_64__ && defined __ILP32__ # error "sysctl system call is unsupported in x32 kernel" -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/timesize.h b/libc/include/i386-linux-gnu/bits/timesize.h similarity index 99% rename from libc/glibc-include/bits/timesize.h rename to libc/include/i386-linux-gnu/bits/timesize.h index 81ca67f9bb..48fb555234 100644 --- a/libc/glibc-include/bits/timesize.h +++ b/libc/include/i386-linux-gnu/bits/timesize.h @@ -22,4 +22,4 @@ #else /* For others, time size is word size. */ # define __TIMESIZE __WORDSIZE -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/typesizes.h b/libc/include/i386-linux-gnu/bits/typesizes.h similarity index 99% rename from libc/glibc-include/bits/typesizes.h rename to libc/include/i386-linux-gnu/bits/typesizes.h index 18d2c63b0a..7c14f5d7f8 100644 --- a/libc/glibc-include/bits/typesizes.h +++ b/libc/include/i386-linux-gnu/bits/typesizes.h @@ -92,4 +92,4 @@ #define __FD_SETSIZE 1024 -#endif /* bits/typesizes.h */ +#endif /* bits/typesizes.h */ \ No newline at end of file diff --git a/libc/glibc-include/bits/wordsize.h b/libc/include/i386-linux-gnu/bits/wordsize.h similarity index 98% rename from libc/glibc-include/bits/wordsize.h rename to libc/include/i386-linux-gnu/bits/wordsize.h index 70f652bca1..0bf84a4e99 100644 --- a/libc/glibc-include/bits/wordsize.h +++ b/libc/include/i386-linux-gnu/bits/wordsize.h @@ -14,4 +14,4 @@ # define __SYSCALL_WORDSIZE 64 #else # define __WORDSIZE_TIME64_COMPAT32 0 -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/bits/xtitypes.h b/libc/include/i386-linux-gnu/bits/xtitypes.h similarity index 97% rename from libc/glibc-include/bits/xtitypes.h rename to libc/include/i386-linux-gnu/bits/xtitypes.h index 4d045415a8..1eb0c84d8f 100644 --- a/libc/glibc-include/bits/xtitypes.h +++ b/libc/include/i386-linux-gnu/bits/xtitypes.h @@ -30,4 +30,4 @@ typedef __SLONG32_TYPE __t_scalar_t; typedef __ULONG32_TYPE __t_uscalar_t; -#endif /* bits/xtitypes.h */ +#endif /* bits/xtitypes.h */ \ No newline at end of file diff --git a/libc/glibc-include/fpu_control.h b/libc/include/i386-linux-gnu/fpu_control.h similarity index 99% rename from libc/glibc-include/fpu_control.h rename to libc/include/i386-linux-gnu/fpu_control.h index c9444b7677..1c06450778 100644 --- a/libc/glibc-include/fpu_control.h +++ b/libc/include/i386-linux-gnu/fpu_control.h @@ -106,4 +106,4 @@ typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__))); /* Default control word set at startup. */ extern fpu_control_t __fpu_control; -#endif /* fpu_control.h */ +#endif /* fpu_control.h */ \ No newline at end of file diff --git a/libc/glibc-include/gnu/lib-names.h b/libc/include/i386-linux-gnu/gnu/lib-names.h similarity index 93% rename from libc/glibc-include/gnu/lib-names.h rename to libc/include/i386-linux-gnu/gnu/lib-names.h index 479db166a5..aafc03bf7e 100644 --- a/libc/glibc-include/gnu/lib-names.h +++ b/libc/include/i386-linux-gnu/gnu/lib-names.h @@ -14,4 +14,4 @@ # include #endif -#endif /* gnu/lib-names.h */ +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/glibc-include/gnu/stubs.h b/libc/include/i386-linux-gnu/gnu/stubs.h similarity index 98% rename from libc/glibc-include/gnu/stubs.h rename to libc/include/i386-linux-gnu/gnu/stubs.h index 70a1ba0173..a4c9b5f097 100644 --- a/libc/glibc-include/gnu/stubs.h +++ b/libc/include/i386-linux-gnu/gnu/stubs.h @@ -11,4 +11,4 @@ #endif #if defined __x86_64__ && defined __ILP32__ # include -#endif +#endif \ No newline at end of file diff --git a/libc/glibc-include/sys/elf.h b/libc/include/i386-linux-gnu/sys/elf.h similarity index 97% rename from libc/glibc-include/sys/elf.h rename to libc/include/i386-linux-gnu/sys/elf.h index 0e876daa3b..d8c2c7acc8 100644 --- a/libc/glibc-include/sys/elf.h +++ b/libc/include/i386-linux-gnu/sys/elf.h @@ -26,4 +26,4 @@ # include #endif -#endif /* _SYS_ELF_H */ +#endif /* _SYS_ELF_H */ \ No newline at end of file diff --git a/libc/glibc-include/sys/io.h b/libc/include/i386-linux-gnu/sys/io.h similarity index 99% rename from libc/glibc-include/sys/io.h rename to libc/include/i386-linux-gnu/sys/io.h index d61e3b48fc..c27e96f4af 100644 --- a/libc/glibc-include/sys/io.h +++ b/libc/include/i386-linux-gnu/sys/io.h @@ -180,4 +180,4 @@ outsl (unsigned short int __port, const void *__addr, #endif /* GNU C */ __END_DECLS -#endif /* _SYS_IO_H */ +#endif /* _SYS_IO_H */ \ No newline at end of file diff --git a/libc/glibc-include/sys/ptrace.h b/libc/include/i386-linux-gnu/sys/ptrace.h similarity index 99% rename from libc/glibc-include/sys/ptrace.h rename to libc/include/i386-linux-gnu/sys/ptrace.h index 1797d4b235..1f6c5b50fd 100644 --- a/libc/glibc-include/sys/ptrace.h +++ b/libc/include/i386-linux-gnu/sys/ptrace.h @@ -195,4 +195,4 @@ enum __ptrace_request __END_DECLS -#endif /* _SYS_PTRACE_H */ +#endif /* _SYS_PTRACE_H */ \ No newline at end of file diff --git a/libc/glibc-include/sys/ucontext.h b/libc/include/i386-linux-gnu/sys/ucontext.h similarity index 99% rename from libc/glibc-include/sys/ucontext.h rename to libc/include/i386-linux-gnu/sys/ucontext.h index 3d883c2bf1..2127a222a9 100644 --- a/libc/glibc-include/sys/ucontext.h +++ b/libc/include/i386-linux-gnu/sys/ucontext.h @@ -259,4 +259,4 @@ typedef struct ucontext_t #undef __ctx -#endif /* sys/ucontext.h */ +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/glibc-include/sys/user.h b/libc/include/i386-linux-gnu/sys/user.h similarity index 99% rename from libc/glibc-include/sys/user.h rename to libc/include/i386-linux-gnu/sys/user.h index b462a00e57..74bd6e393a 100644 --- a/libc/glibc-include/sys/user.h +++ b/libc/include/i386-linux-gnu/sys/user.h @@ -177,4 +177,4 @@ struct user #define HOST_TEXT_START_ADDR (u.start_code) #define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) -#endif /* _SYS_USER_H */ +#endif /* _SYS_USER_H */ \ No newline at end of file diff --git a/libc/glibc/sysdeps/unix/sysv/linux/mips/asm/sgidefs.h b/libc/include/mips-linux-gnu/asm/sgidefs.h similarity index 100% rename from libc/glibc/sysdeps/unix/sysv/linux/mips/asm/sgidefs.h rename to libc/include/mips-linux-gnu/asm/sgidefs.h diff --git a/libc/glibc/sysdeps/unix/sysv/linux/mips/asm/unistd.h b/libc/include/mips-linux-gnu/asm/unistd.h similarity index 100% rename from libc/glibc/sysdeps/unix/sysv/linux/mips/asm/unistd.h rename to libc/include/mips-linux-gnu/asm/unistd.h diff --git a/libc/include/mips-linux-gnu/bits/dlfcn.h b/libc/include/mips-linux-gnu/bits/dlfcn.h new file mode 100644 index 0000000000..996be6f45b --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/dlfcn.h @@ -0,0 +1,64 @@ +/* System dependent definitions for run-time dynamic loading. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/errno.h b/libc/include/mips-linux-gnu/bits/errno.h new file mode 100644 index 0000000000..2d6069ad8a --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/errno.h @@ -0,0 +1,52 @@ +/* Error constants. MIPS/Linux specific version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/eventfd.h b/libc/include/mips-linux-gnu/bits/eventfd.h new file mode 100644 index 0000000000..9ff48c23fb --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/eventfd.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2007-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/inotify.h b/libc/include/mips-linux-gnu/bits/inotify.h new file mode 100644 index 0000000000..d063466c30 --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/inotify.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/ioctl-types.h b/libc/include/mips-linux-gnu/bits/ioctl-types.h new file mode 100644 index 0000000000..bfbdac6f57 --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/ioctl-types.h @@ -0,0 +1,75 @@ +/* Structure types for pre-termios terminal ioctls. Linux/MIPS version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/ipc.h b/libc/include/mips-linux-gnu/bits/ipc.h new file mode 100644 index 0000000000..e994ffc9ad --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/ipc.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IPC_H +# error "Never use directly; include instead." +#endif + +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#ifdef __USE_GNU +# define IPC_INFO 3 /* See ipcs. */ +#endif + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + unsigned int uid; /* Owner's user ID. */ + unsigned int gid; /* Owner's group ID. */ + unsigned int cuid; /* Creator's user ID. */ + unsigned int cgid; /* Creator's group ID. */ + unsigned int mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ + unsigned short int __pad1; + unsigned long int __glibc_reserved1; + unsigned long int __glibc_reserved2; +}; \ No newline at end of file diff --git a/libc/include/mips-linux-gnu/bits/ipctypes.h b/libc/include/mips-linux-gnu/bits/ipctypes.h new file mode 100644 index 0000000000..ffea8d325c --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/ipctypes.h @@ -0,0 +1,31 @@ +/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* + * Never include directly. + */ + +#ifndef _BITS_IPCTYPES_H +#define _BITS_IPCTYPES_H 1 + +#include + +typedef __SLONG32_TYPE __ipc_pid_t; + + +#endif /* bits/ipctypes.h */ \ No newline at end of file diff --git a/libc/include/mips-linux-gnu/bits/local_lim.h b/libc/include/mips-linux-gnu/bits/local_lim.h new file mode 100644 index 0000000000..96b65eb686 --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/local_lim.h @@ -0,0 +1,99 @@ +/* Minimum guaranteed maximum values for system limits. MIPS Linux version. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. At least two pages with 64k pages. */ +#define PTHREAD_STACK_MIN 131072 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) \ No newline at end of file diff --git a/libc/include/mips-linux-gnu/bits/mman.h b/libc/include/mips-linux-gnu/bits/mman.h new file mode 100644 index 0000000000..43c768ab5e --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/mman.h @@ -0,0 +1,48 @@ +/* Definitions for POSIX memory map interface. Linux/MIPS version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/msq-pad.h b/libc/include/mips-linux-gnu/bits/msq-pad.h new file mode 100644 index 0000000000..2cde6ddf34 --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/msq-pad.h @@ -0,0 +1,31 @@ +/* Define where padding goes in struct msqid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include + +#ifdef __MIPSEL__ +# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32) +# define __MSQ_PAD_BEFORE_TIME 0 +#else +# define __MSQ_PAD_AFTER_TIME 0 +# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) +#endif \ No newline at end of file diff --git a/libc/include/mips-linux-gnu/bits/poll.h b/libc/include/mips-linux-gnu/bits/poll.h new file mode 100644 index 0000000000..7793460007 --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/poll.h @@ -0,0 +1,49 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/resource.h b/libc/include/mips-linux-gnu/bits/resource.h new file mode 100644 index 0000000000..2f200b1025 --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/resource.h @@ -0,0 +1,231 @@ +/* Bit values & structures for resource limits. Linux/MIPS version. + Copyright (C) 1994-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 µs 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/libc/include/mips-linux-gnu/bits/sem-pad.h b/libc/include/mips-linux-gnu/bits/sem-pad.h new file mode 100644 index 0000000000..b1810b2080 --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/sem-pad.h @@ -0,0 +1,24 @@ +/* Define where padding goes in struct semid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SEM_H +# error "Never use directly; include instead." +#endif + +#define __SEM_PAD_AFTER_TIME 0 +#define __SEM_PAD_BEFORE_TIME 0 \ No newline at end of file diff --git a/libc/include/mips-linux-gnu/bits/shm-pad.h b/libc/include/mips-linux-gnu/bits/shm-pad.h new file mode 100644 index 0000000000..e672c8c7b0 --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/shm-pad.h @@ -0,0 +1,26 @@ +/* Define where padding goes in struct shmid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SHM_H +# error "Never use directly; include instead." +#endif + +#define __SHM_PAD_AFTER_TIME 0 +#define __SHM_PAD_BEFORE_TIME 0 +#define __SHM_SEGSZ_AFTER_TIME 0 +#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 \ No newline at end of file diff --git a/libc/include/mips-linux-gnu/bits/shmlba.h b/libc/include/mips-linux-gnu/bits/shmlba.h new file mode 100644 index 0000000000..9561decd9a --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/shmlba.h @@ -0,0 +1,24 @@ +/* Define SHMLBA. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/sigaction.h b/libc/include/mips-linux-gnu/bits/sigaction.h new file mode 100644 index 0000000000..bbc6004b59 --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/sigaction.h @@ -0,0 +1,94 @@ +/* The proper definitions for Linux/MIPS's sigaction. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/sigcontext.h b/libc/include/mips-linux-gnu/bits/sigcontext.h new file mode 100644 index 0000000000..231695c93f --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/sigcontext.h @@ -0,0 +1,82 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/siginfo-arch.h b/libc/include/mips-linux-gnu/bits/siginfo-arch.h new file mode 100644 index 0000000000..d639ba2076 --- /dev/null +++ b/libc/include/mips-linux-gnu/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/libc/include/mips-linux-gnu/bits/signalfd.h b/libc/include/mips-linux-gnu/bits/signalfd.h new file mode 100644 index 0000000000..a8f5275551 --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/signalfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2007-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/signum.h b/libc/include/mips-linux-gnu/bits/signum.h new file mode 100644 index 0000000000..e3cd97af8b --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/signum.h @@ -0,0 +1,68 @@ +/* Signal number definitions. Linux/MIPS version. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use instead." +#endif + +#include + +/* Adjustments and additions to the signal number constants for + Linux/MIPS. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGPWR 19 /* Power failure imminent. */ + +#undef SIGUSR1 +#define SIGUSR1 16 +#undef SIGUSR2 +#define SIGUSR2 17 +#undef SIGCHLD +#define SIGCHLD 18 +#undef SIGWINCH +#define SIGWINCH 20 +#undef SIGURG +#define SIGURG 21 +#undef SIGPOLL +#define SIGPOLL 22 +#undef SIGSTOP +#define SIGSTOP 23 +#undef SIGTSTP +#define SIGTSTP 24 +#undef SIGCONT +#define SIGCONT 25 +#undef SIGTTIN +#define SIGTTIN 26 +#undef SIGTTOU +#define SIGTTOU 27 +#undef SIGVTALRM +#define SIGVTALRM 28 +#undef SIGPROF +#define SIGPROF 29 +#undef SIGXCPU +#define SIGXCPU 30 +#undef SIGXFSZ +#define SIGXFSZ 31 + +#undef __SIGRTMAX +#define __SIGRTMAX 127 + +#endif /* included. */ \ No newline at end of file diff --git a/libc/include/mips-linux-gnu/bits/socket_type.h b/libc/include/mips-linux-gnu/bits/socket_type.h new file mode 100644 index 0000000000..4c976f179e --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/socket_type.h @@ -0,0 +1,55 @@ +/* Define enum __socket_type for Linux/MIPS. + Copyright (C) 1991-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/statfs.h b/libc/include/mips-linux-gnu/bits/statfs.h new file mode 100644 index 0000000000..fd0f68d6d7 --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/statfs.h @@ -0,0 +1,73 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/termios-c_cc.h b/libc/include/mips-linux-gnu/bits/termios-c_cc.h new file mode 100644 index 0000000000..ed124b8db4 --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/termios-c_cc.h @@ -0,0 +1,43 @@ +/* termios c_cc symbolic constant definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/termios-c_lflag.h b/libc/include/mips-linux-gnu/bits/termios-c_lflag.h new file mode 100644 index 0000000000..e5a6773476 --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/termios-c_lflag.h @@ -0,0 +1,46 @@ +/* termios local mode definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/termios-struct.h b/libc/include/mips-linux-gnu/bits/termios-struct.h new file mode 100644 index 0000000000..0442c6f354 --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/termios-struct.h @@ -0,0 +1,34 @@ +/* struct termios definition. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/termios-tcflow.h b/libc/include/mips-linux-gnu/bits/termios-tcflow.h new file mode 100644 index 0000000000..2c523c3a2a --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/termios-tcflow.h @@ -0,0 +1,26 @@ +/* termios local mode definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/timerfd.h b/libc/include/mips-linux-gnu/bits/timerfd.h new file mode 100644 index 0000000000..005d411617 --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/timerfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2008-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/bits/types/stack_t.h b/libc/include/mips-linux-gnu/bits/types/stack_t.h new file mode 100644 index 0000000000..b62c348140 --- /dev/null +++ b/libc/include/mips-linux-gnu/bits/types/stack_t.h @@ -0,0 +1,33 @@ +/* Define stack_t. MIPS Linux version. + Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips-linux-gnu/ieee754.h b/libc/include/mips-linux-gnu/ieee754.h new file mode 100644 index 0000000000..600dbce3d8 --- /dev/null +++ b/libc/include/mips-linux-gnu/ieee754.h @@ -0,0 +1,323 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#include + +__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/libc/include/mips64-linux-gnuabi64/asm/sgidefs.h b/libc/include/mips64-linux-gnuabi64/asm/sgidefs.h new file mode 100644 index 0000000000..26143e3b7c --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/asm/sgidefs.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1996, 1999, 2001 Ralf Baechle + * Copyright (C) 1999 Silicon Graphics, Inc. + * Copyright (C) 2001 MIPS Technologies, Inc. + */ +#ifndef __ASM_SGIDEFS_H +#define __ASM_SGIDEFS_H + +/* + * Using a Linux compiler for building Linux seems logic but not to + * everybody. + */ +#ifndef __linux__ +#error Use a Linux compiler or give up. +#endif + +/* + * Definitions for the ISA levels + * + * With the introduction of MIPS32 / MIPS64 instruction sets definitions + * MIPS ISAs are no longer subsets of each other. Therefore comparisons + * on these symbols except with == may result in unexpected results and + * are forbidden! + */ +#define _MIPS_ISA_MIPS1 1 +#define _MIPS_ISA_MIPS2 2 +#define _MIPS_ISA_MIPS3 3 +#define _MIPS_ISA_MIPS4 4 +#define _MIPS_ISA_MIPS5 5 +#define _MIPS_ISA_MIPS32 6 +#define _MIPS_ISA_MIPS64 7 + +/* + * Subprogram calling convention + */ +#define _MIPS_SIM_ABI32 1 +#define _MIPS_SIM_NABI32 2 +#define _MIPS_SIM_ABI64 3 + +#endif /* __ASM_SGIDEFS_H */ diff --git a/libc/include/mips64-linux-gnuabi64/asm/unistd.h b/libc/include/mips64-linux-gnuabi64/asm/unistd.h new file mode 100644 index 0000000000..f25dd1d83f --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/asm/unistd.h @@ -0,0 +1,1101 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle + * Copyright (C) 1999, 2000 Silicon Graphics, Inc. + * + * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto + * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A + */ +#ifndef _UAPI_ASM_UNISTD_H +#define _UAPI_ASM_UNISTD_H + +#include + +#if _MIPS_SIM == _MIPS_SIM_ABI32 + +/* + * Linux o32 style syscalls are in the range from 4000 to 4999. + */ +#define __NR_Linux 4000 +#define __NR_syscall (__NR_Linux + 0) +#define __NR_exit (__NR_Linux + 1) +#define __NR_fork (__NR_Linux + 2) +#define __NR_read (__NR_Linux + 3) +#define __NR_write (__NR_Linux + 4) +#define __NR_open (__NR_Linux + 5) +#define __NR_close (__NR_Linux + 6) +#define __NR_waitpid (__NR_Linux + 7) +#define __NR_creat (__NR_Linux + 8) +#define __NR_link (__NR_Linux + 9) +#define __NR_unlink (__NR_Linux + 10) +#define __NR_execve (__NR_Linux + 11) +#define __NR_chdir (__NR_Linux + 12) +#define __NR_time (__NR_Linux + 13) +#define __NR_mknod (__NR_Linux + 14) +#define __NR_chmod (__NR_Linux + 15) +#define __NR_lchown (__NR_Linux + 16) +#define __NR_break (__NR_Linux + 17) +#define __NR_unused18 (__NR_Linux + 18) +#define __NR_lseek (__NR_Linux + 19) +#define __NR_getpid (__NR_Linux + 20) +#define __NR_mount (__NR_Linux + 21) +#define __NR_umount (__NR_Linux + 22) +#define __NR_setuid (__NR_Linux + 23) +#define __NR_getuid (__NR_Linux + 24) +#define __NR_stime (__NR_Linux + 25) +#define __NR_ptrace (__NR_Linux + 26) +#define __NR_alarm (__NR_Linux + 27) +#define __NR_unused28 (__NR_Linux + 28) +#define __NR_pause (__NR_Linux + 29) +#define __NR_utime (__NR_Linux + 30) +#define __NR_stty (__NR_Linux + 31) +#define __NR_gtty (__NR_Linux + 32) +#define __NR_access (__NR_Linux + 33) +#define __NR_nice (__NR_Linux + 34) +#define __NR_ftime (__NR_Linux + 35) +#define __NR_sync (__NR_Linux + 36) +#define __NR_kill (__NR_Linux + 37) +#define __NR_rename (__NR_Linux + 38) +#define __NR_mkdir (__NR_Linux + 39) +#define __NR_rmdir (__NR_Linux + 40) +#define __NR_dup (__NR_Linux + 41) +#define __NR_pipe (__NR_Linux + 42) +#define __NR_times (__NR_Linux + 43) +#define __NR_prof (__NR_Linux + 44) +#define __NR_brk (__NR_Linux + 45) +#define __NR_setgid (__NR_Linux + 46) +#define __NR_getgid (__NR_Linux + 47) +#define __NR_signal (__NR_Linux + 48) +#define __NR_geteuid (__NR_Linux + 49) +#define __NR_getegid (__NR_Linux + 50) +#define __NR_acct (__NR_Linux + 51) +#define __NR_umount2 (__NR_Linux + 52) +#define __NR_lock (__NR_Linux + 53) +#define __NR_ioctl (__NR_Linux + 54) +#define __NR_fcntl (__NR_Linux + 55) +#define __NR_mpx (__NR_Linux + 56) +#define __NR_setpgid (__NR_Linux + 57) +#define __NR_ulimit (__NR_Linux + 58) +#define __NR_unused59 (__NR_Linux + 59) +#define __NR_umask (__NR_Linux + 60) +#define __NR_chroot (__NR_Linux + 61) +#define __NR_ustat (__NR_Linux + 62) +#define __NR_dup2 (__NR_Linux + 63) +#define __NR_getppid (__NR_Linux + 64) +#define __NR_getpgrp (__NR_Linux + 65) +#define __NR_setsid (__NR_Linux + 66) +#define __NR_sigaction (__NR_Linux + 67) +#define __NR_sgetmask (__NR_Linux + 68) +#define __NR_ssetmask (__NR_Linux + 69) +#define __NR_setreuid (__NR_Linux + 70) +#define __NR_setregid (__NR_Linux + 71) +#define __NR_sigsuspend (__NR_Linux + 72) +#define __NR_sigpending (__NR_Linux + 73) +#define __NR_sethostname (__NR_Linux + 74) +#define __NR_setrlimit (__NR_Linux + 75) +#define __NR_getrlimit (__NR_Linux + 76) +#define __NR_getrusage (__NR_Linux + 77) +#define __NR_gettimeofday (__NR_Linux + 78) +#define __NR_settimeofday (__NR_Linux + 79) +#define __NR_getgroups (__NR_Linux + 80) +#define __NR_setgroups (__NR_Linux + 81) +#define __NR_reserved82 (__NR_Linux + 82) +#define __NR_symlink (__NR_Linux + 83) +#define __NR_unused84 (__NR_Linux + 84) +#define __NR_readlink (__NR_Linux + 85) +#define __NR_uselib (__NR_Linux + 86) +#define __NR_swapon (__NR_Linux + 87) +#define __NR_reboot (__NR_Linux + 88) +#define __NR_readdir (__NR_Linux + 89) +#define __NR_mmap (__NR_Linux + 90) +#define __NR_munmap (__NR_Linux + 91) +#define __NR_truncate (__NR_Linux + 92) +#define __NR_ftruncate (__NR_Linux + 93) +#define __NR_fchmod (__NR_Linux + 94) +#define __NR_fchown (__NR_Linux + 95) +#define __NR_getpriority (__NR_Linux + 96) +#define __NR_setpriority (__NR_Linux + 97) +#define __NR_profil (__NR_Linux + 98) +#define __NR_statfs (__NR_Linux + 99) +#define __NR_fstatfs (__NR_Linux + 100) +#define __NR_ioperm (__NR_Linux + 101) +#define __NR_socketcall (__NR_Linux + 102) +#define __NR_syslog (__NR_Linux + 103) +#define __NR_setitimer (__NR_Linux + 104) +#define __NR_getitimer (__NR_Linux + 105) +#define __NR_stat (__NR_Linux + 106) +#define __NR_lstat (__NR_Linux + 107) +#define __NR_fstat (__NR_Linux + 108) +#define __NR_unused109 (__NR_Linux + 109) +#define __NR_iopl (__NR_Linux + 110) +#define __NR_vhangup (__NR_Linux + 111) +#define __NR_idle (__NR_Linux + 112) +#define __NR_vm86 (__NR_Linux + 113) +#define __NR_wait4 (__NR_Linux + 114) +#define __NR_swapoff (__NR_Linux + 115) +#define __NR_sysinfo (__NR_Linux + 116) +#define __NR_ipc (__NR_Linux + 117) +#define __NR_fsync (__NR_Linux + 118) +#define __NR_sigreturn (__NR_Linux + 119) +#define __NR_clone (__NR_Linux + 120) +#define __NR_setdomainname (__NR_Linux + 121) +#define __NR_uname (__NR_Linux + 122) +#define __NR_modify_ldt (__NR_Linux + 123) +#define __NR_adjtimex (__NR_Linux + 124) +#define __NR_mprotect (__NR_Linux + 125) +#define __NR_sigprocmask (__NR_Linux + 126) +#define __NR_create_module (__NR_Linux + 127) +#define __NR_init_module (__NR_Linux + 128) +#define __NR_delete_module (__NR_Linux + 129) +#define __NR_get_kernel_syms (__NR_Linux + 130) +#define __NR_quotactl (__NR_Linux + 131) +#define __NR_getpgid (__NR_Linux + 132) +#define __NR_fchdir (__NR_Linux + 133) +#define __NR_bdflush (__NR_Linux + 134) +#define __NR_sysfs (__NR_Linux + 135) +#define __NR_personality (__NR_Linux + 136) +#define __NR_afs_syscall (__NR_Linux + 137) /* Syscall for Andrew File System */ +#define __NR_setfsuid (__NR_Linux + 138) +#define __NR_setfsgid (__NR_Linux + 139) +#define __NR__llseek (__NR_Linux + 140) +#define __NR_getdents (__NR_Linux + 141) +#define __NR__newselect (__NR_Linux + 142) +#define __NR_flock (__NR_Linux + 143) +#define __NR_msync (__NR_Linux + 144) +#define __NR_readv (__NR_Linux + 145) +#define __NR_writev (__NR_Linux + 146) +#define __NR_cacheflush (__NR_Linux + 147) +#define __NR_cachectl (__NR_Linux + 148) +#define __NR_sysmips (__NR_Linux + 149) +#define __NR_unused150 (__NR_Linux + 150) +#define __NR_getsid (__NR_Linux + 151) +#define __NR_fdatasync (__NR_Linux + 152) +#define __NR__sysctl (__NR_Linux + 153) +#define __NR_mlock (__NR_Linux + 154) +#define __NR_munlock (__NR_Linux + 155) +#define __NR_mlockall (__NR_Linux + 156) +#define __NR_munlockall (__NR_Linux + 157) +#define __NR_sched_setparam (__NR_Linux + 158) +#define __NR_sched_getparam (__NR_Linux + 159) +#define __NR_sched_setscheduler (__NR_Linux + 160) +#define __NR_sched_getscheduler (__NR_Linux + 161) +#define __NR_sched_yield (__NR_Linux + 162) +#define __NR_sched_get_priority_max (__NR_Linux + 163) +#define __NR_sched_get_priority_min (__NR_Linux + 164) +#define __NR_sched_rr_get_interval (__NR_Linux + 165) +#define __NR_nanosleep (__NR_Linux + 166) +#define __NR_mremap (__NR_Linux + 167) +#define __NR_accept (__NR_Linux + 168) +#define __NR_bind (__NR_Linux + 169) +#define __NR_connect (__NR_Linux + 170) +#define __NR_getpeername (__NR_Linux + 171) +#define __NR_getsockname (__NR_Linux + 172) +#define __NR_getsockopt (__NR_Linux + 173) +#define __NR_listen (__NR_Linux + 174) +#define __NR_recv (__NR_Linux + 175) +#define __NR_recvfrom (__NR_Linux + 176) +#define __NR_recvmsg (__NR_Linux + 177) +#define __NR_send (__NR_Linux + 178) +#define __NR_sendmsg (__NR_Linux + 179) +#define __NR_sendto (__NR_Linux + 180) +#define __NR_setsockopt (__NR_Linux + 181) +#define __NR_shutdown (__NR_Linux + 182) +#define __NR_socket (__NR_Linux + 183) +#define __NR_socketpair (__NR_Linux + 184) +#define __NR_setresuid (__NR_Linux + 185) +#define __NR_getresuid (__NR_Linux + 186) +#define __NR_query_module (__NR_Linux + 187) +#define __NR_poll (__NR_Linux + 188) +#define __NR_nfsservctl (__NR_Linux + 189) +#define __NR_setresgid (__NR_Linux + 190) +#define __NR_getresgid (__NR_Linux + 191) +#define __NR_prctl (__NR_Linux + 192) +#define __NR_rt_sigreturn (__NR_Linux + 193) +#define __NR_rt_sigaction (__NR_Linux + 194) +#define __NR_rt_sigprocmask (__NR_Linux + 195) +#define __NR_rt_sigpending (__NR_Linux + 196) +#define __NR_rt_sigtimedwait (__NR_Linux + 197) +#define __NR_rt_sigqueueinfo (__NR_Linux + 198) +#define __NR_rt_sigsuspend (__NR_Linux + 199) +#define __NR_pread64 (__NR_Linux + 200) +#define __NR_pwrite64 (__NR_Linux + 201) +#define __NR_chown (__NR_Linux + 202) +#define __NR_getcwd (__NR_Linux + 203) +#define __NR_capget (__NR_Linux + 204) +#define __NR_capset (__NR_Linux + 205) +#define __NR_sigaltstack (__NR_Linux + 206) +#define __NR_sendfile (__NR_Linux + 207) +#define __NR_getpmsg (__NR_Linux + 208) +#define __NR_putpmsg (__NR_Linux + 209) +#define __NR_mmap2 (__NR_Linux + 210) +#define __NR_truncate64 (__NR_Linux + 211) +#define __NR_ftruncate64 (__NR_Linux + 212) +#define __NR_stat64 (__NR_Linux + 213) +#define __NR_lstat64 (__NR_Linux + 214) +#define __NR_fstat64 (__NR_Linux + 215) +#define __NR_pivot_root (__NR_Linux + 216) +#define __NR_mincore (__NR_Linux + 217) +#define __NR_madvise (__NR_Linux + 218) +#define __NR_getdents64 (__NR_Linux + 219) +#define __NR_fcntl64 (__NR_Linux + 220) +#define __NR_reserved221 (__NR_Linux + 221) +#define __NR_gettid (__NR_Linux + 222) +#define __NR_readahead (__NR_Linux + 223) +#define __NR_setxattr (__NR_Linux + 224) +#define __NR_lsetxattr (__NR_Linux + 225) +#define __NR_fsetxattr (__NR_Linux + 226) +#define __NR_getxattr (__NR_Linux + 227) +#define __NR_lgetxattr (__NR_Linux + 228) +#define __NR_fgetxattr (__NR_Linux + 229) +#define __NR_listxattr (__NR_Linux + 230) +#define __NR_llistxattr (__NR_Linux + 231) +#define __NR_flistxattr (__NR_Linux + 232) +#define __NR_removexattr (__NR_Linux + 233) +#define __NR_lremovexattr (__NR_Linux + 234) +#define __NR_fremovexattr (__NR_Linux + 235) +#define __NR_tkill (__NR_Linux + 236) +#define __NR_sendfile64 (__NR_Linux + 237) +#define __NR_futex (__NR_Linux + 238) +#define __NR_sched_setaffinity (__NR_Linux + 239) +#define __NR_sched_getaffinity (__NR_Linux + 240) +#define __NR_io_setup (__NR_Linux + 241) +#define __NR_io_destroy (__NR_Linux + 242) +#define __NR_io_getevents (__NR_Linux + 243) +#define __NR_io_submit (__NR_Linux + 244) +#define __NR_io_cancel (__NR_Linux + 245) +#define __NR_exit_group (__NR_Linux + 246) +#define __NR_lookup_dcookie (__NR_Linux + 247) +#define __NR_epoll_create (__NR_Linux + 248) +#define __NR_epoll_ctl (__NR_Linux + 249) +#define __NR_epoll_wait (__NR_Linux + 250) +#define __NR_remap_file_pages (__NR_Linux + 251) +#define __NR_set_tid_address (__NR_Linux + 252) +#define __NR_restart_syscall (__NR_Linux + 253) +#define __NR_fadvise64 (__NR_Linux + 254) +#define __NR_statfs64 (__NR_Linux + 255) +#define __NR_fstatfs64 (__NR_Linux + 256) +#define __NR_timer_create (__NR_Linux + 257) +#define __NR_timer_settime (__NR_Linux + 258) +#define __NR_timer_gettime (__NR_Linux + 259) +#define __NR_timer_getoverrun (__NR_Linux + 260) +#define __NR_timer_delete (__NR_Linux + 261) +#define __NR_clock_settime (__NR_Linux + 262) +#define __NR_clock_gettime (__NR_Linux + 263) +#define __NR_clock_getres (__NR_Linux + 264) +#define __NR_clock_nanosleep (__NR_Linux + 265) +#define __NR_tgkill (__NR_Linux + 266) +#define __NR_utimes (__NR_Linux + 267) +#define __NR_mbind (__NR_Linux + 268) +#define __NR_get_mempolicy (__NR_Linux + 269) +#define __NR_set_mempolicy (__NR_Linux + 270) +#define __NR_mq_open (__NR_Linux + 271) +#define __NR_mq_unlink (__NR_Linux + 272) +#define __NR_mq_timedsend (__NR_Linux + 273) +#define __NR_mq_timedreceive (__NR_Linux + 274) +#define __NR_mq_notify (__NR_Linux + 275) +#define __NR_mq_getsetattr (__NR_Linux + 276) +#define __NR_vserver (__NR_Linux + 277) +#define __NR_waitid (__NR_Linux + 278) +/* #define __NR_sys_setaltroot (__NR_Linux + 279) */ +#define __NR_add_key (__NR_Linux + 280) +#define __NR_request_key (__NR_Linux + 281) +#define __NR_keyctl (__NR_Linux + 282) +#define __NR_set_thread_area (__NR_Linux + 283) +#define __NR_inotify_init (__NR_Linux + 284) +#define __NR_inotify_add_watch (__NR_Linux + 285) +#define __NR_inotify_rm_watch (__NR_Linux + 286) +#define __NR_migrate_pages (__NR_Linux + 287) +#define __NR_openat (__NR_Linux + 288) +#define __NR_mkdirat (__NR_Linux + 289) +#define __NR_mknodat (__NR_Linux + 290) +#define __NR_fchownat (__NR_Linux + 291) +#define __NR_futimesat (__NR_Linux + 292) +#define __NR_fstatat64 (__NR_Linux + 293) +#define __NR_unlinkat (__NR_Linux + 294) +#define __NR_renameat (__NR_Linux + 295) +#define __NR_linkat (__NR_Linux + 296) +#define __NR_symlinkat (__NR_Linux + 297) +#define __NR_readlinkat (__NR_Linux + 298) +#define __NR_fchmodat (__NR_Linux + 299) +#define __NR_faccessat (__NR_Linux + 300) +#define __NR_pselect6 (__NR_Linux + 301) +#define __NR_ppoll (__NR_Linux + 302) +#define __NR_unshare (__NR_Linux + 303) +#define __NR_splice (__NR_Linux + 304) +#define __NR_sync_file_range (__NR_Linux + 305) +#define __NR_tee (__NR_Linux + 306) +#define __NR_vmsplice (__NR_Linux + 307) +#define __NR_move_pages (__NR_Linux + 308) +#define __NR_set_robust_list (__NR_Linux + 309) +#define __NR_get_robust_list (__NR_Linux + 310) +#define __NR_kexec_load (__NR_Linux + 311) +#define __NR_getcpu (__NR_Linux + 312) +#define __NR_epoll_pwait (__NR_Linux + 313) +#define __NR_ioprio_set (__NR_Linux + 314) +#define __NR_ioprio_get (__NR_Linux + 315) +#define __NR_utimensat (__NR_Linux + 316) +#define __NR_signalfd (__NR_Linux + 317) +#define __NR_timerfd (__NR_Linux + 318) +#define __NR_eventfd (__NR_Linux + 319) +#define __NR_fallocate (__NR_Linux + 320) +#define __NR_timerfd_create (__NR_Linux + 321) +#define __NR_timerfd_gettime (__NR_Linux + 322) +#define __NR_timerfd_settime (__NR_Linux + 323) +#define __NR_signalfd4 (__NR_Linux + 324) +#define __NR_eventfd2 (__NR_Linux + 325) +#define __NR_epoll_create1 (__NR_Linux + 326) +#define __NR_dup3 (__NR_Linux + 327) +#define __NR_pipe2 (__NR_Linux + 328) +#define __NR_inotify_init1 (__NR_Linux + 329) +#define __NR_preadv (__NR_Linux + 330) +#define __NR_pwritev (__NR_Linux + 331) +#define __NR_rt_tgsigqueueinfo (__NR_Linux + 332) +#define __NR_perf_event_open (__NR_Linux + 333) +#define __NR_accept4 (__NR_Linux + 334) +#define __NR_recvmmsg (__NR_Linux + 335) +#define __NR_fanotify_init (__NR_Linux + 336) +#define __NR_fanotify_mark (__NR_Linux + 337) +#define __NR_prlimit64 (__NR_Linux + 338) +#define __NR_name_to_handle_at (__NR_Linux + 339) +#define __NR_open_by_handle_at (__NR_Linux + 340) +#define __NR_clock_adjtime (__NR_Linux + 341) +#define __NR_syncfs (__NR_Linux + 342) +#define __NR_sendmmsg (__NR_Linux + 343) +#define __NR_setns (__NR_Linux + 344) +#define __NR_process_vm_readv (__NR_Linux + 345) +#define __NR_process_vm_writev (__NR_Linux + 346) +#define __NR_kcmp (__NR_Linux + 347) +#define __NR_finit_module (__NR_Linux + 348) +#define __NR_sched_setattr (__NR_Linux + 349) +#define __NR_sched_getattr (__NR_Linux + 350) +#define __NR_renameat2 (__NR_Linux + 351) +#define __NR_seccomp (__NR_Linux + 352) +#define __NR_getrandom (__NR_Linux + 353) +#define __NR_memfd_create (__NR_Linux + 354) +#define __NR_bpf (__NR_Linux + 355) +#define __NR_execveat (__NR_Linux + 356) +#define __NR_userfaultfd (__NR_Linux + 357) +#define __NR_membarrier (__NR_Linux + 358) +#define __NR_mlock2 (__NR_Linux + 359) +#define __NR_copy_file_range (__NR_Linux + 360) +#define __NR_preadv2 (__NR_Linux + 361) +#define __NR_pwritev2 (__NR_Linux + 362) +#define __NR_pkey_mprotect (__NR_Linux + 363) +#define __NR_pkey_alloc (__NR_Linux + 364) +#define __NR_pkey_free (__NR_Linux + 365) +#define __NR_statx (__NR_Linux + 366) +#define __NR_rseq (__NR_Linux + 367) +#define __NR_io_pgetevents (__NR_Linux + 368) + + +/* + * Offset of the last Linux o32 flavoured syscall + */ +#define __NR_Linux_syscalls 368 + +#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ + +#define __NR_O32_Linux 4000 +#define __NR_O32_Linux_syscalls 368 + +#if _MIPS_SIM == _MIPS_SIM_ABI64 + +/* + * Linux 64-bit syscalls are in the range from 5000 to 5999. + */ +#define __NR_Linux 5000 +#define __NR_read (__NR_Linux + 0) +#define __NR_write (__NR_Linux + 1) +#define __NR_open (__NR_Linux + 2) +#define __NR_close (__NR_Linux + 3) +#define __NR_stat (__NR_Linux + 4) +#define __NR_fstat (__NR_Linux + 5) +#define __NR_lstat (__NR_Linux + 6) +#define __NR_poll (__NR_Linux + 7) +#define __NR_lseek (__NR_Linux + 8) +#define __NR_mmap (__NR_Linux + 9) +#define __NR_mprotect (__NR_Linux + 10) +#define __NR_munmap (__NR_Linux + 11) +#define __NR_brk (__NR_Linux + 12) +#define __NR_rt_sigaction (__NR_Linux + 13) +#define __NR_rt_sigprocmask (__NR_Linux + 14) +#define __NR_ioctl (__NR_Linux + 15) +#define __NR_pread64 (__NR_Linux + 16) +#define __NR_pwrite64 (__NR_Linux + 17) +#define __NR_readv (__NR_Linux + 18) +#define __NR_writev (__NR_Linux + 19) +#define __NR_access (__NR_Linux + 20) +#define __NR_pipe (__NR_Linux + 21) +#define __NR__newselect (__NR_Linux + 22) +#define __NR_sched_yield (__NR_Linux + 23) +#define __NR_mremap (__NR_Linux + 24) +#define __NR_msync (__NR_Linux + 25) +#define __NR_mincore (__NR_Linux + 26) +#define __NR_madvise (__NR_Linux + 27) +#define __NR_shmget (__NR_Linux + 28) +#define __NR_shmat (__NR_Linux + 29) +#define __NR_shmctl (__NR_Linux + 30) +#define __NR_dup (__NR_Linux + 31) +#define __NR_dup2 (__NR_Linux + 32) +#define __NR_pause (__NR_Linux + 33) +#define __NR_nanosleep (__NR_Linux + 34) +#define __NR_getitimer (__NR_Linux + 35) +#define __NR_setitimer (__NR_Linux + 36) +#define __NR_alarm (__NR_Linux + 37) +#define __NR_getpid (__NR_Linux + 38) +#define __NR_sendfile (__NR_Linux + 39) +#define __NR_socket (__NR_Linux + 40) +#define __NR_connect (__NR_Linux + 41) +#define __NR_accept (__NR_Linux + 42) +#define __NR_sendto (__NR_Linux + 43) +#define __NR_recvfrom (__NR_Linux + 44) +#define __NR_sendmsg (__NR_Linux + 45) +#define __NR_recvmsg (__NR_Linux + 46) +#define __NR_shutdown (__NR_Linux + 47) +#define __NR_bind (__NR_Linux + 48) +#define __NR_listen (__NR_Linux + 49) +#define __NR_getsockname (__NR_Linux + 50) +#define __NR_getpeername (__NR_Linux + 51) +#define __NR_socketpair (__NR_Linux + 52) +#define __NR_setsockopt (__NR_Linux + 53) +#define __NR_getsockopt (__NR_Linux + 54) +#define __NR_clone (__NR_Linux + 55) +#define __NR_fork (__NR_Linux + 56) +#define __NR_execve (__NR_Linux + 57) +#define __NR_exit (__NR_Linux + 58) +#define __NR_wait4 (__NR_Linux + 59) +#define __NR_kill (__NR_Linux + 60) +#define __NR_uname (__NR_Linux + 61) +#define __NR_semget (__NR_Linux + 62) +#define __NR_semop (__NR_Linux + 63) +#define __NR_semctl (__NR_Linux + 64) +#define __NR_shmdt (__NR_Linux + 65) +#define __NR_msgget (__NR_Linux + 66) +#define __NR_msgsnd (__NR_Linux + 67) +#define __NR_msgrcv (__NR_Linux + 68) +#define __NR_msgctl (__NR_Linux + 69) +#define __NR_fcntl (__NR_Linux + 70) +#define __NR_flock (__NR_Linux + 71) +#define __NR_fsync (__NR_Linux + 72) +#define __NR_fdatasync (__NR_Linux + 73) +#define __NR_truncate (__NR_Linux + 74) +#define __NR_ftruncate (__NR_Linux + 75) +#define __NR_getdents (__NR_Linux + 76) +#define __NR_getcwd (__NR_Linux + 77) +#define __NR_chdir (__NR_Linux + 78) +#define __NR_fchdir (__NR_Linux + 79) +#define __NR_rename (__NR_Linux + 80) +#define __NR_mkdir (__NR_Linux + 81) +#define __NR_rmdir (__NR_Linux + 82) +#define __NR_creat (__NR_Linux + 83) +#define __NR_link (__NR_Linux + 84) +#define __NR_unlink (__NR_Linux + 85) +#define __NR_symlink (__NR_Linux + 86) +#define __NR_readlink (__NR_Linux + 87) +#define __NR_chmod (__NR_Linux + 88) +#define __NR_fchmod (__NR_Linux + 89) +#define __NR_chown (__NR_Linux + 90) +#define __NR_fchown (__NR_Linux + 91) +#define __NR_lchown (__NR_Linux + 92) +#define __NR_umask (__NR_Linux + 93) +#define __NR_gettimeofday (__NR_Linux + 94) +#define __NR_getrlimit (__NR_Linux + 95) +#define __NR_getrusage (__NR_Linux + 96) +#define __NR_sysinfo (__NR_Linux + 97) +#define __NR_times (__NR_Linux + 98) +#define __NR_ptrace (__NR_Linux + 99) +#define __NR_getuid (__NR_Linux + 100) +#define __NR_syslog (__NR_Linux + 101) +#define __NR_getgid (__NR_Linux + 102) +#define __NR_setuid (__NR_Linux + 103) +#define __NR_setgid (__NR_Linux + 104) +#define __NR_geteuid (__NR_Linux + 105) +#define __NR_getegid (__NR_Linux + 106) +#define __NR_setpgid (__NR_Linux + 107) +#define __NR_getppid (__NR_Linux + 108) +#define __NR_getpgrp (__NR_Linux + 109) +#define __NR_setsid (__NR_Linux + 110) +#define __NR_setreuid (__NR_Linux + 111) +#define __NR_setregid (__NR_Linux + 112) +#define __NR_getgroups (__NR_Linux + 113) +#define __NR_setgroups (__NR_Linux + 114) +#define __NR_setresuid (__NR_Linux + 115) +#define __NR_getresuid (__NR_Linux + 116) +#define __NR_setresgid (__NR_Linux + 117) +#define __NR_getresgid (__NR_Linux + 118) +#define __NR_getpgid (__NR_Linux + 119) +#define __NR_setfsuid (__NR_Linux + 120) +#define __NR_setfsgid (__NR_Linux + 121) +#define __NR_getsid (__NR_Linux + 122) +#define __NR_capget (__NR_Linux + 123) +#define __NR_capset (__NR_Linux + 124) +#define __NR_rt_sigpending (__NR_Linux + 125) +#define __NR_rt_sigtimedwait (__NR_Linux + 126) +#define __NR_rt_sigqueueinfo (__NR_Linux + 127) +#define __NR_rt_sigsuspend (__NR_Linux + 128) +#define __NR_sigaltstack (__NR_Linux + 129) +#define __NR_utime (__NR_Linux + 130) +#define __NR_mknod (__NR_Linux + 131) +#define __NR_personality (__NR_Linux + 132) +#define __NR_ustat (__NR_Linux + 133) +#define __NR_statfs (__NR_Linux + 134) +#define __NR_fstatfs (__NR_Linux + 135) +#define __NR_sysfs (__NR_Linux + 136) +#define __NR_getpriority (__NR_Linux + 137) +#define __NR_setpriority (__NR_Linux + 138) +#define __NR_sched_setparam (__NR_Linux + 139) +#define __NR_sched_getparam (__NR_Linux + 140) +#define __NR_sched_setscheduler (__NR_Linux + 141) +#define __NR_sched_getscheduler (__NR_Linux + 142) +#define __NR_sched_get_priority_max (__NR_Linux + 143) +#define __NR_sched_get_priority_min (__NR_Linux + 144) +#define __NR_sched_rr_get_interval (__NR_Linux + 145) +#define __NR_mlock (__NR_Linux + 146) +#define __NR_munlock (__NR_Linux + 147) +#define __NR_mlockall (__NR_Linux + 148) +#define __NR_munlockall (__NR_Linux + 149) +#define __NR_vhangup (__NR_Linux + 150) +#define __NR_pivot_root (__NR_Linux + 151) +#define __NR__sysctl (__NR_Linux + 152) +#define __NR_prctl (__NR_Linux + 153) +#define __NR_adjtimex (__NR_Linux + 154) +#define __NR_setrlimit (__NR_Linux + 155) +#define __NR_chroot (__NR_Linux + 156) +#define __NR_sync (__NR_Linux + 157) +#define __NR_acct (__NR_Linux + 158) +#define __NR_settimeofday (__NR_Linux + 159) +#define __NR_mount (__NR_Linux + 160) +#define __NR_umount2 (__NR_Linux + 161) +#define __NR_swapon (__NR_Linux + 162) +#define __NR_swapoff (__NR_Linux + 163) +#define __NR_reboot (__NR_Linux + 164) +#define __NR_sethostname (__NR_Linux + 165) +#define __NR_setdomainname (__NR_Linux + 166) +#define __NR_create_module (__NR_Linux + 167) +#define __NR_init_module (__NR_Linux + 168) +#define __NR_delete_module (__NR_Linux + 169) +#define __NR_get_kernel_syms (__NR_Linux + 170) +#define __NR_query_module (__NR_Linux + 171) +#define __NR_quotactl (__NR_Linux + 172) +#define __NR_nfsservctl (__NR_Linux + 173) +#define __NR_getpmsg (__NR_Linux + 174) +#define __NR_putpmsg (__NR_Linux + 175) +#define __NR_afs_syscall (__NR_Linux + 176) +#define __NR_reserved177 (__NR_Linux + 177) +#define __NR_gettid (__NR_Linux + 178) +#define __NR_readahead (__NR_Linux + 179) +#define __NR_setxattr (__NR_Linux + 180) +#define __NR_lsetxattr (__NR_Linux + 181) +#define __NR_fsetxattr (__NR_Linux + 182) +#define __NR_getxattr (__NR_Linux + 183) +#define __NR_lgetxattr (__NR_Linux + 184) +#define __NR_fgetxattr (__NR_Linux + 185) +#define __NR_listxattr (__NR_Linux + 186) +#define __NR_llistxattr (__NR_Linux + 187) +#define __NR_flistxattr (__NR_Linux + 188) +#define __NR_removexattr (__NR_Linux + 189) +#define __NR_lremovexattr (__NR_Linux + 190) +#define __NR_fremovexattr (__NR_Linux + 191) +#define __NR_tkill (__NR_Linux + 192) +#define __NR_reserved193 (__NR_Linux + 193) +#define __NR_futex (__NR_Linux + 194) +#define __NR_sched_setaffinity (__NR_Linux + 195) +#define __NR_sched_getaffinity (__NR_Linux + 196) +#define __NR_cacheflush (__NR_Linux + 197) +#define __NR_cachectl (__NR_Linux + 198) +#define __NR_sysmips (__NR_Linux + 199) +#define __NR_io_setup (__NR_Linux + 200) +#define __NR_io_destroy (__NR_Linux + 201) +#define __NR_io_getevents (__NR_Linux + 202) +#define __NR_io_submit (__NR_Linux + 203) +#define __NR_io_cancel (__NR_Linux + 204) +#define __NR_exit_group (__NR_Linux + 205) +#define __NR_lookup_dcookie (__NR_Linux + 206) +#define __NR_epoll_create (__NR_Linux + 207) +#define __NR_epoll_ctl (__NR_Linux + 208) +#define __NR_epoll_wait (__NR_Linux + 209) +#define __NR_remap_file_pages (__NR_Linux + 210) +#define __NR_rt_sigreturn (__NR_Linux + 211) +#define __NR_set_tid_address (__NR_Linux + 212) +#define __NR_restart_syscall (__NR_Linux + 213) +#define __NR_semtimedop (__NR_Linux + 214) +#define __NR_fadvise64 (__NR_Linux + 215) +#define __NR_timer_create (__NR_Linux + 216) +#define __NR_timer_settime (__NR_Linux + 217) +#define __NR_timer_gettime (__NR_Linux + 218) +#define __NR_timer_getoverrun (__NR_Linux + 219) +#define __NR_timer_delete (__NR_Linux + 220) +#define __NR_clock_settime (__NR_Linux + 221) +#define __NR_clock_gettime (__NR_Linux + 222) +#define __NR_clock_getres (__NR_Linux + 223) +#define __NR_clock_nanosleep (__NR_Linux + 224) +#define __NR_tgkill (__NR_Linux + 225) +#define __NR_utimes (__NR_Linux + 226) +#define __NR_mbind (__NR_Linux + 227) +#define __NR_get_mempolicy (__NR_Linux + 228) +#define __NR_set_mempolicy (__NR_Linux + 229) +#define __NR_mq_open (__NR_Linux + 230) +#define __NR_mq_unlink (__NR_Linux + 231) +#define __NR_mq_timedsend (__NR_Linux + 232) +#define __NR_mq_timedreceive (__NR_Linux + 233) +#define __NR_mq_notify (__NR_Linux + 234) +#define __NR_mq_getsetattr (__NR_Linux + 235) +#define __NR_vserver (__NR_Linux + 236) +#define __NR_waitid (__NR_Linux + 237) +/* #define __NR_sys_setaltroot (__NR_Linux + 238) */ +#define __NR_add_key (__NR_Linux + 239) +#define __NR_request_key (__NR_Linux + 240) +#define __NR_keyctl (__NR_Linux + 241) +#define __NR_set_thread_area (__NR_Linux + 242) +#define __NR_inotify_init (__NR_Linux + 243) +#define __NR_inotify_add_watch (__NR_Linux + 244) +#define __NR_inotify_rm_watch (__NR_Linux + 245) +#define __NR_migrate_pages (__NR_Linux + 246) +#define __NR_openat (__NR_Linux + 247) +#define __NR_mkdirat (__NR_Linux + 248) +#define __NR_mknodat (__NR_Linux + 249) +#define __NR_fchownat (__NR_Linux + 250) +#define __NR_futimesat (__NR_Linux + 251) +#define __NR_newfstatat (__NR_Linux + 252) +#define __NR_unlinkat (__NR_Linux + 253) +#define __NR_renameat (__NR_Linux + 254) +#define __NR_linkat (__NR_Linux + 255) +#define __NR_symlinkat (__NR_Linux + 256) +#define __NR_readlinkat (__NR_Linux + 257) +#define __NR_fchmodat (__NR_Linux + 258) +#define __NR_faccessat (__NR_Linux + 259) +#define __NR_pselect6 (__NR_Linux + 260) +#define __NR_ppoll (__NR_Linux + 261) +#define __NR_unshare (__NR_Linux + 262) +#define __NR_splice (__NR_Linux + 263) +#define __NR_sync_file_range (__NR_Linux + 264) +#define __NR_tee (__NR_Linux + 265) +#define __NR_vmsplice (__NR_Linux + 266) +#define __NR_move_pages (__NR_Linux + 267) +#define __NR_set_robust_list (__NR_Linux + 268) +#define __NR_get_robust_list (__NR_Linux + 269) +#define __NR_kexec_load (__NR_Linux + 270) +#define __NR_getcpu (__NR_Linux + 271) +#define __NR_epoll_pwait (__NR_Linux + 272) +#define __NR_ioprio_set (__NR_Linux + 273) +#define __NR_ioprio_get (__NR_Linux + 274) +#define __NR_utimensat (__NR_Linux + 275) +#define __NR_signalfd (__NR_Linux + 276) +#define __NR_timerfd (__NR_Linux + 277) +#define __NR_eventfd (__NR_Linux + 278) +#define __NR_fallocate (__NR_Linux + 279) +#define __NR_timerfd_create (__NR_Linux + 280) +#define __NR_timerfd_gettime (__NR_Linux + 281) +#define __NR_timerfd_settime (__NR_Linux + 282) +#define __NR_signalfd4 (__NR_Linux + 283) +#define __NR_eventfd2 (__NR_Linux + 284) +#define __NR_epoll_create1 (__NR_Linux + 285) +#define __NR_dup3 (__NR_Linux + 286) +#define __NR_pipe2 (__NR_Linux + 287) +#define __NR_inotify_init1 (__NR_Linux + 288) +#define __NR_preadv (__NR_Linux + 289) +#define __NR_pwritev (__NR_Linux + 290) +#define __NR_rt_tgsigqueueinfo (__NR_Linux + 291) +#define __NR_perf_event_open (__NR_Linux + 292) +#define __NR_accept4 (__NR_Linux + 293) +#define __NR_recvmmsg (__NR_Linux + 294) +#define __NR_fanotify_init (__NR_Linux + 295) +#define __NR_fanotify_mark (__NR_Linux + 296) +#define __NR_prlimit64 (__NR_Linux + 297) +#define __NR_name_to_handle_at (__NR_Linux + 298) +#define __NR_open_by_handle_at (__NR_Linux + 299) +#define __NR_clock_adjtime (__NR_Linux + 300) +#define __NR_syncfs (__NR_Linux + 301) +#define __NR_sendmmsg (__NR_Linux + 302) +#define __NR_setns (__NR_Linux + 303) +#define __NR_process_vm_readv (__NR_Linux + 304) +#define __NR_process_vm_writev (__NR_Linux + 305) +#define __NR_kcmp (__NR_Linux + 306) +#define __NR_finit_module (__NR_Linux + 307) +#define __NR_getdents64 (__NR_Linux + 308) +#define __NR_sched_setattr (__NR_Linux + 309) +#define __NR_sched_getattr (__NR_Linux + 310) +#define __NR_renameat2 (__NR_Linux + 311) +#define __NR_seccomp (__NR_Linux + 312) +#define __NR_getrandom (__NR_Linux + 313) +#define __NR_memfd_create (__NR_Linux + 314) +#define __NR_bpf (__NR_Linux + 315) +#define __NR_execveat (__NR_Linux + 316) +#define __NR_userfaultfd (__NR_Linux + 317) +#define __NR_membarrier (__NR_Linux + 318) +#define __NR_mlock2 (__NR_Linux + 319) +#define __NR_copy_file_range (__NR_Linux + 320) +#define __NR_preadv2 (__NR_Linux + 321) +#define __NR_pwritev2 (__NR_Linux + 322) +#define __NR_pkey_mprotect (__NR_Linux + 323) +#define __NR_pkey_alloc (__NR_Linux + 324) +#define __NR_pkey_free (__NR_Linux + 325) +#define __NR_statx (__NR_Linux + 326) +#define __NR_rseq (__NR_Linux + 327) +#define __NR_io_pgetevents (__NR_Linux + 328) + +/* + * Offset of the last Linux 64-bit flavoured syscall + */ +#define __NR_Linux_syscalls 328 + +#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ + +#define __NR_64_Linux 5000 +#define __NR_64_Linux_syscalls 328 + +#if _MIPS_SIM == _MIPS_SIM_NABI32 + +/* + * Linux N32 syscalls are in the range from 6000 to 6999. + */ +#define __NR_Linux 6000 +#define __NR_read (__NR_Linux + 0) +#define __NR_write (__NR_Linux + 1) +#define __NR_open (__NR_Linux + 2) +#define __NR_close (__NR_Linux + 3) +#define __NR_stat (__NR_Linux + 4) +#define __NR_fstat (__NR_Linux + 5) +#define __NR_lstat (__NR_Linux + 6) +#define __NR_poll (__NR_Linux + 7) +#define __NR_lseek (__NR_Linux + 8) +#define __NR_mmap (__NR_Linux + 9) +#define __NR_mprotect (__NR_Linux + 10) +#define __NR_munmap (__NR_Linux + 11) +#define __NR_brk (__NR_Linux + 12) +#define __NR_rt_sigaction (__NR_Linux + 13) +#define __NR_rt_sigprocmask (__NR_Linux + 14) +#define __NR_ioctl (__NR_Linux + 15) +#define __NR_pread64 (__NR_Linux + 16) +#define __NR_pwrite64 (__NR_Linux + 17) +#define __NR_readv (__NR_Linux + 18) +#define __NR_writev (__NR_Linux + 19) +#define __NR_access (__NR_Linux + 20) +#define __NR_pipe (__NR_Linux + 21) +#define __NR__newselect (__NR_Linux + 22) +#define __NR_sched_yield (__NR_Linux + 23) +#define __NR_mremap (__NR_Linux + 24) +#define __NR_msync (__NR_Linux + 25) +#define __NR_mincore (__NR_Linux + 26) +#define __NR_madvise (__NR_Linux + 27) +#define __NR_shmget (__NR_Linux + 28) +#define __NR_shmat (__NR_Linux + 29) +#define __NR_shmctl (__NR_Linux + 30) +#define __NR_dup (__NR_Linux + 31) +#define __NR_dup2 (__NR_Linux + 32) +#define __NR_pause (__NR_Linux + 33) +#define __NR_nanosleep (__NR_Linux + 34) +#define __NR_getitimer (__NR_Linux + 35) +#define __NR_setitimer (__NR_Linux + 36) +#define __NR_alarm (__NR_Linux + 37) +#define __NR_getpid (__NR_Linux + 38) +#define __NR_sendfile (__NR_Linux + 39) +#define __NR_socket (__NR_Linux + 40) +#define __NR_connect (__NR_Linux + 41) +#define __NR_accept (__NR_Linux + 42) +#define __NR_sendto (__NR_Linux + 43) +#define __NR_recvfrom (__NR_Linux + 44) +#define __NR_sendmsg (__NR_Linux + 45) +#define __NR_recvmsg (__NR_Linux + 46) +#define __NR_shutdown (__NR_Linux + 47) +#define __NR_bind (__NR_Linux + 48) +#define __NR_listen (__NR_Linux + 49) +#define __NR_getsockname (__NR_Linux + 50) +#define __NR_getpeername (__NR_Linux + 51) +#define __NR_socketpair (__NR_Linux + 52) +#define __NR_setsockopt (__NR_Linux + 53) +#define __NR_getsockopt (__NR_Linux + 54) +#define __NR_clone (__NR_Linux + 55) +#define __NR_fork (__NR_Linux + 56) +#define __NR_execve (__NR_Linux + 57) +#define __NR_exit (__NR_Linux + 58) +#define __NR_wait4 (__NR_Linux + 59) +#define __NR_kill (__NR_Linux + 60) +#define __NR_uname (__NR_Linux + 61) +#define __NR_semget (__NR_Linux + 62) +#define __NR_semop (__NR_Linux + 63) +#define __NR_semctl (__NR_Linux + 64) +#define __NR_shmdt (__NR_Linux + 65) +#define __NR_msgget (__NR_Linux + 66) +#define __NR_msgsnd (__NR_Linux + 67) +#define __NR_msgrcv (__NR_Linux + 68) +#define __NR_msgctl (__NR_Linux + 69) +#define __NR_fcntl (__NR_Linux + 70) +#define __NR_flock (__NR_Linux + 71) +#define __NR_fsync (__NR_Linux + 72) +#define __NR_fdatasync (__NR_Linux + 73) +#define __NR_truncate (__NR_Linux + 74) +#define __NR_ftruncate (__NR_Linux + 75) +#define __NR_getdents (__NR_Linux + 76) +#define __NR_getcwd (__NR_Linux + 77) +#define __NR_chdir (__NR_Linux + 78) +#define __NR_fchdir (__NR_Linux + 79) +#define __NR_rename (__NR_Linux + 80) +#define __NR_mkdir (__NR_Linux + 81) +#define __NR_rmdir (__NR_Linux + 82) +#define __NR_creat (__NR_Linux + 83) +#define __NR_link (__NR_Linux + 84) +#define __NR_unlink (__NR_Linux + 85) +#define __NR_symlink (__NR_Linux + 86) +#define __NR_readlink (__NR_Linux + 87) +#define __NR_chmod (__NR_Linux + 88) +#define __NR_fchmod (__NR_Linux + 89) +#define __NR_chown (__NR_Linux + 90) +#define __NR_fchown (__NR_Linux + 91) +#define __NR_lchown (__NR_Linux + 92) +#define __NR_umask (__NR_Linux + 93) +#define __NR_gettimeofday (__NR_Linux + 94) +#define __NR_getrlimit (__NR_Linux + 95) +#define __NR_getrusage (__NR_Linux + 96) +#define __NR_sysinfo (__NR_Linux + 97) +#define __NR_times (__NR_Linux + 98) +#define __NR_ptrace (__NR_Linux + 99) +#define __NR_getuid (__NR_Linux + 100) +#define __NR_syslog (__NR_Linux + 101) +#define __NR_getgid (__NR_Linux + 102) +#define __NR_setuid (__NR_Linux + 103) +#define __NR_setgid (__NR_Linux + 104) +#define __NR_geteuid (__NR_Linux + 105) +#define __NR_getegid (__NR_Linux + 106) +#define __NR_setpgid (__NR_Linux + 107) +#define __NR_getppid (__NR_Linux + 108) +#define __NR_getpgrp (__NR_Linux + 109) +#define __NR_setsid (__NR_Linux + 110) +#define __NR_setreuid (__NR_Linux + 111) +#define __NR_setregid (__NR_Linux + 112) +#define __NR_getgroups (__NR_Linux + 113) +#define __NR_setgroups (__NR_Linux + 114) +#define __NR_setresuid (__NR_Linux + 115) +#define __NR_getresuid (__NR_Linux + 116) +#define __NR_setresgid (__NR_Linux + 117) +#define __NR_getresgid (__NR_Linux + 118) +#define __NR_getpgid (__NR_Linux + 119) +#define __NR_setfsuid (__NR_Linux + 120) +#define __NR_setfsgid (__NR_Linux + 121) +#define __NR_getsid (__NR_Linux + 122) +#define __NR_capget (__NR_Linux + 123) +#define __NR_capset (__NR_Linux + 124) +#define __NR_rt_sigpending (__NR_Linux + 125) +#define __NR_rt_sigtimedwait (__NR_Linux + 126) +#define __NR_rt_sigqueueinfo (__NR_Linux + 127) +#define __NR_rt_sigsuspend (__NR_Linux + 128) +#define __NR_sigaltstack (__NR_Linux + 129) +#define __NR_utime (__NR_Linux + 130) +#define __NR_mknod (__NR_Linux + 131) +#define __NR_personality (__NR_Linux + 132) +#define __NR_ustat (__NR_Linux + 133) +#define __NR_statfs (__NR_Linux + 134) +#define __NR_fstatfs (__NR_Linux + 135) +#define __NR_sysfs (__NR_Linux + 136) +#define __NR_getpriority (__NR_Linux + 137) +#define __NR_setpriority (__NR_Linux + 138) +#define __NR_sched_setparam (__NR_Linux + 139) +#define __NR_sched_getparam (__NR_Linux + 140) +#define __NR_sched_setscheduler (__NR_Linux + 141) +#define __NR_sched_getscheduler (__NR_Linux + 142) +#define __NR_sched_get_priority_max (__NR_Linux + 143) +#define __NR_sched_get_priority_min (__NR_Linux + 144) +#define __NR_sched_rr_get_interval (__NR_Linux + 145) +#define __NR_mlock (__NR_Linux + 146) +#define __NR_munlock (__NR_Linux + 147) +#define __NR_mlockall (__NR_Linux + 148) +#define __NR_munlockall (__NR_Linux + 149) +#define __NR_vhangup (__NR_Linux + 150) +#define __NR_pivot_root (__NR_Linux + 151) +#define __NR__sysctl (__NR_Linux + 152) +#define __NR_prctl (__NR_Linux + 153) +#define __NR_adjtimex (__NR_Linux + 154) +#define __NR_setrlimit (__NR_Linux + 155) +#define __NR_chroot (__NR_Linux + 156) +#define __NR_sync (__NR_Linux + 157) +#define __NR_acct (__NR_Linux + 158) +#define __NR_settimeofday (__NR_Linux + 159) +#define __NR_mount (__NR_Linux + 160) +#define __NR_umount2 (__NR_Linux + 161) +#define __NR_swapon (__NR_Linux + 162) +#define __NR_swapoff (__NR_Linux + 163) +#define __NR_reboot (__NR_Linux + 164) +#define __NR_sethostname (__NR_Linux + 165) +#define __NR_setdomainname (__NR_Linux + 166) +#define __NR_create_module (__NR_Linux + 167) +#define __NR_init_module (__NR_Linux + 168) +#define __NR_delete_module (__NR_Linux + 169) +#define __NR_get_kernel_syms (__NR_Linux + 170) +#define __NR_query_module (__NR_Linux + 171) +#define __NR_quotactl (__NR_Linux + 172) +#define __NR_nfsservctl (__NR_Linux + 173) +#define __NR_getpmsg (__NR_Linux + 174) +#define __NR_putpmsg (__NR_Linux + 175) +#define __NR_afs_syscall (__NR_Linux + 176) +#define __NR_reserved177 (__NR_Linux + 177) +#define __NR_gettid (__NR_Linux + 178) +#define __NR_readahead (__NR_Linux + 179) +#define __NR_setxattr (__NR_Linux + 180) +#define __NR_lsetxattr (__NR_Linux + 181) +#define __NR_fsetxattr (__NR_Linux + 182) +#define __NR_getxattr (__NR_Linux + 183) +#define __NR_lgetxattr (__NR_Linux + 184) +#define __NR_fgetxattr (__NR_Linux + 185) +#define __NR_listxattr (__NR_Linux + 186) +#define __NR_llistxattr (__NR_Linux + 187) +#define __NR_flistxattr (__NR_Linux + 188) +#define __NR_removexattr (__NR_Linux + 189) +#define __NR_lremovexattr (__NR_Linux + 190) +#define __NR_fremovexattr (__NR_Linux + 191) +#define __NR_tkill (__NR_Linux + 192) +#define __NR_reserved193 (__NR_Linux + 193) +#define __NR_futex (__NR_Linux + 194) +#define __NR_sched_setaffinity (__NR_Linux + 195) +#define __NR_sched_getaffinity (__NR_Linux + 196) +#define __NR_cacheflush (__NR_Linux + 197) +#define __NR_cachectl (__NR_Linux + 198) +#define __NR_sysmips (__NR_Linux + 199) +#define __NR_io_setup (__NR_Linux + 200) +#define __NR_io_destroy (__NR_Linux + 201) +#define __NR_io_getevents (__NR_Linux + 202) +#define __NR_io_submit (__NR_Linux + 203) +#define __NR_io_cancel (__NR_Linux + 204) +#define __NR_exit_group (__NR_Linux + 205) +#define __NR_lookup_dcookie (__NR_Linux + 206) +#define __NR_epoll_create (__NR_Linux + 207) +#define __NR_epoll_ctl (__NR_Linux + 208) +#define __NR_epoll_wait (__NR_Linux + 209) +#define __NR_remap_file_pages (__NR_Linux + 210) +#define __NR_rt_sigreturn (__NR_Linux + 211) +#define __NR_fcntl64 (__NR_Linux + 212) +#define __NR_set_tid_address (__NR_Linux + 213) +#define __NR_restart_syscall (__NR_Linux + 214) +#define __NR_semtimedop (__NR_Linux + 215) +#define __NR_fadvise64 (__NR_Linux + 216) +#define __NR_statfs64 (__NR_Linux + 217) +#define __NR_fstatfs64 (__NR_Linux + 218) +#define __NR_sendfile64 (__NR_Linux + 219) +#define __NR_timer_create (__NR_Linux + 220) +#define __NR_timer_settime (__NR_Linux + 221) +#define __NR_timer_gettime (__NR_Linux + 222) +#define __NR_timer_getoverrun (__NR_Linux + 223) +#define __NR_timer_delete (__NR_Linux + 224) +#define __NR_clock_settime (__NR_Linux + 225) +#define __NR_clock_gettime (__NR_Linux + 226) +#define __NR_clock_getres (__NR_Linux + 227) +#define __NR_clock_nanosleep (__NR_Linux + 228) +#define __NR_tgkill (__NR_Linux + 229) +#define __NR_utimes (__NR_Linux + 230) +#define __NR_mbind (__NR_Linux + 231) +#define __NR_get_mempolicy (__NR_Linux + 232) +#define __NR_set_mempolicy (__NR_Linux + 233) +#define __NR_mq_open (__NR_Linux + 234) +#define __NR_mq_unlink (__NR_Linux + 235) +#define __NR_mq_timedsend (__NR_Linux + 236) +#define __NR_mq_timedreceive (__NR_Linux + 237) +#define __NR_mq_notify (__NR_Linux + 238) +#define __NR_mq_getsetattr (__NR_Linux + 239) +#define __NR_vserver (__NR_Linux + 240) +#define __NR_waitid (__NR_Linux + 241) +/* #define __NR_sys_setaltroot (__NR_Linux + 242) */ +#define __NR_add_key (__NR_Linux + 243) +#define __NR_request_key (__NR_Linux + 244) +#define __NR_keyctl (__NR_Linux + 245) +#define __NR_set_thread_area (__NR_Linux + 246) +#define __NR_inotify_init (__NR_Linux + 247) +#define __NR_inotify_add_watch (__NR_Linux + 248) +#define __NR_inotify_rm_watch (__NR_Linux + 249) +#define __NR_migrate_pages (__NR_Linux + 250) +#define __NR_openat (__NR_Linux + 251) +#define __NR_mkdirat (__NR_Linux + 252) +#define __NR_mknodat (__NR_Linux + 253) +#define __NR_fchownat (__NR_Linux + 254) +#define __NR_futimesat (__NR_Linux + 255) +#define __NR_newfstatat (__NR_Linux + 256) +#define __NR_unlinkat (__NR_Linux + 257) +#define __NR_renameat (__NR_Linux + 258) +#define __NR_linkat (__NR_Linux + 259) +#define __NR_symlinkat (__NR_Linux + 260) +#define __NR_readlinkat (__NR_Linux + 261) +#define __NR_fchmodat (__NR_Linux + 262) +#define __NR_faccessat (__NR_Linux + 263) +#define __NR_pselect6 (__NR_Linux + 264) +#define __NR_ppoll (__NR_Linux + 265) +#define __NR_unshare (__NR_Linux + 266) +#define __NR_splice (__NR_Linux + 267) +#define __NR_sync_file_range (__NR_Linux + 268) +#define __NR_tee (__NR_Linux + 269) +#define __NR_vmsplice (__NR_Linux + 270) +#define __NR_move_pages (__NR_Linux + 271) +#define __NR_set_robust_list (__NR_Linux + 272) +#define __NR_get_robust_list (__NR_Linux + 273) +#define __NR_kexec_load (__NR_Linux + 274) +#define __NR_getcpu (__NR_Linux + 275) +#define __NR_epoll_pwait (__NR_Linux + 276) +#define __NR_ioprio_set (__NR_Linux + 277) +#define __NR_ioprio_get (__NR_Linux + 278) +#define __NR_utimensat (__NR_Linux + 279) +#define __NR_signalfd (__NR_Linux + 280) +#define __NR_timerfd (__NR_Linux + 281) +#define __NR_eventfd (__NR_Linux + 282) +#define __NR_fallocate (__NR_Linux + 283) +#define __NR_timerfd_create (__NR_Linux + 284) +#define __NR_timerfd_gettime (__NR_Linux + 285) +#define __NR_timerfd_settime (__NR_Linux + 286) +#define __NR_signalfd4 (__NR_Linux + 287) +#define __NR_eventfd2 (__NR_Linux + 288) +#define __NR_epoll_create1 (__NR_Linux + 289) +#define __NR_dup3 (__NR_Linux + 290) +#define __NR_pipe2 (__NR_Linux + 291) +#define __NR_inotify_init1 (__NR_Linux + 292) +#define __NR_preadv (__NR_Linux + 293) +#define __NR_pwritev (__NR_Linux + 294) +#define __NR_rt_tgsigqueueinfo (__NR_Linux + 295) +#define __NR_perf_event_open (__NR_Linux + 296) +#define __NR_accept4 (__NR_Linux + 297) +#define __NR_recvmmsg (__NR_Linux + 298) +#define __NR_getdents64 (__NR_Linux + 299) +#define __NR_fanotify_init (__NR_Linux + 300) +#define __NR_fanotify_mark (__NR_Linux + 301) +#define __NR_prlimit64 (__NR_Linux + 302) +#define __NR_name_to_handle_at (__NR_Linux + 303) +#define __NR_open_by_handle_at (__NR_Linux + 304) +#define __NR_clock_adjtime (__NR_Linux + 305) +#define __NR_syncfs (__NR_Linux + 306) +#define __NR_sendmmsg (__NR_Linux + 307) +#define __NR_setns (__NR_Linux + 308) +#define __NR_process_vm_readv (__NR_Linux + 309) +#define __NR_process_vm_writev (__NR_Linux + 310) +#define __NR_kcmp (__NR_Linux + 311) +#define __NR_finit_module (__NR_Linux + 312) +#define __NR_sched_setattr (__NR_Linux + 313) +#define __NR_sched_getattr (__NR_Linux + 314) +#define __NR_renameat2 (__NR_Linux + 315) +#define __NR_seccomp (__NR_Linux + 316) +#define __NR_getrandom (__NR_Linux + 317) +#define __NR_memfd_create (__NR_Linux + 318) +#define __NR_bpf (__NR_Linux + 319) +#define __NR_execveat (__NR_Linux + 320) +#define __NR_userfaultfd (__NR_Linux + 321) +#define __NR_membarrier (__NR_Linux + 322) +#define __NR_mlock2 (__NR_Linux + 323) +#define __NR_copy_file_range (__NR_Linux + 324) +#define __NR_preadv2 (__NR_Linux + 325) +#define __NR_pwritev2 (__NR_Linux + 326) +#define __NR_pkey_mprotect (__NR_Linux + 327) +#define __NR_pkey_alloc (__NR_Linux + 328) +#define __NR_pkey_free (__NR_Linux + 329) +#define __NR_statx (__NR_Linux + 330) +#define __NR_rseq (__NR_Linux + 331) +#define __NR_io_pgetevents (__NR_Linux + 332) + +/* + * Offset of the last N32 flavoured syscall + */ +#define __NR_Linux_syscalls 332 + +#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ + +#define __NR_N32_Linux 6000 +#define __NR_N32_Linux_syscalls 332 + +#endif /* _UAPI_ASM_UNISTD_H */ diff --git a/libc/include/mips64-linux-gnuabi64/bits/dlfcn.h b/libc/include/mips64-linux-gnuabi64/bits/dlfcn.h new file mode 100644 index 0000000000..996be6f45b --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/dlfcn.h @@ -0,0 +1,64 @@ +/* System dependent definitions for run-time dynamic loading. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/errno.h b/libc/include/mips64-linux-gnuabi64/bits/errno.h new file mode 100644 index 0000000000..2d6069ad8a --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/errno.h @@ -0,0 +1,52 @@ +/* Error constants. MIPS/Linux specific version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/eventfd.h b/libc/include/mips64-linux-gnuabi64/bits/eventfd.h new file mode 100644 index 0000000000..9ff48c23fb --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/eventfd.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2007-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/inotify.h b/libc/include/mips64-linux-gnuabi64/bits/inotify.h new file mode 100644 index 0000000000..d063466c30 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/inotify.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/ioctl-types.h b/libc/include/mips64-linux-gnuabi64/bits/ioctl-types.h new file mode 100644 index 0000000000..bfbdac6f57 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/ioctl-types.h @@ -0,0 +1,75 @@ +/* Structure types for pre-termios terminal ioctls. Linux/MIPS version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/ipc.h b/libc/include/mips64-linux-gnuabi64/bits/ipc.h new file mode 100644 index 0000000000..e994ffc9ad --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/ipc.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IPC_H +# error "Never use directly; include instead." +#endif + +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#ifdef __USE_GNU +# define IPC_INFO 3 /* See ipcs. */ +#endif + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + unsigned int uid; /* Owner's user ID. */ + unsigned int gid; /* Owner's group ID. */ + unsigned int cuid; /* Creator's user ID. */ + unsigned int cgid; /* Creator's group ID. */ + unsigned int mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ + unsigned short int __pad1; + unsigned long int __glibc_reserved1; + unsigned long int __glibc_reserved2; +}; \ No newline at end of file diff --git a/libc/include/mips64-linux-gnuabi64/bits/ipctypes.h b/libc/include/mips64-linux-gnuabi64/bits/ipctypes.h new file mode 100644 index 0000000000..ffea8d325c --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/ipctypes.h @@ -0,0 +1,31 @@ +/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* + * Never include directly. + */ + +#ifndef _BITS_IPCTYPES_H +#define _BITS_IPCTYPES_H 1 + +#include + +typedef __SLONG32_TYPE __ipc_pid_t; + + +#endif /* bits/ipctypes.h */ \ No newline at end of file diff --git a/libc/include/mips64-linux-gnuabi64/bits/local_lim.h b/libc/include/mips64-linux-gnuabi64/bits/local_lim.h new file mode 100644 index 0000000000..96b65eb686 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/local_lim.h @@ -0,0 +1,99 @@ +/* Minimum guaranteed maximum values for system limits. MIPS Linux version. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. At least two pages with 64k pages. */ +#define PTHREAD_STACK_MIN 131072 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) \ No newline at end of file diff --git a/libc/include/mips64-linux-gnuabi64/bits/mman.h b/libc/include/mips64-linux-gnuabi64/bits/mman.h new file mode 100644 index 0000000000..43c768ab5e --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/mman.h @@ -0,0 +1,48 @@ +/* Definitions for POSIX memory map interface. Linux/MIPS version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/msq-pad.h b/libc/include/mips64-linux-gnuabi64/bits/msq-pad.h new file mode 100644 index 0000000000..2cde6ddf34 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/msq-pad.h @@ -0,0 +1,31 @@ +/* Define where padding goes in struct msqid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include + +#ifdef __MIPSEL__ +# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32) +# define __MSQ_PAD_BEFORE_TIME 0 +#else +# define __MSQ_PAD_AFTER_TIME 0 +# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) +#endif \ No newline at end of file diff --git a/libc/include/mips64-linux-gnuabi64/bits/poll.h b/libc/include/mips64-linux-gnuabi64/bits/poll.h new file mode 100644 index 0000000000..7793460007 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/poll.h @@ -0,0 +1,49 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/resource.h b/libc/include/mips64-linux-gnuabi64/bits/resource.h new file mode 100644 index 0000000000..2f200b1025 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/resource.h @@ -0,0 +1,231 @@ +/* Bit values & structures for resource limits. Linux/MIPS version. + Copyright (C) 1994-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 µs 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/libc/include/mips64-linux-gnuabi64/bits/sem-pad.h b/libc/include/mips64-linux-gnuabi64/bits/sem-pad.h new file mode 100644 index 0000000000..b1810b2080 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/sem-pad.h @@ -0,0 +1,24 @@ +/* Define where padding goes in struct semid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SEM_H +# error "Never use directly; include instead." +#endif + +#define __SEM_PAD_AFTER_TIME 0 +#define __SEM_PAD_BEFORE_TIME 0 \ No newline at end of file diff --git a/libc/include/mips64-linux-gnuabi64/bits/shm-pad.h b/libc/include/mips64-linux-gnuabi64/bits/shm-pad.h new file mode 100644 index 0000000000..e672c8c7b0 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/shm-pad.h @@ -0,0 +1,26 @@ +/* Define where padding goes in struct shmid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SHM_H +# error "Never use directly; include instead." +#endif + +#define __SHM_PAD_AFTER_TIME 0 +#define __SHM_PAD_BEFORE_TIME 0 +#define __SHM_SEGSZ_AFTER_TIME 0 +#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 \ No newline at end of file diff --git a/libc/include/mips64-linux-gnuabi64/bits/shmlba.h b/libc/include/mips64-linux-gnuabi64/bits/shmlba.h new file mode 100644 index 0000000000..9561decd9a --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/shmlba.h @@ -0,0 +1,24 @@ +/* Define SHMLBA. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/sigaction.h b/libc/include/mips64-linux-gnuabi64/bits/sigaction.h new file mode 100644 index 0000000000..bbc6004b59 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/sigaction.h @@ -0,0 +1,94 @@ +/* The proper definitions for Linux/MIPS's sigaction. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/sigcontext.h b/libc/include/mips64-linux-gnuabi64/bits/sigcontext.h new file mode 100644 index 0000000000..231695c93f --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/sigcontext.h @@ -0,0 +1,82 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/siginfo-arch.h b/libc/include/mips64-linux-gnuabi64/bits/siginfo-arch.h new file mode 100644 index 0000000000..d639ba2076 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/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/libc/include/mips64-linux-gnuabi64/bits/signalfd.h b/libc/include/mips64-linux-gnuabi64/bits/signalfd.h new file mode 100644 index 0000000000..a8f5275551 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/signalfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2007-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/signum.h b/libc/include/mips64-linux-gnuabi64/bits/signum.h new file mode 100644 index 0000000000..e3cd97af8b --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/signum.h @@ -0,0 +1,68 @@ +/* Signal number definitions. Linux/MIPS version. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use instead." +#endif + +#include + +/* Adjustments and additions to the signal number constants for + Linux/MIPS. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGPWR 19 /* Power failure imminent. */ + +#undef SIGUSR1 +#define SIGUSR1 16 +#undef SIGUSR2 +#define SIGUSR2 17 +#undef SIGCHLD +#define SIGCHLD 18 +#undef SIGWINCH +#define SIGWINCH 20 +#undef SIGURG +#define SIGURG 21 +#undef SIGPOLL +#define SIGPOLL 22 +#undef SIGSTOP +#define SIGSTOP 23 +#undef SIGTSTP +#define SIGTSTP 24 +#undef SIGCONT +#define SIGCONT 25 +#undef SIGTTIN +#define SIGTTIN 26 +#undef SIGTTOU +#define SIGTTOU 27 +#undef SIGVTALRM +#define SIGVTALRM 28 +#undef SIGPROF +#define SIGPROF 29 +#undef SIGXCPU +#define SIGXCPU 30 +#undef SIGXFSZ +#define SIGXFSZ 31 + +#undef __SIGRTMAX +#define __SIGRTMAX 127 + +#endif /* included. */ \ No newline at end of file diff --git a/libc/include/mips64-linux-gnuabi64/bits/socket_type.h b/libc/include/mips64-linux-gnuabi64/bits/socket_type.h new file mode 100644 index 0000000000..4c976f179e --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/socket_type.h @@ -0,0 +1,55 @@ +/* Define enum __socket_type for Linux/MIPS. + Copyright (C) 1991-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/statfs.h b/libc/include/mips64-linux-gnuabi64/bits/statfs.h new file mode 100644 index 0000000000..fd0f68d6d7 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/statfs.h @@ -0,0 +1,73 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/termios-c_cc.h b/libc/include/mips64-linux-gnuabi64/bits/termios-c_cc.h new file mode 100644 index 0000000000..ed124b8db4 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/termios-c_cc.h @@ -0,0 +1,43 @@ +/* termios c_cc symbolic constant definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/termios-c_lflag.h b/libc/include/mips64-linux-gnuabi64/bits/termios-c_lflag.h new file mode 100644 index 0000000000..e5a6773476 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/termios-c_lflag.h @@ -0,0 +1,46 @@ +/* termios local mode definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/termios-struct.h b/libc/include/mips64-linux-gnuabi64/bits/termios-struct.h new file mode 100644 index 0000000000..0442c6f354 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/termios-struct.h @@ -0,0 +1,34 @@ +/* struct termios definition. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/termios-tcflow.h b/libc/include/mips64-linux-gnuabi64/bits/termios-tcflow.h new file mode 100644 index 0000000000..2c523c3a2a --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/termios-tcflow.h @@ -0,0 +1,26 @@ +/* termios local mode definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/timerfd.h b/libc/include/mips64-linux-gnuabi64/bits/timerfd.h new file mode 100644 index 0000000000..005d411617 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/timerfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2008-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/bits/types/stack_t.h b/libc/include/mips64-linux-gnuabi64/bits/types/stack_t.h new file mode 100644 index 0000000000..b62c348140 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/bits/types/stack_t.h @@ -0,0 +1,33 @@ +/* Define stack_t. MIPS Linux version. + Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabi64/ieee754.h b/libc/include/mips64-linux-gnuabi64/ieee754.h new file mode 100644 index 0000000000..600dbce3d8 --- /dev/null +++ b/libc/include/mips64-linux-gnuabi64/ieee754.h @@ -0,0 +1,323 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#include + +__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/libc/include/mips64-linux-gnuabin32/asm/sgidefs.h b/libc/include/mips64-linux-gnuabin32/asm/sgidefs.h new file mode 100644 index 0000000000..26143e3b7c --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/asm/sgidefs.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1996, 1999, 2001 Ralf Baechle + * Copyright (C) 1999 Silicon Graphics, Inc. + * Copyright (C) 2001 MIPS Technologies, Inc. + */ +#ifndef __ASM_SGIDEFS_H +#define __ASM_SGIDEFS_H + +/* + * Using a Linux compiler for building Linux seems logic but not to + * everybody. + */ +#ifndef __linux__ +#error Use a Linux compiler or give up. +#endif + +/* + * Definitions for the ISA levels + * + * With the introduction of MIPS32 / MIPS64 instruction sets definitions + * MIPS ISAs are no longer subsets of each other. Therefore comparisons + * on these symbols except with == may result in unexpected results and + * are forbidden! + */ +#define _MIPS_ISA_MIPS1 1 +#define _MIPS_ISA_MIPS2 2 +#define _MIPS_ISA_MIPS3 3 +#define _MIPS_ISA_MIPS4 4 +#define _MIPS_ISA_MIPS5 5 +#define _MIPS_ISA_MIPS32 6 +#define _MIPS_ISA_MIPS64 7 + +/* + * Subprogram calling convention + */ +#define _MIPS_SIM_ABI32 1 +#define _MIPS_SIM_NABI32 2 +#define _MIPS_SIM_ABI64 3 + +#endif /* __ASM_SGIDEFS_H */ diff --git a/libc/include/mips64-linux-gnuabin32/asm/unistd.h b/libc/include/mips64-linux-gnuabin32/asm/unistd.h new file mode 100644 index 0000000000..f25dd1d83f --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/asm/unistd.h @@ -0,0 +1,1101 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle + * Copyright (C) 1999, 2000 Silicon Graphics, Inc. + * + * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto + * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A + */ +#ifndef _UAPI_ASM_UNISTD_H +#define _UAPI_ASM_UNISTD_H + +#include + +#if _MIPS_SIM == _MIPS_SIM_ABI32 + +/* + * Linux o32 style syscalls are in the range from 4000 to 4999. + */ +#define __NR_Linux 4000 +#define __NR_syscall (__NR_Linux + 0) +#define __NR_exit (__NR_Linux + 1) +#define __NR_fork (__NR_Linux + 2) +#define __NR_read (__NR_Linux + 3) +#define __NR_write (__NR_Linux + 4) +#define __NR_open (__NR_Linux + 5) +#define __NR_close (__NR_Linux + 6) +#define __NR_waitpid (__NR_Linux + 7) +#define __NR_creat (__NR_Linux + 8) +#define __NR_link (__NR_Linux + 9) +#define __NR_unlink (__NR_Linux + 10) +#define __NR_execve (__NR_Linux + 11) +#define __NR_chdir (__NR_Linux + 12) +#define __NR_time (__NR_Linux + 13) +#define __NR_mknod (__NR_Linux + 14) +#define __NR_chmod (__NR_Linux + 15) +#define __NR_lchown (__NR_Linux + 16) +#define __NR_break (__NR_Linux + 17) +#define __NR_unused18 (__NR_Linux + 18) +#define __NR_lseek (__NR_Linux + 19) +#define __NR_getpid (__NR_Linux + 20) +#define __NR_mount (__NR_Linux + 21) +#define __NR_umount (__NR_Linux + 22) +#define __NR_setuid (__NR_Linux + 23) +#define __NR_getuid (__NR_Linux + 24) +#define __NR_stime (__NR_Linux + 25) +#define __NR_ptrace (__NR_Linux + 26) +#define __NR_alarm (__NR_Linux + 27) +#define __NR_unused28 (__NR_Linux + 28) +#define __NR_pause (__NR_Linux + 29) +#define __NR_utime (__NR_Linux + 30) +#define __NR_stty (__NR_Linux + 31) +#define __NR_gtty (__NR_Linux + 32) +#define __NR_access (__NR_Linux + 33) +#define __NR_nice (__NR_Linux + 34) +#define __NR_ftime (__NR_Linux + 35) +#define __NR_sync (__NR_Linux + 36) +#define __NR_kill (__NR_Linux + 37) +#define __NR_rename (__NR_Linux + 38) +#define __NR_mkdir (__NR_Linux + 39) +#define __NR_rmdir (__NR_Linux + 40) +#define __NR_dup (__NR_Linux + 41) +#define __NR_pipe (__NR_Linux + 42) +#define __NR_times (__NR_Linux + 43) +#define __NR_prof (__NR_Linux + 44) +#define __NR_brk (__NR_Linux + 45) +#define __NR_setgid (__NR_Linux + 46) +#define __NR_getgid (__NR_Linux + 47) +#define __NR_signal (__NR_Linux + 48) +#define __NR_geteuid (__NR_Linux + 49) +#define __NR_getegid (__NR_Linux + 50) +#define __NR_acct (__NR_Linux + 51) +#define __NR_umount2 (__NR_Linux + 52) +#define __NR_lock (__NR_Linux + 53) +#define __NR_ioctl (__NR_Linux + 54) +#define __NR_fcntl (__NR_Linux + 55) +#define __NR_mpx (__NR_Linux + 56) +#define __NR_setpgid (__NR_Linux + 57) +#define __NR_ulimit (__NR_Linux + 58) +#define __NR_unused59 (__NR_Linux + 59) +#define __NR_umask (__NR_Linux + 60) +#define __NR_chroot (__NR_Linux + 61) +#define __NR_ustat (__NR_Linux + 62) +#define __NR_dup2 (__NR_Linux + 63) +#define __NR_getppid (__NR_Linux + 64) +#define __NR_getpgrp (__NR_Linux + 65) +#define __NR_setsid (__NR_Linux + 66) +#define __NR_sigaction (__NR_Linux + 67) +#define __NR_sgetmask (__NR_Linux + 68) +#define __NR_ssetmask (__NR_Linux + 69) +#define __NR_setreuid (__NR_Linux + 70) +#define __NR_setregid (__NR_Linux + 71) +#define __NR_sigsuspend (__NR_Linux + 72) +#define __NR_sigpending (__NR_Linux + 73) +#define __NR_sethostname (__NR_Linux + 74) +#define __NR_setrlimit (__NR_Linux + 75) +#define __NR_getrlimit (__NR_Linux + 76) +#define __NR_getrusage (__NR_Linux + 77) +#define __NR_gettimeofday (__NR_Linux + 78) +#define __NR_settimeofday (__NR_Linux + 79) +#define __NR_getgroups (__NR_Linux + 80) +#define __NR_setgroups (__NR_Linux + 81) +#define __NR_reserved82 (__NR_Linux + 82) +#define __NR_symlink (__NR_Linux + 83) +#define __NR_unused84 (__NR_Linux + 84) +#define __NR_readlink (__NR_Linux + 85) +#define __NR_uselib (__NR_Linux + 86) +#define __NR_swapon (__NR_Linux + 87) +#define __NR_reboot (__NR_Linux + 88) +#define __NR_readdir (__NR_Linux + 89) +#define __NR_mmap (__NR_Linux + 90) +#define __NR_munmap (__NR_Linux + 91) +#define __NR_truncate (__NR_Linux + 92) +#define __NR_ftruncate (__NR_Linux + 93) +#define __NR_fchmod (__NR_Linux + 94) +#define __NR_fchown (__NR_Linux + 95) +#define __NR_getpriority (__NR_Linux + 96) +#define __NR_setpriority (__NR_Linux + 97) +#define __NR_profil (__NR_Linux + 98) +#define __NR_statfs (__NR_Linux + 99) +#define __NR_fstatfs (__NR_Linux + 100) +#define __NR_ioperm (__NR_Linux + 101) +#define __NR_socketcall (__NR_Linux + 102) +#define __NR_syslog (__NR_Linux + 103) +#define __NR_setitimer (__NR_Linux + 104) +#define __NR_getitimer (__NR_Linux + 105) +#define __NR_stat (__NR_Linux + 106) +#define __NR_lstat (__NR_Linux + 107) +#define __NR_fstat (__NR_Linux + 108) +#define __NR_unused109 (__NR_Linux + 109) +#define __NR_iopl (__NR_Linux + 110) +#define __NR_vhangup (__NR_Linux + 111) +#define __NR_idle (__NR_Linux + 112) +#define __NR_vm86 (__NR_Linux + 113) +#define __NR_wait4 (__NR_Linux + 114) +#define __NR_swapoff (__NR_Linux + 115) +#define __NR_sysinfo (__NR_Linux + 116) +#define __NR_ipc (__NR_Linux + 117) +#define __NR_fsync (__NR_Linux + 118) +#define __NR_sigreturn (__NR_Linux + 119) +#define __NR_clone (__NR_Linux + 120) +#define __NR_setdomainname (__NR_Linux + 121) +#define __NR_uname (__NR_Linux + 122) +#define __NR_modify_ldt (__NR_Linux + 123) +#define __NR_adjtimex (__NR_Linux + 124) +#define __NR_mprotect (__NR_Linux + 125) +#define __NR_sigprocmask (__NR_Linux + 126) +#define __NR_create_module (__NR_Linux + 127) +#define __NR_init_module (__NR_Linux + 128) +#define __NR_delete_module (__NR_Linux + 129) +#define __NR_get_kernel_syms (__NR_Linux + 130) +#define __NR_quotactl (__NR_Linux + 131) +#define __NR_getpgid (__NR_Linux + 132) +#define __NR_fchdir (__NR_Linux + 133) +#define __NR_bdflush (__NR_Linux + 134) +#define __NR_sysfs (__NR_Linux + 135) +#define __NR_personality (__NR_Linux + 136) +#define __NR_afs_syscall (__NR_Linux + 137) /* Syscall for Andrew File System */ +#define __NR_setfsuid (__NR_Linux + 138) +#define __NR_setfsgid (__NR_Linux + 139) +#define __NR__llseek (__NR_Linux + 140) +#define __NR_getdents (__NR_Linux + 141) +#define __NR__newselect (__NR_Linux + 142) +#define __NR_flock (__NR_Linux + 143) +#define __NR_msync (__NR_Linux + 144) +#define __NR_readv (__NR_Linux + 145) +#define __NR_writev (__NR_Linux + 146) +#define __NR_cacheflush (__NR_Linux + 147) +#define __NR_cachectl (__NR_Linux + 148) +#define __NR_sysmips (__NR_Linux + 149) +#define __NR_unused150 (__NR_Linux + 150) +#define __NR_getsid (__NR_Linux + 151) +#define __NR_fdatasync (__NR_Linux + 152) +#define __NR__sysctl (__NR_Linux + 153) +#define __NR_mlock (__NR_Linux + 154) +#define __NR_munlock (__NR_Linux + 155) +#define __NR_mlockall (__NR_Linux + 156) +#define __NR_munlockall (__NR_Linux + 157) +#define __NR_sched_setparam (__NR_Linux + 158) +#define __NR_sched_getparam (__NR_Linux + 159) +#define __NR_sched_setscheduler (__NR_Linux + 160) +#define __NR_sched_getscheduler (__NR_Linux + 161) +#define __NR_sched_yield (__NR_Linux + 162) +#define __NR_sched_get_priority_max (__NR_Linux + 163) +#define __NR_sched_get_priority_min (__NR_Linux + 164) +#define __NR_sched_rr_get_interval (__NR_Linux + 165) +#define __NR_nanosleep (__NR_Linux + 166) +#define __NR_mremap (__NR_Linux + 167) +#define __NR_accept (__NR_Linux + 168) +#define __NR_bind (__NR_Linux + 169) +#define __NR_connect (__NR_Linux + 170) +#define __NR_getpeername (__NR_Linux + 171) +#define __NR_getsockname (__NR_Linux + 172) +#define __NR_getsockopt (__NR_Linux + 173) +#define __NR_listen (__NR_Linux + 174) +#define __NR_recv (__NR_Linux + 175) +#define __NR_recvfrom (__NR_Linux + 176) +#define __NR_recvmsg (__NR_Linux + 177) +#define __NR_send (__NR_Linux + 178) +#define __NR_sendmsg (__NR_Linux + 179) +#define __NR_sendto (__NR_Linux + 180) +#define __NR_setsockopt (__NR_Linux + 181) +#define __NR_shutdown (__NR_Linux + 182) +#define __NR_socket (__NR_Linux + 183) +#define __NR_socketpair (__NR_Linux + 184) +#define __NR_setresuid (__NR_Linux + 185) +#define __NR_getresuid (__NR_Linux + 186) +#define __NR_query_module (__NR_Linux + 187) +#define __NR_poll (__NR_Linux + 188) +#define __NR_nfsservctl (__NR_Linux + 189) +#define __NR_setresgid (__NR_Linux + 190) +#define __NR_getresgid (__NR_Linux + 191) +#define __NR_prctl (__NR_Linux + 192) +#define __NR_rt_sigreturn (__NR_Linux + 193) +#define __NR_rt_sigaction (__NR_Linux + 194) +#define __NR_rt_sigprocmask (__NR_Linux + 195) +#define __NR_rt_sigpending (__NR_Linux + 196) +#define __NR_rt_sigtimedwait (__NR_Linux + 197) +#define __NR_rt_sigqueueinfo (__NR_Linux + 198) +#define __NR_rt_sigsuspend (__NR_Linux + 199) +#define __NR_pread64 (__NR_Linux + 200) +#define __NR_pwrite64 (__NR_Linux + 201) +#define __NR_chown (__NR_Linux + 202) +#define __NR_getcwd (__NR_Linux + 203) +#define __NR_capget (__NR_Linux + 204) +#define __NR_capset (__NR_Linux + 205) +#define __NR_sigaltstack (__NR_Linux + 206) +#define __NR_sendfile (__NR_Linux + 207) +#define __NR_getpmsg (__NR_Linux + 208) +#define __NR_putpmsg (__NR_Linux + 209) +#define __NR_mmap2 (__NR_Linux + 210) +#define __NR_truncate64 (__NR_Linux + 211) +#define __NR_ftruncate64 (__NR_Linux + 212) +#define __NR_stat64 (__NR_Linux + 213) +#define __NR_lstat64 (__NR_Linux + 214) +#define __NR_fstat64 (__NR_Linux + 215) +#define __NR_pivot_root (__NR_Linux + 216) +#define __NR_mincore (__NR_Linux + 217) +#define __NR_madvise (__NR_Linux + 218) +#define __NR_getdents64 (__NR_Linux + 219) +#define __NR_fcntl64 (__NR_Linux + 220) +#define __NR_reserved221 (__NR_Linux + 221) +#define __NR_gettid (__NR_Linux + 222) +#define __NR_readahead (__NR_Linux + 223) +#define __NR_setxattr (__NR_Linux + 224) +#define __NR_lsetxattr (__NR_Linux + 225) +#define __NR_fsetxattr (__NR_Linux + 226) +#define __NR_getxattr (__NR_Linux + 227) +#define __NR_lgetxattr (__NR_Linux + 228) +#define __NR_fgetxattr (__NR_Linux + 229) +#define __NR_listxattr (__NR_Linux + 230) +#define __NR_llistxattr (__NR_Linux + 231) +#define __NR_flistxattr (__NR_Linux + 232) +#define __NR_removexattr (__NR_Linux + 233) +#define __NR_lremovexattr (__NR_Linux + 234) +#define __NR_fremovexattr (__NR_Linux + 235) +#define __NR_tkill (__NR_Linux + 236) +#define __NR_sendfile64 (__NR_Linux + 237) +#define __NR_futex (__NR_Linux + 238) +#define __NR_sched_setaffinity (__NR_Linux + 239) +#define __NR_sched_getaffinity (__NR_Linux + 240) +#define __NR_io_setup (__NR_Linux + 241) +#define __NR_io_destroy (__NR_Linux + 242) +#define __NR_io_getevents (__NR_Linux + 243) +#define __NR_io_submit (__NR_Linux + 244) +#define __NR_io_cancel (__NR_Linux + 245) +#define __NR_exit_group (__NR_Linux + 246) +#define __NR_lookup_dcookie (__NR_Linux + 247) +#define __NR_epoll_create (__NR_Linux + 248) +#define __NR_epoll_ctl (__NR_Linux + 249) +#define __NR_epoll_wait (__NR_Linux + 250) +#define __NR_remap_file_pages (__NR_Linux + 251) +#define __NR_set_tid_address (__NR_Linux + 252) +#define __NR_restart_syscall (__NR_Linux + 253) +#define __NR_fadvise64 (__NR_Linux + 254) +#define __NR_statfs64 (__NR_Linux + 255) +#define __NR_fstatfs64 (__NR_Linux + 256) +#define __NR_timer_create (__NR_Linux + 257) +#define __NR_timer_settime (__NR_Linux + 258) +#define __NR_timer_gettime (__NR_Linux + 259) +#define __NR_timer_getoverrun (__NR_Linux + 260) +#define __NR_timer_delete (__NR_Linux + 261) +#define __NR_clock_settime (__NR_Linux + 262) +#define __NR_clock_gettime (__NR_Linux + 263) +#define __NR_clock_getres (__NR_Linux + 264) +#define __NR_clock_nanosleep (__NR_Linux + 265) +#define __NR_tgkill (__NR_Linux + 266) +#define __NR_utimes (__NR_Linux + 267) +#define __NR_mbind (__NR_Linux + 268) +#define __NR_get_mempolicy (__NR_Linux + 269) +#define __NR_set_mempolicy (__NR_Linux + 270) +#define __NR_mq_open (__NR_Linux + 271) +#define __NR_mq_unlink (__NR_Linux + 272) +#define __NR_mq_timedsend (__NR_Linux + 273) +#define __NR_mq_timedreceive (__NR_Linux + 274) +#define __NR_mq_notify (__NR_Linux + 275) +#define __NR_mq_getsetattr (__NR_Linux + 276) +#define __NR_vserver (__NR_Linux + 277) +#define __NR_waitid (__NR_Linux + 278) +/* #define __NR_sys_setaltroot (__NR_Linux + 279) */ +#define __NR_add_key (__NR_Linux + 280) +#define __NR_request_key (__NR_Linux + 281) +#define __NR_keyctl (__NR_Linux + 282) +#define __NR_set_thread_area (__NR_Linux + 283) +#define __NR_inotify_init (__NR_Linux + 284) +#define __NR_inotify_add_watch (__NR_Linux + 285) +#define __NR_inotify_rm_watch (__NR_Linux + 286) +#define __NR_migrate_pages (__NR_Linux + 287) +#define __NR_openat (__NR_Linux + 288) +#define __NR_mkdirat (__NR_Linux + 289) +#define __NR_mknodat (__NR_Linux + 290) +#define __NR_fchownat (__NR_Linux + 291) +#define __NR_futimesat (__NR_Linux + 292) +#define __NR_fstatat64 (__NR_Linux + 293) +#define __NR_unlinkat (__NR_Linux + 294) +#define __NR_renameat (__NR_Linux + 295) +#define __NR_linkat (__NR_Linux + 296) +#define __NR_symlinkat (__NR_Linux + 297) +#define __NR_readlinkat (__NR_Linux + 298) +#define __NR_fchmodat (__NR_Linux + 299) +#define __NR_faccessat (__NR_Linux + 300) +#define __NR_pselect6 (__NR_Linux + 301) +#define __NR_ppoll (__NR_Linux + 302) +#define __NR_unshare (__NR_Linux + 303) +#define __NR_splice (__NR_Linux + 304) +#define __NR_sync_file_range (__NR_Linux + 305) +#define __NR_tee (__NR_Linux + 306) +#define __NR_vmsplice (__NR_Linux + 307) +#define __NR_move_pages (__NR_Linux + 308) +#define __NR_set_robust_list (__NR_Linux + 309) +#define __NR_get_robust_list (__NR_Linux + 310) +#define __NR_kexec_load (__NR_Linux + 311) +#define __NR_getcpu (__NR_Linux + 312) +#define __NR_epoll_pwait (__NR_Linux + 313) +#define __NR_ioprio_set (__NR_Linux + 314) +#define __NR_ioprio_get (__NR_Linux + 315) +#define __NR_utimensat (__NR_Linux + 316) +#define __NR_signalfd (__NR_Linux + 317) +#define __NR_timerfd (__NR_Linux + 318) +#define __NR_eventfd (__NR_Linux + 319) +#define __NR_fallocate (__NR_Linux + 320) +#define __NR_timerfd_create (__NR_Linux + 321) +#define __NR_timerfd_gettime (__NR_Linux + 322) +#define __NR_timerfd_settime (__NR_Linux + 323) +#define __NR_signalfd4 (__NR_Linux + 324) +#define __NR_eventfd2 (__NR_Linux + 325) +#define __NR_epoll_create1 (__NR_Linux + 326) +#define __NR_dup3 (__NR_Linux + 327) +#define __NR_pipe2 (__NR_Linux + 328) +#define __NR_inotify_init1 (__NR_Linux + 329) +#define __NR_preadv (__NR_Linux + 330) +#define __NR_pwritev (__NR_Linux + 331) +#define __NR_rt_tgsigqueueinfo (__NR_Linux + 332) +#define __NR_perf_event_open (__NR_Linux + 333) +#define __NR_accept4 (__NR_Linux + 334) +#define __NR_recvmmsg (__NR_Linux + 335) +#define __NR_fanotify_init (__NR_Linux + 336) +#define __NR_fanotify_mark (__NR_Linux + 337) +#define __NR_prlimit64 (__NR_Linux + 338) +#define __NR_name_to_handle_at (__NR_Linux + 339) +#define __NR_open_by_handle_at (__NR_Linux + 340) +#define __NR_clock_adjtime (__NR_Linux + 341) +#define __NR_syncfs (__NR_Linux + 342) +#define __NR_sendmmsg (__NR_Linux + 343) +#define __NR_setns (__NR_Linux + 344) +#define __NR_process_vm_readv (__NR_Linux + 345) +#define __NR_process_vm_writev (__NR_Linux + 346) +#define __NR_kcmp (__NR_Linux + 347) +#define __NR_finit_module (__NR_Linux + 348) +#define __NR_sched_setattr (__NR_Linux + 349) +#define __NR_sched_getattr (__NR_Linux + 350) +#define __NR_renameat2 (__NR_Linux + 351) +#define __NR_seccomp (__NR_Linux + 352) +#define __NR_getrandom (__NR_Linux + 353) +#define __NR_memfd_create (__NR_Linux + 354) +#define __NR_bpf (__NR_Linux + 355) +#define __NR_execveat (__NR_Linux + 356) +#define __NR_userfaultfd (__NR_Linux + 357) +#define __NR_membarrier (__NR_Linux + 358) +#define __NR_mlock2 (__NR_Linux + 359) +#define __NR_copy_file_range (__NR_Linux + 360) +#define __NR_preadv2 (__NR_Linux + 361) +#define __NR_pwritev2 (__NR_Linux + 362) +#define __NR_pkey_mprotect (__NR_Linux + 363) +#define __NR_pkey_alloc (__NR_Linux + 364) +#define __NR_pkey_free (__NR_Linux + 365) +#define __NR_statx (__NR_Linux + 366) +#define __NR_rseq (__NR_Linux + 367) +#define __NR_io_pgetevents (__NR_Linux + 368) + + +/* + * Offset of the last Linux o32 flavoured syscall + */ +#define __NR_Linux_syscalls 368 + +#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ + +#define __NR_O32_Linux 4000 +#define __NR_O32_Linux_syscalls 368 + +#if _MIPS_SIM == _MIPS_SIM_ABI64 + +/* + * Linux 64-bit syscalls are in the range from 5000 to 5999. + */ +#define __NR_Linux 5000 +#define __NR_read (__NR_Linux + 0) +#define __NR_write (__NR_Linux + 1) +#define __NR_open (__NR_Linux + 2) +#define __NR_close (__NR_Linux + 3) +#define __NR_stat (__NR_Linux + 4) +#define __NR_fstat (__NR_Linux + 5) +#define __NR_lstat (__NR_Linux + 6) +#define __NR_poll (__NR_Linux + 7) +#define __NR_lseek (__NR_Linux + 8) +#define __NR_mmap (__NR_Linux + 9) +#define __NR_mprotect (__NR_Linux + 10) +#define __NR_munmap (__NR_Linux + 11) +#define __NR_brk (__NR_Linux + 12) +#define __NR_rt_sigaction (__NR_Linux + 13) +#define __NR_rt_sigprocmask (__NR_Linux + 14) +#define __NR_ioctl (__NR_Linux + 15) +#define __NR_pread64 (__NR_Linux + 16) +#define __NR_pwrite64 (__NR_Linux + 17) +#define __NR_readv (__NR_Linux + 18) +#define __NR_writev (__NR_Linux + 19) +#define __NR_access (__NR_Linux + 20) +#define __NR_pipe (__NR_Linux + 21) +#define __NR__newselect (__NR_Linux + 22) +#define __NR_sched_yield (__NR_Linux + 23) +#define __NR_mremap (__NR_Linux + 24) +#define __NR_msync (__NR_Linux + 25) +#define __NR_mincore (__NR_Linux + 26) +#define __NR_madvise (__NR_Linux + 27) +#define __NR_shmget (__NR_Linux + 28) +#define __NR_shmat (__NR_Linux + 29) +#define __NR_shmctl (__NR_Linux + 30) +#define __NR_dup (__NR_Linux + 31) +#define __NR_dup2 (__NR_Linux + 32) +#define __NR_pause (__NR_Linux + 33) +#define __NR_nanosleep (__NR_Linux + 34) +#define __NR_getitimer (__NR_Linux + 35) +#define __NR_setitimer (__NR_Linux + 36) +#define __NR_alarm (__NR_Linux + 37) +#define __NR_getpid (__NR_Linux + 38) +#define __NR_sendfile (__NR_Linux + 39) +#define __NR_socket (__NR_Linux + 40) +#define __NR_connect (__NR_Linux + 41) +#define __NR_accept (__NR_Linux + 42) +#define __NR_sendto (__NR_Linux + 43) +#define __NR_recvfrom (__NR_Linux + 44) +#define __NR_sendmsg (__NR_Linux + 45) +#define __NR_recvmsg (__NR_Linux + 46) +#define __NR_shutdown (__NR_Linux + 47) +#define __NR_bind (__NR_Linux + 48) +#define __NR_listen (__NR_Linux + 49) +#define __NR_getsockname (__NR_Linux + 50) +#define __NR_getpeername (__NR_Linux + 51) +#define __NR_socketpair (__NR_Linux + 52) +#define __NR_setsockopt (__NR_Linux + 53) +#define __NR_getsockopt (__NR_Linux + 54) +#define __NR_clone (__NR_Linux + 55) +#define __NR_fork (__NR_Linux + 56) +#define __NR_execve (__NR_Linux + 57) +#define __NR_exit (__NR_Linux + 58) +#define __NR_wait4 (__NR_Linux + 59) +#define __NR_kill (__NR_Linux + 60) +#define __NR_uname (__NR_Linux + 61) +#define __NR_semget (__NR_Linux + 62) +#define __NR_semop (__NR_Linux + 63) +#define __NR_semctl (__NR_Linux + 64) +#define __NR_shmdt (__NR_Linux + 65) +#define __NR_msgget (__NR_Linux + 66) +#define __NR_msgsnd (__NR_Linux + 67) +#define __NR_msgrcv (__NR_Linux + 68) +#define __NR_msgctl (__NR_Linux + 69) +#define __NR_fcntl (__NR_Linux + 70) +#define __NR_flock (__NR_Linux + 71) +#define __NR_fsync (__NR_Linux + 72) +#define __NR_fdatasync (__NR_Linux + 73) +#define __NR_truncate (__NR_Linux + 74) +#define __NR_ftruncate (__NR_Linux + 75) +#define __NR_getdents (__NR_Linux + 76) +#define __NR_getcwd (__NR_Linux + 77) +#define __NR_chdir (__NR_Linux + 78) +#define __NR_fchdir (__NR_Linux + 79) +#define __NR_rename (__NR_Linux + 80) +#define __NR_mkdir (__NR_Linux + 81) +#define __NR_rmdir (__NR_Linux + 82) +#define __NR_creat (__NR_Linux + 83) +#define __NR_link (__NR_Linux + 84) +#define __NR_unlink (__NR_Linux + 85) +#define __NR_symlink (__NR_Linux + 86) +#define __NR_readlink (__NR_Linux + 87) +#define __NR_chmod (__NR_Linux + 88) +#define __NR_fchmod (__NR_Linux + 89) +#define __NR_chown (__NR_Linux + 90) +#define __NR_fchown (__NR_Linux + 91) +#define __NR_lchown (__NR_Linux + 92) +#define __NR_umask (__NR_Linux + 93) +#define __NR_gettimeofday (__NR_Linux + 94) +#define __NR_getrlimit (__NR_Linux + 95) +#define __NR_getrusage (__NR_Linux + 96) +#define __NR_sysinfo (__NR_Linux + 97) +#define __NR_times (__NR_Linux + 98) +#define __NR_ptrace (__NR_Linux + 99) +#define __NR_getuid (__NR_Linux + 100) +#define __NR_syslog (__NR_Linux + 101) +#define __NR_getgid (__NR_Linux + 102) +#define __NR_setuid (__NR_Linux + 103) +#define __NR_setgid (__NR_Linux + 104) +#define __NR_geteuid (__NR_Linux + 105) +#define __NR_getegid (__NR_Linux + 106) +#define __NR_setpgid (__NR_Linux + 107) +#define __NR_getppid (__NR_Linux + 108) +#define __NR_getpgrp (__NR_Linux + 109) +#define __NR_setsid (__NR_Linux + 110) +#define __NR_setreuid (__NR_Linux + 111) +#define __NR_setregid (__NR_Linux + 112) +#define __NR_getgroups (__NR_Linux + 113) +#define __NR_setgroups (__NR_Linux + 114) +#define __NR_setresuid (__NR_Linux + 115) +#define __NR_getresuid (__NR_Linux + 116) +#define __NR_setresgid (__NR_Linux + 117) +#define __NR_getresgid (__NR_Linux + 118) +#define __NR_getpgid (__NR_Linux + 119) +#define __NR_setfsuid (__NR_Linux + 120) +#define __NR_setfsgid (__NR_Linux + 121) +#define __NR_getsid (__NR_Linux + 122) +#define __NR_capget (__NR_Linux + 123) +#define __NR_capset (__NR_Linux + 124) +#define __NR_rt_sigpending (__NR_Linux + 125) +#define __NR_rt_sigtimedwait (__NR_Linux + 126) +#define __NR_rt_sigqueueinfo (__NR_Linux + 127) +#define __NR_rt_sigsuspend (__NR_Linux + 128) +#define __NR_sigaltstack (__NR_Linux + 129) +#define __NR_utime (__NR_Linux + 130) +#define __NR_mknod (__NR_Linux + 131) +#define __NR_personality (__NR_Linux + 132) +#define __NR_ustat (__NR_Linux + 133) +#define __NR_statfs (__NR_Linux + 134) +#define __NR_fstatfs (__NR_Linux + 135) +#define __NR_sysfs (__NR_Linux + 136) +#define __NR_getpriority (__NR_Linux + 137) +#define __NR_setpriority (__NR_Linux + 138) +#define __NR_sched_setparam (__NR_Linux + 139) +#define __NR_sched_getparam (__NR_Linux + 140) +#define __NR_sched_setscheduler (__NR_Linux + 141) +#define __NR_sched_getscheduler (__NR_Linux + 142) +#define __NR_sched_get_priority_max (__NR_Linux + 143) +#define __NR_sched_get_priority_min (__NR_Linux + 144) +#define __NR_sched_rr_get_interval (__NR_Linux + 145) +#define __NR_mlock (__NR_Linux + 146) +#define __NR_munlock (__NR_Linux + 147) +#define __NR_mlockall (__NR_Linux + 148) +#define __NR_munlockall (__NR_Linux + 149) +#define __NR_vhangup (__NR_Linux + 150) +#define __NR_pivot_root (__NR_Linux + 151) +#define __NR__sysctl (__NR_Linux + 152) +#define __NR_prctl (__NR_Linux + 153) +#define __NR_adjtimex (__NR_Linux + 154) +#define __NR_setrlimit (__NR_Linux + 155) +#define __NR_chroot (__NR_Linux + 156) +#define __NR_sync (__NR_Linux + 157) +#define __NR_acct (__NR_Linux + 158) +#define __NR_settimeofday (__NR_Linux + 159) +#define __NR_mount (__NR_Linux + 160) +#define __NR_umount2 (__NR_Linux + 161) +#define __NR_swapon (__NR_Linux + 162) +#define __NR_swapoff (__NR_Linux + 163) +#define __NR_reboot (__NR_Linux + 164) +#define __NR_sethostname (__NR_Linux + 165) +#define __NR_setdomainname (__NR_Linux + 166) +#define __NR_create_module (__NR_Linux + 167) +#define __NR_init_module (__NR_Linux + 168) +#define __NR_delete_module (__NR_Linux + 169) +#define __NR_get_kernel_syms (__NR_Linux + 170) +#define __NR_query_module (__NR_Linux + 171) +#define __NR_quotactl (__NR_Linux + 172) +#define __NR_nfsservctl (__NR_Linux + 173) +#define __NR_getpmsg (__NR_Linux + 174) +#define __NR_putpmsg (__NR_Linux + 175) +#define __NR_afs_syscall (__NR_Linux + 176) +#define __NR_reserved177 (__NR_Linux + 177) +#define __NR_gettid (__NR_Linux + 178) +#define __NR_readahead (__NR_Linux + 179) +#define __NR_setxattr (__NR_Linux + 180) +#define __NR_lsetxattr (__NR_Linux + 181) +#define __NR_fsetxattr (__NR_Linux + 182) +#define __NR_getxattr (__NR_Linux + 183) +#define __NR_lgetxattr (__NR_Linux + 184) +#define __NR_fgetxattr (__NR_Linux + 185) +#define __NR_listxattr (__NR_Linux + 186) +#define __NR_llistxattr (__NR_Linux + 187) +#define __NR_flistxattr (__NR_Linux + 188) +#define __NR_removexattr (__NR_Linux + 189) +#define __NR_lremovexattr (__NR_Linux + 190) +#define __NR_fremovexattr (__NR_Linux + 191) +#define __NR_tkill (__NR_Linux + 192) +#define __NR_reserved193 (__NR_Linux + 193) +#define __NR_futex (__NR_Linux + 194) +#define __NR_sched_setaffinity (__NR_Linux + 195) +#define __NR_sched_getaffinity (__NR_Linux + 196) +#define __NR_cacheflush (__NR_Linux + 197) +#define __NR_cachectl (__NR_Linux + 198) +#define __NR_sysmips (__NR_Linux + 199) +#define __NR_io_setup (__NR_Linux + 200) +#define __NR_io_destroy (__NR_Linux + 201) +#define __NR_io_getevents (__NR_Linux + 202) +#define __NR_io_submit (__NR_Linux + 203) +#define __NR_io_cancel (__NR_Linux + 204) +#define __NR_exit_group (__NR_Linux + 205) +#define __NR_lookup_dcookie (__NR_Linux + 206) +#define __NR_epoll_create (__NR_Linux + 207) +#define __NR_epoll_ctl (__NR_Linux + 208) +#define __NR_epoll_wait (__NR_Linux + 209) +#define __NR_remap_file_pages (__NR_Linux + 210) +#define __NR_rt_sigreturn (__NR_Linux + 211) +#define __NR_set_tid_address (__NR_Linux + 212) +#define __NR_restart_syscall (__NR_Linux + 213) +#define __NR_semtimedop (__NR_Linux + 214) +#define __NR_fadvise64 (__NR_Linux + 215) +#define __NR_timer_create (__NR_Linux + 216) +#define __NR_timer_settime (__NR_Linux + 217) +#define __NR_timer_gettime (__NR_Linux + 218) +#define __NR_timer_getoverrun (__NR_Linux + 219) +#define __NR_timer_delete (__NR_Linux + 220) +#define __NR_clock_settime (__NR_Linux + 221) +#define __NR_clock_gettime (__NR_Linux + 222) +#define __NR_clock_getres (__NR_Linux + 223) +#define __NR_clock_nanosleep (__NR_Linux + 224) +#define __NR_tgkill (__NR_Linux + 225) +#define __NR_utimes (__NR_Linux + 226) +#define __NR_mbind (__NR_Linux + 227) +#define __NR_get_mempolicy (__NR_Linux + 228) +#define __NR_set_mempolicy (__NR_Linux + 229) +#define __NR_mq_open (__NR_Linux + 230) +#define __NR_mq_unlink (__NR_Linux + 231) +#define __NR_mq_timedsend (__NR_Linux + 232) +#define __NR_mq_timedreceive (__NR_Linux + 233) +#define __NR_mq_notify (__NR_Linux + 234) +#define __NR_mq_getsetattr (__NR_Linux + 235) +#define __NR_vserver (__NR_Linux + 236) +#define __NR_waitid (__NR_Linux + 237) +/* #define __NR_sys_setaltroot (__NR_Linux + 238) */ +#define __NR_add_key (__NR_Linux + 239) +#define __NR_request_key (__NR_Linux + 240) +#define __NR_keyctl (__NR_Linux + 241) +#define __NR_set_thread_area (__NR_Linux + 242) +#define __NR_inotify_init (__NR_Linux + 243) +#define __NR_inotify_add_watch (__NR_Linux + 244) +#define __NR_inotify_rm_watch (__NR_Linux + 245) +#define __NR_migrate_pages (__NR_Linux + 246) +#define __NR_openat (__NR_Linux + 247) +#define __NR_mkdirat (__NR_Linux + 248) +#define __NR_mknodat (__NR_Linux + 249) +#define __NR_fchownat (__NR_Linux + 250) +#define __NR_futimesat (__NR_Linux + 251) +#define __NR_newfstatat (__NR_Linux + 252) +#define __NR_unlinkat (__NR_Linux + 253) +#define __NR_renameat (__NR_Linux + 254) +#define __NR_linkat (__NR_Linux + 255) +#define __NR_symlinkat (__NR_Linux + 256) +#define __NR_readlinkat (__NR_Linux + 257) +#define __NR_fchmodat (__NR_Linux + 258) +#define __NR_faccessat (__NR_Linux + 259) +#define __NR_pselect6 (__NR_Linux + 260) +#define __NR_ppoll (__NR_Linux + 261) +#define __NR_unshare (__NR_Linux + 262) +#define __NR_splice (__NR_Linux + 263) +#define __NR_sync_file_range (__NR_Linux + 264) +#define __NR_tee (__NR_Linux + 265) +#define __NR_vmsplice (__NR_Linux + 266) +#define __NR_move_pages (__NR_Linux + 267) +#define __NR_set_robust_list (__NR_Linux + 268) +#define __NR_get_robust_list (__NR_Linux + 269) +#define __NR_kexec_load (__NR_Linux + 270) +#define __NR_getcpu (__NR_Linux + 271) +#define __NR_epoll_pwait (__NR_Linux + 272) +#define __NR_ioprio_set (__NR_Linux + 273) +#define __NR_ioprio_get (__NR_Linux + 274) +#define __NR_utimensat (__NR_Linux + 275) +#define __NR_signalfd (__NR_Linux + 276) +#define __NR_timerfd (__NR_Linux + 277) +#define __NR_eventfd (__NR_Linux + 278) +#define __NR_fallocate (__NR_Linux + 279) +#define __NR_timerfd_create (__NR_Linux + 280) +#define __NR_timerfd_gettime (__NR_Linux + 281) +#define __NR_timerfd_settime (__NR_Linux + 282) +#define __NR_signalfd4 (__NR_Linux + 283) +#define __NR_eventfd2 (__NR_Linux + 284) +#define __NR_epoll_create1 (__NR_Linux + 285) +#define __NR_dup3 (__NR_Linux + 286) +#define __NR_pipe2 (__NR_Linux + 287) +#define __NR_inotify_init1 (__NR_Linux + 288) +#define __NR_preadv (__NR_Linux + 289) +#define __NR_pwritev (__NR_Linux + 290) +#define __NR_rt_tgsigqueueinfo (__NR_Linux + 291) +#define __NR_perf_event_open (__NR_Linux + 292) +#define __NR_accept4 (__NR_Linux + 293) +#define __NR_recvmmsg (__NR_Linux + 294) +#define __NR_fanotify_init (__NR_Linux + 295) +#define __NR_fanotify_mark (__NR_Linux + 296) +#define __NR_prlimit64 (__NR_Linux + 297) +#define __NR_name_to_handle_at (__NR_Linux + 298) +#define __NR_open_by_handle_at (__NR_Linux + 299) +#define __NR_clock_adjtime (__NR_Linux + 300) +#define __NR_syncfs (__NR_Linux + 301) +#define __NR_sendmmsg (__NR_Linux + 302) +#define __NR_setns (__NR_Linux + 303) +#define __NR_process_vm_readv (__NR_Linux + 304) +#define __NR_process_vm_writev (__NR_Linux + 305) +#define __NR_kcmp (__NR_Linux + 306) +#define __NR_finit_module (__NR_Linux + 307) +#define __NR_getdents64 (__NR_Linux + 308) +#define __NR_sched_setattr (__NR_Linux + 309) +#define __NR_sched_getattr (__NR_Linux + 310) +#define __NR_renameat2 (__NR_Linux + 311) +#define __NR_seccomp (__NR_Linux + 312) +#define __NR_getrandom (__NR_Linux + 313) +#define __NR_memfd_create (__NR_Linux + 314) +#define __NR_bpf (__NR_Linux + 315) +#define __NR_execveat (__NR_Linux + 316) +#define __NR_userfaultfd (__NR_Linux + 317) +#define __NR_membarrier (__NR_Linux + 318) +#define __NR_mlock2 (__NR_Linux + 319) +#define __NR_copy_file_range (__NR_Linux + 320) +#define __NR_preadv2 (__NR_Linux + 321) +#define __NR_pwritev2 (__NR_Linux + 322) +#define __NR_pkey_mprotect (__NR_Linux + 323) +#define __NR_pkey_alloc (__NR_Linux + 324) +#define __NR_pkey_free (__NR_Linux + 325) +#define __NR_statx (__NR_Linux + 326) +#define __NR_rseq (__NR_Linux + 327) +#define __NR_io_pgetevents (__NR_Linux + 328) + +/* + * Offset of the last Linux 64-bit flavoured syscall + */ +#define __NR_Linux_syscalls 328 + +#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ + +#define __NR_64_Linux 5000 +#define __NR_64_Linux_syscalls 328 + +#if _MIPS_SIM == _MIPS_SIM_NABI32 + +/* + * Linux N32 syscalls are in the range from 6000 to 6999. + */ +#define __NR_Linux 6000 +#define __NR_read (__NR_Linux + 0) +#define __NR_write (__NR_Linux + 1) +#define __NR_open (__NR_Linux + 2) +#define __NR_close (__NR_Linux + 3) +#define __NR_stat (__NR_Linux + 4) +#define __NR_fstat (__NR_Linux + 5) +#define __NR_lstat (__NR_Linux + 6) +#define __NR_poll (__NR_Linux + 7) +#define __NR_lseek (__NR_Linux + 8) +#define __NR_mmap (__NR_Linux + 9) +#define __NR_mprotect (__NR_Linux + 10) +#define __NR_munmap (__NR_Linux + 11) +#define __NR_brk (__NR_Linux + 12) +#define __NR_rt_sigaction (__NR_Linux + 13) +#define __NR_rt_sigprocmask (__NR_Linux + 14) +#define __NR_ioctl (__NR_Linux + 15) +#define __NR_pread64 (__NR_Linux + 16) +#define __NR_pwrite64 (__NR_Linux + 17) +#define __NR_readv (__NR_Linux + 18) +#define __NR_writev (__NR_Linux + 19) +#define __NR_access (__NR_Linux + 20) +#define __NR_pipe (__NR_Linux + 21) +#define __NR__newselect (__NR_Linux + 22) +#define __NR_sched_yield (__NR_Linux + 23) +#define __NR_mremap (__NR_Linux + 24) +#define __NR_msync (__NR_Linux + 25) +#define __NR_mincore (__NR_Linux + 26) +#define __NR_madvise (__NR_Linux + 27) +#define __NR_shmget (__NR_Linux + 28) +#define __NR_shmat (__NR_Linux + 29) +#define __NR_shmctl (__NR_Linux + 30) +#define __NR_dup (__NR_Linux + 31) +#define __NR_dup2 (__NR_Linux + 32) +#define __NR_pause (__NR_Linux + 33) +#define __NR_nanosleep (__NR_Linux + 34) +#define __NR_getitimer (__NR_Linux + 35) +#define __NR_setitimer (__NR_Linux + 36) +#define __NR_alarm (__NR_Linux + 37) +#define __NR_getpid (__NR_Linux + 38) +#define __NR_sendfile (__NR_Linux + 39) +#define __NR_socket (__NR_Linux + 40) +#define __NR_connect (__NR_Linux + 41) +#define __NR_accept (__NR_Linux + 42) +#define __NR_sendto (__NR_Linux + 43) +#define __NR_recvfrom (__NR_Linux + 44) +#define __NR_sendmsg (__NR_Linux + 45) +#define __NR_recvmsg (__NR_Linux + 46) +#define __NR_shutdown (__NR_Linux + 47) +#define __NR_bind (__NR_Linux + 48) +#define __NR_listen (__NR_Linux + 49) +#define __NR_getsockname (__NR_Linux + 50) +#define __NR_getpeername (__NR_Linux + 51) +#define __NR_socketpair (__NR_Linux + 52) +#define __NR_setsockopt (__NR_Linux + 53) +#define __NR_getsockopt (__NR_Linux + 54) +#define __NR_clone (__NR_Linux + 55) +#define __NR_fork (__NR_Linux + 56) +#define __NR_execve (__NR_Linux + 57) +#define __NR_exit (__NR_Linux + 58) +#define __NR_wait4 (__NR_Linux + 59) +#define __NR_kill (__NR_Linux + 60) +#define __NR_uname (__NR_Linux + 61) +#define __NR_semget (__NR_Linux + 62) +#define __NR_semop (__NR_Linux + 63) +#define __NR_semctl (__NR_Linux + 64) +#define __NR_shmdt (__NR_Linux + 65) +#define __NR_msgget (__NR_Linux + 66) +#define __NR_msgsnd (__NR_Linux + 67) +#define __NR_msgrcv (__NR_Linux + 68) +#define __NR_msgctl (__NR_Linux + 69) +#define __NR_fcntl (__NR_Linux + 70) +#define __NR_flock (__NR_Linux + 71) +#define __NR_fsync (__NR_Linux + 72) +#define __NR_fdatasync (__NR_Linux + 73) +#define __NR_truncate (__NR_Linux + 74) +#define __NR_ftruncate (__NR_Linux + 75) +#define __NR_getdents (__NR_Linux + 76) +#define __NR_getcwd (__NR_Linux + 77) +#define __NR_chdir (__NR_Linux + 78) +#define __NR_fchdir (__NR_Linux + 79) +#define __NR_rename (__NR_Linux + 80) +#define __NR_mkdir (__NR_Linux + 81) +#define __NR_rmdir (__NR_Linux + 82) +#define __NR_creat (__NR_Linux + 83) +#define __NR_link (__NR_Linux + 84) +#define __NR_unlink (__NR_Linux + 85) +#define __NR_symlink (__NR_Linux + 86) +#define __NR_readlink (__NR_Linux + 87) +#define __NR_chmod (__NR_Linux + 88) +#define __NR_fchmod (__NR_Linux + 89) +#define __NR_chown (__NR_Linux + 90) +#define __NR_fchown (__NR_Linux + 91) +#define __NR_lchown (__NR_Linux + 92) +#define __NR_umask (__NR_Linux + 93) +#define __NR_gettimeofday (__NR_Linux + 94) +#define __NR_getrlimit (__NR_Linux + 95) +#define __NR_getrusage (__NR_Linux + 96) +#define __NR_sysinfo (__NR_Linux + 97) +#define __NR_times (__NR_Linux + 98) +#define __NR_ptrace (__NR_Linux + 99) +#define __NR_getuid (__NR_Linux + 100) +#define __NR_syslog (__NR_Linux + 101) +#define __NR_getgid (__NR_Linux + 102) +#define __NR_setuid (__NR_Linux + 103) +#define __NR_setgid (__NR_Linux + 104) +#define __NR_geteuid (__NR_Linux + 105) +#define __NR_getegid (__NR_Linux + 106) +#define __NR_setpgid (__NR_Linux + 107) +#define __NR_getppid (__NR_Linux + 108) +#define __NR_getpgrp (__NR_Linux + 109) +#define __NR_setsid (__NR_Linux + 110) +#define __NR_setreuid (__NR_Linux + 111) +#define __NR_setregid (__NR_Linux + 112) +#define __NR_getgroups (__NR_Linux + 113) +#define __NR_setgroups (__NR_Linux + 114) +#define __NR_setresuid (__NR_Linux + 115) +#define __NR_getresuid (__NR_Linux + 116) +#define __NR_setresgid (__NR_Linux + 117) +#define __NR_getresgid (__NR_Linux + 118) +#define __NR_getpgid (__NR_Linux + 119) +#define __NR_setfsuid (__NR_Linux + 120) +#define __NR_setfsgid (__NR_Linux + 121) +#define __NR_getsid (__NR_Linux + 122) +#define __NR_capget (__NR_Linux + 123) +#define __NR_capset (__NR_Linux + 124) +#define __NR_rt_sigpending (__NR_Linux + 125) +#define __NR_rt_sigtimedwait (__NR_Linux + 126) +#define __NR_rt_sigqueueinfo (__NR_Linux + 127) +#define __NR_rt_sigsuspend (__NR_Linux + 128) +#define __NR_sigaltstack (__NR_Linux + 129) +#define __NR_utime (__NR_Linux + 130) +#define __NR_mknod (__NR_Linux + 131) +#define __NR_personality (__NR_Linux + 132) +#define __NR_ustat (__NR_Linux + 133) +#define __NR_statfs (__NR_Linux + 134) +#define __NR_fstatfs (__NR_Linux + 135) +#define __NR_sysfs (__NR_Linux + 136) +#define __NR_getpriority (__NR_Linux + 137) +#define __NR_setpriority (__NR_Linux + 138) +#define __NR_sched_setparam (__NR_Linux + 139) +#define __NR_sched_getparam (__NR_Linux + 140) +#define __NR_sched_setscheduler (__NR_Linux + 141) +#define __NR_sched_getscheduler (__NR_Linux + 142) +#define __NR_sched_get_priority_max (__NR_Linux + 143) +#define __NR_sched_get_priority_min (__NR_Linux + 144) +#define __NR_sched_rr_get_interval (__NR_Linux + 145) +#define __NR_mlock (__NR_Linux + 146) +#define __NR_munlock (__NR_Linux + 147) +#define __NR_mlockall (__NR_Linux + 148) +#define __NR_munlockall (__NR_Linux + 149) +#define __NR_vhangup (__NR_Linux + 150) +#define __NR_pivot_root (__NR_Linux + 151) +#define __NR__sysctl (__NR_Linux + 152) +#define __NR_prctl (__NR_Linux + 153) +#define __NR_adjtimex (__NR_Linux + 154) +#define __NR_setrlimit (__NR_Linux + 155) +#define __NR_chroot (__NR_Linux + 156) +#define __NR_sync (__NR_Linux + 157) +#define __NR_acct (__NR_Linux + 158) +#define __NR_settimeofday (__NR_Linux + 159) +#define __NR_mount (__NR_Linux + 160) +#define __NR_umount2 (__NR_Linux + 161) +#define __NR_swapon (__NR_Linux + 162) +#define __NR_swapoff (__NR_Linux + 163) +#define __NR_reboot (__NR_Linux + 164) +#define __NR_sethostname (__NR_Linux + 165) +#define __NR_setdomainname (__NR_Linux + 166) +#define __NR_create_module (__NR_Linux + 167) +#define __NR_init_module (__NR_Linux + 168) +#define __NR_delete_module (__NR_Linux + 169) +#define __NR_get_kernel_syms (__NR_Linux + 170) +#define __NR_query_module (__NR_Linux + 171) +#define __NR_quotactl (__NR_Linux + 172) +#define __NR_nfsservctl (__NR_Linux + 173) +#define __NR_getpmsg (__NR_Linux + 174) +#define __NR_putpmsg (__NR_Linux + 175) +#define __NR_afs_syscall (__NR_Linux + 176) +#define __NR_reserved177 (__NR_Linux + 177) +#define __NR_gettid (__NR_Linux + 178) +#define __NR_readahead (__NR_Linux + 179) +#define __NR_setxattr (__NR_Linux + 180) +#define __NR_lsetxattr (__NR_Linux + 181) +#define __NR_fsetxattr (__NR_Linux + 182) +#define __NR_getxattr (__NR_Linux + 183) +#define __NR_lgetxattr (__NR_Linux + 184) +#define __NR_fgetxattr (__NR_Linux + 185) +#define __NR_listxattr (__NR_Linux + 186) +#define __NR_llistxattr (__NR_Linux + 187) +#define __NR_flistxattr (__NR_Linux + 188) +#define __NR_removexattr (__NR_Linux + 189) +#define __NR_lremovexattr (__NR_Linux + 190) +#define __NR_fremovexattr (__NR_Linux + 191) +#define __NR_tkill (__NR_Linux + 192) +#define __NR_reserved193 (__NR_Linux + 193) +#define __NR_futex (__NR_Linux + 194) +#define __NR_sched_setaffinity (__NR_Linux + 195) +#define __NR_sched_getaffinity (__NR_Linux + 196) +#define __NR_cacheflush (__NR_Linux + 197) +#define __NR_cachectl (__NR_Linux + 198) +#define __NR_sysmips (__NR_Linux + 199) +#define __NR_io_setup (__NR_Linux + 200) +#define __NR_io_destroy (__NR_Linux + 201) +#define __NR_io_getevents (__NR_Linux + 202) +#define __NR_io_submit (__NR_Linux + 203) +#define __NR_io_cancel (__NR_Linux + 204) +#define __NR_exit_group (__NR_Linux + 205) +#define __NR_lookup_dcookie (__NR_Linux + 206) +#define __NR_epoll_create (__NR_Linux + 207) +#define __NR_epoll_ctl (__NR_Linux + 208) +#define __NR_epoll_wait (__NR_Linux + 209) +#define __NR_remap_file_pages (__NR_Linux + 210) +#define __NR_rt_sigreturn (__NR_Linux + 211) +#define __NR_fcntl64 (__NR_Linux + 212) +#define __NR_set_tid_address (__NR_Linux + 213) +#define __NR_restart_syscall (__NR_Linux + 214) +#define __NR_semtimedop (__NR_Linux + 215) +#define __NR_fadvise64 (__NR_Linux + 216) +#define __NR_statfs64 (__NR_Linux + 217) +#define __NR_fstatfs64 (__NR_Linux + 218) +#define __NR_sendfile64 (__NR_Linux + 219) +#define __NR_timer_create (__NR_Linux + 220) +#define __NR_timer_settime (__NR_Linux + 221) +#define __NR_timer_gettime (__NR_Linux + 222) +#define __NR_timer_getoverrun (__NR_Linux + 223) +#define __NR_timer_delete (__NR_Linux + 224) +#define __NR_clock_settime (__NR_Linux + 225) +#define __NR_clock_gettime (__NR_Linux + 226) +#define __NR_clock_getres (__NR_Linux + 227) +#define __NR_clock_nanosleep (__NR_Linux + 228) +#define __NR_tgkill (__NR_Linux + 229) +#define __NR_utimes (__NR_Linux + 230) +#define __NR_mbind (__NR_Linux + 231) +#define __NR_get_mempolicy (__NR_Linux + 232) +#define __NR_set_mempolicy (__NR_Linux + 233) +#define __NR_mq_open (__NR_Linux + 234) +#define __NR_mq_unlink (__NR_Linux + 235) +#define __NR_mq_timedsend (__NR_Linux + 236) +#define __NR_mq_timedreceive (__NR_Linux + 237) +#define __NR_mq_notify (__NR_Linux + 238) +#define __NR_mq_getsetattr (__NR_Linux + 239) +#define __NR_vserver (__NR_Linux + 240) +#define __NR_waitid (__NR_Linux + 241) +/* #define __NR_sys_setaltroot (__NR_Linux + 242) */ +#define __NR_add_key (__NR_Linux + 243) +#define __NR_request_key (__NR_Linux + 244) +#define __NR_keyctl (__NR_Linux + 245) +#define __NR_set_thread_area (__NR_Linux + 246) +#define __NR_inotify_init (__NR_Linux + 247) +#define __NR_inotify_add_watch (__NR_Linux + 248) +#define __NR_inotify_rm_watch (__NR_Linux + 249) +#define __NR_migrate_pages (__NR_Linux + 250) +#define __NR_openat (__NR_Linux + 251) +#define __NR_mkdirat (__NR_Linux + 252) +#define __NR_mknodat (__NR_Linux + 253) +#define __NR_fchownat (__NR_Linux + 254) +#define __NR_futimesat (__NR_Linux + 255) +#define __NR_newfstatat (__NR_Linux + 256) +#define __NR_unlinkat (__NR_Linux + 257) +#define __NR_renameat (__NR_Linux + 258) +#define __NR_linkat (__NR_Linux + 259) +#define __NR_symlinkat (__NR_Linux + 260) +#define __NR_readlinkat (__NR_Linux + 261) +#define __NR_fchmodat (__NR_Linux + 262) +#define __NR_faccessat (__NR_Linux + 263) +#define __NR_pselect6 (__NR_Linux + 264) +#define __NR_ppoll (__NR_Linux + 265) +#define __NR_unshare (__NR_Linux + 266) +#define __NR_splice (__NR_Linux + 267) +#define __NR_sync_file_range (__NR_Linux + 268) +#define __NR_tee (__NR_Linux + 269) +#define __NR_vmsplice (__NR_Linux + 270) +#define __NR_move_pages (__NR_Linux + 271) +#define __NR_set_robust_list (__NR_Linux + 272) +#define __NR_get_robust_list (__NR_Linux + 273) +#define __NR_kexec_load (__NR_Linux + 274) +#define __NR_getcpu (__NR_Linux + 275) +#define __NR_epoll_pwait (__NR_Linux + 276) +#define __NR_ioprio_set (__NR_Linux + 277) +#define __NR_ioprio_get (__NR_Linux + 278) +#define __NR_utimensat (__NR_Linux + 279) +#define __NR_signalfd (__NR_Linux + 280) +#define __NR_timerfd (__NR_Linux + 281) +#define __NR_eventfd (__NR_Linux + 282) +#define __NR_fallocate (__NR_Linux + 283) +#define __NR_timerfd_create (__NR_Linux + 284) +#define __NR_timerfd_gettime (__NR_Linux + 285) +#define __NR_timerfd_settime (__NR_Linux + 286) +#define __NR_signalfd4 (__NR_Linux + 287) +#define __NR_eventfd2 (__NR_Linux + 288) +#define __NR_epoll_create1 (__NR_Linux + 289) +#define __NR_dup3 (__NR_Linux + 290) +#define __NR_pipe2 (__NR_Linux + 291) +#define __NR_inotify_init1 (__NR_Linux + 292) +#define __NR_preadv (__NR_Linux + 293) +#define __NR_pwritev (__NR_Linux + 294) +#define __NR_rt_tgsigqueueinfo (__NR_Linux + 295) +#define __NR_perf_event_open (__NR_Linux + 296) +#define __NR_accept4 (__NR_Linux + 297) +#define __NR_recvmmsg (__NR_Linux + 298) +#define __NR_getdents64 (__NR_Linux + 299) +#define __NR_fanotify_init (__NR_Linux + 300) +#define __NR_fanotify_mark (__NR_Linux + 301) +#define __NR_prlimit64 (__NR_Linux + 302) +#define __NR_name_to_handle_at (__NR_Linux + 303) +#define __NR_open_by_handle_at (__NR_Linux + 304) +#define __NR_clock_adjtime (__NR_Linux + 305) +#define __NR_syncfs (__NR_Linux + 306) +#define __NR_sendmmsg (__NR_Linux + 307) +#define __NR_setns (__NR_Linux + 308) +#define __NR_process_vm_readv (__NR_Linux + 309) +#define __NR_process_vm_writev (__NR_Linux + 310) +#define __NR_kcmp (__NR_Linux + 311) +#define __NR_finit_module (__NR_Linux + 312) +#define __NR_sched_setattr (__NR_Linux + 313) +#define __NR_sched_getattr (__NR_Linux + 314) +#define __NR_renameat2 (__NR_Linux + 315) +#define __NR_seccomp (__NR_Linux + 316) +#define __NR_getrandom (__NR_Linux + 317) +#define __NR_memfd_create (__NR_Linux + 318) +#define __NR_bpf (__NR_Linux + 319) +#define __NR_execveat (__NR_Linux + 320) +#define __NR_userfaultfd (__NR_Linux + 321) +#define __NR_membarrier (__NR_Linux + 322) +#define __NR_mlock2 (__NR_Linux + 323) +#define __NR_copy_file_range (__NR_Linux + 324) +#define __NR_preadv2 (__NR_Linux + 325) +#define __NR_pwritev2 (__NR_Linux + 326) +#define __NR_pkey_mprotect (__NR_Linux + 327) +#define __NR_pkey_alloc (__NR_Linux + 328) +#define __NR_pkey_free (__NR_Linux + 329) +#define __NR_statx (__NR_Linux + 330) +#define __NR_rseq (__NR_Linux + 331) +#define __NR_io_pgetevents (__NR_Linux + 332) + +/* + * Offset of the last N32 flavoured syscall + */ +#define __NR_Linux_syscalls 332 + +#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ + +#define __NR_N32_Linux 6000 +#define __NR_N32_Linux_syscalls 332 + +#endif /* _UAPI_ASM_UNISTD_H */ diff --git a/libc/include/mips64-linux-gnuabin32/bits/dlfcn.h b/libc/include/mips64-linux-gnuabin32/bits/dlfcn.h new file mode 100644 index 0000000000..996be6f45b --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/dlfcn.h @@ -0,0 +1,64 @@ +/* System dependent definitions for run-time dynamic loading. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/errno.h b/libc/include/mips64-linux-gnuabin32/bits/errno.h new file mode 100644 index 0000000000..2d6069ad8a --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/errno.h @@ -0,0 +1,52 @@ +/* Error constants. MIPS/Linux specific version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/eventfd.h b/libc/include/mips64-linux-gnuabin32/bits/eventfd.h new file mode 100644 index 0000000000..9ff48c23fb --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/eventfd.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2007-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/inotify.h b/libc/include/mips64-linux-gnuabin32/bits/inotify.h new file mode 100644 index 0000000000..d063466c30 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/inotify.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/ioctl-types.h b/libc/include/mips64-linux-gnuabin32/bits/ioctl-types.h new file mode 100644 index 0000000000..bfbdac6f57 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/ioctl-types.h @@ -0,0 +1,75 @@ +/* Structure types for pre-termios terminal ioctls. Linux/MIPS version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/ipc.h b/libc/include/mips64-linux-gnuabin32/bits/ipc.h new file mode 100644 index 0000000000..e994ffc9ad --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/ipc.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IPC_H +# error "Never use directly; include instead." +#endif + +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#ifdef __USE_GNU +# define IPC_INFO 3 /* See ipcs. */ +#endif + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + unsigned int uid; /* Owner's user ID. */ + unsigned int gid; /* Owner's group ID. */ + unsigned int cuid; /* Creator's user ID. */ + unsigned int cgid; /* Creator's group ID. */ + unsigned int mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ + unsigned short int __pad1; + unsigned long int __glibc_reserved1; + unsigned long int __glibc_reserved2; +}; \ No newline at end of file diff --git a/libc/include/mips64-linux-gnuabin32/bits/ipctypes.h b/libc/include/mips64-linux-gnuabin32/bits/ipctypes.h new file mode 100644 index 0000000000..ffea8d325c --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/ipctypes.h @@ -0,0 +1,31 @@ +/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* + * Never include directly. + */ + +#ifndef _BITS_IPCTYPES_H +#define _BITS_IPCTYPES_H 1 + +#include + +typedef __SLONG32_TYPE __ipc_pid_t; + + +#endif /* bits/ipctypes.h */ \ No newline at end of file diff --git a/libc/include/mips64-linux-gnuabin32/bits/local_lim.h b/libc/include/mips64-linux-gnuabin32/bits/local_lim.h new file mode 100644 index 0000000000..96b65eb686 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/local_lim.h @@ -0,0 +1,99 @@ +/* Minimum guaranteed maximum values for system limits. MIPS Linux version. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. At least two pages with 64k pages. */ +#define PTHREAD_STACK_MIN 131072 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) \ No newline at end of file diff --git a/libc/include/mips64-linux-gnuabin32/bits/mman.h b/libc/include/mips64-linux-gnuabin32/bits/mman.h new file mode 100644 index 0000000000..43c768ab5e --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/mman.h @@ -0,0 +1,48 @@ +/* Definitions for POSIX memory map interface. Linux/MIPS version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/msq-pad.h b/libc/include/mips64-linux-gnuabin32/bits/msq-pad.h new file mode 100644 index 0000000000..2cde6ddf34 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/msq-pad.h @@ -0,0 +1,31 @@ +/* Define where padding goes in struct msqid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include + +#ifdef __MIPSEL__ +# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32) +# define __MSQ_PAD_BEFORE_TIME 0 +#else +# define __MSQ_PAD_AFTER_TIME 0 +# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) +#endif \ No newline at end of file diff --git a/libc/include/mips64-linux-gnuabin32/bits/poll.h b/libc/include/mips64-linux-gnuabin32/bits/poll.h new file mode 100644 index 0000000000..7793460007 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/poll.h @@ -0,0 +1,49 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/resource.h b/libc/include/mips64-linux-gnuabin32/bits/resource.h new file mode 100644 index 0000000000..2f200b1025 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/resource.h @@ -0,0 +1,231 @@ +/* Bit values & structures for resource limits. Linux/MIPS version. + Copyright (C) 1994-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 µs 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/libc/include/mips64-linux-gnuabin32/bits/sem-pad.h b/libc/include/mips64-linux-gnuabin32/bits/sem-pad.h new file mode 100644 index 0000000000..b1810b2080 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/sem-pad.h @@ -0,0 +1,24 @@ +/* Define where padding goes in struct semid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SEM_H +# error "Never use directly; include instead." +#endif + +#define __SEM_PAD_AFTER_TIME 0 +#define __SEM_PAD_BEFORE_TIME 0 \ No newline at end of file diff --git a/libc/include/mips64-linux-gnuabin32/bits/shm-pad.h b/libc/include/mips64-linux-gnuabin32/bits/shm-pad.h new file mode 100644 index 0000000000..e672c8c7b0 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/shm-pad.h @@ -0,0 +1,26 @@ +/* Define where padding goes in struct shmid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SHM_H +# error "Never use directly; include instead." +#endif + +#define __SHM_PAD_AFTER_TIME 0 +#define __SHM_PAD_BEFORE_TIME 0 +#define __SHM_SEGSZ_AFTER_TIME 0 +#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 \ No newline at end of file diff --git a/libc/include/mips64-linux-gnuabin32/bits/shmlba.h b/libc/include/mips64-linux-gnuabin32/bits/shmlba.h new file mode 100644 index 0000000000..9561decd9a --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/shmlba.h @@ -0,0 +1,24 @@ +/* Define SHMLBA. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/sigaction.h b/libc/include/mips64-linux-gnuabin32/bits/sigaction.h new file mode 100644 index 0000000000..bbc6004b59 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/sigaction.h @@ -0,0 +1,94 @@ +/* The proper definitions for Linux/MIPS's sigaction. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/sigcontext.h b/libc/include/mips64-linux-gnuabin32/bits/sigcontext.h new file mode 100644 index 0000000000..231695c93f --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/sigcontext.h @@ -0,0 +1,82 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/siginfo-arch.h b/libc/include/mips64-linux-gnuabin32/bits/siginfo-arch.h new file mode 100644 index 0000000000..d639ba2076 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/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/libc/include/mips64-linux-gnuabin32/bits/signalfd.h b/libc/include/mips64-linux-gnuabin32/bits/signalfd.h new file mode 100644 index 0000000000..a8f5275551 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/signalfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2007-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/signum.h b/libc/include/mips64-linux-gnuabin32/bits/signum.h new file mode 100644 index 0000000000..e3cd97af8b --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/signum.h @@ -0,0 +1,68 @@ +/* Signal number definitions. Linux/MIPS version. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use instead." +#endif + +#include + +/* Adjustments and additions to the signal number constants for + Linux/MIPS. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGPWR 19 /* Power failure imminent. */ + +#undef SIGUSR1 +#define SIGUSR1 16 +#undef SIGUSR2 +#define SIGUSR2 17 +#undef SIGCHLD +#define SIGCHLD 18 +#undef SIGWINCH +#define SIGWINCH 20 +#undef SIGURG +#define SIGURG 21 +#undef SIGPOLL +#define SIGPOLL 22 +#undef SIGSTOP +#define SIGSTOP 23 +#undef SIGTSTP +#define SIGTSTP 24 +#undef SIGCONT +#define SIGCONT 25 +#undef SIGTTIN +#define SIGTTIN 26 +#undef SIGTTOU +#define SIGTTOU 27 +#undef SIGVTALRM +#define SIGVTALRM 28 +#undef SIGPROF +#define SIGPROF 29 +#undef SIGXCPU +#define SIGXCPU 30 +#undef SIGXFSZ +#define SIGXFSZ 31 + +#undef __SIGRTMAX +#define __SIGRTMAX 127 + +#endif /* included. */ \ No newline at end of file diff --git a/libc/include/mips64-linux-gnuabin32/bits/socket_type.h b/libc/include/mips64-linux-gnuabin32/bits/socket_type.h new file mode 100644 index 0000000000..4c976f179e --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/socket_type.h @@ -0,0 +1,55 @@ +/* Define enum __socket_type for Linux/MIPS. + Copyright (C) 1991-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/statfs.h b/libc/include/mips64-linux-gnuabin32/bits/statfs.h new file mode 100644 index 0000000000..fd0f68d6d7 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/statfs.h @@ -0,0 +1,73 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/termios-c_cc.h b/libc/include/mips64-linux-gnuabin32/bits/termios-c_cc.h new file mode 100644 index 0000000000..ed124b8db4 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/termios-c_cc.h @@ -0,0 +1,43 @@ +/* termios c_cc symbolic constant definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/termios-c_lflag.h b/libc/include/mips64-linux-gnuabin32/bits/termios-c_lflag.h new file mode 100644 index 0000000000..e5a6773476 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/termios-c_lflag.h @@ -0,0 +1,46 @@ +/* termios local mode definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/termios-struct.h b/libc/include/mips64-linux-gnuabin32/bits/termios-struct.h new file mode 100644 index 0000000000..0442c6f354 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/termios-struct.h @@ -0,0 +1,34 @@ +/* struct termios definition. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/termios-tcflow.h b/libc/include/mips64-linux-gnuabin32/bits/termios-tcflow.h new file mode 100644 index 0000000000..2c523c3a2a --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/termios-tcflow.h @@ -0,0 +1,26 @@ +/* termios local mode definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/timerfd.h b/libc/include/mips64-linux-gnuabin32/bits/timerfd.h new file mode 100644 index 0000000000..005d411617 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/timerfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2008-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/bits/types/stack_t.h b/libc/include/mips64-linux-gnuabin32/bits/types/stack_t.h new file mode 100644 index 0000000000..b62c348140 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/bits/types/stack_t.h @@ -0,0 +1,33 @@ +/* Define stack_t. MIPS Linux version. + Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64-linux-gnuabin32/ieee754.h b/libc/include/mips64-linux-gnuabin32/ieee754.h new file mode 100644 index 0000000000..600dbce3d8 --- /dev/null +++ b/libc/include/mips64-linux-gnuabin32/ieee754.h @@ -0,0 +1,323 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#include + +__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/libc/include/mips64el-linux-gnuabi64/asm/sgidefs.h b/libc/include/mips64el-linux-gnuabi64/asm/sgidefs.h new file mode 100644 index 0000000000..26143e3b7c --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/asm/sgidefs.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1996, 1999, 2001 Ralf Baechle + * Copyright (C) 1999 Silicon Graphics, Inc. + * Copyright (C) 2001 MIPS Technologies, Inc. + */ +#ifndef __ASM_SGIDEFS_H +#define __ASM_SGIDEFS_H + +/* + * Using a Linux compiler for building Linux seems logic but not to + * everybody. + */ +#ifndef __linux__ +#error Use a Linux compiler or give up. +#endif + +/* + * Definitions for the ISA levels + * + * With the introduction of MIPS32 / MIPS64 instruction sets definitions + * MIPS ISAs are no longer subsets of each other. Therefore comparisons + * on these symbols except with == may result in unexpected results and + * are forbidden! + */ +#define _MIPS_ISA_MIPS1 1 +#define _MIPS_ISA_MIPS2 2 +#define _MIPS_ISA_MIPS3 3 +#define _MIPS_ISA_MIPS4 4 +#define _MIPS_ISA_MIPS5 5 +#define _MIPS_ISA_MIPS32 6 +#define _MIPS_ISA_MIPS64 7 + +/* + * Subprogram calling convention + */ +#define _MIPS_SIM_ABI32 1 +#define _MIPS_SIM_NABI32 2 +#define _MIPS_SIM_ABI64 3 + +#endif /* __ASM_SGIDEFS_H */ diff --git a/libc/include/mips64el-linux-gnuabi64/asm/unistd.h b/libc/include/mips64el-linux-gnuabi64/asm/unistd.h new file mode 100644 index 0000000000..f25dd1d83f --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/asm/unistd.h @@ -0,0 +1,1101 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle + * Copyright (C) 1999, 2000 Silicon Graphics, Inc. + * + * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto + * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A + */ +#ifndef _UAPI_ASM_UNISTD_H +#define _UAPI_ASM_UNISTD_H + +#include + +#if _MIPS_SIM == _MIPS_SIM_ABI32 + +/* + * Linux o32 style syscalls are in the range from 4000 to 4999. + */ +#define __NR_Linux 4000 +#define __NR_syscall (__NR_Linux + 0) +#define __NR_exit (__NR_Linux + 1) +#define __NR_fork (__NR_Linux + 2) +#define __NR_read (__NR_Linux + 3) +#define __NR_write (__NR_Linux + 4) +#define __NR_open (__NR_Linux + 5) +#define __NR_close (__NR_Linux + 6) +#define __NR_waitpid (__NR_Linux + 7) +#define __NR_creat (__NR_Linux + 8) +#define __NR_link (__NR_Linux + 9) +#define __NR_unlink (__NR_Linux + 10) +#define __NR_execve (__NR_Linux + 11) +#define __NR_chdir (__NR_Linux + 12) +#define __NR_time (__NR_Linux + 13) +#define __NR_mknod (__NR_Linux + 14) +#define __NR_chmod (__NR_Linux + 15) +#define __NR_lchown (__NR_Linux + 16) +#define __NR_break (__NR_Linux + 17) +#define __NR_unused18 (__NR_Linux + 18) +#define __NR_lseek (__NR_Linux + 19) +#define __NR_getpid (__NR_Linux + 20) +#define __NR_mount (__NR_Linux + 21) +#define __NR_umount (__NR_Linux + 22) +#define __NR_setuid (__NR_Linux + 23) +#define __NR_getuid (__NR_Linux + 24) +#define __NR_stime (__NR_Linux + 25) +#define __NR_ptrace (__NR_Linux + 26) +#define __NR_alarm (__NR_Linux + 27) +#define __NR_unused28 (__NR_Linux + 28) +#define __NR_pause (__NR_Linux + 29) +#define __NR_utime (__NR_Linux + 30) +#define __NR_stty (__NR_Linux + 31) +#define __NR_gtty (__NR_Linux + 32) +#define __NR_access (__NR_Linux + 33) +#define __NR_nice (__NR_Linux + 34) +#define __NR_ftime (__NR_Linux + 35) +#define __NR_sync (__NR_Linux + 36) +#define __NR_kill (__NR_Linux + 37) +#define __NR_rename (__NR_Linux + 38) +#define __NR_mkdir (__NR_Linux + 39) +#define __NR_rmdir (__NR_Linux + 40) +#define __NR_dup (__NR_Linux + 41) +#define __NR_pipe (__NR_Linux + 42) +#define __NR_times (__NR_Linux + 43) +#define __NR_prof (__NR_Linux + 44) +#define __NR_brk (__NR_Linux + 45) +#define __NR_setgid (__NR_Linux + 46) +#define __NR_getgid (__NR_Linux + 47) +#define __NR_signal (__NR_Linux + 48) +#define __NR_geteuid (__NR_Linux + 49) +#define __NR_getegid (__NR_Linux + 50) +#define __NR_acct (__NR_Linux + 51) +#define __NR_umount2 (__NR_Linux + 52) +#define __NR_lock (__NR_Linux + 53) +#define __NR_ioctl (__NR_Linux + 54) +#define __NR_fcntl (__NR_Linux + 55) +#define __NR_mpx (__NR_Linux + 56) +#define __NR_setpgid (__NR_Linux + 57) +#define __NR_ulimit (__NR_Linux + 58) +#define __NR_unused59 (__NR_Linux + 59) +#define __NR_umask (__NR_Linux + 60) +#define __NR_chroot (__NR_Linux + 61) +#define __NR_ustat (__NR_Linux + 62) +#define __NR_dup2 (__NR_Linux + 63) +#define __NR_getppid (__NR_Linux + 64) +#define __NR_getpgrp (__NR_Linux + 65) +#define __NR_setsid (__NR_Linux + 66) +#define __NR_sigaction (__NR_Linux + 67) +#define __NR_sgetmask (__NR_Linux + 68) +#define __NR_ssetmask (__NR_Linux + 69) +#define __NR_setreuid (__NR_Linux + 70) +#define __NR_setregid (__NR_Linux + 71) +#define __NR_sigsuspend (__NR_Linux + 72) +#define __NR_sigpending (__NR_Linux + 73) +#define __NR_sethostname (__NR_Linux + 74) +#define __NR_setrlimit (__NR_Linux + 75) +#define __NR_getrlimit (__NR_Linux + 76) +#define __NR_getrusage (__NR_Linux + 77) +#define __NR_gettimeofday (__NR_Linux + 78) +#define __NR_settimeofday (__NR_Linux + 79) +#define __NR_getgroups (__NR_Linux + 80) +#define __NR_setgroups (__NR_Linux + 81) +#define __NR_reserved82 (__NR_Linux + 82) +#define __NR_symlink (__NR_Linux + 83) +#define __NR_unused84 (__NR_Linux + 84) +#define __NR_readlink (__NR_Linux + 85) +#define __NR_uselib (__NR_Linux + 86) +#define __NR_swapon (__NR_Linux + 87) +#define __NR_reboot (__NR_Linux + 88) +#define __NR_readdir (__NR_Linux + 89) +#define __NR_mmap (__NR_Linux + 90) +#define __NR_munmap (__NR_Linux + 91) +#define __NR_truncate (__NR_Linux + 92) +#define __NR_ftruncate (__NR_Linux + 93) +#define __NR_fchmod (__NR_Linux + 94) +#define __NR_fchown (__NR_Linux + 95) +#define __NR_getpriority (__NR_Linux + 96) +#define __NR_setpriority (__NR_Linux + 97) +#define __NR_profil (__NR_Linux + 98) +#define __NR_statfs (__NR_Linux + 99) +#define __NR_fstatfs (__NR_Linux + 100) +#define __NR_ioperm (__NR_Linux + 101) +#define __NR_socketcall (__NR_Linux + 102) +#define __NR_syslog (__NR_Linux + 103) +#define __NR_setitimer (__NR_Linux + 104) +#define __NR_getitimer (__NR_Linux + 105) +#define __NR_stat (__NR_Linux + 106) +#define __NR_lstat (__NR_Linux + 107) +#define __NR_fstat (__NR_Linux + 108) +#define __NR_unused109 (__NR_Linux + 109) +#define __NR_iopl (__NR_Linux + 110) +#define __NR_vhangup (__NR_Linux + 111) +#define __NR_idle (__NR_Linux + 112) +#define __NR_vm86 (__NR_Linux + 113) +#define __NR_wait4 (__NR_Linux + 114) +#define __NR_swapoff (__NR_Linux + 115) +#define __NR_sysinfo (__NR_Linux + 116) +#define __NR_ipc (__NR_Linux + 117) +#define __NR_fsync (__NR_Linux + 118) +#define __NR_sigreturn (__NR_Linux + 119) +#define __NR_clone (__NR_Linux + 120) +#define __NR_setdomainname (__NR_Linux + 121) +#define __NR_uname (__NR_Linux + 122) +#define __NR_modify_ldt (__NR_Linux + 123) +#define __NR_adjtimex (__NR_Linux + 124) +#define __NR_mprotect (__NR_Linux + 125) +#define __NR_sigprocmask (__NR_Linux + 126) +#define __NR_create_module (__NR_Linux + 127) +#define __NR_init_module (__NR_Linux + 128) +#define __NR_delete_module (__NR_Linux + 129) +#define __NR_get_kernel_syms (__NR_Linux + 130) +#define __NR_quotactl (__NR_Linux + 131) +#define __NR_getpgid (__NR_Linux + 132) +#define __NR_fchdir (__NR_Linux + 133) +#define __NR_bdflush (__NR_Linux + 134) +#define __NR_sysfs (__NR_Linux + 135) +#define __NR_personality (__NR_Linux + 136) +#define __NR_afs_syscall (__NR_Linux + 137) /* Syscall for Andrew File System */ +#define __NR_setfsuid (__NR_Linux + 138) +#define __NR_setfsgid (__NR_Linux + 139) +#define __NR__llseek (__NR_Linux + 140) +#define __NR_getdents (__NR_Linux + 141) +#define __NR__newselect (__NR_Linux + 142) +#define __NR_flock (__NR_Linux + 143) +#define __NR_msync (__NR_Linux + 144) +#define __NR_readv (__NR_Linux + 145) +#define __NR_writev (__NR_Linux + 146) +#define __NR_cacheflush (__NR_Linux + 147) +#define __NR_cachectl (__NR_Linux + 148) +#define __NR_sysmips (__NR_Linux + 149) +#define __NR_unused150 (__NR_Linux + 150) +#define __NR_getsid (__NR_Linux + 151) +#define __NR_fdatasync (__NR_Linux + 152) +#define __NR__sysctl (__NR_Linux + 153) +#define __NR_mlock (__NR_Linux + 154) +#define __NR_munlock (__NR_Linux + 155) +#define __NR_mlockall (__NR_Linux + 156) +#define __NR_munlockall (__NR_Linux + 157) +#define __NR_sched_setparam (__NR_Linux + 158) +#define __NR_sched_getparam (__NR_Linux + 159) +#define __NR_sched_setscheduler (__NR_Linux + 160) +#define __NR_sched_getscheduler (__NR_Linux + 161) +#define __NR_sched_yield (__NR_Linux + 162) +#define __NR_sched_get_priority_max (__NR_Linux + 163) +#define __NR_sched_get_priority_min (__NR_Linux + 164) +#define __NR_sched_rr_get_interval (__NR_Linux + 165) +#define __NR_nanosleep (__NR_Linux + 166) +#define __NR_mremap (__NR_Linux + 167) +#define __NR_accept (__NR_Linux + 168) +#define __NR_bind (__NR_Linux + 169) +#define __NR_connect (__NR_Linux + 170) +#define __NR_getpeername (__NR_Linux + 171) +#define __NR_getsockname (__NR_Linux + 172) +#define __NR_getsockopt (__NR_Linux + 173) +#define __NR_listen (__NR_Linux + 174) +#define __NR_recv (__NR_Linux + 175) +#define __NR_recvfrom (__NR_Linux + 176) +#define __NR_recvmsg (__NR_Linux + 177) +#define __NR_send (__NR_Linux + 178) +#define __NR_sendmsg (__NR_Linux + 179) +#define __NR_sendto (__NR_Linux + 180) +#define __NR_setsockopt (__NR_Linux + 181) +#define __NR_shutdown (__NR_Linux + 182) +#define __NR_socket (__NR_Linux + 183) +#define __NR_socketpair (__NR_Linux + 184) +#define __NR_setresuid (__NR_Linux + 185) +#define __NR_getresuid (__NR_Linux + 186) +#define __NR_query_module (__NR_Linux + 187) +#define __NR_poll (__NR_Linux + 188) +#define __NR_nfsservctl (__NR_Linux + 189) +#define __NR_setresgid (__NR_Linux + 190) +#define __NR_getresgid (__NR_Linux + 191) +#define __NR_prctl (__NR_Linux + 192) +#define __NR_rt_sigreturn (__NR_Linux + 193) +#define __NR_rt_sigaction (__NR_Linux + 194) +#define __NR_rt_sigprocmask (__NR_Linux + 195) +#define __NR_rt_sigpending (__NR_Linux + 196) +#define __NR_rt_sigtimedwait (__NR_Linux + 197) +#define __NR_rt_sigqueueinfo (__NR_Linux + 198) +#define __NR_rt_sigsuspend (__NR_Linux + 199) +#define __NR_pread64 (__NR_Linux + 200) +#define __NR_pwrite64 (__NR_Linux + 201) +#define __NR_chown (__NR_Linux + 202) +#define __NR_getcwd (__NR_Linux + 203) +#define __NR_capget (__NR_Linux + 204) +#define __NR_capset (__NR_Linux + 205) +#define __NR_sigaltstack (__NR_Linux + 206) +#define __NR_sendfile (__NR_Linux + 207) +#define __NR_getpmsg (__NR_Linux + 208) +#define __NR_putpmsg (__NR_Linux + 209) +#define __NR_mmap2 (__NR_Linux + 210) +#define __NR_truncate64 (__NR_Linux + 211) +#define __NR_ftruncate64 (__NR_Linux + 212) +#define __NR_stat64 (__NR_Linux + 213) +#define __NR_lstat64 (__NR_Linux + 214) +#define __NR_fstat64 (__NR_Linux + 215) +#define __NR_pivot_root (__NR_Linux + 216) +#define __NR_mincore (__NR_Linux + 217) +#define __NR_madvise (__NR_Linux + 218) +#define __NR_getdents64 (__NR_Linux + 219) +#define __NR_fcntl64 (__NR_Linux + 220) +#define __NR_reserved221 (__NR_Linux + 221) +#define __NR_gettid (__NR_Linux + 222) +#define __NR_readahead (__NR_Linux + 223) +#define __NR_setxattr (__NR_Linux + 224) +#define __NR_lsetxattr (__NR_Linux + 225) +#define __NR_fsetxattr (__NR_Linux + 226) +#define __NR_getxattr (__NR_Linux + 227) +#define __NR_lgetxattr (__NR_Linux + 228) +#define __NR_fgetxattr (__NR_Linux + 229) +#define __NR_listxattr (__NR_Linux + 230) +#define __NR_llistxattr (__NR_Linux + 231) +#define __NR_flistxattr (__NR_Linux + 232) +#define __NR_removexattr (__NR_Linux + 233) +#define __NR_lremovexattr (__NR_Linux + 234) +#define __NR_fremovexattr (__NR_Linux + 235) +#define __NR_tkill (__NR_Linux + 236) +#define __NR_sendfile64 (__NR_Linux + 237) +#define __NR_futex (__NR_Linux + 238) +#define __NR_sched_setaffinity (__NR_Linux + 239) +#define __NR_sched_getaffinity (__NR_Linux + 240) +#define __NR_io_setup (__NR_Linux + 241) +#define __NR_io_destroy (__NR_Linux + 242) +#define __NR_io_getevents (__NR_Linux + 243) +#define __NR_io_submit (__NR_Linux + 244) +#define __NR_io_cancel (__NR_Linux + 245) +#define __NR_exit_group (__NR_Linux + 246) +#define __NR_lookup_dcookie (__NR_Linux + 247) +#define __NR_epoll_create (__NR_Linux + 248) +#define __NR_epoll_ctl (__NR_Linux + 249) +#define __NR_epoll_wait (__NR_Linux + 250) +#define __NR_remap_file_pages (__NR_Linux + 251) +#define __NR_set_tid_address (__NR_Linux + 252) +#define __NR_restart_syscall (__NR_Linux + 253) +#define __NR_fadvise64 (__NR_Linux + 254) +#define __NR_statfs64 (__NR_Linux + 255) +#define __NR_fstatfs64 (__NR_Linux + 256) +#define __NR_timer_create (__NR_Linux + 257) +#define __NR_timer_settime (__NR_Linux + 258) +#define __NR_timer_gettime (__NR_Linux + 259) +#define __NR_timer_getoverrun (__NR_Linux + 260) +#define __NR_timer_delete (__NR_Linux + 261) +#define __NR_clock_settime (__NR_Linux + 262) +#define __NR_clock_gettime (__NR_Linux + 263) +#define __NR_clock_getres (__NR_Linux + 264) +#define __NR_clock_nanosleep (__NR_Linux + 265) +#define __NR_tgkill (__NR_Linux + 266) +#define __NR_utimes (__NR_Linux + 267) +#define __NR_mbind (__NR_Linux + 268) +#define __NR_get_mempolicy (__NR_Linux + 269) +#define __NR_set_mempolicy (__NR_Linux + 270) +#define __NR_mq_open (__NR_Linux + 271) +#define __NR_mq_unlink (__NR_Linux + 272) +#define __NR_mq_timedsend (__NR_Linux + 273) +#define __NR_mq_timedreceive (__NR_Linux + 274) +#define __NR_mq_notify (__NR_Linux + 275) +#define __NR_mq_getsetattr (__NR_Linux + 276) +#define __NR_vserver (__NR_Linux + 277) +#define __NR_waitid (__NR_Linux + 278) +/* #define __NR_sys_setaltroot (__NR_Linux + 279) */ +#define __NR_add_key (__NR_Linux + 280) +#define __NR_request_key (__NR_Linux + 281) +#define __NR_keyctl (__NR_Linux + 282) +#define __NR_set_thread_area (__NR_Linux + 283) +#define __NR_inotify_init (__NR_Linux + 284) +#define __NR_inotify_add_watch (__NR_Linux + 285) +#define __NR_inotify_rm_watch (__NR_Linux + 286) +#define __NR_migrate_pages (__NR_Linux + 287) +#define __NR_openat (__NR_Linux + 288) +#define __NR_mkdirat (__NR_Linux + 289) +#define __NR_mknodat (__NR_Linux + 290) +#define __NR_fchownat (__NR_Linux + 291) +#define __NR_futimesat (__NR_Linux + 292) +#define __NR_fstatat64 (__NR_Linux + 293) +#define __NR_unlinkat (__NR_Linux + 294) +#define __NR_renameat (__NR_Linux + 295) +#define __NR_linkat (__NR_Linux + 296) +#define __NR_symlinkat (__NR_Linux + 297) +#define __NR_readlinkat (__NR_Linux + 298) +#define __NR_fchmodat (__NR_Linux + 299) +#define __NR_faccessat (__NR_Linux + 300) +#define __NR_pselect6 (__NR_Linux + 301) +#define __NR_ppoll (__NR_Linux + 302) +#define __NR_unshare (__NR_Linux + 303) +#define __NR_splice (__NR_Linux + 304) +#define __NR_sync_file_range (__NR_Linux + 305) +#define __NR_tee (__NR_Linux + 306) +#define __NR_vmsplice (__NR_Linux + 307) +#define __NR_move_pages (__NR_Linux + 308) +#define __NR_set_robust_list (__NR_Linux + 309) +#define __NR_get_robust_list (__NR_Linux + 310) +#define __NR_kexec_load (__NR_Linux + 311) +#define __NR_getcpu (__NR_Linux + 312) +#define __NR_epoll_pwait (__NR_Linux + 313) +#define __NR_ioprio_set (__NR_Linux + 314) +#define __NR_ioprio_get (__NR_Linux + 315) +#define __NR_utimensat (__NR_Linux + 316) +#define __NR_signalfd (__NR_Linux + 317) +#define __NR_timerfd (__NR_Linux + 318) +#define __NR_eventfd (__NR_Linux + 319) +#define __NR_fallocate (__NR_Linux + 320) +#define __NR_timerfd_create (__NR_Linux + 321) +#define __NR_timerfd_gettime (__NR_Linux + 322) +#define __NR_timerfd_settime (__NR_Linux + 323) +#define __NR_signalfd4 (__NR_Linux + 324) +#define __NR_eventfd2 (__NR_Linux + 325) +#define __NR_epoll_create1 (__NR_Linux + 326) +#define __NR_dup3 (__NR_Linux + 327) +#define __NR_pipe2 (__NR_Linux + 328) +#define __NR_inotify_init1 (__NR_Linux + 329) +#define __NR_preadv (__NR_Linux + 330) +#define __NR_pwritev (__NR_Linux + 331) +#define __NR_rt_tgsigqueueinfo (__NR_Linux + 332) +#define __NR_perf_event_open (__NR_Linux + 333) +#define __NR_accept4 (__NR_Linux + 334) +#define __NR_recvmmsg (__NR_Linux + 335) +#define __NR_fanotify_init (__NR_Linux + 336) +#define __NR_fanotify_mark (__NR_Linux + 337) +#define __NR_prlimit64 (__NR_Linux + 338) +#define __NR_name_to_handle_at (__NR_Linux + 339) +#define __NR_open_by_handle_at (__NR_Linux + 340) +#define __NR_clock_adjtime (__NR_Linux + 341) +#define __NR_syncfs (__NR_Linux + 342) +#define __NR_sendmmsg (__NR_Linux + 343) +#define __NR_setns (__NR_Linux + 344) +#define __NR_process_vm_readv (__NR_Linux + 345) +#define __NR_process_vm_writev (__NR_Linux + 346) +#define __NR_kcmp (__NR_Linux + 347) +#define __NR_finit_module (__NR_Linux + 348) +#define __NR_sched_setattr (__NR_Linux + 349) +#define __NR_sched_getattr (__NR_Linux + 350) +#define __NR_renameat2 (__NR_Linux + 351) +#define __NR_seccomp (__NR_Linux + 352) +#define __NR_getrandom (__NR_Linux + 353) +#define __NR_memfd_create (__NR_Linux + 354) +#define __NR_bpf (__NR_Linux + 355) +#define __NR_execveat (__NR_Linux + 356) +#define __NR_userfaultfd (__NR_Linux + 357) +#define __NR_membarrier (__NR_Linux + 358) +#define __NR_mlock2 (__NR_Linux + 359) +#define __NR_copy_file_range (__NR_Linux + 360) +#define __NR_preadv2 (__NR_Linux + 361) +#define __NR_pwritev2 (__NR_Linux + 362) +#define __NR_pkey_mprotect (__NR_Linux + 363) +#define __NR_pkey_alloc (__NR_Linux + 364) +#define __NR_pkey_free (__NR_Linux + 365) +#define __NR_statx (__NR_Linux + 366) +#define __NR_rseq (__NR_Linux + 367) +#define __NR_io_pgetevents (__NR_Linux + 368) + + +/* + * Offset of the last Linux o32 flavoured syscall + */ +#define __NR_Linux_syscalls 368 + +#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ + +#define __NR_O32_Linux 4000 +#define __NR_O32_Linux_syscalls 368 + +#if _MIPS_SIM == _MIPS_SIM_ABI64 + +/* + * Linux 64-bit syscalls are in the range from 5000 to 5999. + */ +#define __NR_Linux 5000 +#define __NR_read (__NR_Linux + 0) +#define __NR_write (__NR_Linux + 1) +#define __NR_open (__NR_Linux + 2) +#define __NR_close (__NR_Linux + 3) +#define __NR_stat (__NR_Linux + 4) +#define __NR_fstat (__NR_Linux + 5) +#define __NR_lstat (__NR_Linux + 6) +#define __NR_poll (__NR_Linux + 7) +#define __NR_lseek (__NR_Linux + 8) +#define __NR_mmap (__NR_Linux + 9) +#define __NR_mprotect (__NR_Linux + 10) +#define __NR_munmap (__NR_Linux + 11) +#define __NR_brk (__NR_Linux + 12) +#define __NR_rt_sigaction (__NR_Linux + 13) +#define __NR_rt_sigprocmask (__NR_Linux + 14) +#define __NR_ioctl (__NR_Linux + 15) +#define __NR_pread64 (__NR_Linux + 16) +#define __NR_pwrite64 (__NR_Linux + 17) +#define __NR_readv (__NR_Linux + 18) +#define __NR_writev (__NR_Linux + 19) +#define __NR_access (__NR_Linux + 20) +#define __NR_pipe (__NR_Linux + 21) +#define __NR__newselect (__NR_Linux + 22) +#define __NR_sched_yield (__NR_Linux + 23) +#define __NR_mremap (__NR_Linux + 24) +#define __NR_msync (__NR_Linux + 25) +#define __NR_mincore (__NR_Linux + 26) +#define __NR_madvise (__NR_Linux + 27) +#define __NR_shmget (__NR_Linux + 28) +#define __NR_shmat (__NR_Linux + 29) +#define __NR_shmctl (__NR_Linux + 30) +#define __NR_dup (__NR_Linux + 31) +#define __NR_dup2 (__NR_Linux + 32) +#define __NR_pause (__NR_Linux + 33) +#define __NR_nanosleep (__NR_Linux + 34) +#define __NR_getitimer (__NR_Linux + 35) +#define __NR_setitimer (__NR_Linux + 36) +#define __NR_alarm (__NR_Linux + 37) +#define __NR_getpid (__NR_Linux + 38) +#define __NR_sendfile (__NR_Linux + 39) +#define __NR_socket (__NR_Linux + 40) +#define __NR_connect (__NR_Linux + 41) +#define __NR_accept (__NR_Linux + 42) +#define __NR_sendto (__NR_Linux + 43) +#define __NR_recvfrom (__NR_Linux + 44) +#define __NR_sendmsg (__NR_Linux + 45) +#define __NR_recvmsg (__NR_Linux + 46) +#define __NR_shutdown (__NR_Linux + 47) +#define __NR_bind (__NR_Linux + 48) +#define __NR_listen (__NR_Linux + 49) +#define __NR_getsockname (__NR_Linux + 50) +#define __NR_getpeername (__NR_Linux + 51) +#define __NR_socketpair (__NR_Linux + 52) +#define __NR_setsockopt (__NR_Linux + 53) +#define __NR_getsockopt (__NR_Linux + 54) +#define __NR_clone (__NR_Linux + 55) +#define __NR_fork (__NR_Linux + 56) +#define __NR_execve (__NR_Linux + 57) +#define __NR_exit (__NR_Linux + 58) +#define __NR_wait4 (__NR_Linux + 59) +#define __NR_kill (__NR_Linux + 60) +#define __NR_uname (__NR_Linux + 61) +#define __NR_semget (__NR_Linux + 62) +#define __NR_semop (__NR_Linux + 63) +#define __NR_semctl (__NR_Linux + 64) +#define __NR_shmdt (__NR_Linux + 65) +#define __NR_msgget (__NR_Linux + 66) +#define __NR_msgsnd (__NR_Linux + 67) +#define __NR_msgrcv (__NR_Linux + 68) +#define __NR_msgctl (__NR_Linux + 69) +#define __NR_fcntl (__NR_Linux + 70) +#define __NR_flock (__NR_Linux + 71) +#define __NR_fsync (__NR_Linux + 72) +#define __NR_fdatasync (__NR_Linux + 73) +#define __NR_truncate (__NR_Linux + 74) +#define __NR_ftruncate (__NR_Linux + 75) +#define __NR_getdents (__NR_Linux + 76) +#define __NR_getcwd (__NR_Linux + 77) +#define __NR_chdir (__NR_Linux + 78) +#define __NR_fchdir (__NR_Linux + 79) +#define __NR_rename (__NR_Linux + 80) +#define __NR_mkdir (__NR_Linux + 81) +#define __NR_rmdir (__NR_Linux + 82) +#define __NR_creat (__NR_Linux + 83) +#define __NR_link (__NR_Linux + 84) +#define __NR_unlink (__NR_Linux + 85) +#define __NR_symlink (__NR_Linux + 86) +#define __NR_readlink (__NR_Linux + 87) +#define __NR_chmod (__NR_Linux + 88) +#define __NR_fchmod (__NR_Linux + 89) +#define __NR_chown (__NR_Linux + 90) +#define __NR_fchown (__NR_Linux + 91) +#define __NR_lchown (__NR_Linux + 92) +#define __NR_umask (__NR_Linux + 93) +#define __NR_gettimeofday (__NR_Linux + 94) +#define __NR_getrlimit (__NR_Linux + 95) +#define __NR_getrusage (__NR_Linux + 96) +#define __NR_sysinfo (__NR_Linux + 97) +#define __NR_times (__NR_Linux + 98) +#define __NR_ptrace (__NR_Linux + 99) +#define __NR_getuid (__NR_Linux + 100) +#define __NR_syslog (__NR_Linux + 101) +#define __NR_getgid (__NR_Linux + 102) +#define __NR_setuid (__NR_Linux + 103) +#define __NR_setgid (__NR_Linux + 104) +#define __NR_geteuid (__NR_Linux + 105) +#define __NR_getegid (__NR_Linux + 106) +#define __NR_setpgid (__NR_Linux + 107) +#define __NR_getppid (__NR_Linux + 108) +#define __NR_getpgrp (__NR_Linux + 109) +#define __NR_setsid (__NR_Linux + 110) +#define __NR_setreuid (__NR_Linux + 111) +#define __NR_setregid (__NR_Linux + 112) +#define __NR_getgroups (__NR_Linux + 113) +#define __NR_setgroups (__NR_Linux + 114) +#define __NR_setresuid (__NR_Linux + 115) +#define __NR_getresuid (__NR_Linux + 116) +#define __NR_setresgid (__NR_Linux + 117) +#define __NR_getresgid (__NR_Linux + 118) +#define __NR_getpgid (__NR_Linux + 119) +#define __NR_setfsuid (__NR_Linux + 120) +#define __NR_setfsgid (__NR_Linux + 121) +#define __NR_getsid (__NR_Linux + 122) +#define __NR_capget (__NR_Linux + 123) +#define __NR_capset (__NR_Linux + 124) +#define __NR_rt_sigpending (__NR_Linux + 125) +#define __NR_rt_sigtimedwait (__NR_Linux + 126) +#define __NR_rt_sigqueueinfo (__NR_Linux + 127) +#define __NR_rt_sigsuspend (__NR_Linux + 128) +#define __NR_sigaltstack (__NR_Linux + 129) +#define __NR_utime (__NR_Linux + 130) +#define __NR_mknod (__NR_Linux + 131) +#define __NR_personality (__NR_Linux + 132) +#define __NR_ustat (__NR_Linux + 133) +#define __NR_statfs (__NR_Linux + 134) +#define __NR_fstatfs (__NR_Linux + 135) +#define __NR_sysfs (__NR_Linux + 136) +#define __NR_getpriority (__NR_Linux + 137) +#define __NR_setpriority (__NR_Linux + 138) +#define __NR_sched_setparam (__NR_Linux + 139) +#define __NR_sched_getparam (__NR_Linux + 140) +#define __NR_sched_setscheduler (__NR_Linux + 141) +#define __NR_sched_getscheduler (__NR_Linux + 142) +#define __NR_sched_get_priority_max (__NR_Linux + 143) +#define __NR_sched_get_priority_min (__NR_Linux + 144) +#define __NR_sched_rr_get_interval (__NR_Linux + 145) +#define __NR_mlock (__NR_Linux + 146) +#define __NR_munlock (__NR_Linux + 147) +#define __NR_mlockall (__NR_Linux + 148) +#define __NR_munlockall (__NR_Linux + 149) +#define __NR_vhangup (__NR_Linux + 150) +#define __NR_pivot_root (__NR_Linux + 151) +#define __NR__sysctl (__NR_Linux + 152) +#define __NR_prctl (__NR_Linux + 153) +#define __NR_adjtimex (__NR_Linux + 154) +#define __NR_setrlimit (__NR_Linux + 155) +#define __NR_chroot (__NR_Linux + 156) +#define __NR_sync (__NR_Linux + 157) +#define __NR_acct (__NR_Linux + 158) +#define __NR_settimeofday (__NR_Linux + 159) +#define __NR_mount (__NR_Linux + 160) +#define __NR_umount2 (__NR_Linux + 161) +#define __NR_swapon (__NR_Linux + 162) +#define __NR_swapoff (__NR_Linux + 163) +#define __NR_reboot (__NR_Linux + 164) +#define __NR_sethostname (__NR_Linux + 165) +#define __NR_setdomainname (__NR_Linux + 166) +#define __NR_create_module (__NR_Linux + 167) +#define __NR_init_module (__NR_Linux + 168) +#define __NR_delete_module (__NR_Linux + 169) +#define __NR_get_kernel_syms (__NR_Linux + 170) +#define __NR_query_module (__NR_Linux + 171) +#define __NR_quotactl (__NR_Linux + 172) +#define __NR_nfsservctl (__NR_Linux + 173) +#define __NR_getpmsg (__NR_Linux + 174) +#define __NR_putpmsg (__NR_Linux + 175) +#define __NR_afs_syscall (__NR_Linux + 176) +#define __NR_reserved177 (__NR_Linux + 177) +#define __NR_gettid (__NR_Linux + 178) +#define __NR_readahead (__NR_Linux + 179) +#define __NR_setxattr (__NR_Linux + 180) +#define __NR_lsetxattr (__NR_Linux + 181) +#define __NR_fsetxattr (__NR_Linux + 182) +#define __NR_getxattr (__NR_Linux + 183) +#define __NR_lgetxattr (__NR_Linux + 184) +#define __NR_fgetxattr (__NR_Linux + 185) +#define __NR_listxattr (__NR_Linux + 186) +#define __NR_llistxattr (__NR_Linux + 187) +#define __NR_flistxattr (__NR_Linux + 188) +#define __NR_removexattr (__NR_Linux + 189) +#define __NR_lremovexattr (__NR_Linux + 190) +#define __NR_fremovexattr (__NR_Linux + 191) +#define __NR_tkill (__NR_Linux + 192) +#define __NR_reserved193 (__NR_Linux + 193) +#define __NR_futex (__NR_Linux + 194) +#define __NR_sched_setaffinity (__NR_Linux + 195) +#define __NR_sched_getaffinity (__NR_Linux + 196) +#define __NR_cacheflush (__NR_Linux + 197) +#define __NR_cachectl (__NR_Linux + 198) +#define __NR_sysmips (__NR_Linux + 199) +#define __NR_io_setup (__NR_Linux + 200) +#define __NR_io_destroy (__NR_Linux + 201) +#define __NR_io_getevents (__NR_Linux + 202) +#define __NR_io_submit (__NR_Linux + 203) +#define __NR_io_cancel (__NR_Linux + 204) +#define __NR_exit_group (__NR_Linux + 205) +#define __NR_lookup_dcookie (__NR_Linux + 206) +#define __NR_epoll_create (__NR_Linux + 207) +#define __NR_epoll_ctl (__NR_Linux + 208) +#define __NR_epoll_wait (__NR_Linux + 209) +#define __NR_remap_file_pages (__NR_Linux + 210) +#define __NR_rt_sigreturn (__NR_Linux + 211) +#define __NR_set_tid_address (__NR_Linux + 212) +#define __NR_restart_syscall (__NR_Linux + 213) +#define __NR_semtimedop (__NR_Linux + 214) +#define __NR_fadvise64 (__NR_Linux + 215) +#define __NR_timer_create (__NR_Linux + 216) +#define __NR_timer_settime (__NR_Linux + 217) +#define __NR_timer_gettime (__NR_Linux + 218) +#define __NR_timer_getoverrun (__NR_Linux + 219) +#define __NR_timer_delete (__NR_Linux + 220) +#define __NR_clock_settime (__NR_Linux + 221) +#define __NR_clock_gettime (__NR_Linux + 222) +#define __NR_clock_getres (__NR_Linux + 223) +#define __NR_clock_nanosleep (__NR_Linux + 224) +#define __NR_tgkill (__NR_Linux + 225) +#define __NR_utimes (__NR_Linux + 226) +#define __NR_mbind (__NR_Linux + 227) +#define __NR_get_mempolicy (__NR_Linux + 228) +#define __NR_set_mempolicy (__NR_Linux + 229) +#define __NR_mq_open (__NR_Linux + 230) +#define __NR_mq_unlink (__NR_Linux + 231) +#define __NR_mq_timedsend (__NR_Linux + 232) +#define __NR_mq_timedreceive (__NR_Linux + 233) +#define __NR_mq_notify (__NR_Linux + 234) +#define __NR_mq_getsetattr (__NR_Linux + 235) +#define __NR_vserver (__NR_Linux + 236) +#define __NR_waitid (__NR_Linux + 237) +/* #define __NR_sys_setaltroot (__NR_Linux + 238) */ +#define __NR_add_key (__NR_Linux + 239) +#define __NR_request_key (__NR_Linux + 240) +#define __NR_keyctl (__NR_Linux + 241) +#define __NR_set_thread_area (__NR_Linux + 242) +#define __NR_inotify_init (__NR_Linux + 243) +#define __NR_inotify_add_watch (__NR_Linux + 244) +#define __NR_inotify_rm_watch (__NR_Linux + 245) +#define __NR_migrate_pages (__NR_Linux + 246) +#define __NR_openat (__NR_Linux + 247) +#define __NR_mkdirat (__NR_Linux + 248) +#define __NR_mknodat (__NR_Linux + 249) +#define __NR_fchownat (__NR_Linux + 250) +#define __NR_futimesat (__NR_Linux + 251) +#define __NR_newfstatat (__NR_Linux + 252) +#define __NR_unlinkat (__NR_Linux + 253) +#define __NR_renameat (__NR_Linux + 254) +#define __NR_linkat (__NR_Linux + 255) +#define __NR_symlinkat (__NR_Linux + 256) +#define __NR_readlinkat (__NR_Linux + 257) +#define __NR_fchmodat (__NR_Linux + 258) +#define __NR_faccessat (__NR_Linux + 259) +#define __NR_pselect6 (__NR_Linux + 260) +#define __NR_ppoll (__NR_Linux + 261) +#define __NR_unshare (__NR_Linux + 262) +#define __NR_splice (__NR_Linux + 263) +#define __NR_sync_file_range (__NR_Linux + 264) +#define __NR_tee (__NR_Linux + 265) +#define __NR_vmsplice (__NR_Linux + 266) +#define __NR_move_pages (__NR_Linux + 267) +#define __NR_set_robust_list (__NR_Linux + 268) +#define __NR_get_robust_list (__NR_Linux + 269) +#define __NR_kexec_load (__NR_Linux + 270) +#define __NR_getcpu (__NR_Linux + 271) +#define __NR_epoll_pwait (__NR_Linux + 272) +#define __NR_ioprio_set (__NR_Linux + 273) +#define __NR_ioprio_get (__NR_Linux + 274) +#define __NR_utimensat (__NR_Linux + 275) +#define __NR_signalfd (__NR_Linux + 276) +#define __NR_timerfd (__NR_Linux + 277) +#define __NR_eventfd (__NR_Linux + 278) +#define __NR_fallocate (__NR_Linux + 279) +#define __NR_timerfd_create (__NR_Linux + 280) +#define __NR_timerfd_gettime (__NR_Linux + 281) +#define __NR_timerfd_settime (__NR_Linux + 282) +#define __NR_signalfd4 (__NR_Linux + 283) +#define __NR_eventfd2 (__NR_Linux + 284) +#define __NR_epoll_create1 (__NR_Linux + 285) +#define __NR_dup3 (__NR_Linux + 286) +#define __NR_pipe2 (__NR_Linux + 287) +#define __NR_inotify_init1 (__NR_Linux + 288) +#define __NR_preadv (__NR_Linux + 289) +#define __NR_pwritev (__NR_Linux + 290) +#define __NR_rt_tgsigqueueinfo (__NR_Linux + 291) +#define __NR_perf_event_open (__NR_Linux + 292) +#define __NR_accept4 (__NR_Linux + 293) +#define __NR_recvmmsg (__NR_Linux + 294) +#define __NR_fanotify_init (__NR_Linux + 295) +#define __NR_fanotify_mark (__NR_Linux + 296) +#define __NR_prlimit64 (__NR_Linux + 297) +#define __NR_name_to_handle_at (__NR_Linux + 298) +#define __NR_open_by_handle_at (__NR_Linux + 299) +#define __NR_clock_adjtime (__NR_Linux + 300) +#define __NR_syncfs (__NR_Linux + 301) +#define __NR_sendmmsg (__NR_Linux + 302) +#define __NR_setns (__NR_Linux + 303) +#define __NR_process_vm_readv (__NR_Linux + 304) +#define __NR_process_vm_writev (__NR_Linux + 305) +#define __NR_kcmp (__NR_Linux + 306) +#define __NR_finit_module (__NR_Linux + 307) +#define __NR_getdents64 (__NR_Linux + 308) +#define __NR_sched_setattr (__NR_Linux + 309) +#define __NR_sched_getattr (__NR_Linux + 310) +#define __NR_renameat2 (__NR_Linux + 311) +#define __NR_seccomp (__NR_Linux + 312) +#define __NR_getrandom (__NR_Linux + 313) +#define __NR_memfd_create (__NR_Linux + 314) +#define __NR_bpf (__NR_Linux + 315) +#define __NR_execveat (__NR_Linux + 316) +#define __NR_userfaultfd (__NR_Linux + 317) +#define __NR_membarrier (__NR_Linux + 318) +#define __NR_mlock2 (__NR_Linux + 319) +#define __NR_copy_file_range (__NR_Linux + 320) +#define __NR_preadv2 (__NR_Linux + 321) +#define __NR_pwritev2 (__NR_Linux + 322) +#define __NR_pkey_mprotect (__NR_Linux + 323) +#define __NR_pkey_alloc (__NR_Linux + 324) +#define __NR_pkey_free (__NR_Linux + 325) +#define __NR_statx (__NR_Linux + 326) +#define __NR_rseq (__NR_Linux + 327) +#define __NR_io_pgetevents (__NR_Linux + 328) + +/* + * Offset of the last Linux 64-bit flavoured syscall + */ +#define __NR_Linux_syscalls 328 + +#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ + +#define __NR_64_Linux 5000 +#define __NR_64_Linux_syscalls 328 + +#if _MIPS_SIM == _MIPS_SIM_NABI32 + +/* + * Linux N32 syscalls are in the range from 6000 to 6999. + */ +#define __NR_Linux 6000 +#define __NR_read (__NR_Linux + 0) +#define __NR_write (__NR_Linux + 1) +#define __NR_open (__NR_Linux + 2) +#define __NR_close (__NR_Linux + 3) +#define __NR_stat (__NR_Linux + 4) +#define __NR_fstat (__NR_Linux + 5) +#define __NR_lstat (__NR_Linux + 6) +#define __NR_poll (__NR_Linux + 7) +#define __NR_lseek (__NR_Linux + 8) +#define __NR_mmap (__NR_Linux + 9) +#define __NR_mprotect (__NR_Linux + 10) +#define __NR_munmap (__NR_Linux + 11) +#define __NR_brk (__NR_Linux + 12) +#define __NR_rt_sigaction (__NR_Linux + 13) +#define __NR_rt_sigprocmask (__NR_Linux + 14) +#define __NR_ioctl (__NR_Linux + 15) +#define __NR_pread64 (__NR_Linux + 16) +#define __NR_pwrite64 (__NR_Linux + 17) +#define __NR_readv (__NR_Linux + 18) +#define __NR_writev (__NR_Linux + 19) +#define __NR_access (__NR_Linux + 20) +#define __NR_pipe (__NR_Linux + 21) +#define __NR__newselect (__NR_Linux + 22) +#define __NR_sched_yield (__NR_Linux + 23) +#define __NR_mremap (__NR_Linux + 24) +#define __NR_msync (__NR_Linux + 25) +#define __NR_mincore (__NR_Linux + 26) +#define __NR_madvise (__NR_Linux + 27) +#define __NR_shmget (__NR_Linux + 28) +#define __NR_shmat (__NR_Linux + 29) +#define __NR_shmctl (__NR_Linux + 30) +#define __NR_dup (__NR_Linux + 31) +#define __NR_dup2 (__NR_Linux + 32) +#define __NR_pause (__NR_Linux + 33) +#define __NR_nanosleep (__NR_Linux + 34) +#define __NR_getitimer (__NR_Linux + 35) +#define __NR_setitimer (__NR_Linux + 36) +#define __NR_alarm (__NR_Linux + 37) +#define __NR_getpid (__NR_Linux + 38) +#define __NR_sendfile (__NR_Linux + 39) +#define __NR_socket (__NR_Linux + 40) +#define __NR_connect (__NR_Linux + 41) +#define __NR_accept (__NR_Linux + 42) +#define __NR_sendto (__NR_Linux + 43) +#define __NR_recvfrom (__NR_Linux + 44) +#define __NR_sendmsg (__NR_Linux + 45) +#define __NR_recvmsg (__NR_Linux + 46) +#define __NR_shutdown (__NR_Linux + 47) +#define __NR_bind (__NR_Linux + 48) +#define __NR_listen (__NR_Linux + 49) +#define __NR_getsockname (__NR_Linux + 50) +#define __NR_getpeername (__NR_Linux + 51) +#define __NR_socketpair (__NR_Linux + 52) +#define __NR_setsockopt (__NR_Linux + 53) +#define __NR_getsockopt (__NR_Linux + 54) +#define __NR_clone (__NR_Linux + 55) +#define __NR_fork (__NR_Linux + 56) +#define __NR_execve (__NR_Linux + 57) +#define __NR_exit (__NR_Linux + 58) +#define __NR_wait4 (__NR_Linux + 59) +#define __NR_kill (__NR_Linux + 60) +#define __NR_uname (__NR_Linux + 61) +#define __NR_semget (__NR_Linux + 62) +#define __NR_semop (__NR_Linux + 63) +#define __NR_semctl (__NR_Linux + 64) +#define __NR_shmdt (__NR_Linux + 65) +#define __NR_msgget (__NR_Linux + 66) +#define __NR_msgsnd (__NR_Linux + 67) +#define __NR_msgrcv (__NR_Linux + 68) +#define __NR_msgctl (__NR_Linux + 69) +#define __NR_fcntl (__NR_Linux + 70) +#define __NR_flock (__NR_Linux + 71) +#define __NR_fsync (__NR_Linux + 72) +#define __NR_fdatasync (__NR_Linux + 73) +#define __NR_truncate (__NR_Linux + 74) +#define __NR_ftruncate (__NR_Linux + 75) +#define __NR_getdents (__NR_Linux + 76) +#define __NR_getcwd (__NR_Linux + 77) +#define __NR_chdir (__NR_Linux + 78) +#define __NR_fchdir (__NR_Linux + 79) +#define __NR_rename (__NR_Linux + 80) +#define __NR_mkdir (__NR_Linux + 81) +#define __NR_rmdir (__NR_Linux + 82) +#define __NR_creat (__NR_Linux + 83) +#define __NR_link (__NR_Linux + 84) +#define __NR_unlink (__NR_Linux + 85) +#define __NR_symlink (__NR_Linux + 86) +#define __NR_readlink (__NR_Linux + 87) +#define __NR_chmod (__NR_Linux + 88) +#define __NR_fchmod (__NR_Linux + 89) +#define __NR_chown (__NR_Linux + 90) +#define __NR_fchown (__NR_Linux + 91) +#define __NR_lchown (__NR_Linux + 92) +#define __NR_umask (__NR_Linux + 93) +#define __NR_gettimeofday (__NR_Linux + 94) +#define __NR_getrlimit (__NR_Linux + 95) +#define __NR_getrusage (__NR_Linux + 96) +#define __NR_sysinfo (__NR_Linux + 97) +#define __NR_times (__NR_Linux + 98) +#define __NR_ptrace (__NR_Linux + 99) +#define __NR_getuid (__NR_Linux + 100) +#define __NR_syslog (__NR_Linux + 101) +#define __NR_getgid (__NR_Linux + 102) +#define __NR_setuid (__NR_Linux + 103) +#define __NR_setgid (__NR_Linux + 104) +#define __NR_geteuid (__NR_Linux + 105) +#define __NR_getegid (__NR_Linux + 106) +#define __NR_setpgid (__NR_Linux + 107) +#define __NR_getppid (__NR_Linux + 108) +#define __NR_getpgrp (__NR_Linux + 109) +#define __NR_setsid (__NR_Linux + 110) +#define __NR_setreuid (__NR_Linux + 111) +#define __NR_setregid (__NR_Linux + 112) +#define __NR_getgroups (__NR_Linux + 113) +#define __NR_setgroups (__NR_Linux + 114) +#define __NR_setresuid (__NR_Linux + 115) +#define __NR_getresuid (__NR_Linux + 116) +#define __NR_setresgid (__NR_Linux + 117) +#define __NR_getresgid (__NR_Linux + 118) +#define __NR_getpgid (__NR_Linux + 119) +#define __NR_setfsuid (__NR_Linux + 120) +#define __NR_setfsgid (__NR_Linux + 121) +#define __NR_getsid (__NR_Linux + 122) +#define __NR_capget (__NR_Linux + 123) +#define __NR_capset (__NR_Linux + 124) +#define __NR_rt_sigpending (__NR_Linux + 125) +#define __NR_rt_sigtimedwait (__NR_Linux + 126) +#define __NR_rt_sigqueueinfo (__NR_Linux + 127) +#define __NR_rt_sigsuspend (__NR_Linux + 128) +#define __NR_sigaltstack (__NR_Linux + 129) +#define __NR_utime (__NR_Linux + 130) +#define __NR_mknod (__NR_Linux + 131) +#define __NR_personality (__NR_Linux + 132) +#define __NR_ustat (__NR_Linux + 133) +#define __NR_statfs (__NR_Linux + 134) +#define __NR_fstatfs (__NR_Linux + 135) +#define __NR_sysfs (__NR_Linux + 136) +#define __NR_getpriority (__NR_Linux + 137) +#define __NR_setpriority (__NR_Linux + 138) +#define __NR_sched_setparam (__NR_Linux + 139) +#define __NR_sched_getparam (__NR_Linux + 140) +#define __NR_sched_setscheduler (__NR_Linux + 141) +#define __NR_sched_getscheduler (__NR_Linux + 142) +#define __NR_sched_get_priority_max (__NR_Linux + 143) +#define __NR_sched_get_priority_min (__NR_Linux + 144) +#define __NR_sched_rr_get_interval (__NR_Linux + 145) +#define __NR_mlock (__NR_Linux + 146) +#define __NR_munlock (__NR_Linux + 147) +#define __NR_mlockall (__NR_Linux + 148) +#define __NR_munlockall (__NR_Linux + 149) +#define __NR_vhangup (__NR_Linux + 150) +#define __NR_pivot_root (__NR_Linux + 151) +#define __NR__sysctl (__NR_Linux + 152) +#define __NR_prctl (__NR_Linux + 153) +#define __NR_adjtimex (__NR_Linux + 154) +#define __NR_setrlimit (__NR_Linux + 155) +#define __NR_chroot (__NR_Linux + 156) +#define __NR_sync (__NR_Linux + 157) +#define __NR_acct (__NR_Linux + 158) +#define __NR_settimeofday (__NR_Linux + 159) +#define __NR_mount (__NR_Linux + 160) +#define __NR_umount2 (__NR_Linux + 161) +#define __NR_swapon (__NR_Linux + 162) +#define __NR_swapoff (__NR_Linux + 163) +#define __NR_reboot (__NR_Linux + 164) +#define __NR_sethostname (__NR_Linux + 165) +#define __NR_setdomainname (__NR_Linux + 166) +#define __NR_create_module (__NR_Linux + 167) +#define __NR_init_module (__NR_Linux + 168) +#define __NR_delete_module (__NR_Linux + 169) +#define __NR_get_kernel_syms (__NR_Linux + 170) +#define __NR_query_module (__NR_Linux + 171) +#define __NR_quotactl (__NR_Linux + 172) +#define __NR_nfsservctl (__NR_Linux + 173) +#define __NR_getpmsg (__NR_Linux + 174) +#define __NR_putpmsg (__NR_Linux + 175) +#define __NR_afs_syscall (__NR_Linux + 176) +#define __NR_reserved177 (__NR_Linux + 177) +#define __NR_gettid (__NR_Linux + 178) +#define __NR_readahead (__NR_Linux + 179) +#define __NR_setxattr (__NR_Linux + 180) +#define __NR_lsetxattr (__NR_Linux + 181) +#define __NR_fsetxattr (__NR_Linux + 182) +#define __NR_getxattr (__NR_Linux + 183) +#define __NR_lgetxattr (__NR_Linux + 184) +#define __NR_fgetxattr (__NR_Linux + 185) +#define __NR_listxattr (__NR_Linux + 186) +#define __NR_llistxattr (__NR_Linux + 187) +#define __NR_flistxattr (__NR_Linux + 188) +#define __NR_removexattr (__NR_Linux + 189) +#define __NR_lremovexattr (__NR_Linux + 190) +#define __NR_fremovexattr (__NR_Linux + 191) +#define __NR_tkill (__NR_Linux + 192) +#define __NR_reserved193 (__NR_Linux + 193) +#define __NR_futex (__NR_Linux + 194) +#define __NR_sched_setaffinity (__NR_Linux + 195) +#define __NR_sched_getaffinity (__NR_Linux + 196) +#define __NR_cacheflush (__NR_Linux + 197) +#define __NR_cachectl (__NR_Linux + 198) +#define __NR_sysmips (__NR_Linux + 199) +#define __NR_io_setup (__NR_Linux + 200) +#define __NR_io_destroy (__NR_Linux + 201) +#define __NR_io_getevents (__NR_Linux + 202) +#define __NR_io_submit (__NR_Linux + 203) +#define __NR_io_cancel (__NR_Linux + 204) +#define __NR_exit_group (__NR_Linux + 205) +#define __NR_lookup_dcookie (__NR_Linux + 206) +#define __NR_epoll_create (__NR_Linux + 207) +#define __NR_epoll_ctl (__NR_Linux + 208) +#define __NR_epoll_wait (__NR_Linux + 209) +#define __NR_remap_file_pages (__NR_Linux + 210) +#define __NR_rt_sigreturn (__NR_Linux + 211) +#define __NR_fcntl64 (__NR_Linux + 212) +#define __NR_set_tid_address (__NR_Linux + 213) +#define __NR_restart_syscall (__NR_Linux + 214) +#define __NR_semtimedop (__NR_Linux + 215) +#define __NR_fadvise64 (__NR_Linux + 216) +#define __NR_statfs64 (__NR_Linux + 217) +#define __NR_fstatfs64 (__NR_Linux + 218) +#define __NR_sendfile64 (__NR_Linux + 219) +#define __NR_timer_create (__NR_Linux + 220) +#define __NR_timer_settime (__NR_Linux + 221) +#define __NR_timer_gettime (__NR_Linux + 222) +#define __NR_timer_getoverrun (__NR_Linux + 223) +#define __NR_timer_delete (__NR_Linux + 224) +#define __NR_clock_settime (__NR_Linux + 225) +#define __NR_clock_gettime (__NR_Linux + 226) +#define __NR_clock_getres (__NR_Linux + 227) +#define __NR_clock_nanosleep (__NR_Linux + 228) +#define __NR_tgkill (__NR_Linux + 229) +#define __NR_utimes (__NR_Linux + 230) +#define __NR_mbind (__NR_Linux + 231) +#define __NR_get_mempolicy (__NR_Linux + 232) +#define __NR_set_mempolicy (__NR_Linux + 233) +#define __NR_mq_open (__NR_Linux + 234) +#define __NR_mq_unlink (__NR_Linux + 235) +#define __NR_mq_timedsend (__NR_Linux + 236) +#define __NR_mq_timedreceive (__NR_Linux + 237) +#define __NR_mq_notify (__NR_Linux + 238) +#define __NR_mq_getsetattr (__NR_Linux + 239) +#define __NR_vserver (__NR_Linux + 240) +#define __NR_waitid (__NR_Linux + 241) +/* #define __NR_sys_setaltroot (__NR_Linux + 242) */ +#define __NR_add_key (__NR_Linux + 243) +#define __NR_request_key (__NR_Linux + 244) +#define __NR_keyctl (__NR_Linux + 245) +#define __NR_set_thread_area (__NR_Linux + 246) +#define __NR_inotify_init (__NR_Linux + 247) +#define __NR_inotify_add_watch (__NR_Linux + 248) +#define __NR_inotify_rm_watch (__NR_Linux + 249) +#define __NR_migrate_pages (__NR_Linux + 250) +#define __NR_openat (__NR_Linux + 251) +#define __NR_mkdirat (__NR_Linux + 252) +#define __NR_mknodat (__NR_Linux + 253) +#define __NR_fchownat (__NR_Linux + 254) +#define __NR_futimesat (__NR_Linux + 255) +#define __NR_newfstatat (__NR_Linux + 256) +#define __NR_unlinkat (__NR_Linux + 257) +#define __NR_renameat (__NR_Linux + 258) +#define __NR_linkat (__NR_Linux + 259) +#define __NR_symlinkat (__NR_Linux + 260) +#define __NR_readlinkat (__NR_Linux + 261) +#define __NR_fchmodat (__NR_Linux + 262) +#define __NR_faccessat (__NR_Linux + 263) +#define __NR_pselect6 (__NR_Linux + 264) +#define __NR_ppoll (__NR_Linux + 265) +#define __NR_unshare (__NR_Linux + 266) +#define __NR_splice (__NR_Linux + 267) +#define __NR_sync_file_range (__NR_Linux + 268) +#define __NR_tee (__NR_Linux + 269) +#define __NR_vmsplice (__NR_Linux + 270) +#define __NR_move_pages (__NR_Linux + 271) +#define __NR_set_robust_list (__NR_Linux + 272) +#define __NR_get_robust_list (__NR_Linux + 273) +#define __NR_kexec_load (__NR_Linux + 274) +#define __NR_getcpu (__NR_Linux + 275) +#define __NR_epoll_pwait (__NR_Linux + 276) +#define __NR_ioprio_set (__NR_Linux + 277) +#define __NR_ioprio_get (__NR_Linux + 278) +#define __NR_utimensat (__NR_Linux + 279) +#define __NR_signalfd (__NR_Linux + 280) +#define __NR_timerfd (__NR_Linux + 281) +#define __NR_eventfd (__NR_Linux + 282) +#define __NR_fallocate (__NR_Linux + 283) +#define __NR_timerfd_create (__NR_Linux + 284) +#define __NR_timerfd_gettime (__NR_Linux + 285) +#define __NR_timerfd_settime (__NR_Linux + 286) +#define __NR_signalfd4 (__NR_Linux + 287) +#define __NR_eventfd2 (__NR_Linux + 288) +#define __NR_epoll_create1 (__NR_Linux + 289) +#define __NR_dup3 (__NR_Linux + 290) +#define __NR_pipe2 (__NR_Linux + 291) +#define __NR_inotify_init1 (__NR_Linux + 292) +#define __NR_preadv (__NR_Linux + 293) +#define __NR_pwritev (__NR_Linux + 294) +#define __NR_rt_tgsigqueueinfo (__NR_Linux + 295) +#define __NR_perf_event_open (__NR_Linux + 296) +#define __NR_accept4 (__NR_Linux + 297) +#define __NR_recvmmsg (__NR_Linux + 298) +#define __NR_getdents64 (__NR_Linux + 299) +#define __NR_fanotify_init (__NR_Linux + 300) +#define __NR_fanotify_mark (__NR_Linux + 301) +#define __NR_prlimit64 (__NR_Linux + 302) +#define __NR_name_to_handle_at (__NR_Linux + 303) +#define __NR_open_by_handle_at (__NR_Linux + 304) +#define __NR_clock_adjtime (__NR_Linux + 305) +#define __NR_syncfs (__NR_Linux + 306) +#define __NR_sendmmsg (__NR_Linux + 307) +#define __NR_setns (__NR_Linux + 308) +#define __NR_process_vm_readv (__NR_Linux + 309) +#define __NR_process_vm_writev (__NR_Linux + 310) +#define __NR_kcmp (__NR_Linux + 311) +#define __NR_finit_module (__NR_Linux + 312) +#define __NR_sched_setattr (__NR_Linux + 313) +#define __NR_sched_getattr (__NR_Linux + 314) +#define __NR_renameat2 (__NR_Linux + 315) +#define __NR_seccomp (__NR_Linux + 316) +#define __NR_getrandom (__NR_Linux + 317) +#define __NR_memfd_create (__NR_Linux + 318) +#define __NR_bpf (__NR_Linux + 319) +#define __NR_execveat (__NR_Linux + 320) +#define __NR_userfaultfd (__NR_Linux + 321) +#define __NR_membarrier (__NR_Linux + 322) +#define __NR_mlock2 (__NR_Linux + 323) +#define __NR_copy_file_range (__NR_Linux + 324) +#define __NR_preadv2 (__NR_Linux + 325) +#define __NR_pwritev2 (__NR_Linux + 326) +#define __NR_pkey_mprotect (__NR_Linux + 327) +#define __NR_pkey_alloc (__NR_Linux + 328) +#define __NR_pkey_free (__NR_Linux + 329) +#define __NR_statx (__NR_Linux + 330) +#define __NR_rseq (__NR_Linux + 331) +#define __NR_io_pgetevents (__NR_Linux + 332) + +/* + * Offset of the last N32 flavoured syscall + */ +#define __NR_Linux_syscalls 332 + +#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ + +#define __NR_N32_Linux 6000 +#define __NR_N32_Linux_syscalls 332 + +#endif /* _UAPI_ASM_UNISTD_H */ diff --git a/libc/include/mips64el-linux-gnuabi64/bits/dlfcn.h b/libc/include/mips64el-linux-gnuabi64/bits/dlfcn.h new file mode 100644 index 0000000000..996be6f45b --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/dlfcn.h @@ -0,0 +1,64 @@ +/* System dependent definitions for run-time dynamic loading. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/errno.h b/libc/include/mips64el-linux-gnuabi64/bits/errno.h new file mode 100644 index 0000000000..2d6069ad8a --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/errno.h @@ -0,0 +1,52 @@ +/* Error constants. MIPS/Linux specific version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/eventfd.h b/libc/include/mips64el-linux-gnuabi64/bits/eventfd.h new file mode 100644 index 0000000000..9ff48c23fb --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/eventfd.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2007-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/inotify.h b/libc/include/mips64el-linux-gnuabi64/bits/inotify.h new file mode 100644 index 0000000000..d063466c30 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/inotify.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/ioctl-types.h b/libc/include/mips64el-linux-gnuabi64/bits/ioctl-types.h new file mode 100644 index 0000000000..bfbdac6f57 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/ioctl-types.h @@ -0,0 +1,75 @@ +/* Structure types for pre-termios terminal ioctls. Linux/MIPS version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/ipc.h b/libc/include/mips64el-linux-gnuabi64/bits/ipc.h new file mode 100644 index 0000000000..e994ffc9ad --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/ipc.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IPC_H +# error "Never use directly; include instead." +#endif + +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#ifdef __USE_GNU +# define IPC_INFO 3 /* See ipcs. */ +#endif + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + unsigned int uid; /* Owner's user ID. */ + unsigned int gid; /* Owner's group ID. */ + unsigned int cuid; /* Creator's user ID. */ + unsigned int cgid; /* Creator's group ID. */ + unsigned int mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ + unsigned short int __pad1; + unsigned long int __glibc_reserved1; + unsigned long int __glibc_reserved2; +}; \ No newline at end of file diff --git a/libc/include/mips64el-linux-gnuabi64/bits/ipctypes.h b/libc/include/mips64el-linux-gnuabi64/bits/ipctypes.h new file mode 100644 index 0000000000..ffea8d325c --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/ipctypes.h @@ -0,0 +1,31 @@ +/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* + * Never include directly. + */ + +#ifndef _BITS_IPCTYPES_H +#define _BITS_IPCTYPES_H 1 + +#include + +typedef __SLONG32_TYPE __ipc_pid_t; + + +#endif /* bits/ipctypes.h */ \ No newline at end of file diff --git a/libc/include/mips64el-linux-gnuabi64/bits/local_lim.h b/libc/include/mips64el-linux-gnuabi64/bits/local_lim.h new file mode 100644 index 0000000000..96b65eb686 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/local_lim.h @@ -0,0 +1,99 @@ +/* Minimum guaranteed maximum values for system limits. MIPS Linux version. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. At least two pages with 64k pages. */ +#define PTHREAD_STACK_MIN 131072 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) \ No newline at end of file diff --git a/libc/include/mips64el-linux-gnuabi64/bits/mman.h b/libc/include/mips64el-linux-gnuabi64/bits/mman.h new file mode 100644 index 0000000000..43c768ab5e --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/mman.h @@ -0,0 +1,48 @@ +/* Definitions for POSIX memory map interface. Linux/MIPS version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h b/libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h new file mode 100644 index 0000000000..2cde6ddf34 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/msq-pad.h @@ -0,0 +1,31 @@ +/* Define where padding goes in struct msqid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include + +#ifdef __MIPSEL__ +# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32) +# define __MSQ_PAD_BEFORE_TIME 0 +#else +# define __MSQ_PAD_AFTER_TIME 0 +# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) +#endif \ No newline at end of file diff --git a/libc/include/mips64el-linux-gnuabi64/bits/poll.h b/libc/include/mips64el-linux-gnuabi64/bits/poll.h new file mode 100644 index 0000000000..7793460007 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/poll.h @@ -0,0 +1,49 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/resource.h b/libc/include/mips64el-linux-gnuabi64/bits/resource.h new file mode 100644 index 0000000000..2f200b1025 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/resource.h @@ -0,0 +1,231 @@ +/* Bit values & structures for resource limits. Linux/MIPS version. + Copyright (C) 1994-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 µs 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/libc/include/mips64el-linux-gnuabi64/bits/sem-pad.h b/libc/include/mips64el-linux-gnuabi64/bits/sem-pad.h new file mode 100644 index 0000000000..b1810b2080 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/sem-pad.h @@ -0,0 +1,24 @@ +/* Define where padding goes in struct semid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SEM_H +# error "Never use directly; include instead." +#endif + +#define __SEM_PAD_AFTER_TIME 0 +#define __SEM_PAD_BEFORE_TIME 0 \ No newline at end of file diff --git a/libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h b/libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h new file mode 100644 index 0000000000..e672c8c7b0 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/shm-pad.h @@ -0,0 +1,26 @@ +/* Define where padding goes in struct shmid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SHM_H +# error "Never use directly; include instead." +#endif + +#define __SHM_PAD_AFTER_TIME 0 +#define __SHM_PAD_BEFORE_TIME 0 +#define __SHM_SEGSZ_AFTER_TIME 0 +#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 \ No newline at end of file diff --git a/libc/include/mips64el-linux-gnuabi64/bits/shmlba.h b/libc/include/mips64el-linux-gnuabi64/bits/shmlba.h new file mode 100644 index 0000000000..9561decd9a --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/shmlba.h @@ -0,0 +1,24 @@ +/* Define SHMLBA. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/sigaction.h b/libc/include/mips64el-linux-gnuabi64/bits/sigaction.h new file mode 100644 index 0000000000..bbc6004b59 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/sigaction.h @@ -0,0 +1,94 @@ +/* The proper definitions for Linux/MIPS's sigaction. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/sigcontext.h b/libc/include/mips64el-linux-gnuabi64/bits/sigcontext.h new file mode 100644 index 0000000000..231695c93f --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/sigcontext.h @@ -0,0 +1,82 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/siginfo-arch.h b/libc/include/mips64el-linux-gnuabi64/bits/siginfo-arch.h new file mode 100644 index 0000000000..d639ba2076 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/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/libc/include/mips64el-linux-gnuabi64/bits/signalfd.h b/libc/include/mips64el-linux-gnuabi64/bits/signalfd.h new file mode 100644 index 0000000000..a8f5275551 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/signalfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2007-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/signum.h b/libc/include/mips64el-linux-gnuabi64/bits/signum.h new file mode 100644 index 0000000000..e3cd97af8b --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/signum.h @@ -0,0 +1,68 @@ +/* Signal number definitions. Linux/MIPS version. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use instead." +#endif + +#include + +/* Adjustments and additions to the signal number constants for + Linux/MIPS. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGPWR 19 /* Power failure imminent. */ + +#undef SIGUSR1 +#define SIGUSR1 16 +#undef SIGUSR2 +#define SIGUSR2 17 +#undef SIGCHLD +#define SIGCHLD 18 +#undef SIGWINCH +#define SIGWINCH 20 +#undef SIGURG +#define SIGURG 21 +#undef SIGPOLL +#define SIGPOLL 22 +#undef SIGSTOP +#define SIGSTOP 23 +#undef SIGTSTP +#define SIGTSTP 24 +#undef SIGCONT +#define SIGCONT 25 +#undef SIGTTIN +#define SIGTTIN 26 +#undef SIGTTOU +#define SIGTTOU 27 +#undef SIGVTALRM +#define SIGVTALRM 28 +#undef SIGPROF +#define SIGPROF 29 +#undef SIGXCPU +#define SIGXCPU 30 +#undef SIGXFSZ +#define SIGXFSZ 31 + +#undef __SIGRTMAX +#define __SIGRTMAX 127 + +#endif /* included. */ \ No newline at end of file diff --git a/libc/include/mips64el-linux-gnuabi64/bits/socket_type.h b/libc/include/mips64el-linux-gnuabi64/bits/socket_type.h new file mode 100644 index 0000000000..4c976f179e --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/socket_type.h @@ -0,0 +1,55 @@ +/* Define enum __socket_type for Linux/MIPS. + Copyright (C) 1991-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/statfs.h b/libc/include/mips64el-linux-gnuabi64/bits/statfs.h new file mode 100644 index 0000000000..fd0f68d6d7 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/statfs.h @@ -0,0 +1,73 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/termios-c_cc.h b/libc/include/mips64el-linux-gnuabi64/bits/termios-c_cc.h new file mode 100644 index 0000000000..ed124b8db4 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/termios-c_cc.h @@ -0,0 +1,43 @@ +/* termios c_cc symbolic constant definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/termios-c_lflag.h b/libc/include/mips64el-linux-gnuabi64/bits/termios-c_lflag.h new file mode 100644 index 0000000000..e5a6773476 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/termios-c_lflag.h @@ -0,0 +1,46 @@ +/* termios local mode definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/termios-struct.h b/libc/include/mips64el-linux-gnuabi64/bits/termios-struct.h new file mode 100644 index 0000000000..0442c6f354 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/termios-struct.h @@ -0,0 +1,34 @@ +/* struct termios definition. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/termios-tcflow.h b/libc/include/mips64el-linux-gnuabi64/bits/termios-tcflow.h new file mode 100644 index 0000000000..2c523c3a2a --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/termios-tcflow.h @@ -0,0 +1,26 @@ +/* termios local mode definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/timerfd.h b/libc/include/mips64el-linux-gnuabi64/bits/timerfd.h new file mode 100644 index 0000000000..005d411617 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/timerfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2008-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/bits/types/stack_t.h b/libc/include/mips64el-linux-gnuabi64/bits/types/stack_t.h new file mode 100644 index 0000000000..b62c348140 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/bits/types/stack_t.h @@ -0,0 +1,33 @@ +/* Define stack_t. MIPS Linux version. + Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabi64/ieee754.h b/libc/include/mips64el-linux-gnuabi64/ieee754.h new file mode 100644 index 0000000000..600dbce3d8 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabi64/ieee754.h @@ -0,0 +1,323 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#include + +__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/libc/include/mips64el-linux-gnuabin32/asm/sgidefs.h b/libc/include/mips64el-linux-gnuabin32/asm/sgidefs.h new file mode 100644 index 0000000000..26143e3b7c --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/asm/sgidefs.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1996, 1999, 2001 Ralf Baechle + * Copyright (C) 1999 Silicon Graphics, Inc. + * Copyright (C) 2001 MIPS Technologies, Inc. + */ +#ifndef __ASM_SGIDEFS_H +#define __ASM_SGIDEFS_H + +/* + * Using a Linux compiler for building Linux seems logic but not to + * everybody. + */ +#ifndef __linux__ +#error Use a Linux compiler or give up. +#endif + +/* + * Definitions for the ISA levels + * + * With the introduction of MIPS32 / MIPS64 instruction sets definitions + * MIPS ISAs are no longer subsets of each other. Therefore comparisons + * on these symbols except with == may result in unexpected results and + * are forbidden! + */ +#define _MIPS_ISA_MIPS1 1 +#define _MIPS_ISA_MIPS2 2 +#define _MIPS_ISA_MIPS3 3 +#define _MIPS_ISA_MIPS4 4 +#define _MIPS_ISA_MIPS5 5 +#define _MIPS_ISA_MIPS32 6 +#define _MIPS_ISA_MIPS64 7 + +/* + * Subprogram calling convention + */ +#define _MIPS_SIM_ABI32 1 +#define _MIPS_SIM_NABI32 2 +#define _MIPS_SIM_ABI64 3 + +#endif /* __ASM_SGIDEFS_H */ diff --git a/libc/include/mips64el-linux-gnuabin32/asm/unistd.h b/libc/include/mips64el-linux-gnuabin32/asm/unistd.h new file mode 100644 index 0000000000..f25dd1d83f --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/asm/unistd.h @@ -0,0 +1,1101 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle + * Copyright (C) 1999, 2000 Silicon Graphics, Inc. + * + * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto + * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A + */ +#ifndef _UAPI_ASM_UNISTD_H +#define _UAPI_ASM_UNISTD_H + +#include + +#if _MIPS_SIM == _MIPS_SIM_ABI32 + +/* + * Linux o32 style syscalls are in the range from 4000 to 4999. + */ +#define __NR_Linux 4000 +#define __NR_syscall (__NR_Linux + 0) +#define __NR_exit (__NR_Linux + 1) +#define __NR_fork (__NR_Linux + 2) +#define __NR_read (__NR_Linux + 3) +#define __NR_write (__NR_Linux + 4) +#define __NR_open (__NR_Linux + 5) +#define __NR_close (__NR_Linux + 6) +#define __NR_waitpid (__NR_Linux + 7) +#define __NR_creat (__NR_Linux + 8) +#define __NR_link (__NR_Linux + 9) +#define __NR_unlink (__NR_Linux + 10) +#define __NR_execve (__NR_Linux + 11) +#define __NR_chdir (__NR_Linux + 12) +#define __NR_time (__NR_Linux + 13) +#define __NR_mknod (__NR_Linux + 14) +#define __NR_chmod (__NR_Linux + 15) +#define __NR_lchown (__NR_Linux + 16) +#define __NR_break (__NR_Linux + 17) +#define __NR_unused18 (__NR_Linux + 18) +#define __NR_lseek (__NR_Linux + 19) +#define __NR_getpid (__NR_Linux + 20) +#define __NR_mount (__NR_Linux + 21) +#define __NR_umount (__NR_Linux + 22) +#define __NR_setuid (__NR_Linux + 23) +#define __NR_getuid (__NR_Linux + 24) +#define __NR_stime (__NR_Linux + 25) +#define __NR_ptrace (__NR_Linux + 26) +#define __NR_alarm (__NR_Linux + 27) +#define __NR_unused28 (__NR_Linux + 28) +#define __NR_pause (__NR_Linux + 29) +#define __NR_utime (__NR_Linux + 30) +#define __NR_stty (__NR_Linux + 31) +#define __NR_gtty (__NR_Linux + 32) +#define __NR_access (__NR_Linux + 33) +#define __NR_nice (__NR_Linux + 34) +#define __NR_ftime (__NR_Linux + 35) +#define __NR_sync (__NR_Linux + 36) +#define __NR_kill (__NR_Linux + 37) +#define __NR_rename (__NR_Linux + 38) +#define __NR_mkdir (__NR_Linux + 39) +#define __NR_rmdir (__NR_Linux + 40) +#define __NR_dup (__NR_Linux + 41) +#define __NR_pipe (__NR_Linux + 42) +#define __NR_times (__NR_Linux + 43) +#define __NR_prof (__NR_Linux + 44) +#define __NR_brk (__NR_Linux + 45) +#define __NR_setgid (__NR_Linux + 46) +#define __NR_getgid (__NR_Linux + 47) +#define __NR_signal (__NR_Linux + 48) +#define __NR_geteuid (__NR_Linux + 49) +#define __NR_getegid (__NR_Linux + 50) +#define __NR_acct (__NR_Linux + 51) +#define __NR_umount2 (__NR_Linux + 52) +#define __NR_lock (__NR_Linux + 53) +#define __NR_ioctl (__NR_Linux + 54) +#define __NR_fcntl (__NR_Linux + 55) +#define __NR_mpx (__NR_Linux + 56) +#define __NR_setpgid (__NR_Linux + 57) +#define __NR_ulimit (__NR_Linux + 58) +#define __NR_unused59 (__NR_Linux + 59) +#define __NR_umask (__NR_Linux + 60) +#define __NR_chroot (__NR_Linux + 61) +#define __NR_ustat (__NR_Linux + 62) +#define __NR_dup2 (__NR_Linux + 63) +#define __NR_getppid (__NR_Linux + 64) +#define __NR_getpgrp (__NR_Linux + 65) +#define __NR_setsid (__NR_Linux + 66) +#define __NR_sigaction (__NR_Linux + 67) +#define __NR_sgetmask (__NR_Linux + 68) +#define __NR_ssetmask (__NR_Linux + 69) +#define __NR_setreuid (__NR_Linux + 70) +#define __NR_setregid (__NR_Linux + 71) +#define __NR_sigsuspend (__NR_Linux + 72) +#define __NR_sigpending (__NR_Linux + 73) +#define __NR_sethostname (__NR_Linux + 74) +#define __NR_setrlimit (__NR_Linux + 75) +#define __NR_getrlimit (__NR_Linux + 76) +#define __NR_getrusage (__NR_Linux + 77) +#define __NR_gettimeofday (__NR_Linux + 78) +#define __NR_settimeofday (__NR_Linux + 79) +#define __NR_getgroups (__NR_Linux + 80) +#define __NR_setgroups (__NR_Linux + 81) +#define __NR_reserved82 (__NR_Linux + 82) +#define __NR_symlink (__NR_Linux + 83) +#define __NR_unused84 (__NR_Linux + 84) +#define __NR_readlink (__NR_Linux + 85) +#define __NR_uselib (__NR_Linux + 86) +#define __NR_swapon (__NR_Linux + 87) +#define __NR_reboot (__NR_Linux + 88) +#define __NR_readdir (__NR_Linux + 89) +#define __NR_mmap (__NR_Linux + 90) +#define __NR_munmap (__NR_Linux + 91) +#define __NR_truncate (__NR_Linux + 92) +#define __NR_ftruncate (__NR_Linux + 93) +#define __NR_fchmod (__NR_Linux + 94) +#define __NR_fchown (__NR_Linux + 95) +#define __NR_getpriority (__NR_Linux + 96) +#define __NR_setpriority (__NR_Linux + 97) +#define __NR_profil (__NR_Linux + 98) +#define __NR_statfs (__NR_Linux + 99) +#define __NR_fstatfs (__NR_Linux + 100) +#define __NR_ioperm (__NR_Linux + 101) +#define __NR_socketcall (__NR_Linux + 102) +#define __NR_syslog (__NR_Linux + 103) +#define __NR_setitimer (__NR_Linux + 104) +#define __NR_getitimer (__NR_Linux + 105) +#define __NR_stat (__NR_Linux + 106) +#define __NR_lstat (__NR_Linux + 107) +#define __NR_fstat (__NR_Linux + 108) +#define __NR_unused109 (__NR_Linux + 109) +#define __NR_iopl (__NR_Linux + 110) +#define __NR_vhangup (__NR_Linux + 111) +#define __NR_idle (__NR_Linux + 112) +#define __NR_vm86 (__NR_Linux + 113) +#define __NR_wait4 (__NR_Linux + 114) +#define __NR_swapoff (__NR_Linux + 115) +#define __NR_sysinfo (__NR_Linux + 116) +#define __NR_ipc (__NR_Linux + 117) +#define __NR_fsync (__NR_Linux + 118) +#define __NR_sigreturn (__NR_Linux + 119) +#define __NR_clone (__NR_Linux + 120) +#define __NR_setdomainname (__NR_Linux + 121) +#define __NR_uname (__NR_Linux + 122) +#define __NR_modify_ldt (__NR_Linux + 123) +#define __NR_adjtimex (__NR_Linux + 124) +#define __NR_mprotect (__NR_Linux + 125) +#define __NR_sigprocmask (__NR_Linux + 126) +#define __NR_create_module (__NR_Linux + 127) +#define __NR_init_module (__NR_Linux + 128) +#define __NR_delete_module (__NR_Linux + 129) +#define __NR_get_kernel_syms (__NR_Linux + 130) +#define __NR_quotactl (__NR_Linux + 131) +#define __NR_getpgid (__NR_Linux + 132) +#define __NR_fchdir (__NR_Linux + 133) +#define __NR_bdflush (__NR_Linux + 134) +#define __NR_sysfs (__NR_Linux + 135) +#define __NR_personality (__NR_Linux + 136) +#define __NR_afs_syscall (__NR_Linux + 137) /* Syscall for Andrew File System */ +#define __NR_setfsuid (__NR_Linux + 138) +#define __NR_setfsgid (__NR_Linux + 139) +#define __NR__llseek (__NR_Linux + 140) +#define __NR_getdents (__NR_Linux + 141) +#define __NR__newselect (__NR_Linux + 142) +#define __NR_flock (__NR_Linux + 143) +#define __NR_msync (__NR_Linux + 144) +#define __NR_readv (__NR_Linux + 145) +#define __NR_writev (__NR_Linux + 146) +#define __NR_cacheflush (__NR_Linux + 147) +#define __NR_cachectl (__NR_Linux + 148) +#define __NR_sysmips (__NR_Linux + 149) +#define __NR_unused150 (__NR_Linux + 150) +#define __NR_getsid (__NR_Linux + 151) +#define __NR_fdatasync (__NR_Linux + 152) +#define __NR__sysctl (__NR_Linux + 153) +#define __NR_mlock (__NR_Linux + 154) +#define __NR_munlock (__NR_Linux + 155) +#define __NR_mlockall (__NR_Linux + 156) +#define __NR_munlockall (__NR_Linux + 157) +#define __NR_sched_setparam (__NR_Linux + 158) +#define __NR_sched_getparam (__NR_Linux + 159) +#define __NR_sched_setscheduler (__NR_Linux + 160) +#define __NR_sched_getscheduler (__NR_Linux + 161) +#define __NR_sched_yield (__NR_Linux + 162) +#define __NR_sched_get_priority_max (__NR_Linux + 163) +#define __NR_sched_get_priority_min (__NR_Linux + 164) +#define __NR_sched_rr_get_interval (__NR_Linux + 165) +#define __NR_nanosleep (__NR_Linux + 166) +#define __NR_mremap (__NR_Linux + 167) +#define __NR_accept (__NR_Linux + 168) +#define __NR_bind (__NR_Linux + 169) +#define __NR_connect (__NR_Linux + 170) +#define __NR_getpeername (__NR_Linux + 171) +#define __NR_getsockname (__NR_Linux + 172) +#define __NR_getsockopt (__NR_Linux + 173) +#define __NR_listen (__NR_Linux + 174) +#define __NR_recv (__NR_Linux + 175) +#define __NR_recvfrom (__NR_Linux + 176) +#define __NR_recvmsg (__NR_Linux + 177) +#define __NR_send (__NR_Linux + 178) +#define __NR_sendmsg (__NR_Linux + 179) +#define __NR_sendto (__NR_Linux + 180) +#define __NR_setsockopt (__NR_Linux + 181) +#define __NR_shutdown (__NR_Linux + 182) +#define __NR_socket (__NR_Linux + 183) +#define __NR_socketpair (__NR_Linux + 184) +#define __NR_setresuid (__NR_Linux + 185) +#define __NR_getresuid (__NR_Linux + 186) +#define __NR_query_module (__NR_Linux + 187) +#define __NR_poll (__NR_Linux + 188) +#define __NR_nfsservctl (__NR_Linux + 189) +#define __NR_setresgid (__NR_Linux + 190) +#define __NR_getresgid (__NR_Linux + 191) +#define __NR_prctl (__NR_Linux + 192) +#define __NR_rt_sigreturn (__NR_Linux + 193) +#define __NR_rt_sigaction (__NR_Linux + 194) +#define __NR_rt_sigprocmask (__NR_Linux + 195) +#define __NR_rt_sigpending (__NR_Linux + 196) +#define __NR_rt_sigtimedwait (__NR_Linux + 197) +#define __NR_rt_sigqueueinfo (__NR_Linux + 198) +#define __NR_rt_sigsuspend (__NR_Linux + 199) +#define __NR_pread64 (__NR_Linux + 200) +#define __NR_pwrite64 (__NR_Linux + 201) +#define __NR_chown (__NR_Linux + 202) +#define __NR_getcwd (__NR_Linux + 203) +#define __NR_capget (__NR_Linux + 204) +#define __NR_capset (__NR_Linux + 205) +#define __NR_sigaltstack (__NR_Linux + 206) +#define __NR_sendfile (__NR_Linux + 207) +#define __NR_getpmsg (__NR_Linux + 208) +#define __NR_putpmsg (__NR_Linux + 209) +#define __NR_mmap2 (__NR_Linux + 210) +#define __NR_truncate64 (__NR_Linux + 211) +#define __NR_ftruncate64 (__NR_Linux + 212) +#define __NR_stat64 (__NR_Linux + 213) +#define __NR_lstat64 (__NR_Linux + 214) +#define __NR_fstat64 (__NR_Linux + 215) +#define __NR_pivot_root (__NR_Linux + 216) +#define __NR_mincore (__NR_Linux + 217) +#define __NR_madvise (__NR_Linux + 218) +#define __NR_getdents64 (__NR_Linux + 219) +#define __NR_fcntl64 (__NR_Linux + 220) +#define __NR_reserved221 (__NR_Linux + 221) +#define __NR_gettid (__NR_Linux + 222) +#define __NR_readahead (__NR_Linux + 223) +#define __NR_setxattr (__NR_Linux + 224) +#define __NR_lsetxattr (__NR_Linux + 225) +#define __NR_fsetxattr (__NR_Linux + 226) +#define __NR_getxattr (__NR_Linux + 227) +#define __NR_lgetxattr (__NR_Linux + 228) +#define __NR_fgetxattr (__NR_Linux + 229) +#define __NR_listxattr (__NR_Linux + 230) +#define __NR_llistxattr (__NR_Linux + 231) +#define __NR_flistxattr (__NR_Linux + 232) +#define __NR_removexattr (__NR_Linux + 233) +#define __NR_lremovexattr (__NR_Linux + 234) +#define __NR_fremovexattr (__NR_Linux + 235) +#define __NR_tkill (__NR_Linux + 236) +#define __NR_sendfile64 (__NR_Linux + 237) +#define __NR_futex (__NR_Linux + 238) +#define __NR_sched_setaffinity (__NR_Linux + 239) +#define __NR_sched_getaffinity (__NR_Linux + 240) +#define __NR_io_setup (__NR_Linux + 241) +#define __NR_io_destroy (__NR_Linux + 242) +#define __NR_io_getevents (__NR_Linux + 243) +#define __NR_io_submit (__NR_Linux + 244) +#define __NR_io_cancel (__NR_Linux + 245) +#define __NR_exit_group (__NR_Linux + 246) +#define __NR_lookup_dcookie (__NR_Linux + 247) +#define __NR_epoll_create (__NR_Linux + 248) +#define __NR_epoll_ctl (__NR_Linux + 249) +#define __NR_epoll_wait (__NR_Linux + 250) +#define __NR_remap_file_pages (__NR_Linux + 251) +#define __NR_set_tid_address (__NR_Linux + 252) +#define __NR_restart_syscall (__NR_Linux + 253) +#define __NR_fadvise64 (__NR_Linux + 254) +#define __NR_statfs64 (__NR_Linux + 255) +#define __NR_fstatfs64 (__NR_Linux + 256) +#define __NR_timer_create (__NR_Linux + 257) +#define __NR_timer_settime (__NR_Linux + 258) +#define __NR_timer_gettime (__NR_Linux + 259) +#define __NR_timer_getoverrun (__NR_Linux + 260) +#define __NR_timer_delete (__NR_Linux + 261) +#define __NR_clock_settime (__NR_Linux + 262) +#define __NR_clock_gettime (__NR_Linux + 263) +#define __NR_clock_getres (__NR_Linux + 264) +#define __NR_clock_nanosleep (__NR_Linux + 265) +#define __NR_tgkill (__NR_Linux + 266) +#define __NR_utimes (__NR_Linux + 267) +#define __NR_mbind (__NR_Linux + 268) +#define __NR_get_mempolicy (__NR_Linux + 269) +#define __NR_set_mempolicy (__NR_Linux + 270) +#define __NR_mq_open (__NR_Linux + 271) +#define __NR_mq_unlink (__NR_Linux + 272) +#define __NR_mq_timedsend (__NR_Linux + 273) +#define __NR_mq_timedreceive (__NR_Linux + 274) +#define __NR_mq_notify (__NR_Linux + 275) +#define __NR_mq_getsetattr (__NR_Linux + 276) +#define __NR_vserver (__NR_Linux + 277) +#define __NR_waitid (__NR_Linux + 278) +/* #define __NR_sys_setaltroot (__NR_Linux + 279) */ +#define __NR_add_key (__NR_Linux + 280) +#define __NR_request_key (__NR_Linux + 281) +#define __NR_keyctl (__NR_Linux + 282) +#define __NR_set_thread_area (__NR_Linux + 283) +#define __NR_inotify_init (__NR_Linux + 284) +#define __NR_inotify_add_watch (__NR_Linux + 285) +#define __NR_inotify_rm_watch (__NR_Linux + 286) +#define __NR_migrate_pages (__NR_Linux + 287) +#define __NR_openat (__NR_Linux + 288) +#define __NR_mkdirat (__NR_Linux + 289) +#define __NR_mknodat (__NR_Linux + 290) +#define __NR_fchownat (__NR_Linux + 291) +#define __NR_futimesat (__NR_Linux + 292) +#define __NR_fstatat64 (__NR_Linux + 293) +#define __NR_unlinkat (__NR_Linux + 294) +#define __NR_renameat (__NR_Linux + 295) +#define __NR_linkat (__NR_Linux + 296) +#define __NR_symlinkat (__NR_Linux + 297) +#define __NR_readlinkat (__NR_Linux + 298) +#define __NR_fchmodat (__NR_Linux + 299) +#define __NR_faccessat (__NR_Linux + 300) +#define __NR_pselect6 (__NR_Linux + 301) +#define __NR_ppoll (__NR_Linux + 302) +#define __NR_unshare (__NR_Linux + 303) +#define __NR_splice (__NR_Linux + 304) +#define __NR_sync_file_range (__NR_Linux + 305) +#define __NR_tee (__NR_Linux + 306) +#define __NR_vmsplice (__NR_Linux + 307) +#define __NR_move_pages (__NR_Linux + 308) +#define __NR_set_robust_list (__NR_Linux + 309) +#define __NR_get_robust_list (__NR_Linux + 310) +#define __NR_kexec_load (__NR_Linux + 311) +#define __NR_getcpu (__NR_Linux + 312) +#define __NR_epoll_pwait (__NR_Linux + 313) +#define __NR_ioprio_set (__NR_Linux + 314) +#define __NR_ioprio_get (__NR_Linux + 315) +#define __NR_utimensat (__NR_Linux + 316) +#define __NR_signalfd (__NR_Linux + 317) +#define __NR_timerfd (__NR_Linux + 318) +#define __NR_eventfd (__NR_Linux + 319) +#define __NR_fallocate (__NR_Linux + 320) +#define __NR_timerfd_create (__NR_Linux + 321) +#define __NR_timerfd_gettime (__NR_Linux + 322) +#define __NR_timerfd_settime (__NR_Linux + 323) +#define __NR_signalfd4 (__NR_Linux + 324) +#define __NR_eventfd2 (__NR_Linux + 325) +#define __NR_epoll_create1 (__NR_Linux + 326) +#define __NR_dup3 (__NR_Linux + 327) +#define __NR_pipe2 (__NR_Linux + 328) +#define __NR_inotify_init1 (__NR_Linux + 329) +#define __NR_preadv (__NR_Linux + 330) +#define __NR_pwritev (__NR_Linux + 331) +#define __NR_rt_tgsigqueueinfo (__NR_Linux + 332) +#define __NR_perf_event_open (__NR_Linux + 333) +#define __NR_accept4 (__NR_Linux + 334) +#define __NR_recvmmsg (__NR_Linux + 335) +#define __NR_fanotify_init (__NR_Linux + 336) +#define __NR_fanotify_mark (__NR_Linux + 337) +#define __NR_prlimit64 (__NR_Linux + 338) +#define __NR_name_to_handle_at (__NR_Linux + 339) +#define __NR_open_by_handle_at (__NR_Linux + 340) +#define __NR_clock_adjtime (__NR_Linux + 341) +#define __NR_syncfs (__NR_Linux + 342) +#define __NR_sendmmsg (__NR_Linux + 343) +#define __NR_setns (__NR_Linux + 344) +#define __NR_process_vm_readv (__NR_Linux + 345) +#define __NR_process_vm_writev (__NR_Linux + 346) +#define __NR_kcmp (__NR_Linux + 347) +#define __NR_finit_module (__NR_Linux + 348) +#define __NR_sched_setattr (__NR_Linux + 349) +#define __NR_sched_getattr (__NR_Linux + 350) +#define __NR_renameat2 (__NR_Linux + 351) +#define __NR_seccomp (__NR_Linux + 352) +#define __NR_getrandom (__NR_Linux + 353) +#define __NR_memfd_create (__NR_Linux + 354) +#define __NR_bpf (__NR_Linux + 355) +#define __NR_execveat (__NR_Linux + 356) +#define __NR_userfaultfd (__NR_Linux + 357) +#define __NR_membarrier (__NR_Linux + 358) +#define __NR_mlock2 (__NR_Linux + 359) +#define __NR_copy_file_range (__NR_Linux + 360) +#define __NR_preadv2 (__NR_Linux + 361) +#define __NR_pwritev2 (__NR_Linux + 362) +#define __NR_pkey_mprotect (__NR_Linux + 363) +#define __NR_pkey_alloc (__NR_Linux + 364) +#define __NR_pkey_free (__NR_Linux + 365) +#define __NR_statx (__NR_Linux + 366) +#define __NR_rseq (__NR_Linux + 367) +#define __NR_io_pgetevents (__NR_Linux + 368) + + +/* + * Offset of the last Linux o32 flavoured syscall + */ +#define __NR_Linux_syscalls 368 + +#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ + +#define __NR_O32_Linux 4000 +#define __NR_O32_Linux_syscalls 368 + +#if _MIPS_SIM == _MIPS_SIM_ABI64 + +/* + * Linux 64-bit syscalls are in the range from 5000 to 5999. + */ +#define __NR_Linux 5000 +#define __NR_read (__NR_Linux + 0) +#define __NR_write (__NR_Linux + 1) +#define __NR_open (__NR_Linux + 2) +#define __NR_close (__NR_Linux + 3) +#define __NR_stat (__NR_Linux + 4) +#define __NR_fstat (__NR_Linux + 5) +#define __NR_lstat (__NR_Linux + 6) +#define __NR_poll (__NR_Linux + 7) +#define __NR_lseek (__NR_Linux + 8) +#define __NR_mmap (__NR_Linux + 9) +#define __NR_mprotect (__NR_Linux + 10) +#define __NR_munmap (__NR_Linux + 11) +#define __NR_brk (__NR_Linux + 12) +#define __NR_rt_sigaction (__NR_Linux + 13) +#define __NR_rt_sigprocmask (__NR_Linux + 14) +#define __NR_ioctl (__NR_Linux + 15) +#define __NR_pread64 (__NR_Linux + 16) +#define __NR_pwrite64 (__NR_Linux + 17) +#define __NR_readv (__NR_Linux + 18) +#define __NR_writev (__NR_Linux + 19) +#define __NR_access (__NR_Linux + 20) +#define __NR_pipe (__NR_Linux + 21) +#define __NR__newselect (__NR_Linux + 22) +#define __NR_sched_yield (__NR_Linux + 23) +#define __NR_mremap (__NR_Linux + 24) +#define __NR_msync (__NR_Linux + 25) +#define __NR_mincore (__NR_Linux + 26) +#define __NR_madvise (__NR_Linux + 27) +#define __NR_shmget (__NR_Linux + 28) +#define __NR_shmat (__NR_Linux + 29) +#define __NR_shmctl (__NR_Linux + 30) +#define __NR_dup (__NR_Linux + 31) +#define __NR_dup2 (__NR_Linux + 32) +#define __NR_pause (__NR_Linux + 33) +#define __NR_nanosleep (__NR_Linux + 34) +#define __NR_getitimer (__NR_Linux + 35) +#define __NR_setitimer (__NR_Linux + 36) +#define __NR_alarm (__NR_Linux + 37) +#define __NR_getpid (__NR_Linux + 38) +#define __NR_sendfile (__NR_Linux + 39) +#define __NR_socket (__NR_Linux + 40) +#define __NR_connect (__NR_Linux + 41) +#define __NR_accept (__NR_Linux + 42) +#define __NR_sendto (__NR_Linux + 43) +#define __NR_recvfrom (__NR_Linux + 44) +#define __NR_sendmsg (__NR_Linux + 45) +#define __NR_recvmsg (__NR_Linux + 46) +#define __NR_shutdown (__NR_Linux + 47) +#define __NR_bind (__NR_Linux + 48) +#define __NR_listen (__NR_Linux + 49) +#define __NR_getsockname (__NR_Linux + 50) +#define __NR_getpeername (__NR_Linux + 51) +#define __NR_socketpair (__NR_Linux + 52) +#define __NR_setsockopt (__NR_Linux + 53) +#define __NR_getsockopt (__NR_Linux + 54) +#define __NR_clone (__NR_Linux + 55) +#define __NR_fork (__NR_Linux + 56) +#define __NR_execve (__NR_Linux + 57) +#define __NR_exit (__NR_Linux + 58) +#define __NR_wait4 (__NR_Linux + 59) +#define __NR_kill (__NR_Linux + 60) +#define __NR_uname (__NR_Linux + 61) +#define __NR_semget (__NR_Linux + 62) +#define __NR_semop (__NR_Linux + 63) +#define __NR_semctl (__NR_Linux + 64) +#define __NR_shmdt (__NR_Linux + 65) +#define __NR_msgget (__NR_Linux + 66) +#define __NR_msgsnd (__NR_Linux + 67) +#define __NR_msgrcv (__NR_Linux + 68) +#define __NR_msgctl (__NR_Linux + 69) +#define __NR_fcntl (__NR_Linux + 70) +#define __NR_flock (__NR_Linux + 71) +#define __NR_fsync (__NR_Linux + 72) +#define __NR_fdatasync (__NR_Linux + 73) +#define __NR_truncate (__NR_Linux + 74) +#define __NR_ftruncate (__NR_Linux + 75) +#define __NR_getdents (__NR_Linux + 76) +#define __NR_getcwd (__NR_Linux + 77) +#define __NR_chdir (__NR_Linux + 78) +#define __NR_fchdir (__NR_Linux + 79) +#define __NR_rename (__NR_Linux + 80) +#define __NR_mkdir (__NR_Linux + 81) +#define __NR_rmdir (__NR_Linux + 82) +#define __NR_creat (__NR_Linux + 83) +#define __NR_link (__NR_Linux + 84) +#define __NR_unlink (__NR_Linux + 85) +#define __NR_symlink (__NR_Linux + 86) +#define __NR_readlink (__NR_Linux + 87) +#define __NR_chmod (__NR_Linux + 88) +#define __NR_fchmod (__NR_Linux + 89) +#define __NR_chown (__NR_Linux + 90) +#define __NR_fchown (__NR_Linux + 91) +#define __NR_lchown (__NR_Linux + 92) +#define __NR_umask (__NR_Linux + 93) +#define __NR_gettimeofday (__NR_Linux + 94) +#define __NR_getrlimit (__NR_Linux + 95) +#define __NR_getrusage (__NR_Linux + 96) +#define __NR_sysinfo (__NR_Linux + 97) +#define __NR_times (__NR_Linux + 98) +#define __NR_ptrace (__NR_Linux + 99) +#define __NR_getuid (__NR_Linux + 100) +#define __NR_syslog (__NR_Linux + 101) +#define __NR_getgid (__NR_Linux + 102) +#define __NR_setuid (__NR_Linux + 103) +#define __NR_setgid (__NR_Linux + 104) +#define __NR_geteuid (__NR_Linux + 105) +#define __NR_getegid (__NR_Linux + 106) +#define __NR_setpgid (__NR_Linux + 107) +#define __NR_getppid (__NR_Linux + 108) +#define __NR_getpgrp (__NR_Linux + 109) +#define __NR_setsid (__NR_Linux + 110) +#define __NR_setreuid (__NR_Linux + 111) +#define __NR_setregid (__NR_Linux + 112) +#define __NR_getgroups (__NR_Linux + 113) +#define __NR_setgroups (__NR_Linux + 114) +#define __NR_setresuid (__NR_Linux + 115) +#define __NR_getresuid (__NR_Linux + 116) +#define __NR_setresgid (__NR_Linux + 117) +#define __NR_getresgid (__NR_Linux + 118) +#define __NR_getpgid (__NR_Linux + 119) +#define __NR_setfsuid (__NR_Linux + 120) +#define __NR_setfsgid (__NR_Linux + 121) +#define __NR_getsid (__NR_Linux + 122) +#define __NR_capget (__NR_Linux + 123) +#define __NR_capset (__NR_Linux + 124) +#define __NR_rt_sigpending (__NR_Linux + 125) +#define __NR_rt_sigtimedwait (__NR_Linux + 126) +#define __NR_rt_sigqueueinfo (__NR_Linux + 127) +#define __NR_rt_sigsuspend (__NR_Linux + 128) +#define __NR_sigaltstack (__NR_Linux + 129) +#define __NR_utime (__NR_Linux + 130) +#define __NR_mknod (__NR_Linux + 131) +#define __NR_personality (__NR_Linux + 132) +#define __NR_ustat (__NR_Linux + 133) +#define __NR_statfs (__NR_Linux + 134) +#define __NR_fstatfs (__NR_Linux + 135) +#define __NR_sysfs (__NR_Linux + 136) +#define __NR_getpriority (__NR_Linux + 137) +#define __NR_setpriority (__NR_Linux + 138) +#define __NR_sched_setparam (__NR_Linux + 139) +#define __NR_sched_getparam (__NR_Linux + 140) +#define __NR_sched_setscheduler (__NR_Linux + 141) +#define __NR_sched_getscheduler (__NR_Linux + 142) +#define __NR_sched_get_priority_max (__NR_Linux + 143) +#define __NR_sched_get_priority_min (__NR_Linux + 144) +#define __NR_sched_rr_get_interval (__NR_Linux + 145) +#define __NR_mlock (__NR_Linux + 146) +#define __NR_munlock (__NR_Linux + 147) +#define __NR_mlockall (__NR_Linux + 148) +#define __NR_munlockall (__NR_Linux + 149) +#define __NR_vhangup (__NR_Linux + 150) +#define __NR_pivot_root (__NR_Linux + 151) +#define __NR__sysctl (__NR_Linux + 152) +#define __NR_prctl (__NR_Linux + 153) +#define __NR_adjtimex (__NR_Linux + 154) +#define __NR_setrlimit (__NR_Linux + 155) +#define __NR_chroot (__NR_Linux + 156) +#define __NR_sync (__NR_Linux + 157) +#define __NR_acct (__NR_Linux + 158) +#define __NR_settimeofday (__NR_Linux + 159) +#define __NR_mount (__NR_Linux + 160) +#define __NR_umount2 (__NR_Linux + 161) +#define __NR_swapon (__NR_Linux + 162) +#define __NR_swapoff (__NR_Linux + 163) +#define __NR_reboot (__NR_Linux + 164) +#define __NR_sethostname (__NR_Linux + 165) +#define __NR_setdomainname (__NR_Linux + 166) +#define __NR_create_module (__NR_Linux + 167) +#define __NR_init_module (__NR_Linux + 168) +#define __NR_delete_module (__NR_Linux + 169) +#define __NR_get_kernel_syms (__NR_Linux + 170) +#define __NR_query_module (__NR_Linux + 171) +#define __NR_quotactl (__NR_Linux + 172) +#define __NR_nfsservctl (__NR_Linux + 173) +#define __NR_getpmsg (__NR_Linux + 174) +#define __NR_putpmsg (__NR_Linux + 175) +#define __NR_afs_syscall (__NR_Linux + 176) +#define __NR_reserved177 (__NR_Linux + 177) +#define __NR_gettid (__NR_Linux + 178) +#define __NR_readahead (__NR_Linux + 179) +#define __NR_setxattr (__NR_Linux + 180) +#define __NR_lsetxattr (__NR_Linux + 181) +#define __NR_fsetxattr (__NR_Linux + 182) +#define __NR_getxattr (__NR_Linux + 183) +#define __NR_lgetxattr (__NR_Linux + 184) +#define __NR_fgetxattr (__NR_Linux + 185) +#define __NR_listxattr (__NR_Linux + 186) +#define __NR_llistxattr (__NR_Linux + 187) +#define __NR_flistxattr (__NR_Linux + 188) +#define __NR_removexattr (__NR_Linux + 189) +#define __NR_lremovexattr (__NR_Linux + 190) +#define __NR_fremovexattr (__NR_Linux + 191) +#define __NR_tkill (__NR_Linux + 192) +#define __NR_reserved193 (__NR_Linux + 193) +#define __NR_futex (__NR_Linux + 194) +#define __NR_sched_setaffinity (__NR_Linux + 195) +#define __NR_sched_getaffinity (__NR_Linux + 196) +#define __NR_cacheflush (__NR_Linux + 197) +#define __NR_cachectl (__NR_Linux + 198) +#define __NR_sysmips (__NR_Linux + 199) +#define __NR_io_setup (__NR_Linux + 200) +#define __NR_io_destroy (__NR_Linux + 201) +#define __NR_io_getevents (__NR_Linux + 202) +#define __NR_io_submit (__NR_Linux + 203) +#define __NR_io_cancel (__NR_Linux + 204) +#define __NR_exit_group (__NR_Linux + 205) +#define __NR_lookup_dcookie (__NR_Linux + 206) +#define __NR_epoll_create (__NR_Linux + 207) +#define __NR_epoll_ctl (__NR_Linux + 208) +#define __NR_epoll_wait (__NR_Linux + 209) +#define __NR_remap_file_pages (__NR_Linux + 210) +#define __NR_rt_sigreturn (__NR_Linux + 211) +#define __NR_set_tid_address (__NR_Linux + 212) +#define __NR_restart_syscall (__NR_Linux + 213) +#define __NR_semtimedop (__NR_Linux + 214) +#define __NR_fadvise64 (__NR_Linux + 215) +#define __NR_timer_create (__NR_Linux + 216) +#define __NR_timer_settime (__NR_Linux + 217) +#define __NR_timer_gettime (__NR_Linux + 218) +#define __NR_timer_getoverrun (__NR_Linux + 219) +#define __NR_timer_delete (__NR_Linux + 220) +#define __NR_clock_settime (__NR_Linux + 221) +#define __NR_clock_gettime (__NR_Linux + 222) +#define __NR_clock_getres (__NR_Linux + 223) +#define __NR_clock_nanosleep (__NR_Linux + 224) +#define __NR_tgkill (__NR_Linux + 225) +#define __NR_utimes (__NR_Linux + 226) +#define __NR_mbind (__NR_Linux + 227) +#define __NR_get_mempolicy (__NR_Linux + 228) +#define __NR_set_mempolicy (__NR_Linux + 229) +#define __NR_mq_open (__NR_Linux + 230) +#define __NR_mq_unlink (__NR_Linux + 231) +#define __NR_mq_timedsend (__NR_Linux + 232) +#define __NR_mq_timedreceive (__NR_Linux + 233) +#define __NR_mq_notify (__NR_Linux + 234) +#define __NR_mq_getsetattr (__NR_Linux + 235) +#define __NR_vserver (__NR_Linux + 236) +#define __NR_waitid (__NR_Linux + 237) +/* #define __NR_sys_setaltroot (__NR_Linux + 238) */ +#define __NR_add_key (__NR_Linux + 239) +#define __NR_request_key (__NR_Linux + 240) +#define __NR_keyctl (__NR_Linux + 241) +#define __NR_set_thread_area (__NR_Linux + 242) +#define __NR_inotify_init (__NR_Linux + 243) +#define __NR_inotify_add_watch (__NR_Linux + 244) +#define __NR_inotify_rm_watch (__NR_Linux + 245) +#define __NR_migrate_pages (__NR_Linux + 246) +#define __NR_openat (__NR_Linux + 247) +#define __NR_mkdirat (__NR_Linux + 248) +#define __NR_mknodat (__NR_Linux + 249) +#define __NR_fchownat (__NR_Linux + 250) +#define __NR_futimesat (__NR_Linux + 251) +#define __NR_newfstatat (__NR_Linux + 252) +#define __NR_unlinkat (__NR_Linux + 253) +#define __NR_renameat (__NR_Linux + 254) +#define __NR_linkat (__NR_Linux + 255) +#define __NR_symlinkat (__NR_Linux + 256) +#define __NR_readlinkat (__NR_Linux + 257) +#define __NR_fchmodat (__NR_Linux + 258) +#define __NR_faccessat (__NR_Linux + 259) +#define __NR_pselect6 (__NR_Linux + 260) +#define __NR_ppoll (__NR_Linux + 261) +#define __NR_unshare (__NR_Linux + 262) +#define __NR_splice (__NR_Linux + 263) +#define __NR_sync_file_range (__NR_Linux + 264) +#define __NR_tee (__NR_Linux + 265) +#define __NR_vmsplice (__NR_Linux + 266) +#define __NR_move_pages (__NR_Linux + 267) +#define __NR_set_robust_list (__NR_Linux + 268) +#define __NR_get_robust_list (__NR_Linux + 269) +#define __NR_kexec_load (__NR_Linux + 270) +#define __NR_getcpu (__NR_Linux + 271) +#define __NR_epoll_pwait (__NR_Linux + 272) +#define __NR_ioprio_set (__NR_Linux + 273) +#define __NR_ioprio_get (__NR_Linux + 274) +#define __NR_utimensat (__NR_Linux + 275) +#define __NR_signalfd (__NR_Linux + 276) +#define __NR_timerfd (__NR_Linux + 277) +#define __NR_eventfd (__NR_Linux + 278) +#define __NR_fallocate (__NR_Linux + 279) +#define __NR_timerfd_create (__NR_Linux + 280) +#define __NR_timerfd_gettime (__NR_Linux + 281) +#define __NR_timerfd_settime (__NR_Linux + 282) +#define __NR_signalfd4 (__NR_Linux + 283) +#define __NR_eventfd2 (__NR_Linux + 284) +#define __NR_epoll_create1 (__NR_Linux + 285) +#define __NR_dup3 (__NR_Linux + 286) +#define __NR_pipe2 (__NR_Linux + 287) +#define __NR_inotify_init1 (__NR_Linux + 288) +#define __NR_preadv (__NR_Linux + 289) +#define __NR_pwritev (__NR_Linux + 290) +#define __NR_rt_tgsigqueueinfo (__NR_Linux + 291) +#define __NR_perf_event_open (__NR_Linux + 292) +#define __NR_accept4 (__NR_Linux + 293) +#define __NR_recvmmsg (__NR_Linux + 294) +#define __NR_fanotify_init (__NR_Linux + 295) +#define __NR_fanotify_mark (__NR_Linux + 296) +#define __NR_prlimit64 (__NR_Linux + 297) +#define __NR_name_to_handle_at (__NR_Linux + 298) +#define __NR_open_by_handle_at (__NR_Linux + 299) +#define __NR_clock_adjtime (__NR_Linux + 300) +#define __NR_syncfs (__NR_Linux + 301) +#define __NR_sendmmsg (__NR_Linux + 302) +#define __NR_setns (__NR_Linux + 303) +#define __NR_process_vm_readv (__NR_Linux + 304) +#define __NR_process_vm_writev (__NR_Linux + 305) +#define __NR_kcmp (__NR_Linux + 306) +#define __NR_finit_module (__NR_Linux + 307) +#define __NR_getdents64 (__NR_Linux + 308) +#define __NR_sched_setattr (__NR_Linux + 309) +#define __NR_sched_getattr (__NR_Linux + 310) +#define __NR_renameat2 (__NR_Linux + 311) +#define __NR_seccomp (__NR_Linux + 312) +#define __NR_getrandom (__NR_Linux + 313) +#define __NR_memfd_create (__NR_Linux + 314) +#define __NR_bpf (__NR_Linux + 315) +#define __NR_execveat (__NR_Linux + 316) +#define __NR_userfaultfd (__NR_Linux + 317) +#define __NR_membarrier (__NR_Linux + 318) +#define __NR_mlock2 (__NR_Linux + 319) +#define __NR_copy_file_range (__NR_Linux + 320) +#define __NR_preadv2 (__NR_Linux + 321) +#define __NR_pwritev2 (__NR_Linux + 322) +#define __NR_pkey_mprotect (__NR_Linux + 323) +#define __NR_pkey_alloc (__NR_Linux + 324) +#define __NR_pkey_free (__NR_Linux + 325) +#define __NR_statx (__NR_Linux + 326) +#define __NR_rseq (__NR_Linux + 327) +#define __NR_io_pgetevents (__NR_Linux + 328) + +/* + * Offset of the last Linux 64-bit flavoured syscall + */ +#define __NR_Linux_syscalls 328 + +#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ + +#define __NR_64_Linux 5000 +#define __NR_64_Linux_syscalls 328 + +#if _MIPS_SIM == _MIPS_SIM_NABI32 + +/* + * Linux N32 syscalls are in the range from 6000 to 6999. + */ +#define __NR_Linux 6000 +#define __NR_read (__NR_Linux + 0) +#define __NR_write (__NR_Linux + 1) +#define __NR_open (__NR_Linux + 2) +#define __NR_close (__NR_Linux + 3) +#define __NR_stat (__NR_Linux + 4) +#define __NR_fstat (__NR_Linux + 5) +#define __NR_lstat (__NR_Linux + 6) +#define __NR_poll (__NR_Linux + 7) +#define __NR_lseek (__NR_Linux + 8) +#define __NR_mmap (__NR_Linux + 9) +#define __NR_mprotect (__NR_Linux + 10) +#define __NR_munmap (__NR_Linux + 11) +#define __NR_brk (__NR_Linux + 12) +#define __NR_rt_sigaction (__NR_Linux + 13) +#define __NR_rt_sigprocmask (__NR_Linux + 14) +#define __NR_ioctl (__NR_Linux + 15) +#define __NR_pread64 (__NR_Linux + 16) +#define __NR_pwrite64 (__NR_Linux + 17) +#define __NR_readv (__NR_Linux + 18) +#define __NR_writev (__NR_Linux + 19) +#define __NR_access (__NR_Linux + 20) +#define __NR_pipe (__NR_Linux + 21) +#define __NR__newselect (__NR_Linux + 22) +#define __NR_sched_yield (__NR_Linux + 23) +#define __NR_mremap (__NR_Linux + 24) +#define __NR_msync (__NR_Linux + 25) +#define __NR_mincore (__NR_Linux + 26) +#define __NR_madvise (__NR_Linux + 27) +#define __NR_shmget (__NR_Linux + 28) +#define __NR_shmat (__NR_Linux + 29) +#define __NR_shmctl (__NR_Linux + 30) +#define __NR_dup (__NR_Linux + 31) +#define __NR_dup2 (__NR_Linux + 32) +#define __NR_pause (__NR_Linux + 33) +#define __NR_nanosleep (__NR_Linux + 34) +#define __NR_getitimer (__NR_Linux + 35) +#define __NR_setitimer (__NR_Linux + 36) +#define __NR_alarm (__NR_Linux + 37) +#define __NR_getpid (__NR_Linux + 38) +#define __NR_sendfile (__NR_Linux + 39) +#define __NR_socket (__NR_Linux + 40) +#define __NR_connect (__NR_Linux + 41) +#define __NR_accept (__NR_Linux + 42) +#define __NR_sendto (__NR_Linux + 43) +#define __NR_recvfrom (__NR_Linux + 44) +#define __NR_sendmsg (__NR_Linux + 45) +#define __NR_recvmsg (__NR_Linux + 46) +#define __NR_shutdown (__NR_Linux + 47) +#define __NR_bind (__NR_Linux + 48) +#define __NR_listen (__NR_Linux + 49) +#define __NR_getsockname (__NR_Linux + 50) +#define __NR_getpeername (__NR_Linux + 51) +#define __NR_socketpair (__NR_Linux + 52) +#define __NR_setsockopt (__NR_Linux + 53) +#define __NR_getsockopt (__NR_Linux + 54) +#define __NR_clone (__NR_Linux + 55) +#define __NR_fork (__NR_Linux + 56) +#define __NR_execve (__NR_Linux + 57) +#define __NR_exit (__NR_Linux + 58) +#define __NR_wait4 (__NR_Linux + 59) +#define __NR_kill (__NR_Linux + 60) +#define __NR_uname (__NR_Linux + 61) +#define __NR_semget (__NR_Linux + 62) +#define __NR_semop (__NR_Linux + 63) +#define __NR_semctl (__NR_Linux + 64) +#define __NR_shmdt (__NR_Linux + 65) +#define __NR_msgget (__NR_Linux + 66) +#define __NR_msgsnd (__NR_Linux + 67) +#define __NR_msgrcv (__NR_Linux + 68) +#define __NR_msgctl (__NR_Linux + 69) +#define __NR_fcntl (__NR_Linux + 70) +#define __NR_flock (__NR_Linux + 71) +#define __NR_fsync (__NR_Linux + 72) +#define __NR_fdatasync (__NR_Linux + 73) +#define __NR_truncate (__NR_Linux + 74) +#define __NR_ftruncate (__NR_Linux + 75) +#define __NR_getdents (__NR_Linux + 76) +#define __NR_getcwd (__NR_Linux + 77) +#define __NR_chdir (__NR_Linux + 78) +#define __NR_fchdir (__NR_Linux + 79) +#define __NR_rename (__NR_Linux + 80) +#define __NR_mkdir (__NR_Linux + 81) +#define __NR_rmdir (__NR_Linux + 82) +#define __NR_creat (__NR_Linux + 83) +#define __NR_link (__NR_Linux + 84) +#define __NR_unlink (__NR_Linux + 85) +#define __NR_symlink (__NR_Linux + 86) +#define __NR_readlink (__NR_Linux + 87) +#define __NR_chmod (__NR_Linux + 88) +#define __NR_fchmod (__NR_Linux + 89) +#define __NR_chown (__NR_Linux + 90) +#define __NR_fchown (__NR_Linux + 91) +#define __NR_lchown (__NR_Linux + 92) +#define __NR_umask (__NR_Linux + 93) +#define __NR_gettimeofday (__NR_Linux + 94) +#define __NR_getrlimit (__NR_Linux + 95) +#define __NR_getrusage (__NR_Linux + 96) +#define __NR_sysinfo (__NR_Linux + 97) +#define __NR_times (__NR_Linux + 98) +#define __NR_ptrace (__NR_Linux + 99) +#define __NR_getuid (__NR_Linux + 100) +#define __NR_syslog (__NR_Linux + 101) +#define __NR_getgid (__NR_Linux + 102) +#define __NR_setuid (__NR_Linux + 103) +#define __NR_setgid (__NR_Linux + 104) +#define __NR_geteuid (__NR_Linux + 105) +#define __NR_getegid (__NR_Linux + 106) +#define __NR_setpgid (__NR_Linux + 107) +#define __NR_getppid (__NR_Linux + 108) +#define __NR_getpgrp (__NR_Linux + 109) +#define __NR_setsid (__NR_Linux + 110) +#define __NR_setreuid (__NR_Linux + 111) +#define __NR_setregid (__NR_Linux + 112) +#define __NR_getgroups (__NR_Linux + 113) +#define __NR_setgroups (__NR_Linux + 114) +#define __NR_setresuid (__NR_Linux + 115) +#define __NR_getresuid (__NR_Linux + 116) +#define __NR_setresgid (__NR_Linux + 117) +#define __NR_getresgid (__NR_Linux + 118) +#define __NR_getpgid (__NR_Linux + 119) +#define __NR_setfsuid (__NR_Linux + 120) +#define __NR_setfsgid (__NR_Linux + 121) +#define __NR_getsid (__NR_Linux + 122) +#define __NR_capget (__NR_Linux + 123) +#define __NR_capset (__NR_Linux + 124) +#define __NR_rt_sigpending (__NR_Linux + 125) +#define __NR_rt_sigtimedwait (__NR_Linux + 126) +#define __NR_rt_sigqueueinfo (__NR_Linux + 127) +#define __NR_rt_sigsuspend (__NR_Linux + 128) +#define __NR_sigaltstack (__NR_Linux + 129) +#define __NR_utime (__NR_Linux + 130) +#define __NR_mknod (__NR_Linux + 131) +#define __NR_personality (__NR_Linux + 132) +#define __NR_ustat (__NR_Linux + 133) +#define __NR_statfs (__NR_Linux + 134) +#define __NR_fstatfs (__NR_Linux + 135) +#define __NR_sysfs (__NR_Linux + 136) +#define __NR_getpriority (__NR_Linux + 137) +#define __NR_setpriority (__NR_Linux + 138) +#define __NR_sched_setparam (__NR_Linux + 139) +#define __NR_sched_getparam (__NR_Linux + 140) +#define __NR_sched_setscheduler (__NR_Linux + 141) +#define __NR_sched_getscheduler (__NR_Linux + 142) +#define __NR_sched_get_priority_max (__NR_Linux + 143) +#define __NR_sched_get_priority_min (__NR_Linux + 144) +#define __NR_sched_rr_get_interval (__NR_Linux + 145) +#define __NR_mlock (__NR_Linux + 146) +#define __NR_munlock (__NR_Linux + 147) +#define __NR_mlockall (__NR_Linux + 148) +#define __NR_munlockall (__NR_Linux + 149) +#define __NR_vhangup (__NR_Linux + 150) +#define __NR_pivot_root (__NR_Linux + 151) +#define __NR__sysctl (__NR_Linux + 152) +#define __NR_prctl (__NR_Linux + 153) +#define __NR_adjtimex (__NR_Linux + 154) +#define __NR_setrlimit (__NR_Linux + 155) +#define __NR_chroot (__NR_Linux + 156) +#define __NR_sync (__NR_Linux + 157) +#define __NR_acct (__NR_Linux + 158) +#define __NR_settimeofday (__NR_Linux + 159) +#define __NR_mount (__NR_Linux + 160) +#define __NR_umount2 (__NR_Linux + 161) +#define __NR_swapon (__NR_Linux + 162) +#define __NR_swapoff (__NR_Linux + 163) +#define __NR_reboot (__NR_Linux + 164) +#define __NR_sethostname (__NR_Linux + 165) +#define __NR_setdomainname (__NR_Linux + 166) +#define __NR_create_module (__NR_Linux + 167) +#define __NR_init_module (__NR_Linux + 168) +#define __NR_delete_module (__NR_Linux + 169) +#define __NR_get_kernel_syms (__NR_Linux + 170) +#define __NR_query_module (__NR_Linux + 171) +#define __NR_quotactl (__NR_Linux + 172) +#define __NR_nfsservctl (__NR_Linux + 173) +#define __NR_getpmsg (__NR_Linux + 174) +#define __NR_putpmsg (__NR_Linux + 175) +#define __NR_afs_syscall (__NR_Linux + 176) +#define __NR_reserved177 (__NR_Linux + 177) +#define __NR_gettid (__NR_Linux + 178) +#define __NR_readahead (__NR_Linux + 179) +#define __NR_setxattr (__NR_Linux + 180) +#define __NR_lsetxattr (__NR_Linux + 181) +#define __NR_fsetxattr (__NR_Linux + 182) +#define __NR_getxattr (__NR_Linux + 183) +#define __NR_lgetxattr (__NR_Linux + 184) +#define __NR_fgetxattr (__NR_Linux + 185) +#define __NR_listxattr (__NR_Linux + 186) +#define __NR_llistxattr (__NR_Linux + 187) +#define __NR_flistxattr (__NR_Linux + 188) +#define __NR_removexattr (__NR_Linux + 189) +#define __NR_lremovexattr (__NR_Linux + 190) +#define __NR_fremovexattr (__NR_Linux + 191) +#define __NR_tkill (__NR_Linux + 192) +#define __NR_reserved193 (__NR_Linux + 193) +#define __NR_futex (__NR_Linux + 194) +#define __NR_sched_setaffinity (__NR_Linux + 195) +#define __NR_sched_getaffinity (__NR_Linux + 196) +#define __NR_cacheflush (__NR_Linux + 197) +#define __NR_cachectl (__NR_Linux + 198) +#define __NR_sysmips (__NR_Linux + 199) +#define __NR_io_setup (__NR_Linux + 200) +#define __NR_io_destroy (__NR_Linux + 201) +#define __NR_io_getevents (__NR_Linux + 202) +#define __NR_io_submit (__NR_Linux + 203) +#define __NR_io_cancel (__NR_Linux + 204) +#define __NR_exit_group (__NR_Linux + 205) +#define __NR_lookup_dcookie (__NR_Linux + 206) +#define __NR_epoll_create (__NR_Linux + 207) +#define __NR_epoll_ctl (__NR_Linux + 208) +#define __NR_epoll_wait (__NR_Linux + 209) +#define __NR_remap_file_pages (__NR_Linux + 210) +#define __NR_rt_sigreturn (__NR_Linux + 211) +#define __NR_fcntl64 (__NR_Linux + 212) +#define __NR_set_tid_address (__NR_Linux + 213) +#define __NR_restart_syscall (__NR_Linux + 214) +#define __NR_semtimedop (__NR_Linux + 215) +#define __NR_fadvise64 (__NR_Linux + 216) +#define __NR_statfs64 (__NR_Linux + 217) +#define __NR_fstatfs64 (__NR_Linux + 218) +#define __NR_sendfile64 (__NR_Linux + 219) +#define __NR_timer_create (__NR_Linux + 220) +#define __NR_timer_settime (__NR_Linux + 221) +#define __NR_timer_gettime (__NR_Linux + 222) +#define __NR_timer_getoverrun (__NR_Linux + 223) +#define __NR_timer_delete (__NR_Linux + 224) +#define __NR_clock_settime (__NR_Linux + 225) +#define __NR_clock_gettime (__NR_Linux + 226) +#define __NR_clock_getres (__NR_Linux + 227) +#define __NR_clock_nanosleep (__NR_Linux + 228) +#define __NR_tgkill (__NR_Linux + 229) +#define __NR_utimes (__NR_Linux + 230) +#define __NR_mbind (__NR_Linux + 231) +#define __NR_get_mempolicy (__NR_Linux + 232) +#define __NR_set_mempolicy (__NR_Linux + 233) +#define __NR_mq_open (__NR_Linux + 234) +#define __NR_mq_unlink (__NR_Linux + 235) +#define __NR_mq_timedsend (__NR_Linux + 236) +#define __NR_mq_timedreceive (__NR_Linux + 237) +#define __NR_mq_notify (__NR_Linux + 238) +#define __NR_mq_getsetattr (__NR_Linux + 239) +#define __NR_vserver (__NR_Linux + 240) +#define __NR_waitid (__NR_Linux + 241) +/* #define __NR_sys_setaltroot (__NR_Linux + 242) */ +#define __NR_add_key (__NR_Linux + 243) +#define __NR_request_key (__NR_Linux + 244) +#define __NR_keyctl (__NR_Linux + 245) +#define __NR_set_thread_area (__NR_Linux + 246) +#define __NR_inotify_init (__NR_Linux + 247) +#define __NR_inotify_add_watch (__NR_Linux + 248) +#define __NR_inotify_rm_watch (__NR_Linux + 249) +#define __NR_migrate_pages (__NR_Linux + 250) +#define __NR_openat (__NR_Linux + 251) +#define __NR_mkdirat (__NR_Linux + 252) +#define __NR_mknodat (__NR_Linux + 253) +#define __NR_fchownat (__NR_Linux + 254) +#define __NR_futimesat (__NR_Linux + 255) +#define __NR_newfstatat (__NR_Linux + 256) +#define __NR_unlinkat (__NR_Linux + 257) +#define __NR_renameat (__NR_Linux + 258) +#define __NR_linkat (__NR_Linux + 259) +#define __NR_symlinkat (__NR_Linux + 260) +#define __NR_readlinkat (__NR_Linux + 261) +#define __NR_fchmodat (__NR_Linux + 262) +#define __NR_faccessat (__NR_Linux + 263) +#define __NR_pselect6 (__NR_Linux + 264) +#define __NR_ppoll (__NR_Linux + 265) +#define __NR_unshare (__NR_Linux + 266) +#define __NR_splice (__NR_Linux + 267) +#define __NR_sync_file_range (__NR_Linux + 268) +#define __NR_tee (__NR_Linux + 269) +#define __NR_vmsplice (__NR_Linux + 270) +#define __NR_move_pages (__NR_Linux + 271) +#define __NR_set_robust_list (__NR_Linux + 272) +#define __NR_get_robust_list (__NR_Linux + 273) +#define __NR_kexec_load (__NR_Linux + 274) +#define __NR_getcpu (__NR_Linux + 275) +#define __NR_epoll_pwait (__NR_Linux + 276) +#define __NR_ioprio_set (__NR_Linux + 277) +#define __NR_ioprio_get (__NR_Linux + 278) +#define __NR_utimensat (__NR_Linux + 279) +#define __NR_signalfd (__NR_Linux + 280) +#define __NR_timerfd (__NR_Linux + 281) +#define __NR_eventfd (__NR_Linux + 282) +#define __NR_fallocate (__NR_Linux + 283) +#define __NR_timerfd_create (__NR_Linux + 284) +#define __NR_timerfd_gettime (__NR_Linux + 285) +#define __NR_timerfd_settime (__NR_Linux + 286) +#define __NR_signalfd4 (__NR_Linux + 287) +#define __NR_eventfd2 (__NR_Linux + 288) +#define __NR_epoll_create1 (__NR_Linux + 289) +#define __NR_dup3 (__NR_Linux + 290) +#define __NR_pipe2 (__NR_Linux + 291) +#define __NR_inotify_init1 (__NR_Linux + 292) +#define __NR_preadv (__NR_Linux + 293) +#define __NR_pwritev (__NR_Linux + 294) +#define __NR_rt_tgsigqueueinfo (__NR_Linux + 295) +#define __NR_perf_event_open (__NR_Linux + 296) +#define __NR_accept4 (__NR_Linux + 297) +#define __NR_recvmmsg (__NR_Linux + 298) +#define __NR_getdents64 (__NR_Linux + 299) +#define __NR_fanotify_init (__NR_Linux + 300) +#define __NR_fanotify_mark (__NR_Linux + 301) +#define __NR_prlimit64 (__NR_Linux + 302) +#define __NR_name_to_handle_at (__NR_Linux + 303) +#define __NR_open_by_handle_at (__NR_Linux + 304) +#define __NR_clock_adjtime (__NR_Linux + 305) +#define __NR_syncfs (__NR_Linux + 306) +#define __NR_sendmmsg (__NR_Linux + 307) +#define __NR_setns (__NR_Linux + 308) +#define __NR_process_vm_readv (__NR_Linux + 309) +#define __NR_process_vm_writev (__NR_Linux + 310) +#define __NR_kcmp (__NR_Linux + 311) +#define __NR_finit_module (__NR_Linux + 312) +#define __NR_sched_setattr (__NR_Linux + 313) +#define __NR_sched_getattr (__NR_Linux + 314) +#define __NR_renameat2 (__NR_Linux + 315) +#define __NR_seccomp (__NR_Linux + 316) +#define __NR_getrandom (__NR_Linux + 317) +#define __NR_memfd_create (__NR_Linux + 318) +#define __NR_bpf (__NR_Linux + 319) +#define __NR_execveat (__NR_Linux + 320) +#define __NR_userfaultfd (__NR_Linux + 321) +#define __NR_membarrier (__NR_Linux + 322) +#define __NR_mlock2 (__NR_Linux + 323) +#define __NR_copy_file_range (__NR_Linux + 324) +#define __NR_preadv2 (__NR_Linux + 325) +#define __NR_pwritev2 (__NR_Linux + 326) +#define __NR_pkey_mprotect (__NR_Linux + 327) +#define __NR_pkey_alloc (__NR_Linux + 328) +#define __NR_pkey_free (__NR_Linux + 329) +#define __NR_statx (__NR_Linux + 330) +#define __NR_rseq (__NR_Linux + 331) +#define __NR_io_pgetevents (__NR_Linux + 332) + +/* + * Offset of the last N32 flavoured syscall + */ +#define __NR_Linux_syscalls 332 + +#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ + +#define __NR_N32_Linux 6000 +#define __NR_N32_Linux_syscalls 332 + +#endif /* _UAPI_ASM_UNISTD_H */ diff --git a/libc/include/mips64el-linux-gnuabin32/bits/dlfcn.h b/libc/include/mips64el-linux-gnuabin32/bits/dlfcn.h new file mode 100644 index 0000000000..996be6f45b --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/dlfcn.h @@ -0,0 +1,64 @@ +/* System dependent definitions for run-time dynamic loading. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/errno.h b/libc/include/mips64el-linux-gnuabin32/bits/errno.h new file mode 100644 index 0000000000..2d6069ad8a --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/errno.h @@ -0,0 +1,52 @@ +/* Error constants. MIPS/Linux specific version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/eventfd.h b/libc/include/mips64el-linux-gnuabin32/bits/eventfd.h new file mode 100644 index 0000000000..9ff48c23fb --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/eventfd.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2007-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/inotify.h b/libc/include/mips64el-linux-gnuabin32/bits/inotify.h new file mode 100644 index 0000000000..d063466c30 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/inotify.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/ioctl-types.h b/libc/include/mips64el-linux-gnuabin32/bits/ioctl-types.h new file mode 100644 index 0000000000..bfbdac6f57 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/ioctl-types.h @@ -0,0 +1,75 @@ +/* Structure types for pre-termios terminal ioctls. Linux/MIPS version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/ipc.h b/libc/include/mips64el-linux-gnuabin32/bits/ipc.h new file mode 100644 index 0000000000..e994ffc9ad --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/ipc.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IPC_H +# error "Never use directly; include instead." +#endif + +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#ifdef __USE_GNU +# define IPC_INFO 3 /* See ipcs. */ +#endif + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + unsigned int uid; /* Owner's user ID. */ + unsigned int gid; /* Owner's group ID. */ + unsigned int cuid; /* Creator's user ID. */ + unsigned int cgid; /* Creator's group ID. */ + unsigned int mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ + unsigned short int __pad1; + unsigned long int __glibc_reserved1; + unsigned long int __glibc_reserved2; +}; \ No newline at end of file diff --git a/libc/include/mips64el-linux-gnuabin32/bits/ipctypes.h b/libc/include/mips64el-linux-gnuabin32/bits/ipctypes.h new file mode 100644 index 0000000000..ffea8d325c --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/ipctypes.h @@ -0,0 +1,31 @@ +/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* + * Never include directly. + */ + +#ifndef _BITS_IPCTYPES_H +#define _BITS_IPCTYPES_H 1 + +#include + +typedef __SLONG32_TYPE __ipc_pid_t; + + +#endif /* bits/ipctypes.h */ \ No newline at end of file diff --git a/libc/include/mips64el-linux-gnuabin32/bits/local_lim.h b/libc/include/mips64el-linux-gnuabin32/bits/local_lim.h new file mode 100644 index 0000000000..96b65eb686 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/local_lim.h @@ -0,0 +1,99 @@ +/* Minimum guaranteed maximum values for system limits. MIPS Linux version. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. At least two pages with 64k pages. */ +#define PTHREAD_STACK_MIN 131072 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) \ No newline at end of file diff --git a/libc/include/mips64el-linux-gnuabin32/bits/mman.h b/libc/include/mips64el-linux-gnuabin32/bits/mman.h new file mode 100644 index 0000000000..43c768ab5e --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/mman.h @@ -0,0 +1,48 @@ +/* Definitions for POSIX memory map interface. Linux/MIPS version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h b/libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h new file mode 100644 index 0000000000..2cde6ddf34 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/msq-pad.h @@ -0,0 +1,31 @@ +/* Define where padding goes in struct msqid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include + +#ifdef __MIPSEL__ +# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32) +# define __MSQ_PAD_BEFORE_TIME 0 +#else +# define __MSQ_PAD_AFTER_TIME 0 +# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) +#endif \ No newline at end of file diff --git a/libc/include/mips64el-linux-gnuabin32/bits/poll.h b/libc/include/mips64el-linux-gnuabin32/bits/poll.h new file mode 100644 index 0000000000..7793460007 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/poll.h @@ -0,0 +1,49 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/resource.h b/libc/include/mips64el-linux-gnuabin32/bits/resource.h new file mode 100644 index 0000000000..2f200b1025 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/resource.h @@ -0,0 +1,231 @@ +/* Bit values & structures for resource limits. Linux/MIPS version. + Copyright (C) 1994-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 µs 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/libc/include/mips64el-linux-gnuabin32/bits/sem-pad.h b/libc/include/mips64el-linux-gnuabin32/bits/sem-pad.h new file mode 100644 index 0000000000..b1810b2080 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/sem-pad.h @@ -0,0 +1,24 @@ +/* Define where padding goes in struct semid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SEM_H +# error "Never use directly; include instead." +#endif + +#define __SEM_PAD_AFTER_TIME 0 +#define __SEM_PAD_BEFORE_TIME 0 \ No newline at end of file diff --git a/libc/include/mips64el-linux-gnuabin32/bits/shm-pad.h b/libc/include/mips64el-linux-gnuabin32/bits/shm-pad.h new file mode 100644 index 0000000000..e672c8c7b0 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/shm-pad.h @@ -0,0 +1,26 @@ +/* Define where padding goes in struct shmid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SHM_H +# error "Never use directly; include instead." +#endif + +#define __SHM_PAD_AFTER_TIME 0 +#define __SHM_PAD_BEFORE_TIME 0 +#define __SHM_SEGSZ_AFTER_TIME 0 +#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 \ No newline at end of file diff --git a/libc/include/mips64el-linux-gnuabin32/bits/shmlba.h b/libc/include/mips64el-linux-gnuabin32/bits/shmlba.h new file mode 100644 index 0000000000..9561decd9a --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/shmlba.h @@ -0,0 +1,24 @@ +/* Define SHMLBA. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/sigaction.h b/libc/include/mips64el-linux-gnuabin32/bits/sigaction.h new file mode 100644 index 0000000000..bbc6004b59 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/sigaction.h @@ -0,0 +1,94 @@ +/* The proper definitions for Linux/MIPS's sigaction. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/sigcontext.h b/libc/include/mips64el-linux-gnuabin32/bits/sigcontext.h new file mode 100644 index 0000000000..231695c93f --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/sigcontext.h @@ -0,0 +1,82 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/siginfo-arch.h b/libc/include/mips64el-linux-gnuabin32/bits/siginfo-arch.h new file mode 100644 index 0000000000..d639ba2076 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/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/libc/include/mips64el-linux-gnuabin32/bits/signalfd.h b/libc/include/mips64el-linux-gnuabin32/bits/signalfd.h new file mode 100644 index 0000000000..a8f5275551 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/signalfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2007-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/signum.h b/libc/include/mips64el-linux-gnuabin32/bits/signum.h new file mode 100644 index 0000000000..e3cd97af8b --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/signum.h @@ -0,0 +1,68 @@ +/* Signal number definitions. Linux/MIPS version. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use instead." +#endif + +#include + +/* Adjustments and additions to the signal number constants for + Linux/MIPS. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGPWR 19 /* Power failure imminent. */ + +#undef SIGUSR1 +#define SIGUSR1 16 +#undef SIGUSR2 +#define SIGUSR2 17 +#undef SIGCHLD +#define SIGCHLD 18 +#undef SIGWINCH +#define SIGWINCH 20 +#undef SIGURG +#define SIGURG 21 +#undef SIGPOLL +#define SIGPOLL 22 +#undef SIGSTOP +#define SIGSTOP 23 +#undef SIGTSTP +#define SIGTSTP 24 +#undef SIGCONT +#define SIGCONT 25 +#undef SIGTTIN +#define SIGTTIN 26 +#undef SIGTTOU +#define SIGTTOU 27 +#undef SIGVTALRM +#define SIGVTALRM 28 +#undef SIGPROF +#define SIGPROF 29 +#undef SIGXCPU +#define SIGXCPU 30 +#undef SIGXFSZ +#define SIGXFSZ 31 + +#undef __SIGRTMAX +#define __SIGRTMAX 127 + +#endif /* included. */ \ No newline at end of file diff --git a/libc/include/mips64el-linux-gnuabin32/bits/socket_type.h b/libc/include/mips64el-linux-gnuabin32/bits/socket_type.h new file mode 100644 index 0000000000..4c976f179e --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/socket_type.h @@ -0,0 +1,55 @@ +/* Define enum __socket_type for Linux/MIPS. + Copyright (C) 1991-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/statfs.h b/libc/include/mips64el-linux-gnuabin32/bits/statfs.h new file mode 100644 index 0000000000..fd0f68d6d7 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/statfs.h @@ -0,0 +1,73 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/termios-c_cc.h b/libc/include/mips64el-linux-gnuabin32/bits/termios-c_cc.h new file mode 100644 index 0000000000..ed124b8db4 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/termios-c_cc.h @@ -0,0 +1,43 @@ +/* termios c_cc symbolic constant definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/termios-c_lflag.h b/libc/include/mips64el-linux-gnuabin32/bits/termios-c_lflag.h new file mode 100644 index 0000000000..e5a6773476 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/termios-c_lflag.h @@ -0,0 +1,46 @@ +/* termios local mode definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/termios-struct.h b/libc/include/mips64el-linux-gnuabin32/bits/termios-struct.h new file mode 100644 index 0000000000..0442c6f354 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/termios-struct.h @@ -0,0 +1,34 @@ +/* struct termios definition. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/termios-tcflow.h b/libc/include/mips64el-linux-gnuabin32/bits/termios-tcflow.h new file mode 100644 index 0000000000..2c523c3a2a --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/termios-tcflow.h @@ -0,0 +1,26 @@ +/* termios local mode definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/timerfd.h b/libc/include/mips64el-linux-gnuabin32/bits/timerfd.h new file mode 100644 index 0000000000..005d411617 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/timerfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2008-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/bits/types/stack_t.h b/libc/include/mips64el-linux-gnuabin32/bits/types/stack_t.h new file mode 100644 index 0000000000..b62c348140 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/bits/types/stack_t.h @@ -0,0 +1,33 @@ +/* Define stack_t. MIPS Linux version. + Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mips64el-linux-gnuabin32/ieee754.h b/libc/include/mips64el-linux-gnuabin32/ieee754.h new file mode 100644 index 0000000000..600dbce3d8 --- /dev/null +++ b/libc/include/mips64el-linux-gnuabin32/ieee754.h @@ -0,0 +1,323 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#include + +__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/libc/include/mipsel-linux-gnu/asm/sgidefs.h b/libc/include/mipsel-linux-gnu/asm/sgidefs.h new file mode 100644 index 0000000000..26143e3b7c --- /dev/null +++ b/libc/include/mipsel-linux-gnu/asm/sgidefs.h @@ -0,0 +1,45 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1996, 1999, 2001 Ralf Baechle + * Copyright (C) 1999 Silicon Graphics, Inc. + * Copyright (C) 2001 MIPS Technologies, Inc. + */ +#ifndef __ASM_SGIDEFS_H +#define __ASM_SGIDEFS_H + +/* + * Using a Linux compiler for building Linux seems logic but not to + * everybody. + */ +#ifndef __linux__ +#error Use a Linux compiler or give up. +#endif + +/* + * Definitions for the ISA levels + * + * With the introduction of MIPS32 / MIPS64 instruction sets definitions + * MIPS ISAs are no longer subsets of each other. Therefore comparisons + * on these symbols except with == may result in unexpected results and + * are forbidden! + */ +#define _MIPS_ISA_MIPS1 1 +#define _MIPS_ISA_MIPS2 2 +#define _MIPS_ISA_MIPS3 3 +#define _MIPS_ISA_MIPS4 4 +#define _MIPS_ISA_MIPS5 5 +#define _MIPS_ISA_MIPS32 6 +#define _MIPS_ISA_MIPS64 7 + +/* + * Subprogram calling convention + */ +#define _MIPS_SIM_ABI32 1 +#define _MIPS_SIM_NABI32 2 +#define _MIPS_SIM_ABI64 3 + +#endif /* __ASM_SGIDEFS_H */ diff --git a/libc/include/mipsel-linux-gnu/asm/unistd.h b/libc/include/mipsel-linux-gnu/asm/unistd.h new file mode 100644 index 0000000000..f25dd1d83f --- /dev/null +++ b/libc/include/mipsel-linux-gnu/asm/unistd.h @@ -0,0 +1,1101 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle + * Copyright (C) 1999, 2000 Silicon Graphics, Inc. + * + * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto + * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A + */ +#ifndef _UAPI_ASM_UNISTD_H +#define _UAPI_ASM_UNISTD_H + +#include + +#if _MIPS_SIM == _MIPS_SIM_ABI32 + +/* + * Linux o32 style syscalls are in the range from 4000 to 4999. + */ +#define __NR_Linux 4000 +#define __NR_syscall (__NR_Linux + 0) +#define __NR_exit (__NR_Linux + 1) +#define __NR_fork (__NR_Linux + 2) +#define __NR_read (__NR_Linux + 3) +#define __NR_write (__NR_Linux + 4) +#define __NR_open (__NR_Linux + 5) +#define __NR_close (__NR_Linux + 6) +#define __NR_waitpid (__NR_Linux + 7) +#define __NR_creat (__NR_Linux + 8) +#define __NR_link (__NR_Linux + 9) +#define __NR_unlink (__NR_Linux + 10) +#define __NR_execve (__NR_Linux + 11) +#define __NR_chdir (__NR_Linux + 12) +#define __NR_time (__NR_Linux + 13) +#define __NR_mknod (__NR_Linux + 14) +#define __NR_chmod (__NR_Linux + 15) +#define __NR_lchown (__NR_Linux + 16) +#define __NR_break (__NR_Linux + 17) +#define __NR_unused18 (__NR_Linux + 18) +#define __NR_lseek (__NR_Linux + 19) +#define __NR_getpid (__NR_Linux + 20) +#define __NR_mount (__NR_Linux + 21) +#define __NR_umount (__NR_Linux + 22) +#define __NR_setuid (__NR_Linux + 23) +#define __NR_getuid (__NR_Linux + 24) +#define __NR_stime (__NR_Linux + 25) +#define __NR_ptrace (__NR_Linux + 26) +#define __NR_alarm (__NR_Linux + 27) +#define __NR_unused28 (__NR_Linux + 28) +#define __NR_pause (__NR_Linux + 29) +#define __NR_utime (__NR_Linux + 30) +#define __NR_stty (__NR_Linux + 31) +#define __NR_gtty (__NR_Linux + 32) +#define __NR_access (__NR_Linux + 33) +#define __NR_nice (__NR_Linux + 34) +#define __NR_ftime (__NR_Linux + 35) +#define __NR_sync (__NR_Linux + 36) +#define __NR_kill (__NR_Linux + 37) +#define __NR_rename (__NR_Linux + 38) +#define __NR_mkdir (__NR_Linux + 39) +#define __NR_rmdir (__NR_Linux + 40) +#define __NR_dup (__NR_Linux + 41) +#define __NR_pipe (__NR_Linux + 42) +#define __NR_times (__NR_Linux + 43) +#define __NR_prof (__NR_Linux + 44) +#define __NR_brk (__NR_Linux + 45) +#define __NR_setgid (__NR_Linux + 46) +#define __NR_getgid (__NR_Linux + 47) +#define __NR_signal (__NR_Linux + 48) +#define __NR_geteuid (__NR_Linux + 49) +#define __NR_getegid (__NR_Linux + 50) +#define __NR_acct (__NR_Linux + 51) +#define __NR_umount2 (__NR_Linux + 52) +#define __NR_lock (__NR_Linux + 53) +#define __NR_ioctl (__NR_Linux + 54) +#define __NR_fcntl (__NR_Linux + 55) +#define __NR_mpx (__NR_Linux + 56) +#define __NR_setpgid (__NR_Linux + 57) +#define __NR_ulimit (__NR_Linux + 58) +#define __NR_unused59 (__NR_Linux + 59) +#define __NR_umask (__NR_Linux + 60) +#define __NR_chroot (__NR_Linux + 61) +#define __NR_ustat (__NR_Linux + 62) +#define __NR_dup2 (__NR_Linux + 63) +#define __NR_getppid (__NR_Linux + 64) +#define __NR_getpgrp (__NR_Linux + 65) +#define __NR_setsid (__NR_Linux + 66) +#define __NR_sigaction (__NR_Linux + 67) +#define __NR_sgetmask (__NR_Linux + 68) +#define __NR_ssetmask (__NR_Linux + 69) +#define __NR_setreuid (__NR_Linux + 70) +#define __NR_setregid (__NR_Linux + 71) +#define __NR_sigsuspend (__NR_Linux + 72) +#define __NR_sigpending (__NR_Linux + 73) +#define __NR_sethostname (__NR_Linux + 74) +#define __NR_setrlimit (__NR_Linux + 75) +#define __NR_getrlimit (__NR_Linux + 76) +#define __NR_getrusage (__NR_Linux + 77) +#define __NR_gettimeofday (__NR_Linux + 78) +#define __NR_settimeofday (__NR_Linux + 79) +#define __NR_getgroups (__NR_Linux + 80) +#define __NR_setgroups (__NR_Linux + 81) +#define __NR_reserved82 (__NR_Linux + 82) +#define __NR_symlink (__NR_Linux + 83) +#define __NR_unused84 (__NR_Linux + 84) +#define __NR_readlink (__NR_Linux + 85) +#define __NR_uselib (__NR_Linux + 86) +#define __NR_swapon (__NR_Linux + 87) +#define __NR_reboot (__NR_Linux + 88) +#define __NR_readdir (__NR_Linux + 89) +#define __NR_mmap (__NR_Linux + 90) +#define __NR_munmap (__NR_Linux + 91) +#define __NR_truncate (__NR_Linux + 92) +#define __NR_ftruncate (__NR_Linux + 93) +#define __NR_fchmod (__NR_Linux + 94) +#define __NR_fchown (__NR_Linux + 95) +#define __NR_getpriority (__NR_Linux + 96) +#define __NR_setpriority (__NR_Linux + 97) +#define __NR_profil (__NR_Linux + 98) +#define __NR_statfs (__NR_Linux + 99) +#define __NR_fstatfs (__NR_Linux + 100) +#define __NR_ioperm (__NR_Linux + 101) +#define __NR_socketcall (__NR_Linux + 102) +#define __NR_syslog (__NR_Linux + 103) +#define __NR_setitimer (__NR_Linux + 104) +#define __NR_getitimer (__NR_Linux + 105) +#define __NR_stat (__NR_Linux + 106) +#define __NR_lstat (__NR_Linux + 107) +#define __NR_fstat (__NR_Linux + 108) +#define __NR_unused109 (__NR_Linux + 109) +#define __NR_iopl (__NR_Linux + 110) +#define __NR_vhangup (__NR_Linux + 111) +#define __NR_idle (__NR_Linux + 112) +#define __NR_vm86 (__NR_Linux + 113) +#define __NR_wait4 (__NR_Linux + 114) +#define __NR_swapoff (__NR_Linux + 115) +#define __NR_sysinfo (__NR_Linux + 116) +#define __NR_ipc (__NR_Linux + 117) +#define __NR_fsync (__NR_Linux + 118) +#define __NR_sigreturn (__NR_Linux + 119) +#define __NR_clone (__NR_Linux + 120) +#define __NR_setdomainname (__NR_Linux + 121) +#define __NR_uname (__NR_Linux + 122) +#define __NR_modify_ldt (__NR_Linux + 123) +#define __NR_adjtimex (__NR_Linux + 124) +#define __NR_mprotect (__NR_Linux + 125) +#define __NR_sigprocmask (__NR_Linux + 126) +#define __NR_create_module (__NR_Linux + 127) +#define __NR_init_module (__NR_Linux + 128) +#define __NR_delete_module (__NR_Linux + 129) +#define __NR_get_kernel_syms (__NR_Linux + 130) +#define __NR_quotactl (__NR_Linux + 131) +#define __NR_getpgid (__NR_Linux + 132) +#define __NR_fchdir (__NR_Linux + 133) +#define __NR_bdflush (__NR_Linux + 134) +#define __NR_sysfs (__NR_Linux + 135) +#define __NR_personality (__NR_Linux + 136) +#define __NR_afs_syscall (__NR_Linux + 137) /* Syscall for Andrew File System */ +#define __NR_setfsuid (__NR_Linux + 138) +#define __NR_setfsgid (__NR_Linux + 139) +#define __NR__llseek (__NR_Linux + 140) +#define __NR_getdents (__NR_Linux + 141) +#define __NR__newselect (__NR_Linux + 142) +#define __NR_flock (__NR_Linux + 143) +#define __NR_msync (__NR_Linux + 144) +#define __NR_readv (__NR_Linux + 145) +#define __NR_writev (__NR_Linux + 146) +#define __NR_cacheflush (__NR_Linux + 147) +#define __NR_cachectl (__NR_Linux + 148) +#define __NR_sysmips (__NR_Linux + 149) +#define __NR_unused150 (__NR_Linux + 150) +#define __NR_getsid (__NR_Linux + 151) +#define __NR_fdatasync (__NR_Linux + 152) +#define __NR__sysctl (__NR_Linux + 153) +#define __NR_mlock (__NR_Linux + 154) +#define __NR_munlock (__NR_Linux + 155) +#define __NR_mlockall (__NR_Linux + 156) +#define __NR_munlockall (__NR_Linux + 157) +#define __NR_sched_setparam (__NR_Linux + 158) +#define __NR_sched_getparam (__NR_Linux + 159) +#define __NR_sched_setscheduler (__NR_Linux + 160) +#define __NR_sched_getscheduler (__NR_Linux + 161) +#define __NR_sched_yield (__NR_Linux + 162) +#define __NR_sched_get_priority_max (__NR_Linux + 163) +#define __NR_sched_get_priority_min (__NR_Linux + 164) +#define __NR_sched_rr_get_interval (__NR_Linux + 165) +#define __NR_nanosleep (__NR_Linux + 166) +#define __NR_mremap (__NR_Linux + 167) +#define __NR_accept (__NR_Linux + 168) +#define __NR_bind (__NR_Linux + 169) +#define __NR_connect (__NR_Linux + 170) +#define __NR_getpeername (__NR_Linux + 171) +#define __NR_getsockname (__NR_Linux + 172) +#define __NR_getsockopt (__NR_Linux + 173) +#define __NR_listen (__NR_Linux + 174) +#define __NR_recv (__NR_Linux + 175) +#define __NR_recvfrom (__NR_Linux + 176) +#define __NR_recvmsg (__NR_Linux + 177) +#define __NR_send (__NR_Linux + 178) +#define __NR_sendmsg (__NR_Linux + 179) +#define __NR_sendto (__NR_Linux + 180) +#define __NR_setsockopt (__NR_Linux + 181) +#define __NR_shutdown (__NR_Linux + 182) +#define __NR_socket (__NR_Linux + 183) +#define __NR_socketpair (__NR_Linux + 184) +#define __NR_setresuid (__NR_Linux + 185) +#define __NR_getresuid (__NR_Linux + 186) +#define __NR_query_module (__NR_Linux + 187) +#define __NR_poll (__NR_Linux + 188) +#define __NR_nfsservctl (__NR_Linux + 189) +#define __NR_setresgid (__NR_Linux + 190) +#define __NR_getresgid (__NR_Linux + 191) +#define __NR_prctl (__NR_Linux + 192) +#define __NR_rt_sigreturn (__NR_Linux + 193) +#define __NR_rt_sigaction (__NR_Linux + 194) +#define __NR_rt_sigprocmask (__NR_Linux + 195) +#define __NR_rt_sigpending (__NR_Linux + 196) +#define __NR_rt_sigtimedwait (__NR_Linux + 197) +#define __NR_rt_sigqueueinfo (__NR_Linux + 198) +#define __NR_rt_sigsuspend (__NR_Linux + 199) +#define __NR_pread64 (__NR_Linux + 200) +#define __NR_pwrite64 (__NR_Linux + 201) +#define __NR_chown (__NR_Linux + 202) +#define __NR_getcwd (__NR_Linux + 203) +#define __NR_capget (__NR_Linux + 204) +#define __NR_capset (__NR_Linux + 205) +#define __NR_sigaltstack (__NR_Linux + 206) +#define __NR_sendfile (__NR_Linux + 207) +#define __NR_getpmsg (__NR_Linux + 208) +#define __NR_putpmsg (__NR_Linux + 209) +#define __NR_mmap2 (__NR_Linux + 210) +#define __NR_truncate64 (__NR_Linux + 211) +#define __NR_ftruncate64 (__NR_Linux + 212) +#define __NR_stat64 (__NR_Linux + 213) +#define __NR_lstat64 (__NR_Linux + 214) +#define __NR_fstat64 (__NR_Linux + 215) +#define __NR_pivot_root (__NR_Linux + 216) +#define __NR_mincore (__NR_Linux + 217) +#define __NR_madvise (__NR_Linux + 218) +#define __NR_getdents64 (__NR_Linux + 219) +#define __NR_fcntl64 (__NR_Linux + 220) +#define __NR_reserved221 (__NR_Linux + 221) +#define __NR_gettid (__NR_Linux + 222) +#define __NR_readahead (__NR_Linux + 223) +#define __NR_setxattr (__NR_Linux + 224) +#define __NR_lsetxattr (__NR_Linux + 225) +#define __NR_fsetxattr (__NR_Linux + 226) +#define __NR_getxattr (__NR_Linux + 227) +#define __NR_lgetxattr (__NR_Linux + 228) +#define __NR_fgetxattr (__NR_Linux + 229) +#define __NR_listxattr (__NR_Linux + 230) +#define __NR_llistxattr (__NR_Linux + 231) +#define __NR_flistxattr (__NR_Linux + 232) +#define __NR_removexattr (__NR_Linux + 233) +#define __NR_lremovexattr (__NR_Linux + 234) +#define __NR_fremovexattr (__NR_Linux + 235) +#define __NR_tkill (__NR_Linux + 236) +#define __NR_sendfile64 (__NR_Linux + 237) +#define __NR_futex (__NR_Linux + 238) +#define __NR_sched_setaffinity (__NR_Linux + 239) +#define __NR_sched_getaffinity (__NR_Linux + 240) +#define __NR_io_setup (__NR_Linux + 241) +#define __NR_io_destroy (__NR_Linux + 242) +#define __NR_io_getevents (__NR_Linux + 243) +#define __NR_io_submit (__NR_Linux + 244) +#define __NR_io_cancel (__NR_Linux + 245) +#define __NR_exit_group (__NR_Linux + 246) +#define __NR_lookup_dcookie (__NR_Linux + 247) +#define __NR_epoll_create (__NR_Linux + 248) +#define __NR_epoll_ctl (__NR_Linux + 249) +#define __NR_epoll_wait (__NR_Linux + 250) +#define __NR_remap_file_pages (__NR_Linux + 251) +#define __NR_set_tid_address (__NR_Linux + 252) +#define __NR_restart_syscall (__NR_Linux + 253) +#define __NR_fadvise64 (__NR_Linux + 254) +#define __NR_statfs64 (__NR_Linux + 255) +#define __NR_fstatfs64 (__NR_Linux + 256) +#define __NR_timer_create (__NR_Linux + 257) +#define __NR_timer_settime (__NR_Linux + 258) +#define __NR_timer_gettime (__NR_Linux + 259) +#define __NR_timer_getoverrun (__NR_Linux + 260) +#define __NR_timer_delete (__NR_Linux + 261) +#define __NR_clock_settime (__NR_Linux + 262) +#define __NR_clock_gettime (__NR_Linux + 263) +#define __NR_clock_getres (__NR_Linux + 264) +#define __NR_clock_nanosleep (__NR_Linux + 265) +#define __NR_tgkill (__NR_Linux + 266) +#define __NR_utimes (__NR_Linux + 267) +#define __NR_mbind (__NR_Linux + 268) +#define __NR_get_mempolicy (__NR_Linux + 269) +#define __NR_set_mempolicy (__NR_Linux + 270) +#define __NR_mq_open (__NR_Linux + 271) +#define __NR_mq_unlink (__NR_Linux + 272) +#define __NR_mq_timedsend (__NR_Linux + 273) +#define __NR_mq_timedreceive (__NR_Linux + 274) +#define __NR_mq_notify (__NR_Linux + 275) +#define __NR_mq_getsetattr (__NR_Linux + 276) +#define __NR_vserver (__NR_Linux + 277) +#define __NR_waitid (__NR_Linux + 278) +/* #define __NR_sys_setaltroot (__NR_Linux + 279) */ +#define __NR_add_key (__NR_Linux + 280) +#define __NR_request_key (__NR_Linux + 281) +#define __NR_keyctl (__NR_Linux + 282) +#define __NR_set_thread_area (__NR_Linux + 283) +#define __NR_inotify_init (__NR_Linux + 284) +#define __NR_inotify_add_watch (__NR_Linux + 285) +#define __NR_inotify_rm_watch (__NR_Linux + 286) +#define __NR_migrate_pages (__NR_Linux + 287) +#define __NR_openat (__NR_Linux + 288) +#define __NR_mkdirat (__NR_Linux + 289) +#define __NR_mknodat (__NR_Linux + 290) +#define __NR_fchownat (__NR_Linux + 291) +#define __NR_futimesat (__NR_Linux + 292) +#define __NR_fstatat64 (__NR_Linux + 293) +#define __NR_unlinkat (__NR_Linux + 294) +#define __NR_renameat (__NR_Linux + 295) +#define __NR_linkat (__NR_Linux + 296) +#define __NR_symlinkat (__NR_Linux + 297) +#define __NR_readlinkat (__NR_Linux + 298) +#define __NR_fchmodat (__NR_Linux + 299) +#define __NR_faccessat (__NR_Linux + 300) +#define __NR_pselect6 (__NR_Linux + 301) +#define __NR_ppoll (__NR_Linux + 302) +#define __NR_unshare (__NR_Linux + 303) +#define __NR_splice (__NR_Linux + 304) +#define __NR_sync_file_range (__NR_Linux + 305) +#define __NR_tee (__NR_Linux + 306) +#define __NR_vmsplice (__NR_Linux + 307) +#define __NR_move_pages (__NR_Linux + 308) +#define __NR_set_robust_list (__NR_Linux + 309) +#define __NR_get_robust_list (__NR_Linux + 310) +#define __NR_kexec_load (__NR_Linux + 311) +#define __NR_getcpu (__NR_Linux + 312) +#define __NR_epoll_pwait (__NR_Linux + 313) +#define __NR_ioprio_set (__NR_Linux + 314) +#define __NR_ioprio_get (__NR_Linux + 315) +#define __NR_utimensat (__NR_Linux + 316) +#define __NR_signalfd (__NR_Linux + 317) +#define __NR_timerfd (__NR_Linux + 318) +#define __NR_eventfd (__NR_Linux + 319) +#define __NR_fallocate (__NR_Linux + 320) +#define __NR_timerfd_create (__NR_Linux + 321) +#define __NR_timerfd_gettime (__NR_Linux + 322) +#define __NR_timerfd_settime (__NR_Linux + 323) +#define __NR_signalfd4 (__NR_Linux + 324) +#define __NR_eventfd2 (__NR_Linux + 325) +#define __NR_epoll_create1 (__NR_Linux + 326) +#define __NR_dup3 (__NR_Linux + 327) +#define __NR_pipe2 (__NR_Linux + 328) +#define __NR_inotify_init1 (__NR_Linux + 329) +#define __NR_preadv (__NR_Linux + 330) +#define __NR_pwritev (__NR_Linux + 331) +#define __NR_rt_tgsigqueueinfo (__NR_Linux + 332) +#define __NR_perf_event_open (__NR_Linux + 333) +#define __NR_accept4 (__NR_Linux + 334) +#define __NR_recvmmsg (__NR_Linux + 335) +#define __NR_fanotify_init (__NR_Linux + 336) +#define __NR_fanotify_mark (__NR_Linux + 337) +#define __NR_prlimit64 (__NR_Linux + 338) +#define __NR_name_to_handle_at (__NR_Linux + 339) +#define __NR_open_by_handle_at (__NR_Linux + 340) +#define __NR_clock_adjtime (__NR_Linux + 341) +#define __NR_syncfs (__NR_Linux + 342) +#define __NR_sendmmsg (__NR_Linux + 343) +#define __NR_setns (__NR_Linux + 344) +#define __NR_process_vm_readv (__NR_Linux + 345) +#define __NR_process_vm_writev (__NR_Linux + 346) +#define __NR_kcmp (__NR_Linux + 347) +#define __NR_finit_module (__NR_Linux + 348) +#define __NR_sched_setattr (__NR_Linux + 349) +#define __NR_sched_getattr (__NR_Linux + 350) +#define __NR_renameat2 (__NR_Linux + 351) +#define __NR_seccomp (__NR_Linux + 352) +#define __NR_getrandom (__NR_Linux + 353) +#define __NR_memfd_create (__NR_Linux + 354) +#define __NR_bpf (__NR_Linux + 355) +#define __NR_execveat (__NR_Linux + 356) +#define __NR_userfaultfd (__NR_Linux + 357) +#define __NR_membarrier (__NR_Linux + 358) +#define __NR_mlock2 (__NR_Linux + 359) +#define __NR_copy_file_range (__NR_Linux + 360) +#define __NR_preadv2 (__NR_Linux + 361) +#define __NR_pwritev2 (__NR_Linux + 362) +#define __NR_pkey_mprotect (__NR_Linux + 363) +#define __NR_pkey_alloc (__NR_Linux + 364) +#define __NR_pkey_free (__NR_Linux + 365) +#define __NR_statx (__NR_Linux + 366) +#define __NR_rseq (__NR_Linux + 367) +#define __NR_io_pgetevents (__NR_Linux + 368) + + +/* + * Offset of the last Linux o32 flavoured syscall + */ +#define __NR_Linux_syscalls 368 + +#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ + +#define __NR_O32_Linux 4000 +#define __NR_O32_Linux_syscalls 368 + +#if _MIPS_SIM == _MIPS_SIM_ABI64 + +/* + * Linux 64-bit syscalls are in the range from 5000 to 5999. + */ +#define __NR_Linux 5000 +#define __NR_read (__NR_Linux + 0) +#define __NR_write (__NR_Linux + 1) +#define __NR_open (__NR_Linux + 2) +#define __NR_close (__NR_Linux + 3) +#define __NR_stat (__NR_Linux + 4) +#define __NR_fstat (__NR_Linux + 5) +#define __NR_lstat (__NR_Linux + 6) +#define __NR_poll (__NR_Linux + 7) +#define __NR_lseek (__NR_Linux + 8) +#define __NR_mmap (__NR_Linux + 9) +#define __NR_mprotect (__NR_Linux + 10) +#define __NR_munmap (__NR_Linux + 11) +#define __NR_brk (__NR_Linux + 12) +#define __NR_rt_sigaction (__NR_Linux + 13) +#define __NR_rt_sigprocmask (__NR_Linux + 14) +#define __NR_ioctl (__NR_Linux + 15) +#define __NR_pread64 (__NR_Linux + 16) +#define __NR_pwrite64 (__NR_Linux + 17) +#define __NR_readv (__NR_Linux + 18) +#define __NR_writev (__NR_Linux + 19) +#define __NR_access (__NR_Linux + 20) +#define __NR_pipe (__NR_Linux + 21) +#define __NR__newselect (__NR_Linux + 22) +#define __NR_sched_yield (__NR_Linux + 23) +#define __NR_mremap (__NR_Linux + 24) +#define __NR_msync (__NR_Linux + 25) +#define __NR_mincore (__NR_Linux + 26) +#define __NR_madvise (__NR_Linux + 27) +#define __NR_shmget (__NR_Linux + 28) +#define __NR_shmat (__NR_Linux + 29) +#define __NR_shmctl (__NR_Linux + 30) +#define __NR_dup (__NR_Linux + 31) +#define __NR_dup2 (__NR_Linux + 32) +#define __NR_pause (__NR_Linux + 33) +#define __NR_nanosleep (__NR_Linux + 34) +#define __NR_getitimer (__NR_Linux + 35) +#define __NR_setitimer (__NR_Linux + 36) +#define __NR_alarm (__NR_Linux + 37) +#define __NR_getpid (__NR_Linux + 38) +#define __NR_sendfile (__NR_Linux + 39) +#define __NR_socket (__NR_Linux + 40) +#define __NR_connect (__NR_Linux + 41) +#define __NR_accept (__NR_Linux + 42) +#define __NR_sendto (__NR_Linux + 43) +#define __NR_recvfrom (__NR_Linux + 44) +#define __NR_sendmsg (__NR_Linux + 45) +#define __NR_recvmsg (__NR_Linux + 46) +#define __NR_shutdown (__NR_Linux + 47) +#define __NR_bind (__NR_Linux + 48) +#define __NR_listen (__NR_Linux + 49) +#define __NR_getsockname (__NR_Linux + 50) +#define __NR_getpeername (__NR_Linux + 51) +#define __NR_socketpair (__NR_Linux + 52) +#define __NR_setsockopt (__NR_Linux + 53) +#define __NR_getsockopt (__NR_Linux + 54) +#define __NR_clone (__NR_Linux + 55) +#define __NR_fork (__NR_Linux + 56) +#define __NR_execve (__NR_Linux + 57) +#define __NR_exit (__NR_Linux + 58) +#define __NR_wait4 (__NR_Linux + 59) +#define __NR_kill (__NR_Linux + 60) +#define __NR_uname (__NR_Linux + 61) +#define __NR_semget (__NR_Linux + 62) +#define __NR_semop (__NR_Linux + 63) +#define __NR_semctl (__NR_Linux + 64) +#define __NR_shmdt (__NR_Linux + 65) +#define __NR_msgget (__NR_Linux + 66) +#define __NR_msgsnd (__NR_Linux + 67) +#define __NR_msgrcv (__NR_Linux + 68) +#define __NR_msgctl (__NR_Linux + 69) +#define __NR_fcntl (__NR_Linux + 70) +#define __NR_flock (__NR_Linux + 71) +#define __NR_fsync (__NR_Linux + 72) +#define __NR_fdatasync (__NR_Linux + 73) +#define __NR_truncate (__NR_Linux + 74) +#define __NR_ftruncate (__NR_Linux + 75) +#define __NR_getdents (__NR_Linux + 76) +#define __NR_getcwd (__NR_Linux + 77) +#define __NR_chdir (__NR_Linux + 78) +#define __NR_fchdir (__NR_Linux + 79) +#define __NR_rename (__NR_Linux + 80) +#define __NR_mkdir (__NR_Linux + 81) +#define __NR_rmdir (__NR_Linux + 82) +#define __NR_creat (__NR_Linux + 83) +#define __NR_link (__NR_Linux + 84) +#define __NR_unlink (__NR_Linux + 85) +#define __NR_symlink (__NR_Linux + 86) +#define __NR_readlink (__NR_Linux + 87) +#define __NR_chmod (__NR_Linux + 88) +#define __NR_fchmod (__NR_Linux + 89) +#define __NR_chown (__NR_Linux + 90) +#define __NR_fchown (__NR_Linux + 91) +#define __NR_lchown (__NR_Linux + 92) +#define __NR_umask (__NR_Linux + 93) +#define __NR_gettimeofday (__NR_Linux + 94) +#define __NR_getrlimit (__NR_Linux + 95) +#define __NR_getrusage (__NR_Linux + 96) +#define __NR_sysinfo (__NR_Linux + 97) +#define __NR_times (__NR_Linux + 98) +#define __NR_ptrace (__NR_Linux + 99) +#define __NR_getuid (__NR_Linux + 100) +#define __NR_syslog (__NR_Linux + 101) +#define __NR_getgid (__NR_Linux + 102) +#define __NR_setuid (__NR_Linux + 103) +#define __NR_setgid (__NR_Linux + 104) +#define __NR_geteuid (__NR_Linux + 105) +#define __NR_getegid (__NR_Linux + 106) +#define __NR_setpgid (__NR_Linux + 107) +#define __NR_getppid (__NR_Linux + 108) +#define __NR_getpgrp (__NR_Linux + 109) +#define __NR_setsid (__NR_Linux + 110) +#define __NR_setreuid (__NR_Linux + 111) +#define __NR_setregid (__NR_Linux + 112) +#define __NR_getgroups (__NR_Linux + 113) +#define __NR_setgroups (__NR_Linux + 114) +#define __NR_setresuid (__NR_Linux + 115) +#define __NR_getresuid (__NR_Linux + 116) +#define __NR_setresgid (__NR_Linux + 117) +#define __NR_getresgid (__NR_Linux + 118) +#define __NR_getpgid (__NR_Linux + 119) +#define __NR_setfsuid (__NR_Linux + 120) +#define __NR_setfsgid (__NR_Linux + 121) +#define __NR_getsid (__NR_Linux + 122) +#define __NR_capget (__NR_Linux + 123) +#define __NR_capset (__NR_Linux + 124) +#define __NR_rt_sigpending (__NR_Linux + 125) +#define __NR_rt_sigtimedwait (__NR_Linux + 126) +#define __NR_rt_sigqueueinfo (__NR_Linux + 127) +#define __NR_rt_sigsuspend (__NR_Linux + 128) +#define __NR_sigaltstack (__NR_Linux + 129) +#define __NR_utime (__NR_Linux + 130) +#define __NR_mknod (__NR_Linux + 131) +#define __NR_personality (__NR_Linux + 132) +#define __NR_ustat (__NR_Linux + 133) +#define __NR_statfs (__NR_Linux + 134) +#define __NR_fstatfs (__NR_Linux + 135) +#define __NR_sysfs (__NR_Linux + 136) +#define __NR_getpriority (__NR_Linux + 137) +#define __NR_setpriority (__NR_Linux + 138) +#define __NR_sched_setparam (__NR_Linux + 139) +#define __NR_sched_getparam (__NR_Linux + 140) +#define __NR_sched_setscheduler (__NR_Linux + 141) +#define __NR_sched_getscheduler (__NR_Linux + 142) +#define __NR_sched_get_priority_max (__NR_Linux + 143) +#define __NR_sched_get_priority_min (__NR_Linux + 144) +#define __NR_sched_rr_get_interval (__NR_Linux + 145) +#define __NR_mlock (__NR_Linux + 146) +#define __NR_munlock (__NR_Linux + 147) +#define __NR_mlockall (__NR_Linux + 148) +#define __NR_munlockall (__NR_Linux + 149) +#define __NR_vhangup (__NR_Linux + 150) +#define __NR_pivot_root (__NR_Linux + 151) +#define __NR__sysctl (__NR_Linux + 152) +#define __NR_prctl (__NR_Linux + 153) +#define __NR_adjtimex (__NR_Linux + 154) +#define __NR_setrlimit (__NR_Linux + 155) +#define __NR_chroot (__NR_Linux + 156) +#define __NR_sync (__NR_Linux + 157) +#define __NR_acct (__NR_Linux + 158) +#define __NR_settimeofday (__NR_Linux + 159) +#define __NR_mount (__NR_Linux + 160) +#define __NR_umount2 (__NR_Linux + 161) +#define __NR_swapon (__NR_Linux + 162) +#define __NR_swapoff (__NR_Linux + 163) +#define __NR_reboot (__NR_Linux + 164) +#define __NR_sethostname (__NR_Linux + 165) +#define __NR_setdomainname (__NR_Linux + 166) +#define __NR_create_module (__NR_Linux + 167) +#define __NR_init_module (__NR_Linux + 168) +#define __NR_delete_module (__NR_Linux + 169) +#define __NR_get_kernel_syms (__NR_Linux + 170) +#define __NR_query_module (__NR_Linux + 171) +#define __NR_quotactl (__NR_Linux + 172) +#define __NR_nfsservctl (__NR_Linux + 173) +#define __NR_getpmsg (__NR_Linux + 174) +#define __NR_putpmsg (__NR_Linux + 175) +#define __NR_afs_syscall (__NR_Linux + 176) +#define __NR_reserved177 (__NR_Linux + 177) +#define __NR_gettid (__NR_Linux + 178) +#define __NR_readahead (__NR_Linux + 179) +#define __NR_setxattr (__NR_Linux + 180) +#define __NR_lsetxattr (__NR_Linux + 181) +#define __NR_fsetxattr (__NR_Linux + 182) +#define __NR_getxattr (__NR_Linux + 183) +#define __NR_lgetxattr (__NR_Linux + 184) +#define __NR_fgetxattr (__NR_Linux + 185) +#define __NR_listxattr (__NR_Linux + 186) +#define __NR_llistxattr (__NR_Linux + 187) +#define __NR_flistxattr (__NR_Linux + 188) +#define __NR_removexattr (__NR_Linux + 189) +#define __NR_lremovexattr (__NR_Linux + 190) +#define __NR_fremovexattr (__NR_Linux + 191) +#define __NR_tkill (__NR_Linux + 192) +#define __NR_reserved193 (__NR_Linux + 193) +#define __NR_futex (__NR_Linux + 194) +#define __NR_sched_setaffinity (__NR_Linux + 195) +#define __NR_sched_getaffinity (__NR_Linux + 196) +#define __NR_cacheflush (__NR_Linux + 197) +#define __NR_cachectl (__NR_Linux + 198) +#define __NR_sysmips (__NR_Linux + 199) +#define __NR_io_setup (__NR_Linux + 200) +#define __NR_io_destroy (__NR_Linux + 201) +#define __NR_io_getevents (__NR_Linux + 202) +#define __NR_io_submit (__NR_Linux + 203) +#define __NR_io_cancel (__NR_Linux + 204) +#define __NR_exit_group (__NR_Linux + 205) +#define __NR_lookup_dcookie (__NR_Linux + 206) +#define __NR_epoll_create (__NR_Linux + 207) +#define __NR_epoll_ctl (__NR_Linux + 208) +#define __NR_epoll_wait (__NR_Linux + 209) +#define __NR_remap_file_pages (__NR_Linux + 210) +#define __NR_rt_sigreturn (__NR_Linux + 211) +#define __NR_set_tid_address (__NR_Linux + 212) +#define __NR_restart_syscall (__NR_Linux + 213) +#define __NR_semtimedop (__NR_Linux + 214) +#define __NR_fadvise64 (__NR_Linux + 215) +#define __NR_timer_create (__NR_Linux + 216) +#define __NR_timer_settime (__NR_Linux + 217) +#define __NR_timer_gettime (__NR_Linux + 218) +#define __NR_timer_getoverrun (__NR_Linux + 219) +#define __NR_timer_delete (__NR_Linux + 220) +#define __NR_clock_settime (__NR_Linux + 221) +#define __NR_clock_gettime (__NR_Linux + 222) +#define __NR_clock_getres (__NR_Linux + 223) +#define __NR_clock_nanosleep (__NR_Linux + 224) +#define __NR_tgkill (__NR_Linux + 225) +#define __NR_utimes (__NR_Linux + 226) +#define __NR_mbind (__NR_Linux + 227) +#define __NR_get_mempolicy (__NR_Linux + 228) +#define __NR_set_mempolicy (__NR_Linux + 229) +#define __NR_mq_open (__NR_Linux + 230) +#define __NR_mq_unlink (__NR_Linux + 231) +#define __NR_mq_timedsend (__NR_Linux + 232) +#define __NR_mq_timedreceive (__NR_Linux + 233) +#define __NR_mq_notify (__NR_Linux + 234) +#define __NR_mq_getsetattr (__NR_Linux + 235) +#define __NR_vserver (__NR_Linux + 236) +#define __NR_waitid (__NR_Linux + 237) +/* #define __NR_sys_setaltroot (__NR_Linux + 238) */ +#define __NR_add_key (__NR_Linux + 239) +#define __NR_request_key (__NR_Linux + 240) +#define __NR_keyctl (__NR_Linux + 241) +#define __NR_set_thread_area (__NR_Linux + 242) +#define __NR_inotify_init (__NR_Linux + 243) +#define __NR_inotify_add_watch (__NR_Linux + 244) +#define __NR_inotify_rm_watch (__NR_Linux + 245) +#define __NR_migrate_pages (__NR_Linux + 246) +#define __NR_openat (__NR_Linux + 247) +#define __NR_mkdirat (__NR_Linux + 248) +#define __NR_mknodat (__NR_Linux + 249) +#define __NR_fchownat (__NR_Linux + 250) +#define __NR_futimesat (__NR_Linux + 251) +#define __NR_newfstatat (__NR_Linux + 252) +#define __NR_unlinkat (__NR_Linux + 253) +#define __NR_renameat (__NR_Linux + 254) +#define __NR_linkat (__NR_Linux + 255) +#define __NR_symlinkat (__NR_Linux + 256) +#define __NR_readlinkat (__NR_Linux + 257) +#define __NR_fchmodat (__NR_Linux + 258) +#define __NR_faccessat (__NR_Linux + 259) +#define __NR_pselect6 (__NR_Linux + 260) +#define __NR_ppoll (__NR_Linux + 261) +#define __NR_unshare (__NR_Linux + 262) +#define __NR_splice (__NR_Linux + 263) +#define __NR_sync_file_range (__NR_Linux + 264) +#define __NR_tee (__NR_Linux + 265) +#define __NR_vmsplice (__NR_Linux + 266) +#define __NR_move_pages (__NR_Linux + 267) +#define __NR_set_robust_list (__NR_Linux + 268) +#define __NR_get_robust_list (__NR_Linux + 269) +#define __NR_kexec_load (__NR_Linux + 270) +#define __NR_getcpu (__NR_Linux + 271) +#define __NR_epoll_pwait (__NR_Linux + 272) +#define __NR_ioprio_set (__NR_Linux + 273) +#define __NR_ioprio_get (__NR_Linux + 274) +#define __NR_utimensat (__NR_Linux + 275) +#define __NR_signalfd (__NR_Linux + 276) +#define __NR_timerfd (__NR_Linux + 277) +#define __NR_eventfd (__NR_Linux + 278) +#define __NR_fallocate (__NR_Linux + 279) +#define __NR_timerfd_create (__NR_Linux + 280) +#define __NR_timerfd_gettime (__NR_Linux + 281) +#define __NR_timerfd_settime (__NR_Linux + 282) +#define __NR_signalfd4 (__NR_Linux + 283) +#define __NR_eventfd2 (__NR_Linux + 284) +#define __NR_epoll_create1 (__NR_Linux + 285) +#define __NR_dup3 (__NR_Linux + 286) +#define __NR_pipe2 (__NR_Linux + 287) +#define __NR_inotify_init1 (__NR_Linux + 288) +#define __NR_preadv (__NR_Linux + 289) +#define __NR_pwritev (__NR_Linux + 290) +#define __NR_rt_tgsigqueueinfo (__NR_Linux + 291) +#define __NR_perf_event_open (__NR_Linux + 292) +#define __NR_accept4 (__NR_Linux + 293) +#define __NR_recvmmsg (__NR_Linux + 294) +#define __NR_fanotify_init (__NR_Linux + 295) +#define __NR_fanotify_mark (__NR_Linux + 296) +#define __NR_prlimit64 (__NR_Linux + 297) +#define __NR_name_to_handle_at (__NR_Linux + 298) +#define __NR_open_by_handle_at (__NR_Linux + 299) +#define __NR_clock_adjtime (__NR_Linux + 300) +#define __NR_syncfs (__NR_Linux + 301) +#define __NR_sendmmsg (__NR_Linux + 302) +#define __NR_setns (__NR_Linux + 303) +#define __NR_process_vm_readv (__NR_Linux + 304) +#define __NR_process_vm_writev (__NR_Linux + 305) +#define __NR_kcmp (__NR_Linux + 306) +#define __NR_finit_module (__NR_Linux + 307) +#define __NR_getdents64 (__NR_Linux + 308) +#define __NR_sched_setattr (__NR_Linux + 309) +#define __NR_sched_getattr (__NR_Linux + 310) +#define __NR_renameat2 (__NR_Linux + 311) +#define __NR_seccomp (__NR_Linux + 312) +#define __NR_getrandom (__NR_Linux + 313) +#define __NR_memfd_create (__NR_Linux + 314) +#define __NR_bpf (__NR_Linux + 315) +#define __NR_execveat (__NR_Linux + 316) +#define __NR_userfaultfd (__NR_Linux + 317) +#define __NR_membarrier (__NR_Linux + 318) +#define __NR_mlock2 (__NR_Linux + 319) +#define __NR_copy_file_range (__NR_Linux + 320) +#define __NR_preadv2 (__NR_Linux + 321) +#define __NR_pwritev2 (__NR_Linux + 322) +#define __NR_pkey_mprotect (__NR_Linux + 323) +#define __NR_pkey_alloc (__NR_Linux + 324) +#define __NR_pkey_free (__NR_Linux + 325) +#define __NR_statx (__NR_Linux + 326) +#define __NR_rseq (__NR_Linux + 327) +#define __NR_io_pgetevents (__NR_Linux + 328) + +/* + * Offset of the last Linux 64-bit flavoured syscall + */ +#define __NR_Linux_syscalls 328 + +#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ + +#define __NR_64_Linux 5000 +#define __NR_64_Linux_syscalls 328 + +#if _MIPS_SIM == _MIPS_SIM_NABI32 + +/* + * Linux N32 syscalls are in the range from 6000 to 6999. + */ +#define __NR_Linux 6000 +#define __NR_read (__NR_Linux + 0) +#define __NR_write (__NR_Linux + 1) +#define __NR_open (__NR_Linux + 2) +#define __NR_close (__NR_Linux + 3) +#define __NR_stat (__NR_Linux + 4) +#define __NR_fstat (__NR_Linux + 5) +#define __NR_lstat (__NR_Linux + 6) +#define __NR_poll (__NR_Linux + 7) +#define __NR_lseek (__NR_Linux + 8) +#define __NR_mmap (__NR_Linux + 9) +#define __NR_mprotect (__NR_Linux + 10) +#define __NR_munmap (__NR_Linux + 11) +#define __NR_brk (__NR_Linux + 12) +#define __NR_rt_sigaction (__NR_Linux + 13) +#define __NR_rt_sigprocmask (__NR_Linux + 14) +#define __NR_ioctl (__NR_Linux + 15) +#define __NR_pread64 (__NR_Linux + 16) +#define __NR_pwrite64 (__NR_Linux + 17) +#define __NR_readv (__NR_Linux + 18) +#define __NR_writev (__NR_Linux + 19) +#define __NR_access (__NR_Linux + 20) +#define __NR_pipe (__NR_Linux + 21) +#define __NR__newselect (__NR_Linux + 22) +#define __NR_sched_yield (__NR_Linux + 23) +#define __NR_mremap (__NR_Linux + 24) +#define __NR_msync (__NR_Linux + 25) +#define __NR_mincore (__NR_Linux + 26) +#define __NR_madvise (__NR_Linux + 27) +#define __NR_shmget (__NR_Linux + 28) +#define __NR_shmat (__NR_Linux + 29) +#define __NR_shmctl (__NR_Linux + 30) +#define __NR_dup (__NR_Linux + 31) +#define __NR_dup2 (__NR_Linux + 32) +#define __NR_pause (__NR_Linux + 33) +#define __NR_nanosleep (__NR_Linux + 34) +#define __NR_getitimer (__NR_Linux + 35) +#define __NR_setitimer (__NR_Linux + 36) +#define __NR_alarm (__NR_Linux + 37) +#define __NR_getpid (__NR_Linux + 38) +#define __NR_sendfile (__NR_Linux + 39) +#define __NR_socket (__NR_Linux + 40) +#define __NR_connect (__NR_Linux + 41) +#define __NR_accept (__NR_Linux + 42) +#define __NR_sendto (__NR_Linux + 43) +#define __NR_recvfrom (__NR_Linux + 44) +#define __NR_sendmsg (__NR_Linux + 45) +#define __NR_recvmsg (__NR_Linux + 46) +#define __NR_shutdown (__NR_Linux + 47) +#define __NR_bind (__NR_Linux + 48) +#define __NR_listen (__NR_Linux + 49) +#define __NR_getsockname (__NR_Linux + 50) +#define __NR_getpeername (__NR_Linux + 51) +#define __NR_socketpair (__NR_Linux + 52) +#define __NR_setsockopt (__NR_Linux + 53) +#define __NR_getsockopt (__NR_Linux + 54) +#define __NR_clone (__NR_Linux + 55) +#define __NR_fork (__NR_Linux + 56) +#define __NR_execve (__NR_Linux + 57) +#define __NR_exit (__NR_Linux + 58) +#define __NR_wait4 (__NR_Linux + 59) +#define __NR_kill (__NR_Linux + 60) +#define __NR_uname (__NR_Linux + 61) +#define __NR_semget (__NR_Linux + 62) +#define __NR_semop (__NR_Linux + 63) +#define __NR_semctl (__NR_Linux + 64) +#define __NR_shmdt (__NR_Linux + 65) +#define __NR_msgget (__NR_Linux + 66) +#define __NR_msgsnd (__NR_Linux + 67) +#define __NR_msgrcv (__NR_Linux + 68) +#define __NR_msgctl (__NR_Linux + 69) +#define __NR_fcntl (__NR_Linux + 70) +#define __NR_flock (__NR_Linux + 71) +#define __NR_fsync (__NR_Linux + 72) +#define __NR_fdatasync (__NR_Linux + 73) +#define __NR_truncate (__NR_Linux + 74) +#define __NR_ftruncate (__NR_Linux + 75) +#define __NR_getdents (__NR_Linux + 76) +#define __NR_getcwd (__NR_Linux + 77) +#define __NR_chdir (__NR_Linux + 78) +#define __NR_fchdir (__NR_Linux + 79) +#define __NR_rename (__NR_Linux + 80) +#define __NR_mkdir (__NR_Linux + 81) +#define __NR_rmdir (__NR_Linux + 82) +#define __NR_creat (__NR_Linux + 83) +#define __NR_link (__NR_Linux + 84) +#define __NR_unlink (__NR_Linux + 85) +#define __NR_symlink (__NR_Linux + 86) +#define __NR_readlink (__NR_Linux + 87) +#define __NR_chmod (__NR_Linux + 88) +#define __NR_fchmod (__NR_Linux + 89) +#define __NR_chown (__NR_Linux + 90) +#define __NR_fchown (__NR_Linux + 91) +#define __NR_lchown (__NR_Linux + 92) +#define __NR_umask (__NR_Linux + 93) +#define __NR_gettimeofday (__NR_Linux + 94) +#define __NR_getrlimit (__NR_Linux + 95) +#define __NR_getrusage (__NR_Linux + 96) +#define __NR_sysinfo (__NR_Linux + 97) +#define __NR_times (__NR_Linux + 98) +#define __NR_ptrace (__NR_Linux + 99) +#define __NR_getuid (__NR_Linux + 100) +#define __NR_syslog (__NR_Linux + 101) +#define __NR_getgid (__NR_Linux + 102) +#define __NR_setuid (__NR_Linux + 103) +#define __NR_setgid (__NR_Linux + 104) +#define __NR_geteuid (__NR_Linux + 105) +#define __NR_getegid (__NR_Linux + 106) +#define __NR_setpgid (__NR_Linux + 107) +#define __NR_getppid (__NR_Linux + 108) +#define __NR_getpgrp (__NR_Linux + 109) +#define __NR_setsid (__NR_Linux + 110) +#define __NR_setreuid (__NR_Linux + 111) +#define __NR_setregid (__NR_Linux + 112) +#define __NR_getgroups (__NR_Linux + 113) +#define __NR_setgroups (__NR_Linux + 114) +#define __NR_setresuid (__NR_Linux + 115) +#define __NR_getresuid (__NR_Linux + 116) +#define __NR_setresgid (__NR_Linux + 117) +#define __NR_getresgid (__NR_Linux + 118) +#define __NR_getpgid (__NR_Linux + 119) +#define __NR_setfsuid (__NR_Linux + 120) +#define __NR_setfsgid (__NR_Linux + 121) +#define __NR_getsid (__NR_Linux + 122) +#define __NR_capget (__NR_Linux + 123) +#define __NR_capset (__NR_Linux + 124) +#define __NR_rt_sigpending (__NR_Linux + 125) +#define __NR_rt_sigtimedwait (__NR_Linux + 126) +#define __NR_rt_sigqueueinfo (__NR_Linux + 127) +#define __NR_rt_sigsuspend (__NR_Linux + 128) +#define __NR_sigaltstack (__NR_Linux + 129) +#define __NR_utime (__NR_Linux + 130) +#define __NR_mknod (__NR_Linux + 131) +#define __NR_personality (__NR_Linux + 132) +#define __NR_ustat (__NR_Linux + 133) +#define __NR_statfs (__NR_Linux + 134) +#define __NR_fstatfs (__NR_Linux + 135) +#define __NR_sysfs (__NR_Linux + 136) +#define __NR_getpriority (__NR_Linux + 137) +#define __NR_setpriority (__NR_Linux + 138) +#define __NR_sched_setparam (__NR_Linux + 139) +#define __NR_sched_getparam (__NR_Linux + 140) +#define __NR_sched_setscheduler (__NR_Linux + 141) +#define __NR_sched_getscheduler (__NR_Linux + 142) +#define __NR_sched_get_priority_max (__NR_Linux + 143) +#define __NR_sched_get_priority_min (__NR_Linux + 144) +#define __NR_sched_rr_get_interval (__NR_Linux + 145) +#define __NR_mlock (__NR_Linux + 146) +#define __NR_munlock (__NR_Linux + 147) +#define __NR_mlockall (__NR_Linux + 148) +#define __NR_munlockall (__NR_Linux + 149) +#define __NR_vhangup (__NR_Linux + 150) +#define __NR_pivot_root (__NR_Linux + 151) +#define __NR__sysctl (__NR_Linux + 152) +#define __NR_prctl (__NR_Linux + 153) +#define __NR_adjtimex (__NR_Linux + 154) +#define __NR_setrlimit (__NR_Linux + 155) +#define __NR_chroot (__NR_Linux + 156) +#define __NR_sync (__NR_Linux + 157) +#define __NR_acct (__NR_Linux + 158) +#define __NR_settimeofday (__NR_Linux + 159) +#define __NR_mount (__NR_Linux + 160) +#define __NR_umount2 (__NR_Linux + 161) +#define __NR_swapon (__NR_Linux + 162) +#define __NR_swapoff (__NR_Linux + 163) +#define __NR_reboot (__NR_Linux + 164) +#define __NR_sethostname (__NR_Linux + 165) +#define __NR_setdomainname (__NR_Linux + 166) +#define __NR_create_module (__NR_Linux + 167) +#define __NR_init_module (__NR_Linux + 168) +#define __NR_delete_module (__NR_Linux + 169) +#define __NR_get_kernel_syms (__NR_Linux + 170) +#define __NR_query_module (__NR_Linux + 171) +#define __NR_quotactl (__NR_Linux + 172) +#define __NR_nfsservctl (__NR_Linux + 173) +#define __NR_getpmsg (__NR_Linux + 174) +#define __NR_putpmsg (__NR_Linux + 175) +#define __NR_afs_syscall (__NR_Linux + 176) +#define __NR_reserved177 (__NR_Linux + 177) +#define __NR_gettid (__NR_Linux + 178) +#define __NR_readahead (__NR_Linux + 179) +#define __NR_setxattr (__NR_Linux + 180) +#define __NR_lsetxattr (__NR_Linux + 181) +#define __NR_fsetxattr (__NR_Linux + 182) +#define __NR_getxattr (__NR_Linux + 183) +#define __NR_lgetxattr (__NR_Linux + 184) +#define __NR_fgetxattr (__NR_Linux + 185) +#define __NR_listxattr (__NR_Linux + 186) +#define __NR_llistxattr (__NR_Linux + 187) +#define __NR_flistxattr (__NR_Linux + 188) +#define __NR_removexattr (__NR_Linux + 189) +#define __NR_lremovexattr (__NR_Linux + 190) +#define __NR_fremovexattr (__NR_Linux + 191) +#define __NR_tkill (__NR_Linux + 192) +#define __NR_reserved193 (__NR_Linux + 193) +#define __NR_futex (__NR_Linux + 194) +#define __NR_sched_setaffinity (__NR_Linux + 195) +#define __NR_sched_getaffinity (__NR_Linux + 196) +#define __NR_cacheflush (__NR_Linux + 197) +#define __NR_cachectl (__NR_Linux + 198) +#define __NR_sysmips (__NR_Linux + 199) +#define __NR_io_setup (__NR_Linux + 200) +#define __NR_io_destroy (__NR_Linux + 201) +#define __NR_io_getevents (__NR_Linux + 202) +#define __NR_io_submit (__NR_Linux + 203) +#define __NR_io_cancel (__NR_Linux + 204) +#define __NR_exit_group (__NR_Linux + 205) +#define __NR_lookup_dcookie (__NR_Linux + 206) +#define __NR_epoll_create (__NR_Linux + 207) +#define __NR_epoll_ctl (__NR_Linux + 208) +#define __NR_epoll_wait (__NR_Linux + 209) +#define __NR_remap_file_pages (__NR_Linux + 210) +#define __NR_rt_sigreturn (__NR_Linux + 211) +#define __NR_fcntl64 (__NR_Linux + 212) +#define __NR_set_tid_address (__NR_Linux + 213) +#define __NR_restart_syscall (__NR_Linux + 214) +#define __NR_semtimedop (__NR_Linux + 215) +#define __NR_fadvise64 (__NR_Linux + 216) +#define __NR_statfs64 (__NR_Linux + 217) +#define __NR_fstatfs64 (__NR_Linux + 218) +#define __NR_sendfile64 (__NR_Linux + 219) +#define __NR_timer_create (__NR_Linux + 220) +#define __NR_timer_settime (__NR_Linux + 221) +#define __NR_timer_gettime (__NR_Linux + 222) +#define __NR_timer_getoverrun (__NR_Linux + 223) +#define __NR_timer_delete (__NR_Linux + 224) +#define __NR_clock_settime (__NR_Linux + 225) +#define __NR_clock_gettime (__NR_Linux + 226) +#define __NR_clock_getres (__NR_Linux + 227) +#define __NR_clock_nanosleep (__NR_Linux + 228) +#define __NR_tgkill (__NR_Linux + 229) +#define __NR_utimes (__NR_Linux + 230) +#define __NR_mbind (__NR_Linux + 231) +#define __NR_get_mempolicy (__NR_Linux + 232) +#define __NR_set_mempolicy (__NR_Linux + 233) +#define __NR_mq_open (__NR_Linux + 234) +#define __NR_mq_unlink (__NR_Linux + 235) +#define __NR_mq_timedsend (__NR_Linux + 236) +#define __NR_mq_timedreceive (__NR_Linux + 237) +#define __NR_mq_notify (__NR_Linux + 238) +#define __NR_mq_getsetattr (__NR_Linux + 239) +#define __NR_vserver (__NR_Linux + 240) +#define __NR_waitid (__NR_Linux + 241) +/* #define __NR_sys_setaltroot (__NR_Linux + 242) */ +#define __NR_add_key (__NR_Linux + 243) +#define __NR_request_key (__NR_Linux + 244) +#define __NR_keyctl (__NR_Linux + 245) +#define __NR_set_thread_area (__NR_Linux + 246) +#define __NR_inotify_init (__NR_Linux + 247) +#define __NR_inotify_add_watch (__NR_Linux + 248) +#define __NR_inotify_rm_watch (__NR_Linux + 249) +#define __NR_migrate_pages (__NR_Linux + 250) +#define __NR_openat (__NR_Linux + 251) +#define __NR_mkdirat (__NR_Linux + 252) +#define __NR_mknodat (__NR_Linux + 253) +#define __NR_fchownat (__NR_Linux + 254) +#define __NR_futimesat (__NR_Linux + 255) +#define __NR_newfstatat (__NR_Linux + 256) +#define __NR_unlinkat (__NR_Linux + 257) +#define __NR_renameat (__NR_Linux + 258) +#define __NR_linkat (__NR_Linux + 259) +#define __NR_symlinkat (__NR_Linux + 260) +#define __NR_readlinkat (__NR_Linux + 261) +#define __NR_fchmodat (__NR_Linux + 262) +#define __NR_faccessat (__NR_Linux + 263) +#define __NR_pselect6 (__NR_Linux + 264) +#define __NR_ppoll (__NR_Linux + 265) +#define __NR_unshare (__NR_Linux + 266) +#define __NR_splice (__NR_Linux + 267) +#define __NR_sync_file_range (__NR_Linux + 268) +#define __NR_tee (__NR_Linux + 269) +#define __NR_vmsplice (__NR_Linux + 270) +#define __NR_move_pages (__NR_Linux + 271) +#define __NR_set_robust_list (__NR_Linux + 272) +#define __NR_get_robust_list (__NR_Linux + 273) +#define __NR_kexec_load (__NR_Linux + 274) +#define __NR_getcpu (__NR_Linux + 275) +#define __NR_epoll_pwait (__NR_Linux + 276) +#define __NR_ioprio_set (__NR_Linux + 277) +#define __NR_ioprio_get (__NR_Linux + 278) +#define __NR_utimensat (__NR_Linux + 279) +#define __NR_signalfd (__NR_Linux + 280) +#define __NR_timerfd (__NR_Linux + 281) +#define __NR_eventfd (__NR_Linux + 282) +#define __NR_fallocate (__NR_Linux + 283) +#define __NR_timerfd_create (__NR_Linux + 284) +#define __NR_timerfd_gettime (__NR_Linux + 285) +#define __NR_timerfd_settime (__NR_Linux + 286) +#define __NR_signalfd4 (__NR_Linux + 287) +#define __NR_eventfd2 (__NR_Linux + 288) +#define __NR_epoll_create1 (__NR_Linux + 289) +#define __NR_dup3 (__NR_Linux + 290) +#define __NR_pipe2 (__NR_Linux + 291) +#define __NR_inotify_init1 (__NR_Linux + 292) +#define __NR_preadv (__NR_Linux + 293) +#define __NR_pwritev (__NR_Linux + 294) +#define __NR_rt_tgsigqueueinfo (__NR_Linux + 295) +#define __NR_perf_event_open (__NR_Linux + 296) +#define __NR_accept4 (__NR_Linux + 297) +#define __NR_recvmmsg (__NR_Linux + 298) +#define __NR_getdents64 (__NR_Linux + 299) +#define __NR_fanotify_init (__NR_Linux + 300) +#define __NR_fanotify_mark (__NR_Linux + 301) +#define __NR_prlimit64 (__NR_Linux + 302) +#define __NR_name_to_handle_at (__NR_Linux + 303) +#define __NR_open_by_handle_at (__NR_Linux + 304) +#define __NR_clock_adjtime (__NR_Linux + 305) +#define __NR_syncfs (__NR_Linux + 306) +#define __NR_sendmmsg (__NR_Linux + 307) +#define __NR_setns (__NR_Linux + 308) +#define __NR_process_vm_readv (__NR_Linux + 309) +#define __NR_process_vm_writev (__NR_Linux + 310) +#define __NR_kcmp (__NR_Linux + 311) +#define __NR_finit_module (__NR_Linux + 312) +#define __NR_sched_setattr (__NR_Linux + 313) +#define __NR_sched_getattr (__NR_Linux + 314) +#define __NR_renameat2 (__NR_Linux + 315) +#define __NR_seccomp (__NR_Linux + 316) +#define __NR_getrandom (__NR_Linux + 317) +#define __NR_memfd_create (__NR_Linux + 318) +#define __NR_bpf (__NR_Linux + 319) +#define __NR_execveat (__NR_Linux + 320) +#define __NR_userfaultfd (__NR_Linux + 321) +#define __NR_membarrier (__NR_Linux + 322) +#define __NR_mlock2 (__NR_Linux + 323) +#define __NR_copy_file_range (__NR_Linux + 324) +#define __NR_preadv2 (__NR_Linux + 325) +#define __NR_pwritev2 (__NR_Linux + 326) +#define __NR_pkey_mprotect (__NR_Linux + 327) +#define __NR_pkey_alloc (__NR_Linux + 328) +#define __NR_pkey_free (__NR_Linux + 329) +#define __NR_statx (__NR_Linux + 330) +#define __NR_rseq (__NR_Linux + 331) +#define __NR_io_pgetevents (__NR_Linux + 332) + +/* + * Offset of the last N32 flavoured syscall + */ +#define __NR_Linux_syscalls 332 + +#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ + +#define __NR_N32_Linux 6000 +#define __NR_N32_Linux_syscalls 332 + +#endif /* _UAPI_ASM_UNISTD_H */ diff --git a/libc/include/mipsel-linux-gnu/bits/dlfcn.h b/libc/include/mipsel-linux-gnu/bits/dlfcn.h new file mode 100644 index 0000000000..996be6f45b --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/dlfcn.h @@ -0,0 +1,64 @@ +/* System dependent definitions for run-time dynamic loading. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/errno.h b/libc/include/mipsel-linux-gnu/bits/errno.h new file mode 100644 index 0000000000..2d6069ad8a --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/errno.h @@ -0,0 +1,52 @@ +/* Error constants. MIPS/Linux specific version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/eventfd.h b/libc/include/mipsel-linux-gnu/bits/eventfd.h new file mode 100644 index 0000000000..9ff48c23fb --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/eventfd.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2007-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/inotify.h b/libc/include/mipsel-linux-gnu/bits/inotify.h new file mode 100644 index 0000000000..d063466c30 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/inotify.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/ioctl-types.h b/libc/include/mipsel-linux-gnu/bits/ioctl-types.h new file mode 100644 index 0000000000..bfbdac6f57 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/ioctl-types.h @@ -0,0 +1,75 @@ +/* Structure types for pre-termios terminal ioctls. Linux/MIPS version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/ipc.h b/libc/include/mipsel-linux-gnu/bits/ipc.h new file mode 100644 index 0000000000..e994ffc9ad --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/ipc.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IPC_H +# error "Never use directly; include instead." +#endif + +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#ifdef __USE_GNU +# define IPC_INFO 3 /* See ipcs. */ +#endif + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + unsigned int uid; /* Owner's user ID. */ + unsigned int gid; /* Owner's group ID. */ + unsigned int cuid; /* Creator's user ID. */ + unsigned int cgid; /* Creator's group ID. */ + unsigned int mode; /* Read/write permission. */ + unsigned short int __seq; /* Sequence number. */ + unsigned short int __pad1; + unsigned long int __glibc_reserved1; + unsigned long int __glibc_reserved2; +}; \ No newline at end of file diff --git a/libc/include/mipsel-linux-gnu/bits/ipctypes.h b/libc/include/mipsel-linux-gnu/bits/ipctypes.h new file mode 100644 index 0000000000..ffea8d325c --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/ipctypes.h @@ -0,0 +1,31 @@ +/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. MIPS version + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* + * Never include directly. + */ + +#ifndef _BITS_IPCTYPES_H +#define _BITS_IPCTYPES_H 1 + +#include + +typedef __SLONG32_TYPE __ipc_pid_t; + + +#endif /* bits/ipctypes.h */ \ No newline at end of file diff --git a/libc/include/mipsel-linux-gnu/bits/local_lim.h b/libc/include/mipsel-linux-gnu/bits/local_lim.h new file mode 100644 index 0000000000..96b65eb686 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/local_lim.h @@ -0,0 +1,99 @@ +/* Minimum guaranteed maximum values for system limits. MIPS Linux version. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. At least two pages with 64k pages. */ +#define PTHREAD_STACK_MIN 131072 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) \ No newline at end of file diff --git a/libc/include/mipsel-linux-gnu/bits/mman.h b/libc/include/mipsel-linux-gnu/bits/mman.h new file mode 100644 index 0000000000..43c768ab5e --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/mman.h @@ -0,0 +1,48 @@ +/* Definitions for POSIX memory map interface. Linux/MIPS version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/msq-pad.h b/libc/include/mipsel-linux-gnu/bits/msq-pad.h new file mode 100644 index 0000000000..2cde6ddf34 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/msq-pad.h @@ -0,0 +1,31 @@ +/* Define where padding goes in struct msqid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include + +#ifdef __MIPSEL__ +# define __MSQ_PAD_AFTER_TIME (__TIMESIZE == 32) +# define __MSQ_PAD_BEFORE_TIME 0 +#else +# define __MSQ_PAD_AFTER_TIME 0 +# define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) +#endif \ No newline at end of file diff --git a/libc/include/mipsel-linux-gnu/bits/poll.h b/libc/include/mipsel-linux-gnu/bits/poll.h new file mode 100644 index 0000000000..7793460007 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/poll.h @@ -0,0 +1,49 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/resource.h b/libc/include/mipsel-linux-gnu/bits/resource.h new file mode 100644 index 0000000000..2f200b1025 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/resource.h @@ -0,0 +1,231 @@ +/* Bit values & structures for resource limits. Linux/MIPS version. + Copyright (C) 1994-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 µs 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/libc/include/mipsel-linux-gnu/bits/sem-pad.h b/libc/include/mipsel-linux-gnu/bits/sem-pad.h new file mode 100644 index 0000000000..b1810b2080 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/sem-pad.h @@ -0,0 +1,24 @@ +/* Define where padding goes in struct semid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SEM_H +# error "Never use directly; include instead." +#endif + +#define __SEM_PAD_AFTER_TIME 0 +#define __SEM_PAD_BEFORE_TIME 0 \ No newline at end of file diff --git a/libc/include/mipsel-linux-gnu/bits/shm-pad.h b/libc/include/mipsel-linux-gnu/bits/shm-pad.h new file mode 100644 index 0000000000..e672c8c7b0 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/shm-pad.h @@ -0,0 +1,26 @@ +/* Define where padding goes in struct shmid_ds. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SHM_H +# error "Never use directly; include instead." +#endif + +#define __SHM_PAD_AFTER_TIME 0 +#define __SHM_PAD_BEFORE_TIME 0 +#define __SHM_SEGSZ_AFTER_TIME 0 +#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 \ No newline at end of file diff --git a/libc/include/mipsel-linux-gnu/bits/shmlba.h b/libc/include/mipsel-linux-gnu/bits/shmlba.h new file mode 100644 index 0000000000..9561decd9a --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/shmlba.h @@ -0,0 +1,24 @@ +/* Define SHMLBA. MIPS version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/sigaction.h b/libc/include/mipsel-linux-gnu/bits/sigaction.h new file mode 100644 index 0000000000..bbc6004b59 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/sigaction.h @@ -0,0 +1,94 @@ +/* The proper definitions for Linux/MIPS's sigaction. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/sigcontext.h b/libc/include/mipsel-linux-gnu/bits/sigcontext.h new file mode 100644 index 0000000000..231695c93f --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/sigcontext.h @@ -0,0 +1,82 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/siginfo-arch.h b/libc/include/mipsel-linux-gnu/bits/siginfo-arch.h new file mode 100644 index 0000000000..d639ba2076 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/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/libc/include/mipsel-linux-gnu/bits/signalfd.h b/libc/include/mipsel-linux-gnu/bits/signalfd.h new file mode 100644 index 0000000000..a8f5275551 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/signalfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2007-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/signum.h b/libc/include/mipsel-linux-gnu/bits/signum.h new file mode 100644 index 0000000000..e3cd97af8b --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/signum.h @@ -0,0 +1,68 @@ +/* Signal number definitions. Linux/MIPS version. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use instead." +#endif + +#include + +/* Adjustments and additions to the signal number constants for + Linux/MIPS. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGPWR 19 /* Power failure imminent. */ + +#undef SIGUSR1 +#define SIGUSR1 16 +#undef SIGUSR2 +#define SIGUSR2 17 +#undef SIGCHLD +#define SIGCHLD 18 +#undef SIGWINCH +#define SIGWINCH 20 +#undef SIGURG +#define SIGURG 21 +#undef SIGPOLL +#define SIGPOLL 22 +#undef SIGSTOP +#define SIGSTOP 23 +#undef SIGTSTP +#define SIGTSTP 24 +#undef SIGCONT +#define SIGCONT 25 +#undef SIGTTIN +#define SIGTTIN 26 +#undef SIGTTOU +#define SIGTTOU 27 +#undef SIGVTALRM +#define SIGVTALRM 28 +#undef SIGPROF +#define SIGPROF 29 +#undef SIGXCPU +#define SIGXCPU 30 +#undef SIGXFSZ +#define SIGXFSZ 31 + +#undef __SIGRTMAX +#define __SIGRTMAX 127 + +#endif /* included. */ \ No newline at end of file diff --git a/libc/include/mipsel-linux-gnu/bits/socket_type.h b/libc/include/mipsel-linux-gnu/bits/socket_type.h new file mode 100644 index 0000000000..4c976f179e --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/socket_type.h @@ -0,0 +1,55 @@ +/* Define enum __socket_type for Linux/MIPS. + Copyright (C) 1991-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/statfs.h b/libc/include/mipsel-linux-gnu/bits/statfs.h new file mode 100644 index 0000000000..fd0f68d6d7 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/statfs.h @@ -0,0 +1,73 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/termios-c_cc.h b/libc/include/mipsel-linux-gnu/bits/termios-c_cc.h new file mode 100644 index 0000000000..ed124b8db4 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/termios-c_cc.h @@ -0,0 +1,43 @@ +/* termios c_cc symbolic constant definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/termios-c_lflag.h b/libc/include/mipsel-linux-gnu/bits/termios-c_lflag.h new file mode 100644 index 0000000000..e5a6773476 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/termios-c_lflag.h @@ -0,0 +1,46 @@ +/* termios local mode definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/termios-struct.h b/libc/include/mipsel-linux-gnu/bits/termios-struct.h new file mode 100644 index 0000000000..0442c6f354 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/termios-struct.h @@ -0,0 +1,34 @@ +/* struct termios definition. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/termios-tcflow.h b/libc/include/mipsel-linux-gnu/bits/termios-tcflow.h new file mode 100644 index 0000000000..2c523c3a2a --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/termios-tcflow.h @@ -0,0 +1,26 @@ +/* termios local mode definitions. Linux/mips version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/timerfd.h b/libc/include/mipsel-linux-gnu/bits/timerfd.h new file mode 100644 index 0000000000..005d411617 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/timerfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2008-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/bits/types/stack_t.h b/libc/include/mipsel-linux-gnu/bits/types/stack_t.h new file mode 100644 index 0000000000..b62c348140 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/bits/types/stack_t.h @@ -0,0 +1,33 @@ +/* Define stack_t. MIPS Linux version. + Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/mipsel-linux-gnu/ieee754.h b/libc/include/mipsel-linux-gnu/ieee754.h new file mode 100644 index 0000000000..600dbce3d8 --- /dev/null +++ b/libc/include/mipsel-linux-gnu/ieee754.h @@ -0,0 +1,323 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#include + +__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/libc/glibc/sysdeps/unix/sysv/linux/nios2/asm/unistd.h b/libc/include/nios2-linux-gnu/asm/unistd.h similarity index 100% rename from libc/glibc/sysdeps/unix/sysv/linux/nios2/asm/unistd.h rename to libc/include/nios2-linux-gnu/asm/unistd.h diff --git a/libc/include/nios2-linux-gnu/bits/endian.h b/libc/include/nios2-linux-gnu/bits/endian.h new file mode 100644 index 0000000000..b18aada80a --- /dev/null +++ b/libc/include/nios2-linux-gnu/bits/endian.h @@ -0,0 +1,12 @@ +/* The Nios II architecture has selectable endianness. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#ifdef __nios2_big_endian__ +# define __BYTE_ORDER __BIG_ENDIAN +#endif +#ifdef __nios2_little_endian__ +# define __BYTE_ORDER __LITTLE_ENDIAN +#endif \ No newline at end of file diff --git a/libc/include/nios2-linux-gnu/bits/fcntl.h b/libc/include/nios2-linux-gnu/bits/fcntl.h new file mode 100644 index 0000000000..080f060d61 --- /dev/null +++ b/libc/include/nios2-linux-gnu/bits/fcntl.h @@ -0,0 +1,56 @@ +/* O_*, F_*, FD_* bit values for the generic Linux ABI. + Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _FCNTL_H +# error "Never use directly; include instead." +#endif + +#include + +#if __WORDSIZE == 64 +# define __O_LARGEFILE 0 +#endif + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/nios2-linux-gnu/bits/fenv.h b/libc/include/nios2-linux-gnu/bits/fenv.h new file mode 100644 index 0000000000..336a724a02 --- /dev/null +++ b/libc/include/nios2-linux-gnu/bits/fenv.h @@ -0,0 +1,52 @@ +/* Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + +/* The Altera specified Nios II hardware FPU does not support exceptions, + nor does the software floating-point support. */ +#define FE_ALL_EXCEPT 0 + +/* Nios II supports only round-to-nearest. The software + floating-point support also acts this way. */ +enum + { + __FE_UNDEFINED = 0, + + FE_TONEAREST = +#define FE_TONEAREST 1 + FE_TONEAREST, + }; + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + +/* Type representing floating-point environment. */ +typedef unsigned int fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((const fenv_t *) -1) + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef unsigned int femode_t; + +/* Default floating-point control modes. */ +# define FE_DFL_MODE ((const femode_t *) -1L) +#endif \ No newline at end of file diff --git a/libc/include/nios2-linux-gnu/bits/floatn.h b/libc/include/nios2-linux-gnu/bits/floatn.h new file mode 100644 index 0000000000..24852b6800 --- /dev/null +++ b/libc/include/nios2-linux-gnu/bits/floatn.h @@ -0,0 +1,52 @@ +/* Macros to control TS 18661-3 glibc features. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/nios2-linux-gnu/bits/link.h b/libc/include/nios2-linux-gnu/bits/link.h new file mode 100644 index 0000000000..2d0ac0e82a --- /dev/null +++ b/libc/include/nios2-linux-gnu/bits/link.h @@ -0,0 +1,54 @@ +/* Machine-specific declarations for dynamic linker interface, Nios II version. + Copyright (C) 2009-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + +/* Registers for entry into PLT on Nios II. */ +typedef struct La_nios2_regs +{ + uint32_t lr_reg[4]; /* r4 through r7 */ + uint32_t lr_ra; + uint32_t lr_sp; +} La_nios2_regs; + +/* Return values for calls from PLT on Nios II. */ +typedef struct La_nios2_retval +{ + uint32_t lrv_r2; + uint32_t lrv_r3; +} La_nios2_retval; + +__BEGIN_DECLS + +extern Elf32_Addr la_nios2_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_nios2_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_nios2_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_nios2_regs *__inregs, + La_nios2_retval *__outregs, + const char *symname); + +__END_DECLS \ No newline at end of file diff --git a/libc/include/nios2-linux-gnu/bits/long-double.h b/libc/include/nios2-linux-gnu/bits/long-double.h new file mode 100644 index 0000000000..125807d07a --- /dev/null +++ b/libc/include/nios2-linux-gnu/bits/long-double.h @@ -0,0 +1,39 @@ +/* Properties of long double type. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* This header is included by . + + If long double is ABI-compatible with double, it should define + __NO_LONG_DOUBLE_MATH to 1; otherwise, it should leave + __NO_LONG_DOUBLE_MATH undefined. + + If this build of the GNU C Library supports both long double + ABI-compatible with double and some other long double format not + ABI-compatible with double, it should define + __LONG_DOUBLE_MATH_OPTIONAL to 1; otherwise, it should leave + __LONG_DOUBLE_MATH_OPTIONAL undefined. + + If __NO_LONG_DOUBLE_MATH is already defined, this header must not + define anything; this is needed to work with the definition of + __NO_LONG_DOUBLE_MATH in nldbl-compat.h. */ + +/* In the default version of this header, long double is + ABI-compatible with double. */ +#ifndef __NO_LONG_DOUBLE_MATH +# define __NO_LONG_DOUBLE_MATH 1 +#endif \ No newline at end of file diff --git a/libc/include/nios2-linux-gnu/bits/procfs.h b/libc/include/nios2-linux-gnu/bits/procfs.h new file mode 100644 index 0000000000..08cd4accba --- /dev/null +++ b/libc/include/nios2-linux-gnu/bits/procfs.h @@ -0,0 +1,34 @@ +/* Types for registers for sys/procfs.h. Nios II version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +/* Type for a general-purpose register. */ +typedef unsigned long elf_greg_t; + +/* And the whole bunch of them. We could have used `struct + user_regs' directly in the typedef, but tradition says that + the register set is an array, which does have some peculiar + semantics, so leave it that way. */ +#define ELF_NGREG (sizeof (struct user_regs) / sizeof (elf_greg_t)) +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +/* Register set for the floating-point registers. */ +typedef struct user_fpregs elf_fpregset_t; \ No newline at end of file diff --git a/libc/include/nios2-linux-gnu/bits/pthreadtypes-arch.h b/libc/include/nios2-linux-gnu/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..70de0c4959 --- /dev/null +++ b/libc/include/nios2-linux-gnu/bits/pthreadtypes-arch.h @@ -0,0 +1,72 @@ +/* Machine-specific pthread type layouts. Nios II version. + Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#define __SIZEOF_PTHREAD_ATTR_T 36 +#define __SIZEOF_PTHREAD_MUTEX_T 24 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCK_T 32 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIER_T 20 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +/* Data structure for mutex handling. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 0 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 +#define __PTHREAD_MUTEX_USE_UNION 1 + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +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 __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; +}; + +#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 + +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/include/nios2-linux-gnu/bits/semaphore.h b/libc/include/nios2-linux-gnu/bits/semaphore.h new file mode 100644 index 0000000000..a220d26c43 --- /dev/null +++ b/libc/include/nios2-linux-gnu/bits/semaphore.h @@ -0,0 +1,32 @@ +/* Machine-specific POSIX semaphore type layouts. Nios II version. + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + +#define __SIZEOF_SEM_T 16 + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/nios2-linux-gnu/bits/setjmp.h b/libc/include/nios2-linux-gnu/bits/setjmp.h new file mode 100644 index 0000000000..f250698df7 --- /dev/null +++ b/libc/include/nios2-linux-gnu/bits/setjmp.h @@ -0,0 +1,30 @@ +/* Define the machine-dependent type `jmp_buf'. Nios II version. + Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _NIOS2_BITS_SETJMP_H +#define _NIOS2_BITS_SETJMP_H 1 + +#if !defined(_SETJMP_H) && !defined(_PTHREAD_H) +# error "Never include directly; use instead." +#endif + +/* Saves r16-r22 (callee-saved, including GOT pointer), fp (frame pointer), + ra (return address), and sp (stack pointer). */ +typedef int __jmp_buf[10]; + +#endif /* _NIOS2_BITS_SETJMP_H */ \ No newline at end of file diff --git a/libc/include/nios2-linux-gnu/bits/stat.h b/libc/include/nios2-linux-gnu/bits/stat.h new file mode 100644 index 0000000000..4f23077263 --- /dev/null +++ b/libc/include/nios2-linux-gnu/bits/stat.h @@ -0,0 +1,171 @@ +/* Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +#include +#include + +/* 64-bit libc uses the kernel's 'struct stat', accessed via the + stat() syscall; 32-bit libc uses the kernel's 'struct stat64' + and accesses it via the stat64() syscall. All the various + APIs offered by libc use the kernel shape for their struct stat + structure; the only difference is that 32-bit programs not + using __USE_FILE_OFFSET64 only see the low 32 bits of some + of the fields (specifically st_ino, st_size, and st_blocks). */ +#define _STAT_VER_KERNEL 0 +#define _STAT_VER_LINUX 0 +#define _STAT_VER _STAT_VER_KERNEL + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 0 + +#if defined __USE_FILE_OFFSET64 +# define __field64(type, type64, name) type64 name +#elif __WORDSIZE == 64 +# define __field64(type, type64, name) type name +#elif __BYTE_ORDER == __LITTLE_ENDIAN +# define __field64(type, type64, name) \ + type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad +#else +# define __field64(type, type64, name) \ + int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name +#endif + +struct stat + { + __dev_t st_dev; /* Device. */ + __field64(__ino_t, __ino64_t, st_ino); /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + __dev_t __pad1; + __field64(__off_t, __off64_t, st_size); /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + int __pad2; + __field64(__blkcnt_t, __blkcnt64_t, st_blocks); /* 512-byte blocks */ +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + int __glibc_reserved[2]; + }; + +#undef __field64 + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + __ino64_t st_ino; /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + __dev_t __pad1; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + int __pad2; + __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + int __glibc_reserved[2]; + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/include/nios2-linux-gnu/bits/statfs.h b/libc/include/nios2-linux-gnu/bits/statfs.h new file mode 100644 index 0000000000..8da970d4a9 --- /dev/null +++ b/libc/include/nios2-linux-gnu/bits/statfs.h @@ -0,0 +1,86 @@ +/* Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _SYS_STATFS_H +# error "Never include directly; use instead." +#endif + +#include +#include +#include + +/* 64-bit libc uses the kernel's 'struct statfs', accessed via the + statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64' + and accesses it via the statfs64() syscall. All the various + APIs offered by libc use the kernel shape for their struct statfs + structure; the only difference is that 32-bit programs not + using __USE_FILE_OFFSET64 only see the low 32 bits of some + of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */ + +#if defined __USE_FILE_OFFSET64 +# define __field64(type, type64, name) type64 name +#elif __WORDSIZE == 64 +# define __field64(type, type64, name) type name +#elif __BYTE_ORDER == __LITTLE_ENDIAN +# define __field64(type, type64, name) \ + type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad +#else +# define __field64(type, type64, name) \ + int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name +#endif + +struct statfs + { + __SWORD_TYPE f_type; + __SWORD_TYPE f_bsize; + __field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks); + __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree); + __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail); + __field64(__fsfilcnt_t, __fsfilcnt64_t, f_files); + __field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree); + __fsid_t f_fsid; + __SWORD_TYPE f_namelen; + __SWORD_TYPE f_frsize; + __SWORD_TYPE f_flags; + __SWORD_TYPE f_spare[4]; + }; + +#undef __field64 + +#ifdef __USE_LARGEFILE64 +struct statfs64 + { + __SWORD_TYPE f_type; + __SWORD_TYPE f_bsize; + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_bavail; + __fsfilcnt64_t f_files; + __fsfilcnt64_t f_ffree; + __fsid_t f_fsid; + __SWORD_TYPE f_namelen; + __SWORD_TYPE f_frsize; + __SWORD_TYPE f_flags; + __SWORD_TYPE f_spare[4]; + }; +#endif + +/* Tell code we have these members. */ +#define _STATFS_F_NAMELEN +#define _STATFS_F_FRSIZE +#define _STATFS_F_FLAGS \ No newline at end of file diff --git a/libc/include/nios2-linux-gnu/bits/typesizes.h b/libc/include/nios2-linux-gnu/bits/typesizes.h new file mode 100644 index 0000000000..8cfcacef57 --- /dev/null +++ b/libc/include/nios2-linux-gnu/bits/typesizes.h @@ -0,0 +1,84 @@ +/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. + Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _BITS_TYPES_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_TYPESIZES_H +#define _BITS_TYPESIZES_H 1 + +/* See for the meaning of these macros. This file exists so + that need not vary across different GNU platforms. */ + +#define __DEV_T_TYPE __UQUAD_TYPE +#define __UID_T_TYPE __U32_TYPE +#define __GID_T_TYPE __U32_TYPE +#define __INO_T_TYPE __ULONGWORD_TYPE +#define __INO64_T_TYPE __UQUAD_TYPE +#define __MODE_T_TYPE __U32_TYPE +#define __NLINK_T_TYPE __U32_TYPE +#define __OFF_T_TYPE __SLONGWORD_TYPE +#define __OFF64_T_TYPE __SQUAD_TYPE +#define __PID_T_TYPE __S32_TYPE +#define __RLIM_T_TYPE __ULONGWORD_TYPE +#define __RLIM64_T_TYPE __UQUAD_TYPE +#define __BLKCNT_T_TYPE __SLONGWORD_TYPE +#define __BLKCNT64_T_TYPE __SQUAD_TYPE +#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE +#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE +#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE +#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __FSWORD_T_TYPE __SWORD_TYPE +#define __ID_T_TYPE __U32_TYPE +#define __CLOCK_T_TYPE __SLONGWORD_TYPE +#define __TIME_T_TYPE __SLONGWORD_TYPE +#define __USECONDS_T_TYPE __U32_TYPE +#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#define __DADDR_T_TYPE __S32_TYPE +#define __KEY_T_TYPE __S32_TYPE +#define __CLOCKID_T_TYPE __S32_TYPE +#define __TIMER_T_TYPE void * +#define __BLKSIZE_T_TYPE __S32_TYPE +#define __FSID_T_TYPE struct { int __val[2]; } +#define __SSIZE_T_TYPE __SWORD_TYPE +#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE +#define __CPU_MASK_TYPE __ULONGWORD_TYPE + +#ifdef __LP64__ +/* Tell the libc code that off_t and off64_t are actually the same type + for all ABI purposes, even if possibly expressed as different base types + for C type-checking purposes. */ +# define __OFF_T_MATCHES_OFF64_T 1 + +/* Same for ino_t and ino64_t. */ +# define __INO_T_MATCHES_INO64_T 1 + +/* And for __rlim_t and __rlim64_t. */ +# define __RLIM_T_MATCHES_RLIM64_T 1 +#else +# define __RLIM_T_MATCHES_RLIM64_T 0 +#endif + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + + +#endif /* bits/typesizes.h */ \ No newline at end of file diff --git a/libc/include/nios2-linux-gnu/bits/wordsize.h b/libc/include/nios2-linux-gnu/bits/wordsize.h new file mode 100644 index 0000000000..3485a5acf2 --- /dev/null +++ b/libc/include/nios2-linux-gnu/bits/wordsize.h @@ -0,0 +1,21 @@ +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/nios2-linux-gnu/fpu_control.h b/libc/include/nios2-linux-gnu/fpu_control.h new file mode 100644 index 0000000000..4537ff973e --- /dev/null +++ b/libc/include/nios2-linux-gnu/fpu_control.h @@ -0,0 +1,38 @@ +/* FPU control word definitions. Stub version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FPU_CONTROL_H +#define _FPU_CONTROL_H + +#define _FPU_RESERVED 0xffffffff /* These bits are reserved and not changed. */ + +/* The fdlibm code requires no interrupts for exceptions. Don't + change the rounding mode, it would break long double I/O! */ +#define _FPU_DEFAULT 0x00000000 /* Default value. */ + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. */ +#define _FPU_GETCW(cw) (cw) = 0 +#define _FPU_SETCW(cw) (void) (cw) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* _FPU_CONTROL_H */ \ No newline at end of file diff --git a/libc/include/nios2-linux-gnu/gnu/lib-names.h b/libc/include/nios2-linux-gnu/gnu/lib-names.h new file mode 100644 index 0000000000..9e19101bff --- /dev/null +++ b/libc/include/nios2-linux-gnu/gnu/lib-names.h @@ -0,0 +1,34 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#define LD_LINUX_NIOS2_SO "ld-linux-nios2.so.1" +#define LD_SO "ld-linux-nios2.so.1" +#define LIBANL_SO "libanl.so.1" +#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1" +#define LIBCRYPT_SO "libcrypt.so.1" +#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_NISPLUS_SO "libnss_nisplus.so.2" +#define LIBNSS_NIS_SO "libnss_nis.so.2" +#define LIBNSS_TEST1_SO "libnss_test1.so.2" +#define LIBNSS_TEST2_SO "libnss_test2.so.2" +#define LIBPTHREAD_SO "libpthread.so.0" +#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" + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/include/nios2-linux-gnu/gnu/stubs.h b/libc/include/nios2-linux-gnu/gnu/stubs.h new file mode 100644 index 0000000000..90477e3afc --- /dev/null +++ b/libc/include/nios2-linux-gnu/gnu/stubs.h @@ -0,0 +1,47 @@ +/* This file is automatically generated. + It defines a symbol `__stub_FUNCTION' for each function + in the C library which is a stub, meaning it will fail + every time called, usually setting errno to ENOSYS. */ + +#ifdef _LIBC + #error Applications may not define the macro _LIBC +#endif + +#define __stub___compat_bdflush +#define __stub___compat_create_module +#define __stub___compat_get_kernel_syms +#define __stub___compat_query_module +#define __stub___compat_uselib +#define __stub_chflags +#define __stub_fattach +#define __stub_fchflags +#define __stub_fdetach +#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_getmsg +#define __stub_getpmsg +#define __stub_gtty +#define __stub_lchmod +#define __stub_putmsg +#define __stub_putpmsg +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty +#define __stub_sysctl \ No newline at end of file diff --git a/libc/glibc/sysdeps/unix/sysv/linux/csky/kernel-features.h b/libc/include/nios2-linux-gnu/sys/cachectl.h similarity index 61% rename from libc/glibc/sysdeps/unix/sysv/linux/csky/kernel-features.h rename to libc/include/nios2-linux-gnu/sys/cachectl.h index f558925bc2..e97c951ed1 100644 --- a/libc/glibc/sysdeps/unix/sysv/linux/csky/kernel-features.h +++ b/libc/include/nios2-linux-gnu/sys/cachectl.h @@ -1,6 +1,5 @@ -/* Set flags signalling availability of kernel features based on given - kernel version number. - Copyright (C) 2018-2019 Free Software Foundation, Inc. +/* cacheflush - flush contents of instruction and/or data cache. + Copyright (C) 2015-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,13 +16,18 @@ License along with the GNU C Library. If not, see . */ -#include_next +#ifndef _SYS_CACHECTL_H +#define _SYS_CACHECTL_H 1 -/* fadvise64_64 reorganize the syscall arguments. */ -#define __ASSUME_FADVISE64_64_6ARG 1 +#include -/* Define this if your 32-bit syscall API requires 64-bit register - pairs to start with an even-number register. */ -#ifdef __CSKYABIV1__ -# define __ASSUME_ALIGNED_REGISTER_PAIRS 1 +__BEGIN_DECLS + +#ifdef __USE_MISC +extern int cacheflush (void *__addr, const int __nbytes, const int __op) __THROW; #endif +extern int _flush_cache (char *__addr, const int __nbytes, const int __op) __THROW; + +__END_DECLS + +#endif /* sys/cachectl.h */ \ No newline at end of file diff --git a/libc/include/nios2-linux-gnu/sys/ucontext.h b/libc/include/nios2-linux-gnu/sys/ucontext.h new file mode 100644 index 0000000000..2f46d5919f --- /dev/null +++ b/libc/include/nios2-linux-gnu/sys/ucontext.h @@ -0,0 +1,61 @@ +/* ucontext_t definition, Nios II version. + Copyright (C) 2015-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* System V/Nios II ABI compliant context switching support. */ + +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include + + +/* These definitions must be in sync with the kernel. */ + +#ifdef __USE_MISC +# define MCONTEXT_VERSION 2 +#endif + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + +/* Context to describe whole processor state. */ +typedef struct + { + int __ctx(version); + unsigned long __ctx(regs)[32]; + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long __ctx(uc_flags); + struct ucontext_t *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; + } ucontext_t; + +#undef __ctx + +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/include/nios2-linux-gnu/sys/user.h b/libc/include/nios2-linux-gnu/sys/user.h new file mode 100644 index 0000000000..105c92aafe --- /dev/null +++ b/libc/include/nios2-linux-gnu/sys/user.h @@ -0,0 +1,58 @@ +/* ptrace register data format definitions. + Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H +#define _SYS_USER_H 1 + +/* The whole purpose of this file is for GDB and GDB only. Don't read + too much into it. Don't use it for anything other than GDB unless + you know what you are doing. */ + +struct user_fpregs +{ +}; + +struct user_regs +{ + unsigned long int uregs[49]; +}; + +struct user +{ + struct user_regs regs; /* General registers */ + int u_fpvalid; /* True if math co-processor being used. */ + + unsigned long int u_tsize; /* Text segment size (pages). */ + unsigned long int u_dsize; /* Data segment size (pages). */ + unsigned long int u_ssize; /* Stack segment size (pages). */ + + unsigned long start_code; /* Starting virtual address of text. */ + unsigned long start_stack; /* Starting virtual address of stack. */ + + long int signal; /* Signal that caused the core dump. */ + int reserved; /* No longer used */ + struct user_regs *u_ar0; /* help gdb to find the general registers. */ + + unsigned long magic; /* uniquely identify a core file */ + char u_comm[32]; /* User command that was responsible */ + int u_debugreg[8]; + struct user_fpregs u_fp; /* Floating point registers */ + struct user_fpregs *u_fp0; /* help gdb to find the FP registers. */ +}; + +#endif /* sys/user.h */ \ No newline at end of file diff --git a/libc/glibc/sysdeps/unix/sysv/linux/powerpc/asm/unistd.h b/libc/include/powerpc-linux-gnu/asm/unistd.h similarity index 100% rename from libc/glibc/sysdeps/unix/sysv/linux/powerpc/asm/unistd.h rename to libc/include/powerpc-linux-gnu/asm/unistd.h diff --git a/libc/include/powerpc-linux-gnu/bits/endian.h b/libc/include/powerpc-linux-gnu/bits/endian.h new file mode 100644 index 0000000000..f643beb3b5 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/endian.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* PowerPC can be little or big endian. Hopefully gcc will know... */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN +# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN +# error Both BIG_ENDIAN and LITTLE_ENDIAN defined! +# endif +# define __BYTE_ORDER __BIG_ENDIAN +#else +# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN +# define __BYTE_ORDER __LITTLE_ENDIAN +# else +# warning Cannot determine current byte order, assuming big-endian. +# define __BYTE_ORDER __BIG_ENDIAN +# endif +#endif \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/environments.h b/libc/include/powerpc-linux-gnu/bits/environments.h new file mode 100644 index 0000000000..2e1c0bc1de --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/environments.h @@ -0,0 +1,96 @@ +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _UNISTD_H +# error "Never include this file directly. Use instead" +#endif + +#include + +/* This header should define the following symbols under the described + situations. A value `1' means that the model is always supported, + `-1' means it is never supported. Undefined means it cannot be + statically decided. + + _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type + _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type + + _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type + _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type + + The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, + _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, + _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were + used in previous versions of the Unix standard and are available + only for compatibility. +*/ + +#if __WORDSIZE == 64 + +/* Environments with 32-bit wide pointers are optionally provided. + Therefore following macros aren't defined: + # undef _POSIX_V7_ILP32_OFF32 + # undef _POSIX_V7_ILP32_OFFBIG + # undef _POSIX_V6_ILP32_OFF32 + # undef _POSIX_V6_ILP32_OFFBIG + # undef _XBS5_ILP32_OFF32 + # undef _XBS5_ILP32_OFFBIG + and users need to check at runtime. */ + +/* We also have no use (for now) for an environment with bigger pointers + and offsets. */ +# define _POSIX_V7_LPBIG_OFFBIG -1 +# define _POSIX_V6_LPBIG_OFFBIG -1 +# define _XBS5_LPBIG_OFFBIG -1 + +/* By default we have 64-bit wide `long int', pointers and `off_t'. */ +# define _POSIX_V7_LP64_OFF64 1 +# define _POSIX_V6_LP64_OFF64 1 +# define _XBS5_LP64_OFF64 1 + +#else /* __WORDSIZE == 32 */ + +/* By default we have 32-bit wide `int', `long int', pointers and `off_t' + and all platforms support LFS. */ +# define _POSIX_V7_ILP32_OFF32 1 +# define _POSIX_V7_ILP32_OFFBIG 1 +# define _POSIX_V6_ILP32_OFF32 1 +# define _POSIX_V6_ILP32_OFFBIG 1 +# define _XBS5_ILP32_OFF32 1 +# define _XBS5_ILP32_OFFBIG 1 + +/* We optionally provide an environment with the above size but an 64-bit + side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ + +/* Environments with 64-bit wide pointers can be provided, + so these macros aren't defined: + # undef _POSIX_V7_LP64_OFF64 + # undef _POSIX_V7_LPBIG_OFFBIG + # undef _POSIX_V6_LP64_OFF64 + # undef _POSIX_V6_LPBIG_OFFBIG + # undef _XBS5_LP64_OFF64 + # undef _XBS5_LPBIG_OFFBIG + and sysconf tests for it at runtime. */ + +#endif /* __WORDSIZE == 32 */ + +#define __ILP32_OFF32_CFLAGS "-m32" +#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +#define __ILP32_OFF32_LDFLAGS "-m32" +#define __ILP32_OFFBIG_LDFLAGS "-m32" +#define __LP64_OFF64_CFLAGS "-m64" +#define __LP64_OFF64_LDFLAGS "-m64" \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/fcntl.h b/libc/include/powerpc-linux-gnu/bits/fcntl.h new file mode 100644 index 0000000000..e344ed65a4 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/fcntl.h @@ -0,0 +1,62 @@ +/* O_*, F_*, FD_* bit values for Linux/PowerPC. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#include + +#define __O_DIRECTORY 040000 /* Must be a directory. */ +#define __O_NOFOLLOW 0100000 /* Do not follow links. */ +#define __O_DIRECT 0400000 /* Direct disk access. */ + +#if __WORDSIZE == 64 +/* Not necessary, files are always with 64bit off_t. */ +# define __O_LARGEFILE 0 +#else +# define __O_LARGEFILE 0200000 +#endif + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/fenv.h b/libc/include/powerpc-linux-gnu/bits/fenv.h new file mode 100644 index 0000000000..f59c2a5809 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/fenv.h @@ -0,0 +1,180 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + + +/* Define bits representing the exception. We use the bit positions of + the appropriate bits in the FPSCR... */ +enum + { + FE_INEXACT = +#define FE_INEXACT (1 << (31 - 6)) + FE_INEXACT, + FE_DIVBYZERO = +#define FE_DIVBYZERO (1 << (31 - 5)) + FE_DIVBYZERO, + FE_UNDERFLOW = +#define FE_UNDERFLOW (1 << (31 - 4)) + FE_UNDERFLOW, + FE_OVERFLOW = +#define FE_OVERFLOW (1 << (31 - 3)) + FE_OVERFLOW, + + /* ... except for FE_INVALID, for which we use bit 31. FE_INVALID + actually corresponds to bits 7 through 12 and 21 through 23 + in the FPSCR, but we can't use that because the current draft + says that it must be a power of 2. Instead we use bit 2 which + is the summary bit for all the FE_INVALID exceptions, which + kind of makes sense. */ + FE_INVALID = +#define FE_INVALID (1 << (31 - 2)) + FE_INVALID, + +#ifdef __USE_GNU + /* Breakdown of the FE_INVALID bits. Setting FE_INVALID on an + input to a routine is equivalent to setting all of these bits; + FE_INVALID will be set on output from a routine iff one of + these bits is set. Note, though, that you can't disable or + enable these exceptions individually. */ + + /* Operation with a sNaN. */ + FE_INVALID_SNAN = +# define FE_INVALID_SNAN (1 << (31 - 7)) + FE_INVALID_SNAN, + + /* Inf - Inf */ + FE_INVALID_ISI = +# define FE_INVALID_ISI (1 << (31 - 8)) + FE_INVALID_ISI, + + /* Inf / Inf */ + FE_INVALID_IDI = +# define FE_INVALID_IDI (1 << (31 - 9)) + FE_INVALID_IDI, + + /* 0 / 0 */ + FE_INVALID_ZDZ = +# define FE_INVALID_ZDZ (1 << (31 - 10)) + FE_INVALID_ZDZ, + + /* Inf * 0 */ + FE_INVALID_IMZ = +# define FE_INVALID_IMZ (1 << (31 - 11)) + FE_INVALID_IMZ, + + /* Comparison with a NaN. */ + FE_INVALID_COMPARE = +# define FE_INVALID_COMPARE (1 << (31 - 12)) + FE_INVALID_COMPARE, + + /* Invalid operation flag for software (not set by hardware). */ + /* Note that some chips don't have this implemented, presumably + because no-one expected anyone to write software for them %-). */ + FE_INVALID_SOFTWARE = +# define FE_INVALID_SOFTWARE (1 << (31 - 21)) + FE_INVALID_SOFTWARE, + + /* Square root of negative number (including -Inf). */ + /* Note that some chips don't have this implemented. */ + FE_INVALID_SQRT = +# define FE_INVALID_SQRT (1 << (31 - 22)) + FE_INVALID_SQRT, + + /* Conversion-to-integer of a NaN or a number too large or too small. */ + FE_INVALID_INTEGER_CONVERSION = +# define FE_INVALID_INTEGER_CONVERSION (1 << (31 - 23)) + FE_INVALID_INTEGER_CONVERSION + +# define FE_ALL_INVALID \ + (FE_INVALID_SNAN | FE_INVALID_ISI | FE_INVALID_IDI | FE_INVALID_ZDZ \ + | FE_INVALID_IMZ | FE_INVALID_COMPARE | FE_INVALID_SOFTWARE \ + | FE_INVALID_SQRT | FE_INVALID_INTEGER_CONVERSION) +#endif + }; + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +/* PowerPC chips support all of the four defined rounding modes. We + use the bit pattern in the FPSCR as the values for the + appropriate macros. */ +enum + { + FE_TONEAREST = +#define FE_TONEAREST 0 + FE_TONEAREST, + FE_TOWARDZERO = +#define FE_TOWARDZERO 1 + FE_TOWARDZERO, + FE_UPWARD = +#define FE_UPWARD 2 + FE_UPWARD, + FE_DOWNWARD = +#define FE_DOWNWARD 3 + FE_DOWNWARD + }; + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + +/* Type representing floating-point environment. We leave it as 'double' + for efficiency reasons (rather than writing it to a 32-bit integer). */ +typedef double fenv_t; + +/* If the default argument is used we use this value. */ +extern const fenv_t __fe_dfl_env; +#define FE_DFL_ENV (&__fe_dfl_env) + +#ifdef __USE_GNU +/* Floating-point environment where all exceptions are enabled. Note that + this is not sufficient to give you SIGFPE. */ +extern const fenv_t __fe_enabled_env; +# define FE_ENABLED_ENV (&__fe_enabled_env) + +/* Floating-point environment with (processor-dependent) non-IEEE floating + point. */ +extern const fenv_t __fe_nonieee_env; +# define FE_NONIEEE_ENV (&__fe_nonieee_env) + +/* Floating-point environment with all exceptions enabled. Note that + just evaluating this value does not change the processor exception mode. + Passing this mask to fesetenv will result in a prctl syscall to change + the MSR FE0/FE1 bits to "Precise Mode". On some processors this will + result in slower floating point execution. This will last until an + fenv or exception mask is installed that disables all FP exceptions. */ +# define FE_NOMASK_ENV FE_ENABLED_ENV + +/* Floating-point environment with all exceptions disabled. Note that + just evaluating this value does not change the processor exception mode. + Passing this mask to fesetenv will result in a prctl syscall to change + the MSR FE0/FE1 bits to "Ignore Exceptions Mode". On most processors + this allows the fastest possible floating point execution.*/ +# define FE_MASK_ENV FE_DFL_ENV + +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef double femode_t; + +/* Default floating-point control modes. */ +extern const femode_t __fe_dfl_mode; +# define FE_DFL_MODE (&__fe_dfl_mode) +#endif \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/fenvinline.h b/libc/include/powerpc-linux-gnu/bits/fenvinline.h new file mode 100644 index 0000000000..1552e48c7a --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/fenvinline.h @@ -0,0 +1,79 @@ +/* Inline floating-point environment handling functions for powerpc. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__ + +/* Inline definition for fegetround. */ +# define __fegetround() \ + (__extension__ ({ int __fegetround_result; \ + __asm__ __volatile__ \ + ("mcrfs 7,7 ; mfcr %0" \ + : "=r"(__fegetround_result) : : "cr7"); \ + __fegetround_result & 3; })) +# define fegetround() __fegetround () + +# ifndef __NO_MATH_INLINES +/* The weird 'i#*X' constraints on the following suppress a gcc + warning when __excepts is not a constant. Otherwise, they mean the + same as just plain 'i'. */ + +# if __GNUC_PREREQ(3, 4) + +/* Inline definition for feraiseexcept. */ +# define feraiseexcept(__excepts) \ + (__extension__ ({ \ + int __e = __excepts; \ + int __ret; \ + if (__builtin_constant_p (__e) \ + && (__e & (__e - 1)) == 0 \ + && __e != FE_INVALID) \ + { \ + if (__e != 0) \ + __asm__ __volatile__ ("mtfsb1 %0" \ + : : "i#*X" (__builtin_clz (__e))); \ + __ret = 0; \ + } \ + else \ + __ret = feraiseexcept (__e); \ + __ret; \ + })) + +/* Inline definition for feclearexcept. */ +# define feclearexcept(__excepts) \ + (__extension__ ({ \ + int __e = __excepts; \ + int __ret; \ + if (__builtin_constant_p (__e) \ + && (__e & (__e - 1)) == 0 \ + && __e != FE_INVALID) \ + { \ + if (__e != 0) \ + __asm__ __volatile__ ("mtfsb0 %0" \ + : : "i#*X" (__builtin_clz (__e))); \ + __ret = 0; \ + } \ + else \ + __ret = feclearexcept (__e); \ + __ret; \ + })) + +# endif /* __GNUC_PREREQ(3, 4). */ + +# endif /* !__NO_MATH_INLINES. */ + +#endif /* __GNUC__ && !_SOFT_FLOAT && !__NO_FPRS__ */ \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/floatn.h b/libc/include/powerpc-linux-gnu/bits/floatn.h new file mode 100644 index 0000000000..2514b6300e --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/floatn.h @@ -0,0 +1,122 @@ +/* Macros to control TS 18661-3 glibc features on powerpc. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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. */ +#if defined _ARCH_PWR8 && defined __LITTLE_ENDIAN__ && (_CALL_ELF == 2) \ + && defined __FLOAT128__ && !defined __NO_LONG_DOUBLE_MATH +# define __HAVE_FLOAT128 1 +#else +# 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, i.e. + calls to the binary128 functions go to *f128 symbols instead of *l. */ +#if __HAVE_FLOAT128 +# define __HAVE_DISTINCT_FLOAT128 1 +#else +# define __HAVE_DISTINCT_FLOAT128 0 +#endif + +/* Defined to 1 if the current compiler invocation provides a + floating-point type with the right format for _Float64x, and this + 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 0 + +#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) exist for powerpc only since GCC 7.0. */ +# if __LDBL_MANT_DIG__ == 113 +# define __f128(x) x##l +# else +# define __f128(x) x##q +# endif +# else +# define __f128(x) x##f128 +# endif +# endif + +/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ +# if __HAVE_FLOAT128 +# if __LDBL_MANT_DIG__ == 113 && defined __cplusplus +typedef long double _Float128; +# define __CFLOAT128 _Complex long double +# elif !__GNUC_PREREQ (7, 0) || defined __cplusplus +/* The type _Float128 exist for powerpc only since GCC 7.0. */ +typedef __float128 _Float128; +/* Add a typedef for older GCC and C++ compilers which don't natively support + _Complex _Float128. */ +typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__KC__))); +# define __CFLOAT128 __cfloat128 +# else +# define __CFLOAT128 _Complex _Float128 +# endif +# endif + +/* The remaining of this file provides support for older compilers. */ +# if __HAVE_FLOAT128 +/* Builtin __builtin_huge_valf128 doesn't exist before GCC 7.0. */ +# if !__GNUC_PREREQ (7, 0) +# define __builtin_huge_valf128() ((_Float128) __builtin_huge_val ()) +# endif + +/* The following builtins (suffixed with 'q') are available in GCC >= 6.2, + which is the minimum version required for float128 support on powerpc64le. + Since GCC 7.0 the builtins suffixed with f128 are also available, then + there is no need to redefined them. */ +# if !__GNUC_PREREQ (7, 0) +# define __builtin_copysignf128 __builtin_copysignq +# define __builtin_fabsf128 __builtin_fabsq +# define __builtin_inff128 __builtin_infq +# define __builtin_nanf128 __builtin_nanq +# define __builtin_nansf128 __builtin_nansq +# endif + +/* In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*, + e.g.: __builtin_signbitf128, before GCC 6. However, there has never + been a __builtin_signbitf128 in GCC and the type-generic builtin is + only available since GCC 6. */ +# if !__GNUC_PREREQ (6, 0) +# define __builtin_signbitf128 __signbitf128 +# endif + +# endif + +#endif /* !__ASSEMBLER__. */ + +#include + +#endif /* _BITS_FLOATN_H */ \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/fp-fast.h b/libc/include/powerpc-linux-gnu/bits/fp-fast.h new file mode 100644 index 0000000000..09e055f11e --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/fp-fast.h @@ -0,0 +1,39 @@ +/* Define FP_FAST_* macros. PowerPC version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +#ifdef __USE_ISOC99 + +/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l} + builtins are supported. */ +# if (!defined _SOFT_FLOAT && !defined __NO_FPRS__) || defined __FP_FAST_FMA +# define FP_FAST_FMA 1 +# endif + +# if (!defined _SOFT_FLOAT && !defined __NO_FPRS__) || defined __FP_FAST_FMAF +# define FP_FAST_FMAF 1 +# endif + +# ifdef __FP_FAST_FMAL +# define FP_FAST_FMAL 1 +# endif + +#endif \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/hwcap.h b/libc/include/powerpc-linux-gnu/bits/hwcap.h new file mode 100644 index 0000000000..0d72f34418 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/hwcap.h @@ -0,0 +1,76 @@ +/* Defines for bits in AT_HWCAP and AT_HWCAP2. + Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H) +# error "Never include directly; use instead." +#endif + +/* The bit numbers must match those in the kernel's asm/cputable.h. */ + +/* Feature definitions in AT_HWCAP. */ +#define PPC_FEATURE_32 0x80000000 /* 32-bit mode. */ +#define PPC_FEATURE_64 0x40000000 /* 64-bit mode. */ +#define PPC_FEATURE_601_INSTR 0x20000000 /* 601 chip, Old POWER ISA. */ +#define PPC_FEATURE_HAS_ALTIVEC 0x10000000 /* SIMD/Vector Unit. */ +#define PPC_FEATURE_HAS_FPU 0x08000000 /* Floating Point Unit. */ +#define PPC_FEATURE_HAS_MMU 0x04000000 /* Memory Management Unit. */ +#define PPC_FEATURE_HAS_4xxMAC 0x02000000 /* 4xx Multiply Accumulator. */ +#define PPC_FEATURE_UNIFIED_CACHE 0x01000000 /* Unified I/D cache. */ +#define PPC_FEATURE_HAS_SPE 0x00800000 /* Signal Processing ext. */ +#define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 /* SPE Float. */ +#define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 /* SPE Double. */ +#define PPC_FEATURE_NO_TB 0x00100000 /* 601/403gx have no timebase */ +#define PPC_FEATURE_POWER4 0x00080000 /* POWER4 ISA 2.00 */ +#define PPC_FEATURE_POWER5 0x00040000 /* POWER5 ISA 2.02 */ +#define PPC_FEATURE_POWER5_PLUS 0x00020000 /* POWER5+ ISA 2.03 */ +#define PPC_FEATURE_CELL_BE 0x00010000 /* CELL Broadband Engine */ +#define PPC_FEATURE_BOOKE 0x00008000 /* ISA Category Embedded */ +#define PPC_FEATURE_SMT 0x00004000 /* Simultaneous + Multi-Threading */ +#define PPC_FEATURE_ICACHE_SNOOP 0x00002000 +#define PPC_FEATURE_ARCH_2_05 0x00001000 /* ISA 2.05 */ +#define PPC_FEATURE_PA6T 0x00000800 /* PA Semi 6T Core */ +#define PPC_FEATURE_HAS_DFP 0x00000400 /* Decimal FP Unit */ +#define PPC_FEATURE_POWER6_EXT 0x00000200 /* P6 + mffgpr/mftgpr */ +#define PPC_FEATURE_ARCH_2_06 0x00000100 /* ISA 2.06 */ +#define PPC_FEATURE_HAS_VSX 0x00000080 /* P7 Vector Extension. */ +#define PPC_FEATURE_PSERIES_PERFMON_COMPAT 0x00000040 +/* Reserved by the kernel. 0x00000004 Do not use. */ +#define PPC_FEATURE_TRUE_LE 0x00000002 +#define PPC_FEATURE_PPC_LE 0x00000001 + +/* Feature definitions in AT_HWCAP2. */ +#define PPC_FEATURE2_ARCH_2_07 0x80000000 /* ISA 2.07 */ +#define PPC_FEATURE2_HAS_HTM 0x40000000 /* Hardware Transactional + Memory */ +#define PPC_FEATURE2_HAS_DSCR 0x20000000 /* Data Stream Control + Register */ +#define PPC_FEATURE2_HAS_EBB 0x10000000 /* Event Base Branching */ +#define PPC_FEATURE2_HAS_ISEL 0x08000000 /* Integer Select */ +#define PPC_FEATURE2_HAS_TAR 0x04000000 /* Target Address Register */ +#define PPC_FEATURE2_HAS_VEC_CRYPTO 0x02000000 /* Target supports vector + instruction. */ +#define PPC_FEATURE2_HTM_NOSC 0x01000000 /* Kernel aborts transaction + when a syscall is made. */ +#define PPC_FEATURE2_ARCH_3_00 0x00800000 /* ISA 3.0 */ +#define PPC_FEATURE2_HAS_IEEE128 0x00400000 /* VSX IEEE Binary Float + 128-bit */ +#define PPC_FEATURE2_DARN 0x00200000 /* darn instruction. */ +#define PPC_FEATURE2_SCV 0x00100000 /* scv syscall. */ +#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM without suspended + state. */ \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/ioctl-types.h b/libc/include/powerpc-linux-gnu/bits/ioctl-types.h new file mode 100644 index 0000000000..f2b9931899 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/ioctl-types.h @@ -0,0 +1,77 @@ +/* Structure types for pre-termios terminal ioctls. Linux/powerpc version. + Copyright (C) 2014-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 10 +struct termio + { + unsigned short int c_iflag; /* input mode flags */ + unsigned short int c_oflag; /* output mode flags */ + unsigned short int c_cflag; /* control mode flags */ + unsigned short int c_lflag; /* local mode flags */ + unsigned char c_line; /* line discipline */ + unsigned char c_cc[NCC]; /* control characters */ +}; + +/* modem lines */ +#define TIOCM_LE 0x001 +#define TIOCM_DTR 0x002 +#define TIOCM_RTS 0x004 +#define TIOCM_ST 0x008 +#define TIOCM_SR 0x010 +#define TIOCM_CTS 0x020 +#define TIOCM_CAR 0x040 +#define TIOCM_RNG 0x080 +#define TIOCM_DSR 0x100 +#define TIOCM_CD TIOCM_CAR +#define TIOCM_RI TIOCM_RNG + +/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ + +/* line disciplines */ +#define N_TTY 0 +#define N_SLIP 1 +#define N_MOUSE 2 +#define N_PPP 3 +#define N_STRIP 4 +#define N_AX25 5 +#define N_X25 6 /* X.25 async */ +#define N_6PACK 7 +#define N_MASC 8 /* Mobitex module */ +#define N_R3964 9 /* Simatic R3964 module */ +#define N_PROFIBUS_FDL 10 /* Profibus */ +#define N_IRDA 11 /* Linux IR */ +#define N_SMSBLOCK 12 /* SMS block mode */ +#define N_HDLC 13 /* synchronous HDLC */ +#define N_SYNC_PPP 14 /* synchronous PPP */ +#define N_HCI 15 /* Bluetooth HCI UART */ \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/ipc.h b/libc/include/powerpc-linux-gnu/bits/ipc.h new file mode 100644 index 0000000000..7b0f55f7ab --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/ipc.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IPC_H +# error "Never use directly; include instead." +#endif + +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#ifdef __USE_GNU +# define IPC_INFO 3 /* See ipcs. */ +#endif + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + __uid_t uid; /* Owner's user ID. */ + __gid_t gid; /* Owner's group ID. */ + __uid_t cuid; /* Creator's user ID. */ + __gid_t cgid; /* Creator's group ID. */ + __mode_t mode; /* Read/write permission. */ + __uint32_t __seq; /* Sequence number. */ + __uint32_t __pad1; + __uint64_t __glibc_reserved1; + __uint64_t __glibc_reserved2; + }; \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/iscanonical.h b/libc/include/powerpc-linux-gnu/bits/iscanonical.h new file mode 100644 index 0000000000..108d77b411 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/iscanonical.h @@ -0,0 +1,58 @@ +/* Define iscanonical macro. ldbl-128ibm version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +#ifdef __NO_LONG_DOUBLE_MATH +# define iscanonical(x) ((void) (__typeof (x)) (x), 1) +#else +extern int __iscanonicall (long double __x) + __THROW __attribute__ ((__const__)); +# define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1) +# define __iscanonical(x) ((void) (__typeof (x)) (x), 1) +# if __HAVE_DISTINCT_FLOAT128 +# define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1) +# endif + +/* Return nonzero value if X is canonical. In IEEE interchange binary + formats, all values are canonical, but the argument must still be + converted to its semantic type for any exceptions arising from the + conversion, before being discarded; in IBM long double, there are + encodings that are not consistently handled as corresponding to any + particular value of the type, and we return 0 for those. */ +# ifndef __cplusplus +# define iscanonical(x) __MATH_TG ((x), __iscanonical, (x)) +# else +/* In C++ mode, __MATH_TG cannot be used, because it relies on + __builtin_types_compatible_p, which is a C-only builtin. On the + other hand, overloading provides the means to distinguish between + the floating-point types. The overloading resolution will match + the correct parameter (regardless of type qualifiers (i.e.: const + and volatile)). */ +extern "C++" { +inline int iscanonical (float __val) { return __iscanonicalf (__val); } +inline int iscanonical (double __val) { return __iscanonical (__val); } +inline int iscanonical (long double __val) { return __iscanonicall (__val); } +# if __HAVE_DISTINCT_FLOAT128 +inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); } +# endif +} +# endif /* __cplusplus */ +#endif /* __NO_LONG_DOUBLE_MATH */ \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/link.h b/libc/include/powerpc-linux-gnu/bits/link.h new file mode 100644 index 0000000000..ca46d5a01b --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/link.h @@ -0,0 +1,156 @@ +/* Machine-specific declarations for dynamic linker interface. PowerPC version + Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + + +#if __ELF_NATIVE_CLASS == 32 + +/* Registers for entry into PLT on PPC32. */ +typedef struct La_ppc32_regs +{ + uint32_t lr_reg[8]; + double lr_fp[8]; + uint32_t lr_vreg[12][4]; + uint32_t lr_r1; + uint32_t lr_lr; +} La_ppc32_regs; + +/* Return values for calls from PLT on PPC32. */ +typedef struct La_ppc32_retval +{ + uint32_t lrv_r3; + uint32_t lrv_r4; + double lrv_fp[8]; + uint32_t lrv_v2[4]; +} La_ppc32_retval; + + +__BEGIN_DECLS + +extern Elf32_Addr la_ppc32_gnu_pltenter (Elf32_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_ppc32_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_ppc32_gnu_pltexit (Elf32_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_ppc32_regs *__inregs, + La_ppc32_retval *__outregs, + const char *__symname); + +__END_DECLS + +#elif __ELF_NATIVE_CLASS == 64 +# if _CALL_ELF != 2 + +/* Registers for entry into PLT on PPC64. */ +typedef struct La_ppc64_regs +{ + uint64_t lr_reg[8]; + double lr_fp[13]; + uint32_t __padding; + uint32_t lr_vrsave; + uint32_t lr_vreg[12][4]; + uint64_t lr_r1; + uint64_t lr_lr; +} La_ppc64_regs; + +/* Return values for calls from PLT on PPC64. */ +typedef struct La_ppc64_retval +{ + uint64_t lrv_r3; + uint64_t lrv_r4; + double lrv_fp[4]; /* f1-f4, float - complex long double. */ + uint32_t lrv_v2[4]; /* v2. */ +} La_ppc64_retval; + + +__BEGIN_DECLS + +extern Elf64_Addr la_ppc64_gnu_pltenter (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_ppc64_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_ppc64_gnu_pltexit (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_ppc64_regs *__inregs, + La_ppc64_retval *__outregs, + const char *__symname); + +__END_DECLS + +# else + +/* Registers for entry into PLT on PPC64 in the ELFv2 ABI. */ +typedef struct La_ppc64v2_regs +{ + uint64_t lr_reg[8]; + double lr_fp[13]; + uint32_t __padding; + uint32_t lr_vrsave; + uint32_t lr_vreg[12][4] __attribute__ ((aligned (16))); + uint64_t lr_r1; + uint64_t lr_lr; +} La_ppc64v2_regs; + +/* Return values for calls from PLT on PPC64 in the ELFv2 ABI. */ +typedef struct La_ppc64v2_retval +{ + uint64_t lrv_r3; + uint64_t lrv_r4; + double lrv_fp[10]; + uint32_t lrv_vreg[8][4] __attribute__ ((aligned (16))); +} La_ppc64v2_retval; + + +__BEGIN_DECLS + +extern Elf64_Addr la_ppc64v2_gnu_pltenter (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_ppc64v2_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_ppc64v2_gnu_pltexit (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_ppc64v2_regs *__inregs, + La_ppc64v2_retval *__outregs, + const char *__symname); + +__END_DECLS + +# endif +#endif \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/local_lim.h b/libc/include/powerpc-linux-gnu/bits/local_lim.h new file mode 100644 index 0000000000..65261d42b3 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/local_lim.h @@ -0,0 +1,100 @@ +/* Minimum guaranteed maximum values for system limits. Linux/PPC version. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. At least two pages for systems with 64k + pages. */ +#define PTHREAD_STACK_MIN 131072 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/long-double.h b/libc/include/powerpc-linux-gnu/bits/long-double.h new file mode 100644 index 0000000000..9fe5a6c570 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/long-double.h @@ -0,0 +1,24 @@ +/* Properties of long double type. ldbl-opt version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef __NO_LONG_DOUBLE_MATH +# define __LONG_DOUBLE_MATH_OPTIONAL 1 +# ifndef __LONG_DOUBLE_128__ +# define __NO_LONG_DOUBLE_MATH 1 +# endif +#endif \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/mman.h b/libc/include/powerpc-linux-gnu/bits/mman.h new file mode 100644 index 0000000000..9e80948561 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/mman.h @@ -0,0 +1,51 @@ +/* Definitions for POSIX memory map interface. Linux/PowerPC version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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. */ + +#define PROT_SAO 0x10 /* Strong Access Ordering. */ + +/* These are Linux-specific. */ +#ifdef __USE_MISC +# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ +# define MAP_DENYWRITE 0x00800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ +# define MAP_LOCKED 0x00080 /* Lock the mapping. */ +# define MAP_NORESERVE 0x00040 /* Don't check for reservations. */ +# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ +# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +# define MAP_STACK 0x20000 /* Allocation is for a stack. */ +# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ +# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap + underlying mapping. */ +#endif + +/* Flags for `mlockall'. */ +#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 0x4000 /* Lock all additions to address + space. */ +#define MCL_ONFAULT 0x8000 /* Lock all pages that are + faulted in. */ + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/msq-pad.h b/libc/include/powerpc-linux-gnu/bits/msq-pad.h new file mode 100644 index 0000000000..d697bc4d06 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/msq-pad.h @@ -0,0 +1,26 @@ +/* Define where padding goes in struct msqid_ds. PowerPC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include + +#define __MSQ_PAD_AFTER_TIME 0 +#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/procfs.h b/libc/include/powerpc-linux-gnu/bits/procfs.h new file mode 100644 index 0000000000..793fa8944a --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/procfs.h @@ -0,0 +1,49 @@ +/* Types for registers for sys/procfs.h. PowerPC version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +#include +#include + +/* These definitions are normally provided by ucontext.h via + asm/sigcontext.h, asm/ptrace.h, and asm/elf.h. Otherwise we define + them here. */ +#if !defined __PPC64_ELF_H && !defined _ASM_POWERPC_ELF_H +#define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ +#define ELF_NFPREG 33 /* includes fpscr */ +#if __WORDSIZE == 32 +# define ELF_NVRREG 33 /* includes vscr */ +#else +# define ELF_NVRREG 34 /* includes vscr */ +#endif + +typedef unsigned long elf_greg_t; +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +typedef double elf_fpreg_t; +typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; + +/* Altivec registers */ +typedef struct { + unsigned int u[4]; +} __attribute__ ((__aligned__ (16))) elf_vrreg_t; +typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG]; +#endif \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/pthreadtypes-arch.h b/libc/include/powerpc-linux-gnu/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..883306d2e8 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/pthreadtypes-arch.h @@ -0,0 +1,81 @@ +/* Machine-specific pthread type layouts. PowerPC version. + Copyright (C) 2003-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 __WORDSIZE == 64 +# define __SIZEOF_PTHREAD_MUTEX_T 40 +# define __SIZEOF_PTHREAD_ATTR_T 56 +# define __SIZEOF_PTHREAD_RWLOCK_T 56 +# define __SIZEOF_PTHREAD_BARRIER_T 32 +#else +# define __SIZEOF_PTHREAD_MUTEX_T 24 +# define __SIZEOF_PTHREAD_ATTR_T 36 +# 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 + +/* Definitions for internal mutex struct. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 1 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64) +#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64) + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +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 __WORDSIZE == 64 + int __cur_writer; + int __shared; + unsigned char __rwelision; + unsigned char __pad1[7]; + unsigned long int __pad2; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned int __flags; +# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, {0, 0, 0, 0, 0, 0, 0 } +#else + unsigned char __rwelision; + unsigned char __pad2; + unsigned char __shared; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned char __flags; + int __cur_writer; +# define __PTHREAD_RWLOCK_ELISION_EXTRA 0 +#endif +}; + +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/sem-pad.h b/libc/include/powerpc-linux-gnu/bits/sem-pad.h new file mode 100644 index 0000000000..73f7ada00c --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/sem-pad.h @@ -0,0 +1,26 @@ +/* Define where padding goes in struct semid_ds. PowerPC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SEM_H +# error "Never use directly; include instead." +#endif + +#include + +#define __SEM_PAD_AFTER_TIME 0 +#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32) \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/semaphore.h b/libc/include/powerpc-linux-gnu/bits/semaphore.h new file mode 100644 index 0000000000..a8631d1aa3 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/semaphore.h @@ -0,0 +1,40 @@ +/* Machine-specific POSIX semaphore type layouts. PowerPC version. + Copyright (C) 2003-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Paul Mackerras , 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + +#include + +#if __WORDSIZE == 64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/setjmp.h b/libc/include/powerpc-linux-gnu/bits/setjmp.h new file mode 100644 index 0000000000..1705da061c --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/setjmp.h @@ -0,0 +1,50 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 the machine-dependent type `jmp_buf'. PowerPC version. */ +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +/* The previous bits/setjmp.h had __jmp_buf defined as a structure. + We use an array of 'long int' instead, to make writing the + assembler easier. Naturally, user code should not depend on + either representation. */ + +#include + +/* The current powerpc 32-bit Altivec ABI specifies for SVR4 ABI and EABI + the vrsave must be at byte 248 & v20 at byte 256. So we must pad this + correctly on 32 bit. It also insists that vecregs are only gauranteed + 4 byte alignment so we need to use vperm in the setjmp/longjmp routines. + We have to version the code because members like int __mask_was_saved + in the jmp_buf will move as jmp_buf is now larger than 248 bytes. We + cannot keep the altivec jmp_buf backward compatible with the jmp_buf. */ +#ifndef _ASM +# if __WORDSIZE == 64 +typedef long int __jmp_buf[64] __attribute__ ((__aligned__ (16))); +# else +/* The alignment is not essential, i.e.the buffer can be copied to a 4 byte + aligned buffer as per the ABI it is just added for performance reasons. */ +typedef long int __jmp_buf[64 + (12 * 4)] __attribute__ ((__aligned__ (16))); +# endif +#endif + +#endif /* bits/setjmp.h */ \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/shm-pad.h b/libc/include/powerpc-linux-gnu/bits/shm-pad.h new file mode 100644 index 0000000000..7cf2c0d72d --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/shm-pad.h @@ -0,0 +1,28 @@ +/* Define where padding goes in struct shmid_ds. PowerPC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SHM_H +# error "Never use directly; include instead." +#endif + +#include + +#define __SHM_PAD_AFTER_TIME 0 +#define __SHM_PAD_BEFORE_TIME (__TIMESIZE == 32) +#define __SHM_SEGSZ_AFTER_TIME 1 +#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ (__TIMESIZE == 32) \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/sigstack.h b/libc/include/powerpc-linux-gnu/bits/sigstack.h new file mode 100644 index 0000000000..f3029e811a --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/sigstack.h @@ -0,0 +1,32 @@ +/* sigstack, sigaltstack definitions. + Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_SIGSTACK_H +#define _BITS_SIGSTACK_H 1 + +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H +# error "Never include this file directly. Use instead" +#endif + +/* Minimum stack size for a signal handler. */ +#define MINSIGSTKSZ 4096 + +/* System default stack size. */ +#define SIGSTKSZ 16384 + +#endif /* bits/sigstack.h */ \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/stat.h b/libc/include/powerpc-linux-gnu/bits/stat.h new file mode 100644 index 0000000000..38c4d2425c --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/stat.h @@ -0,0 +1,275 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +#include + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_LINUX_OLD 1 +#define _STAT_VER_KERNEL 1 +#define _STAT_VER_SVR4 2 +#define _STAT_VER_LINUX 3 +#if __WORDSIZE == 32 +# define _STAT_VER _STAT_VER_LINUX +#else +# define _STAT_VER _STAT_VER_KERNEL +#endif + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 1 +#define _MKNOD_VER_SVR4 2 +#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ + + +#if __WORDSIZE == 32 + +struct stat + { + __dev_t st_dev; /* Device. */ +# ifndef __USE_FILE_OFFSET64 + unsigned short int __pad1; + __ino_t st_ino; /* File serial number. */ +# else + __ino64_t st_ino; /* File serial number. */ +# endif + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned short int __pad2; +# ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +# else + __off64_t st_size; /* Size of file, in bytes. */ +# endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +# ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +# else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# endif +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; + }; + + +# ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + __ino64_t st_ino; /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned short int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; + }; +# endif /* __USE_LARGEFILE64 */ + +#else /* __WORDSIZE == 32 */ + +struct stat + { + __dev_t st_dev; /* Device. */ +# ifndef __USE_FILE_OFFSET64 + __ino_t st_ino; /* File serial number. */ +# else + __ino64_t st_ino; /* File serial number. */ +# endif + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + int __pad2; + __dev_t st_rdev; /* Device number, if device. */ +# ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +# else + __off64_t st_size; /* Size of file, in bytes. */ +# endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +# ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +# else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# endif +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; + unsigned long int __glibc_reserved6; + }; + +# ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + __ino64_t st_ino; /* File serial number. */ + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + int __pad2; + __dev_t st_rdev; /* Device number, if device. */ + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; + unsigned long int __glibc_reserved6; + }; +# endif /* __USE_LARGEFILE64 */ +#endif + + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/termios-baud.h b/libc/include/powerpc-linux-gnu/bits/termios-baud.h new file mode 100644 index 0000000000..98c3cab88c --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/termios-baud.h @@ -0,0 +1,45 @@ +/* termios baud rate selection definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#ifdef __USE_MISC +# define CBAUD 0000377 +# define CBAUDEX 0000020 +# define CMSPAR 010000000000 /* mark or space (stick) parity */ +# define CRTSCTS 020000000000 /* flow control */ +#endif + +#define B57600 00020 +#define B115200 00021 +#define B230400 00022 +#define B460800 00023 +#define B500000 00024 +#define B576000 00025 +#define B921600 00026 +#define B1000000 00027 +#define B1152000 00030 +#define B1500000 00031 +#define B2000000 00032 +#define B2500000 00033 +#define B3000000 00034 +#define B3500000 00035 +#define B4000000 00036 +#define __MAX_BAUD B4000000 \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/termios-c_cc.h b/libc/include/powerpc-linux-gnu/bits/termios-c_cc.h new file mode 100644 index 0000000000..3b9f240258 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/termios-c_cc.h @@ -0,0 +1,41 @@ +/* termios c_cc symbolic constant definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 +#define VQUIT 1 +#define VERASE 2 +#define VKILL 3 +#define VEOF 4 +#define VMIN 5 +#define VEOL 6 +#define VTIME 7 +#define VEOL2 8 +#define VSWTC 9 + +#define VWERASE 10 +#define VREPRINT 11 +#define VSUSP 12 +#define VSTART 13 +#define VSTOP 14 +#define VLNEXT 15 +#define VDISCARD 16 \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h b/libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h new file mode 100644 index 0000000000..16869a7138 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/termios-c_cflag.h @@ -0,0 +1,35 @@ +/* termios control mode definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 CSIZE 00001400 +#define CS5 00000000 +#define CS6 00000400 +#define CS7 00001000 +#define CS8 00001400 + +#define CSTOPB 00002000 +#define CREAD 00004000 +#define PARENB 00010000 +#define PARODD 00020000 +#define HUPCL 00040000 + +#define CLOCAL 00100000 \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/termios-c_iflag.h b/libc/include/powerpc-linux-gnu/bits/termios-c_iflag.h new file mode 100644 index 0000000000..b61f9af030 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/termios-c_iflag.h @@ -0,0 +1,38 @@ +/* termios input mode definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_iflag bits */ +#define IGNBRK 0000001 +#define BRKINT 0000002 +#define IGNPAR 0000004 +#define PARMRK 0000010 +#define INPCK 0000020 +#define ISTRIP 0000040 +#define INLCR 0000100 +#define IGNCR 0000200 +#define ICRNL 0000400 +#define IXON 0001000 +#define IXOFF 0002000 +#define IXANY 0004000 +#define IUCLC 0010000 +#define IMAXBEL 0020000 +#define IUTF8 0040000 \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/termios-c_lflag.h b/libc/include/powerpc-linux-gnu/bits/termios-c_lflag.h new file mode 100644 index 0000000000..2abcbafdf5 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/termios-c_lflag.h @@ -0,0 +1,45 @@ +/* termios local mode definitions. Linux/powerpc version. + Copyright (C) 2019i Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 0x00000080 +#define ICANON 0x00000100 +#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K) +# define XCASE 0x00004000 +#endif +#define ECHO 0x00000008 +#define ECHOE 0x00000002 +#define ECHOK 0x00000004 +#define ECHONL 0x00000010 +#define NOFLSH 0x80000000 +#define TOSTOP 0x00400000 +#ifdef __USE_MISC +# define ECHOCTL 0x00000040 +# define ECHOPRT 0x00000020 +# define ECHOKE 0x00000001 +# define FLUSHO 0x00800000 +# define PENDIN 0x20000000 +#endif +#define IEXTEN 0x00000400 +#ifdef __USE_MISC +# define EXTPROC 0x10000000 +#endif \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/termios-c_oflag.h b/libc/include/powerpc-linux-gnu/bits/termios-c_oflag.h new file mode 100644 index 0000000000..ca06aad4f7 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/termios-c_oflag.h @@ -0,0 +1,65 @@ +/* termios output mode definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_oflag bits */ +#define OPOST 0000001 +#define ONLCR 0000002 +#define OLCUC 0000004 + +#define OCRNL 0000010 +#define ONOCR 0000020 +#define ONLRET 0000040 + +#define OFILL 00000100 +#define OFDEL 00000200 +#if defined __USE_MISC || defined __USE_XOPEN +# define NLDLY 00001400 +# define NL0 00000000 +# define NL1 00000400 +# if defined __USE_MISC +# define NL2 00001000 +# define NL3 00001400 +# endif +# define TABDLY 00006000 +# define TAB0 00000000 +# define TAB1 00002000 +# define TAB2 00004000 +# define TAB3 00006000 +# define CRDLY 00030000 +# define CR0 00000000 +# define CR1 00010000 +# define CR2 00020000 +# define CR3 00030000 +# define FFDLY 00040000 +# define FF0 00000000 +# define FF1 00040000 +# define BSDLY 00100000 +# define BS0 00000000 +# define BS1 00100000 +#endif +#define VTDLY 00200000 +#define VT0 00000000 +#define VT1 00200000 + +#ifdef __USE_MISC +# define XTABS 00006000 +#endif \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/termios-misc.h b/libc/include/powerpc-linux-gnu/bits/termios-misc.h new file mode 100644 index 0000000000..369feac2d0 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/termios-misc.h @@ -0,0 +1,72 @@ +/* termios baud platform specific definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#ifdef __USE_MISC + +struct sgttyb { + char sg_ispeed; + char sg_ospeed; + char sg_erase; + char sg_kill; + short sg_flags; +}; + +struct tchars { + char t_intrc; + char t_quitc; + char t_startc; + char t_stopc; + char t_eofc; + char t_brkc; +}; + +struct ltchars { + char t_suspc; + char t_dsuspc; + char t_rprntc; + char t_flushc; + char t_werasc; + char t_lnextc; +}; + +/* Used for packet mode */ +#define TIOCPKT_DATA 0 +#define TIOCPKT_FLUSHREAD 1 +#define TIOCPKT_FLUSHWRITE 2 +#define TIOCPKT_STOP 4 +#define TIOCPKT_START 8 +#define TIOCPKT_NOSTOP 16 +#define TIOCPKT_DOSTOP 32 + +/* c_cc characters */ +#define _VINTR 0 +#define _VQUIT 1 +#define _VERASE 2 +#define _VKILL 3 +#define _VEOF 4 +#define _VMIN 5 +#define _VEOL 6 +#define _VTIME 7 +#define _VEOL2 8 +#define _VSWTC 9 + +#endif /* __USE_MISC */ \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/bits/wordsize.h b/libc/include/powerpc-linux-gnu/bits/wordsize.h new file mode 100644 index 0000000000..37836f9d4e --- /dev/null +++ b/libc/include/powerpc-linux-gnu/bits/wordsize.h @@ -0,0 +1,11 @@ +/* Determine the wordsize from the preprocessor defines. */ + +#if defined __powerpc64__ +# define __WORDSIZE 64 +# define __WORDSIZE_TIME64_COMPAT32 1 +#else +# define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 +# define __WORDSIZE32_SIZE_ULONG 0 +# define __WORDSIZE32_PTRDIFF_LONG 0 +#endif \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/fpu_control.h b/libc/include/powerpc-linux-gnu/fpu_control.h new file mode 100644 index 0000000000..78a7a291ac --- /dev/null +++ b/libc/include/powerpc-linux-gnu/fpu_control.h @@ -0,0 +1,120 @@ +/* FPU control word definitions. PowerPC version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FPU_CONTROL_H +#define _FPU_CONTROL_H + +#ifdef _SOFT_FLOAT + +# define _FPU_RESERVED 0xffffffff +# define _FPU_DEFAULT 0x00000000 /* Default value. */ +typedef unsigned int fpu_control_t; +# define _FPU_GETCW(cw) (cw) = 0 +# define _FPU_SETCW(cw) (void) (cw) +extern fpu_control_t __fpu_control; + +#elif defined __NO_FPRS__ /* e500 */ + +/* rounding control */ +# define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */ +# define _FPU_RC_DOWN 0x03 +# define _FPU_RC_UP 0x02 +# define _FPU_RC_ZERO 0x01 + +/* masking of interrupts */ +# define _FPU_MASK_ZM 0x10 /* zero divide */ +# define _FPU_MASK_OM 0x04 /* overflow */ +# define _FPU_MASK_UM 0x08 /* underflow */ +# define _FPU_MASK_XM 0x40 /* inexact */ +# define _FPU_MASK_IM 0x20 /* invalid operation */ + +# define _FPU_RESERVED 0x00c10080 /* These bits are reserved and not changed. */ + +/* Correct IEEE semantics require traps to be enabled at the hardware + level; the kernel then does the emulation and determines whether + generation of signals from those traps was enabled using prctl. */ +# define _FPU_DEFAULT 0x0000003c /* Default value. */ +# define _FPU_IEEE _FPU_DEFAULT + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. */ +# define _FPU_GETCW(cw) \ + __asm__ volatile ("mfspefscr %0" : "=r" (cw)) +# define _FPU_SETCW(cw) \ + __asm__ volatile ("mtspefscr %0" : : "r" (cw)) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#else /* PowerPC 6xx floating-point. */ + +/* rounding control */ +# define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */ +# define _FPU_RC_DOWN 0x03 +# define _FPU_RC_UP 0x02 +# define _FPU_RC_ZERO 0x01 + +# define _FPU_MASK_NI 0x04 /* non-ieee mode */ + +/* masking of interrupts */ +# define _FPU_MASK_ZM 0x10 /* zero divide */ +# define _FPU_MASK_OM 0x40 /* overflow */ +# define _FPU_MASK_UM 0x20 /* underflow */ +# define _FPU_MASK_XM 0x08 /* inexact */ +# define _FPU_MASK_IM 0x80 /* invalid operation */ + +# define _FPU_RESERVED 0xffffff00 /* These bits are reserved are not changed. */ + +/* The fdlibm code requires no interrupts for exceptions. */ +# define _FPU_DEFAULT 0x00000000 /* Default value. */ + +/* IEEE: same as above, but (some) exceptions; + we leave the 'inexact' exception off. + */ +# define _FPU_IEEE 0x000000f0 + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. */ +# define _FPU_GETCW(cw) \ + ({union { double __d; unsigned long long __ll; } __u; \ + register double __fr; \ + __asm__ ("mffs %0" : "=f" (__fr)); \ + __u.__d = __fr; \ + (cw) = (fpu_control_t) __u.__ll; \ + (fpu_control_t) __u.__ll; \ + }) + +# define _FPU_SETCW(cw) \ + { union { double __d; unsigned long long __ll; } __u; \ + register double __fr; \ + __u.__ll = 0xfff80000LL << 32; /* This is a QNaN. */ \ + __u.__ll |= (cw) & 0xffffffffLL; \ + __fr = __u.__d; \ + __asm__ ("mtfsf 255,%0" : : "f" (__fr)); \ + } + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* PowerPC 6xx floating-point. */ + +#endif /* _FPU_CONTROL_H */ \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h b/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h new file mode 100644 index 0000000000..762a5673fb --- /dev/null +++ b/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h @@ -0,0 +1,30 @@ +/* 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_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_NISPLUS_SO "libnss_nisplus.so.2" +#define LIBNSS_NIS_SO "libnss_nis.so.2" +#define LIBNSS_TEST1_SO "libnss_test1.so.2" +#define LIBNSS_TEST2_SO "libnss_test2.so.2" +#define LIBPTHREAD_SO "libpthread.so.0" +#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/libc/include/powerpc-linux-gnu/gnu/lib-names.h b/libc/include/powerpc-linux-gnu/gnu/lib-names.h new file mode 100644 index 0000000000..a6fbab8035 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/gnu/lib-names.h @@ -0,0 +1,19 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#include + +#if __WORDSIZE == 32 +# include +#endif +#if __WORDSIZE == 64 && _CALL_ELF != 2 +# include +#endif +#if __WORDSIZE == 64 && _CALL_ELF == 2 +# include +#endif + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/gnu/stubs.h b/libc/include/powerpc-linux-gnu/gnu/stubs.h new file mode 100644 index 0000000000..d130565a35 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/gnu/stubs.h @@ -0,0 +1,15 @@ +/* This file is automatically generated. + This file selects the right generated file of `__stub_FUNCTION' macros + based on the architecture being compiled for. */ + +#include + +#if __WORDSIZE == 32 +# include +#endif +#if __WORDSIZE == 64 && _CALL_ELF != 2 +# include +#endif +#if __WORDSIZE == 64 && _CALL_ELF == 2 +# include +#endif \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/ieee754.h b/libc/include/powerpc-linux-gnu/ieee754.h new file mode 100644 index 0000000000..918506bc96 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/ieee754.h @@ -0,0 +1,133 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +__BEGIN_DECLS + +union ieee754_float + { + float f; + + /* This is the IEEE 754 single-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int mantissa:23; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:23; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int quiet_nan:1; + unsigned int mantissa:22; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:22; + unsigned int quiet_nan:1; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee_nan; + }; + +#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ + + +union ieee754_double + { + double d; + + /* This is the IEEE 754 double-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:20; + unsigned int mantissa1:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:19; + unsigned int mantissa1:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ + + +/* IBM extended format for long double. + + Each long double is made up of two IEEE doubles. The value of the + long double is the sum of the values of the two parts. The most + significant part is required to be the value of the long double + rounded to the nearest double, as specified by IEEE. For Inf + values, the least significant part is required to be one of +0.0 or + -0.0. No other requirements are made; so, for example, 1.0 may be + represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a + NaN is don't-care. */ + +union ibm_extended_long_double + { + long double ld; + union ieee754_double d[2]; + }; + +__END_DECLS + +#endif /* ieee754.h */ \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/sys/ptrace.h b/libc/include/powerpc-linux-gnu/sys/ptrace.h new file mode 100644 index 0000000000..cf05edb11d --- /dev/null +++ b/libc/include/powerpc-linux-gnu/sys/ptrace.h @@ -0,0 +1,253 @@ +/* `ptrace' debugger support interface. Linux/PowerPC version. + Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include +#include + +__BEGIN_DECLS + +#if defined _LINUX_PTRACE_H || defined _ASM_POWERPC_PTRACE_H +/* Do not let Linux headers macros interfere with enum __ptrace_request. */ +# undef PTRACE_ATTACH +# undef PTRACE_CONT +# undef PTRACE_DETACH +# undef PTRACE_GET_DEBUGREG +# undef PTRACE_GETEVENTMSG +# undef PTRACE_GETEVRREGS +# undef PTRACE_GETFPREGS +# undef PTRACE_GETREGS +# undef PTRACE_GETREGS64 +# undef PTRACE_GETREGSET +# undef PTRACE_GETSIGINFO +# undef PTRACE_GETSIGMASK +# undef PTRACE_GETVRREGS +# undef PTRACE_GETVSRREGS +# undef PTRACE_INTERRUPT +# undef PTRACE_KILL +# undef PTRACE_LISTEN +# undef PTRACE_PEEKDATA +# undef PTRACE_PEEKSIGINFO +# undef PTRACE_PEEKTEXT +# undef PTRACE_POKEDATA +# undef PTRACE_POKETEXT +# undef PTRACE_SECCOMP_GET_FILTER +# undef PTRACE_SECCOMP_GET_METADATA +# undef PTRACE_SEIZE +# undef PTRACE_SET_DEBUGREG +# undef PTRACE_SETEVRREGS +# undef PTRACE_SETFPREGS +# undef PTRACE_SETOPTIONS +# undef PTRACE_SETREGS +# undef PTRACE_SETREGS64 +# undef PTRACE_SETREGSET +# undef PTRACE_SETSIGINFO +# undef PTRACE_SETSIGMASK +# undef PTRACE_SETVRREGS +# undef PTRACE_SETVSRREGS +# undef PTRACE_SINGLEBLOCK +# undef PTRACE_SINGLESTEP +# undef PTRACE_SYSCALL +# undef PTRACE_TRACEME +#endif + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Get all general purpose registers used by a process. */ + PTRACE_GETREGS = 12, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a process. */ + PTRACE_SETREGS = 13, +#define PT_SETREGS PTRACE_SETREGS + + /* Get all floating point registers used by a process. */ + PTRACE_GETFPREGS = 14, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a process. */ + PTRACE_SETFPREGS = 15, +#define PT_SETFPREGS PTRACE_SETFPREGS + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Get all altivec registers used by a process. */ + PTRACE_GETVRREGS = 18, +#define PT_GETVRREGS PTRACE_GETVRREGS + + /* Set all altivec registers used by a process. */ + PTRACE_SETVRREGS = 19, +#define PT_SETVRREGS PTRACE_SETVRREGS + + /* Get all SPE registers used by a process. */ + PTRACE_GETEVRREGS = 20, +#define PT_GETEVRREGS PTRACE_GETEVRREGS + + /* Set all SPE registers used by a process. */ + PTRACE_SETEVRREGS = 21, +#define PT_SETEVRREGS PTRACE_SETEVRREGS + + /* Same as PTRACE_GETREGS except a 32-bit process will obtain + the full 64-bit registers. Implemented by 64-bit kernels only. */ + PTRACE_GETREGS64 = 22, +#define PT_GETREGS64 PTRACE_GETREGS64 + + /* Same as PTRACE_SETREGS except a 32-bit process will set + the full 64-bit registers. Implemented by 64-bit kernels only. */ + PTRACE_SETREGS64 = 23, +#define PT_SETREGS64 PTRACE_SETREGS64 + + /* Continue and stop at the next entry to or return from syscall. */ + PTRACE_SYSCALL = 24, +#define PT_SYSCALL PTRACE_SYSCALL + + /* Get a debug register of a process. */ + PTRACE_GET_DEBUGREG = 25, +#define PT_GET_DEBUGREG PTRACE_GET_DEBUGREG + + /* Set a debug register of a process. */ + PTRACE_SET_DEBUGREG = 26, +#define PT_SET_DEBUGREG PTRACE_SET_DEBUGREG + + /* Get the first 32 VSX registers of a process. */ + PTRACE_GETVSRREGS = 27, +#define PT_GETVSRREGS PTRACE_GETVSRREGS + + /* Set the first 32 VSX registers of a process. */ + PTRACE_SETVSRREGS = 28, +#define PT_SETVSRREGS PTRACE_SETVSRREGS + + /* Execute process until next taken branch. */ + PTRACE_SINGLEBLOCK = 256, +#define PT_STEPBLOCK PTRACE_SINGLEBLOCK + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + /* Retrieve siginfo_t structures without removing signals from a queue. */ + PTRACE_PEEKSIGINFO = 0x4209, +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO + + /* Get the mask of blocked signals. */ + PTRACE_GETSIGMASK = 0x420a, +#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK + + /* Change the mask of blocked signals. */ + PTRACE_SETSIGMASK = 0x420b, +#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK + + /* Get seccomp BPF filters. */ + PTRACE_SECCOMP_GET_FILTER = 0x420c, +#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER + + /* Get seccomp BPF filter metadata. */ + PTRACE_SECCOMP_GET_METADATA = 0x420d +#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA +}; + + +#include + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/sys/ucontext.h b/libc/include/powerpc-linux-gnu/sys/ucontext.h new file mode 100644 index 0000000000..6655e12509 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/sys/ucontext.h @@ -0,0 +1,200 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include + + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + +struct __ctx(pt_regs); + +#if __WORDSIZE == 32 + +/* Number of general registers. */ +# define __NGREG 48 +# ifdef __USE_MISC +# define NGREG __NGREG +# endif + +/* Container for all general registers. */ +typedef unsigned long gregset_t[__NGREG]; + +/* Container for floating-point registers and status */ +typedef struct _libc_fpstate +{ + double __ctx(fpregs)[32]; + double __ctx(fpscr); + unsigned int _pad[2]; +} fpregset_t; + +/* Container for Altivec/VMX registers and status. + Needs to be aligned on a 16-byte boundary. */ +typedef struct _libc_vrstate +{ + unsigned int __ctx(vrregs)[32][4]; + unsigned int __ctx(vrsave); + unsigned int _pad[2]; + unsigned int __ctx(vscr); +} vrregset_t; + +/* Context to describe whole processor state. */ +typedef struct +{ + gregset_t __ctx(gregs); + fpregset_t __ctx(fpregs); + vrregset_t __ctx(vrregs) __attribute__((__aligned__(16))); +} mcontext_t; + +#else + +/* For 64-bit kernels with Altivec support, a machine context is exactly + * a sigcontext. For older kernel (without Altivec) the sigcontext matches + * the mcontext upto but not including the v_regs field. For kernels that + * don't set AT_HWCAP or return AT_HWCAP without PPC_FEATURE_HAS_ALTIVEC the + * v_regs field may not exist and should not be referenced. The v_regd field + * can be refernced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC + * is set in AT_HWCAP. */ + +/* Number of general registers. */ +# define __NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */ +# define __NFPREG 33 /* includes fp0-fp31 &fpscr. */ +# define __NVRREG 34 /* includes v0-v31, vscr, & vrsave in + split vectors */ +# ifdef __USE_MISC +# define NGREG __NGREG +# define NFPREG __NFPREG +# define NVRREG __NVRREG +# endif + +typedef unsigned long gregset_t[__NGREG]; +typedef double fpregset_t[__NFPREG]; + +/* Container for Altivec/VMX Vector Status and Control Register. Only 32-bits + but can only be copied to/from a 128-bit vector register. So we allocated + a whole quadword speedup save/restore. */ +typedef struct _libc_vscr +{ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + unsigned int __pad[3]; + unsigned int __ctx(vscr_word); +#else + unsigned int __ctx(vscr_word); + unsigned int __pad[3]; +#endif +} vscr_t; + +/* Container for Altivec/VMX registers and status. + Must to be aligned on a 16-byte boundary. */ +typedef struct _libc_vrstate +{ + unsigned int __ctx(vrregs)[32][4]; + vscr_t __ctx(vscr); + unsigned int __ctx(vrsave); + unsigned int __pad[3]; +} vrregset_t __attribute__((__aligned__(16))); + +typedef struct { + unsigned long __glibc_reserved[4]; + int __ctx(signal); + int __pad0; + unsigned long __ctx(handler); + unsigned long __ctx(oldmask); + struct __ctx(pt_regs) *__ctx(regs); + gregset_t __ctx(gp_regs); + fpregset_t __ctx(fp_regs); +/* + * To maintain compatibility with current implementations the sigcontext is + * extended by appending a pointer (v_regs) to a quadword type (elf_vrreg_t) + * followed by an unstructured (vmx_reserve) field of 69 doublewords. This + * allows the array of vector registers to be quadword aligned independent of + * the alignment of the containing sigcontext or ucontext. It is the + * responsibility of the code setting the sigcontext to set this pointer to + * either NULL (if this processor does not support the VMX feature) or the + * address of the first quadword within the allocated (vmx_reserve) area. + * + * The pointer (v_regs) of vector type (elf_vrreg_t) is essentually + * an array of 34 quadword entries. The entries with + * indexes 0-31 contain the corresponding vector registers. The entry with + * index 32 contains the vscr as the last word (offset 12) within the + * quadword. This allows the vscr to be stored as either a quadword (since + * it must be copied via a vector register to/from storage) or as a word. + * The entry with index 33 contains the vrsave as the first word (offset 0) + * within the quadword. + */ + vrregset_t *__ctx(v_regs); + long __ctx(vmx_reserve)[__NVRREG+__NVRREG+1]; +} mcontext_t; + +#endif + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long int __ctx(uc_flags); + struct ucontext_t *uc_link; + stack_t uc_stack; +#if __WORDSIZE == 32 + /* + * These fields are set up this way to maximize source and + * binary compatibility with code written for the old + * ucontext_t definition, which didn't include space for the + * registers. + * + * Different versions of the kernel have stored the registers on + * signal delivery at different offsets from the ucontext struct. + * Programs should thus use the uc_mcontext.uc_regs pointer to + * find where the registers are actually stored. The registers + * will be stored within the ucontext_t struct but not necessarily + * at a fixed address. As a side-effect, this lets us achieve + * 16-byte alignment for the register storage space if the + * Altivec registers are to be saved, without requiring 16-byte + * alignment on the whole ucontext_t. + * + * The uc_mcontext.regs field is included for source compatibility + * with programs written against the older ucontext_t definition, + * and its name should therefore not change. The uc_pad field + * is for binary compatibility with programs compiled against the + * old ucontext_t; it ensures that uc_mcontext.regs and uc_sigmask + * are at the same offset as previously. + */ + int __glibc_reserved1[7]; + union __ctx(uc_regs_ptr) { + struct __ctx(pt_regs) *__ctx(regs); + mcontext_t *__ctx(uc_regs); + } uc_mcontext; + sigset_t uc_sigmask; + /* last for extensibility */ + char __ctx(uc_reg_space)[sizeof (mcontext_t) + 12]; +#else /* 64-bit */ + sigset_t uc_sigmask; + mcontext_t uc_mcontext; /* last for extensibility */ +#endif + } ucontext_t; + +#undef __ctx + +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/include/powerpc-linux-gnu/sys/user.h b/libc/include/powerpc-linux-gnu/sys/user.h new file mode 100644 index 0000000000..151aa48f53 --- /dev/null +++ b/libc/include/powerpc-linux-gnu/sys/user.h @@ -0,0 +1,40 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H + +#define _SYS_USER_H 1 +#include +#include + +#include + +struct user { + struct pt_regs regs; /* entire machine state */ + size_t u_tsize; /* text size (pages) */ + size_t u_dsize; /* data size (pages) */ + size_t u_ssize; /* stack size (pages) */ + unsigned long start_code; /* text starting address */ + unsigned long start_data; /* data starting address */ + unsigned long start_stack; /* stack starting address */ + long int signal; /* signal causing core dump */ + struct regs * u_ar0; /* help gdb find registers */ + unsigned long magic; /* identifies a core file */ + char u_comm[32]; /* user command name */ +}; + +#endif /* sys/user.h */ \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/asm/unistd.h b/libc/include/powerpc64-linux-gnu/asm/unistd.h new file mode 100644 index 0000000000..985534d0b4 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/asm/unistd.h @@ -0,0 +1,404 @@ +/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ +/* + * This file contains the system call numbers. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ +#ifndef _UAPI_ASM_POWERPC_UNISTD_H_ +#define _UAPI_ASM_POWERPC_UNISTD_H_ + + +#define __NR_restart_syscall 0 +#define __NR_exit 1 +#define __NR_fork 2 +#define __NR_read 3 +#define __NR_write 4 +#define __NR_open 5 +#define __NR_close 6 +#define __NR_waitpid 7 +#define __NR_creat 8 +#define __NR_link 9 +#define __NR_unlink 10 +#define __NR_execve 11 +#define __NR_chdir 12 +#define __NR_time 13 +#define __NR_mknod 14 +#define __NR_chmod 15 +#define __NR_lchown 16 +#define __NR_break 17 +#define __NR_oldstat 18 +#define __NR_lseek 19 +#define __NR_getpid 20 +#define __NR_mount 21 +#define __NR_umount 22 +#define __NR_setuid 23 +#define __NR_getuid 24 +#define __NR_stime 25 +#define __NR_ptrace 26 +#define __NR_alarm 27 +#define __NR_oldfstat 28 +#define __NR_pause 29 +#define __NR_utime 30 +#define __NR_stty 31 +#define __NR_gtty 32 +#define __NR_access 33 +#define __NR_nice 34 +#define __NR_ftime 35 +#define __NR_sync 36 +#define __NR_kill 37 +#define __NR_rename 38 +#define __NR_mkdir 39 +#define __NR_rmdir 40 +#define __NR_dup 41 +#define __NR_pipe 42 +#define __NR_times 43 +#define __NR_prof 44 +#define __NR_brk 45 +#define __NR_setgid 46 +#define __NR_getgid 47 +#define __NR_signal 48 +#define __NR_geteuid 49 +#define __NR_getegid 50 +#define __NR_acct 51 +#define __NR_umount2 52 +#define __NR_lock 53 +#define __NR_ioctl 54 +#define __NR_fcntl 55 +#define __NR_mpx 56 +#define __NR_setpgid 57 +#define __NR_ulimit 58 +#define __NR_oldolduname 59 +#define __NR_umask 60 +#define __NR_chroot 61 +#define __NR_ustat 62 +#define __NR_dup2 63 +#define __NR_getppid 64 +#define __NR_getpgrp 65 +#define __NR_setsid 66 +#define __NR_sigaction 67 +#define __NR_sgetmask 68 +#define __NR_ssetmask 69 +#define __NR_setreuid 70 +#define __NR_setregid 71 +#define __NR_sigsuspend 72 +#define __NR_sigpending 73 +#define __NR_sethostname 74 +#define __NR_setrlimit 75 +#define __NR_getrlimit 76 +#define __NR_getrusage 77 +#define __NR_gettimeofday 78 +#define __NR_settimeofday 79 +#define __NR_getgroups 80 +#define __NR_setgroups 81 +#define __NR_select 82 +#define __NR_symlink 83 +#define __NR_oldlstat 84 +#define __NR_readlink 85 +#define __NR_uselib 86 +#define __NR_swapon 87 +#define __NR_reboot 88 +#define __NR_readdir 89 +#define __NR_mmap 90 +#define __NR_munmap 91 +#define __NR_truncate 92 +#define __NR_ftruncate 93 +#define __NR_fchmod 94 +#define __NR_fchown 95 +#define __NR_getpriority 96 +#define __NR_setpriority 97 +#define __NR_profil 98 +#define __NR_statfs 99 +#define __NR_fstatfs 100 +#define __NR_ioperm 101 +#define __NR_socketcall 102 +#define __NR_syslog 103 +#define __NR_setitimer 104 +#define __NR_getitimer 105 +#define __NR_stat 106 +#define __NR_lstat 107 +#define __NR_fstat 108 +#define __NR_olduname 109 +#define __NR_iopl 110 +#define __NR_vhangup 111 +#define __NR_idle 112 +#define __NR_vm86 113 +#define __NR_wait4 114 +#define __NR_swapoff 115 +#define __NR_sysinfo 116 +#define __NR_ipc 117 +#define __NR_fsync 118 +#define __NR_sigreturn 119 +#define __NR_clone 120 +#define __NR_setdomainname 121 +#define __NR_uname 122 +#define __NR_modify_ldt 123 +#define __NR_adjtimex 124 +#define __NR_mprotect 125 +#define __NR_sigprocmask 126 +#define __NR_create_module 127 +#define __NR_init_module 128 +#define __NR_delete_module 129 +#define __NR_get_kernel_syms 130 +#define __NR_quotactl 131 +#define __NR_getpgid 132 +#define __NR_fchdir 133 +#define __NR_bdflush 134 +#define __NR_sysfs 135 +#define __NR_personality 136 +#define __NR_afs_syscall 137 /* Syscall for Andrew File System */ +#define __NR_setfsuid 138 +#define __NR_setfsgid 139 +#define __NR__llseek 140 +#define __NR_getdents 141 +#define __NR__newselect 142 +#define __NR_flock 143 +#define __NR_msync 144 +#define __NR_readv 145 +#define __NR_writev 146 +#define __NR_getsid 147 +#define __NR_fdatasync 148 +#define __NR__sysctl 149 +#define __NR_mlock 150 +#define __NR_munlock 151 +#define __NR_mlockall 152 +#define __NR_munlockall 153 +#define __NR_sched_setparam 154 +#define __NR_sched_getparam 155 +#define __NR_sched_setscheduler 156 +#define __NR_sched_getscheduler 157 +#define __NR_sched_yield 158 +#define __NR_sched_get_priority_max 159 +#define __NR_sched_get_priority_min 160 +#define __NR_sched_rr_get_interval 161 +#define __NR_nanosleep 162 +#define __NR_mremap 163 +#define __NR_setresuid 164 +#define __NR_getresuid 165 +#define __NR_query_module 166 +#define __NR_poll 167 +#define __NR_nfsservctl 168 +#define __NR_setresgid 169 +#define __NR_getresgid 170 +#define __NR_prctl 171 +#define __NR_rt_sigreturn 172 +#define __NR_rt_sigaction 173 +#define __NR_rt_sigprocmask 174 +#define __NR_rt_sigpending 175 +#define __NR_rt_sigtimedwait 176 +#define __NR_rt_sigqueueinfo 177 +#define __NR_rt_sigsuspend 178 +#define __NR_pread64 179 +#define __NR_pwrite64 180 +#define __NR_chown 181 +#define __NR_getcwd 182 +#define __NR_capget 183 +#define __NR_capset 184 +#define __NR_sigaltstack 185 +#define __NR_sendfile 186 +#define __NR_getpmsg 187 /* some people actually want streams */ +#define __NR_putpmsg 188 /* some people actually want streams */ +#define __NR_vfork 189 +#define __NR_ugetrlimit 190 /* SuS compliant getrlimit */ +#define __NR_readahead 191 +#ifndef __powerpc64__ /* these are 32-bit only */ +#define __NR_mmap2 192 +#define __NR_truncate64 193 +#define __NR_ftruncate64 194 +#define __NR_stat64 195 +#define __NR_lstat64 196 +#define __NR_fstat64 197 +#endif +#define __NR_pciconfig_read 198 +#define __NR_pciconfig_write 199 +#define __NR_pciconfig_iobase 200 +#define __NR_multiplexer 201 +#define __NR_getdents64 202 +#define __NR_pivot_root 203 +#ifndef __powerpc64__ +#define __NR_fcntl64 204 +#endif +#define __NR_madvise 205 +#define __NR_mincore 206 +#define __NR_gettid 207 +#define __NR_tkill 208 +#define __NR_setxattr 209 +#define __NR_lsetxattr 210 +#define __NR_fsetxattr 211 +#define __NR_getxattr 212 +#define __NR_lgetxattr 213 +#define __NR_fgetxattr 214 +#define __NR_listxattr 215 +#define __NR_llistxattr 216 +#define __NR_flistxattr 217 +#define __NR_removexattr 218 +#define __NR_lremovexattr 219 +#define __NR_fremovexattr 220 +#define __NR_futex 221 +#define __NR_sched_setaffinity 222 +#define __NR_sched_getaffinity 223 +/* 224 currently unused */ +#define __NR_tuxcall 225 +#ifndef __powerpc64__ +#define __NR_sendfile64 226 +#endif +#define __NR_io_setup 227 +#define __NR_io_destroy 228 +#define __NR_io_getevents 229 +#define __NR_io_submit 230 +#define __NR_io_cancel 231 +#define __NR_set_tid_address 232 +#define __NR_fadvise64 233 +#define __NR_exit_group 234 +#define __NR_lookup_dcookie 235 +#define __NR_epoll_create 236 +#define __NR_epoll_ctl 237 +#define __NR_epoll_wait 238 +#define __NR_remap_file_pages 239 +#define __NR_timer_create 240 +#define __NR_timer_settime 241 +#define __NR_timer_gettime 242 +#define __NR_timer_getoverrun 243 +#define __NR_timer_delete 244 +#define __NR_clock_settime 245 +#define __NR_clock_gettime 246 +#define __NR_clock_getres 247 +#define __NR_clock_nanosleep 248 +#define __NR_swapcontext 249 +#define __NR_tgkill 250 +#define __NR_utimes 251 +#define __NR_statfs64 252 +#define __NR_fstatfs64 253 +#ifndef __powerpc64__ +#define __NR_fadvise64_64 254 +#endif +#define __NR_rtas 255 +#define __NR_sys_debug_setcontext 256 +/* Number 257 is reserved for vserver */ +#define __NR_migrate_pages 258 +#define __NR_mbind 259 +#define __NR_get_mempolicy 260 +#define __NR_set_mempolicy 261 +#define __NR_mq_open 262 +#define __NR_mq_unlink 263 +#define __NR_mq_timedsend 264 +#define __NR_mq_timedreceive 265 +#define __NR_mq_notify 266 +#define __NR_mq_getsetattr 267 +#define __NR_kexec_load 268 +#define __NR_add_key 269 +#define __NR_request_key 270 +#define __NR_keyctl 271 +#define __NR_waitid 272 +#define __NR_ioprio_set 273 +#define __NR_ioprio_get 274 +#define __NR_inotify_init 275 +#define __NR_inotify_add_watch 276 +#define __NR_inotify_rm_watch 277 +#define __NR_spu_run 278 +#define __NR_spu_create 279 +#define __NR_pselect6 280 +#define __NR_ppoll 281 +#define __NR_unshare 282 +#define __NR_splice 283 +#define __NR_tee 284 +#define __NR_vmsplice 285 +#define __NR_openat 286 +#define __NR_mkdirat 287 +#define __NR_mknodat 288 +#define __NR_fchownat 289 +#define __NR_futimesat 290 +#ifdef __powerpc64__ +#define __NR_newfstatat 291 +#else +#define __NR_fstatat64 291 +#endif +#define __NR_unlinkat 292 +#define __NR_renameat 293 +#define __NR_linkat 294 +#define __NR_symlinkat 295 +#define __NR_readlinkat 296 +#define __NR_fchmodat 297 +#define __NR_faccessat 298 +#define __NR_get_robust_list 299 +#define __NR_set_robust_list 300 +#define __NR_move_pages 301 +#define __NR_getcpu 302 +#define __NR_epoll_pwait 303 +#define __NR_utimensat 304 +#define __NR_signalfd 305 +#define __NR_timerfd_create 306 +#define __NR_eventfd 307 +#define __NR_sync_file_range2 308 +#define __NR_fallocate 309 +#define __NR_subpage_prot 310 +#define __NR_timerfd_settime 311 +#define __NR_timerfd_gettime 312 +#define __NR_signalfd4 313 +#define __NR_eventfd2 314 +#define __NR_epoll_create1 315 +#define __NR_dup3 316 +#define __NR_pipe2 317 +#define __NR_inotify_init1 318 +#define __NR_perf_event_open 319 +#define __NR_preadv 320 +#define __NR_pwritev 321 +#define __NR_rt_tgsigqueueinfo 322 +#define __NR_fanotify_init 323 +#define __NR_fanotify_mark 324 +#define __NR_prlimit64 325 +#define __NR_socket 326 +#define __NR_bind 327 +#define __NR_connect 328 +#define __NR_listen 329 +#define __NR_accept 330 +#define __NR_getsockname 331 +#define __NR_getpeername 332 +#define __NR_socketpair 333 +#define __NR_send 334 +#define __NR_sendto 335 +#define __NR_recv 336 +#define __NR_recvfrom 337 +#define __NR_shutdown 338 +#define __NR_setsockopt 339 +#define __NR_getsockopt 340 +#define __NR_sendmsg 341 +#define __NR_recvmsg 342 +#define __NR_recvmmsg 343 +#define __NR_accept4 344 +#define __NR_name_to_handle_at 345 +#define __NR_open_by_handle_at 346 +#define __NR_clock_adjtime 347 +#define __NR_syncfs 348 +#define __NR_sendmmsg 349 +#define __NR_setns 350 +#define __NR_process_vm_readv 351 +#define __NR_process_vm_writev 352 +#define __NR_finit_module 353 +#define __NR_kcmp 354 +#define __NR_sched_setattr 355 +#define __NR_sched_getattr 356 +#define __NR_renameat2 357 +#define __NR_seccomp 358 +#define __NR_getrandom 359 +#define __NR_memfd_create 360 +#define __NR_bpf 361 +#define __NR_execveat 362 +#define __NR_switch_endian 363 +#define __NR_userfaultfd 364 +#define __NR_membarrier 365 +#define __NR_mlock2 378 +#define __NR_copy_file_range 379 +#define __NR_preadv2 380 +#define __NR_pwritev2 381 +#define __NR_kexec_file_load 382 +#define __NR_statx 383 +#define __NR_pkey_alloc 384 +#define __NR_pkey_free 385 +#define __NR_pkey_mprotect 386 +#define __NR_rseq 387 +#define __NR_io_pgetevents 388 + +#endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */ diff --git a/libc/include/powerpc64-linux-gnu/bits/endian.h b/libc/include/powerpc64-linux-gnu/bits/endian.h new file mode 100644 index 0000000000..f643beb3b5 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/endian.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* PowerPC can be little or big endian. Hopefully gcc will know... */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN +# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN +# error Both BIG_ENDIAN and LITTLE_ENDIAN defined! +# endif +# define __BYTE_ORDER __BIG_ENDIAN +#else +# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN +# define __BYTE_ORDER __LITTLE_ENDIAN +# else +# warning Cannot determine current byte order, assuming big-endian. +# define __BYTE_ORDER __BIG_ENDIAN +# endif +#endif \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/environments.h b/libc/include/powerpc64-linux-gnu/bits/environments.h new file mode 100644 index 0000000000..2e1c0bc1de --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/environments.h @@ -0,0 +1,96 @@ +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _UNISTD_H +# error "Never include this file directly. Use instead" +#endif + +#include + +/* This header should define the following symbols under the described + situations. A value `1' means that the model is always supported, + `-1' means it is never supported. Undefined means it cannot be + statically decided. + + _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type + _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type + + _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type + _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type + + The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, + _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, + _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were + used in previous versions of the Unix standard and are available + only for compatibility. +*/ + +#if __WORDSIZE == 64 + +/* Environments with 32-bit wide pointers are optionally provided. + Therefore following macros aren't defined: + # undef _POSIX_V7_ILP32_OFF32 + # undef _POSIX_V7_ILP32_OFFBIG + # undef _POSIX_V6_ILP32_OFF32 + # undef _POSIX_V6_ILP32_OFFBIG + # undef _XBS5_ILP32_OFF32 + # undef _XBS5_ILP32_OFFBIG + and users need to check at runtime. */ + +/* We also have no use (for now) for an environment with bigger pointers + and offsets. */ +# define _POSIX_V7_LPBIG_OFFBIG -1 +# define _POSIX_V6_LPBIG_OFFBIG -1 +# define _XBS5_LPBIG_OFFBIG -1 + +/* By default we have 64-bit wide `long int', pointers and `off_t'. */ +# define _POSIX_V7_LP64_OFF64 1 +# define _POSIX_V6_LP64_OFF64 1 +# define _XBS5_LP64_OFF64 1 + +#else /* __WORDSIZE == 32 */ + +/* By default we have 32-bit wide `int', `long int', pointers and `off_t' + and all platforms support LFS. */ +# define _POSIX_V7_ILP32_OFF32 1 +# define _POSIX_V7_ILP32_OFFBIG 1 +# define _POSIX_V6_ILP32_OFF32 1 +# define _POSIX_V6_ILP32_OFFBIG 1 +# define _XBS5_ILP32_OFF32 1 +# define _XBS5_ILP32_OFFBIG 1 + +/* We optionally provide an environment with the above size but an 64-bit + side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ + +/* Environments with 64-bit wide pointers can be provided, + so these macros aren't defined: + # undef _POSIX_V7_LP64_OFF64 + # undef _POSIX_V7_LPBIG_OFFBIG + # undef _POSIX_V6_LP64_OFF64 + # undef _POSIX_V6_LPBIG_OFFBIG + # undef _XBS5_LP64_OFF64 + # undef _XBS5_LPBIG_OFFBIG + and sysconf tests for it at runtime. */ + +#endif /* __WORDSIZE == 32 */ + +#define __ILP32_OFF32_CFLAGS "-m32" +#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +#define __ILP32_OFF32_LDFLAGS "-m32" +#define __ILP32_OFFBIG_LDFLAGS "-m32" +#define __LP64_OFF64_CFLAGS "-m64" +#define __LP64_OFF64_LDFLAGS "-m64" \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/fcntl.h b/libc/include/powerpc64-linux-gnu/bits/fcntl.h new file mode 100644 index 0000000000..e344ed65a4 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/fcntl.h @@ -0,0 +1,62 @@ +/* O_*, F_*, FD_* bit values for Linux/PowerPC. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#include + +#define __O_DIRECTORY 040000 /* Must be a directory. */ +#define __O_NOFOLLOW 0100000 /* Do not follow links. */ +#define __O_DIRECT 0400000 /* Direct disk access. */ + +#if __WORDSIZE == 64 +/* Not necessary, files are always with 64bit off_t. */ +# define __O_LARGEFILE 0 +#else +# define __O_LARGEFILE 0200000 +#endif + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/fenv.h b/libc/include/powerpc64-linux-gnu/bits/fenv.h new file mode 100644 index 0000000000..f59c2a5809 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/fenv.h @@ -0,0 +1,180 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + + +/* Define bits representing the exception. We use the bit positions of + the appropriate bits in the FPSCR... */ +enum + { + FE_INEXACT = +#define FE_INEXACT (1 << (31 - 6)) + FE_INEXACT, + FE_DIVBYZERO = +#define FE_DIVBYZERO (1 << (31 - 5)) + FE_DIVBYZERO, + FE_UNDERFLOW = +#define FE_UNDERFLOW (1 << (31 - 4)) + FE_UNDERFLOW, + FE_OVERFLOW = +#define FE_OVERFLOW (1 << (31 - 3)) + FE_OVERFLOW, + + /* ... except for FE_INVALID, for which we use bit 31. FE_INVALID + actually corresponds to bits 7 through 12 and 21 through 23 + in the FPSCR, but we can't use that because the current draft + says that it must be a power of 2. Instead we use bit 2 which + is the summary bit for all the FE_INVALID exceptions, which + kind of makes sense. */ + FE_INVALID = +#define FE_INVALID (1 << (31 - 2)) + FE_INVALID, + +#ifdef __USE_GNU + /* Breakdown of the FE_INVALID bits. Setting FE_INVALID on an + input to a routine is equivalent to setting all of these bits; + FE_INVALID will be set on output from a routine iff one of + these bits is set. Note, though, that you can't disable or + enable these exceptions individually. */ + + /* Operation with a sNaN. */ + FE_INVALID_SNAN = +# define FE_INVALID_SNAN (1 << (31 - 7)) + FE_INVALID_SNAN, + + /* Inf - Inf */ + FE_INVALID_ISI = +# define FE_INVALID_ISI (1 << (31 - 8)) + FE_INVALID_ISI, + + /* Inf / Inf */ + FE_INVALID_IDI = +# define FE_INVALID_IDI (1 << (31 - 9)) + FE_INVALID_IDI, + + /* 0 / 0 */ + FE_INVALID_ZDZ = +# define FE_INVALID_ZDZ (1 << (31 - 10)) + FE_INVALID_ZDZ, + + /* Inf * 0 */ + FE_INVALID_IMZ = +# define FE_INVALID_IMZ (1 << (31 - 11)) + FE_INVALID_IMZ, + + /* Comparison with a NaN. */ + FE_INVALID_COMPARE = +# define FE_INVALID_COMPARE (1 << (31 - 12)) + FE_INVALID_COMPARE, + + /* Invalid operation flag for software (not set by hardware). */ + /* Note that some chips don't have this implemented, presumably + because no-one expected anyone to write software for them %-). */ + FE_INVALID_SOFTWARE = +# define FE_INVALID_SOFTWARE (1 << (31 - 21)) + FE_INVALID_SOFTWARE, + + /* Square root of negative number (including -Inf). */ + /* Note that some chips don't have this implemented. */ + FE_INVALID_SQRT = +# define FE_INVALID_SQRT (1 << (31 - 22)) + FE_INVALID_SQRT, + + /* Conversion-to-integer of a NaN or a number too large or too small. */ + FE_INVALID_INTEGER_CONVERSION = +# define FE_INVALID_INTEGER_CONVERSION (1 << (31 - 23)) + FE_INVALID_INTEGER_CONVERSION + +# define FE_ALL_INVALID \ + (FE_INVALID_SNAN | FE_INVALID_ISI | FE_INVALID_IDI | FE_INVALID_ZDZ \ + | FE_INVALID_IMZ | FE_INVALID_COMPARE | FE_INVALID_SOFTWARE \ + | FE_INVALID_SQRT | FE_INVALID_INTEGER_CONVERSION) +#endif + }; + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +/* PowerPC chips support all of the four defined rounding modes. We + use the bit pattern in the FPSCR as the values for the + appropriate macros. */ +enum + { + FE_TONEAREST = +#define FE_TONEAREST 0 + FE_TONEAREST, + FE_TOWARDZERO = +#define FE_TOWARDZERO 1 + FE_TOWARDZERO, + FE_UPWARD = +#define FE_UPWARD 2 + FE_UPWARD, + FE_DOWNWARD = +#define FE_DOWNWARD 3 + FE_DOWNWARD + }; + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + +/* Type representing floating-point environment. We leave it as 'double' + for efficiency reasons (rather than writing it to a 32-bit integer). */ +typedef double fenv_t; + +/* If the default argument is used we use this value. */ +extern const fenv_t __fe_dfl_env; +#define FE_DFL_ENV (&__fe_dfl_env) + +#ifdef __USE_GNU +/* Floating-point environment where all exceptions are enabled. Note that + this is not sufficient to give you SIGFPE. */ +extern const fenv_t __fe_enabled_env; +# define FE_ENABLED_ENV (&__fe_enabled_env) + +/* Floating-point environment with (processor-dependent) non-IEEE floating + point. */ +extern const fenv_t __fe_nonieee_env; +# define FE_NONIEEE_ENV (&__fe_nonieee_env) + +/* Floating-point environment with all exceptions enabled. Note that + just evaluating this value does not change the processor exception mode. + Passing this mask to fesetenv will result in a prctl syscall to change + the MSR FE0/FE1 bits to "Precise Mode". On some processors this will + result in slower floating point execution. This will last until an + fenv or exception mask is installed that disables all FP exceptions. */ +# define FE_NOMASK_ENV FE_ENABLED_ENV + +/* Floating-point environment with all exceptions disabled. Note that + just evaluating this value does not change the processor exception mode. + Passing this mask to fesetenv will result in a prctl syscall to change + the MSR FE0/FE1 bits to "Ignore Exceptions Mode". On most processors + this allows the fastest possible floating point execution.*/ +# define FE_MASK_ENV FE_DFL_ENV + +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef double femode_t; + +/* Default floating-point control modes. */ +extern const femode_t __fe_dfl_mode; +# define FE_DFL_MODE (&__fe_dfl_mode) +#endif \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/fenvinline.h b/libc/include/powerpc64-linux-gnu/bits/fenvinline.h new file mode 100644 index 0000000000..1552e48c7a --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/fenvinline.h @@ -0,0 +1,79 @@ +/* Inline floating-point environment handling functions for powerpc. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__ + +/* Inline definition for fegetround. */ +# define __fegetround() \ + (__extension__ ({ int __fegetround_result; \ + __asm__ __volatile__ \ + ("mcrfs 7,7 ; mfcr %0" \ + : "=r"(__fegetround_result) : : "cr7"); \ + __fegetround_result & 3; })) +# define fegetround() __fegetround () + +# ifndef __NO_MATH_INLINES +/* The weird 'i#*X' constraints on the following suppress a gcc + warning when __excepts is not a constant. Otherwise, they mean the + same as just plain 'i'. */ + +# if __GNUC_PREREQ(3, 4) + +/* Inline definition for feraiseexcept. */ +# define feraiseexcept(__excepts) \ + (__extension__ ({ \ + int __e = __excepts; \ + int __ret; \ + if (__builtin_constant_p (__e) \ + && (__e & (__e - 1)) == 0 \ + && __e != FE_INVALID) \ + { \ + if (__e != 0) \ + __asm__ __volatile__ ("mtfsb1 %0" \ + : : "i#*X" (__builtin_clz (__e))); \ + __ret = 0; \ + } \ + else \ + __ret = feraiseexcept (__e); \ + __ret; \ + })) + +/* Inline definition for feclearexcept. */ +# define feclearexcept(__excepts) \ + (__extension__ ({ \ + int __e = __excepts; \ + int __ret; \ + if (__builtin_constant_p (__e) \ + && (__e & (__e - 1)) == 0 \ + && __e != FE_INVALID) \ + { \ + if (__e != 0) \ + __asm__ __volatile__ ("mtfsb0 %0" \ + : : "i#*X" (__builtin_clz (__e))); \ + __ret = 0; \ + } \ + else \ + __ret = feclearexcept (__e); \ + __ret; \ + })) + +# endif /* __GNUC_PREREQ(3, 4). */ + +# endif /* !__NO_MATH_INLINES. */ + +#endif /* __GNUC__ && !_SOFT_FLOAT && !__NO_FPRS__ */ \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/floatn.h b/libc/include/powerpc64-linux-gnu/bits/floatn.h new file mode 100644 index 0000000000..2514b6300e --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/floatn.h @@ -0,0 +1,122 @@ +/* Macros to control TS 18661-3 glibc features on powerpc. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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. */ +#if defined _ARCH_PWR8 && defined __LITTLE_ENDIAN__ && (_CALL_ELF == 2) \ + && defined __FLOAT128__ && !defined __NO_LONG_DOUBLE_MATH +# define __HAVE_FLOAT128 1 +#else +# 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, i.e. + calls to the binary128 functions go to *f128 symbols instead of *l. */ +#if __HAVE_FLOAT128 +# define __HAVE_DISTINCT_FLOAT128 1 +#else +# define __HAVE_DISTINCT_FLOAT128 0 +#endif + +/* Defined to 1 if the current compiler invocation provides a + floating-point type with the right format for _Float64x, and this + 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 0 + +#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) exist for powerpc only since GCC 7.0. */ +# if __LDBL_MANT_DIG__ == 113 +# define __f128(x) x##l +# else +# define __f128(x) x##q +# endif +# else +# define __f128(x) x##f128 +# endif +# endif + +/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ +# if __HAVE_FLOAT128 +# if __LDBL_MANT_DIG__ == 113 && defined __cplusplus +typedef long double _Float128; +# define __CFLOAT128 _Complex long double +# elif !__GNUC_PREREQ (7, 0) || defined __cplusplus +/* The type _Float128 exist for powerpc only since GCC 7.0. */ +typedef __float128 _Float128; +/* Add a typedef for older GCC and C++ compilers which don't natively support + _Complex _Float128. */ +typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__KC__))); +# define __CFLOAT128 __cfloat128 +# else +# define __CFLOAT128 _Complex _Float128 +# endif +# endif + +/* The remaining of this file provides support for older compilers. */ +# if __HAVE_FLOAT128 +/* Builtin __builtin_huge_valf128 doesn't exist before GCC 7.0. */ +# if !__GNUC_PREREQ (7, 0) +# define __builtin_huge_valf128() ((_Float128) __builtin_huge_val ()) +# endif + +/* The following builtins (suffixed with 'q') are available in GCC >= 6.2, + which is the minimum version required for float128 support on powerpc64le. + Since GCC 7.0 the builtins suffixed with f128 are also available, then + there is no need to redefined them. */ +# if !__GNUC_PREREQ (7, 0) +# define __builtin_copysignf128 __builtin_copysignq +# define __builtin_fabsf128 __builtin_fabsq +# define __builtin_inff128 __builtin_infq +# define __builtin_nanf128 __builtin_nanq +# define __builtin_nansf128 __builtin_nansq +# endif + +/* In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*, + e.g.: __builtin_signbitf128, before GCC 6. However, there has never + been a __builtin_signbitf128 in GCC and the type-generic builtin is + only available since GCC 6. */ +# if !__GNUC_PREREQ (6, 0) +# define __builtin_signbitf128 __signbitf128 +# endif + +# endif + +#endif /* !__ASSEMBLER__. */ + +#include + +#endif /* _BITS_FLOATN_H */ \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/fp-fast.h b/libc/include/powerpc64-linux-gnu/bits/fp-fast.h new file mode 100644 index 0000000000..09e055f11e --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/fp-fast.h @@ -0,0 +1,39 @@ +/* Define FP_FAST_* macros. PowerPC version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +#ifdef __USE_ISOC99 + +/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l} + builtins are supported. */ +# if (!defined _SOFT_FLOAT && !defined __NO_FPRS__) || defined __FP_FAST_FMA +# define FP_FAST_FMA 1 +# endif + +# if (!defined _SOFT_FLOAT && !defined __NO_FPRS__) || defined __FP_FAST_FMAF +# define FP_FAST_FMAF 1 +# endif + +# ifdef __FP_FAST_FMAL +# define FP_FAST_FMAL 1 +# endif + +#endif \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/hwcap.h b/libc/include/powerpc64-linux-gnu/bits/hwcap.h new file mode 100644 index 0000000000..0d72f34418 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/hwcap.h @@ -0,0 +1,76 @@ +/* Defines for bits in AT_HWCAP and AT_HWCAP2. + Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H) +# error "Never include directly; use instead." +#endif + +/* The bit numbers must match those in the kernel's asm/cputable.h. */ + +/* Feature definitions in AT_HWCAP. */ +#define PPC_FEATURE_32 0x80000000 /* 32-bit mode. */ +#define PPC_FEATURE_64 0x40000000 /* 64-bit mode. */ +#define PPC_FEATURE_601_INSTR 0x20000000 /* 601 chip, Old POWER ISA. */ +#define PPC_FEATURE_HAS_ALTIVEC 0x10000000 /* SIMD/Vector Unit. */ +#define PPC_FEATURE_HAS_FPU 0x08000000 /* Floating Point Unit. */ +#define PPC_FEATURE_HAS_MMU 0x04000000 /* Memory Management Unit. */ +#define PPC_FEATURE_HAS_4xxMAC 0x02000000 /* 4xx Multiply Accumulator. */ +#define PPC_FEATURE_UNIFIED_CACHE 0x01000000 /* Unified I/D cache. */ +#define PPC_FEATURE_HAS_SPE 0x00800000 /* Signal Processing ext. */ +#define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 /* SPE Float. */ +#define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 /* SPE Double. */ +#define PPC_FEATURE_NO_TB 0x00100000 /* 601/403gx have no timebase */ +#define PPC_FEATURE_POWER4 0x00080000 /* POWER4 ISA 2.00 */ +#define PPC_FEATURE_POWER5 0x00040000 /* POWER5 ISA 2.02 */ +#define PPC_FEATURE_POWER5_PLUS 0x00020000 /* POWER5+ ISA 2.03 */ +#define PPC_FEATURE_CELL_BE 0x00010000 /* CELL Broadband Engine */ +#define PPC_FEATURE_BOOKE 0x00008000 /* ISA Category Embedded */ +#define PPC_FEATURE_SMT 0x00004000 /* Simultaneous + Multi-Threading */ +#define PPC_FEATURE_ICACHE_SNOOP 0x00002000 +#define PPC_FEATURE_ARCH_2_05 0x00001000 /* ISA 2.05 */ +#define PPC_FEATURE_PA6T 0x00000800 /* PA Semi 6T Core */ +#define PPC_FEATURE_HAS_DFP 0x00000400 /* Decimal FP Unit */ +#define PPC_FEATURE_POWER6_EXT 0x00000200 /* P6 + mffgpr/mftgpr */ +#define PPC_FEATURE_ARCH_2_06 0x00000100 /* ISA 2.06 */ +#define PPC_FEATURE_HAS_VSX 0x00000080 /* P7 Vector Extension. */ +#define PPC_FEATURE_PSERIES_PERFMON_COMPAT 0x00000040 +/* Reserved by the kernel. 0x00000004 Do not use. */ +#define PPC_FEATURE_TRUE_LE 0x00000002 +#define PPC_FEATURE_PPC_LE 0x00000001 + +/* Feature definitions in AT_HWCAP2. */ +#define PPC_FEATURE2_ARCH_2_07 0x80000000 /* ISA 2.07 */ +#define PPC_FEATURE2_HAS_HTM 0x40000000 /* Hardware Transactional + Memory */ +#define PPC_FEATURE2_HAS_DSCR 0x20000000 /* Data Stream Control + Register */ +#define PPC_FEATURE2_HAS_EBB 0x10000000 /* Event Base Branching */ +#define PPC_FEATURE2_HAS_ISEL 0x08000000 /* Integer Select */ +#define PPC_FEATURE2_HAS_TAR 0x04000000 /* Target Address Register */ +#define PPC_FEATURE2_HAS_VEC_CRYPTO 0x02000000 /* Target supports vector + instruction. */ +#define PPC_FEATURE2_HTM_NOSC 0x01000000 /* Kernel aborts transaction + when a syscall is made. */ +#define PPC_FEATURE2_ARCH_3_00 0x00800000 /* ISA 3.0 */ +#define PPC_FEATURE2_HAS_IEEE128 0x00400000 /* VSX IEEE Binary Float + 128-bit */ +#define PPC_FEATURE2_DARN 0x00200000 /* darn instruction. */ +#define PPC_FEATURE2_SCV 0x00100000 /* scv syscall. */ +#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM without suspended + state. */ \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/ioctl-types.h b/libc/include/powerpc64-linux-gnu/bits/ioctl-types.h new file mode 100644 index 0000000000..f2b9931899 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/ioctl-types.h @@ -0,0 +1,77 @@ +/* Structure types for pre-termios terminal ioctls. Linux/powerpc version. + Copyright (C) 2014-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 10 +struct termio + { + unsigned short int c_iflag; /* input mode flags */ + unsigned short int c_oflag; /* output mode flags */ + unsigned short int c_cflag; /* control mode flags */ + unsigned short int c_lflag; /* local mode flags */ + unsigned char c_line; /* line discipline */ + unsigned char c_cc[NCC]; /* control characters */ +}; + +/* modem lines */ +#define TIOCM_LE 0x001 +#define TIOCM_DTR 0x002 +#define TIOCM_RTS 0x004 +#define TIOCM_ST 0x008 +#define TIOCM_SR 0x010 +#define TIOCM_CTS 0x020 +#define TIOCM_CAR 0x040 +#define TIOCM_RNG 0x080 +#define TIOCM_DSR 0x100 +#define TIOCM_CD TIOCM_CAR +#define TIOCM_RI TIOCM_RNG + +/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ + +/* line disciplines */ +#define N_TTY 0 +#define N_SLIP 1 +#define N_MOUSE 2 +#define N_PPP 3 +#define N_STRIP 4 +#define N_AX25 5 +#define N_X25 6 /* X.25 async */ +#define N_6PACK 7 +#define N_MASC 8 /* Mobitex module */ +#define N_R3964 9 /* Simatic R3964 module */ +#define N_PROFIBUS_FDL 10 /* Profibus */ +#define N_IRDA 11 /* Linux IR */ +#define N_SMSBLOCK 12 /* SMS block mode */ +#define N_HDLC 13 /* synchronous HDLC */ +#define N_SYNC_PPP 14 /* synchronous PPP */ +#define N_HCI 15 /* Bluetooth HCI UART */ \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/ipc.h b/libc/include/powerpc64-linux-gnu/bits/ipc.h new file mode 100644 index 0000000000..7b0f55f7ab --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/ipc.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IPC_H +# error "Never use directly; include instead." +#endif + +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#ifdef __USE_GNU +# define IPC_INFO 3 /* See ipcs. */ +#endif + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + __uid_t uid; /* Owner's user ID. */ + __gid_t gid; /* Owner's group ID. */ + __uid_t cuid; /* Creator's user ID. */ + __gid_t cgid; /* Creator's group ID. */ + __mode_t mode; /* Read/write permission. */ + __uint32_t __seq; /* Sequence number. */ + __uint32_t __pad1; + __uint64_t __glibc_reserved1; + __uint64_t __glibc_reserved2; + }; \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/iscanonical.h b/libc/include/powerpc64-linux-gnu/bits/iscanonical.h new file mode 100644 index 0000000000..108d77b411 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/iscanonical.h @@ -0,0 +1,58 @@ +/* Define iscanonical macro. ldbl-128ibm version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +#ifdef __NO_LONG_DOUBLE_MATH +# define iscanonical(x) ((void) (__typeof (x)) (x), 1) +#else +extern int __iscanonicall (long double __x) + __THROW __attribute__ ((__const__)); +# define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1) +# define __iscanonical(x) ((void) (__typeof (x)) (x), 1) +# if __HAVE_DISTINCT_FLOAT128 +# define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1) +# endif + +/* Return nonzero value if X is canonical. In IEEE interchange binary + formats, all values are canonical, but the argument must still be + converted to its semantic type for any exceptions arising from the + conversion, before being discarded; in IBM long double, there are + encodings that are not consistently handled as corresponding to any + particular value of the type, and we return 0 for those. */ +# ifndef __cplusplus +# define iscanonical(x) __MATH_TG ((x), __iscanonical, (x)) +# else +/* In C++ mode, __MATH_TG cannot be used, because it relies on + __builtin_types_compatible_p, which is a C-only builtin. On the + other hand, overloading provides the means to distinguish between + the floating-point types. The overloading resolution will match + the correct parameter (regardless of type qualifiers (i.e.: const + and volatile)). */ +extern "C++" { +inline int iscanonical (float __val) { return __iscanonicalf (__val); } +inline int iscanonical (double __val) { return __iscanonical (__val); } +inline int iscanonical (long double __val) { return __iscanonicall (__val); } +# if __HAVE_DISTINCT_FLOAT128 +inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); } +# endif +} +# endif /* __cplusplus */ +#endif /* __NO_LONG_DOUBLE_MATH */ \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/link.h b/libc/include/powerpc64-linux-gnu/bits/link.h new file mode 100644 index 0000000000..ca46d5a01b --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/link.h @@ -0,0 +1,156 @@ +/* Machine-specific declarations for dynamic linker interface. PowerPC version + Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + + +#if __ELF_NATIVE_CLASS == 32 + +/* Registers for entry into PLT on PPC32. */ +typedef struct La_ppc32_regs +{ + uint32_t lr_reg[8]; + double lr_fp[8]; + uint32_t lr_vreg[12][4]; + uint32_t lr_r1; + uint32_t lr_lr; +} La_ppc32_regs; + +/* Return values for calls from PLT on PPC32. */ +typedef struct La_ppc32_retval +{ + uint32_t lrv_r3; + uint32_t lrv_r4; + double lrv_fp[8]; + uint32_t lrv_v2[4]; +} La_ppc32_retval; + + +__BEGIN_DECLS + +extern Elf32_Addr la_ppc32_gnu_pltenter (Elf32_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_ppc32_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_ppc32_gnu_pltexit (Elf32_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_ppc32_regs *__inregs, + La_ppc32_retval *__outregs, + const char *__symname); + +__END_DECLS + +#elif __ELF_NATIVE_CLASS == 64 +# if _CALL_ELF != 2 + +/* Registers for entry into PLT on PPC64. */ +typedef struct La_ppc64_regs +{ + uint64_t lr_reg[8]; + double lr_fp[13]; + uint32_t __padding; + uint32_t lr_vrsave; + uint32_t lr_vreg[12][4]; + uint64_t lr_r1; + uint64_t lr_lr; +} La_ppc64_regs; + +/* Return values for calls from PLT on PPC64. */ +typedef struct La_ppc64_retval +{ + uint64_t lrv_r3; + uint64_t lrv_r4; + double lrv_fp[4]; /* f1-f4, float - complex long double. */ + uint32_t lrv_v2[4]; /* v2. */ +} La_ppc64_retval; + + +__BEGIN_DECLS + +extern Elf64_Addr la_ppc64_gnu_pltenter (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_ppc64_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_ppc64_gnu_pltexit (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_ppc64_regs *__inregs, + La_ppc64_retval *__outregs, + const char *__symname); + +__END_DECLS + +# else + +/* Registers for entry into PLT on PPC64 in the ELFv2 ABI. */ +typedef struct La_ppc64v2_regs +{ + uint64_t lr_reg[8]; + double lr_fp[13]; + uint32_t __padding; + uint32_t lr_vrsave; + uint32_t lr_vreg[12][4] __attribute__ ((aligned (16))); + uint64_t lr_r1; + uint64_t lr_lr; +} La_ppc64v2_regs; + +/* Return values for calls from PLT on PPC64 in the ELFv2 ABI. */ +typedef struct La_ppc64v2_retval +{ + uint64_t lrv_r3; + uint64_t lrv_r4; + double lrv_fp[10]; + uint32_t lrv_vreg[8][4] __attribute__ ((aligned (16))); +} La_ppc64v2_retval; + + +__BEGIN_DECLS + +extern Elf64_Addr la_ppc64v2_gnu_pltenter (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_ppc64v2_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_ppc64v2_gnu_pltexit (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_ppc64v2_regs *__inregs, + La_ppc64v2_retval *__outregs, + const char *__symname); + +__END_DECLS + +# endif +#endif \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/local_lim.h b/libc/include/powerpc64-linux-gnu/bits/local_lim.h new file mode 100644 index 0000000000..65261d42b3 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/local_lim.h @@ -0,0 +1,100 @@ +/* Minimum guaranteed maximum values for system limits. Linux/PPC version. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. At least two pages for systems with 64k + pages. */ +#define PTHREAD_STACK_MIN 131072 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/long-double.h b/libc/include/powerpc64-linux-gnu/bits/long-double.h new file mode 100644 index 0000000000..9fe5a6c570 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/long-double.h @@ -0,0 +1,24 @@ +/* Properties of long double type. ldbl-opt version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef __NO_LONG_DOUBLE_MATH +# define __LONG_DOUBLE_MATH_OPTIONAL 1 +# ifndef __LONG_DOUBLE_128__ +# define __NO_LONG_DOUBLE_MATH 1 +# endif +#endif \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/mman.h b/libc/include/powerpc64-linux-gnu/bits/mman.h new file mode 100644 index 0000000000..9e80948561 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/mman.h @@ -0,0 +1,51 @@ +/* Definitions for POSIX memory map interface. Linux/PowerPC version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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. */ + +#define PROT_SAO 0x10 /* Strong Access Ordering. */ + +/* These are Linux-specific. */ +#ifdef __USE_MISC +# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ +# define MAP_DENYWRITE 0x00800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ +# define MAP_LOCKED 0x00080 /* Lock the mapping. */ +# define MAP_NORESERVE 0x00040 /* Don't check for reservations. */ +# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ +# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +# define MAP_STACK 0x20000 /* Allocation is for a stack. */ +# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ +# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap + underlying mapping. */ +#endif + +/* Flags for `mlockall'. */ +#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 0x4000 /* Lock all additions to address + space. */ +#define MCL_ONFAULT 0x8000 /* Lock all pages that are + faulted in. */ + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/msq-pad.h b/libc/include/powerpc64-linux-gnu/bits/msq-pad.h new file mode 100644 index 0000000000..d697bc4d06 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/msq-pad.h @@ -0,0 +1,26 @@ +/* Define where padding goes in struct msqid_ds. PowerPC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include + +#define __MSQ_PAD_AFTER_TIME 0 +#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/procfs.h b/libc/include/powerpc64-linux-gnu/bits/procfs.h new file mode 100644 index 0000000000..793fa8944a --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/procfs.h @@ -0,0 +1,49 @@ +/* Types for registers for sys/procfs.h. PowerPC version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +#include +#include + +/* These definitions are normally provided by ucontext.h via + asm/sigcontext.h, asm/ptrace.h, and asm/elf.h. Otherwise we define + them here. */ +#if !defined __PPC64_ELF_H && !defined _ASM_POWERPC_ELF_H +#define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ +#define ELF_NFPREG 33 /* includes fpscr */ +#if __WORDSIZE == 32 +# define ELF_NVRREG 33 /* includes vscr */ +#else +# define ELF_NVRREG 34 /* includes vscr */ +#endif + +typedef unsigned long elf_greg_t; +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +typedef double elf_fpreg_t; +typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; + +/* Altivec registers */ +typedef struct { + unsigned int u[4]; +} __attribute__ ((__aligned__ (16))) elf_vrreg_t; +typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG]; +#endif \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/pthreadtypes-arch.h b/libc/include/powerpc64-linux-gnu/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..883306d2e8 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/pthreadtypes-arch.h @@ -0,0 +1,81 @@ +/* Machine-specific pthread type layouts. PowerPC version. + Copyright (C) 2003-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 __WORDSIZE == 64 +# define __SIZEOF_PTHREAD_MUTEX_T 40 +# define __SIZEOF_PTHREAD_ATTR_T 56 +# define __SIZEOF_PTHREAD_RWLOCK_T 56 +# define __SIZEOF_PTHREAD_BARRIER_T 32 +#else +# define __SIZEOF_PTHREAD_MUTEX_T 24 +# define __SIZEOF_PTHREAD_ATTR_T 36 +# 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 + +/* Definitions for internal mutex struct. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 1 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64) +#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64) + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +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 __WORDSIZE == 64 + int __cur_writer; + int __shared; + unsigned char __rwelision; + unsigned char __pad1[7]; + unsigned long int __pad2; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned int __flags; +# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, {0, 0, 0, 0, 0, 0, 0 } +#else + unsigned char __rwelision; + unsigned char __pad2; + unsigned char __shared; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned char __flags; + int __cur_writer; +# define __PTHREAD_RWLOCK_ELISION_EXTRA 0 +#endif +}; + +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/sem-pad.h b/libc/include/powerpc64-linux-gnu/bits/sem-pad.h new file mode 100644 index 0000000000..73f7ada00c --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/sem-pad.h @@ -0,0 +1,26 @@ +/* Define where padding goes in struct semid_ds. PowerPC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SEM_H +# error "Never use directly; include instead." +#endif + +#include + +#define __SEM_PAD_AFTER_TIME 0 +#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32) \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/semaphore.h b/libc/include/powerpc64-linux-gnu/bits/semaphore.h new file mode 100644 index 0000000000..a8631d1aa3 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/semaphore.h @@ -0,0 +1,40 @@ +/* Machine-specific POSIX semaphore type layouts. PowerPC version. + Copyright (C) 2003-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Paul Mackerras , 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + +#include + +#if __WORDSIZE == 64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/setjmp.h b/libc/include/powerpc64-linux-gnu/bits/setjmp.h new file mode 100644 index 0000000000..1705da061c --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/setjmp.h @@ -0,0 +1,50 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 the machine-dependent type `jmp_buf'. PowerPC version. */ +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +/* The previous bits/setjmp.h had __jmp_buf defined as a structure. + We use an array of 'long int' instead, to make writing the + assembler easier. Naturally, user code should not depend on + either representation. */ + +#include + +/* The current powerpc 32-bit Altivec ABI specifies for SVR4 ABI and EABI + the vrsave must be at byte 248 & v20 at byte 256. So we must pad this + correctly on 32 bit. It also insists that vecregs are only gauranteed + 4 byte alignment so we need to use vperm in the setjmp/longjmp routines. + We have to version the code because members like int __mask_was_saved + in the jmp_buf will move as jmp_buf is now larger than 248 bytes. We + cannot keep the altivec jmp_buf backward compatible with the jmp_buf. */ +#ifndef _ASM +# if __WORDSIZE == 64 +typedef long int __jmp_buf[64] __attribute__ ((__aligned__ (16))); +# else +/* The alignment is not essential, i.e.the buffer can be copied to a 4 byte + aligned buffer as per the ABI it is just added for performance reasons. */ +typedef long int __jmp_buf[64 + (12 * 4)] __attribute__ ((__aligned__ (16))); +# endif +#endif + +#endif /* bits/setjmp.h */ \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/shm-pad.h b/libc/include/powerpc64-linux-gnu/bits/shm-pad.h new file mode 100644 index 0000000000..7cf2c0d72d --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/shm-pad.h @@ -0,0 +1,28 @@ +/* Define where padding goes in struct shmid_ds. PowerPC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SHM_H +# error "Never use directly; include instead." +#endif + +#include + +#define __SHM_PAD_AFTER_TIME 0 +#define __SHM_PAD_BEFORE_TIME (__TIMESIZE == 32) +#define __SHM_SEGSZ_AFTER_TIME 1 +#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ (__TIMESIZE == 32) \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/sigstack.h b/libc/include/powerpc64-linux-gnu/bits/sigstack.h new file mode 100644 index 0000000000..f3029e811a --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/sigstack.h @@ -0,0 +1,32 @@ +/* sigstack, sigaltstack definitions. + Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_SIGSTACK_H +#define _BITS_SIGSTACK_H 1 + +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H +# error "Never include this file directly. Use instead" +#endif + +/* Minimum stack size for a signal handler. */ +#define MINSIGSTKSZ 4096 + +/* System default stack size. */ +#define SIGSTKSZ 16384 + +#endif /* bits/sigstack.h */ \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/stat.h b/libc/include/powerpc64-linux-gnu/bits/stat.h new file mode 100644 index 0000000000..38c4d2425c --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/stat.h @@ -0,0 +1,275 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +#include + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_LINUX_OLD 1 +#define _STAT_VER_KERNEL 1 +#define _STAT_VER_SVR4 2 +#define _STAT_VER_LINUX 3 +#if __WORDSIZE == 32 +# define _STAT_VER _STAT_VER_LINUX +#else +# define _STAT_VER _STAT_VER_KERNEL +#endif + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 1 +#define _MKNOD_VER_SVR4 2 +#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ + + +#if __WORDSIZE == 32 + +struct stat + { + __dev_t st_dev; /* Device. */ +# ifndef __USE_FILE_OFFSET64 + unsigned short int __pad1; + __ino_t st_ino; /* File serial number. */ +# else + __ino64_t st_ino; /* File serial number. */ +# endif + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned short int __pad2; +# ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +# else + __off64_t st_size; /* Size of file, in bytes. */ +# endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +# ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +# else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# endif +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; + }; + + +# ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + __ino64_t st_ino; /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned short int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; + }; +# endif /* __USE_LARGEFILE64 */ + +#else /* __WORDSIZE == 32 */ + +struct stat + { + __dev_t st_dev; /* Device. */ +# ifndef __USE_FILE_OFFSET64 + __ino_t st_ino; /* File serial number. */ +# else + __ino64_t st_ino; /* File serial number. */ +# endif + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + int __pad2; + __dev_t st_rdev; /* Device number, if device. */ +# ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +# else + __off64_t st_size; /* Size of file, in bytes. */ +# endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +# ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +# else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# endif +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; + unsigned long int __glibc_reserved6; + }; + +# ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + __ino64_t st_ino; /* File serial number. */ + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + int __pad2; + __dev_t st_rdev; /* Device number, if device. */ + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; + unsigned long int __glibc_reserved6; + }; +# endif /* __USE_LARGEFILE64 */ +#endif + + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/termios-baud.h b/libc/include/powerpc64-linux-gnu/bits/termios-baud.h new file mode 100644 index 0000000000..98c3cab88c --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/termios-baud.h @@ -0,0 +1,45 @@ +/* termios baud rate selection definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#ifdef __USE_MISC +# define CBAUD 0000377 +# define CBAUDEX 0000020 +# define CMSPAR 010000000000 /* mark or space (stick) parity */ +# define CRTSCTS 020000000000 /* flow control */ +#endif + +#define B57600 00020 +#define B115200 00021 +#define B230400 00022 +#define B460800 00023 +#define B500000 00024 +#define B576000 00025 +#define B921600 00026 +#define B1000000 00027 +#define B1152000 00030 +#define B1500000 00031 +#define B2000000 00032 +#define B2500000 00033 +#define B3000000 00034 +#define B3500000 00035 +#define B4000000 00036 +#define __MAX_BAUD B4000000 \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/termios-c_cc.h b/libc/include/powerpc64-linux-gnu/bits/termios-c_cc.h new file mode 100644 index 0000000000..3b9f240258 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/termios-c_cc.h @@ -0,0 +1,41 @@ +/* termios c_cc symbolic constant definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 +#define VQUIT 1 +#define VERASE 2 +#define VKILL 3 +#define VEOF 4 +#define VMIN 5 +#define VEOL 6 +#define VTIME 7 +#define VEOL2 8 +#define VSWTC 9 + +#define VWERASE 10 +#define VREPRINT 11 +#define VSUSP 12 +#define VSTART 13 +#define VSTOP 14 +#define VLNEXT 15 +#define VDISCARD 16 \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/termios-c_cflag.h b/libc/include/powerpc64-linux-gnu/bits/termios-c_cflag.h new file mode 100644 index 0000000000..16869a7138 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/termios-c_cflag.h @@ -0,0 +1,35 @@ +/* termios control mode definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 CSIZE 00001400 +#define CS5 00000000 +#define CS6 00000400 +#define CS7 00001000 +#define CS8 00001400 + +#define CSTOPB 00002000 +#define CREAD 00004000 +#define PARENB 00010000 +#define PARODD 00020000 +#define HUPCL 00040000 + +#define CLOCAL 00100000 \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/termios-c_iflag.h b/libc/include/powerpc64-linux-gnu/bits/termios-c_iflag.h new file mode 100644 index 0000000000..b61f9af030 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/termios-c_iflag.h @@ -0,0 +1,38 @@ +/* termios input mode definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_iflag bits */ +#define IGNBRK 0000001 +#define BRKINT 0000002 +#define IGNPAR 0000004 +#define PARMRK 0000010 +#define INPCK 0000020 +#define ISTRIP 0000040 +#define INLCR 0000100 +#define IGNCR 0000200 +#define ICRNL 0000400 +#define IXON 0001000 +#define IXOFF 0002000 +#define IXANY 0004000 +#define IUCLC 0010000 +#define IMAXBEL 0020000 +#define IUTF8 0040000 \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/termios-c_lflag.h b/libc/include/powerpc64-linux-gnu/bits/termios-c_lflag.h new file mode 100644 index 0000000000..2abcbafdf5 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/termios-c_lflag.h @@ -0,0 +1,45 @@ +/* termios local mode definitions. Linux/powerpc version. + Copyright (C) 2019i Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 0x00000080 +#define ICANON 0x00000100 +#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K) +# define XCASE 0x00004000 +#endif +#define ECHO 0x00000008 +#define ECHOE 0x00000002 +#define ECHOK 0x00000004 +#define ECHONL 0x00000010 +#define NOFLSH 0x80000000 +#define TOSTOP 0x00400000 +#ifdef __USE_MISC +# define ECHOCTL 0x00000040 +# define ECHOPRT 0x00000020 +# define ECHOKE 0x00000001 +# define FLUSHO 0x00800000 +# define PENDIN 0x20000000 +#endif +#define IEXTEN 0x00000400 +#ifdef __USE_MISC +# define EXTPROC 0x10000000 +#endif \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/termios-c_oflag.h b/libc/include/powerpc64-linux-gnu/bits/termios-c_oflag.h new file mode 100644 index 0000000000..ca06aad4f7 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/termios-c_oflag.h @@ -0,0 +1,65 @@ +/* termios output mode definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_oflag bits */ +#define OPOST 0000001 +#define ONLCR 0000002 +#define OLCUC 0000004 + +#define OCRNL 0000010 +#define ONOCR 0000020 +#define ONLRET 0000040 + +#define OFILL 00000100 +#define OFDEL 00000200 +#if defined __USE_MISC || defined __USE_XOPEN +# define NLDLY 00001400 +# define NL0 00000000 +# define NL1 00000400 +# if defined __USE_MISC +# define NL2 00001000 +# define NL3 00001400 +# endif +# define TABDLY 00006000 +# define TAB0 00000000 +# define TAB1 00002000 +# define TAB2 00004000 +# define TAB3 00006000 +# define CRDLY 00030000 +# define CR0 00000000 +# define CR1 00010000 +# define CR2 00020000 +# define CR3 00030000 +# define FFDLY 00040000 +# define FF0 00000000 +# define FF1 00040000 +# define BSDLY 00100000 +# define BS0 00000000 +# define BS1 00100000 +#endif +#define VTDLY 00200000 +#define VT0 00000000 +#define VT1 00200000 + +#ifdef __USE_MISC +# define XTABS 00006000 +#endif \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/termios-misc.h b/libc/include/powerpc64-linux-gnu/bits/termios-misc.h new file mode 100644 index 0000000000..369feac2d0 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/termios-misc.h @@ -0,0 +1,72 @@ +/* termios baud platform specific definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#ifdef __USE_MISC + +struct sgttyb { + char sg_ispeed; + char sg_ospeed; + char sg_erase; + char sg_kill; + short sg_flags; +}; + +struct tchars { + char t_intrc; + char t_quitc; + char t_startc; + char t_stopc; + char t_eofc; + char t_brkc; +}; + +struct ltchars { + char t_suspc; + char t_dsuspc; + char t_rprntc; + char t_flushc; + char t_werasc; + char t_lnextc; +}; + +/* Used for packet mode */ +#define TIOCPKT_DATA 0 +#define TIOCPKT_FLUSHREAD 1 +#define TIOCPKT_FLUSHWRITE 2 +#define TIOCPKT_STOP 4 +#define TIOCPKT_START 8 +#define TIOCPKT_NOSTOP 16 +#define TIOCPKT_DOSTOP 32 + +/* c_cc characters */ +#define _VINTR 0 +#define _VQUIT 1 +#define _VERASE 2 +#define _VKILL 3 +#define _VEOF 4 +#define _VMIN 5 +#define _VEOL 6 +#define _VTIME 7 +#define _VEOL2 8 +#define _VSWTC 9 + +#endif /* __USE_MISC */ \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/bits/wordsize.h b/libc/include/powerpc64-linux-gnu/bits/wordsize.h new file mode 100644 index 0000000000..37836f9d4e --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/bits/wordsize.h @@ -0,0 +1,11 @@ +/* Determine the wordsize from the preprocessor defines. */ + +#if defined __powerpc64__ +# define __WORDSIZE 64 +# define __WORDSIZE_TIME64_COMPAT32 1 +#else +# define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 +# define __WORDSIZE32_SIZE_ULONG 0 +# define __WORDSIZE32_PTRDIFF_LONG 0 +#endif \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/fpu_control.h b/libc/include/powerpc64-linux-gnu/fpu_control.h new file mode 100644 index 0000000000..78a7a291ac --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/fpu_control.h @@ -0,0 +1,120 @@ +/* FPU control word definitions. PowerPC version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FPU_CONTROL_H +#define _FPU_CONTROL_H + +#ifdef _SOFT_FLOAT + +# define _FPU_RESERVED 0xffffffff +# define _FPU_DEFAULT 0x00000000 /* Default value. */ +typedef unsigned int fpu_control_t; +# define _FPU_GETCW(cw) (cw) = 0 +# define _FPU_SETCW(cw) (void) (cw) +extern fpu_control_t __fpu_control; + +#elif defined __NO_FPRS__ /* e500 */ + +/* rounding control */ +# define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */ +# define _FPU_RC_DOWN 0x03 +# define _FPU_RC_UP 0x02 +# define _FPU_RC_ZERO 0x01 + +/* masking of interrupts */ +# define _FPU_MASK_ZM 0x10 /* zero divide */ +# define _FPU_MASK_OM 0x04 /* overflow */ +# define _FPU_MASK_UM 0x08 /* underflow */ +# define _FPU_MASK_XM 0x40 /* inexact */ +# define _FPU_MASK_IM 0x20 /* invalid operation */ + +# define _FPU_RESERVED 0x00c10080 /* These bits are reserved and not changed. */ + +/* Correct IEEE semantics require traps to be enabled at the hardware + level; the kernel then does the emulation and determines whether + generation of signals from those traps was enabled using prctl. */ +# define _FPU_DEFAULT 0x0000003c /* Default value. */ +# define _FPU_IEEE _FPU_DEFAULT + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. */ +# define _FPU_GETCW(cw) \ + __asm__ volatile ("mfspefscr %0" : "=r" (cw)) +# define _FPU_SETCW(cw) \ + __asm__ volatile ("mtspefscr %0" : : "r" (cw)) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#else /* PowerPC 6xx floating-point. */ + +/* rounding control */ +# define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */ +# define _FPU_RC_DOWN 0x03 +# define _FPU_RC_UP 0x02 +# define _FPU_RC_ZERO 0x01 + +# define _FPU_MASK_NI 0x04 /* non-ieee mode */ + +/* masking of interrupts */ +# define _FPU_MASK_ZM 0x10 /* zero divide */ +# define _FPU_MASK_OM 0x40 /* overflow */ +# define _FPU_MASK_UM 0x20 /* underflow */ +# define _FPU_MASK_XM 0x08 /* inexact */ +# define _FPU_MASK_IM 0x80 /* invalid operation */ + +# define _FPU_RESERVED 0xffffff00 /* These bits are reserved are not changed. */ + +/* The fdlibm code requires no interrupts for exceptions. */ +# define _FPU_DEFAULT 0x00000000 /* Default value. */ + +/* IEEE: same as above, but (some) exceptions; + we leave the 'inexact' exception off. + */ +# define _FPU_IEEE 0x000000f0 + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. */ +# define _FPU_GETCW(cw) \ + ({union { double __d; unsigned long long __ll; } __u; \ + register double __fr; \ + __asm__ ("mffs %0" : "=f" (__fr)); \ + __u.__d = __fr; \ + (cw) = (fpu_control_t) __u.__ll; \ + (fpu_control_t) __u.__ll; \ + }) + +# define _FPU_SETCW(cw) \ + { union { double __d; unsigned long long __ll; } __u; \ + register double __fr; \ + __u.__ll = 0xfff80000LL << 32; /* This is a QNaN. */ \ + __u.__ll |= (cw) & 0xffffffffLL; \ + __fr = __u.__d; \ + __asm__ ("mtfsf 255,%0" : : "f" (__fr)); \ + } + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* PowerPC 6xx floating-point. */ + +#endif /* _FPU_CONTROL_H */ \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/gnu/lib-names-64-v1.h b/libc/include/powerpc64-linux-gnu/gnu/lib-names-64-v1.h new file mode 100644 index 0000000000..143f904e09 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/gnu/lib-names-64-v1.h @@ -0,0 +1,31 @@ +/* This file is automatically generated. */ +#ifndef __GNU_LIB_NAMES_H +# error "Never use directly; include instead." +#endif + +#define LD64_SO "ld64.so.1" +#define LD_SO "ld64.so.1" +#define LIBANL_SO "libanl.so.1" +#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1" +#define LIBCRYPT_SO "libcrypt.so.1" +#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_NISPLUS_SO "libnss_nisplus.so.2" +#define LIBNSS_NIS_SO "libnss_nis.so.2" +#define LIBNSS_TEST1_SO "libnss_test1.so.2" +#define LIBNSS_TEST2_SO "libnss_test2.so.2" +#define LIBPTHREAD_SO "libpthread.so.0" +#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/libc/include/powerpc64-linux-gnu/gnu/lib-names.h b/libc/include/powerpc64-linux-gnu/gnu/lib-names.h new file mode 100644 index 0000000000..a6fbab8035 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/gnu/lib-names.h @@ -0,0 +1,19 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#include + +#if __WORDSIZE == 32 +# include +#endif +#if __WORDSIZE == 64 && _CALL_ELF != 2 +# include +#endif +#if __WORDSIZE == 64 && _CALL_ELF == 2 +# include +#endif + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/gnu/stubs-64-v1.h b/libc/include/powerpc64-linux-gnu/gnu/stubs-64-v1.h new file mode 100644 index 0000000000..f5b3f7db15 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/gnu/stubs-64-v1.h @@ -0,0 +1,20 @@ +/* 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_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_gtty +#define __stub_lchmod +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/gnu/stubs.h b/libc/include/powerpc64-linux-gnu/gnu/stubs.h new file mode 100644 index 0000000000..d130565a35 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/gnu/stubs.h @@ -0,0 +1,15 @@ +/* This file is automatically generated. + This file selects the right generated file of `__stub_FUNCTION' macros + based on the architecture being compiled for. */ + +#include + +#if __WORDSIZE == 32 +# include +#endif +#if __WORDSIZE == 64 && _CALL_ELF != 2 +# include +#endif +#if __WORDSIZE == 64 && _CALL_ELF == 2 +# include +#endif \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/ieee754.h b/libc/include/powerpc64-linux-gnu/ieee754.h new file mode 100644 index 0000000000..918506bc96 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/ieee754.h @@ -0,0 +1,133 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +__BEGIN_DECLS + +union ieee754_float + { + float f; + + /* This is the IEEE 754 single-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int mantissa:23; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:23; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int quiet_nan:1; + unsigned int mantissa:22; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:22; + unsigned int quiet_nan:1; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee_nan; + }; + +#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ + + +union ieee754_double + { + double d; + + /* This is the IEEE 754 double-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:20; + unsigned int mantissa1:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:19; + unsigned int mantissa1:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ + + +/* IBM extended format for long double. + + Each long double is made up of two IEEE doubles. The value of the + long double is the sum of the values of the two parts. The most + significant part is required to be the value of the long double + rounded to the nearest double, as specified by IEEE. For Inf + values, the least significant part is required to be one of +0.0 or + -0.0. No other requirements are made; so, for example, 1.0 may be + represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a + NaN is don't-care. */ + +union ibm_extended_long_double + { + long double ld; + union ieee754_double d[2]; + }; + +__END_DECLS + +#endif /* ieee754.h */ \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/sys/ptrace.h b/libc/include/powerpc64-linux-gnu/sys/ptrace.h new file mode 100644 index 0000000000..cf05edb11d --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/sys/ptrace.h @@ -0,0 +1,253 @@ +/* `ptrace' debugger support interface. Linux/PowerPC version. + Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include +#include + +__BEGIN_DECLS + +#if defined _LINUX_PTRACE_H || defined _ASM_POWERPC_PTRACE_H +/* Do not let Linux headers macros interfere with enum __ptrace_request. */ +# undef PTRACE_ATTACH +# undef PTRACE_CONT +# undef PTRACE_DETACH +# undef PTRACE_GET_DEBUGREG +# undef PTRACE_GETEVENTMSG +# undef PTRACE_GETEVRREGS +# undef PTRACE_GETFPREGS +# undef PTRACE_GETREGS +# undef PTRACE_GETREGS64 +# undef PTRACE_GETREGSET +# undef PTRACE_GETSIGINFO +# undef PTRACE_GETSIGMASK +# undef PTRACE_GETVRREGS +# undef PTRACE_GETVSRREGS +# undef PTRACE_INTERRUPT +# undef PTRACE_KILL +# undef PTRACE_LISTEN +# undef PTRACE_PEEKDATA +# undef PTRACE_PEEKSIGINFO +# undef PTRACE_PEEKTEXT +# undef PTRACE_POKEDATA +# undef PTRACE_POKETEXT +# undef PTRACE_SECCOMP_GET_FILTER +# undef PTRACE_SECCOMP_GET_METADATA +# undef PTRACE_SEIZE +# undef PTRACE_SET_DEBUGREG +# undef PTRACE_SETEVRREGS +# undef PTRACE_SETFPREGS +# undef PTRACE_SETOPTIONS +# undef PTRACE_SETREGS +# undef PTRACE_SETREGS64 +# undef PTRACE_SETREGSET +# undef PTRACE_SETSIGINFO +# undef PTRACE_SETSIGMASK +# undef PTRACE_SETVRREGS +# undef PTRACE_SETVSRREGS +# undef PTRACE_SINGLEBLOCK +# undef PTRACE_SINGLESTEP +# undef PTRACE_SYSCALL +# undef PTRACE_TRACEME +#endif + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Get all general purpose registers used by a process. */ + PTRACE_GETREGS = 12, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a process. */ + PTRACE_SETREGS = 13, +#define PT_SETREGS PTRACE_SETREGS + + /* Get all floating point registers used by a process. */ + PTRACE_GETFPREGS = 14, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a process. */ + PTRACE_SETFPREGS = 15, +#define PT_SETFPREGS PTRACE_SETFPREGS + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Get all altivec registers used by a process. */ + PTRACE_GETVRREGS = 18, +#define PT_GETVRREGS PTRACE_GETVRREGS + + /* Set all altivec registers used by a process. */ + PTRACE_SETVRREGS = 19, +#define PT_SETVRREGS PTRACE_SETVRREGS + + /* Get all SPE registers used by a process. */ + PTRACE_GETEVRREGS = 20, +#define PT_GETEVRREGS PTRACE_GETEVRREGS + + /* Set all SPE registers used by a process. */ + PTRACE_SETEVRREGS = 21, +#define PT_SETEVRREGS PTRACE_SETEVRREGS + + /* Same as PTRACE_GETREGS except a 32-bit process will obtain + the full 64-bit registers. Implemented by 64-bit kernels only. */ + PTRACE_GETREGS64 = 22, +#define PT_GETREGS64 PTRACE_GETREGS64 + + /* Same as PTRACE_SETREGS except a 32-bit process will set + the full 64-bit registers. Implemented by 64-bit kernels only. */ + PTRACE_SETREGS64 = 23, +#define PT_SETREGS64 PTRACE_SETREGS64 + + /* Continue and stop at the next entry to or return from syscall. */ + PTRACE_SYSCALL = 24, +#define PT_SYSCALL PTRACE_SYSCALL + + /* Get a debug register of a process. */ + PTRACE_GET_DEBUGREG = 25, +#define PT_GET_DEBUGREG PTRACE_GET_DEBUGREG + + /* Set a debug register of a process. */ + PTRACE_SET_DEBUGREG = 26, +#define PT_SET_DEBUGREG PTRACE_SET_DEBUGREG + + /* Get the first 32 VSX registers of a process. */ + PTRACE_GETVSRREGS = 27, +#define PT_GETVSRREGS PTRACE_GETVSRREGS + + /* Set the first 32 VSX registers of a process. */ + PTRACE_SETVSRREGS = 28, +#define PT_SETVSRREGS PTRACE_SETVSRREGS + + /* Execute process until next taken branch. */ + PTRACE_SINGLEBLOCK = 256, +#define PT_STEPBLOCK PTRACE_SINGLEBLOCK + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + /* Retrieve siginfo_t structures without removing signals from a queue. */ + PTRACE_PEEKSIGINFO = 0x4209, +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO + + /* Get the mask of blocked signals. */ + PTRACE_GETSIGMASK = 0x420a, +#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK + + /* Change the mask of blocked signals. */ + PTRACE_SETSIGMASK = 0x420b, +#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK + + /* Get seccomp BPF filters. */ + PTRACE_SECCOMP_GET_FILTER = 0x420c, +#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER + + /* Get seccomp BPF filter metadata. */ + PTRACE_SECCOMP_GET_METADATA = 0x420d +#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA +}; + + +#include + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/sys/ucontext.h b/libc/include/powerpc64-linux-gnu/sys/ucontext.h new file mode 100644 index 0000000000..6655e12509 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/sys/ucontext.h @@ -0,0 +1,200 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include + + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + +struct __ctx(pt_regs); + +#if __WORDSIZE == 32 + +/* Number of general registers. */ +# define __NGREG 48 +# ifdef __USE_MISC +# define NGREG __NGREG +# endif + +/* Container for all general registers. */ +typedef unsigned long gregset_t[__NGREG]; + +/* Container for floating-point registers and status */ +typedef struct _libc_fpstate +{ + double __ctx(fpregs)[32]; + double __ctx(fpscr); + unsigned int _pad[2]; +} fpregset_t; + +/* Container for Altivec/VMX registers and status. + Needs to be aligned on a 16-byte boundary. */ +typedef struct _libc_vrstate +{ + unsigned int __ctx(vrregs)[32][4]; + unsigned int __ctx(vrsave); + unsigned int _pad[2]; + unsigned int __ctx(vscr); +} vrregset_t; + +/* Context to describe whole processor state. */ +typedef struct +{ + gregset_t __ctx(gregs); + fpregset_t __ctx(fpregs); + vrregset_t __ctx(vrregs) __attribute__((__aligned__(16))); +} mcontext_t; + +#else + +/* For 64-bit kernels with Altivec support, a machine context is exactly + * a sigcontext. For older kernel (without Altivec) the sigcontext matches + * the mcontext upto but not including the v_regs field. For kernels that + * don't set AT_HWCAP or return AT_HWCAP without PPC_FEATURE_HAS_ALTIVEC the + * v_regs field may not exist and should not be referenced. The v_regd field + * can be refernced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC + * is set in AT_HWCAP. */ + +/* Number of general registers. */ +# define __NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */ +# define __NFPREG 33 /* includes fp0-fp31 &fpscr. */ +# define __NVRREG 34 /* includes v0-v31, vscr, & vrsave in + split vectors */ +# ifdef __USE_MISC +# define NGREG __NGREG +# define NFPREG __NFPREG +# define NVRREG __NVRREG +# endif + +typedef unsigned long gregset_t[__NGREG]; +typedef double fpregset_t[__NFPREG]; + +/* Container for Altivec/VMX Vector Status and Control Register. Only 32-bits + but can only be copied to/from a 128-bit vector register. So we allocated + a whole quadword speedup save/restore. */ +typedef struct _libc_vscr +{ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + unsigned int __pad[3]; + unsigned int __ctx(vscr_word); +#else + unsigned int __ctx(vscr_word); + unsigned int __pad[3]; +#endif +} vscr_t; + +/* Container for Altivec/VMX registers and status. + Must to be aligned on a 16-byte boundary. */ +typedef struct _libc_vrstate +{ + unsigned int __ctx(vrregs)[32][4]; + vscr_t __ctx(vscr); + unsigned int __ctx(vrsave); + unsigned int __pad[3]; +} vrregset_t __attribute__((__aligned__(16))); + +typedef struct { + unsigned long __glibc_reserved[4]; + int __ctx(signal); + int __pad0; + unsigned long __ctx(handler); + unsigned long __ctx(oldmask); + struct __ctx(pt_regs) *__ctx(regs); + gregset_t __ctx(gp_regs); + fpregset_t __ctx(fp_regs); +/* + * To maintain compatibility with current implementations the sigcontext is + * extended by appending a pointer (v_regs) to a quadword type (elf_vrreg_t) + * followed by an unstructured (vmx_reserve) field of 69 doublewords. This + * allows the array of vector registers to be quadword aligned independent of + * the alignment of the containing sigcontext or ucontext. It is the + * responsibility of the code setting the sigcontext to set this pointer to + * either NULL (if this processor does not support the VMX feature) or the + * address of the first quadword within the allocated (vmx_reserve) area. + * + * The pointer (v_regs) of vector type (elf_vrreg_t) is essentually + * an array of 34 quadword entries. The entries with + * indexes 0-31 contain the corresponding vector registers. The entry with + * index 32 contains the vscr as the last word (offset 12) within the + * quadword. This allows the vscr to be stored as either a quadword (since + * it must be copied via a vector register to/from storage) or as a word. + * The entry with index 33 contains the vrsave as the first word (offset 0) + * within the quadword. + */ + vrregset_t *__ctx(v_regs); + long __ctx(vmx_reserve)[__NVRREG+__NVRREG+1]; +} mcontext_t; + +#endif + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long int __ctx(uc_flags); + struct ucontext_t *uc_link; + stack_t uc_stack; +#if __WORDSIZE == 32 + /* + * These fields are set up this way to maximize source and + * binary compatibility with code written for the old + * ucontext_t definition, which didn't include space for the + * registers. + * + * Different versions of the kernel have stored the registers on + * signal delivery at different offsets from the ucontext struct. + * Programs should thus use the uc_mcontext.uc_regs pointer to + * find where the registers are actually stored. The registers + * will be stored within the ucontext_t struct but not necessarily + * at a fixed address. As a side-effect, this lets us achieve + * 16-byte alignment for the register storage space if the + * Altivec registers are to be saved, without requiring 16-byte + * alignment on the whole ucontext_t. + * + * The uc_mcontext.regs field is included for source compatibility + * with programs written against the older ucontext_t definition, + * and its name should therefore not change. The uc_pad field + * is for binary compatibility with programs compiled against the + * old ucontext_t; it ensures that uc_mcontext.regs and uc_sigmask + * are at the same offset as previously. + */ + int __glibc_reserved1[7]; + union __ctx(uc_regs_ptr) { + struct __ctx(pt_regs) *__ctx(regs); + mcontext_t *__ctx(uc_regs); + } uc_mcontext; + sigset_t uc_sigmask; + /* last for extensibility */ + char __ctx(uc_reg_space)[sizeof (mcontext_t) + 12]; +#else /* 64-bit */ + sigset_t uc_sigmask; + mcontext_t uc_mcontext; /* last for extensibility */ +#endif + } ucontext_t; + +#undef __ctx + +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/include/powerpc64-linux-gnu/sys/user.h b/libc/include/powerpc64-linux-gnu/sys/user.h new file mode 100644 index 0000000000..151aa48f53 --- /dev/null +++ b/libc/include/powerpc64-linux-gnu/sys/user.h @@ -0,0 +1,40 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H + +#define _SYS_USER_H 1 +#include +#include + +#include + +struct user { + struct pt_regs regs; /* entire machine state */ + size_t u_tsize; /* text size (pages) */ + size_t u_dsize; /* data size (pages) */ + size_t u_ssize; /* stack size (pages) */ + unsigned long start_code; /* text starting address */ + unsigned long start_data; /* data starting address */ + unsigned long start_stack; /* stack starting address */ + long int signal; /* signal causing core dump */ + struct regs * u_ar0; /* help gdb find registers */ + unsigned long magic; /* identifies a core file */ + char u_comm[32]; /* user command name */ +}; + +#endif /* sys/user.h */ \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/asm/unistd.h b/libc/include/powerpc64le-linux-gnu/asm/unistd.h new file mode 100644 index 0000000000..985534d0b4 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/asm/unistd.h @@ -0,0 +1,404 @@ +/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ +/* + * This file contains the system call numbers. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ +#ifndef _UAPI_ASM_POWERPC_UNISTD_H_ +#define _UAPI_ASM_POWERPC_UNISTD_H_ + + +#define __NR_restart_syscall 0 +#define __NR_exit 1 +#define __NR_fork 2 +#define __NR_read 3 +#define __NR_write 4 +#define __NR_open 5 +#define __NR_close 6 +#define __NR_waitpid 7 +#define __NR_creat 8 +#define __NR_link 9 +#define __NR_unlink 10 +#define __NR_execve 11 +#define __NR_chdir 12 +#define __NR_time 13 +#define __NR_mknod 14 +#define __NR_chmod 15 +#define __NR_lchown 16 +#define __NR_break 17 +#define __NR_oldstat 18 +#define __NR_lseek 19 +#define __NR_getpid 20 +#define __NR_mount 21 +#define __NR_umount 22 +#define __NR_setuid 23 +#define __NR_getuid 24 +#define __NR_stime 25 +#define __NR_ptrace 26 +#define __NR_alarm 27 +#define __NR_oldfstat 28 +#define __NR_pause 29 +#define __NR_utime 30 +#define __NR_stty 31 +#define __NR_gtty 32 +#define __NR_access 33 +#define __NR_nice 34 +#define __NR_ftime 35 +#define __NR_sync 36 +#define __NR_kill 37 +#define __NR_rename 38 +#define __NR_mkdir 39 +#define __NR_rmdir 40 +#define __NR_dup 41 +#define __NR_pipe 42 +#define __NR_times 43 +#define __NR_prof 44 +#define __NR_brk 45 +#define __NR_setgid 46 +#define __NR_getgid 47 +#define __NR_signal 48 +#define __NR_geteuid 49 +#define __NR_getegid 50 +#define __NR_acct 51 +#define __NR_umount2 52 +#define __NR_lock 53 +#define __NR_ioctl 54 +#define __NR_fcntl 55 +#define __NR_mpx 56 +#define __NR_setpgid 57 +#define __NR_ulimit 58 +#define __NR_oldolduname 59 +#define __NR_umask 60 +#define __NR_chroot 61 +#define __NR_ustat 62 +#define __NR_dup2 63 +#define __NR_getppid 64 +#define __NR_getpgrp 65 +#define __NR_setsid 66 +#define __NR_sigaction 67 +#define __NR_sgetmask 68 +#define __NR_ssetmask 69 +#define __NR_setreuid 70 +#define __NR_setregid 71 +#define __NR_sigsuspend 72 +#define __NR_sigpending 73 +#define __NR_sethostname 74 +#define __NR_setrlimit 75 +#define __NR_getrlimit 76 +#define __NR_getrusage 77 +#define __NR_gettimeofday 78 +#define __NR_settimeofday 79 +#define __NR_getgroups 80 +#define __NR_setgroups 81 +#define __NR_select 82 +#define __NR_symlink 83 +#define __NR_oldlstat 84 +#define __NR_readlink 85 +#define __NR_uselib 86 +#define __NR_swapon 87 +#define __NR_reboot 88 +#define __NR_readdir 89 +#define __NR_mmap 90 +#define __NR_munmap 91 +#define __NR_truncate 92 +#define __NR_ftruncate 93 +#define __NR_fchmod 94 +#define __NR_fchown 95 +#define __NR_getpriority 96 +#define __NR_setpriority 97 +#define __NR_profil 98 +#define __NR_statfs 99 +#define __NR_fstatfs 100 +#define __NR_ioperm 101 +#define __NR_socketcall 102 +#define __NR_syslog 103 +#define __NR_setitimer 104 +#define __NR_getitimer 105 +#define __NR_stat 106 +#define __NR_lstat 107 +#define __NR_fstat 108 +#define __NR_olduname 109 +#define __NR_iopl 110 +#define __NR_vhangup 111 +#define __NR_idle 112 +#define __NR_vm86 113 +#define __NR_wait4 114 +#define __NR_swapoff 115 +#define __NR_sysinfo 116 +#define __NR_ipc 117 +#define __NR_fsync 118 +#define __NR_sigreturn 119 +#define __NR_clone 120 +#define __NR_setdomainname 121 +#define __NR_uname 122 +#define __NR_modify_ldt 123 +#define __NR_adjtimex 124 +#define __NR_mprotect 125 +#define __NR_sigprocmask 126 +#define __NR_create_module 127 +#define __NR_init_module 128 +#define __NR_delete_module 129 +#define __NR_get_kernel_syms 130 +#define __NR_quotactl 131 +#define __NR_getpgid 132 +#define __NR_fchdir 133 +#define __NR_bdflush 134 +#define __NR_sysfs 135 +#define __NR_personality 136 +#define __NR_afs_syscall 137 /* Syscall for Andrew File System */ +#define __NR_setfsuid 138 +#define __NR_setfsgid 139 +#define __NR__llseek 140 +#define __NR_getdents 141 +#define __NR__newselect 142 +#define __NR_flock 143 +#define __NR_msync 144 +#define __NR_readv 145 +#define __NR_writev 146 +#define __NR_getsid 147 +#define __NR_fdatasync 148 +#define __NR__sysctl 149 +#define __NR_mlock 150 +#define __NR_munlock 151 +#define __NR_mlockall 152 +#define __NR_munlockall 153 +#define __NR_sched_setparam 154 +#define __NR_sched_getparam 155 +#define __NR_sched_setscheduler 156 +#define __NR_sched_getscheduler 157 +#define __NR_sched_yield 158 +#define __NR_sched_get_priority_max 159 +#define __NR_sched_get_priority_min 160 +#define __NR_sched_rr_get_interval 161 +#define __NR_nanosleep 162 +#define __NR_mremap 163 +#define __NR_setresuid 164 +#define __NR_getresuid 165 +#define __NR_query_module 166 +#define __NR_poll 167 +#define __NR_nfsservctl 168 +#define __NR_setresgid 169 +#define __NR_getresgid 170 +#define __NR_prctl 171 +#define __NR_rt_sigreturn 172 +#define __NR_rt_sigaction 173 +#define __NR_rt_sigprocmask 174 +#define __NR_rt_sigpending 175 +#define __NR_rt_sigtimedwait 176 +#define __NR_rt_sigqueueinfo 177 +#define __NR_rt_sigsuspend 178 +#define __NR_pread64 179 +#define __NR_pwrite64 180 +#define __NR_chown 181 +#define __NR_getcwd 182 +#define __NR_capget 183 +#define __NR_capset 184 +#define __NR_sigaltstack 185 +#define __NR_sendfile 186 +#define __NR_getpmsg 187 /* some people actually want streams */ +#define __NR_putpmsg 188 /* some people actually want streams */ +#define __NR_vfork 189 +#define __NR_ugetrlimit 190 /* SuS compliant getrlimit */ +#define __NR_readahead 191 +#ifndef __powerpc64__ /* these are 32-bit only */ +#define __NR_mmap2 192 +#define __NR_truncate64 193 +#define __NR_ftruncate64 194 +#define __NR_stat64 195 +#define __NR_lstat64 196 +#define __NR_fstat64 197 +#endif +#define __NR_pciconfig_read 198 +#define __NR_pciconfig_write 199 +#define __NR_pciconfig_iobase 200 +#define __NR_multiplexer 201 +#define __NR_getdents64 202 +#define __NR_pivot_root 203 +#ifndef __powerpc64__ +#define __NR_fcntl64 204 +#endif +#define __NR_madvise 205 +#define __NR_mincore 206 +#define __NR_gettid 207 +#define __NR_tkill 208 +#define __NR_setxattr 209 +#define __NR_lsetxattr 210 +#define __NR_fsetxattr 211 +#define __NR_getxattr 212 +#define __NR_lgetxattr 213 +#define __NR_fgetxattr 214 +#define __NR_listxattr 215 +#define __NR_llistxattr 216 +#define __NR_flistxattr 217 +#define __NR_removexattr 218 +#define __NR_lremovexattr 219 +#define __NR_fremovexattr 220 +#define __NR_futex 221 +#define __NR_sched_setaffinity 222 +#define __NR_sched_getaffinity 223 +/* 224 currently unused */ +#define __NR_tuxcall 225 +#ifndef __powerpc64__ +#define __NR_sendfile64 226 +#endif +#define __NR_io_setup 227 +#define __NR_io_destroy 228 +#define __NR_io_getevents 229 +#define __NR_io_submit 230 +#define __NR_io_cancel 231 +#define __NR_set_tid_address 232 +#define __NR_fadvise64 233 +#define __NR_exit_group 234 +#define __NR_lookup_dcookie 235 +#define __NR_epoll_create 236 +#define __NR_epoll_ctl 237 +#define __NR_epoll_wait 238 +#define __NR_remap_file_pages 239 +#define __NR_timer_create 240 +#define __NR_timer_settime 241 +#define __NR_timer_gettime 242 +#define __NR_timer_getoverrun 243 +#define __NR_timer_delete 244 +#define __NR_clock_settime 245 +#define __NR_clock_gettime 246 +#define __NR_clock_getres 247 +#define __NR_clock_nanosleep 248 +#define __NR_swapcontext 249 +#define __NR_tgkill 250 +#define __NR_utimes 251 +#define __NR_statfs64 252 +#define __NR_fstatfs64 253 +#ifndef __powerpc64__ +#define __NR_fadvise64_64 254 +#endif +#define __NR_rtas 255 +#define __NR_sys_debug_setcontext 256 +/* Number 257 is reserved for vserver */ +#define __NR_migrate_pages 258 +#define __NR_mbind 259 +#define __NR_get_mempolicy 260 +#define __NR_set_mempolicy 261 +#define __NR_mq_open 262 +#define __NR_mq_unlink 263 +#define __NR_mq_timedsend 264 +#define __NR_mq_timedreceive 265 +#define __NR_mq_notify 266 +#define __NR_mq_getsetattr 267 +#define __NR_kexec_load 268 +#define __NR_add_key 269 +#define __NR_request_key 270 +#define __NR_keyctl 271 +#define __NR_waitid 272 +#define __NR_ioprio_set 273 +#define __NR_ioprio_get 274 +#define __NR_inotify_init 275 +#define __NR_inotify_add_watch 276 +#define __NR_inotify_rm_watch 277 +#define __NR_spu_run 278 +#define __NR_spu_create 279 +#define __NR_pselect6 280 +#define __NR_ppoll 281 +#define __NR_unshare 282 +#define __NR_splice 283 +#define __NR_tee 284 +#define __NR_vmsplice 285 +#define __NR_openat 286 +#define __NR_mkdirat 287 +#define __NR_mknodat 288 +#define __NR_fchownat 289 +#define __NR_futimesat 290 +#ifdef __powerpc64__ +#define __NR_newfstatat 291 +#else +#define __NR_fstatat64 291 +#endif +#define __NR_unlinkat 292 +#define __NR_renameat 293 +#define __NR_linkat 294 +#define __NR_symlinkat 295 +#define __NR_readlinkat 296 +#define __NR_fchmodat 297 +#define __NR_faccessat 298 +#define __NR_get_robust_list 299 +#define __NR_set_robust_list 300 +#define __NR_move_pages 301 +#define __NR_getcpu 302 +#define __NR_epoll_pwait 303 +#define __NR_utimensat 304 +#define __NR_signalfd 305 +#define __NR_timerfd_create 306 +#define __NR_eventfd 307 +#define __NR_sync_file_range2 308 +#define __NR_fallocate 309 +#define __NR_subpage_prot 310 +#define __NR_timerfd_settime 311 +#define __NR_timerfd_gettime 312 +#define __NR_signalfd4 313 +#define __NR_eventfd2 314 +#define __NR_epoll_create1 315 +#define __NR_dup3 316 +#define __NR_pipe2 317 +#define __NR_inotify_init1 318 +#define __NR_perf_event_open 319 +#define __NR_preadv 320 +#define __NR_pwritev 321 +#define __NR_rt_tgsigqueueinfo 322 +#define __NR_fanotify_init 323 +#define __NR_fanotify_mark 324 +#define __NR_prlimit64 325 +#define __NR_socket 326 +#define __NR_bind 327 +#define __NR_connect 328 +#define __NR_listen 329 +#define __NR_accept 330 +#define __NR_getsockname 331 +#define __NR_getpeername 332 +#define __NR_socketpair 333 +#define __NR_send 334 +#define __NR_sendto 335 +#define __NR_recv 336 +#define __NR_recvfrom 337 +#define __NR_shutdown 338 +#define __NR_setsockopt 339 +#define __NR_getsockopt 340 +#define __NR_sendmsg 341 +#define __NR_recvmsg 342 +#define __NR_recvmmsg 343 +#define __NR_accept4 344 +#define __NR_name_to_handle_at 345 +#define __NR_open_by_handle_at 346 +#define __NR_clock_adjtime 347 +#define __NR_syncfs 348 +#define __NR_sendmmsg 349 +#define __NR_setns 350 +#define __NR_process_vm_readv 351 +#define __NR_process_vm_writev 352 +#define __NR_finit_module 353 +#define __NR_kcmp 354 +#define __NR_sched_setattr 355 +#define __NR_sched_getattr 356 +#define __NR_renameat2 357 +#define __NR_seccomp 358 +#define __NR_getrandom 359 +#define __NR_memfd_create 360 +#define __NR_bpf 361 +#define __NR_execveat 362 +#define __NR_switch_endian 363 +#define __NR_userfaultfd 364 +#define __NR_membarrier 365 +#define __NR_mlock2 378 +#define __NR_copy_file_range 379 +#define __NR_preadv2 380 +#define __NR_pwritev2 381 +#define __NR_kexec_file_load 382 +#define __NR_statx 383 +#define __NR_pkey_alloc 384 +#define __NR_pkey_free 385 +#define __NR_pkey_mprotect 386 +#define __NR_rseq 387 +#define __NR_io_pgetevents 388 + +#endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */ diff --git a/libc/include/powerpc64le-linux-gnu/bits/endian.h b/libc/include/powerpc64le-linux-gnu/bits/endian.h new file mode 100644 index 0000000000..f643beb3b5 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/endian.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* PowerPC can be little or big endian. Hopefully gcc will know... */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN +# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN +# error Both BIG_ENDIAN and LITTLE_ENDIAN defined! +# endif +# define __BYTE_ORDER __BIG_ENDIAN +#else +# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN +# define __BYTE_ORDER __LITTLE_ENDIAN +# else +# warning Cannot determine current byte order, assuming big-endian. +# define __BYTE_ORDER __BIG_ENDIAN +# endif +#endif \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/environments.h b/libc/include/powerpc64le-linux-gnu/bits/environments.h new file mode 100644 index 0000000000..2e1c0bc1de --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/environments.h @@ -0,0 +1,96 @@ +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _UNISTD_H +# error "Never include this file directly. Use instead" +#endif + +#include + +/* This header should define the following symbols under the described + situations. A value `1' means that the model is always supported, + `-1' means it is never supported. Undefined means it cannot be + statically decided. + + _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type + _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type + + _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type + _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type + + The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, + _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, + _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were + used in previous versions of the Unix standard and are available + only for compatibility. +*/ + +#if __WORDSIZE == 64 + +/* Environments with 32-bit wide pointers are optionally provided. + Therefore following macros aren't defined: + # undef _POSIX_V7_ILP32_OFF32 + # undef _POSIX_V7_ILP32_OFFBIG + # undef _POSIX_V6_ILP32_OFF32 + # undef _POSIX_V6_ILP32_OFFBIG + # undef _XBS5_ILP32_OFF32 + # undef _XBS5_ILP32_OFFBIG + and users need to check at runtime. */ + +/* We also have no use (for now) for an environment with bigger pointers + and offsets. */ +# define _POSIX_V7_LPBIG_OFFBIG -1 +# define _POSIX_V6_LPBIG_OFFBIG -1 +# define _XBS5_LPBIG_OFFBIG -1 + +/* By default we have 64-bit wide `long int', pointers and `off_t'. */ +# define _POSIX_V7_LP64_OFF64 1 +# define _POSIX_V6_LP64_OFF64 1 +# define _XBS5_LP64_OFF64 1 + +#else /* __WORDSIZE == 32 */ + +/* By default we have 32-bit wide `int', `long int', pointers and `off_t' + and all platforms support LFS. */ +# define _POSIX_V7_ILP32_OFF32 1 +# define _POSIX_V7_ILP32_OFFBIG 1 +# define _POSIX_V6_ILP32_OFF32 1 +# define _POSIX_V6_ILP32_OFFBIG 1 +# define _XBS5_ILP32_OFF32 1 +# define _XBS5_ILP32_OFFBIG 1 + +/* We optionally provide an environment with the above size but an 64-bit + side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ + +/* Environments with 64-bit wide pointers can be provided, + so these macros aren't defined: + # undef _POSIX_V7_LP64_OFF64 + # undef _POSIX_V7_LPBIG_OFFBIG + # undef _POSIX_V6_LP64_OFF64 + # undef _POSIX_V6_LPBIG_OFFBIG + # undef _XBS5_LP64_OFF64 + # undef _XBS5_LPBIG_OFFBIG + and sysconf tests for it at runtime. */ + +#endif /* __WORDSIZE == 32 */ + +#define __ILP32_OFF32_CFLAGS "-m32" +#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +#define __ILP32_OFF32_LDFLAGS "-m32" +#define __ILP32_OFFBIG_LDFLAGS "-m32" +#define __LP64_OFF64_CFLAGS "-m64" +#define __LP64_OFF64_LDFLAGS "-m64" \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/fcntl.h b/libc/include/powerpc64le-linux-gnu/bits/fcntl.h new file mode 100644 index 0000000000..e344ed65a4 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/fcntl.h @@ -0,0 +1,62 @@ +/* O_*, F_*, FD_* bit values for Linux/PowerPC. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#include + +#define __O_DIRECTORY 040000 /* Must be a directory. */ +#define __O_NOFOLLOW 0100000 /* Do not follow links. */ +#define __O_DIRECT 0400000 /* Direct disk access. */ + +#if __WORDSIZE == 64 +/* Not necessary, files are always with 64bit off_t. */ +# define __O_LARGEFILE 0 +#else +# define __O_LARGEFILE 0200000 +#endif + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/fenv.h b/libc/include/powerpc64le-linux-gnu/bits/fenv.h new file mode 100644 index 0000000000..f59c2a5809 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/fenv.h @@ -0,0 +1,180 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + + +/* Define bits representing the exception. We use the bit positions of + the appropriate bits in the FPSCR... */ +enum + { + FE_INEXACT = +#define FE_INEXACT (1 << (31 - 6)) + FE_INEXACT, + FE_DIVBYZERO = +#define FE_DIVBYZERO (1 << (31 - 5)) + FE_DIVBYZERO, + FE_UNDERFLOW = +#define FE_UNDERFLOW (1 << (31 - 4)) + FE_UNDERFLOW, + FE_OVERFLOW = +#define FE_OVERFLOW (1 << (31 - 3)) + FE_OVERFLOW, + + /* ... except for FE_INVALID, for which we use bit 31. FE_INVALID + actually corresponds to bits 7 through 12 and 21 through 23 + in the FPSCR, but we can't use that because the current draft + says that it must be a power of 2. Instead we use bit 2 which + is the summary bit for all the FE_INVALID exceptions, which + kind of makes sense. */ + FE_INVALID = +#define FE_INVALID (1 << (31 - 2)) + FE_INVALID, + +#ifdef __USE_GNU + /* Breakdown of the FE_INVALID bits. Setting FE_INVALID on an + input to a routine is equivalent to setting all of these bits; + FE_INVALID will be set on output from a routine iff one of + these bits is set. Note, though, that you can't disable or + enable these exceptions individually. */ + + /* Operation with a sNaN. */ + FE_INVALID_SNAN = +# define FE_INVALID_SNAN (1 << (31 - 7)) + FE_INVALID_SNAN, + + /* Inf - Inf */ + FE_INVALID_ISI = +# define FE_INVALID_ISI (1 << (31 - 8)) + FE_INVALID_ISI, + + /* Inf / Inf */ + FE_INVALID_IDI = +# define FE_INVALID_IDI (1 << (31 - 9)) + FE_INVALID_IDI, + + /* 0 / 0 */ + FE_INVALID_ZDZ = +# define FE_INVALID_ZDZ (1 << (31 - 10)) + FE_INVALID_ZDZ, + + /* Inf * 0 */ + FE_INVALID_IMZ = +# define FE_INVALID_IMZ (1 << (31 - 11)) + FE_INVALID_IMZ, + + /* Comparison with a NaN. */ + FE_INVALID_COMPARE = +# define FE_INVALID_COMPARE (1 << (31 - 12)) + FE_INVALID_COMPARE, + + /* Invalid operation flag for software (not set by hardware). */ + /* Note that some chips don't have this implemented, presumably + because no-one expected anyone to write software for them %-). */ + FE_INVALID_SOFTWARE = +# define FE_INVALID_SOFTWARE (1 << (31 - 21)) + FE_INVALID_SOFTWARE, + + /* Square root of negative number (including -Inf). */ + /* Note that some chips don't have this implemented. */ + FE_INVALID_SQRT = +# define FE_INVALID_SQRT (1 << (31 - 22)) + FE_INVALID_SQRT, + + /* Conversion-to-integer of a NaN or a number too large or too small. */ + FE_INVALID_INTEGER_CONVERSION = +# define FE_INVALID_INTEGER_CONVERSION (1 << (31 - 23)) + FE_INVALID_INTEGER_CONVERSION + +# define FE_ALL_INVALID \ + (FE_INVALID_SNAN | FE_INVALID_ISI | FE_INVALID_IDI | FE_INVALID_ZDZ \ + | FE_INVALID_IMZ | FE_INVALID_COMPARE | FE_INVALID_SOFTWARE \ + | FE_INVALID_SQRT | FE_INVALID_INTEGER_CONVERSION) +#endif + }; + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +/* PowerPC chips support all of the four defined rounding modes. We + use the bit pattern in the FPSCR as the values for the + appropriate macros. */ +enum + { + FE_TONEAREST = +#define FE_TONEAREST 0 + FE_TONEAREST, + FE_TOWARDZERO = +#define FE_TOWARDZERO 1 + FE_TOWARDZERO, + FE_UPWARD = +#define FE_UPWARD 2 + FE_UPWARD, + FE_DOWNWARD = +#define FE_DOWNWARD 3 + FE_DOWNWARD + }; + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; + +/* Type representing floating-point environment. We leave it as 'double' + for efficiency reasons (rather than writing it to a 32-bit integer). */ +typedef double fenv_t; + +/* If the default argument is used we use this value. */ +extern const fenv_t __fe_dfl_env; +#define FE_DFL_ENV (&__fe_dfl_env) + +#ifdef __USE_GNU +/* Floating-point environment where all exceptions are enabled. Note that + this is not sufficient to give you SIGFPE. */ +extern const fenv_t __fe_enabled_env; +# define FE_ENABLED_ENV (&__fe_enabled_env) + +/* Floating-point environment with (processor-dependent) non-IEEE floating + point. */ +extern const fenv_t __fe_nonieee_env; +# define FE_NONIEEE_ENV (&__fe_nonieee_env) + +/* Floating-point environment with all exceptions enabled. Note that + just evaluating this value does not change the processor exception mode. + Passing this mask to fesetenv will result in a prctl syscall to change + the MSR FE0/FE1 bits to "Precise Mode". On some processors this will + result in slower floating point execution. This will last until an + fenv or exception mask is installed that disables all FP exceptions. */ +# define FE_NOMASK_ENV FE_ENABLED_ENV + +/* Floating-point environment with all exceptions disabled. Note that + just evaluating this value does not change the processor exception mode. + Passing this mask to fesetenv will result in a prctl syscall to change + the MSR FE0/FE1 bits to "Ignore Exceptions Mode". On most processors + this allows the fastest possible floating point execution.*/ +# define FE_MASK_ENV FE_DFL_ENV + +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef double femode_t; + +/* Default floating-point control modes. */ +extern const femode_t __fe_dfl_mode; +# define FE_DFL_MODE (&__fe_dfl_mode) +#endif \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/fenvinline.h b/libc/include/powerpc64le-linux-gnu/bits/fenvinline.h new file mode 100644 index 0000000000..1552e48c7a --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/fenvinline.h @@ -0,0 +1,79 @@ +/* Inline floating-point environment handling functions for powerpc. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__ + +/* Inline definition for fegetround. */ +# define __fegetround() \ + (__extension__ ({ int __fegetround_result; \ + __asm__ __volatile__ \ + ("mcrfs 7,7 ; mfcr %0" \ + : "=r"(__fegetround_result) : : "cr7"); \ + __fegetround_result & 3; })) +# define fegetround() __fegetround () + +# ifndef __NO_MATH_INLINES +/* The weird 'i#*X' constraints on the following suppress a gcc + warning when __excepts is not a constant. Otherwise, they mean the + same as just plain 'i'. */ + +# if __GNUC_PREREQ(3, 4) + +/* Inline definition for feraiseexcept. */ +# define feraiseexcept(__excepts) \ + (__extension__ ({ \ + int __e = __excepts; \ + int __ret; \ + if (__builtin_constant_p (__e) \ + && (__e & (__e - 1)) == 0 \ + && __e != FE_INVALID) \ + { \ + if (__e != 0) \ + __asm__ __volatile__ ("mtfsb1 %0" \ + : : "i#*X" (__builtin_clz (__e))); \ + __ret = 0; \ + } \ + else \ + __ret = feraiseexcept (__e); \ + __ret; \ + })) + +/* Inline definition for feclearexcept. */ +# define feclearexcept(__excepts) \ + (__extension__ ({ \ + int __e = __excepts; \ + int __ret; \ + if (__builtin_constant_p (__e) \ + && (__e & (__e - 1)) == 0 \ + && __e != FE_INVALID) \ + { \ + if (__e != 0) \ + __asm__ __volatile__ ("mtfsb0 %0" \ + : : "i#*X" (__builtin_clz (__e))); \ + __ret = 0; \ + } \ + else \ + __ret = feclearexcept (__e); \ + __ret; \ + })) + +# endif /* __GNUC_PREREQ(3, 4). */ + +# endif /* !__NO_MATH_INLINES. */ + +#endif /* __GNUC__ && !_SOFT_FLOAT && !__NO_FPRS__ */ \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/floatn.h b/libc/include/powerpc64le-linux-gnu/bits/floatn.h new file mode 100644 index 0000000000..2514b6300e --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/floatn.h @@ -0,0 +1,122 @@ +/* Macros to control TS 18661-3 glibc features on powerpc. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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. */ +#if defined _ARCH_PWR8 && defined __LITTLE_ENDIAN__ && (_CALL_ELF == 2) \ + && defined __FLOAT128__ && !defined __NO_LONG_DOUBLE_MATH +# define __HAVE_FLOAT128 1 +#else +# 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, i.e. + calls to the binary128 functions go to *f128 symbols instead of *l. */ +#if __HAVE_FLOAT128 +# define __HAVE_DISTINCT_FLOAT128 1 +#else +# define __HAVE_DISTINCT_FLOAT128 0 +#endif + +/* Defined to 1 if the current compiler invocation provides a + floating-point type with the right format for _Float64x, and this + 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 0 + +#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) exist for powerpc only since GCC 7.0. */ +# if __LDBL_MANT_DIG__ == 113 +# define __f128(x) x##l +# else +# define __f128(x) x##q +# endif +# else +# define __f128(x) x##f128 +# endif +# endif + +/* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ +# if __HAVE_FLOAT128 +# if __LDBL_MANT_DIG__ == 113 && defined __cplusplus +typedef long double _Float128; +# define __CFLOAT128 _Complex long double +# elif !__GNUC_PREREQ (7, 0) || defined __cplusplus +/* The type _Float128 exist for powerpc only since GCC 7.0. */ +typedef __float128 _Float128; +/* Add a typedef for older GCC and C++ compilers which don't natively support + _Complex _Float128. */ +typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__KC__))); +# define __CFLOAT128 __cfloat128 +# else +# define __CFLOAT128 _Complex _Float128 +# endif +# endif + +/* The remaining of this file provides support for older compilers. */ +# if __HAVE_FLOAT128 +/* Builtin __builtin_huge_valf128 doesn't exist before GCC 7.0. */ +# if !__GNUC_PREREQ (7, 0) +# define __builtin_huge_valf128() ((_Float128) __builtin_huge_val ()) +# endif + +/* The following builtins (suffixed with 'q') are available in GCC >= 6.2, + which is the minimum version required for float128 support on powerpc64le. + Since GCC 7.0 the builtins suffixed with f128 are also available, then + there is no need to redefined them. */ +# if !__GNUC_PREREQ (7, 0) +# define __builtin_copysignf128 __builtin_copysignq +# define __builtin_fabsf128 __builtin_fabsq +# define __builtin_inff128 __builtin_infq +# define __builtin_nanf128 __builtin_nanq +# define __builtin_nansf128 __builtin_nansq +# endif + +/* In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*, + e.g.: __builtin_signbitf128, before GCC 6. However, there has never + been a __builtin_signbitf128 in GCC and the type-generic builtin is + only available since GCC 6. */ +# if !__GNUC_PREREQ (6, 0) +# define __builtin_signbitf128 __signbitf128 +# endif + +# endif + +#endif /* !__ASSEMBLER__. */ + +#include + +#endif /* _BITS_FLOATN_H */ \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/fp-fast.h b/libc/include/powerpc64le-linux-gnu/bits/fp-fast.h new file mode 100644 index 0000000000..09e055f11e --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/fp-fast.h @@ -0,0 +1,39 @@ +/* Define FP_FAST_* macros. PowerPC version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +#ifdef __USE_ISOC99 + +/* The GCC 4.6 compiler will define __FP_FAST_FMA{,F,L} if the fma{,f,l} + builtins are supported. */ +# if (!defined _SOFT_FLOAT && !defined __NO_FPRS__) || defined __FP_FAST_FMA +# define FP_FAST_FMA 1 +# endif + +# if (!defined _SOFT_FLOAT && !defined __NO_FPRS__) || defined __FP_FAST_FMAF +# define FP_FAST_FMAF 1 +# endif + +# ifdef __FP_FAST_FMAL +# define FP_FAST_FMAL 1 +# endif + +#endif \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/hwcap.h b/libc/include/powerpc64le-linux-gnu/bits/hwcap.h new file mode 100644 index 0000000000..0d72f34418 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/hwcap.h @@ -0,0 +1,76 @@ +/* Defines for bits in AT_HWCAP and AT_HWCAP2. + Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H) +# error "Never include directly; use instead." +#endif + +/* The bit numbers must match those in the kernel's asm/cputable.h. */ + +/* Feature definitions in AT_HWCAP. */ +#define PPC_FEATURE_32 0x80000000 /* 32-bit mode. */ +#define PPC_FEATURE_64 0x40000000 /* 64-bit mode. */ +#define PPC_FEATURE_601_INSTR 0x20000000 /* 601 chip, Old POWER ISA. */ +#define PPC_FEATURE_HAS_ALTIVEC 0x10000000 /* SIMD/Vector Unit. */ +#define PPC_FEATURE_HAS_FPU 0x08000000 /* Floating Point Unit. */ +#define PPC_FEATURE_HAS_MMU 0x04000000 /* Memory Management Unit. */ +#define PPC_FEATURE_HAS_4xxMAC 0x02000000 /* 4xx Multiply Accumulator. */ +#define PPC_FEATURE_UNIFIED_CACHE 0x01000000 /* Unified I/D cache. */ +#define PPC_FEATURE_HAS_SPE 0x00800000 /* Signal Processing ext. */ +#define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 /* SPE Float. */ +#define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 /* SPE Double. */ +#define PPC_FEATURE_NO_TB 0x00100000 /* 601/403gx have no timebase */ +#define PPC_FEATURE_POWER4 0x00080000 /* POWER4 ISA 2.00 */ +#define PPC_FEATURE_POWER5 0x00040000 /* POWER5 ISA 2.02 */ +#define PPC_FEATURE_POWER5_PLUS 0x00020000 /* POWER5+ ISA 2.03 */ +#define PPC_FEATURE_CELL_BE 0x00010000 /* CELL Broadband Engine */ +#define PPC_FEATURE_BOOKE 0x00008000 /* ISA Category Embedded */ +#define PPC_FEATURE_SMT 0x00004000 /* Simultaneous + Multi-Threading */ +#define PPC_FEATURE_ICACHE_SNOOP 0x00002000 +#define PPC_FEATURE_ARCH_2_05 0x00001000 /* ISA 2.05 */ +#define PPC_FEATURE_PA6T 0x00000800 /* PA Semi 6T Core */ +#define PPC_FEATURE_HAS_DFP 0x00000400 /* Decimal FP Unit */ +#define PPC_FEATURE_POWER6_EXT 0x00000200 /* P6 + mffgpr/mftgpr */ +#define PPC_FEATURE_ARCH_2_06 0x00000100 /* ISA 2.06 */ +#define PPC_FEATURE_HAS_VSX 0x00000080 /* P7 Vector Extension. */ +#define PPC_FEATURE_PSERIES_PERFMON_COMPAT 0x00000040 +/* Reserved by the kernel. 0x00000004 Do not use. */ +#define PPC_FEATURE_TRUE_LE 0x00000002 +#define PPC_FEATURE_PPC_LE 0x00000001 + +/* Feature definitions in AT_HWCAP2. */ +#define PPC_FEATURE2_ARCH_2_07 0x80000000 /* ISA 2.07 */ +#define PPC_FEATURE2_HAS_HTM 0x40000000 /* Hardware Transactional + Memory */ +#define PPC_FEATURE2_HAS_DSCR 0x20000000 /* Data Stream Control + Register */ +#define PPC_FEATURE2_HAS_EBB 0x10000000 /* Event Base Branching */ +#define PPC_FEATURE2_HAS_ISEL 0x08000000 /* Integer Select */ +#define PPC_FEATURE2_HAS_TAR 0x04000000 /* Target Address Register */ +#define PPC_FEATURE2_HAS_VEC_CRYPTO 0x02000000 /* Target supports vector + instruction. */ +#define PPC_FEATURE2_HTM_NOSC 0x01000000 /* Kernel aborts transaction + when a syscall is made. */ +#define PPC_FEATURE2_ARCH_3_00 0x00800000 /* ISA 3.0 */ +#define PPC_FEATURE2_HAS_IEEE128 0x00400000 /* VSX IEEE Binary Float + 128-bit */ +#define PPC_FEATURE2_DARN 0x00200000 /* darn instruction. */ +#define PPC_FEATURE2_SCV 0x00100000 /* scv syscall. */ +#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM without suspended + state. */ \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/ioctl-types.h b/libc/include/powerpc64le-linux-gnu/bits/ioctl-types.h new file mode 100644 index 0000000000..f2b9931899 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/ioctl-types.h @@ -0,0 +1,77 @@ +/* Structure types for pre-termios terminal ioctls. Linux/powerpc version. + Copyright (C) 2014-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 10 +struct termio + { + unsigned short int c_iflag; /* input mode flags */ + unsigned short int c_oflag; /* output mode flags */ + unsigned short int c_cflag; /* control mode flags */ + unsigned short int c_lflag; /* local mode flags */ + unsigned char c_line; /* line discipline */ + unsigned char c_cc[NCC]; /* control characters */ +}; + +/* modem lines */ +#define TIOCM_LE 0x001 +#define TIOCM_DTR 0x002 +#define TIOCM_RTS 0x004 +#define TIOCM_ST 0x008 +#define TIOCM_SR 0x010 +#define TIOCM_CTS 0x020 +#define TIOCM_CAR 0x040 +#define TIOCM_RNG 0x080 +#define TIOCM_DSR 0x100 +#define TIOCM_CD TIOCM_CAR +#define TIOCM_RI TIOCM_RNG + +/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ + +/* line disciplines */ +#define N_TTY 0 +#define N_SLIP 1 +#define N_MOUSE 2 +#define N_PPP 3 +#define N_STRIP 4 +#define N_AX25 5 +#define N_X25 6 /* X.25 async */ +#define N_6PACK 7 +#define N_MASC 8 /* Mobitex module */ +#define N_R3964 9 /* Simatic R3964 module */ +#define N_PROFIBUS_FDL 10 /* Profibus */ +#define N_IRDA 11 /* Linux IR */ +#define N_SMSBLOCK 12 /* SMS block mode */ +#define N_HDLC 13 /* synchronous HDLC */ +#define N_SYNC_PPP 14 /* synchronous PPP */ +#define N_HCI 15 /* Bluetooth HCI UART */ \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/ipc.h b/libc/include/powerpc64le-linux-gnu/bits/ipc.h new file mode 100644 index 0000000000..7b0f55f7ab --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/ipc.h @@ -0,0 +1,54 @@ +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IPC_H +# error "Never use directly; include instead." +#endif + +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#ifdef __USE_GNU +# define IPC_INFO 3 /* See ipcs. */ +#endif + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + __uid_t uid; /* Owner's user ID. */ + __gid_t gid; /* Owner's group ID. */ + __uid_t cuid; /* Creator's user ID. */ + __gid_t cgid; /* Creator's group ID. */ + __mode_t mode; /* Read/write permission. */ + __uint32_t __seq; /* Sequence number. */ + __uint32_t __pad1; + __uint64_t __glibc_reserved1; + __uint64_t __glibc_reserved2; + }; \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/iscanonical.h b/libc/include/powerpc64le-linux-gnu/bits/iscanonical.h new file mode 100644 index 0000000000..108d77b411 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/iscanonical.h @@ -0,0 +1,58 @@ +/* Define iscanonical macro. ldbl-128ibm version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +#ifdef __NO_LONG_DOUBLE_MATH +# define iscanonical(x) ((void) (__typeof (x)) (x), 1) +#else +extern int __iscanonicall (long double __x) + __THROW __attribute__ ((__const__)); +# define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1) +# define __iscanonical(x) ((void) (__typeof (x)) (x), 1) +# if __HAVE_DISTINCT_FLOAT128 +# define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1) +# endif + +/* Return nonzero value if X is canonical. In IEEE interchange binary + formats, all values are canonical, but the argument must still be + converted to its semantic type for any exceptions arising from the + conversion, before being discarded; in IBM long double, there are + encodings that are not consistently handled as corresponding to any + particular value of the type, and we return 0 for those. */ +# ifndef __cplusplus +# define iscanonical(x) __MATH_TG ((x), __iscanonical, (x)) +# else +/* In C++ mode, __MATH_TG cannot be used, because it relies on + __builtin_types_compatible_p, which is a C-only builtin. On the + other hand, overloading provides the means to distinguish between + the floating-point types. The overloading resolution will match + the correct parameter (regardless of type qualifiers (i.e.: const + and volatile)). */ +extern "C++" { +inline int iscanonical (float __val) { return __iscanonicalf (__val); } +inline int iscanonical (double __val) { return __iscanonical (__val); } +inline int iscanonical (long double __val) { return __iscanonicall (__val); } +# if __HAVE_DISTINCT_FLOAT128 +inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); } +# endif +} +# endif /* __cplusplus */ +#endif /* __NO_LONG_DOUBLE_MATH */ \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/link.h b/libc/include/powerpc64le-linux-gnu/bits/link.h new file mode 100644 index 0000000000..ca46d5a01b --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/link.h @@ -0,0 +1,156 @@ +/* Machine-specific declarations for dynamic linker interface. PowerPC version + Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + + +#if __ELF_NATIVE_CLASS == 32 + +/* Registers for entry into PLT on PPC32. */ +typedef struct La_ppc32_regs +{ + uint32_t lr_reg[8]; + double lr_fp[8]; + uint32_t lr_vreg[12][4]; + uint32_t lr_r1; + uint32_t lr_lr; +} La_ppc32_regs; + +/* Return values for calls from PLT on PPC32. */ +typedef struct La_ppc32_retval +{ + uint32_t lrv_r3; + uint32_t lrv_r4; + double lrv_fp[8]; + uint32_t lrv_v2[4]; +} La_ppc32_retval; + + +__BEGIN_DECLS + +extern Elf32_Addr la_ppc32_gnu_pltenter (Elf32_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_ppc32_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_ppc32_gnu_pltexit (Elf32_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_ppc32_regs *__inregs, + La_ppc32_retval *__outregs, + const char *__symname); + +__END_DECLS + +#elif __ELF_NATIVE_CLASS == 64 +# if _CALL_ELF != 2 + +/* Registers for entry into PLT on PPC64. */ +typedef struct La_ppc64_regs +{ + uint64_t lr_reg[8]; + double lr_fp[13]; + uint32_t __padding; + uint32_t lr_vrsave; + uint32_t lr_vreg[12][4]; + uint64_t lr_r1; + uint64_t lr_lr; +} La_ppc64_regs; + +/* Return values for calls from PLT on PPC64. */ +typedef struct La_ppc64_retval +{ + uint64_t lrv_r3; + uint64_t lrv_r4; + double lrv_fp[4]; /* f1-f4, float - complex long double. */ + uint32_t lrv_v2[4]; /* v2. */ +} La_ppc64_retval; + + +__BEGIN_DECLS + +extern Elf64_Addr la_ppc64_gnu_pltenter (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_ppc64_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_ppc64_gnu_pltexit (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_ppc64_regs *__inregs, + La_ppc64_retval *__outregs, + const char *__symname); + +__END_DECLS + +# else + +/* Registers for entry into PLT on PPC64 in the ELFv2 ABI. */ +typedef struct La_ppc64v2_regs +{ + uint64_t lr_reg[8]; + double lr_fp[13]; + uint32_t __padding; + uint32_t lr_vrsave; + uint32_t lr_vreg[12][4] __attribute__ ((aligned (16))); + uint64_t lr_r1; + uint64_t lr_lr; +} La_ppc64v2_regs; + +/* Return values for calls from PLT on PPC64 in the ELFv2 ABI. */ +typedef struct La_ppc64v2_retval +{ + uint64_t lrv_r3; + uint64_t lrv_r4; + double lrv_fp[10]; + uint32_t lrv_vreg[8][4] __attribute__ ((aligned (16))); +} La_ppc64v2_retval; + + +__BEGIN_DECLS + +extern Elf64_Addr la_ppc64v2_gnu_pltenter (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_ppc64v2_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_ppc64v2_gnu_pltexit (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_ppc64v2_regs *__inregs, + La_ppc64v2_retval *__outregs, + const char *__symname); + +__END_DECLS + +# endif +#endif \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/local_lim.h b/libc/include/powerpc64le-linux-gnu/bits/local_lim.h new file mode 100644 index 0000000000..65261d42b3 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/local_lim.h @@ -0,0 +1,100 @@ +/* Minimum guaranteed maximum values for system limits. Linux/PPC version. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. At least two pages for systems with 64k + pages. */ +#define PTHREAD_STACK_MIN 131072 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/long-double.h b/libc/include/powerpc64le-linux-gnu/bits/long-double.h new file mode 100644 index 0000000000..9fe5a6c570 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/long-double.h @@ -0,0 +1,24 @@ +/* Properties of long double type. ldbl-opt version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef __NO_LONG_DOUBLE_MATH +# define __LONG_DOUBLE_MATH_OPTIONAL 1 +# ifndef __LONG_DOUBLE_128__ +# define __NO_LONG_DOUBLE_MATH 1 +# endif +#endif \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/mman.h b/libc/include/powerpc64le-linux-gnu/bits/mman.h new file mode 100644 index 0000000000..9e80948561 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/mman.h @@ -0,0 +1,51 @@ +/* Definitions for POSIX memory map interface. Linux/PowerPC version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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. */ + +#define PROT_SAO 0x10 /* Strong Access Ordering. */ + +/* These are Linux-specific. */ +#ifdef __USE_MISC +# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ +# define MAP_DENYWRITE 0x00800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ +# define MAP_LOCKED 0x00080 /* Lock the mapping. */ +# define MAP_NORESERVE 0x00040 /* Don't check for reservations. */ +# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ +# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +# define MAP_STACK 0x20000 /* Allocation is for a stack. */ +# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ +# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap + underlying mapping. */ +#endif + +/* Flags for `mlockall'. */ +#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 0x4000 /* Lock all additions to address + space. */ +#define MCL_ONFAULT 0x8000 /* Lock all pages that are + faulted in. */ + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/msq-pad.h b/libc/include/powerpc64le-linux-gnu/bits/msq-pad.h new file mode 100644 index 0000000000..d697bc4d06 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/msq-pad.h @@ -0,0 +1,26 @@ +/* Define where padding goes in struct msqid_ds. PowerPC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include + +#define __MSQ_PAD_AFTER_TIME 0 +#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/procfs.h b/libc/include/powerpc64le-linux-gnu/bits/procfs.h new file mode 100644 index 0000000000..793fa8944a --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/procfs.h @@ -0,0 +1,49 @@ +/* Types for registers for sys/procfs.h. PowerPC version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +#include +#include + +/* These definitions are normally provided by ucontext.h via + asm/sigcontext.h, asm/ptrace.h, and asm/elf.h. Otherwise we define + them here. */ +#if !defined __PPC64_ELF_H && !defined _ASM_POWERPC_ELF_H +#define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ +#define ELF_NFPREG 33 /* includes fpscr */ +#if __WORDSIZE == 32 +# define ELF_NVRREG 33 /* includes vscr */ +#else +# define ELF_NVRREG 34 /* includes vscr */ +#endif + +typedef unsigned long elf_greg_t; +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +typedef double elf_fpreg_t; +typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; + +/* Altivec registers */ +typedef struct { + unsigned int u[4]; +} __attribute__ ((__aligned__ (16))) elf_vrreg_t; +typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG]; +#endif \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/pthreadtypes-arch.h b/libc/include/powerpc64le-linux-gnu/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..883306d2e8 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/pthreadtypes-arch.h @@ -0,0 +1,81 @@ +/* Machine-specific pthread type layouts. PowerPC version. + Copyright (C) 2003-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 __WORDSIZE == 64 +# define __SIZEOF_PTHREAD_MUTEX_T 40 +# define __SIZEOF_PTHREAD_ATTR_T 56 +# define __SIZEOF_PTHREAD_RWLOCK_T 56 +# define __SIZEOF_PTHREAD_BARRIER_T 32 +#else +# define __SIZEOF_PTHREAD_MUTEX_T 24 +# define __SIZEOF_PTHREAD_ATTR_T 36 +# 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 + +/* Definitions for internal mutex struct. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 1 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64) +#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64) + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +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 __WORDSIZE == 64 + int __cur_writer; + int __shared; + unsigned char __rwelision; + unsigned char __pad1[7]; + unsigned long int __pad2; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned int __flags; +# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, {0, 0, 0, 0, 0, 0, 0 } +#else + unsigned char __rwelision; + unsigned char __pad2; + unsigned char __shared; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned char __flags; + int __cur_writer; +# define __PTHREAD_RWLOCK_ELISION_EXTRA 0 +#endif +}; + +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/sem-pad.h b/libc/include/powerpc64le-linux-gnu/bits/sem-pad.h new file mode 100644 index 0000000000..73f7ada00c --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/sem-pad.h @@ -0,0 +1,26 @@ +/* Define where padding goes in struct semid_ds. PowerPC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SEM_H +# error "Never use directly; include instead." +#endif + +#include + +#define __SEM_PAD_AFTER_TIME 0 +#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32) \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/semaphore.h b/libc/include/powerpc64le-linux-gnu/bits/semaphore.h new file mode 100644 index 0000000000..a8631d1aa3 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/semaphore.h @@ -0,0 +1,40 @@ +/* Machine-specific POSIX semaphore type layouts. PowerPC version. + Copyright (C) 2003-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Paul Mackerras , 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + +#include + +#if __WORDSIZE == 64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/setjmp.h b/libc/include/powerpc64le-linux-gnu/bits/setjmp.h new file mode 100644 index 0000000000..1705da061c --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/setjmp.h @@ -0,0 +1,50 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 the machine-dependent type `jmp_buf'. PowerPC version. */ +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +/* The previous bits/setjmp.h had __jmp_buf defined as a structure. + We use an array of 'long int' instead, to make writing the + assembler easier. Naturally, user code should not depend on + either representation. */ + +#include + +/* The current powerpc 32-bit Altivec ABI specifies for SVR4 ABI and EABI + the vrsave must be at byte 248 & v20 at byte 256. So we must pad this + correctly on 32 bit. It also insists that vecregs are only gauranteed + 4 byte alignment so we need to use vperm in the setjmp/longjmp routines. + We have to version the code because members like int __mask_was_saved + in the jmp_buf will move as jmp_buf is now larger than 248 bytes. We + cannot keep the altivec jmp_buf backward compatible with the jmp_buf. */ +#ifndef _ASM +# if __WORDSIZE == 64 +typedef long int __jmp_buf[64] __attribute__ ((__aligned__ (16))); +# else +/* The alignment is not essential, i.e.the buffer can be copied to a 4 byte + aligned buffer as per the ABI it is just added for performance reasons. */ +typedef long int __jmp_buf[64 + (12 * 4)] __attribute__ ((__aligned__ (16))); +# endif +#endif + +#endif /* bits/setjmp.h */ \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/shm-pad.h b/libc/include/powerpc64le-linux-gnu/bits/shm-pad.h new file mode 100644 index 0000000000..7cf2c0d72d --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/shm-pad.h @@ -0,0 +1,28 @@ +/* Define where padding goes in struct shmid_ds. PowerPC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SHM_H +# error "Never use directly; include instead." +#endif + +#include + +#define __SHM_PAD_AFTER_TIME 0 +#define __SHM_PAD_BEFORE_TIME (__TIMESIZE == 32) +#define __SHM_SEGSZ_AFTER_TIME 1 +#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ (__TIMESIZE == 32) \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/sigstack.h b/libc/include/powerpc64le-linux-gnu/bits/sigstack.h new file mode 100644 index 0000000000..f3029e811a --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/sigstack.h @@ -0,0 +1,32 @@ +/* sigstack, sigaltstack definitions. + Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_SIGSTACK_H +#define _BITS_SIGSTACK_H 1 + +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H +# error "Never include this file directly. Use instead" +#endif + +/* Minimum stack size for a signal handler. */ +#define MINSIGSTKSZ 4096 + +/* System default stack size. */ +#define SIGSTKSZ 16384 + +#endif /* bits/sigstack.h */ \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/stat.h b/libc/include/powerpc64le-linux-gnu/bits/stat.h new file mode 100644 index 0000000000..38c4d2425c --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/stat.h @@ -0,0 +1,275 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +#include + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_LINUX_OLD 1 +#define _STAT_VER_KERNEL 1 +#define _STAT_VER_SVR4 2 +#define _STAT_VER_LINUX 3 +#if __WORDSIZE == 32 +# define _STAT_VER _STAT_VER_LINUX +#else +# define _STAT_VER _STAT_VER_KERNEL +#endif + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 1 +#define _MKNOD_VER_SVR4 2 +#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ + + +#if __WORDSIZE == 32 + +struct stat + { + __dev_t st_dev; /* Device. */ +# ifndef __USE_FILE_OFFSET64 + unsigned short int __pad1; + __ino_t st_ino; /* File serial number. */ +# else + __ino64_t st_ino; /* File serial number. */ +# endif + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned short int __pad2; +# ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +# else + __off64_t st_size; /* Size of file, in bytes. */ +# endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +# ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +# else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# endif +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; + }; + + +# ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + __ino64_t st_ino; /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned short int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; + }; +# endif /* __USE_LARGEFILE64 */ + +#else /* __WORDSIZE == 32 */ + +struct stat + { + __dev_t st_dev; /* Device. */ +# ifndef __USE_FILE_OFFSET64 + __ino_t st_ino; /* File serial number. */ +# else + __ino64_t st_ino; /* File serial number. */ +# endif + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + int __pad2; + __dev_t st_rdev; /* Device number, if device. */ +# ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +# else + __off64_t st_size; /* Size of file, in bytes. */ +# endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +# ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +# else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# endif +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; + unsigned long int __glibc_reserved6; + }; + +# ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + __ino64_t st_ino; /* File serial number. */ + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + int __pad2; + __dev_t st_rdev; /* Device number, if device. */ + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; + unsigned long int __glibc_reserved6; + }; +# endif /* __USE_LARGEFILE64 */ +#endif + + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/termios-baud.h b/libc/include/powerpc64le-linux-gnu/bits/termios-baud.h new file mode 100644 index 0000000000..98c3cab88c --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/termios-baud.h @@ -0,0 +1,45 @@ +/* termios baud rate selection definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#ifdef __USE_MISC +# define CBAUD 0000377 +# define CBAUDEX 0000020 +# define CMSPAR 010000000000 /* mark or space (stick) parity */ +# define CRTSCTS 020000000000 /* flow control */ +#endif + +#define B57600 00020 +#define B115200 00021 +#define B230400 00022 +#define B460800 00023 +#define B500000 00024 +#define B576000 00025 +#define B921600 00026 +#define B1000000 00027 +#define B1152000 00030 +#define B1500000 00031 +#define B2000000 00032 +#define B2500000 00033 +#define B3000000 00034 +#define B3500000 00035 +#define B4000000 00036 +#define __MAX_BAUD B4000000 \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/termios-c_cc.h b/libc/include/powerpc64le-linux-gnu/bits/termios-c_cc.h new file mode 100644 index 0000000000..3b9f240258 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/termios-c_cc.h @@ -0,0 +1,41 @@ +/* termios c_cc symbolic constant definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 +#define VQUIT 1 +#define VERASE 2 +#define VKILL 3 +#define VEOF 4 +#define VMIN 5 +#define VEOL 6 +#define VTIME 7 +#define VEOL2 8 +#define VSWTC 9 + +#define VWERASE 10 +#define VREPRINT 11 +#define VSUSP 12 +#define VSTART 13 +#define VSTOP 14 +#define VLNEXT 15 +#define VDISCARD 16 \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/termios-c_cflag.h b/libc/include/powerpc64le-linux-gnu/bits/termios-c_cflag.h new file mode 100644 index 0000000000..16869a7138 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/termios-c_cflag.h @@ -0,0 +1,35 @@ +/* termios control mode definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 CSIZE 00001400 +#define CS5 00000000 +#define CS6 00000400 +#define CS7 00001000 +#define CS8 00001400 + +#define CSTOPB 00002000 +#define CREAD 00004000 +#define PARENB 00010000 +#define PARODD 00020000 +#define HUPCL 00040000 + +#define CLOCAL 00100000 \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/termios-c_iflag.h b/libc/include/powerpc64le-linux-gnu/bits/termios-c_iflag.h new file mode 100644 index 0000000000..b61f9af030 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/termios-c_iflag.h @@ -0,0 +1,38 @@ +/* termios input mode definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_iflag bits */ +#define IGNBRK 0000001 +#define BRKINT 0000002 +#define IGNPAR 0000004 +#define PARMRK 0000010 +#define INPCK 0000020 +#define ISTRIP 0000040 +#define INLCR 0000100 +#define IGNCR 0000200 +#define ICRNL 0000400 +#define IXON 0001000 +#define IXOFF 0002000 +#define IXANY 0004000 +#define IUCLC 0010000 +#define IMAXBEL 0020000 +#define IUTF8 0040000 \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/termios-c_lflag.h b/libc/include/powerpc64le-linux-gnu/bits/termios-c_lflag.h new file mode 100644 index 0000000000..2abcbafdf5 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/termios-c_lflag.h @@ -0,0 +1,45 @@ +/* termios local mode definitions. Linux/powerpc version. + Copyright (C) 2019i Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 0x00000080 +#define ICANON 0x00000100 +#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K) +# define XCASE 0x00004000 +#endif +#define ECHO 0x00000008 +#define ECHOE 0x00000002 +#define ECHOK 0x00000004 +#define ECHONL 0x00000010 +#define NOFLSH 0x80000000 +#define TOSTOP 0x00400000 +#ifdef __USE_MISC +# define ECHOCTL 0x00000040 +# define ECHOPRT 0x00000020 +# define ECHOKE 0x00000001 +# define FLUSHO 0x00800000 +# define PENDIN 0x20000000 +#endif +#define IEXTEN 0x00000400 +#ifdef __USE_MISC +# define EXTPROC 0x10000000 +#endif \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/termios-c_oflag.h b/libc/include/powerpc64le-linux-gnu/bits/termios-c_oflag.h new file mode 100644 index 0000000000..ca06aad4f7 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/termios-c_oflag.h @@ -0,0 +1,65 @@ +/* termios output mode definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_oflag bits */ +#define OPOST 0000001 +#define ONLCR 0000002 +#define OLCUC 0000004 + +#define OCRNL 0000010 +#define ONOCR 0000020 +#define ONLRET 0000040 + +#define OFILL 00000100 +#define OFDEL 00000200 +#if defined __USE_MISC || defined __USE_XOPEN +# define NLDLY 00001400 +# define NL0 00000000 +# define NL1 00000400 +# if defined __USE_MISC +# define NL2 00001000 +# define NL3 00001400 +# endif +# define TABDLY 00006000 +# define TAB0 00000000 +# define TAB1 00002000 +# define TAB2 00004000 +# define TAB3 00006000 +# define CRDLY 00030000 +# define CR0 00000000 +# define CR1 00010000 +# define CR2 00020000 +# define CR3 00030000 +# define FFDLY 00040000 +# define FF0 00000000 +# define FF1 00040000 +# define BSDLY 00100000 +# define BS0 00000000 +# define BS1 00100000 +#endif +#define VTDLY 00200000 +#define VT0 00000000 +#define VT1 00200000 + +#ifdef __USE_MISC +# define XTABS 00006000 +#endif \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/termios-misc.h b/libc/include/powerpc64le-linux-gnu/bits/termios-misc.h new file mode 100644 index 0000000000..369feac2d0 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/termios-misc.h @@ -0,0 +1,72 @@ +/* termios baud platform specific definitions. Linux/powerpc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#ifdef __USE_MISC + +struct sgttyb { + char sg_ispeed; + char sg_ospeed; + char sg_erase; + char sg_kill; + short sg_flags; +}; + +struct tchars { + char t_intrc; + char t_quitc; + char t_startc; + char t_stopc; + char t_eofc; + char t_brkc; +}; + +struct ltchars { + char t_suspc; + char t_dsuspc; + char t_rprntc; + char t_flushc; + char t_werasc; + char t_lnextc; +}; + +/* Used for packet mode */ +#define TIOCPKT_DATA 0 +#define TIOCPKT_FLUSHREAD 1 +#define TIOCPKT_FLUSHWRITE 2 +#define TIOCPKT_STOP 4 +#define TIOCPKT_START 8 +#define TIOCPKT_NOSTOP 16 +#define TIOCPKT_DOSTOP 32 + +/* c_cc characters */ +#define _VINTR 0 +#define _VQUIT 1 +#define _VERASE 2 +#define _VKILL 3 +#define _VEOF 4 +#define _VMIN 5 +#define _VEOL 6 +#define _VTIME 7 +#define _VEOL2 8 +#define _VSWTC 9 + +#endif /* __USE_MISC */ \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/bits/wordsize.h b/libc/include/powerpc64le-linux-gnu/bits/wordsize.h new file mode 100644 index 0000000000..37836f9d4e --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/bits/wordsize.h @@ -0,0 +1,11 @@ +/* Determine the wordsize from the preprocessor defines. */ + +#if defined __powerpc64__ +# define __WORDSIZE 64 +# define __WORDSIZE_TIME64_COMPAT32 1 +#else +# define __WORDSIZE 32 +# define __WORDSIZE_TIME64_COMPAT32 0 +# define __WORDSIZE32_SIZE_ULONG 0 +# define __WORDSIZE32_PTRDIFF_LONG 0 +#endif \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/fpu_control.h b/libc/include/powerpc64le-linux-gnu/fpu_control.h new file mode 100644 index 0000000000..78a7a291ac --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/fpu_control.h @@ -0,0 +1,120 @@ +/* FPU control word definitions. PowerPC version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FPU_CONTROL_H +#define _FPU_CONTROL_H + +#ifdef _SOFT_FLOAT + +# define _FPU_RESERVED 0xffffffff +# define _FPU_DEFAULT 0x00000000 /* Default value. */ +typedef unsigned int fpu_control_t; +# define _FPU_GETCW(cw) (cw) = 0 +# define _FPU_SETCW(cw) (void) (cw) +extern fpu_control_t __fpu_control; + +#elif defined __NO_FPRS__ /* e500 */ + +/* rounding control */ +# define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */ +# define _FPU_RC_DOWN 0x03 +# define _FPU_RC_UP 0x02 +# define _FPU_RC_ZERO 0x01 + +/* masking of interrupts */ +# define _FPU_MASK_ZM 0x10 /* zero divide */ +# define _FPU_MASK_OM 0x04 /* overflow */ +# define _FPU_MASK_UM 0x08 /* underflow */ +# define _FPU_MASK_XM 0x40 /* inexact */ +# define _FPU_MASK_IM 0x20 /* invalid operation */ + +# define _FPU_RESERVED 0x00c10080 /* These bits are reserved and not changed. */ + +/* Correct IEEE semantics require traps to be enabled at the hardware + level; the kernel then does the emulation and determines whether + generation of signals from those traps was enabled using prctl. */ +# define _FPU_DEFAULT 0x0000003c /* Default value. */ +# define _FPU_IEEE _FPU_DEFAULT + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. */ +# define _FPU_GETCW(cw) \ + __asm__ volatile ("mfspefscr %0" : "=r" (cw)) +# define _FPU_SETCW(cw) \ + __asm__ volatile ("mtspefscr %0" : : "r" (cw)) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#else /* PowerPC 6xx floating-point. */ + +/* rounding control */ +# define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */ +# define _FPU_RC_DOWN 0x03 +# define _FPU_RC_UP 0x02 +# define _FPU_RC_ZERO 0x01 + +# define _FPU_MASK_NI 0x04 /* non-ieee mode */ + +/* masking of interrupts */ +# define _FPU_MASK_ZM 0x10 /* zero divide */ +# define _FPU_MASK_OM 0x40 /* overflow */ +# define _FPU_MASK_UM 0x20 /* underflow */ +# define _FPU_MASK_XM 0x08 /* inexact */ +# define _FPU_MASK_IM 0x80 /* invalid operation */ + +# define _FPU_RESERVED 0xffffff00 /* These bits are reserved are not changed. */ + +/* The fdlibm code requires no interrupts for exceptions. */ +# define _FPU_DEFAULT 0x00000000 /* Default value. */ + +/* IEEE: same as above, but (some) exceptions; + we leave the 'inexact' exception off. + */ +# define _FPU_IEEE 0x000000f0 + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. */ +# define _FPU_GETCW(cw) \ + ({union { double __d; unsigned long long __ll; } __u; \ + register double __fr; \ + __asm__ ("mffs %0" : "=f" (__fr)); \ + __u.__d = __fr; \ + (cw) = (fpu_control_t) __u.__ll; \ + (fpu_control_t) __u.__ll; \ + }) + +# define _FPU_SETCW(cw) \ + { union { double __d; unsigned long long __ll; } __u; \ + register double __fr; \ + __u.__ll = 0xfff80000LL << 32; /* This is a QNaN. */ \ + __u.__ll |= (cw) & 0xffffffffLL; \ + __fr = __u.__d; \ + __asm__ ("mtfsf 255,%0" : : "f" (__fr)); \ + } + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* PowerPC 6xx floating-point. */ + +#endif /* _FPU_CONTROL_H */ \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/gnu/lib-names-64-v2.h b/libc/include/powerpc64le-linux-gnu/gnu/lib-names-64-v2.h new file mode 100644 index 0000000000..c26da6b2cd --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/gnu/lib-names-64-v2.h @@ -0,0 +1,31 @@ +/* This file is automatically generated. */ +#ifndef __GNU_LIB_NAMES_H +# error "Never use directly; include instead." +#endif + +#define LD64_SO "ld64.so.2" +#define LD_SO "ld64.so.2" +#define LIBANL_SO "libanl.so.1" +#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1" +#define LIBCRYPT_SO "libcrypt.so.1" +#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_NISPLUS_SO "libnss_nisplus.so.2" +#define LIBNSS_NIS_SO "libnss_nis.so.2" +#define LIBNSS_TEST1_SO "libnss_test1.so.2" +#define LIBNSS_TEST2_SO "libnss_test2.so.2" +#define LIBPTHREAD_SO "libpthread.so.0" +#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/libc/include/powerpc64le-linux-gnu/gnu/lib-names.h b/libc/include/powerpc64le-linux-gnu/gnu/lib-names.h new file mode 100644 index 0000000000..a6fbab8035 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/gnu/lib-names.h @@ -0,0 +1,19 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#include + +#if __WORDSIZE == 32 +# include +#endif +#if __WORDSIZE == 64 && _CALL_ELF != 2 +# include +#endif +#if __WORDSIZE == 64 && _CALL_ELF == 2 +# include +#endif + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/gnu/stubs-64-v2.h b/libc/include/powerpc64le-linux-gnu/gnu/stubs-64-v2.h new file mode 100644 index 0000000000..f5b3f7db15 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/gnu/stubs-64-v2.h @@ -0,0 +1,20 @@ +/* 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_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_gtty +#define __stub_lchmod +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/gnu/stubs.h b/libc/include/powerpc64le-linux-gnu/gnu/stubs.h new file mode 100644 index 0000000000..d130565a35 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/gnu/stubs.h @@ -0,0 +1,15 @@ +/* This file is automatically generated. + This file selects the right generated file of `__stub_FUNCTION' macros + based on the architecture being compiled for. */ + +#include + +#if __WORDSIZE == 32 +# include +#endif +#if __WORDSIZE == 64 && _CALL_ELF != 2 +# include +#endif +#if __WORDSIZE == 64 && _CALL_ELF == 2 +# include +#endif \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/ieee754.h b/libc/include/powerpc64le-linux-gnu/ieee754.h new file mode 100644 index 0000000000..918506bc96 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/ieee754.h @@ -0,0 +1,133 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +__BEGIN_DECLS + +union ieee754_float + { + float f; + + /* This is the IEEE 754 single-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int mantissa:23; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:23; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int quiet_nan:1; + unsigned int mantissa:22; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:22; + unsigned int quiet_nan:1; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee_nan; + }; + +#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ + + +union ieee754_double + { + double d; + + /* This is the IEEE 754 double-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:20; + unsigned int mantissa1:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:19; + unsigned int mantissa1:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ + + +/* IBM extended format for long double. + + Each long double is made up of two IEEE doubles. The value of the + long double is the sum of the values of the two parts. The most + significant part is required to be the value of the long double + rounded to the nearest double, as specified by IEEE. For Inf + values, the least significant part is required to be one of +0.0 or + -0.0. No other requirements are made; so, for example, 1.0 may be + represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a + NaN is don't-care. */ + +union ibm_extended_long_double + { + long double ld; + union ieee754_double d[2]; + }; + +__END_DECLS + +#endif /* ieee754.h */ \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/sys/ptrace.h b/libc/include/powerpc64le-linux-gnu/sys/ptrace.h new file mode 100644 index 0000000000..cf05edb11d --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/sys/ptrace.h @@ -0,0 +1,253 @@ +/* `ptrace' debugger support interface. Linux/PowerPC version. + Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include +#include + +__BEGIN_DECLS + +#if defined _LINUX_PTRACE_H || defined _ASM_POWERPC_PTRACE_H +/* Do not let Linux headers macros interfere with enum __ptrace_request. */ +# undef PTRACE_ATTACH +# undef PTRACE_CONT +# undef PTRACE_DETACH +# undef PTRACE_GET_DEBUGREG +# undef PTRACE_GETEVENTMSG +# undef PTRACE_GETEVRREGS +# undef PTRACE_GETFPREGS +# undef PTRACE_GETREGS +# undef PTRACE_GETREGS64 +# undef PTRACE_GETREGSET +# undef PTRACE_GETSIGINFO +# undef PTRACE_GETSIGMASK +# undef PTRACE_GETVRREGS +# undef PTRACE_GETVSRREGS +# undef PTRACE_INTERRUPT +# undef PTRACE_KILL +# undef PTRACE_LISTEN +# undef PTRACE_PEEKDATA +# undef PTRACE_PEEKSIGINFO +# undef PTRACE_PEEKTEXT +# undef PTRACE_POKEDATA +# undef PTRACE_POKETEXT +# undef PTRACE_SECCOMP_GET_FILTER +# undef PTRACE_SECCOMP_GET_METADATA +# undef PTRACE_SEIZE +# undef PTRACE_SET_DEBUGREG +# undef PTRACE_SETEVRREGS +# undef PTRACE_SETFPREGS +# undef PTRACE_SETOPTIONS +# undef PTRACE_SETREGS +# undef PTRACE_SETREGS64 +# undef PTRACE_SETREGSET +# undef PTRACE_SETSIGINFO +# undef PTRACE_SETSIGMASK +# undef PTRACE_SETVRREGS +# undef PTRACE_SETVSRREGS +# undef PTRACE_SINGLEBLOCK +# undef PTRACE_SINGLESTEP +# undef PTRACE_SYSCALL +# undef PTRACE_TRACEME +#endif + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Get all general purpose registers used by a process. */ + PTRACE_GETREGS = 12, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a process. */ + PTRACE_SETREGS = 13, +#define PT_SETREGS PTRACE_SETREGS + + /* Get all floating point registers used by a process. */ + PTRACE_GETFPREGS = 14, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a process. */ + PTRACE_SETFPREGS = 15, +#define PT_SETFPREGS PTRACE_SETFPREGS + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Get all altivec registers used by a process. */ + PTRACE_GETVRREGS = 18, +#define PT_GETVRREGS PTRACE_GETVRREGS + + /* Set all altivec registers used by a process. */ + PTRACE_SETVRREGS = 19, +#define PT_SETVRREGS PTRACE_SETVRREGS + + /* Get all SPE registers used by a process. */ + PTRACE_GETEVRREGS = 20, +#define PT_GETEVRREGS PTRACE_GETEVRREGS + + /* Set all SPE registers used by a process. */ + PTRACE_SETEVRREGS = 21, +#define PT_SETEVRREGS PTRACE_SETEVRREGS + + /* Same as PTRACE_GETREGS except a 32-bit process will obtain + the full 64-bit registers. Implemented by 64-bit kernels only. */ + PTRACE_GETREGS64 = 22, +#define PT_GETREGS64 PTRACE_GETREGS64 + + /* Same as PTRACE_SETREGS except a 32-bit process will set + the full 64-bit registers. Implemented by 64-bit kernels only. */ + PTRACE_SETREGS64 = 23, +#define PT_SETREGS64 PTRACE_SETREGS64 + + /* Continue and stop at the next entry to or return from syscall. */ + PTRACE_SYSCALL = 24, +#define PT_SYSCALL PTRACE_SYSCALL + + /* Get a debug register of a process. */ + PTRACE_GET_DEBUGREG = 25, +#define PT_GET_DEBUGREG PTRACE_GET_DEBUGREG + + /* Set a debug register of a process. */ + PTRACE_SET_DEBUGREG = 26, +#define PT_SET_DEBUGREG PTRACE_SET_DEBUGREG + + /* Get the first 32 VSX registers of a process. */ + PTRACE_GETVSRREGS = 27, +#define PT_GETVSRREGS PTRACE_GETVSRREGS + + /* Set the first 32 VSX registers of a process. */ + PTRACE_SETVSRREGS = 28, +#define PT_SETVSRREGS PTRACE_SETVSRREGS + + /* Execute process until next taken branch. */ + PTRACE_SINGLEBLOCK = 256, +#define PT_STEPBLOCK PTRACE_SINGLEBLOCK + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + /* Retrieve siginfo_t structures without removing signals from a queue. */ + PTRACE_PEEKSIGINFO = 0x4209, +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO + + /* Get the mask of blocked signals. */ + PTRACE_GETSIGMASK = 0x420a, +#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK + + /* Change the mask of blocked signals. */ + PTRACE_SETSIGMASK = 0x420b, +#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK + + /* Get seccomp BPF filters. */ + PTRACE_SECCOMP_GET_FILTER = 0x420c, +#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER + + /* Get seccomp BPF filter metadata. */ + PTRACE_SECCOMP_GET_METADATA = 0x420d +#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA +}; + + +#include + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/sys/ucontext.h b/libc/include/powerpc64le-linux-gnu/sys/ucontext.h new file mode 100644 index 0000000000..6655e12509 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/sys/ucontext.h @@ -0,0 +1,200 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include + + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + +struct __ctx(pt_regs); + +#if __WORDSIZE == 32 + +/* Number of general registers. */ +# define __NGREG 48 +# ifdef __USE_MISC +# define NGREG __NGREG +# endif + +/* Container for all general registers. */ +typedef unsigned long gregset_t[__NGREG]; + +/* Container for floating-point registers and status */ +typedef struct _libc_fpstate +{ + double __ctx(fpregs)[32]; + double __ctx(fpscr); + unsigned int _pad[2]; +} fpregset_t; + +/* Container for Altivec/VMX registers and status. + Needs to be aligned on a 16-byte boundary. */ +typedef struct _libc_vrstate +{ + unsigned int __ctx(vrregs)[32][4]; + unsigned int __ctx(vrsave); + unsigned int _pad[2]; + unsigned int __ctx(vscr); +} vrregset_t; + +/* Context to describe whole processor state. */ +typedef struct +{ + gregset_t __ctx(gregs); + fpregset_t __ctx(fpregs); + vrregset_t __ctx(vrregs) __attribute__((__aligned__(16))); +} mcontext_t; + +#else + +/* For 64-bit kernels with Altivec support, a machine context is exactly + * a sigcontext. For older kernel (without Altivec) the sigcontext matches + * the mcontext upto but not including the v_regs field. For kernels that + * don't set AT_HWCAP or return AT_HWCAP without PPC_FEATURE_HAS_ALTIVEC the + * v_regs field may not exist and should not be referenced. The v_regd field + * can be refernced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC + * is set in AT_HWCAP. */ + +/* Number of general registers. */ +# define __NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */ +# define __NFPREG 33 /* includes fp0-fp31 &fpscr. */ +# define __NVRREG 34 /* includes v0-v31, vscr, & vrsave in + split vectors */ +# ifdef __USE_MISC +# define NGREG __NGREG +# define NFPREG __NFPREG +# define NVRREG __NVRREG +# endif + +typedef unsigned long gregset_t[__NGREG]; +typedef double fpregset_t[__NFPREG]; + +/* Container for Altivec/VMX Vector Status and Control Register. Only 32-bits + but can only be copied to/from a 128-bit vector register. So we allocated + a whole quadword speedup save/restore. */ +typedef struct _libc_vscr +{ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + unsigned int __pad[3]; + unsigned int __ctx(vscr_word); +#else + unsigned int __ctx(vscr_word); + unsigned int __pad[3]; +#endif +} vscr_t; + +/* Container for Altivec/VMX registers and status. + Must to be aligned on a 16-byte boundary. */ +typedef struct _libc_vrstate +{ + unsigned int __ctx(vrregs)[32][4]; + vscr_t __ctx(vscr); + unsigned int __ctx(vrsave); + unsigned int __pad[3]; +} vrregset_t __attribute__((__aligned__(16))); + +typedef struct { + unsigned long __glibc_reserved[4]; + int __ctx(signal); + int __pad0; + unsigned long __ctx(handler); + unsigned long __ctx(oldmask); + struct __ctx(pt_regs) *__ctx(regs); + gregset_t __ctx(gp_regs); + fpregset_t __ctx(fp_regs); +/* + * To maintain compatibility with current implementations the sigcontext is + * extended by appending a pointer (v_regs) to a quadword type (elf_vrreg_t) + * followed by an unstructured (vmx_reserve) field of 69 doublewords. This + * allows the array of vector registers to be quadword aligned independent of + * the alignment of the containing sigcontext or ucontext. It is the + * responsibility of the code setting the sigcontext to set this pointer to + * either NULL (if this processor does not support the VMX feature) or the + * address of the first quadword within the allocated (vmx_reserve) area. + * + * The pointer (v_regs) of vector type (elf_vrreg_t) is essentually + * an array of 34 quadword entries. The entries with + * indexes 0-31 contain the corresponding vector registers. The entry with + * index 32 contains the vscr as the last word (offset 12) within the + * quadword. This allows the vscr to be stored as either a quadword (since + * it must be copied via a vector register to/from storage) or as a word. + * The entry with index 33 contains the vrsave as the first word (offset 0) + * within the quadword. + */ + vrregset_t *__ctx(v_regs); + long __ctx(vmx_reserve)[__NVRREG+__NVRREG+1]; +} mcontext_t; + +#endif + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long int __ctx(uc_flags); + struct ucontext_t *uc_link; + stack_t uc_stack; +#if __WORDSIZE == 32 + /* + * These fields are set up this way to maximize source and + * binary compatibility with code written for the old + * ucontext_t definition, which didn't include space for the + * registers. + * + * Different versions of the kernel have stored the registers on + * signal delivery at different offsets from the ucontext struct. + * Programs should thus use the uc_mcontext.uc_regs pointer to + * find where the registers are actually stored. The registers + * will be stored within the ucontext_t struct but not necessarily + * at a fixed address. As a side-effect, this lets us achieve + * 16-byte alignment for the register storage space if the + * Altivec registers are to be saved, without requiring 16-byte + * alignment on the whole ucontext_t. + * + * The uc_mcontext.regs field is included for source compatibility + * with programs written against the older ucontext_t definition, + * and its name should therefore not change. The uc_pad field + * is for binary compatibility with programs compiled against the + * old ucontext_t; it ensures that uc_mcontext.regs and uc_sigmask + * are at the same offset as previously. + */ + int __glibc_reserved1[7]; + union __ctx(uc_regs_ptr) { + struct __ctx(pt_regs) *__ctx(regs); + mcontext_t *__ctx(uc_regs); + } uc_mcontext; + sigset_t uc_sigmask; + /* last for extensibility */ + char __ctx(uc_reg_space)[sizeof (mcontext_t) + 12]; +#else /* 64-bit */ + sigset_t uc_sigmask; + mcontext_t uc_mcontext; /* last for extensibility */ +#endif + } ucontext_t; + +#undef __ctx + +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/include/powerpc64le-linux-gnu/sys/user.h b/libc/include/powerpc64le-linux-gnu/sys/user.h new file mode 100644 index 0000000000..151aa48f53 --- /dev/null +++ b/libc/include/powerpc64le-linux-gnu/sys/user.h @@ -0,0 +1,40 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H + +#define _SYS_USER_H 1 +#include +#include + +#include + +struct user { + struct pt_regs regs; /* entire machine state */ + size_t u_tsize; /* text size (pages) */ + size_t u_dsize; /* data size (pages) */ + size_t u_ssize; /* stack size (pages) */ + unsigned long start_code; /* text starting address */ + unsigned long start_data; /* data starting address */ + unsigned long start_stack; /* stack starting address */ + long int signal; /* signal causing core dump */ + struct regs * u_ar0; /* help gdb find registers */ + unsigned long magic; /* identifies a core file */ + char u_comm[32]; /* user command name */ +}; + +#endif /* sys/user.h */ \ No newline at end of file diff --git a/libc/glibc/sysdeps/unix/sysv/linux/riscv/asm/unistd.h b/libc/include/riscv64-linux-gnu/asm/unistd.h similarity index 100% rename from libc/glibc/sysdeps/unix/sysv/linux/riscv/asm/unistd.h rename to libc/include/riscv64-linux-gnu/asm/unistd.h diff --git a/libc/include/riscv64-linux-gnu/bits/endian.h b/libc/include/riscv64-linux-gnu/bits/endian.h new file mode 100644 index 0000000000..ca77ccf806 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/bits/endian.h @@ -0,0 +1,5 @@ +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#define __BYTE_ORDER __LITTLE_ENDIAN \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/bits/fcntl.h b/libc/include/riscv64-linux-gnu/bits/fcntl.h new file mode 100644 index 0000000000..08c1da6125 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/bits/fcntl.h @@ -0,0 +1,62 @@ +/* O_*, F_*, FD_* bit values for Linux / RISC-V. + Copyright (C) 2011-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#include + +/* In 64-bit ISA files are always with 64bit off_t and F_*LK64 are the same as + non-64-bit versions. It will need to be revised for 128-bit. */ +#if __WORDSIZE == 64 +# define __O_LARGEFILE 0 + +# define F_GETLK64 5 /* Get record locking info. */ +# define F_SETLK64 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW64 7 /* Set record locking info (blocking). */ +#endif + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/bits/fenv.h b/libc/include/riscv64-linux-gnu/bits/fenv.h new file mode 100644 index 0000000000..f0c7e3ff45 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/bits/fenv.h @@ -0,0 +1,74 @@ +/* Floating point environment, RISC-V version. + Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + +enum + { + FE_INEXACT = +#define FE_INEXACT (0x01) + FE_INEXACT, + FE_UNDERFLOW = +#define FE_UNDERFLOW (0x02) + FE_UNDERFLOW, + FE_OVERFLOW = +#define FE_OVERFLOW (0x04) + FE_OVERFLOW, + FE_DIVBYZERO = +#define FE_DIVBYZERO (0x08) + FE_DIVBYZERO, + FE_INVALID = +#define FE_INVALID (0x10) + FE_INVALID + }; + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +enum + { + FE_TONEAREST = +#define FE_TONEAREST (0x0) + FE_TONEAREST, + FE_TOWARDZERO = +#define FE_TOWARDZERO (0x1) + FE_TOWARDZERO, + FE_DOWNWARD = +#define FE_DOWNWARD (0x2) + FE_DOWNWARD, + FE_UPWARD = +#define FE_UPWARD (0x3) + FE_UPWARD + }; + + +typedef unsigned int fexcept_t; +typedef unsigned int fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((__const fenv_t *) -1) + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef unsigned int femode_t; + +/* Default floating-point control modes. */ +# define FE_DFL_MODE ((const femode_t *) -1L) +#endif \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/bits/floatn.h b/libc/include/riscv64-linux-gnu/bits/floatn.h new file mode 100644 index 0000000000..5e7e3f4d2e --- /dev/null +++ b/libc/include/riscv64-linux-gnu/bits/floatn.h @@ -0,0 +1,97 @@ +/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/riscv64-linux-gnu/bits/link.h b/libc/include/riscv64-linux-gnu/bits/link.h new file mode 100644 index 0000000000..0e5bab4b0a --- /dev/null +++ b/libc/include/riscv64-linux-gnu/bits/link.h @@ -0,0 +1,56 @@ +/* Machine-specific declarations for dynamic linker interface. RISC-V version. + Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + +typedef struct La_riscv_regs +{ + unsigned long int lr_reg[8]; /* a0 - a7 */ + double lr_fpreg[8]; /* fa0 - fa7 */ + unsigned long int lr_ra; + unsigned long int lr_sp; +} La_riscv_regs; + +/* Return values for calls from PLT on RISC-V. */ +typedef struct La_riscv_retval +{ + unsigned long int lrv_a0; + unsigned long int lrv_a1; + double lrv_fa0; + double lrv_fa1; +} La_riscv_retval; + +__BEGIN_DECLS + +extern ElfW(Addr) la_riscv_gnu_pltenter (ElfW(Sym) *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_riscv_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_riscv_gnu_pltexit (ElfW(Sym) *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_riscv_regs *__inregs, + La_riscv_retval *__outregs, + const char *__symname); + +__END_DECLS \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/bits/long-double.h b/libc/include/riscv64-linux-gnu/bits/long-double.h new file mode 100644 index 0000000000..12e30804a4 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/bits/long-double.h @@ -0,0 +1,20 @@ +/* Properties of long double type. ldbl-128 version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* long double is distinct from double, so there is nothing to + define here. */ \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/bits/procfs.h b/libc/include/riscv64-linux-gnu/bits/procfs.h new file mode 100644 index 0000000000..8625034641 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/bits/procfs.h @@ -0,0 +1,31 @@ +/* Types for registers for sys/procfs.h. RISC-V version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +#include + +/* ELF register definitions */ +#define ELF_NGREG NGREG +#define ELF_NFPREG NFPREG + +typedef unsigned long int elf_greg_t; +typedef unsigned long int elf_gregset_t[32]; +typedef union __riscv_mc_fp_state elf_fpregset_t; \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/bits/pthreadtypes-arch.h b/libc/include/riscv64-linux-gnu/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..9eb39ee7dc --- /dev/null +++ b/libc/include/riscv64-linux-gnu/bits/pthreadtypes-arch.h @@ -0,0 +1,68 @@ +/* Machine-specific pthread type layouts. RISC-V version. + Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 __riscv_xlen == 64 +# define __SIZEOF_PTHREAD_ATTR_T 56 +# define __SIZEOF_PTHREAD_MUTEX_T 40 +# define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +# define __SIZEOF_PTHREAD_COND_T 48 +# define __SIZEOF_PTHREAD_CONDATTR_T 4 +# define __SIZEOF_PTHREAD_RWLOCK_T 56 +# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +# define __SIZEOF_PTHREAD_BARRIER_T 32 +# define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +#else +# error "rv32i-based systems are not supported" +#endif + +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 0 +#define __PTHREAD_MUTEX_USE_UNION 0 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +/* There is a lot of padding in this structure. While it's not strictly + necessary on RISC-V, we're going to leave it in to be on the safe side in + case it's needed in the future. Most other architectures have the padding, + so this gives us the same extensibility as everyone else has. */ +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; + int __cur_writer; + int __shared; + unsigned long int __pad1; + unsigned long int __pad2; + unsigned int __flags; +}; + +#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 + +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/bits/semaphore.h b/libc/include/riscv64-linux-gnu/bits/semaphore.h new file mode 100644 index 0000000000..d9a849248e --- /dev/null +++ b/libc/include/riscv64-linux-gnu/bits/semaphore.h @@ -0,0 +1,33 @@ +/* Machine-specific POSIX semaphore type layouts. RISC-V version. + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + +#define __SIZEOF_SEM_T (4 * __SIZEOF_POINTER__) + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/bits/setjmp.h b/libc/include/riscv64-linux-gnu/bits/setjmp.h new file mode 100644 index 0000000000..8e08e99fa7 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/bits/setjmp.h @@ -0,0 +1,39 @@ +/* Define the machine-dependent type `jmp_buf'. RISC-V version. + Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _RISCV_BITS_SETJMP_H +#define _RISCV_BITS_SETJMP_H + +typedef struct __jmp_buf_internal_tag + { + /* Program counter. */ + long int __pc; + /* Callee-saved registers. */ + long int __regs[12]; + /* Stack pointer. */ + long int __sp; + + /* Callee-saved floating point registers. */ +#if defined __riscv_float_abi_double + double __fpregs[12]; +#elif !defined __riscv_float_abi_soft +# error unsupported FLEN +#endif + } __jmp_buf[1]; + +#endif /* _RISCV_BITS_SETJMP_H */ \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/bits/sigcontext.h b/libc/include/riscv64-linux-gnu/bits/sigcontext.h new file mode 100644 index 0000000000..767744f947 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/bits/sigcontext.h @@ -0,0 +1,31 @@ +/* Machine-dependent signal context structure for Linux. RISC-V version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +struct sigcontext { + /* gregs[0] holds the program counter. */ + unsigned long int gregs[32]; + unsigned long long int fpregs[66] __attribute__ ((__aligned__ (16))); +}; + +#endif \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/bits/stat.h b/libc/include/riscv64-linux-gnu/bits/stat.h new file mode 100644 index 0000000000..4f23077263 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/bits/stat.h @@ -0,0 +1,171 @@ +/* Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +#include +#include + +/* 64-bit libc uses the kernel's 'struct stat', accessed via the + stat() syscall; 32-bit libc uses the kernel's 'struct stat64' + and accesses it via the stat64() syscall. All the various + APIs offered by libc use the kernel shape for their struct stat + structure; the only difference is that 32-bit programs not + using __USE_FILE_OFFSET64 only see the low 32 bits of some + of the fields (specifically st_ino, st_size, and st_blocks). */ +#define _STAT_VER_KERNEL 0 +#define _STAT_VER_LINUX 0 +#define _STAT_VER _STAT_VER_KERNEL + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 0 + +#if defined __USE_FILE_OFFSET64 +# define __field64(type, type64, name) type64 name +#elif __WORDSIZE == 64 +# define __field64(type, type64, name) type name +#elif __BYTE_ORDER == __LITTLE_ENDIAN +# define __field64(type, type64, name) \ + type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad +#else +# define __field64(type, type64, name) \ + int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name +#endif + +struct stat + { + __dev_t st_dev; /* Device. */ + __field64(__ino_t, __ino64_t, st_ino); /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + __dev_t __pad1; + __field64(__off_t, __off64_t, st_size); /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + int __pad2; + __field64(__blkcnt_t, __blkcnt64_t, st_blocks); /* 512-byte blocks */ +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + int __glibc_reserved[2]; + }; + +#undef __field64 + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ + __ino64_t st_ino; /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + __dev_t __pad1; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + int __pad2; + __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + int __glibc_reserved[2]; + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/bits/statfs.h b/libc/include/riscv64-linux-gnu/bits/statfs.h new file mode 100644 index 0000000000..8da970d4a9 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/bits/statfs.h @@ -0,0 +1,86 @@ +/* Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _SYS_STATFS_H +# error "Never include directly; use instead." +#endif + +#include +#include +#include + +/* 64-bit libc uses the kernel's 'struct statfs', accessed via the + statfs() syscall; 32-bit libc uses the kernel's 'struct statfs64' + and accesses it via the statfs64() syscall. All the various + APIs offered by libc use the kernel shape for their struct statfs + structure; the only difference is that 32-bit programs not + using __USE_FILE_OFFSET64 only see the low 32 bits of some + of the fields (the __fsblkcnt_t and __fsfilcnt_t fields). */ + +#if defined __USE_FILE_OFFSET64 +# define __field64(type, type64, name) type64 name +#elif __WORDSIZE == 64 +# define __field64(type, type64, name) type name +#elif __BYTE_ORDER == __LITTLE_ENDIAN +# define __field64(type, type64, name) \ + type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad +#else +# define __field64(type, type64, name) \ + int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name +#endif + +struct statfs + { + __SWORD_TYPE f_type; + __SWORD_TYPE f_bsize; + __field64(__fsblkcnt_t, __fsblkcnt64_t, f_blocks); + __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bfree); + __field64(__fsblkcnt_t, __fsblkcnt64_t, f_bavail); + __field64(__fsfilcnt_t, __fsfilcnt64_t, f_files); + __field64(__fsfilcnt_t, __fsfilcnt64_t, f_ffree); + __fsid_t f_fsid; + __SWORD_TYPE f_namelen; + __SWORD_TYPE f_frsize; + __SWORD_TYPE f_flags; + __SWORD_TYPE f_spare[4]; + }; + +#undef __field64 + +#ifdef __USE_LARGEFILE64 +struct statfs64 + { + __SWORD_TYPE f_type; + __SWORD_TYPE f_bsize; + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_bavail; + __fsfilcnt64_t f_files; + __fsfilcnt64_t f_ffree; + __fsid_t f_fsid; + __SWORD_TYPE f_namelen; + __SWORD_TYPE f_frsize; + __SWORD_TYPE f_flags; + __SWORD_TYPE f_spare[4]; + }; +#endif + +/* Tell code we have these members. */ +#define _STATFS_F_NAMELEN +#define _STATFS_F_FRSIZE +#define _STATFS_F_FLAGS \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/bits/typesizes.h b/libc/include/riscv64-linux-gnu/bits/typesizes.h new file mode 100644 index 0000000000..8cfcacef57 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/bits/typesizes.h @@ -0,0 +1,84 @@ +/* bits/typesizes.h -- underlying types for *_t. For the generic Linux ABI. + Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Chris Metcalf , 2011. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#ifndef _BITS_TYPES_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_TYPESIZES_H +#define _BITS_TYPESIZES_H 1 + +/* See for the meaning of these macros. This file exists so + that need not vary across different GNU platforms. */ + +#define __DEV_T_TYPE __UQUAD_TYPE +#define __UID_T_TYPE __U32_TYPE +#define __GID_T_TYPE __U32_TYPE +#define __INO_T_TYPE __ULONGWORD_TYPE +#define __INO64_T_TYPE __UQUAD_TYPE +#define __MODE_T_TYPE __U32_TYPE +#define __NLINK_T_TYPE __U32_TYPE +#define __OFF_T_TYPE __SLONGWORD_TYPE +#define __OFF64_T_TYPE __SQUAD_TYPE +#define __PID_T_TYPE __S32_TYPE +#define __RLIM_T_TYPE __ULONGWORD_TYPE +#define __RLIM64_T_TYPE __UQUAD_TYPE +#define __BLKCNT_T_TYPE __SLONGWORD_TYPE +#define __BLKCNT64_T_TYPE __SQUAD_TYPE +#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE +#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE +#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE +#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __FSWORD_T_TYPE __SWORD_TYPE +#define __ID_T_TYPE __U32_TYPE +#define __CLOCK_T_TYPE __SLONGWORD_TYPE +#define __TIME_T_TYPE __SLONGWORD_TYPE +#define __USECONDS_T_TYPE __U32_TYPE +#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#define __DADDR_T_TYPE __S32_TYPE +#define __KEY_T_TYPE __S32_TYPE +#define __CLOCKID_T_TYPE __S32_TYPE +#define __TIMER_T_TYPE void * +#define __BLKSIZE_T_TYPE __S32_TYPE +#define __FSID_T_TYPE struct { int __val[2]; } +#define __SSIZE_T_TYPE __SWORD_TYPE +#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE +#define __CPU_MASK_TYPE __ULONGWORD_TYPE + +#ifdef __LP64__ +/* Tell the libc code that off_t and off64_t are actually the same type + for all ABI purposes, even if possibly expressed as different base types + for C type-checking purposes. */ +# define __OFF_T_MATCHES_OFF64_T 1 + +/* Same for ino_t and ino64_t. */ +# define __INO_T_MATCHES_INO64_T 1 + +/* And for __rlim_t and __rlim64_t. */ +# define __RLIM_T_MATCHES_RLIM64_T 1 +#else +# define __RLIM_T_MATCHES_RLIM64_T 0 +#endif + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + + +#endif /* bits/typesizes.h */ \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/bits/wordsize.h b/libc/include/riscv64-linux-gnu/bits/wordsize.h new file mode 100644 index 0000000000..db13f746a1 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/bits/wordsize.h @@ -0,0 +1,29 @@ +/* Determine the wordsize from the preprocessor defines. RISC-V version. + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +#if __riscv_xlen == (__SIZEOF_POINTER__ * 8) +# define __WORDSIZE __riscv_xlen +#else +# error unsupported ABI +#endif + +#if __riscv_xlen == 64 +# define __WORDSIZE_TIME64_COMPAT32 1 +#else +# error "rv32i-based targets are not supported" +#endif \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/fpu_control.h b/libc/include/riscv64-linux-gnu/fpu_control.h new file mode 100644 index 0000000000..4647e5c877 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/fpu_control.h @@ -0,0 +1,74 @@ +/* FPU control word bits. RISC-V version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FPU_CONTROL_H +#define _FPU_CONTROL_H + +#include + +#ifndef __riscv_flen + +# define _FPU_RESERVED 0xffffffff +# define _FPU_DEFAULT 0x00000000 +typedef unsigned int fpu_control_t; +# define _FPU_GETCW(cw) (cw) = 0 +# define _FPU_SETCW(cw) do { } while (0) +extern fpu_control_t __fpu_control; + +#else /* __riscv_flen */ + +# define _FPU_RESERVED 0 +# define _FPU_DEFAULT 0 +# define _FPU_IEEE _FPU_DEFAULT + +/* Type of the control word. */ +typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__))); + +/* Macros for accessing the hardware control word. */ +# define _FPU_GETCW(cw) __asm__ volatile ("frsr %0" : "=r" (cw)) +# define _FPU_SETCW(cw) __asm__ volatile ("fssr %z0" : : "rJ" (cw)) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +# define _FCLASS(x) (__extension__ ({ int __res; \ + if (sizeof (x) * 8 > __riscv_flen) __builtin_trap (); \ + if (sizeof (x) == 4) asm ("fclass.s %0, %1" : "=r" (__res) : "f" (x)); \ + else if (sizeof (x) == 8) asm ("fclass.d %0, %1" : "=r" (__res) : "f" (x)); \ + else __builtin_trap (); \ + __res; })) + +# define _FCLASS_MINF (1 << 0) +# define _FCLASS_MNORM (1 << 1) +# define _FCLASS_MSUBNORM (1 << 2) +# define _FCLASS_MZERO (1 << 3) +# define _FCLASS_PZERO (1 << 4) +# define _FCLASS_PSUBNORM (1 << 5) +# define _FCLASS_PNORM (1 << 6) +# define _FCLASS_PINF (1 << 7) +# define _FCLASS_SNAN (1 << 8) +# define _FCLASS_QNAN (1 << 9) +# define _FCLASS_ZERO (_FCLASS_MZERO | _FCLASS_PZERO) +# define _FCLASS_SUBNORM (_FCLASS_MSUBNORM | _FCLASS_PSUBNORM) +# define _FCLASS_NORM (_FCLASS_MNORM | _FCLASS_PNORM) +# define _FCLASS_INF (_FCLASS_MINF | _FCLASS_PINF) +# define _FCLASS_NAN (_FCLASS_SNAN | _FCLASS_QNAN) + +#endif /* __riscv_flen */ + +#endif /* fpu_control.h */ \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64.h b/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64.h new file mode 100644 index 0000000000..7e92db0ded --- /dev/null +++ b/libc/include/riscv64-linux-gnu/gnu/lib-names-lp64.h @@ -0,0 +1,31 @@ +/* This file is automatically generated. */ +#ifndef __GNU_LIB_NAMES_H +# error "Never use directly; include instead." +#endif + +#define LD_LINUX_RISCV64_LP64_SO "ld-linux-riscv64-lp64.so.1" +#define LD_SO "ld-linux-riscv64-lp64.so.1" +#define LIBANL_SO "libanl.so.1" +#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1" +#define LIBCRYPT_SO "libcrypt.so.1" +#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_NISPLUS_SO "libnss_nisplus.so.2" +#define LIBNSS_NIS_SO "libnss_nis.so.2" +#define LIBNSS_TEST1_SO "libnss_test1.so.2" +#define LIBNSS_TEST2_SO "libnss_test2.so.2" +#define LIBPTHREAD_SO "libpthread.so.0" +#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/libc/include/riscv64-linux-gnu/gnu/lib-names.h b/libc/include/riscv64-linux-gnu/gnu/lib-names.h new file mode 100644 index 0000000000..0d4874b764 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/gnu/lib-names.h @@ -0,0 +1,16 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#include + +#if defined __LP64__ && defined __riscv_float_abi_soft +# include +#endif +#if defined __LP64__ && defined __riscv_float_abi_double +# include +#endif + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/gnu/stubs-lp64.h b/libc/include/riscv64-linux-gnu/gnu/stubs-lp64.h new file mode 100644 index 0000000000..90477e3afc --- /dev/null +++ b/libc/include/riscv64-linux-gnu/gnu/stubs-lp64.h @@ -0,0 +1,47 @@ +/* This file is automatically generated. + It defines a symbol `__stub_FUNCTION' for each function + in the C library which is a stub, meaning it will fail + every time called, usually setting errno to ENOSYS. */ + +#ifdef _LIBC + #error Applications may not define the macro _LIBC +#endif + +#define __stub___compat_bdflush +#define __stub___compat_create_module +#define __stub___compat_get_kernel_syms +#define __stub___compat_query_module +#define __stub___compat_uselib +#define __stub_chflags +#define __stub_fattach +#define __stub_fchflags +#define __stub_fdetach +#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_getmsg +#define __stub_getpmsg +#define __stub_gtty +#define __stub_lchmod +#define __stub_putmsg +#define __stub_putpmsg +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty +#define __stub_sysctl \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/gnu/stubs.h b/libc/include/riscv64-linux-gnu/gnu/stubs.h new file mode 100644 index 0000000000..94f9eb18be --- /dev/null +++ b/libc/include/riscv64-linux-gnu/gnu/stubs.h @@ -0,0 +1,12 @@ +/* This file is automatically generated. + This file selects the right generated file of `__stub_FUNCTION' macros + based on the architecture being compiled for. */ + +#include + +#if defined __LP64__ && defined __riscv_float_abi_soft +# include +#endif +#if defined __LP64__ && defined __riscv_float_abi_double +# include +#endif \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/ieee754.h b/libc/include/riscv64-linux-gnu/ieee754.h new file mode 100644 index 0000000000..e347e4a6e5 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/ieee754.h @@ -0,0 +1,170 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +__BEGIN_DECLS + +union ieee754_float + { + float f; + + /* This is the IEEE 754 single-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int mantissa:23; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:23; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int quiet_nan:1; + unsigned int mantissa:22; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:22; + unsigned int quiet_nan:1; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee_nan; + }; + +#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ + + +union ieee754_double + { + double d; + + /* This is the IEEE 754 double-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:20; + unsigned int mantissa1:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:19; + unsigned int mantissa1:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ + + +union ieee854_long_double + { + long double d; + + /* This is the IEEE 854 quad-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:16; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:16; + unsigned int exponent:15; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:15; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:15; + unsigned int quiet_nan:1; + unsigned int exponent:15; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ + +__END_DECLS + +#endif /* ieee754.h */ \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/sys/asm.h b/libc/include/riscv64-linux-gnu/sys/asm.h new file mode 100644 index 0000000000..c42716a9fe --- /dev/null +++ b/libc/include/riscv64-linux-gnu/sys/asm.h @@ -0,0 +1,63 @@ +/* Miscellaneous macros. + Copyright (C) 2000-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_ASM_H +#define _SYS_ASM_H + +/* Macros to handle different pointer/register sizes for 32/64-bit code. */ +#if __riscv_xlen == 64 +# define PTRLOG 3 +# define SZREG 8 +# define REG_S sd +# define REG_L ld +#elif __riscv_xlen == 32 +# error "rv32i-based targets are not supported" +#else +# error __riscv_xlen must equal 32 or 64 +#endif + +#if !defined __riscv_float_abi_soft +/* For ABI uniformity, reserve 8 bytes for floats, even if double-precision + floating-point is not supported in hardware. */ +# if defined __riscv_float_abi_double +# define FREG_L fld +# define FREG_S fsd +# define SZFREG 8 +# else +# error unsupported FLEN +# endif +#endif + +/* Declare leaf routine. */ +#define LEAF(symbol) \ + .globl symbol; \ + .align 2; \ + .type symbol,@function; \ +symbol: \ + cfi_startproc; + +/* Mark end of function. */ +#undef END +#define END(function) \ + cfi_endproc; \ + .size function,.-function + +/* Stack alignment. */ +#define ALMASK ~15 + +#endif /* sys/asm.h */ \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/sys/cachectl.h b/libc/include/riscv64-linux-gnu/sys/cachectl.h new file mode 100644 index 0000000000..bd18c3c657 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/sys/cachectl.h @@ -0,0 +1,32 @@ +/* RISC-V instruction cache flushing interface + Copyright (C) 2017-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_CACHECTL_H +#define _SYS_CACHECTL_H 1 + +#include + +__BEGIN_DECLS + +extern int __riscv_flush_icache (void *__start, void *__end, + unsigned long int __flags); + +__END_DECLS + +#endif /* sys/cachectl.h */ \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/sys/ucontext.h b/libc/include/riscv64-linux-gnu/sys/ucontext.h new file mode 100644 index 0000000000..5fc777e662 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/sys/ucontext.h @@ -0,0 +1,110 @@ +/* struct ucontext definition, RISC-V version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + . */ + +/* Don't rely on this, the interface is currently messed up and may need to + be broken to be fixed. */ +#ifndef _SYS_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include + +typedef unsigned long int __riscv_mc_gp_state[32]; + +#ifdef __USE_MISC +# define NGREG 32 + +# define REG_PC 0 +# define REG_RA 1 +# define REG_SP 2 +# define REG_TP 4 +# define REG_S0 8 +# define REG_S1 9 +# define REG_A0 10 +# define REG_S2 18 +# define REG_NARGS 8 + +typedef unsigned long int greg_t; + +/* Container for all general registers. */ +typedef __riscv_mc_gp_state gregset_t; + +/* Container for floating-point state. */ +typedef union __riscv_mc_fp_state fpregset_t; +#endif + +struct __riscv_mc_f_ext_state + { + unsigned int __f[32]; + unsigned int __fcsr; + }; + +struct __riscv_mc_d_ext_state + { + unsigned long long int __f[32]; + unsigned int __fcsr; + }; + +struct __riscv_mc_q_ext_state + { + unsigned long long int __f[64] __attribute__ ((__aligned__ (16))); + unsigned int __fcsr; + /* Reserved for expansion of sigcontext structure. Currently zeroed + upon signal, and must be zero upon sigreturn. */ + unsigned int __glibc_reserved[3]; + }; + +union __riscv_mc_fp_state + { + struct __riscv_mc_f_ext_state __f; + struct __riscv_mc_d_ext_state __d; + struct __riscv_mc_q_ext_state __q; + }; + +typedef struct mcontext_t + { + __riscv_mc_gp_state __gregs; + union __riscv_mc_fp_state __fpregs; + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long int __uc_flags; + struct ucontext_t *uc_link; + stack_t uc_stack; + sigset_t uc_sigmask; + /* There's some padding here to allow sigset_t to be expanded in the + future. Though this is unlikely, other architectures put uc_sigmask + at the end of this structure and explicitly state it can be + expanded, so we didn't want to box ourselves in here. */ + char __glibc_reserved[1024 / 8 - sizeof (sigset_t)]; + /* We can't put uc_sigmask at the end of this structure because we need + to be able to expand sigcontext in the future. For example, the + vector ISA extension will almost certainly add ISA state. We want + to ensure all user-visible ISA state can be saved and restored via a + ucontext, so we're putting this at the end in order to allow for + infinite extensibility. Since we know this will be extended and we + assume sigset_t won't be extended an extreme amount, we're + prioritizing this. */ + mcontext_t uc_mcontext; + } ucontext_t; + +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/include/riscv64-linux-gnu/sys/user.h b/libc/include/riscv64-linux-gnu/sys/user.h new file mode 100644 index 0000000000..5dbff3ead6 --- /dev/null +++ b/libc/include/riscv64-linux-gnu/sys/user.h @@ -0,0 +1,23 @@ +/* Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H +#define _SYS_USER_H 1 + + + +#endif /* _SYS_USER_H */ \ No newline at end of file diff --git a/libc/glibc/sysdeps/unix/sysv/linux/s390/asm/unistd.h b/libc/include/s390x-linux-gnu/asm/unistd.h similarity index 100% rename from libc/glibc/sysdeps/unix/sysv/linux/s390/asm/unistd.h rename to libc/include/s390x-linux-gnu/asm/unistd.h diff --git a/libc/include/s390x-linux-gnu/bits/elfclass.h b/libc/include/s390x-linux-gnu/bits/elfclass.h new file mode 100644 index 0000000000..6c9777de93 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/elfclass.h @@ -0,0 +1,38 @@ +/* Copyright (C) 2001-2019 Free Software Foundation, Inc. + Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* This file specifies the native word size of the machine, which indicates + the ELF file class used for executables and shared objects on this + machine. */ + +#ifndef _LINK_H +# error "Never use directly; include instead." +#endif + +#include + +#define __ELF_NATIVE_CLASS __WORDSIZE + +#if __WORDSIZE == 64 +/* 64 bit Linux for S/390 is exceptional as it has .hash section with + 64 bit entries. */ +typedef uint64_t Elf_Symndx; +#else +/* 32 bit Linux for S/390 has normal .hash section entries with 32 bits. */ +typedef uint32_t Elf_Symndx; +#endif \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/endian.h b/libc/include/s390x-linux-gnu/bits/endian.h new file mode 100644 index 0000000000..ae6a488342 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/endian.h @@ -0,0 +1,7 @@ +/* s390 is big-endian */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#define __BYTE_ORDER __BIG_ENDIAN \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/environments.h b/libc/include/s390x-linux-gnu/bits/environments.h new file mode 100644 index 0000000000..6b6be99ad1 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/environments.h @@ -0,0 +1,96 @@ +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _UNISTD_H +# error "Never include this file directly. Use instead" +#endif + +#include + +/* This header should define the following symbols under the described + situations. A value `1' means that the model is always supported, + `-1' means it is never supported. Undefined means it cannot be + statically decided. + + _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type + _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type + + _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type + _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type + + The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, + _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, + _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were + used in previous versions of the Unix standard and are available + only for compatibility. +*/ + +#if __WORDSIZE == 64 + +/* Environments with 32-bit wide pointers are optionally provided. + Therefore following macros aren't defined: + # undef _POSIX_V7_ILP32_OFF32 + # undef _POSIX_V7_ILP32_OFFBIG + # undef _POSIX_V6_ILP32_OFF32 + # undef _POSIX_V6_ILP32_OFFBIG + # undef _XBS5_ILP32_OFF32 + # undef _XBS5_ILP32_OFFBIG + and users need to check at runtime. */ + +/* We also have no use (for now) for an environment with bigger pointers + and offsets. */ +# define _POSIX_V7_LPBIG_OFFBIG -1 +# define _POSIX_V6_LPBIG_OFFBIG -1 +# define _XBS5_LPBIG_OFFBIG -1 + +/* By default we have 64-bit wide `long int', pointers and `off_t'. */ +# define _POSIX_V7_LP64_OFF64 1 +# define _POSIX_V6_LP64_OFF64 1 +# define _XBS5_LP64_OFF64 1 + +#else /* __WORDSIZE == 32 */ + +/* By default we have 32-bit wide `int', `long int', pointers and `off_t' + and all platforms support LFS. */ +# define _POSIX_V7_ILP32_OFF32 1 +# define _POSIX_V7_ILP32_OFFBIG 1 +# define _POSIX_V6_ILP32_OFF32 1 +# define _POSIX_V6_ILP32_OFFBIG 1 +# define _XBS5_ILP32_OFF32 1 +# define _XBS5_ILP32_OFFBIG 1 + +/* We optionally provide an environment with the above size but an 64-bit + side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ + +/* Environments with 64-bit wide pointers can be provided, + so these macros aren't defined: + # undef _POSIX_V7_LP64_OFF64 + # undef _POSIX_V7_LPBIG_OFFBIG + # undef _POSIX_V6_LP64_OFF64 + # undef _POSIX_V6_LPBIG_OFFBIG + # undef _XBS5_LP64_OFF64 + # undef _XBS5_LPBIG_OFFBIG + and sysconf tests for it at runtime. */ + +#endif /* __WORDSIZE == 32 */ + +#define __ILP32_OFF32_CFLAGS "-m31" +#define __ILP32_OFFBIG_CFLAGS "-m31 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +#define __ILP32_OFF32_LDFLAGS "-m31" +#define __ILP32_OFFBIG_LDFLAGS "-m31" +#define __LP64_OFF64_CFLAGS "-m64" +#define __LP64_OFF64_LDFLAGS "-m64" \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/fcntl.h b/libc/include/s390x-linux-gnu/bits/fcntl.h new file mode 100644 index 0000000000..5280364236 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/fcntl.h @@ -0,0 +1,71 @@ +/* O_*, F_*, FD_* bit values for Linux. + Copyright (C) 2000-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#include + +#if __WORDSIZE == 64 +/* Not necessary, files are always with 64bit off_t. */ +# define __O_LARGEFILE 0 +#endif + +#if __WORDSIZE == 64 +/* Not necessary, we always have 64-bit offsets. */ +# define F_GETLK64 5 /* Get record locking info. */ +# define F_SETLK64 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW64 7 /* Set record locking info (blocking). */ +#endif + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +#if __WORDSIZE == 64 +# define __POSIX_FADV_DONTNEED 6 /* Don't need these pages. */ +# define __POSIX_FADV_NOREUSE 7 /* Data will be accessed once. */ +#else +# define __POSIX_FADV_DONTNEED 4 /* Don't need these pages. */ +# define __POSIX_FADV_NOREUSE 5 /* Data will be accessed once. */ +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/fenv.h b/libc/include/s390x-linux-gnu/bits/fenv.h new file mode 100644 index 0000000000..8183b9190c --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/fenv.h @@ -0,0 +1,100 @@ +/* Copyright (C) 2000-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Denis Joseph Barrow . + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + +/* Define bits representing the exception. We use the bit positions + of the appropriate bits in the FPU control word. */ +enum + { + FE_INVALID = +#define FE_INVALID 0x80 + FE_INVALID, + FE_DIVBYZERO = +#define FE_DIVBYZERO 0x40 + FE_DIVBYZERO, + FE_OVERFLOW = +#define FE_OVERFLOW 0x20 + FE_OVERFLOW, + FE_UNDERFLOW = +#define FE_UNDERFLOW 0x10 + FE_UNDERFLOW, + FE_INEXACT = +#define FE_INEXACT 0x08 + FE_INEXACT + }; +/* We dont use the y bit of the DXC in the floating point control register + as glibc has no FE encoding for fe inexact incremented + or fe inexact truncated. + We currently use the flag bits in the fpc + as these are sticky for feholdenv & feupdatenv as it is defined + in the HP Manpages. */ + + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +enum + { + FE_TONEAREST = +#define FE_TONEAREST 0 + FE_TONEAREST, + FE_DOWNWARD = +#define FE_DOWNWARD 0x3 + FE_DOWNWARD, + FE_UPWARD = +#define FE_UPWARD 0x2 + FE_UPWARD, + FE_TOWARDZERO = +#define FE_TOWARDZERO 0x1 + FE_TOWARDZERO + }; + + +/* Type representing exception flags. */ +typedef unsigned int fexcept_t; /* size of fpc */ + + +/* Type representing floating-point environment. This function corresponds + to the layout of the block written by the `fstenv'. */ +typedef struct +{ + fexcept_t __fpc; + void *__unused; + /* The field __unused (formerly __ieee_instruction_pointer) is a relict from + commit "Remove PTRACE_PEEKUSER" (87b9b50f0d4b92248905e95a06a13c513dc45e59) + and isn´t used anymore. */ +} fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((const fenv_t *) -1) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exceptions are masked. */ +# define FE_NOMASK_ENV ((const fenv_t *) -2) +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef unsigned int femode_t; + +/* Default floating-point control modes. */ +# define FE_DFL_MODE ((const femode_t *) -1L) +#endif \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/floatn.h b/libc/include/s390x-linux-gnu/bits/floatn.h new file mode 100644 index 0000000000..5e7e3f4d2e --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/floatn.h @@ -0,0 +1,97 @@ +/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/s390x-linux-gnu/bits/flt-eval-method.h b/libc/include/s390x-linux-gnu/bits/flt-eval-method.h new file mode 100644 index 0000000000..113d0c95bf --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/flt-eval-method.h @@ -0,0 +1,24 @@ +/* Define __GLIBC_FLT_EVAL_METHOD. S/390 version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +/* This value is used because of a historical mistake. */ +#define __GLIBC_FLT_EVAL_METHOD 1 \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/hwcap.h b/libc/include/s390x-linux-gnu/bits/hwcap.h new file mode 100644 index 0000000000..87b4bd47c6 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/hwcap.h @@ -0,0 +1,41 @@ +/* Defines for bits in AT_HWCAP. + Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_AUXV_H +# error "Never include directly; use instead." +#endif + +/* + * The following must match the kernels asm/elf.h. + * Note that these are *not* the same as the STORE FACILITY LIST bits. + */ +#define HWCAP_S390_ESAN3 1 +#define HWCAP_S390_ZARCH 2 +#define HWCAP_S390_STFLE 4 +#define HWCAP_S390_MSA 8 +#define HWCAP_S390_LDISP 16 +#define HWCAP_S390_EIMM 32 +#define HWCAP_S390_DFP 64 +#define HWCAP_S390_HPAGE 128 +#define HWCAP_S390_ETF3EH 256 +#define HWCAP_S390_HIGH_GPRS 512 +#define HWCAP_S390_TE 1024 +#define HWCAP_S390_VX 2048 +#define HWCAP_S390_VXD 4096 +#define HWCAP_S390_VXE 8192 +#define HWCAP_S390_GS 16384 \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/ipc.h b/libc/include/s390x-linux-gnu/bits/ipc.h new file mode 100644 index 0000000000..70d5293edc --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/ipc.h @@ -0,0 +1,60 @@ +/* Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IPC_H +# error "Never use directly; include instead." +#endif + +#include +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#ifdef __USE_GNU +#define IPC_INFO 3 /* See ipcs. */ +#endif + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + __uid_t uid; /* Owner's user ID. */ + __gid_t gid; /* Owner's group ID. */ + __uid_t cuid; /* Creator's user ID. */ + __gid_t cgid; /* Creator's group ID. */ +#if __WORDSIZE == 64 + __mode_t mode; /* Read/write permission. */ +#else + unsigned short int mode; /* Read/write permission. */ + unsigned short int __pad1; +#endif + unsigned short int __seq; /* Sequence number. */ + unsigned short int __pad2; + unsigned long int __glibc_reserved1; + unsigned long int __glibc_reserved2; + }; \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/link.h b/libc/include/s390x-linux-gnu/bits/link.h new file mode 100644 index 0000000000..04d7a5e453 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/link.h @@ -0,0 +1,139 @@ +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + +#if defined HAVE_S390_VX_ASM_SUPPORT +typedef char La_s390_vr[16]; +#endif + +#if __ELF_NATIVE_CLASS == 32 + +/* Registers for entry into PLT on s390-32. */ +typedef struct La_s390_32_regs +{ + uint32_t lr_r2; + uint32_t lr_r3; + uint32_t lr_r4; + uint32_t lr_r5; + uint32_t lr_r6; + double lr_fp0; + double lr_fp2; +# if defined HAVE_S390_VX_ASM_SUPPORT + La_s390_vr lr_v24; + La_s390_vr lr_v25; + La_s390_vr lr_v26; + La_s390_vr lr_v27; + La_s390_vr lr_v28; + La_s390_vr lr_v29; + La_s390_vr lr_v30; + La_s390_vr lr_v31; +# endif +} La_s390_32_regs; + +/* Return values for calls from PLT on s390-32. */ +typedef struct La_s390_32_retval +{ + uint32_t lrv_r2; + uint32_t lrv_r3; + double lrv_fp0; +# if defined HAVE_S390_VX_ASM_SUPPORT + La_s390_vr lrv_v24; +# endif +} La_s390_32_retval; + + +__BEGIN_DECLS + +extern Elf32_Addr la_s390_32_gnu_pltenter (Elf32_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_s390_32_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_s390_32_gnu_pltexit (Elf32_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_s390_32_regs *__inregs, + La_s390_32_retval *__outregs, + const char *symname); + +__END_DECLS + +#else + +/* Registers for entry into PLT on s390-64. */ +typedef struct La_s390_64_regs +{ + uint64_t lr_r2; + uint64_t lr_r3; + uint64_t lr_r4; + uint64_t lr_r5; + uint64_t lr_r6; + double lr_fp0; + double lr_fp2; + double lr_fp4; + double lr_fp6; +# if defined HAVE_S390_VX_ASM_SUPPORT + La_s390_vr lr_v24; + La_s390_vr lr_v25; + La_s390_vr lr_v26; + La_s390_vr lr_v27; + La_s390_vr lr_v28; + La_s390_vr lr_v29; + La_s390_vr lr_v30; + La_s390_vr lr_v31; +# endif +} La_s390_64_regs; + +/* Return values for calls from PLT on s390-64. */ +typedef struct La_s390_64_retval +{ + uint64_t lrv_r2; + double lrv_fp0; +# if defined HAVE_S390_VX_ASM_SUPPORT + La_s390_vr lrv_v24; +# endif +} La_s390_64_retval; + + +__BEGIN_DECLS + +extern Elf64_Addr la_s390_64_gnu_pltenter (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_s390_64_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_s390_64_gnu_pltexit (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_s390_64_regs *__inregs, + La_s390_64_retval *__outregs, + const char *__symname); + +__END_DECLS + +#endif \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/long-double.h b/libc/include/s390x-linux-gnu/bits/long-double.h new file mode 100644 index 0000000000..9fe5a6c570 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/long-double.h @@ -0,0 +1,24 @@ +/* Properties of long double type. ldbl-opt version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef __NO_LONG_DOUBLE_MATH +# define __LONG_DOUBLE_MATH_OPTIONAL 1 +# ifndef __LONG_DOUBLE_128__ +# define __NO_LONG_DOUBLE_MATH 1 +# endif +#endif \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/procfs-extra.h b/libc/include/s390x-linux-gnu/bits/procfs-extra.h new file mode 100644 index 0000000000..64ea29c420 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/procfs-extra.h @@ -0,0 +1,75 @@ +/* Extra sys/procfs.h definitions. S/390 version. + Copyright (C) 2000-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +#if __WORDSIZE == 64 + +/* Provide 32-bit variants so that BFD can read 32-bit + core files. */ +#define ELF_NGREG32 36 +typedef unsigned int elf_greg_t32; +typedef elf_greg_t32 + elf_gregset_t32[ELF_NGREG32] __attribute__ ((__aligned__ (8))); +typedef elf_fpregset_t elf_fpregset_t32; + +struct elf_prstatus32 + { + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned int pr_sigpend; /* Set of pending signals. */ + unsigned int pr_sighold; /* Set of held signals. */ + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct + { + int tv_sec, tv_usec; + } pr_utime, /* User time. */ + pr_stime, /* System time. */ + pr_cutime, /* Cumulative user time. */ + pr_cstime; /* Cumulative system time. */ + elf_gregset_t32 pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + +struct elf_prpsinfo32 + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned int pr_flag; /* Flags. */ + unsigned short int pr_uid; + unsigned short int pr_gid; + int pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + +typedef elf_gregset_t32 prgregset32_t; +typedef elf_fpregset_t32 prfpregset32_t; + +typedef struct elf_prstatus32 prstatus32_t; +typedef struct elf_prpsinfo32 prpsinfo32_t; + +#endif \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/procfs-id.h b/libc/include/s390x-linux-gnu/bits/procfs-id.h new file mode 100644 index 0000000000..e891c80b06 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/procfs-id.h @@ -0,0 +1,30 @@ +/* Types of pr_uid and pr_gid in struct elf_prpsinfo. S/390 version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +#if __WORDSIZE == 64 +typedef unsigned int __pr_uid_t; +typedef unsigned int __pr_gid_t; +#else +typedef unsigned short int __pr_uid_t; +typedef unsigned short int __pr_gid_t; +#endif \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/procfs.h b/libc/include/s390x-linux-gnu/bits/procfs.h new file mode 100644 index 0000000000..4b1540813a --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/procfs.h @@ -0,0 +1,29 @@ +/* Types for registers for sys/procfs.h. S/390 version. + Copyright (C) 2000-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +#include + +typedef greg_t elf_greg_t; +#define ELF_NGREG NGREG +typedef gregset_t elf_gregset_t; +typedef fpreg_t elf_fpreg_t; +typedef fpregset_t elf_fpregset_t; \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/pthreadtypes-arch.h b/libc/include/s390x-linux-gnu/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..f956573147 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/pthreadtypes-arch.h @@ -0,0 +1,79 @@ +/* Copyright (C) 2003-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 __WORDSIZE == 64 +# 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_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +/* Definitions for internal mutex struct. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 1 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64) +#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64) + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +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 __WORDSIZE == 64 + 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 + 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; + int __cur_writer; +#endif +}; + +#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 + +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/semaphore.h b/libc/include/s390x-linux-gnu/bits/semaphore.h new file mode 100644 index 0000000000..ee86f96737 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/semaphore.h @@ -0,0 +1,39 @@ +/* Copyright (C) 2003-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Martin Schwidefsky , 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + +#include + +#if __WORDSIZE == 64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/setjmp.h b/libc/include/s390x-linux-gnu/bits/setjmp.h new file mode 100644 index 0000000000..51768deac7 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/setjmp.h @@ -0,0 +1,47 @@ +/* Copyright (C) 2000-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 the machine-dependent type `jmp_buf'. IBM s390 version. */ + +#ifndef __S390_SETJMP_H__ +#define __S390_SETJMP_H__ + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +#include + +#ifndef _ASM + +typedef struct __s390_jmp_buf +{ + /* We save registers 6-15. */ + long int __gregs[10]; + +# if __WORDSIZE == 64 + /* We save fpu registers f8 - f15. */ + long __fpregs[8]; +# else + /* We save fpu registers 4 and 6. */ + long __fpregs[4]; +# endif +} __jmp_buf[1]; + +#endif + +#endif /* __S390_SETJMP_H__ */ \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/sigaction.h b/libc/include/s390x-linux-gnu/bits/sigaction.h new file mode 100644 index 0000000000..9134fa13a1 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/sigaction.h @@ -0,0 +1,117 @@ +/* Definitions for 31 & 64 bit S/390 sigaction. + Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#include + +#if __WORDSIZE == 64 +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* 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 + + /* Special flags. */ + int __glibc_reserved0; + int sa_flags; + + /* Restore handler. */ + void (*sa_restorer) (void); + + /* Additional set of signals to be blocked. */ + __sigset_t sa_mask; + }; +#else +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* 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; + + /* Special flags. */ + int sa_flags; + + /* Restore handler. */ + void (*sa_restorer) (void); + }; +#endif + +/* Bits in `sa_flags'. */ +#define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ +#define SA_NOCLDWAIT 2 /* Don't create zombie on child death. */ +#define SA_SIGINFO 4 /* 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_RESTART 0x10000000 /* Restart syscall on signal return. */ +# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when + its handler is being executed. */ +# define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ +#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_BLOCK 0 /* Block signals. */ +#define SIG_UNBLOCK 1 /* Unblock signals. */ +#define SIG_SETMASK 2 /* Set the set of blocked signals. */ + +#endif \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/stat.h b/libc/include/s390x-linux-gnu/bits/stat.h new file mode 100644 index 0000000000..af5edf36d9 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/stat.h @@ -0,0 +1,265 @@ +/* Copyright (C) 2000-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +#include + +#if __WORDSIZE == 64 +/* Versions of the `struct stat' data structure. */ +# define _STAT_VER_KERNEL 0 +# define _STAT_VER_LINUX 1 +# define _STAT_VER _STAT_VER_LINUX + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 0 +#else +/* Versions of the `struct stat' data structure. */ +# define _STAT_VER_LINUX_OLD 1 +# define _STAT_VER_KERNEL 1 +# define _STAT_VER_SVR4 2 +# define _STAT_VER_LINUX 3 +# define _STAT_VER _STAT_VER_LINUX + +/* Versions of the `xmknod' interface. */ +# define _MKNOD_VER_LINUX 1 +# define _MKNOD_VER_SVR4 2 +# define _MKNOD_VER _MKNOD_VER_LINUX +#endif + +#if __WORDSIZE == 64 +struct stat + { + __dev_t st_dev; /* Device. */ + __ino_t st_ino; /* File serial number. */ + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + int __glibc_reserved0; + __dev_t st_rdev; /* Device number, if device. */ + __off_t st_size; /* Size of file, in bytes. */ +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt_t st_blocks; /* Nr. 512-byte blocks allocated. */ + long int __glibc_reserved[3]; + }; +#else +struct stat + { + __dev_t st_dev; /* Device. */ + unsigned int __pad1; +# ifndef __USE_FILE_OFFSET64 + __ino_t st_ino; /* File serial number. */ +# else + __ino_t __st_ino; /* 32bit file serial number. */ +# endif + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned int __pad2; +# ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +# else + __off64_t st_size; /* Size of file, in bytes. */ +# endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +# ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +# else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# endif +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif +# ifndef __USE_FILE_OFFSET64 + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; +# else + __ino64_t st_ino; /* File serial number. */ +# endif + }; +#endif + +#ifdef __USE_LARGEFILE64 +# if __WORDSIZE == 64 +/* Note stat64 is the same shape as stat. */ +struct stat64 + { + __dev_t st_dev; /* Device. */ + __ino64_t st_ino; /* File serial number. */ + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + int __glibc_reserved0; + __dev_t st_rdev; /* Device number, if device. */ + __off_t st_size; /* Size of file, in bytes. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ + long int __glibc_reserved[3]; + }; +# else +struct stat64 + { + __dev_t st_dev; /* Device. */ + unsigned int __pad1; + + __ino_t __st_ino; /* 32bit file serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + __ino64_t st_ino; /* File serial number. */ + }; +# endif +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/statfs.h b/libc/include/s390x-linux-gnu/bits/statfs.h new file mode 100644 index 0000000000..693968e556 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/statfs.h @@ -0,0 +1,69 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + { + unsigned int f_type; + unsigned int f_bsize; +#ifndef __USE_FILE_OFFSET64 + __fsblkcnt_t f_blocks; + __fsblkcnt_t f_bfree; + __fsblkcnt_t f_bavail; + __fsfilcnt_t f_files; + __fsfilcnt_t f_ffree; +#else + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_bavail; + __fsfilcnt64_t f_files; + __fsfilcnt64_t f_ffree; +#endif + __fsid_t f_fsid; + unsigned int f_namelen; + unsigned int f_frsize; + unsigned int f_flags; + unsigned int f_spare[4]; + }; + +#ifdef __USE_LARGEFILE64 +struct statfs64 + { + unsigned int f_type; + unsigned int f_bsize; + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_bavail; + __fsfilcnt64_t f_files; + __fsfilcnt64_t f_ffree; + __fsid_t f_fsid; + unsigned int f_namelen; + unsigned int f_frsize; + unsigned int f_flags; + unsigned int f_spare[4]; + }; +#endif + +/* Tell code we have this member. */ +#define _STATFS_F_NAMELEN +#define _STATFS_F_FRSIZE +#define _STATFS_F_FLAGS \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/typesizes.h b/libc/include/s390x-linux-gnu/bits/typesizes.h new file mode 100644 index 0000000000..0db5047dae --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/typesizes.h @@ -0,0 +1,89 @@ +/* bits/typesizes.h -- underlying types for *_t. Linux/s390 version. + Copyright (C) 2003-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_TYPES_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_TYPESIZES_H +#define _BITS_TYPESIZES_H 1 + +/* See for the meaning of these macros. This file exists so + that need not vary across different GNU platforms. */ + +#define __DEV_T_TYPE __UQUAD_TYPE +#define __UID_T_TYPE __U32_TYPE +#define __GID_T_TYPE __U32_TYPE +#define __INO_T_TYPE __ULONGWORD_TYPE +#define __INO64_T_TYPE __UQUAD_TYPE +#define __MODE_T_TYPE __U32_TYPE +#define __NLINK_T_TYPE __UWORD_TYPE +#define __OFF_T_TYPE __SLONGWORD_TYPE +#define __OFF64_T_TYPE __SQUAD_TYPE +#define __PID_T_TYPE __S32_TYPE +#define __RLIM_T_TYPE __ULONGWORD_TYPE +#define __RLIM64_T_TYPE __UQUAD_TYPE +#define __BLKCNT_T_TYPE __SLONGWORD_TYPE +#define __BLKCNT64_T_TYPE __SQUAD_TYPE +#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE +#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE +#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE +#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __FSWORD_T_TYPE __SWORD_TYPE +#define __ID_T_TYPE __U32_TYPE +#define __CLOCK_T_TYPE __SLONGWORD_TYPE +#define __TIME_T_TYPE __SLONGWORD_TYPE +#define __USECONDS_T_TYPE __U32_TYPE +#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#define __DADDR_T_TYPE __S32_TYPE +#define __KEY_T_TYPE __S32_TYPE +#define __CLOCKID_T_TYPE __S32_TYPE +#define __TIMER_T_TYPE void * +#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE +#define __FSID_T_TYPE struct { int __val[2]; } +#if defined __GNUC__ && __GNUC__ <= 2 +/* Compatibility with g++ 2.95.x. */ +#define __SSIZE_T_TYPE __SWORD_TYPE +#else +/* size_t is unsigned long int on s390 -m31. */ +#define __SSIZE_T_TYPE __SLONGWORD_TYPE +#endif +#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE +#define __CPU_MASK_TYPE __ULONGWORD_TYPE + +#ifdef __s390x__ +/* Tell the libc code that off_t and off64_t are actually the same type + for all ABI purposes, even if possibly expressed as different base types + for C type-checking purposes. */ +# define __OFF_T_MATCHES_OFF64_T 1 + +/* Same for ino_t and ino64_t. */ +# define __INO_T_MATCHES_INO64_T 1 + +/* And for __rlim_t and __rlim64_t. */ +# define __RLIM_T_MATCHES_RLIM64_T 1 +#else +# define __RLIM_T_MATCHES_RLIM64_T 0 +#endif + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + + +#endif /* bits/typesizes.h */ \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/utmp.h b/libc/include/s390x-linux-gnu/bits/utmp.h new file mode 100644 index 0000000000..4476231443 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/utmp.h @@ -0,0 +1,126 @@ +/* The `struct utmp' type, describing entries in the utmp file. GNU version. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _UTMP_H +# error "Never include directly; use instead." +#endif + +#include +#include +#include +#include + + +#define UT_LINESIZE 32 +#define UT_NAMESIZE 32 +#define UT_HOSTSIZE 256 + + +/* The structure describing an entry in the database of + previous logins. */ +struct lastlog + { +#if __WORDSIZE == 32 + int64_t ll_time; +#else + __time_t ll_time; +#endif + char ll_line[UT_LINESIZE]; + char ll_host[UT_HOSTSIZE]; + }; + + +/* The structure describing the status of a terminated process. This + type is used in `struct utmp' below. */ +struct exit_status + { + short int e_termination; /* Process termination status. */ + short int e_exit; /* Process exit status. */ + }; + + +/* The structure describing an entry in the user accounting database. */ +struct utmp +{ + short int ut_type; /* Type of login. */ + pid_t ut_pid; /* Process ID of login process. */ + char ut_line[UT_LINESIZE] + __attribute_nonstring__; /* Devicename. */ + char ut_id[4]; /* Inittab ID. */ + char ut_user[UT_NAMESIZE] + __attribute_nonstring__; /* Username. */ + char ut_host[UT_HOSTSIZE] + __attribute_nonstring__; /* Hostname for remote login. */ + struct exit_status ut_exit; /* Exit status of a process marked + as DEAD_PROCESS. */ +/* The ut_session and ut_tv fields must be the same size when compiled + 32- and 64-bit. This allows data files and shared memory to be + shared between 32- and 64-bit applications. */ +#if __WORDSIZE == 32 + int64_t ut_session; /* Session ID, used for windowing. */ + struct + { + int64_t tv_sec; /* Seconds. */ + int64_t tv_usec; /* Microseconds. */ + } ut_tv; /* Time entry was made. */ +#else + long int ut_session; /* Session ID, used for windowing. */ + struct timeval ut_tv; /* Time entry was made. */ +#endif + + int32_t ut_addr_v6[4]; /* Internet address of remote host. */ + char __glibc_reserved[20]; /* Reserved for future use. */ +}; + +/* Backwards compatibility hacks. */ +#define ut_name ut_user +#ifndef _NO_UT_TIME +/* We have a problem here: `ut_time' is also used otherwise. Define + _NO_UT_TIME if the compiler complains. */ +# define ut_time ut_tv.tv_sec +#endif +#define ut_xtime ut_tv.tv_sec +#define ut_addr ut_addr_v6[0] + + +/* Values for the `ut_type' field of a `struct utmp'. */ +#define EMPTY 0 /* No valid user accounting information. */ + +#define RUN_LVL 1 /* The system's runlevel. */ +#define BOOT_TIME 2 /* Time of system boot. */ +#define NEW_TIME 3 /* Time after system clock changed. */ +#define OLD_TIME 4 /* Time when system clock changed. */ + +#define INIT_PROCESS 5 /* Process spawned by the init process. */ +#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ +#define USER_PROCESS 7 /* Normal process. */ +#define DEAD_PROCESS 8 /* Terminated process. */ + +#define ACCOUNTING 9 + +/* Old Linux name for the EMPTY type. */ +#define UT_UNKNOWN EMPTY + + +/* Tell the user that we have a modern system with UT_HOST, UT_PID, + UT_TYPE, UT_ID and UT_TV fields. */ +#define _HAVE_UT_TYPE 1 +#define _HAVE_UT_PID 1 +#define _HAVE_UT_ID 1 +#define _HAVE_UT_TV 1 +#define _HAVE_UT_HOST 1 \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/utmpx.h b/libc/include/s390x-linux-gnu/bits/utmpx.h new file mode 100644 index 0000000000..d498d9f115 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/utmpx.h @@ -0,0 +1,102 @@ +/* Structures and definitions for the user accounting database. GNU version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _UTMPX_H +# error "Never include directly; use instead." +#endif + +#include +#include +#include + + +#ifdef __USE_GNU +# include +# define _PATH_UTMPX _PATH_UTMP +# define _PATH_WTMPX _PATH_WTMP +#endif + + +#define __UT_LINESIZE 32 +#define __UT_NAMESIZE 32 +#define __UT_HOSTSIZE 256 + + +/* The structure describing the status of a terminated process. This + type is used in `struct utmpx' below. */ +struct __exit_status + { +#ifdef __USE_GNU + short int e_termination; /* Process termination status. */ + short int e_exit; /* Process exit status. */ +#else + short int __e_termination; /* Process termination status. */ + short int __e_exit; /* Process exit status. */ +#endif + }; + + +/* The structure describing an entry in the user accounting database. */ +struct utmpx +{ + short int ut_type; /* Type of login. */ + __pid_t ut_pid; /* Process ID of login process. */ + char ut_line[__UT_LINESIZE]; /* Devicename. */ + char ut_id[4]; /* Inittab ID. */ + char ut_user[__UT_NAMESIZE]; /* Username. */ + char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */ + struct __exit_status ut_exit; /* Exit status of a process marked + as DEAD_PROCESS. */ + +/* The fields ut_session and ut_tv must be the same size when compiled + 32- and 64-bit. This allows files and shared memory to be shared + between 32- and 64-bit applications. */ +#if __WORDSIZE == 32 + __int64_t ut_session; /* Session ID, used for windowing. */ + struct + { + __int64_t tv_sec; /* Seconds. */ + __int64_t tv_usec; /* Microseconds. */ + } ut_tv; /* Time entry was made. */ +#else + long int ut_session; /* Session ID, used for windowing. */ + struct timeval ut_tv; /* Time entry was made. */ +#endif + __int32_t ut_addr_v6[4]; /* Internet address of remote host. */ + char __glibc_reserved[20]; /* Reserved for future use. */ +}; + + +/* Values for the `ut_type' field of a `struct utmpx'. */ +#define EMPTY 0 /* No valid user accounting information. */ + +#ifdef __USE_GNU +# define RUN_LVL 1 /* The system's runlevel. */ +#endif +#define BOOT_TIME 2 /* Time of system boot. */ +#define NEW_TIME 3 /* Time after system clock changed. */ +#define OLD_TIME 4 /* Time when system clock changed. */ + +#define INIT_PROCESS 5 /* Process spawned by the init process. */ +#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */ +#define USER_PROCESS 7 /* Normal process. */ +#define DEAD_PROCESS 8 /* Terminated process. */ + +#ifdef __USE_GNU +# define ACCOUNTING 9 /* System accounting. */ +#endif \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/wordsize.h b/libc/include/s390x-linux-gnu/bits/wordsize.h new file mode 100644 index 0000000000..8f3304644b --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/wordsize.h @@ -0,0 +1,11 @@ +/* Determine the wordsize from the preprocessor defines. */ + +#if defined __s390x__ +# define __WORDSIZE 64 +#else +# define __WORDSIZE 32 +# define __WORDSIZE32_SIZE_ULONG 1 +# define __WORDSIZE32_PTRDIFF_LONG 0 +#endif + +#define __WORDSIZE_TIME64_COMPAT32 0 \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/bits/xtitypes.h b/libc/include/s390x-linux-gnu/bits/xtitypes.h new file mode 100644 index 0000000000..5a67a56a51 --- /dev/null +++ b/libc/include/s390x-linux-gnu/bits/xtitypes.h @@ -0,0 +1,33 @@ +/* bits/xtitypes.h -- Define some types used by . S390/S390x + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _STROPTS_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_XTITYPES_H +#define _BITS_XTITYPES_H 1 + +#include + +/* This type is used by some structs in . */ +typedef __S32_TYPE __t_scalar_t; +typedef __U32_TYPE __t_uscalar_t; + + +#endif /* bits/xtitypes.h */ \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/fpu_control.h b/libc/include/s390x-linux-gnu/fpu_control.h new file mode 100644 index 0000000000..8418548900 --- /dev/null +++ b/libc/include/s390x-linux-gnu/fpu_control.h @@ -0,0 +1,43 @@ +/* FPU control word definitions. Stub version. + Copyright (C) 2000-2019 Free Software Foundation, Inc. + Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com) and + Martin Schwidefsky (schwidefsky@de.ibm.com). + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FPU_CONTROL_H +#define _FPU_CONTROL_H + +#include + +/* These bits are reserved are not changed. */ +#define _FPU_RESERVED 0x0707FFFC + +/* The fdlibm code requires no interrupts for exceptions. Don't + change the rounding mode, it would break long double I/O! */ +#define _FPU_DEFAULT 0x00000000 /* Default value. */ + +/* Type of the control word. */ +typedef unsigned int fpu_control_t; + +/* Macros for accessing the hardware control word. */ +#define _FPU_GETCW(cw) __asm__ __volatile__ ("efpc %0,0" : "=d" (cw)) +#define _FPU_SETCW(cw) __asm__ __volatile__ ("sfpc %0,0" : : "d" (cw)) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* _FPU_CONTROL_H */ \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/gnu/lib-names-64.h b/libc/include/s390x-linux-gnu/gnu/lib-names-64.h new file mode 100644 index 0000000000..268b163638 --- /dev/null +++ b/libc/include/s390x-linux-gnu/gnu/lib-names-64.h @@ -0,0 +1,31 @@ +/* This file is automatically generated. */ +#ifndef __GNU_LIB_NAMES_H +# error "Never use directly; include instead." +#endif + +#define LD64_SO "ld64.so.1" +#define LD_SO "ld64.so.1" +#define LIBANL_SO "libanl.so.1" +#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1" +#define LIBCRYPT_SO "libcrypt.so.1" +#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_NISPLUS_SO "libnss_nisplus.so.2" +#define LIBNSS_NIS_SO "libnss_nis.so.2" +#define LIBNSS_TEST1_SO "libnss_test1.so.2" +#define LIBNSS_TEST2_SO "libnss_test2.so.2" +#define LIBPTHREAD_SO "libpthread.so.0" +#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/libc/include/s390x-linux-gnu/gnu/lib-names.h b/libc/include/s390x-linux-gnu/gnu/lib-names.h new file mode 100644 index 0000000000..ad6471507a --- /dev/null +++ b/libc/include/s390x-linux-gnu/gnu/lib-names.h @@ -0,0 +1,16 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#include + +#if __WORDSIZE == 32 +# include +#endif +#if __WORDSIZE == 64 +# include +#endif + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/gnu/stubs-64.h b/libc/include/s390x-linux-gnu/gnu/stubs-64.h new file mode 100644 index 0000000000..b7ab3fcab4 --- /dev/null +++ b/libc/include/s390x-linux-gnu/gnu/stubs-64.h @@ -0,0 +1,24 @@ +/* This file is automatically generated. + It defines a symbol `__stub_FUNCTION' for each function + in the C library which is a stub, meaning it will fail + every time called, usually setting errno to ENOSYS. */ + +#ifdef _LIBC + #error Applications may not define the macro _LIBC +#endif + +#define __stub_chflags +#define __stub_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_getmsg +#define __stub_gtty +#define __stub_lchmod +#define __stub_pkey_alloc +#define __stub_pkey_free +#define __stub_putmsg +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/gnu/stubs.h b/libc/include/s390x-linux-gnu/gnu/stubs.h new file mode 100644 index 0000000000..120171a87a --- /dev/null +++ b/libc/include/s390x-linux-gnu/gnu/stubs.h @@ -0,0 +1,12 @@ +/* This file is automatically generated. + This file selects the right generated file of `__stub_FUNCTION' macros + based on the architecture being compiled for. */ + +#include + +#if __WORDSIZE == 32 +# include +#endif +#if __WORDSIZE == 64 +# include +#endif \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/ieee754.h b/libc/include/s390x-linux-gnu/ieee754.h new file mode 100644 index 0000000000..e347e4a6e5 --- /dev/null +++ b/libc/include/s390x-linux-gnu/ieee754.h @@ -0,0 +1,170 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +__BEGIN_DECLS + +union ieee754_float + { + float f; + + /* This is the IEEE 754 single-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int mantissa:23; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:23; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int quiet_nan:1; + unsigned int mantissa:22; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:22; + unsigned int quiet_nan:1; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee_nan; + }; + +#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ + + +union ieee754_double + { + double d; + + /* This is the IEEE 754 double-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:20; + unsigned int mantissa1:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:19; + unsigned int mantissa1:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ + + +union ieee854_long_double + { + long double d; + + /* This is the IEEE 854 quad-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:16; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:16; + unsigned int exponent:15; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:15; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:15; + unsigned int quiet_nan:1; + unsigned int exponent:15; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ + +__END_DECLS + +#endif /* ieee754.h */ \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/sys/elf.h b/libc/include/s390x-linux-gnu/sys/elf.h new file mode 100644 index 0000000000..4a2e879b4a --- /dev/null +++ b/libc/include/s390x-linux-gnu/sys/elf.h @@ -0,0 +1,25 @@ +/* Copyright (C) 2000-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_ELF_H +#define _SYS_ELF_H 1 + +#warning "This header is obsolete; use instead." + +#include + +#endif /* _SYS_ELF_H */ \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/sys/ptrace.h b/libc/include/s390x-linux-gnu/sys/ptrace.h new file mode 100644 index 0000000000..8afedb8c56 --- /dev/null +++ b/libc/include/s390x-linux-gnu/sys/ptrace.h @@ -0,0 +1,225 @@ +/* `ptrace' debugger support interface. Linux/S390 version. + Copyright (C) 2000-2019 Free Software Foundation, Inc. + Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include +#include + +__BEGIN_DECLS +#if defined _LINUX_PTRACE_H || defined _S390_PTRACE_H +/* Kludge to stop stuff gdb & strace compiles from getting upset + */ +# undef PTRACE_TRACEME +# undef PTRACE_PEEKTEXT +# undef PTRACE_PEEKDATA +# undef PTRACE_POKETEXT +# undef PTRACE_POKEDATA +# undef PTRACE_CONT +# undef PTRACE_KILL +# undef PTRACE_SINGLESTEP +# undef PTRACE_SINGLEBLOCK +# undef PTRACE_ATTACH +# undef PTRACE_DETACH +# undef PTRACE_SYSCALL +# undef PTRACE_SETOPTIONS +# undef PTRACE_GETEVENTMSG +# undef PTRACE_GETSIGINFO +# undef PTRACE_SETSIGINFO +# undef PTRACE_GETREGSET +# undef PTRACE_SETREGSET +# undef PTRACE_SEIZE +# undef PTRACE_INTERRUPT +# undef PTRACE_LISTEN +# undef PTRACE_PEEKSIGINFO +# undef PTRACE_GETSIGMASK +# undef PTRACE_SETSIGMASK +# undef PTRACE_SECCOMP_GET_FILTER +# undef PTRACE_SECCOMP_GET_METADATA +# undef PTRACE_PEEKUSR_AREA +# undef PTRACE_POKEUSR_AREA +# undef PTRACE_GET_LAST_BREAK +# undef PTRACE_ENABLE_TE +# undef PTRACE_DISABLE_TE +# undef PTRACE_TE_ABORT_RAND +# undef PTRACE_O_TRACESYSGOOD +# undef PTRACE_O_TRACEFORK +# undef PTRACE_O_TRACEVFORK +# undef PTRACE_O_TRACECLONE +# undef PTRACE_O_TRACEEXEC +# undef PTRACE_O_TRACEVFORKDONE +# undef PTRACE_O_TRACEEXIT +# undef PTRACE_O_TRACESECCOMP +# undef PTRACE_O_EXITKILL +# undef PTRACE_O_SUSPEND_SECCOMP +# undef PTRACE_O_MASK +# undef PTRACE_EVENT_FORK +# undef PTRACE_EVENT_VFORK +# undef PTRACE_EVENT_CLONE +# undef PTRACE_EVENT_EXEC +# undef PTRACE_EVENT_VFORK_DONE +# undef PTRACE_EVENT_EXIT +# undef PTRACE_EVENT_SECCOMP +# undef PTRACE_EVENT_STOP +# undef PTRACE_PEEKSIGINFO_SHARED +#endif +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Execute process until next taken branch. */ + PTRACE_SINGLEBLOCK = 12, +#define PT_STEPBLOCK PTRACE_SINGLEBLOCK + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Continue and stop at the next entry to or return from syscall. */ + PTRACE_SYSCALL = 24, +#define PT_SYSCALL PTRACE_SYSCALL + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + /* Retrieve siginfo_t structures without removing signals from a queue. */ + PTRACE_PEEKSIGINFO = 0x4209, +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO + + /* Get the mask of blocked signals. */ + PTRACE_GETSIGMASK = 0x420a, +#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK + + /* Change the mask of blocked signals. */ + PTRACE_SETSIGMASK = 0x420b, +#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK + + /* Get seccomp BPF filters. */ + PTRACE_SECCOMP_GET_FILTER = 0x420c, +#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER + + /* Get seccomp BPF filter metadata. */ + PTRACE_SECCOMP_GET_METADATA = 0x420d, +#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA + + PTRACE_PEEKUSR_AREA = 0x5000, +#define PTRACE_PEEKUSR_AREA PTRACE_PEEKUSR_AREA + + PTRACE_POKEUSR_AREA = 0x5001, +#define PTRACE_POKEUSR_AREA PTRACE_POKEUSR_AREA + + PTRACE_GET_LAST_BREAK = 0x5006, +#define PTRACE_GET_LAST_BREAK PTRACE_GET_LAST_BREAK + + PTRACE_ENABLE_TE = 0x5009, +#define PTRACE_ENABLE_TE PTRACE_ENABLE_TE + + PTRACE_DISABLE_TE = 0x5010, +#define PTRACE_DISABLE_TE PTRACE_DISABLE_TE + + PTRACE_TE_ABORT_RAND = 0x5011 +#define PTRACE_TE_ABORT_RAND PTRACE_TE_ABORT_RAND +}; + + +#include + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/sys/ucontext.h b/libc/include/s390x-linux-gnu/sys/ucontext.h new file mode 100644 index 0000000000..8e22466eb7 --- /dev/null +++ b/libc/include/s390x-linux-gnu/sys/ucontext.h @@ -0,0 +1,95 @@ +/* Copyright (C) 2000-2019 Free Software Foundation, Inc. + Contributed by Denis Joseph Barrow (djbarrow@de.ibm.com). + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include + + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + +/* Type for a program status word. */ +typedef struct +{ + unsigned long __ctx(mask); + unsigned long __ctx(addr); +} __attribute__ ((__aligned__(8))) __psw_t; + +/* Type for a general-purpose register. */ +typedef unsigned long greg_t; + +/* And the whole bunch of them. We should have used `struct s390_regs', + but to avoid name space pollution and since the tradition says that + the register set is an array, we make gregset_t a simple array + that has the same size as s390_regs. This is needed for the + elf_prstatus structure. */ +#if __WORDSIZE == 64 +# define __NGREG 27 +#else +# define __NGREG 36 +#endif +#ifdef __USE_MISC +# define NGREG __NGREG +#endif +/* Must match kernels psw_t alignment. */ +typedef greg_t gregset_t[__NGREG] __attribute__ ((__aligned__(8))); + +typedef union + { + double __ctx(d); + float __ctx(f); + } fpreg_t; + +/* Register set for the floating-point registers. */ +typedef struct + { + unsigned int __ctx(fpc); + fpreg_t __ctx(fprs)[16]; + } fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct + { + __psw_t __ctx(psw); + unsigned long __ctx(gregs)[16]; + unsigned int __ctx(aregs)[16]; + fpregset_t __ctx(fpregs); + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long int __ctx(uc_flags); + struct ucontext_t *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; + } ucontext_t; + +#undef __ctx + + +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/include/s390x-linux-gnu/sys/user.h b/libc/include/s390x-linux-gnu/sys/user.h new file mode 100644 index 0000000000..30484f5f7f --- /dev/null +++ b/libc/include/s390x-linux-gnu/sys/user.h @@ -0,0 +1,82 @@ +/* Copyright (C) 2000-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H +#define _SYS_USER_H 1 + +/* The whole purpose of this file is for GDB and GDB only. Don't read + too much into it. Don't use it for anything other than GDB unless + you know what you are doing. */ + +struct _user_psw_struct +{ + unsigned long mask; + unsigned long addr; +}; + +struct _user_fpregs_struct +{ + unsigned int fpc; + double fprs[16]; +}; + +struct _user_per_struct +{ + unsigned long control_regs[3]; + unsigned single_step : 1; + unsigned instruction_fetch : 1; + unsigned : 30; + unsigned long starting_addr; + unsigned long ending_addr; + unsigned short perc_atmid; + unsigned long address; + unsigned char access_id; +}; + +struct _user_regs_struct +{ + struct _user_psw_struct psw; /* Program status word. */ + unsigned long gprs[16]; /* General purpose registers. */ + unsigned int acrs[16]; /* Access registers. */ + unsigned long orig_gpr2; /* Original gpr2. */ + struct _user_fpregs_struct fp_regs; /* Floating point registers. */ + struct _user_per_struct per_info; /* Hardware tracing registers. */ + unsigned long ieee_instruction_pointer; /* Always 0. */ +}; + +struct user { + struct _user_regs_struct regs; /* User registers. */ + unsigned long int u_tsize; /* Text segment size (pages). */ + unsigned long int u_dsize; /* Data segment size (pages). */ + unsigned long int u_ssize; /* Stack segment size (pages). */ + unsigned long start_code; /* Starting address of text. */ + unsigned long start_stack; /* Starting address of stack area. */ + long int signal; /* Signal causing the core dump. */ + struct _user_regs_struct *u_ar0; /* Help gdb find registers. */ + unsigned long magic; /* Identifies a core file. */ + char u_comm[32]; /* User command naem. */ +}; + +#define PAGE_SHIFT 12 +#define PAGE_SIZE (1UL << PAGE_SHIFT) +#define PAGE_MASK (~(PAGE_SIZE-1)) +#define NBPG PAGE_SIZE +#define UPAGES 1 +#define HOST_TEXT_START_ADDR (u.start_code) +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) + +#endif /* _SYS_USER_H */ \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/a.out.h b/libc/include/sparc-linux-gnu/a.out.h new file mode 100644 index 0000000000..4002e18c91 --- /dev/null +++ b/libc/include/sparc-linux-gnu/a.out.h @@ -0,0 +1,174 @@ +#ifndef __A_OUT_GNU_H__ +#define __A_OUT_GNU_H__ + +#include + +#define __GNU_EXEC_MACROS__ + +struct exec +{ + unsigned char a_dynamic:1; /* A __DYNAMIC is in this image. */ + unsigned char a_toolversion:7; + unsigned char a_machtype; + unsigned short a_info; + unsigned int a_text; /* Length of text, in bytes. */ + unsigned int a_data; /* Length of data, in bytes. */ + unsigned int a_bss; /* Length of bss, in bytes. */ + unsigned int a_syms; /* Length of symbol table, in bytes. */ + unsigned int a_entry; /* Where program begins. */ + unsigned int a_trsize; + unsigned int a_drsize; +}; + +enum machine_type +{ + M_OLDSUN2 = 0, + M_68010 = 1, + M_68020 = 2, + M_SPARC = 3, + M_386 = 100, + M_MIPS1 = 151, + M_MIPS2 = 152 +}; + +#define N_MAGIC(exec) ((exec).a_info & 0xffff) +#define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff)) +#define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff) +#define N_SET_INFO(exec, magic, type, flags) \ + ((exec).a_info = ((magic) & 0xffff) \ + | (((int)(type) & 0xff) << 16) \ + | (((flags) & 0xff) << 24)) +#define N_SET_MAGIC(exec, magic) \ + ((exec).a_info = ((exec).a_info & 0xffff0000) | ((magic) & 0xffff)) +#define N_SET_MACHTYPE(exec, machtype) \ + ((exec).a_info = \ + ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16)) +#define N_SET_FLAGS(exec, flags) \ + ((exec).a_info = \ + ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24)) + +/* Code indicating object file or impure executable. */ +#define OMAGIC 0407 +/* Code indicating pure executable. */ +#define NMAGIC 0410 +/* Code indicating demand-paged executable. */ +#define ZMAGIC 0413 +/* This indicates a demand-paged executable with the header in the text. + The first page is unmapped to help trap NULL pointer references. */ +#define QMAGIC 0314 +/* Code indicating core file. */ +#define CMAGIC 0421 + +#define N_TRSIZE(a) ((a).a_trsize) +#define N_DRSIZE(a) ((a).a_drsize) +#define N_SYMSIZE(a) ((a).a_syms) +#define N_BADMAG(x) \ + (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \ + && N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC) +#define _N_HDROFF(x) (1024 - sizeof (struct exec)) +#define N_TXTOFF(x) \ + (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec)) +#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text) +#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data) +#define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x)) +#define N_SYMOFF(x) \ + (N_TXTOFF(x) + (x).a_text + (x).a_data + (x).a_trsize + (x).a_drsize) +#define N_STROFF(x) (N_SYMOFF(x) + N_SYMSIZE(x)) + +#define SPARC_PGSIZE 0x2000 + +/* Address of text segment in memory after it is loaded. */ +#define N_TXTADDR(x) \ + (unsigned long)(((N_MAGIC(x) == ZMAGIC) && ((x).a_entry < SPARC_PGSIZE)) \ + ? 0 : SPARC_PGSIZE) + +/* Address of data segment in memory after it is loaded. */ +#define SEGMENT_SIZE SPARC_PGSIZE + +#define _N_SEGMENT_ROUND(x) (((x) + SEGMENT_SIZE - 1) & ~(SEGMENT_SIZE - 1)) +#define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text) + +#define N_DATADDR(x) \ + (N_MAGIC(x)==OMAGIC \ + ? (N_TXTADDR(x) + (x).a_text) \ + : (unsigned long)(_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) +#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data) + +#if !defined (N_NLIST_DECLARED) +struct nlist +{ + union + { + char *n_name; + struct nlist *n_next; + long n_strx; + } n_un; + unsigned char n_type; + char n_other; + short n_desc; + unsigned long n_value; +}; +#endif /* no N_NLIST_DECLARED. */ + +#define N_UNDF 0 +#define N_ABS 2 +#define N_TEXT 4 +#define N_DATA 6 +#define N_BSS 8 +#define N_FN 15 +#define N_EXT 1 +#define N_TYPE 036 +#define N_STAB 0340 +#define N_INDR 0xa +#define N_SETA 0x14 /* Absolute set element symbol. */ +#define N_SETT 0x16 /* Text set element symbol. */ +#define N_SETD 0x18 /* Data set element symbol. */ +#define N_SETB 0x1A /* Bss set element symbol. */ +#define N_SETV 0x1C /* Pointer to set vector in data area. */ + +#if !defined (N_RELOCATION_INFO_DECLARED) +enum reloc_type +{ + RELOC_8, + RELOC_16, + RELOC_32, + RELOC_DISP8, + RELOC_DISP16, + RELOC_DISP32, + RELOC_WDISP30, + RELOC_WDISP22, + RELOC_HI22, + RELOC_22, + RELOC_13, + RELOC_LO10, + RELOC_SFA_BASE, + RELOC_SFA_OFF13, + RELOC_BASE10, + RELOC_BASE13, + RELOC_BASE22, + RELOC_PC10, + RELOC_PC22, + RELOC_JMP_TBL, + RELOC_SEGOFF16, + RELOC_GLOB_DAT, + RELOC_JMP_SLOT, + RELOC_RELATIVE +}; + +/* This structure describes a single relocation to be performed. + The text-relocation section of the file is a vector of these structures, + all of which apply to the text section. + Likewise, the data-relocation section applies to the data section. */ + +struct relocation_info +{ + unsigned int r_address; + unsigned int r_index:24; + unsigned int r_extern:1; + int r_pad:2; + enum reloc_type r_type:5; + int r_addend; +}; +#endif /* no N_RELOCATION_INFO_DECLARED. */ + +#endif /* __A_OUT_GNU_H__ */ \ No newline at end of file diff --git a/libc/glibc/sysdeps/unix/sysv/linux/sparc/asm/unistd.h b/libc/include/sparc-linux-gnu/asm/unistd.h similarity index 100% rename from libc/glibc/sysdeps/unix/sysv/linux/sparc/asm/unistd.h rename to libc/include/sparc-linux-gnu/asm/unistd.h diff --git a/libc/include/sparc-linux-gnu/bits/a.out.h b/libc/include/sparc-linux-gnu/bits/a.out.h new file mode 100644 index 0000000000..c189482c42 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/a.out.h @@ -0,0 +1,13 @@ +#ifndef __A_OUT_GNU_H__ +# error "Never use directly; include instead." +#endif + +#include + +#if __WORDSIZE == 64 + +/* Signal to users of this header that this architecture really doesn't + support a.out binary format. */ +#define __NO_A_OUT_SUPPORT 1 + +#endif \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/endian.h b/libc/include/sparc-linux-gnu/bits/endian.h new file mode 100644 index 0000000000..1e1dd7a2e0 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/endian.h @@ -0,0 +1,12 @@ +/* Sparc is big-endian, but v9 supports endian conversion on loads/stores + and GCC supports such a mode. Be prepared. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#ifdef __LITTLE_ENDIAN__ +# define __BYTE_ORDER __LITTLE_ENDIAN +#else +# define __BYTE_ORDER __BIG_ENDIAN +#endif \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/environments.h b/libc/include/sparc-linux-gnu/bits/environments.h new file mode 100644 index 0000000000..2e1c0bc1de --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/environments.h @@ -0,0 +1,96 @@ +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _UNISTD_H +# error "Never include this file directly. Use instead" +#endif + +#include + +/* This header should define the following symbols under the described + situations. A value `1' means that the model is always supported, + `-1' means it is never supported. Undefined means it cannot be + statically decided. + + _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type + _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type + + _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type + _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type + + The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, + _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, + _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were + used in previous versions of the Unix standard and are available + only for compatibility. +*/ + +#if __WORDSIZE == 64 + +/* Environments with 32-bit wide pointers are optionally provided. + Therefore following macros aren't defined: + # undef _POSIX_V7_ILP32_OFF32 + # undef _POSIX_V7_ILP32_OFFBIG + # undef _POSIX_V6_ILP32_OFF32 + # undef _POSIX_V6_ILP32_OFFBIG + # undef _XBS5_ILP32_OFF32 + # undef _XBS5_ILP32_OFFBIG + and users need to check at runtime. */ + +/* We also have no use (for now) for an environment with bigger pointers + and offsets. */ +# define _POSIX_V7_LPBIG_OFFBIG -1 +# define _POSIX_V6_LPBIG_OFFBIG -1 +# define _XBS5_LPBIG_OFFBIG -1 + +/* By default we have 64-bit wide `long int', pointers and `off_t'. */ +# define _POSIX_V7_LP64_OFF64 1 +# define _POSIX_V6_LP64_OFF64 1 +# define _XBS5_LP64_OFF64 1 + +#else /* __WORDSIZE == 32 */ + +/* By default we have 32-bit wide `int', `long int', pointers and `off_t' + and all platforms support LFS. */ +# define _POSIX_V7_ILP32_OFF32 1 +# define _POSIX_V7_ILP32_OFFBIG 1 +# define _POSIX_V6_ILP32_OFF32 1 +# define _POSIX_V6_ILP32_OFFBIG 1 +# define _XBS5_ILP32_OFF32 1 +# define _XBS5_ILP32_OFFBIG 1 + +/* We optionally provide an environment with the above size but an 64-bit + side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ + +/* Environments with 64-bit wide pointers can be provided, + so these macros aren't defined: + # undef _POSIX_V7_LP64_OFF64 + # undef _POSIX_V7_LPBIG_OFFBIG + # undef _POSIX_V6_LP64_OFF64 + # undef _POSIX_V6_LPBIG_OFFBIG + # undef _XBS5_LP64_OFF64 + # undef _XBS5_LPBIG_OFFBIG + and sysconf tests for it at runtime. */ + +#endif /* __WORDSIZE == 32 */ + +#define __ILP32_OFF32_CFLAGS "-m32" +#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +#define __ILP32_OFF32_LDFLAGS "-m32" +#define __ILP32_OFFBIG_LDFLAGS "-m32" +#define __LP64_OFF64_CFLAGS "-m64" +#define __LP64_OFF64_LDFLAGS "-m64" \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/epoll.h b/libc/include/sparc-linux-gnu/bits/epoll.h new file mode 100644 index 0000000000..a5ae26649b --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/epoll.h @@ -0,0 +1,27 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_EPOLL_H +# error "Never use directly; include instead." +#endif + +/* Flags to be passed to epoll_create1. */ +enum + { + EPOLL_CLOEXEC = 0x400000 +#define EPOLL_CLOEXEC EPOLL_CLOEXEC + }; \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/errno.h b/libc/include/sparc-linux-gnu/bits/errno.h new file mode 100644 index 0000000000..8ef40090fb --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/errno.h @@ -0,0 +1,53 @@ +/* Error constants. Linux/Sparc specific version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 +#define _BITS_ERRNO_H 1 + +#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 127 +# endif + +# ifndef EOWNERDEAD +# define EOWNERDEAD 132 +# endif + +# ifndef ENOTRECOVERABLE +# define ENOTRECOVERABLE 133 +# endif + +# ifndef ERFKILL +# define ERFKILL 134 +# endif + +# ifndef EHWPOISON +# define EHWPOISON 135 +# endif + +#endif /* bits/errno.h. */ \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/eventfd.h b/libc/include/sparc-linux-gnu/bits/eventfd.h new file mode 100644 index 0000000000..942ede19f7 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/eventfd.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2007-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 = 0x000001, +#define EFD_SEMAPHORE EFD_SEMAPHORE + EFD_CLOEXEC = 0x400000, +#define EFD_CLOEXEC EFD_CLOEXEC + EFD_NONBLOCK = 0x004000 +#define EFD_NONBLOCK EFD_NONBLOCK + }; \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/fcntl.h b/libc/include/sparc-linux-gnu/bits/fcntl.h new file mode 100644 index 0000000000..903872d0b6 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/fcntl.h @@ -0,0 +1,101 @@ +/* O_*, F_*, FD_* bit values for Linux/SPARC. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#include + +#define O_APPEND 0x0008 +#define O_ASYNC 0x0040 +#define O_CREAT 0x0200 /* not fcntl */ +#define O_TRUNC 0x0400 /* not fcntl */ +#define O_EXCL 0x0800 /* not fcntl */ +#define O_SYNC 0x802000 +#define O_NONBLOCK 0x4000 +#define O_NDELAY (0x0004 | O_NONBLOCK) +#define O_NOCTTY 0x8000 /* not fcntl */ + +#define __O_DIRECTORY 0x10000 /* must be a directory */ +#define __O_NOFOLLOW 0x20000 /* don't follow links */ +#define __O_CLOEXEC 0x400000 /* Set close_on_exit. */ + +#define __O_DIRECT 0x100000 /* direct disk access hint */ +#define __O_NOATIME 0x200000 /* Do not set atime. */ +#define __O_PATH 0x1000000 /* Resolve pathname but do not open file. */ +#define __O_TMPFILE 0x2010000 /* Atomically create nameless file. */ + +#if __WORDSIZE == 64 +# define __O_LARGEFILE 0 +#else +# define __O_LARGEFILE 0x40000 +#endif + +#define __O_DSYNC 0x2000 /* Synchronize data. */ + + +#define __F_GETOWN 5 /* Get owner (process receiving SIGIO). */ +#define __F_SETOWN 6 /* Set owner (process receiving SIGIO). */ + +#ifndef __USE_FILE_OFFSET64 +# define F_GETLK 7 /* Get record locking info. */ +# define F_SETLK 8 /* Set record locking info (non-blocking). */ +# define F_SETLKW 9 /* Set record locking info (blocking). */ +#endif + +#if __WORDSIZE == 64 +# define F_GETLK64 7 /* Get record locking info. */ +# define F_SETLK64 8 /* Set record locking info (non-blocking). */ +# define F_SETLKW64 9 /* Set record locking info (blocking). */ +#endif + +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ +#define F_RDLCK 1 /* Read lock. */ +#define F_WRLCK 2 /* Write lock. */ +#define F_UNLCK 3 /* Remove lock. */ + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + short int __glibc_reserved; + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + short int __glibc_reserved; + }; +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/fenv.h b/libc/include/sparc-linux-gnu/bits/fenv.h new file mode 100644 index 0000000000..5a9305af9f --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/fenv.h @@ -0,0 +1,101 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + +#include + + +/* Define bits representing the exception. We use the bit positions + of the appropriate accrued exception bits from the FSR. */ +enum + { + FE_INVALID = +#define FE_INVALID (1 << 9) + FE_INVALID, + FE_OVERFLOW = +#define FE_OVERFLOW (1 << 8) + FE_OVERFLOW, + FE_UNDERFLOW = +#define FE_UNDERFLOW (1 << 7) + FE_UNDERFLOW, + FE_DIVBYZERO = +#define FE_DIVBYZERO (1 << 6) + FE_DIVBYZERO, + FE_INEXACT = +#define FE_INEXACT (1 << 5) + FE_INEXACT + }; + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +/* The Sparc FPU supports all of the four defined rounding modes. We + use again the bit positions in the FPU control word as the values + for the appropriate macros. */ +enum + { + FE_TONEAREST = +#define FE_TONEAREST (0 << 30) + FE_TONEAREST, + FE_TOWARDZERO = +#define FE_TOWARDZERO (1 << 30) + FE_TOWARDZERO, + FE_UPWARD = +#define FE_UPWARD (-0x7fffffff - 1) /* (2 << 30) */ + FE_UPWARD, + FE_DOWNWARD = +#define FE_DOWNWARD (-0x40000000) /* (3 << 30) */ + FE_DOWNWARD + }; + +#define __FE_ROUND_MASK (3U << 30) + + +/* Type representing exception flags. */ +typedef unsigned long int fexcept_t; + + +/* Type representing floating-point environment. */ +typedef unsigned long int fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((const fenv_t *) -1) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exception is masked. */ +# define FE_NOMASK_ENV ((const fenv_t *) -2) +#endif + +/* For internal use only: access the fp state register. */ +#if __WORDSIZE == 64 +# define __fenv_stfsr(X) __asm__ __volatile__ ("stx %%fsr,%0" : "=m" (X)) +# define __fenv_ldfsr(X) __asm__ __volatile__ ("ldx %0,%%fsr" : : "m" (X)) +#else +# define __fenv_stfsr(X) __asm__ __volatile__ ("st %%fsr,%0" : "=m" (X)) +# define __fenv_ldfsr(X) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (X)) +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef unsigned long int femode_t; + +/* Default floating-point control modes. */ +# define FE_DFL_MODE ((const femode_t *) -1L) +#endif \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/floatn.h b/libc/include/sparc-linux-gnu/bits/floatn.h new file mode 100644 index 0000000000..5e7e3f4d2e --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/floatn.h @@ -0,0 +1,97 @@ +/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/sparc-linux-gnu/bits/hwcap.h b/libc/include/sparc-linux-gnu/bits/hwcap.h new file mode 100644 index 0000000000..a05d2b6a25 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/hwcap.h @@ -0,0 +1,51 @@ +/* Defines for bits in AT_HWCAP. + Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H) +# error "Never include directly; use instead." +#endif + +#define HWCAP_SPARC_FLUSH 0x00000001 +#define HWCAP_SPARC_STBAR 0x00000002 +#define HWCAP_SPARC_SWAP 0x00000004 +#define HWCAP_SPARC_MULDIV 0x00000008 +#define HWCAP_SPARC_V9 0x00000010 +#define HWCAP_SPARC_ULTRA3 0x00000020 +#define HWCAP_SPARC_BLKINIT 0x00000040 +#define HWCAP_SPARC_N2 0x00000080 +#define HWCAP_SPARC_MUL32 0x00000100 +#define HWCAP_SPARC_DIV32 0x00000200 +#define HWCAP_SPARC_FSMULD 0x00000400 +#define HWCAP_SPARC_V8PLUS 0x00000800 +#define HWCAP_SPARC_POPC 0x00001000 +#define HWCAP_SPARC_VIS 0x00002000 +#define HWCAP_SPARC_VIS2 0x00004000 +#define HWCAP_SPARC_ASI_BLK_INIT 0x00008000 +#define HWCAP_SPARC_FMAF 0x00010000 +#define HWCAP_SPARC_VIS3 0x00020000 +#define HWCAP_SPARC_HPC 0x00040000 +#define HWCAP_SPARC_RANDOM 0x00080000 +#define HWCAP_SPARC_TRANS 0x00100000 +#define HWCAP_SPARC_FJFMAU 0x00200000 +#define HWCAP_SPARC_IMA 0x00400000 +#define HWCAP_SPARC_ASI_CACHE_SPARING \ + 0x00800000 +#define HWCAP_SPARC_PAUSE 0x01000000 +#define HWCAP_SPARC_CBCOND 0x02000000 +#define HWCAP_SPARC_CRYPTO 0x04000000 +#define HWCAP_SPARC_ADP 0x08000000 \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/inotify.h b/libc/include/sparc-linux-gnu/bits/inotify.h new file mode 100644 index 0000000000..9042dd71bb --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/inotify.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 = 0x400000, +#define IN_CLOEXEC IN_CLOEXEC + IN_NONBLOCK = 0x004000 +#define IN_NONBLOCK IN_NONBLOCK + }; \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/ioctls.h b/libc/include/sparc-linux-gnu/bits/ioctls.h new file mode 100644 index 0000000000..244d48193d --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/ioctls.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +/* Use the definitions from the kernel header files. */ +#include + +/* Oh well, this is necessary since the kernel data structure is + different from the user-level version. */ +#undef TCGETS +#undef TCSETS +#undef TCSETSW +#undef TCSETSF +#define TCGETS _IOR ('T', 8, char[36]) +#define TCSETS _IOW ('T', 9, char[36]) +#define TCSETSW _IOW ('T', 10, char[36]) +#define TCSETSF _IOW ('T', 11, char[36]) + +#include \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/ipc.h b/libc/include/sparc-linux-gnu/bits/ipc.h new file mode 100644 index 0000000000..abda8ba408 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/ipc.h @@ -0,0 +1,61 @@ +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IPC_H +# error "Never use directly; include instead." +#endif + +#include +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#ifdef __USE_GNU +# define IPC_INFO 3 /* See ipcs. */ +#endif + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + __uid_t uid; /* Owner's user ID. */ + __gid_t gid; /* Owner's group ID. */ + __uid_t cuid; /* Creator's user ID. */ + __gid_t cgid; /* Creator's group ID. */ +#if __WORDSIZE == 32 + unsigned short int __pad1; + unsigned short int mode; /* Read/write permission. */ + unsigned short int __pad2; +#else + __mode_t mode; /* Read/write permission. */ + unsigned short int __pad1; +#endif + unsigned short int __seq; /* Sequence number. */ + __extension__ unsigned long long int __glibc_reserved1; + __extension__ unsigned long long int __glibc_reserved2; + }; \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/link.h b/libc/include/sparc-linux-gnu/bits/link.h new file mode 100644 index 0000000000..05e2fe6aac --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/link.h @@ -0,0 +1,99 @@ +/* Machine-specific audit interfaces for dynamic linker. SPARC version. + Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + +#if __WORDSIZE == 32 + +typedef struct La_sparc32_regs +{ + uint32_t lr_lreg[8]; /* %l0 through %l7 */ + uint32_t lr_reg[6]; /* %o0 through %o5 */ + uint32_t lr_sp; /* %o6 */ + uint32_t lr_ra; /* %o7 */ + uint32_t lr_struct; /* Pass-by-reference struct pointer */ +} La_sparc32_regs; + +typedef struct La_sparc32_retval +{ + uint32_t lrv_reg[2]; /* %o0 and %o1 */ + double lrv_fpreg[2]; /* %f0 and %f2 */ +} La_sparc32_retval; + +#else + +typedef struct La_sparc64_regs +{ + uint64_t lr_lreg[8]; /* %l0 through %l7 */ + uint64_t lr_reg[6]; /* %o0 through %o5 */ + uint64_t lr_sp; /* %o6 */ + uint64_t lr_ra; /* %o7 */ + double lr_fpreg[16]; /* %f0 through %f30 */ +} La_sparc64_regs; + +typedef struct La_sparc64_retval +{ + uint64_t lrv_reg[4]; /* %o0 through %o3 */ + double lrv_fprev[4]; /* %f0 through %f8 */ +} La_sparc64_retval; + +#endif + +__BEGIN_DECLS + +#if __WORDSIZE == 32 + +extern Elf32_Addr la_sparc32_gnu_pltenter (Elf32_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_sparc32_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_sparc32_gnu_pltexit (Elf32_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_sparc32_regs *__inregs, + La_sparc32_retval *__outregs, + const char *__symname); + +#else + +extern Elf64_Addr la_sparc64_gnu_pltenter (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_sparc64_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_sparc64_gnu_pltexit (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_sparc64_regs *__inregs, + La_sparc64_retval *__outregs, + const char *__symname); + +#endif + +__END_DECLS \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/local_lim.h b/libc/include/sparc-linux-gnu/bits/local_lim.h new file mode 100644 index 0000000000..0f3afc18be --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/local_lim.h @@ -0,0 +1,99 @@ +/* Minimum guaranteed maximum values for system limits. Linux/SPARC version. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. We are free to choose a reasonable value. */ +#define PTHREAD_STACK_MIN 24576 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/long-double.h b/libc/include/sparc-linux-gnu/bits/long-double.h new file mode 100644 index 0000000000..9858947c1b --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/long-double.h @@ -0,0 +1,26 @@ +/* Properties of long double type. SPARC version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#if !defined __NO_LONG_DOUBLE_MATH && __WORDSIZE == 32 +# define __LONG_DOUBLE_MATH_OPTIONAL 1 +# ifndef __LONG_DOUBLE_128__ +# define __NO_LONG_DOUBLE_MATH 1 +# endif +#endif \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/mman.h b/libc/include/sparc-linux-gnu/bits/mman.h new file mode 100644 index 0000000000..3d71e80356 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/mman.h @@ -0,0 +1,55 @@ +/* Definitions for POSIX memory map interface. Linux/SPARC version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_GROWSDOWN 0x0200 /* Stack-like segment. */ +# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ +# define MAP_LOCKED 0x0100 /* Lock the mapping. */ +# define MAP_NORESERVE 0x0040 /* Don't check for reservations. */ +# define _MAP_NEW 0x80000000 /* Binary compatibility with SunOS. */ +# define MAP_POPULATE 0x8000 /* Populate (prefault) pagetables. */ +# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +# define MAP_STACK 0x20000 /* Allocation is for a stack. */ +# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ +# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap + underlying mapping. */ +#endif + +/* Flags for `mlockall'. */ +#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 0x4000 /* Lock all additions to address + space. */ +#define MCL_ONFAULT 0x8000 /* Lock all pages that are + faulted in. */ +/* Include generic Linux declarations. */ +#include + +/* Other flags. */ +#ifdef __USE_MISC +# define MAP_RENAME MAP_ANONYMOUS +#endif \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/msq-pad.h b/libc/include/sparc-linux-gnu/bits/msq-pad.h new file mode 100644 index 0000000000..4e1c89ee36 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/msq-pad.h @@ -0,0 +1,26 @@ +/* Define where padding goes in struct msqid_ds. SPARC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include + +#define __MSQ_PAD_AFTER_TIME 0 +#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/poll.h b/libc/include/sparc-linux-gnu/bits/poll.h new file mode 100644 index 0000000000..b62004fb16 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/poll.h @@ -0,0 +1,49 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 0x200 +# define POLLREMOVE 0x400 +# define POLLRDHUP 0x800 +#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/libc/include/sparc-linux-gnu/bits/procfs-extra.h b/libc/include/sparc-linux-gnu/bits/procfs-extra.h new file mode 100644 index 0000000000..3804e18a0f --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/procfs-extra.h @@ -0,0 +1,88 @@ +/* Extra sys/procfs.h definitions. SPARC version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +#if __WORDSIZE == 64 + +/* Provide 32-bit variants so that BFD can read 32-bit + core files. */ +#define ELF_NGREG32 38 +typedef struct + { + union + { + unsigned int pr_regs[32]; + double pr_dregs[16]; + } pr_fr; + unsigned int __glibc_reserved; + unsigned int pr_fsr; + unsigned char pr_qcnt; + unsigned char pr_q_entrysize; + unsigned char pr_en; + unsigned int pr_q[64]; + } elf_fpregset_t32; + +typedef unsigned int elf_greg_t32; +typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG32]; + +struct elf_prstatus32 + { + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned int pr_sigpend; /* Set of pending signals. */ + unsigned int pr_sighold; /* Set of held signals. */ + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct + { + int tv_sec, tv_usec; + } pr_utime, /* User time. */ + pr_stime, /* System time. */ + pr_cutime, /* Cumulative user time. */ + pr_cstime; /* Cumulative system time. */ + elf_gregset_t32 pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + +struct elf_prpsinfo32 + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned int pr_flag; /* Flags. */ + unsigned short int pr_uid; + unsigned short int pr_gid; + int pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + +typedef elf_gregset_t32 prgregset32_t; +typedef elf_fpregset_t32 prfpregset32_t; + +typedef struct elf_prstatus32 prstatus32_t; +typedef struct elf_prpsinfo32 prpsinfo32_t; + +#endif /* sparc64 */ \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/procfs-id.h b/libc/include/sparc-linux-gnu/bits/procfs-id.h new file mode 100644 index 0000000000..64fb74a6e7 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/procfs-id.h @@ -0,0 +1,30 @@ +/* Types of pr_uid and pr_gid in struct elf_prpsinfo. SPARC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +#if __WORDSIZE == 64 +typedef unsigned int __pr_uid_t; +typedef unsigned int __pr_gid_t; +#else +typedef unsigned short int __pr_uid_t; +typedef unsigned short int __pr_gid_t; +#endif \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/procfs.h b/libc/include/sparc-linux-gnu/bits/procfs.h new file mode 100644 index 0000000000..d7908b1b0f --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/procfs.h @@ -0,0 +1,61 @@ +/* Types for registers for sys/procfs.h. SPARC version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +#include +#include +#include + +#if __WORDSIZE == 64 + +#define ELF_NGREG 36 + +typedef struct + { + unsigned long pr_regs[32]; + unsigned long pr_fsr; + unsigned long pr_gsr; + unsigned long pr_fprs; + } elf_fpregset_t; + +#else /* sparc32 */ + +#define ELF_NGREG 38 + +typedef struct + { + union + { + unsigned long pr_regs[32]; + double pr_dregs[16]; + } pr_fr; + unsigned long __glibc_reserved; + unsigned long pr_fsr; + unsigned char pr_qcnt; + unsigned char pr_q_entrysize; + unsigned char pr_en; + unsigned int pr_q[64]; + } elf_fpregset_t; + +#endif /* sparc32 */ + +typedef unsigned long elf_greg_t; +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/pthreadtypes-arch.h b/libc/include/sparc-linux-gnu/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..6460ba9584 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/pthreadtypes-arch.h @@ -0,0 +1,81 @@ +/* Machine-specific pthread type layouts. SPARC version. + Copyright (C) 2003-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 __WORDSIZE == 64 +# define __SIZEOF_PTHREAD_ATTR_T 56 +# define __SIZEOF_PTHREAD_MUTEX_T 40 +# define __SIZEOF_PTHREAD_CONDATTR_T 4 +# 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_CONDATTR_T 4 +# 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_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +/* Definitions for internal mutex struct. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 0 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64) +#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64) + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +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 __WORDSIZE == 64 + 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 + 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; + int __cur_writer; +#endif +}; + +#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 + +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/resource.h b/libc/include/sparc-linux-gnu/bits/resource.h new file mode 100644 index 0000000000..d3f58fd4c6 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/resource.h @@ -0,0 +1,238 @@ +/* Bit values & structures for resource limits. Linux/SPARC version. + Copyright (C) 1994-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 = 5, +#define RLIMIT_RSS __RLIMIT_RSS + + /* Number of open files. */ + RLIMIT_NOFILE = 6, + __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ +#define RLIMIT_NOFILE RLIMIT_NOFILE +#define RLIMIT_OFILE __RLIMIT_OFILE + + /* Address space limit (?) */ + RLIMIT_AS = 9, +#define RLIMIT_AS RLIMIT_AS + + /* Number of processes. */ + __RLIMIT_NPROC = 7, +#define RLIMIT_NPROC __RLIMIT_NPROC + + /* Locked-in-memory address space. */ + __RLIMIT_MEMLOCK = 8, +#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 µs 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 __WORDSIZE == 64 + +#ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY ((unsigned long int)(~0UL)) +#else +# define RLIM_INFINITY 0xffffffffffffffffuLL +#endif + +#ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0xffffffffffffffffuLL +#endif + +#else + +#ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY ((long int)(~0UL >> 1)) +#else +# define RLIM_INFINITY 0xffffffffffffffffLL +#endif + +#ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0xffffffffffffffffLL +#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/libc/include/sparc-linux-gnu/bits/sem-pad.h b/libc/include/sparc-linux-gnu/bits/sem-pad.h new file mode 100644 index 0000000000..1fd5475b40 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/sem-pad.h @@ -0,0 +1,26 @@ +/* Define where padding goes in struct semid_ds. SPARC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SEM_H +# error "Never use directly; include instead." +#endif + +#include + +#define __SEM_PAD_AFTER_TIME 0 +#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32) \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/semaphore.h b/libc/include/sparc-linux-gnu/bits/semaphore.h new file mode 100644 index 0000000000..f309c0c2b8 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/semaphore.h @@ -0,0 +1,40 @@ +/* Machine-specific POSIX semaphore type layouts. SPARC version. + Copyright (C) 2003-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + +#include + +#if __WORDSIZE == 64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/setjmp.h b/libc/include/sparc-linux-gnu/bits/setjmp.h new file mode 100644 index 0000000000..bec6fd8fc8 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/setjmp.h @@ -0,0 +1,67 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +#include + +#if __WORDSIZE == 64 + +#ifndef _ASM +typedef struct __sparc64_jmp_buf + { + struct __sparc64_jmp_buf *__uc_link; + unsigned long __uc_flags; + unsigned long __uc_sigmask; + struct __sparc64_jmp_buf_mcontext + { + unsigned long __mc_gregs[19]; + unsigned long __mc_fp; + unsigned long __mc_i7; + struct __sparc64_jmp_buf_fpu + { + union + { + unsigned int __sregs[32]; + unsigned long __dregs[32]; + long double __qregs[16]; + } __mcfpu_fpregs; + unsigned long __mcfpu_fprs; + unsigned long __mcfpu_gsr; + void *__mcfpu_fq; + unsigned char __mcfpu_qcnt; + unsigned char __mcfpu_qentsz; + unsigned char __mcfpu_enab; + } __mc_fpregs; + } __uc_mcontext; + } __jmp_buf[1]; +#endif + +#else + +#ifndef _ASM +typedef int __jmp_buf[3]; +#endif + +#endif + +#endif /* bits/setjmp.h */ \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/shm-pad.h b/libc/include/sparc-linux-gnu/bits/shm-pad.h new file mode 100644 index 0000000000..48bf143456 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/shm-pad.h @@ -0,0 +1,28 @@ +/* Define where padding goes in struct shmid_ds. SPARC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SHM_H +# error "Never use directly; include instead." +#endif + +#include + +#define __SHM_PAD_AFTER_TIME 0 +#define __SHM_PAD_BEFORE_TIME (__TIMESIZE == 32) +#define __SHM_SEGSZ_AFTER_TIME 1 +#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/shmlba.h b/libc/include/sparc-linux-gnu/bits/shmlba.h new file mode 100644 index 0000000000..5c736778ba --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/shmlba.h @@ -0,0 +1,29 @@ +/* Define SHMLBA. SPARC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +__BEGIN_DECLS + +/* Segment low boundary address multiple. */ +#define SHMLBA (__getshmlba ()) +extern int __getshmlba (void) __attribute__ ((__const__)); + +__END_DECLS \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/sigaction.h b/libc/include/sparc-linux-gnu/bits/sigaction.h new file mode 100644 index 0000000000..3e18d99602 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/sigaction.h @@ -0,0 +1,89 @@ +/* The proper definitions for Linux/SPARC sigaction. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#include + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* 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; + + /* Special flags. */ +#if __WORDSIZE == 64 + int __glibc_reserved0; +#endif + int sa_flags; + + /* Not used by Linux/Sparc yet. */ + void (*sa_restorer) (void); + }; + + +/* Bits in `sa_flags'. */ +#define SA_NOCLDSTOP 0x00000008 /* Don't send SIGCHLD when children stop. */ +#define SA_NOCLDWAIT 0x00000100 /* Don't create zombie on child death. */ +#define SA_SIGINFO 0x00000200 /* Invoke signal-catching function with + three arguments instead of one. */ +#if defined __USE_XOPEN_EXTENDED || defined __USE_MISC +# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ +#endif +#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 +# define SA_RESTART 0x00000002 /* Restart syscall on signal return. */ +# define SA_NODEFER 0x00000020 /* Don't automatically block the signal when + its handler is being executed. */ +# define SA_RESETHAND 0x00000004 /* Reset to SIG_DFL on entry to handler. */ +#endif +#ifdef __USE_MISC +# define SA_INTERRUPT 0x00000010 /* 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_BLOCK 1 /* Block signals. */ +#define SIG_UNBLOCK 2 /* Unblock signals. */ +#define SIG_SETMASK 4 /* Set the set of blocked signals. */ + +#endif \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/sigcontext.h b/libc/include/sparc-linux-gnu/bits/sigcontext.h new file mode 100644 index 0000000000..e0f4caf2f6 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/sigcontext.h @@ -0,0 +1,82 @@ +/* Copyright (C) 2000-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 __WORDSIZE == 32 + +/* It is quite hard to choose what to put here, because + Linux/sparc32 had at least 3 totally incompatible + signal stack layouts. + This one is for the "new" style signals, which are + now delivered unless SA_SIGINFO is requested. */ + +struct sigcontext + { + struct + { + unsigned int psr; + unsigned int pc; + unsigned int npc; + unsigned int y; + unsigned int u_regs[16]; /* globals and ins */ + } si_regs; + int si_mask; + }; + +#else /* sparc64 */ + +typedef struct + { + unsigned int si_float_regs [64]; + unsigned long si_fsr; + unsigned long si_gsr; + unsigned long si_fprs; + } __siginfo_fpu_t; + +struct sigcontext + { + char sigc_info[128]; + struct + { + unsigned long u_regs[16]; /* globals and ins */ + unsigned long tstate; + unsigned long tpc; + unsigned long tnpc; + unsigned int y; + unsigned int fprs; + } sigc_regs; + __siginfo_fpu_t * sigc_fpu_save; + struct + { + void * ss_sp; + int ss_flags; + unsigned long ss_size; + } sigc_stack; + unsigned long sigc_mask; +}; + +#endif /* sparc64 */ + +#endif /* bits/sigcontext.h */ \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/siginfo-arch.h b/libc/include/sparc-linux-gnu/bits/siginfo-arch.h new file mode 100644 index 0000000000..f3360b0cca --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/siginfo-arch.h @@ -0,0 +1,17 @@ +/* Architecture-specific adjustments to siginfo_t. SPARC version. */ +#ifndef _BITS_SIGINFO_ARCH_H +#define _BITS_SIGINFO_ARCH_H 1 + +/* The kernel uses int instead of long int (as in POSIX). In 32-bit + mode, we can still use long int, but in 64-bit mode, we need to + deviate from POSIX. */ +#if __WORDSIZE == 64 +# define __SI_BAND_TYPE int +#endif + +#define __SI_SIGFAULT_ADDL \ + int _si_trapno; + +#define si_trapno _sifields._sigfault._si_trapno + +#endif \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/siginfo-consts-arch.h b/libc/include/sparc-linux-gnu/bits/siginfo-consts-arch.h new file mode 100644 index 0000000000..a1dd324ec7 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/siginfo-consts-arch.h @@ -0,0 +1,12 @@ +/* Architecture-specific additional siginfo constants. SPARC version. */ +#ifndef _BITS_SIGINFO_CONSTS_ARCH_H +#define _BITS_SIGINFO_CONSTS_ARCH_H 1 + +/* `si_code' values for SIGEMT signal. */ +enum +{ + EMT_TAGOVF = 1 /* Tag overflow. */ +#define EMT_TAGOVF EMT_TAGOVF +}; + +#endif \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/signalfd.h b/libc/include/sparc-linux-gnu/bits/signalfd.h new file mode 100644 index 0000000000..f3ad2383f0 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/signalfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2007-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 = 0x400000, +#define SFD_CLOEXEC SFD_CLOEXEC + SFD_NONBLOCK = 0x004000 +#define SFD_NONBLOCK SFD_NONBLOCK + }; \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/signum.h b/libc/include/sparc-linux-gnu/bits/signum.h new file mode 100644 index 0000000000..4486a253b0 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/signum.h @@ -0,0 +1,39 @@ +/* Signal number definitions. Linux/SPARC version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use instead." +#endif + +#include + +/* Adjustments and additions to the signal number constants for + Linux/SPARC systems. Signal values on this platform were chosen + for SunOS binary compatibility. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGLOST 29 /* Resource lost (Sun); server died (GNU). */ +#define SIGPWR SIGLOST /* Power failure imminent (SysV). */ + +#undef __SIGRTMAX +#define __SIGRTMAX 64 + +#endif /* included. */ \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/sigstack.h b/libc/include/sparc-linux-gnu/bits/sigstack.h new file mode 100644 index 0000000000..f3029e811a --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/sigstack.h @@ -0,0 +1,32 @@ +/* sigstack, sigaltstack definitions. + Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_SIGSTACK_H +#define _BITS_SIGSTACK_H 1 + +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H +# error "Never include this file directly. Use instead" +#endif + +/* Minimum stack size for a signal handler. */ +#define MINSIGSTKSZ 4096 + +/* System default stack size. */ +#define SIGSTKSZ 16384 + +#endif /* bits/sigstack.h */ \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/socket_type.h b/libc/include/sparc-linux-gnu/bits/socket_type.h new file mode 100644 index 0000000000..411c8e8770 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/socket_type.h @@ -0,0 +1,55 @@ +/* Define enum __socket_type for Linux/SPARC. + Copyright (C) 1991-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_STREAM = 1, /* Sequenced, reliable, connection-based + byte streams. */ +#define SOCK_STREAM SOCK_STREAM + SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams + of fixed maximum length. */ +#define SOCK_DGRAM SOCK_DGRAM + 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, /* Datagram Congestion Control Protocol. */ +#define SOCK_DCCP SOCK_DCCP + 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 = 0x400000, /* Atomically set close-on-exec flag for the + new descriptor(s). */ +#define SOCK_CLOEXEC SOCK_CLOEXEC + SOCK_NONBLOCK = 0x004000 /* Atomically mark descriptor(s) as + non-blocking. */ +#define SOCK_NONBLOCK SOCK_NONBLOCK +}; \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/stat.h b/libc/include/sparc-linux-gnu/bits/stat.h new file mode 100644 index 0000000000..5330f3a46d --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/stat.h @@ -0,0 +1,173 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_LINUX_OLD 1 +#define _STAT_VER_KERNEL 1 +#define _STAT_VER_SVR4 2 +#define _STAT_VER_LINUX 3 +#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 1 +#define _MKNOD_VER_SVR4 2 +#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ + + +struct stat + { + __dev_t st_dev; /* Device. */ +#if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64 + unsigned short int __pad1; + __ino_t st_ino; /* File serial number. */ +#else + __ino64_t st_ino; /* File serial number. */ +#endif + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned short int __pad2; +#ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +#else + __off64_t st_size; /* Size of file, in bytes. */ +#endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +#ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +#else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#endif +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; + }; + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ +# if __WORDSIZE == 64 + unsigned short int __pad1; +# endif + __ino64_t st_ino; /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned short int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/termios-baud.h b/libc/include/sparc-linux-gnu/bits/termios-baud.h new file mode 100644 index 0000000000..5fb05af14a --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/termios-baud.h @@ -0,0 +1,46 @@ +/* termios baud rate selection definitions. Linux/sparc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#ifdef __USE_MISC +# define CBAUD 0x0000100f +# define CBAUDEX 0x00001000 +# define CIBAUD 0x100f0000 /* input baud rate (not used) */ +# define CMSPAR 0x40000000 /* mark or space (stick) parity */ +# define CRTSCTS 0x80000000 /* flow control */ +#endif + +#define B57600 0x00001001 +#define B115200 0x00001002 +#define B230400 0x00001003 +#define B460800 0x00001004 +#define B76800 0x00001005 +#define B153600 0x00001006 +#define B307200 0x00001007 +#define B614400 0x00001008 +#define B921600 0x00001009 +#define B500000 0x0000100a +#define B576000 0x0000100b +#define B1000000 0x0000100c +#define B1152000 0x0000100d +#define B1500000 0x0000100e +#define B2000000 0x0000100f +#define __MAX_BAUD B2000000 \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/termios-c_cc.h b/libc/include/sparc-linux-gnu/bits/termios-c_cc.h new file mode 100644 index 0000000000..03bf3dc37d --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/termios-c_cc.h @@ -0,0 +1,43 @@ +/* termios c_cc symbolic constant definitions. Linux/sparc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 +#define VQUIT 1 +#define VERASE 2 +#define VKILL 3 +#define VEOF 4 +#define VEOL 5 +#define VEOL2 6 +#define VSWTC 7 +#define VSTART 8 +#define VSTOP 9 +#define VSUSP 10 +#define VDSUSP 11 /* SunOS POSIX nicety I do believe... */ +#define VREPRINT 12 +#define VDISCARD 13 +#define VWERASE 14 +#define VLNEXT 15 + +/* User apps assume vmin/vtime is shared with eof/eol */ +#define VMIN VEOF +#define VTIME VEOL \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/termios-c_oflag.h b/libc/include/sparc-linux-gnu/bits/termios-c_oflag.h new file mode 100644 index 0000000000..fb2d8d1e16 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/termios-c_oflag.h @@ -0,0 +1,64 @@ +/* termios output mode definitions. Linux/sparc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_oflag bits */ +#define OPOST 0x00000001 +#define OLCUC 0x00000002 +#define ONLCR 0x00000004 +#define OCRNL 0x00000008 +#define ONOCR 0x00000010 +#define ONLRET 0x00000020 +#define OFILL 0x00000040 +#define OFDEL 0x00000080 +#if defined __USE_MISC || defined __USE_XOPEN +# define NLDLY 0x00000100 +# define NL0 0x00000000 +# define NL1 0x00000100 +# define CRDLY 0x00000600 +# define CR0 0x00000000 +# define CR1 0x00000200 +# define CR2 0x00000400 +# define CR3 0x00000600 +# define TABDLY 0x00001800 +# define TAB0 0x00000000 +# define TAB1 0x00000800 +# define TAB2 0x00001000 +# define TAB3 0x00001800 +# define BSDLY 0x00002000 +# define BS0 0x00000000 +# define BS1 0x00002000 +#define FFDLY 0x00008000 +#define FF0 0x00000000 +#define FF1 0x00008000 +#endif +#define VTDLY 0x00004000 +#define VT0 0x00000000 +#define VT1 0x00004000 + +# if defined __USE_GNU +#define PAGEOUT 0x00010000 /* SUNOS specific */ +#define WRAP 0x00020000 /* SUNOS specific */ +# endif + +#ifdef __USE_MISC +# define XTABS 0x00001800 +#endif \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/termios-struct.h b/libc/include/sparc-linux-gnu/bits/termios-struct.h new file mode 100644 index 0000000000..c76457619c --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/termios-struct.h @@ -0,0 +1,34 @@ +/* struct termios definition. Linux/sparc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 17 +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/libc/include/sparc-linux-gnu/bits/timerfd.h b/libc/include/sparc-linux-gnu/bits/timerfd.h new file mode 100644 index 0000000000..e858253959 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/timerfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2008-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 = 0x400000, +#define TFD_CLOEXEC TFD_CLOEXEC + TFD_NONBLOCK = 0x004000 +#define TFD_NONBLOCK TFD_NONBLOCK + }; \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/typesizes.h b/libc/include/sparc-linux-gnu/bits/typesizes.h new file mode 100644 index 0000000000..ac12c705b9 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/typesizes.h @@ -0,0 +1,83 @@ +/* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version. + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_TYPES_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_TYPESIZES_H +#define _BITS_TYPESIZES_H 1 + +/* See for the meaning of these macros. This file exists so + that need not vary across different GNU platforms. */ + +#define __DEV_T_TYPE __UQUAD_TYPE +#define __UID_T_TYPE __U32_TYPE +#define __GID_T_TYPE __U32_TYPE +#define __INO_T_TYPE __ULONGWORD_TYPE +#define __INO64_T_TYPE __UQUAD_TYPE +#define __MODE_T_TYPE __U32_TYPE +#define __NLINK_T_TYPE __U32_TYPE +#define __OFF_T_TYPE __SLONGWORD_TYPE +#define __OFF64_T_TYPE __SQUAD_TYPE +#define __PID_T_TYPE __S32_TYPE +#define __RLIM_T_TYPE __ULONGWORD_TYPE +#define __RLIM64_T_TYPE __UQUAD_TYPE +#define __BLKCNT_T_TYPE __SLONGWORD_TYPE +#define __BLKCNT64_T_TYPE __SQUAD_TYPE +#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE +#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE +#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE +#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __FSWORD_T_TYPE __SWORD_TYPE +#define __ID_T_TYPE __U32_TYPE +#define __CLOCK_T_TYPE __SLONGWORD_TYPE +#define __TIME_T_TYPE __SLONGWORD_TYPE +#define __USECONDS_T_TYPE __U32_TYPE +#define __SUSECONDS_T_TYPE __S32_TYPE +#define __DADDR_T_TYPE __S32_TYPE +#define __KEY_T_TYPE __S32_TYPE +#define __CLOCKID_T_TYPE __S32_TYPE +#define __TIMER_T_TYPE void * +#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE +#define __FSID_T_TYPE struct { int __val[2]; } +#define __SSIZE_T_TYPE __SWORD_TYPE +#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE +#define __CPU_MASK_TYPE __ULONGWORD_TYPE + +#if defined __arch64__ || defined __sparcv9 +/* Tell the libc code that off_t and off64_t are actually the same type + for all ABI purposes, even if possibly expressed as different base types + for C type-checking purposes. */ +# define __OFF_T_MATCHES_OFF64_T 1 + +/* Same for ino_t and ino64_t. */ +# define __INO_T_MATCHES_INO64_T 1 + +/* And for __rlim_t and __rlim64_t. */ +# define __RLIM_T_MATCHES_RLIM64_T 1 +#else +# define __RLIM_T_MATCHES_RLIM64_T 0 +#endif + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + + +#endif /* bits/typesizes.h */ \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/bits/wordsize.h b/libc/include/sparc-linux-gnu/bits/wordsize.h new file mode 100644 index 0000000000..e08131d423 --- /dev/null +++ b/libc/include/sparc-linux-gnu/bits/wordsize.h @@ -0,0 +1,11 @@ +/* Determine the wordsize from the preprocessor defines. */ + +#if defined __arch64__ || defined __sparcv9 +# define __WORDSIZE 64 +# define __WORDSIZE_TIME64_COMPAT32 1 +#else +# define __WORDSIZE 32 +# define __WORDSIZE32_SIZE_ULONG 0 +# define __WORDSIZE32_PTRDIFF_LONG 0 +# define __WORDSIZE_TIME64_COMPAT32 0 +#endif \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/fpu_control.h b/libc/include/sparc-linux-gnu/fpu_control.h new file mode 100644 index 0000000000..5456801580 --- /dev/null +++ b/libc/include/sparc-linux-gnu/fpu_control.h @@ -0,0 +1,72 @@ +/* FPU control word bits. SPARC version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Miguel de Icaza + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FPU_CONTROL_H +#define _FPU_CONTROL_H 1 + + +#include +#include + +/* masking of interrupts */ +#define _FPU_MASK_IM 0x08000000 +#define _FPU_MASK_OM 0x04000000 +#define _FPU_MASK_UM 0x02000000 +#define _FPU_MASK_ZM 0x01000000 +#define _FPU_MASK_PM 0x00800000 + +/* precision control */ +#define _FPU_EXTENDED 0x00000000 /* RECOMMENDED */ +#define _FPU_DOUBLE 0x20000000 +#define _FPU_80BIT 0x30000000 +#define _FPU_SINGLE 0x10000000 /* DO NOT USE */ + +/* rounding control / Sparc */ +#define _FPU_RC_DOWN 0xc0000000 +#define _FPU_RC_UP 0x80000000 +#define _FPU_RC_ZERO 0x40000000 +#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */ + +#define _FPU_RESERVED 0x30300000 /* Reserved bits in cw */ + + +/* Now two recommended cw */ + +/* Linux and IEEE default: + - extended precision + - rounding to nearest + - no exceptions */ +#define _FPU_DEFAULT 0x0 +#define _FPU_IEEE 0x0 + +/* Type of the control word. */ +typedef unsigned long int fpu_control_t; + +#if __WORDSIZE == 64 +# define _FPU_GETCW(cw) __asm__ __volatile__ ("stx %%fsr,%0" : "=m" (*&cw)) +# define _FPU_SETCW(cw) __asm__ __volatile__ ("ldx %0,%%fsr" : : "m" (*&cw)) +#else +# define _FPU_GETCW(cw) __asm__ __volatile__ ("st %%fsr,%0" : "=m" (*&cw)) +# define _FPU_SETCW(cw) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (*&cw)) +#endif + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* fpu_control.h */ \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/gnu/lib-names-64.h b/libc/include/sparc-linux-gnu/gnu/lib-names-64.h new file mode 100644 index 0000000000..08e73abcba --- /dev/null +++ b/libc/include/sparc-linux-gnu/gnu/lib-names-64.h @@ -0,0 +1,31 @@ +/* This file is automatically generated. */ +#ifndef __GNU_LIB_NAMES_H +# error "Never use directly; include instead." +#endif + +#define LD_LINUX_SO "ld-linux.so.2" +#define LD_SO "ld-linux.so.2" +#define LIBANL_SO "libanl.so.1" +#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1" +#define LIBCRYPT_SO "libcrypt.so.1" +#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_NISPLUS_SO "libnss_nisplus.so.2" +#define LIBNSS_NIS_SO "libnss_nis.so.2" +#define LIBNSS_TEST1_SO "libnss_test1.so.2" +#define LIBNSS_TEST2_SO "libnss_test2.so.2" +#define LIBPTHREAD_SO "libpthread.so.0" +#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/libc/include/sparc-linux-gnu/gnu/lib-names.h b/libc/include/sparc-linux-gnu/gnu/lib-names.h new file mode 100644 index 0000000000..ad6471507a --- /dev/null +++ b/libc/include/sparc-linux-gnu/gnu/lib-names.h @@ -0,0 +1,16 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#include + +#if __WORDSIZE == 32 +# include +#endif +#if __WORDSIZE == 64 +# include +#endif + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/gnu/stubs-64.h b/libc/include/sparc-linux-gnu/gnu/stubs-64.h new file mode 100644 index 0000000000..cab3cfc760 --- /dev/null +++ b/libc/include/sparc-linux-gnu/gnu/stubs-64.h @@ -0,0 +1,26 @@ +/* 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_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_getmsg +#define __stub_getpmsg +#define __stub_gtty +#define __stub_lchmod +#define __stub_pkey_alloc +#define __stub_pkey_free +#define __stub_putmsg +#define __stub_putpmsg +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/gnu/stubs.h b/libc/include/sparc-linux-gnu/gnu/stubs.h new file mode 100644 index 0000000000..120171a87a --- /dev/null +++ b/libc/include/sparc-linux-gnu/gnu/stubs.h @@ -0,0 +1,12 @@ +/* This file is automatically generated. + This file selects the right generated file of `__stub_FUNCTION' macros + based on the architecture being compiled for. */ + +#include + +#if __WORDSIZE == 32 +# include +#endif +#if __WORDSIZE == 64 +# include +#endif \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/ieee754.h b/libc/include/sparc-linux-gnu/ieee754.h new file mode 100644 index 0000000000..e347e4a6e5 --- /dev/null +++ b/libc/include/sparc-linux-gnu/ieee754.h @@ -0,0 +1,170 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +__BEGIN_DECLS + +union ieee754_float + { + float f; + + /* This is the IEEE 754 single-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int mantissa:23; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:23; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int quiet_nan:1; + unsigned int mantissa:22; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:22; + unsigned int quiet_nan:1; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee_nan; + }; + +#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ + + +union ieee754_double + { + double d; + + /* This is the IEEE 754 double-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:20; + unsigned int mantissa1:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:19; + unsigned int mantissa1:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ + + +union ieee854_long_double + { + long double d; + + /* This is the IEEE 854 quad-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:16; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:16; + unsigned int exponent:15; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:15; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:15; + unsigned int quiet_nan:1; + unsigned int exponent:15; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ + +__END_DECLS + +#endif /* ieee754.h */ \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/sys/ptrace.h b/libc/include/sparc-linux-gnu/sys/ptrace.h new file mode 100644 index 0000000000..c64858789a --- /dev/null +++ b/libc/include/sparc-linux-gnu/sys/ptrace.h @@ -0,0 +1,229 @@ +/* `ptrace' debugger support interface. Linux/SPARC version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include +#include +#include + +/* Linux/SPARC kernels up to 2.3.18 do not care much + about what namespace polution, so use a kludge now. */ +#undef PTRACE_GETREGS +#undef PTRACE_SETREGS +#undef PTRACE_GETFPREGS +#undef PTRACE_SETFPREGS +#undef PTRACE_READDATA +#undef PTRACE_WRITEDATA +#undef PTRACE_READTEXT +#undef PTRACE_WRITETEXT +#undef PTRACE_SUNDETACH + +__BEGIN_DECLS + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 11, +#define PT_DETACH PTRACE_DETACH + + /* This define is needed for older programs which were + trying to work around sparc-linux ptrace nastiness. */ +#define PTRACE_SUNDETACH PTRACE_DETACH + +#if __WORDSIZE == 32 + + /* Get all general purpose registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETREGS = 12, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETREGS = 13, +#define PT_SETREGS PTRACE_SETREGS + + /* Get all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETFPREGS = 14, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETFPREGS = 15, +#define PT_SETFPREGS PTRACE_SETFPREGS + +#endif + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Write several bytes at a time. */ + PTRACE_WRITEDATA = 17, +#define PTRACE_WRITEDATA PTRACE_WRITEDATA + + /* Read several bytes at a time. */ + PTRACE_READTEXT = 18, +#define PTRACE_READTEXT PTRACE_READTEXT +#define PTRACE_READDATA PTRACE_READTEXT + + /* Write several bytes at a time. */ + PTRACE_WRITETEXT = 19, +#define PTRACE_WRITETEXT PTRACE_WRITETEXT + +#if __WORDSIZE == 64 + + /* Get all general purpose registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETREGS = 22, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETREGS = 23, +#define PT_SETREGS PTRACE_SETREGS + +#endif + + /* Continue and stop at the next entry to or return from syscall. */ + PTRACE_SYSCALL = 24, +#define PTRACE_SYSCALL PTRACE_SYSCALL + +#if __WORDSIZE == 64 + + /* Get all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETFPREGS = 25, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETFPREGS = 26, +#define PT_SETFPREGS PTRACE_SETFPREGS + +#endif + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + /* Retrieve siginfo_t structures without removing signals from a queue. */ + PTRACE_PEEKSIGINFO = 0x4209, +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO + + /* Get the mask of blocked signals. */ + PTRACE_GETSIGMASK = 0x420a, +#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK + + /* Change the mask of blocked signals. */ + PTRACE_SETSIGMASK = 0x420b, +#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK + + /* Get seccomp BPF filters. */ + PTRACE_SECCOMP_GET_FILTER = 0x420c, +#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER + + /* Get seccomp BPF filter metadata. */ + PTRACE_SECCOMP_GET_METADATA = 0x420d +#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA +}; + + +#include + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/sys/ucontext.h b/libc/include/sparc-linux-gnu/sys/ucontext.h new file mode 100644 index 0000000000..ce917b46da --- /dev/null +++ b/libc/include/sparc-linux-gnu/sys/ucontext.h @@ -0,0 +1,304 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include + +#include + + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + +#if __WORDSIZE == 64 + +#define __MC_NGREG 19 +#ifdef __USE_MISC +# define MC_TSTATE 0 +# define MC_PC 1 +# define MC_NPC 2 +# define MC_Y 3 +# define MC_G1 4 +# define MC_G2 5 +# define MC_G3 6 +# define MC_G4 7 +# define MC_G5 8 +# define MC_G6 9 +# define MC_G7 10 +# define MC_O0 11 +# define MC_O1 12 +# define MC_O2 13 +# define MC_O3 14 +# define MC_O4 15 +# define MC_O5 16 +# define MC_O6 17 +# define MC_O7 18 +# define MC_NGREG __MC_NGREG +#endif + +typedef unsigned long mc_greg_t; +typedef mc_greg_t mc_gregset_t[__MC_NGREG]; + +#ifdef __USE_MISC +# define MC_MAXFPQ 16 +#endif +struct __mc_fq { + unsigned long *__ctx(mcfq_addr); + unsigned int __ctx(mcfq_insn); +}; + +typedef struct { + union { + unsigned int __ctx(sregs)[32]; + unsigned long __ctx(dregs)[32]; + long double __ctx(qregs)[16]; + } __ctx(mcfpu_fregs); + unsigned long __ctx(mcfpu_fsr); + unsigned long __ctx(mcfpu_fprs); + unsigned long __ctx(mcfpu_gsr); + struct __mc_fq *__ctx(mcfpu_fq); + unsigned char __ctx(mcfpu_qcnt); + unsigned char __ctx(mcfpu_qentsz); + unsigned char __ctx(mcfpu_enab); +} mc_fpu_t; + +typedef struct { + mc_gregset_t __ctx(mc_gregs); + mc_greg_t __ctx(mc_fp); + mc_greg_t __ctx(mc_i7); + mc_fpu_t __ctx(mc_fpregs); +} mcontext_t; + +typedef struct ucontext_t { + struct ucontext_t *uc_link; + unsigned long __ctx(uc_flags); + unsigned long __uc_sigmask; + mcontext_t uc_mcontext; + stack_t uc_stack; + sigset_t uc_sigmask; +} ucontext_t; + +#endif /* __WORDISIZE == 64 */ + +/* + * Location of the users' stored registers relative to R0. + * Usage is as an index into a gregset_t array or as u.u_ar0[XX]. + */ +#ifdef __USE_MISC +# define REG_PSR (0) +# define REG_PC (1) +# define REG_nPC (2) +# define REG_Y (3) +# define REG_G1 (4) +# define REG_G2 (5) +# define REG_G3 (6) +# define REG_G4 (7) +# define REG_G5 (8) +# define REG_G6 (9) +# define REG_G7 (10) +# define REG_O0 (11) +# define REG_O1 (12) +# define REG_O2 (13) +# define REG_O3 (14) +# define REG_O4 (15) +# define REG_O5 (16) +# define REG_O6 (17) +# define REG_O7 (18) +#endif + +/* + * A gregset_t is defined as an array type for compatibility with the reference + * source. This is important due to differences in the way the C language + * treats arrays and structures as parameters. + * + * Note that NGREG is really (sizeof (struct regs) / sizeof (greg_t)), + * but that the ABI defines it absolutely to be 21 (resp. 19). + */ + +#if __WORDSIZE == 64 + +# define __NGREG 21 +# ifdef __USE_MISC +# define REG_ASI (19) +# define REG_FPRS (20) + +# define NGREG __NGREG +# endif +typedef long greg_t; + +#else /* __WORDSIZE == 32 */ + +# define __NGREG 19 +# ifdef __USE_MISC +# define NGREG __NGREG +# endif +typedef int greg_t; + +#endif /* __WORDSIZE == 32 */ + +typedef greg_t gregset_t[__NGREG]; + +/* + * The following structures define how a register window can appear on the + * stack. This structure is available (when required) through the `gwins' + * field of an mcontext (nested within ucontext). SPARC_MAXWINDOW is the + * maximum number of outstanding regiters window defined in the SPARC + * architecture (*not* implementation). + */ +# define __SPARC_MAXREGWINDOW 31 /* max windows in SPARC arch. */ +#ifdef __USE_MISC +# define SPARC_MAXREGWINDOW __SPARC_MAXREGWINDOW +#endif +struct __rwindow + { + greg_t __ctx(rw_local)[8]; /* locals */ + greg_t __ctx(rw_in)[8]; /* ins */ + }; + +#ifdef __USE_MISC +# define rw_fp __ctx(rw_in)[6] /* frame pointer */ +# define rw_rtn __ctx(rw_in)[7] /* return address */ +#endif + +typedef struct + { + int __ctx(wbcnt); + int *__ctx(spbuf)[__SPARC_MAXREGWINDOW]; + struct __rwindow __ctx(wbuf)[__SPARC_MAXREGWINDOW]; + } gwindows_t; + +/* + * Floating point definitions. + */ + +#ifdef __USE_MISC +# define MAXFPQ 16 /* max # of fpu queue entries currently supported */ +#endif + +/* + * struct fq defines the minimal format of a floating point instruction queue + * entry. The size of entries in the floating point queue are implementation + * dependent. The union FQu is guarenteed to be the first field in any ABI + * conformant system implementation. Any additional fields provided by an + * implementation should not be used applications designed to be ABI conformant. */ + +struct __fpq + { + unsigned long *__ctx(fpq_addr); /* address */ + unsigned long __ctx(fpq_instr); /* instruction */ + }; + +struct __fq + { + union /* FPU inst/addr queue */ + { + double __ctx(whole); + struct __fpq __ctx(fpq); + } __ctx(FQu); + }; + +#ifdef __USE_MISC +# define FPU_REGS_TYPE unsigned +# define FPU_DREGS_TYPE unsigned long long +# define V7_FPU_FSR_TYPE unsigned +# define V9_FPU_FSR_TYPE unsigned long long +# define V9_FPU_FPRS_TYPE unsigned +#endif + +#if __WORDSIZE == 64 + +typedef struct + { + union { /* FPU floating point regs */ + unsigned __ctx(fpu_regs)[32]; /* 32 singles */ + double __ctx(fpu_dregs)[32]; /* 32 doubles */ + long double __ctx(fpu_qregs)[16]; /* 16 quads */ + } __ctx(fpu_fr); + struct __fq *__ctx(fpu_q); /* ptr to array of FQ entries */ + unsigned long __ctx(fpu_fsr); /* FPU status register */ + unsigned char __ctx(fpu_qcnt); /* # of entries in saved FQ */ + unsigned char __ctx(fpu_q_entrysize); /* # of bytes per FQ entry */ + unsigned char __ctx(fpu_en); /* flag signifying fpu in use */ + } fpregset_t; + +#else /* __WORDSIZE == 32 */ + +typedef struct + { + union { /* FPU floating point regs */ + __extension__ unsigned long long __ctx(fpu_regs)[32]; /* 32 singles */ + double __ctx(fpu_dregs)[16]; /* 16 doubles */ + } __ctx(fpu_fr); + struct __fq *__ctx(fpu_q); /* ptr to array of FQ entries */ + unsigned __ctx(fpu_fsr); /* FPU status register */ + unsigned char __ctx(fpu_qcnt); /* # of entries in saved FQ */ + unsigned char __ctx(fpu_q_entrysize); /* # of bytes per FQ entry */ + unsigned char __ctx(fpu_en); /* flag signifying fpu in use */ + } fpregset_t; + +/* + * The following structure is for associating extra register state with + * the ucontext structure and is kept within the uc_mcontext filler area. + * + * If (xrs_id == XRS_ID) then the xrs_ptr field is a valid pointer to + * extra register state. The exact format of the extra register state + * pointed to by xrs_ptr is platform-dependent. + * + * Note: a platform may or may not manage extra register state. + */ +typedef struct + { + unsigned int __ctx(xrs_id); /* indicates xrs_ptr validity */ + void * __ctx(xrs_ptr); /* ptr to extra reg state */ + } xrs_t; + +#ifdef __USE_MISC +# define XRS_ID 0x78727300 /* the string "xrs" */ +#endif + +typedef struct + { + gregset_t __ctx(gregs); /* general register set */ + gwindows_t *__ctx(gwins); /* POSSIBLE pointer to register + windows */ + fpregset_t __ctx(fpregs); /* floating point register set */ + xrs_t __ctx(xrs); /* POSSIBLE extra register state + association */ + long __glibc_reserved1[19]; + } mcontext_t; + + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long __ctx(uc_flags); + struct ucontext_t *uc_link; + sigset_t uc_sigmask; + stack_t uc_stack; + mcontext_t uc_mcontext; + } ucontext_t; + +#endif /* __WORDSIZE == 32 */ +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/include/sparc-linux-gnu/sys/user.h b/libc/include/sparc-linux-gnu/sys/user.h new file mode 100644 index 0000000000..142047ab1b --- /dev/null +++ b/libc/include/sparc-linux-gnu/sys/user.h @@ -0,0 +1,86 @@ +/* Copyright (C) 2003-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H +#define _SYS_USER_H 1 + +#include + +struct sunos_regs +{ + unsigned int psr, pc, npc, y; + unsigned int regs[15]; +}; + +struct sunos_fpqueue +{ + unsigned int *addr; + unsigned int inst; +}; + +struct sunos_fp +{ + union + { + unsigned int regs[32]; + double reg_dbls[16]; + } fregs; + unsigned int fsr; + unsigned int flags; + unsigned int extra; + unsigned int fpq_count; + struct sunos_fpqueue fpq[16]; +}; + +struct sunos_fpu +{ + struct sunos_fp fpstatus; +}; + +/* The SunOS core file header layout. */ +struct user { + unsigned int magic; + unsigned int len; + struct sunos_regs regs; + struct + { + unsigned char a_dynamic :1; + unsigned char a_toolversion :7; + unsigned char a_machtype; + unsigned short a_info; + unsigned int a_text; + unsigned int a_data; + unsigned int a_bss; + unsigned int a_syms; + unsigned int a_entry; + unsigned int a_trsize; + unsigned int a_drsize; + } uexec; + int signal; + size_t u_tsize; + size_t u_dsize; + size_t u_ssize; + char u_comm[17]; + struct sunos_fpu fpu; + unsigned int sigcode; +}; + +#define NBPG 0x2000 +#define UPAGES 1 +#define SUNOS_CORE_MAGIC 0x080456 + +#endif \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/a.out.h b/libc/include/sparcv9-linux-gnu/a.out.h new file mode 100644 index 0000000000..4002e18c91 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/a.out.h @@ -0,0 +1,174 @@ +#ifndef __A_OUT_GNU_H__ +#define __A_OUT_GNU_H__ + +#include + +#define __GNU_EXEC_MACROS__ + +struct exec +{ + unsigned char a_dynamic:1; /* A __DYNAMIC is in this image. */ + unsigned char a_toolversion:7; + unsigned char a_machtype; + unsigned short a_info; + unsigned int a_text; /* Length of text, in bytes. */ + unsigned int a_data; /* Length of data, in bytes. */ + unsigned int a_bss; /* Length of bss, in bytes. */ + unsigned int a_syms; /* Length of symbol table, in bytes. */ + unsigned int a_entry; /* Where program begins. */ + unsigned int a_trsize; + unsigned int a_drsize; +}; + +enum machine_type +{ + M_OLDSUN2 = 0, + M_68010 = 1, + M_68020 = 2, + M_SPARC = 3, + M_386 = 100, + M_MIPS1 = 151, + M_MIPS2 = 152 +}; + +#define N_MAGIC(exec) ((exec).a_info & 0xffff) +#define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff)) +#define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff) +#define N_SET_INFO(exec, magic, type, flags) \ + ((exec).a_info = ((magic) & 0xffff) \ + | (((int)(type) & 0xff) << 16) \ + | (((flags) & 0xff) << 24)) +#define N_SET_MAGIC(exec, magic) \ + ((exec).a_info = ((exec).a_info & 0xffff0000) | ((magic) & 0xffff)) +#define N_SET_MACHTYPE(exec, machtype) \ + ((exec).a_info = \ + ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16)) +#define N_SET_FLAGS(exec, flags) \ + ((exec).a_info = \ + ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24)) + +/* Code indicating object file or impure executable. */ +#define OMAGIC 0407 +/* Code indicating pure executable. */ +#define NMAGIC 0410 +/* Code indicating demand-paged executable. */ +#define ZMAGIC 0413 +/* This indicates a demand-paged executable with the header in the text. + The first page is unmapped to help trap NULL pointer references. */ +#define QMAGIC 0314 +/* Code indicating core file. */ +#define CMAGIC 0421 + +#define N_TRSIZE(a) ((a).a_trsize) +#define N_DRSIZE(a) ((a).a_drsize) +#define N_SYMSIZE(a) ((a).a_syms) +#define N_BADMAG(x) \ + (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \ + && N_MAGIC(x) != ZMAGIC && N_MAGIC(x) != QMAGIC) +#define _N_HDROFF(x) (1024 - sizeof (struct exec)) +#define N_TXTOFF(x) \ + (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec)) +#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text) +#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data) +#define N_DRELOFF(x) (N_TRELOFF(x) + N_TRSIZE(x)) +#define N_SYMOFF(x) \ + (N_TXTOFF(x) + (x).a_text + (x).a_data + (x).a_trsize + (x).a_drsize) +#define N_STROFF(x) (N_SYMOFF(x) + N_SYMSIZE(x)) + +#define SPARC_PGSIZE 0x2000 + +/* Address of text segment in memory after it is loaded. */ +#define N_TXTADDR(x) \ + (unsigned long)(((N_MAGIC(x) == ZMAGIC) && ((x).a_entry < SPARC_PGSIZE)) \ + ? 0 : SPARC_PGSIZE) + +/* Address of data segment in memory after it is loaded. */ +#define SEGMENT_SIZE SPARC_PGSIZE + +#define _N_SEGMENT_ROUND(x) (((x) + SEGMENT_SIZE - 1) & ~(SEGMENT_SIZE - 1)) +#define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text) + +#define N_DATADDR(x) \ + (N_MAGIC(x)==OMAGIC \ + ? (N_TXTADDR(x) + (x).a_text) \ + : (unsigned long)(_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) +#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data) + +#if !defined (N_NLIST_DECLARED) +struct nlist +{ + union + { + char *n_name; + struct nlist *n_next; + long n_strx; + } n_un; + unsigned char n_type; + char n_other; + short n_desc; + unsigned long n_value; +}; +#endif /* no N_NLIST_DECLARED. */ + +#define N_UNDF 0 +#define N_ABS 2 +#define N_TEXT 4 +#define N_DATA 6 +#define N_BSS 8 +#define N_FN 15 +#define N_EXT 1 +#define N_TYPE 036 +#define N_STAB 0340 +#define N_INDR 0xa +#define N_SETA 0x14 /* Absolute set element symbol. */ +#define N_SETT 0x16 /* Text set element symbol. */ +#define N_SETD 0x18 /* Data set element symbol. */ +#define N_SETB 0x1A /* Bss set element symbol. */ +#define N_SETV 0x1C /* Pointer to set vector in data area. */ + +#if !defined (N_RELOCATION_INFO_DECLARED) +enum reloc_type +{ + RELOC_8, + RELOC_16, + RELOC_32, + RELOC_DISP8, + RELOC_DISP16, + RELOC_DISP32, + RELOC_WDISP30, + RELOC_WDISP22, + RELOC_HI22, + RELOC_22, + RELOC_13, + RELOC_LO10, + RELOC_SFA_BASE, + RELOC_SFA_OFF13, + RELOC_BASE10, + RELOC_BASE13, + RELOC_BASE22, + RELOC_PC10, + RELOC_PC22, + RELOC_JMP_TBL, + RELOC_SEGOFF16, + RELOC_GLOB_DAT, + RELOC_JMP_SLOT, + RELOC_RELATIVE +}; + +/* This structure describes a single relocation to be performed. + The text-relocation section of the file is a vector of these structures, + all of which apply to the text section. + Likewise, the data-relocation section applies to the data section. */ + +struct relocation_info +{ + unsigned int r_address; + unsigned int r_index:24; + unsigned int r_extern:1; + int r_pad:2; + enum reloc_type r_type:5; + int r_addend; +}; +#endif /* no N_RELOCATION_INFO_DECLARED. */ + +#endif /* __A_OUT_GNU_H__ */ \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/asm/unistd.h b/libc/include/sparcv9-linux-gnu/asm/unistd.h new file mode 100644 index 0000000000..45b4bf1875 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/asm/unistd.h @@ -0,0 +1,453 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * System calls under the Sparc. + * + * Don't be scared by the ugly clobbers, it is the only way I can + * think of right now to force the arguments into fixed registers + * before the trap into the system call with gcc 'asm' statements. + * + * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net) + * + * SunOS compatibility based upon preliminary work which is: + * + * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) + */ +#ifndef _UAPI_SPARC_UNISTD_H +#define _UAPI_SPARC_UNISTD_H + +#ifndef __32bit_syscall_numbers__ +#ifndef __arch64__ +#define __32bit_syscall_numbers__ +#endif +#endif + +#define __NR_restart_syscall 0 /* Linux Specific */ +#define __NR_exit 1 /* Common */ +#define __NR_fork 2 /* Common */ +#define __NR_read 3 /* Common */ +#define __NR_write 4 /* Common */ +#define __NR_open 5 /* Common */ +#define __NR_close 6 /* Common */ +#define __NR_wait4 7 /* Common */ +#define __NR_creat 8 /* Common */ +#define __NR_link 9 /* Common */ +#define __NR_unlink 10 /* Common */ +#define __NR_execv 11 /* SunOS Specific */ +#define __NR_chdir 12 /* Common */ +#define __NR_chown 13 /* Common */ +#define __NR_mknod 14 /* Common */ +#define __NR_chmod 15 /* Common */ +#define __NR_lchown 16 /* Common */ +#define __NR_brk 17 /* Common */ +#define __NR_perfctr 18 /* Performance counter operations */ +#define __NR_lseek 19 /* Common */ +#define __NR_getpid 20 /* Common */ +#define __NR_capget 21 /* Linux Specific */ +#define __NR_capset 22 /* Linux Specific */ +#define __NR_setuid 23 /* Implemented via setreuid in SunOS */ +#define __NR_getuid 24 /* Common */ +#define __NR_vmsplice 25 /* ENOSYS under SunOS */ +#define __NR_ptrace 26 /* Common */ +#define __NR_alarm 27 /* Implemented via setitimer in SunOS */ +#define __NR_sigaltstack 28 /* Common */ +#define __NR_pause 29 /* Is sigblock(0)->sigpause() in SunOS */ +#define __NR_utime 30 /* Implemented via utimes() under SunOS */ +#ifdef __32bit_syscall_numbers__ +#define __NR_lchown32 31 /* Linux sparc32 specific */ +#define __NR_fchown32 32 /* Linux sparc32 specific */ +#endif +#define __NR_access 33 /* Common */ +#define __NR_nice 34 /* Implemented via get/setpriority() in SunOS */ +#ifdef __32bit_syscall_numbers__ +#define __NR_chown32 35 /* Linux sparc32 specific */ +#endif +#define __NR_sync 36 /* Common */ +#define __NR_kill 37 /* Common */ +#define __NR_stat 38 /* Common */ +#define __NR_sendfile 39 /* Linux Specific */ +#define __NR_lstat 40 /* Common */ +#define __NR_dup 41 /* Common */ +#define __NR_pipe 42 /* Common */ +#define __NR_times 43 /* Implemented via getrusage() in SunOS */ +#ifdef __32bit_syscall_numbers__ +#define __NR_getuid32 44 /* Linux sparc32 specific */ +#endif +#define __NR_umount2 45 /* Linux Specific */ +#define __NR_setgid 46 /* Implemented via setregid() in SunOS */ +#define __NR_getgid 47 /* Common */ +#define __NR_signal 48 /* Implemented via sigvec() in SunOS */ +#define __NR_geteuid 49 /* SunOS calls getuid() */ +#define __NR_getegid 50 /* SunOS calls getgid() */ +#define __NR_acct 51 /* Common */ +#ifdef __32bit_syscall_numbers__ +#define __NR_getgid32 53 /* Linux sparc32 specific */ +#else +#define __NR_memory_ordering 52 /* Linux Specific */ +#endif +#define __NR_ioctl 54 /* Common */ +#define __NR_reboot 55 /* Common */ +#ifdef __32bit_syscall_numbers__ +#define __NR_mmap2 56 /* Linux sparc32 Specific */ +#endif +#define __NR_symlink 57 /* Common */ +#define __NR_readlink 58 /* Common */ +#define __NR_execve 59 /* Common */ +#define __NR_umask 60 /* Common */ +#define __NR_chroot 61 /* Common */ +#define __NR_fstat 62 /* Common */ +#define __NR_fstat64 63 /* Linux Specific */ +#define __NR_getpagesize 64 /* Common */ +#define __NR_msync 65 /* Common in newer 1.3.x revs... */ +#define __NR_vfork 66 /* Common */ +#define __NR_pread64 67 /* Linux Specific */ +#define __NR_pwrite64 68 /* Linux Specific */ +#ifdef __32bit_syscall_numbers__ +#define __NR_geteuid32 69 /* Linux sparc32, sbrk under SunOS */ +#define __NR_getegid32 70 /* Linux sparc32, sstk under SunOS */ +#endif +#define __NR_mmap 71 /* Common */ +#ifdef __32bit_syscall_numbers__ +#define __NR_setreuid32 72 /* Linux sparc32, vadvise under SunOS */ +#endif +#define __NR_munmap 73 /* Common */ +#define __NR_mprotect 74 /* Common */ +#define __NR_madvise 75 /* Common */ +#define __NR_vhangup 76 /* Common */ +#ifdef __32bit_syscall_numbers__ +#define __NR_truncate64 77 /* Linux sparc32 Specific */ +#endif +#define __NR_mincore 78 /* Common */ +#define __NR_getgroups 79 /* Common */ +#define __NR_setgroups 80 /* Common */ +#define __NR_getpgrp 81 /* Common */ +#ifdef __32bit_syscall_numbers__ +#define __NR_setgroups32 82 /* Linux sparc32, setpgrp under SunOS */ +#endif +#define __NR_setitimer 83 /* Common */ +#ifdef __32bit_syscall_numbers__ +#define __NR_ftruncate64 84 /* Linux sparc32 Specific */ +#endif +#define __NR_swapon 85 /* Common */ +#define __NR_getitimer 86 /* Common */ +#ifdef __32bit_syscall_numbers__ +#define __NR_setuid32 87 /* Linux sparc32, gethostname under SunOS */ +#endif +#define __NR_sethostname 88 /* Common */ +#ifdef __32bit_syscall_numbers__ +#define __NR_setgid32 89 /* Linux sparc32, getdtablesize under SunOS */ +#endif +#define __NR_dup2 90 /* Common */ +#ifdef __32bit_syscall_numbers__ +#define __NR_setfsuid32 91 /* Linux sparc32, getdopt under SunOS */ +#endif +#define __NR_fcntl 92 /* Common */ +#define __NR_select 93 /* Common */ +#ifdef __32bit_syscall_numbers__ +#define __NR_setfsgid32 94 /* Linux sparc32, setdopt under SunOS */ +#endif +#define __NR_fsync 95 /* Common */ +#define __NR_setpriority 96 /* Common */ +#define __NR_socket 97 /* Common */ +#define __NR_connect 98 /* Common */ +#define __NR_accept 99 /* Common */ +#define __NR_getpriority 100 /* Common */ +#define __NR_rt_sigreturn 101 /* Linux Specific */ +#define __NR_rt_sigaction 102 /* Linux Specific */ +#define __NR_rt_sigprocmask 103 /* Linux Specific */ +#define __NR_rt_sigpending 104 /* Linux Specific */ +#define __NR_rt_sigtimedwait 105 /* Linux Specific */ +#define __NR_rt_sigqueueinfo 106 /* Linux Specific */ +#define __NR_rt_sigsuspend 107 /* Linux Specific */ +#ifdef __32bit_syscall_numbers__ +#define __NR_setresuid32 108 /* Linux Specific, sigvec under SunOS */ +#define __NR_getresuid32 109 /* Linux Specific, sigblock under SunOS */ +#define __NR_setresgid32 110 /* Linux Specific, sigsetmask under SunOS */ +#define __NR_getresgid32 111 /* Linux Specific, sigpause under SunOS */ +#define __NR_setregid32 112 /* Linux sparc32, sigstack under SunOS */ +#else +#define __NR_setresuid 108 /* Linux Specific, sigvec under SunOS */ +#define __NR_getresuid 109 /* Linux Specific, sigblock under SunOS */ +#define __NR_setresgid 110 /* Linux Specific, sigsetmask under SunOS */ +#define __NR_getresgid 111 /* Linux Specific, sigpause under SunOS */ +#endif +#define __NR_recvmsg 113 /* Common */ +#define __NR_sendmsg 114 /* Common */ +#ifdef __32bit_syscall_numbers__ +#define __NR_getgroups32 115 /* Linux sparc32, vtrace under SunOS */ +#endif +#define __NR_gettimeofday 116 /* Common */ +#define __NR_getrusage 117 /* Common */ +#define __NR_getsockopt 118 /* Common */ +#define __NR_getcwd 119 /* Linux Specific */ +#define __NR_readv 120 /* Common */ +#define __NR_writev 121 /* Common */ +#define __NR_settimeofday 122 /* Common */ +#define __NR_fchown 123 /* Common */ +#define __NR_fchmod 124 /* Common */ +#define __NR_recvfrom 125 /* Common */ +#define __NR_setreuid 126 /* Common */ +#define __NR_setregid 127 /* Common */ +#define __NR_rename 128 /* Common */ +#define __NR_truncate 129 /* Common */ +#define __NR_ftruncate 130 /* Common */ +#define __NR_flock 131 /* Common */ +#define __NR_lstat64 132 /* Linux Specific */ +#define __NR_sendto 133 /* Common */ +#define __NR_shutdown 134 /* Common */ +#define __NR_socketpair 135 /* Common */ +#define __NR_mkdir 136 /* Common */ +#define __NR_rmdir 137 /* Common */ +#define __NR_utimes 138 /* SunOS Specific */ +#define __NR_stat64 139 /* Linux Specific */ +#define __NR_sendfile64 140 /* adjtime under SunOS */ +#define __NR_getpeername 141 /* Common */ +#define __NR_futex 142 /* gethostid under SunOS */ +#define __NR_gettid 143 /* ENOSYS under SunOS */ +#define __NR_getrlimit 144 /* Common */ +#define __NR_setrlimit 145 /* Common */ +#define __NR_pivot_root 146 /* Linux Specific, killpg under SunOS */ +#define __NR_prctl 147 /* ENOSYS under SunOS */ +#define __NR_pciconfig_read 148 /* ENOSYS under SunOS */ +#define __NR_pciconfig_write 149 /* ENOSYS under SunOS */ +#define __NR_getsockname 150 /* Common */ +#define __NR_inotify_init 151 /* Linux specific */ +#define __NR_inotify_add_watch 152 /* Linux specific */ +#define __NR_poll 153 /* Common */ +#define __NR_getdents64 154 /* Linux specific */ +#ifdef __32bit_syscall_numbers__ +#define __NR_fcntl64 155 /* Linux sparc32 Specific */ +#endif +#define __NR_inotify_rm_watch 156 /* Linux specific */ +#define __NR_statfs 157 /* Common */ +#define __NR_fstatfs 158 /* Common */ +#define __NR_umount 159 /* Common */ +#define __NR_sched_set_affinity 160 /* Linux specific, async_daemon under SunOS */ +#define __NR_sched_get_affinity 161 /* Linux specific, getfh under SunOS */ +#define __NR_getdomainname 162 /* SunOS Specific */ +#define __NR_setdomainname 163 /* Common */ +#ifndef __32bit_syscall_numbers__ +#define __NR_utrap_install 164 /* SYSV ABI/v9 required */ +#endif +#define __NR_quotactl 165 /* Common */ +#define __NR_set_tid_address 166 /* Linux specific, exportfs under SunOS */ +#define __NR_mount 167 /* Common */ +#define __NR_ustat 168 /* Common */ +#define __NR_setxattr 169 /* SunOS: semsys */ +#define __NR_lsetxattr 170 /* SunOS: msgsys */ +#define __NR_fsetxattr 171 /* SunOS: shmsys */ +#define __NR_getxattr 172 /* SunOS: auditsys */ +#define __NR_lgetxattr 173 /* SunOS: rfssys */ +#define __NR_getdents 174 /* Common */ +#define __NR_setsid 175 /* Common */ +#define __NR_fchdir 176 /* Common */ +#define __NR_fgetxattr 177 /* SunOS: fchroot */ +#define __NR_listxattr 178 /* SunOS: vpixsys */ +#define __NR_llistxattr 179 /* SunOS: aioread */ +#define __NR_flistxattr 180 /* SunOS: aiowrite */ +#define __NR_removexattr 181 /* SunOS: aiowait */ +#define __NR_lremovexattr 182 /* SunOS: aiocancel */ +#define __NR_sigpending 183 /* Common */ +#define __NR_query_module 184 /* Linux Specific */ +#define __NR_setpgid 185 /* Common */ +#define __NR_fremovexattr 186 /* SunOS: pathconf */ +#define __NR_tkill 187 /* SunOS: fpathconf */ +#define __NR_exit_group 188 /* Linux specific, sysconf undef SunOS */ +#define __NR_uname 189 /* Linux Specific */ +#define __NR_init_module 190 /* Linux Specific */ +#define __NR_personality 191 /* Linux Specific */ +#define __NR_remap_file_pages 192 /* Linux Specific */ +#define __NR_epoll_create 193 /* Linux Specific */ +#define __NR_epoll_ctl 194 /* Linux Specific */ +#define __NR_epoll_wait 195 /* Linux Specific */ +#define __NR_ioprio_set 196 /* Linux Specific */ +#define __NR_getppid 197 /* Linux Specific */ +#define __NR_sigaction 198 /* Linux Specific */ +#define __NR_sgetmask 199 /* Linux Specific */ +#define __NR_ssetmask 200 /* Linux Specific */ +#define __NR_sigsuspend 201 /* Linux Specific */ +#define __NR_oldlstat 202 /* Linux Specific */ +#define __NR_uselib 203 /* Linux Specific */ +#define __NR_readdir 204 /* Linux Specific */ +#define __NR_readahead 205 /* Linux Specific */ +#define __NR_socketcall 206 /* Linux Specific */ +#define __NR_syslog 207 /* Linux Specific */ +#define __NR_lookup_dcookie 208 /* Linux Specific */ +#define __NR_fadvise64 209 /* Linux Specific */ +#define __NR_fadvise64_64 210 /* Linux Specific */ +#define __NR_tgkill 211 /* Linux Specific */ +#define __NR_waitpid 212 /* Linux Specific */ +#define __NR_swapoff 213 /* Linux Specific */ +#define __NR_sysinfo 214 /* Linux Specific */ +#define __NR_ipc 215 /* Linux Specific */ +#define __NR_sigreturn 216 /* Linux Specific */ +#define __NR_clone 217 /* Linux Specific */ +#define __NR_ioprio_get 218 /* Linux Specific */ +#define __NR_adjtimex 219 /* Linux Specific */ +#define __NR_sigprocmask 220 /* Linux Specific */ +#define __NR_create_module 221 /* Linux Specific */ +#define __NR_delete_module 222 /* Linux Specific */ +#define __NR_get_kernel_syms 223 /* Linux Specific */ +#define __NR_getpgid 224 /* Linux Specific */ +#define __NR_bdflush 225 /* Linux Specific */ +#define __NR_sysfs 226 /* Linux Specific */ +#define __NR_afs_syscall 227 /* Linux Specific */ +#define __NR_setfsuid 228 /* Linux Specific */ +#define __NR_setfsgid 229 /* Linux Specific */ +#define __NR__newselect 230 /* Linux Specific */ +#ifdef __32bit_syscall_numbers__ +#define __NR_time 231 /* Linux Specific */ +#else +#endif +#define __NR_splice 232 /* Linux Specific */ +#define __NR_stime 233 /* Linux Specific */ +#define __NR_statfs64 234 /* Linux Specific */ +#define __NR_fstatfs64 235 /* Linux Specific */ +#define __NR__llseek 236 /* Linux Specific */ +#define __NR_mlock 237 +#define __NR_munlock 238 +#define __NR_mlockall 239 +#define __NR_munlockall 240 +#define __NR_sched_setparam 241 +#define __NR_sched_getparam 242 +#define __NR_sched_setscheduler 243 +#define __NR_sched_getscheduler 244 +#define __NR_sched_yield 245 +#define __NR_sched_get_priority_max 246 +#define __NR_sched_get_priority_min 247 +#define __NR_sched_rr_get_interval 248 +#define __NR_nanosleep 249 +#define __NR_mremap 250 +#define __NR__sysctl 251 +#define __NR_getsid 252 +#define __NR_fdatasync 253 +#define __NR_nfsservctl 254 +#define __NR_sync_file_range 255 +#define __NR_clock_settime 256 +#define __NR_clock_gettime 257 +#define __NR_clock_getres 258 +#define __NR_clock_nanosleep 259 +#define __NR_sched_getaffinity 260 +#define __NR_sched_setaffinity 261 +#define __NR_timer_settime 262 +#define __NR_timer_gettime 263 +#define __NR_timer_getoverrun 264 +#define __NR_timer_delete 265 +#define __NR_timer_create 266 +/* #define __NR_vserver 267 Reserved for VSERVER */ +#define __NR_io_setup 268 +#define __NR_io_destroy 269 +#define __NR_io_submit 270 +#define __NR_io_cancel 271 +#define __NR_io_getevents 272 +#define __NR_mq_open 273 +#define __NR_mq_unlink 274 +#define __NR_mq_timedsend 275 +#define __NR_mq_timedreceive 276 +#define __NR_mq_notify 277 +#define __NR_mq_getsetattr 278 +#define __NR_waitid 279 +#define __NR_tee 280 +#define __NR_add_key 281 +#define __NR_request_key 282 +#define __NR_keyctl 283 +#define __NR_openat 284 +#define __NR_mkdirat 285 +#define __NR_mknodat 286 +#define __NR_fchownat 287 +#define __NR_futimesat 288 +#define __NR_fstatat64 289 +#define __NR_unlinkat 290 +#define __NR_renameat 291 +#define __NR_linkat 292 +#define __NR_symlinkat 293 +#define __NR_readlinkat 294 +#define __NR_fchmodat 295 +#define __NR_faccessat 296 +#define __NR_pselect6 297 +#define __NR_ppoll 298 +#define __NR_unshare 299 +#define __NR_set_robust_list 300 +#define __NR_get_robust_list 301 +#define __NR_migrate_pages 302 +#define __NR_mbind 303 +#define __NR_get_mempolicy 304 +#define __NR_set_mempolicy 305 +#define __NR_kexec_load 306 +#define __NR_move_pages 307 +#define __NR_getcpu 308 +#define __NR_epoll_pwait 309 +#define __NR_utimensat 310 +#define __NR_signalfd 311 +#define __NR_timerfd_create 312 +#define __NR_eventfd 313 +#define __NR_fallocate 314 +#define __NR_timerfd_settime 315 +#define __NR_timerfd_gettime 316 +#define __NR_signalfd4 317 +#define __NR_eventfd2 318 +#define __NR_epoll_create1 319 +#define __NR_dup3 320 +#define __NR_pipe2 321 +#define __NR_inotify_init1 322 +#define __NR_accept4 323 +#define __NR_preadv 324 +#define __NR_pwritev 325 +#define __NR_rt_tgsigqueueinfo 326 +#define __NR_perf_event_open 327 +#define __NR_recvmmsg 328 +#define __NR_fanotify_init 329 +#define __NR_fanotify_mark 330 +#define __NR_prlimit64 331 +#define __NR_name_to_handle_at 332 +#define __NR_open_by_handle_at 333 +#define __NR_clock_adjtime 334 +#define __NR_syncfs 335 +#define __NR_sendmmsg 336 +#define __NR_setns 337 +#define __NR_process_vm_readv 338 +#define __NR_process_vm_writev 339 +#define __NR_kern_features 340 +#define __NR_kcmp 341 +#define __NR_finit_module 342 +#define __NR_sched_setattr 343 +#define __NR_sched_getattr 344 +#define __NR_renameat2 345 +#define __NR_seccomp 346 +#define __NR_getrandom 347 +#define __NR_memfd_create 348 +#define __NR_bpf 349 +#define __NR_execveat 350 +#define __NR_membarrier 351 +#define __NR_userfaultfd 352 +#define __NR_bind 353 +#define __NR_listen 354 +#define __NR_setsockopt 355 +#define __NR_mlock2 356 +#define __NR_copy_file_range 357 +#define __NR_preadv2 358 +#define __NR_pwritev2 359 +#define __NR_statx 360 +#define __NR_io_pgetevents 361 + +#define NR_syscalls 362 + +/* Bitmask values returned from kern_features system call. */ +#define KERN_FEATURE_MIXED_MODE_STACK 0x00000001 + +#ifdef __32bit_syscall_numbers__ +/* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, + * it never had the plain ones and there is no value to adding those + * old versions into the syscall table. + */ +#define __IGNORE_setresuid +#define __IGNORE_getresuid +#define __IGNORE_setresgid +#define __IGNORE_getresgid +#endif + +/* Sparc doesn't have protection keys. */ +#define __IGNORE_pkey_mprotect +#define __IGNORE_pkey_alloc +#define __IGNORE_pkey_free + +#endif /* _UAPI_SPARC_UNISTD_H */ diff --git a/libc/include/sparcv9-linux-gnu/bits/a.out.h b/libc/include/sparcv9-linux-gnu/bits/a.out.h new file mode 100644 index 0000000000..c189482c42 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/a.out.h @@ -0,0 +1,13 @@ +#ifndef __A_OUT_GNU_H__ +# error "Never use directly; include instead." +#endif + +#include + +#if __WORDSIZE == 64 + +/* Signal to users of this header that this architecture really doesn't + support a.out binary format. */ +#define __NO_A_OUT_SUPPORT 1 + +#endif \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/endian.h b/libc/include/sparcv9-linux-gnu/bits/endian.h new file mode 100644 index 0000000000..1e1dd7a2e0 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/endian.h @@ -0,0 +1,12 @@ +/* Sparc is big-endian, but v9 supports endian conversion on loads/stores + and GCC supports such a mode. Be prepared. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#ifdef __LITTLE_ENDIAN__ +# define __BYTE_ORDER __LITTLE_ENDIAN +#else +# define __BYTE_ORDER __BIG_ENDIAN +#endif \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/environments.h b/libc/include/sparcv9-linux-gnu/bits/environments.h new file mode 100644 index 0000000000..2e1c0bc1de --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/environments.h @@ -0,0 +1,96 @@ +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _UNISTD_H +# error "Never include this file directly. Use instead" +#endif + +#include + +/* This header should define the following symbols under the described + situations. A value `1' means that the model is always supported, + `-1' means it is never supported. Undefined means it cannot be + statically decided. + + _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type + _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type + + _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type + _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type + + The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, + _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, + _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were + used in previous versions of the Unix standard and are available + only for compatibility. +*/ + +#if __WORDSIZE == 64 + +/* Environments with 32-bit wide pointers are optionally provided. + Therefore following macros aren't defined: + # undef _POSIX_V7_ILP32_OFF32 + # undef _POSIX_V7_ILP32_OFFBIG + # undef _POSIX_V6_ILP32_OFF32 + # undef _POSIX_V6_ILP32_OFFBIG + # undef _XBS5_ILP32_OFF32 + # undef _XBS5_ILP32_OFFBIG + and users need to check at runtime. */ + +/* We also have no use (for now) for an environment with bigger pointers + and offsets. */ +# define _POSIX_V7_LPBIG_OFFBIG -1 +# define _POSIX_V6_LPBIG_OFFBIG -1 +# define _XBS5_LPBIG_OFFBIG -1 + +/* By default we have 64-bit wide `long int', pointers and `off_t'. */ +# define _POSIX_V7_LP64_OFF64 1 +# define _POSIX_V6_LP64_OFF64 1 +# define _XBS5_LP64_OFF64 1 + +#else /* __WORDSIZE == 32 */ + +/* By default we have 32-bit wide `int', `long int', pointers and `off_t' + and all platforms support LFS. */ +# define _POSIX_V7_ILP32_OFF32 1 +# define _POSIX_V7_ILP32_OFFBIG 1 +# define _POSIX_V6_ILP32_OFF32 1 +# define _POSIX_V6_ILP32_OFFBIG 1 +# define _XBS5_ILP32_OFF32 1 +# define _XBS5_ILP32_OFFBIG 1 + +/* We optionally provide an environment with the above size but an 64-bit + side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ + +/* Environments with 64-bit wide pointers can be provided, + so these macros aren't defined: + # undef _POSIX_V7_LP64_OFF64 + # undef _POSIX_V7_LPBIG_OFFBIG + # undef _POSIX_V6_LP64_OFF64 + # undef _POSIX_V6_LPBIG_OFFBIG + # undef _XBS5_LP64_OFF64 + # undef _XBS5_LPBIG_OFFBIG + and sysconf tests for it at runtime. */ + +#endif /* __WORDSIZE == 32 */ + +#define __ILP32_OFF32_CFLAGS "-m32" +#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +#define __ILP32_OFF32_LDFLAGS "-m32" +#define __ILP32_OFFBIG_LDFLAGS "-m32" +#define __LP64_OFF64_CFLAGS "-m64" +#define __LP64_OFF64_LDFLAGS "-m64" \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/epoll.h b/libc/include/sparcv9-linux-gnu/bits/epoll.h new file mode 100644 index 0000000000..a5ae26649b --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/epoll.h @@ -0,0 +1,27 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_EPOLL_H +# error "Never use directly; include instead." +#endif + +/* Flags to be passed to epoll_create1. */ +enum + { + EPOLL_CLOEXEC = 0x400000 +#define EPOLL_CLOEXEC EPOLL_CLOEXEC + }; \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/errno.h b/libc/include/sparcv9-linux-gnu/bits/errno.h new file mode 100644 index 0000000000..8ef40090fb --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/errno.h @@ -0,0 +1,53 @@ +/* Error constants. Linux/Sparc specific version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 +#define _BITS_ERRNO_H 1 + +#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 127 +# endif + +# ifndef EOWNERDEAD +# define EOWNERDEAD 132 +# endif + +# ifndef ENOTRECOVERABLE +# define ENOTRECOVERABLE 133 +# endif + +# ifndef ERFKILL +# define ERFKILL 134 +# endif + +# ifndef EHWPOISON +# define EHWPOISON 135 +# endif + +#endif /* bits/errno.h. */ \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/eventfd.h b/libc/include/sparcv9-linux-gnu/bits/eventfd.h new file mode 100644 index 0000000000..942ede19f7 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/eventfd.h @@ -0,0 +1,31 @@ +/* Copyright (C) 2007-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 = 0x000001, +#define EFD_SEMAPHORE EFD_SEMAPHORE + EFD_CLOEXEC = 0x400000, +#define EFD_CLOEXEC EFD_CLOEXEC + EFD_NONBLOCK = 0x004000 +#define EFD_NONBLOCK EFD_NONBLOCK + }; \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/fcntl.h b/libc/include/sparcv9-linux-gnu/bits/fcntl.h new file mode 100644 index 0000000000..903872d0b6 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/fcntl.h @@ -0,0 +1,101 @@ +/* O_*, F_*, FD_* bit values for Linux/SPARC. + Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#include + +#define O_APPEND 0x0008 +#define O_ASYNC 0x0040 +#define O_CREAT 0x0200 /* not fcntl */ +#define O_TRUNC 0x0400 /* not fcntl */ +#define O_EXCL 0x0800 /* not fcntl */ +#define O_SYNC 0x802000 +#define O_NONBLOCK 0x4000 +#define O_NDELAY (0x0004 | O_NONBLOCK) +#define O_NOCTTY 0x8000 /* not fcntl */ + +#define __O_DIRECTORY 0x10000 /* must be a directory */ +#define __O_NOFOLLOW 0x20000 /* don't follow links */ +#define __O_CLOEXEC 0x400000 /* Set close_on_exit. */ + +#define __O_DIRECT 0x100000 /* direct disk access hint */ +#define __O_NOATIME 0x200000 /* Do not set atime. */ +#define __O_PATH 0x1000000 /* Resolve pathname but do not open file. */ +#define __O_TMPFILE 0x2010000 /* Atomically create nameless file. */ + +#if __WORDSIZE == 64 +# define __O_LARGEFILE 0 +#else +# define __O_LARGEFILE 0x40000 +#endif + +#define __O_DSYNC 0x2000 /* Synchronize data. */ + + +#define __F_GETOWN 5 /* Get owner (process receiving SIGIO). */ +#define __F_SETOWN 6 /* Set owner (process receiving SIGIO). */ + +#ifndef __USE_FILE_OFFSET64 +# define F_GETLK 7 /* Get record locking info. */ +# define F_SETLK 8 /* Set record locking info (non-blocking). */ +# define F_SETLKW 9 /* Set record locking info (blocking). */ +#endif + +#if __WORDSIZE == 64 +# define F_GETLK64 7 /* Get record locking info. */ +# define F_SETLK64 8 /* Set record locking info (non-blocking). */ +# define F_SETLKW64 9 /* Set record locking info (blocking). */ +#endif + +/* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ +#define F_RDLCK 1 /* Read lock. */ +#define F_WRLCK 2 /* Write lock. */ +#define F_UNLCK 3 /* Remove lock. */ + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + short int __glibc_reserved; + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + short int __glibc_reserved; + }; +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/fenv.h b/libc/include/sparcv9-linux-gnu/bits/fenv.h new file mode 100644 index 0000000000..5a9305af9f --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/fenv.h @@ -0,0 +1,101 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + +#include + + +/* Define bits representing the exception. We use the bit positions + of the appropriate accrued exception bits from the FSR. */ +enum + { + FE_INVALID = +#define FE_INVALID (1 << 9) + FE_INVALID, + FE_OVERFLOW = +#define FE_OVERFLOW (1 << 8) + FE_OVERFLOW, + FE_UNDERFLOW = +#define FE_UNDERFLOW (1 << 7) + FE_UNDERFLOW, + FE_DIVBYZERO = +#define FE_DIVBYZERO (1 << 6) + FE_DIVBYZERO, + FE_INEXACT = +#define FE_INEXACT (1 << 5) + FE_INEXACT + }; + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +/* The Sparc FPU supports all of the four defined rounding modes. We + use again the bit positions in the FPU control word as the values + for the appropriate macros. */ +enum + { + FE_TONEAREST = +#define FE_TONEAREST (0 << 30) + FE_TONEAREST, + FE_TOWARDZERO = +#define FE_TOWARDZERO (1 << 30) + FE_TOWARDZERO, + FE_UPWARD = +#define FE_UPWARD (-0x7fffffff - 1) /* (2 << 30) */ + FE_UPWARD, + FE_DOWNWARD = +#define FE_DOWNWARD (-0x40000000) /* (3 << 30) */ + FE_DOWNWARD + }; + +#define __FE_ROUND_MASK (3U << 30) + + +/* Type representing exception flags. */ +typedef unsigned long int fexcept_t; + + +/* Type representing floating-point environment. */ +typedef unsigned long int fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((const fenv_t *) -1) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exception is masked. */ +# define FE_NOMASK_ENV ((const fenv_t *) -2) +#endif + +/* For internal use only: access the fp state register. */ +#if __WORDSIZE == 64 +# define __fenv_stfsr(X) __asm__ __volatile__ ("stx %%fsr,%0" : "=m" (X)) +# define __fenv_ldfsr(X) __asm__ __volatile__ ("ldx %0,%%fsr" : : "m" (X)) +#else +# define __fenv_stfsr(X) __asm__ __volatile__ ("st %%fsr,%0" : "=m" (X)) +# define __fenv_ldfsr(X) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (X)) +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef unsigned long int femode_t; + +/* Default floating-point control modes. */ +# define FE_DFL_MODE ((const femode_t *) -1L) +#endif \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/floatn.h b/libc/include/sparcv9-linux-gnu/bits/floatn.h new file mode 100644 index 0000000000..5e7e3f4d2e --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/floatn.h @@ -0,0 +1,97 @@ +/* Macros to control TS 18661-3 glibc features on ldbl-128 platforms. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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/libc/include/sparcv9-linux-gnu/bits/hwcap.h b/libc/include/sparcv9-linux-gnu/bits/hwcap.h new file mode 100644 index 0000000000..a05d2b6a25 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/hwcap.h @@ -0,0 +1,51 @@ +/* Defines for bits in AT_HWCAP. + Copyright (C) 2011-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined(_SYS_AUXV_H) && !defined(_SYSDEPS_SYSDEP_H) +# error "Never include directly; use instead." +#endif + +#define HWCAP_SPARC_FLUSH 0x00000001 +#define HWCAP_SPARC_STBAR 0x00000002 +#define HWCAP_SPARC_SWAP 0x00000004 +#define HWCAP_SPARC_MULDIV 0x00000008 +#define HWCAP_SPARC_V9 0x00000010 +#define HWCAP_SPARC_ULTRA3 0x00000020 +#define HWCAP_SPARC_BLKINIT 0x00000040 +#define HWCAP_SPARC_N2 0x00000080 +#define HWCAP_SPARC_MUL32 0x00000100 +#define HWCAP_SPARC_DIV32 0x00000200 +#define HWCAP_SPARC_FSMULD 0x00000400 +#define HWCAP_SPARC_V8PLUS 0x00000800 +#define HWCAP_SPARC_POPC 0x00001000 +#define HWCAP_SPARC_VIS 0x00002000 +#define HWCAP_SPARC_VIS2 0x00004000 +#define HWCAP_SPARC_ASI_BLK_INIT 0x00008000 +#define HWCAP_SPARC_FMAF 0x00010000 +#define HWCAP_SPARC_VIS3 0x00020000 +#define HWCAP_SPARC_HPC 0x00040000 +#define HWCAP_SPARC_RANDOM 0x00080000 +#define HWCAP_SPARC_TRANS 0x00100000 +#define HWCAP_SPARC_FJFMAU 0x00200000 +#define HWCAP_SPARC_IMA 0x00400000 +#define HWCAP_SPARC_ASI_CACHE_SPARING \ + 0x00800000 +#define HWCAP_SPARC_PAUSE 0x01000000 +#define HWCAP_SPARC_CBCOND 0x02000000 +#define HWCAP_SPARC_CRYPTO 0x04000000 +#define HWCAP_SPARC_ADP 0x08000000 \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/inotify.h b/libc/include/sparcv9-linux-gnu/bits/inotify.h new file mode 100644 index 0000000000..9042dd71bb --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/inotify.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 = 0x400000, +#define IN_CLOEXEC IN_CLOEXEC + IN_NONBLOCK = 0x004000 +#define IN_NONBLOCK IN_NONBLOCK + }; \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/ioctls.h b/libc/include/sparcv9-linux-gnu/bits/ioctls.h new file mode 100644 index 0000000000..244d48193d --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/ioctls.h @@ -0,0 +1,36 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +/* Use the definitions from the kernel header files. */ +#include + +/* Oh well, this is necessary since the kernel data structure is + different from the user-level version. */ +#undef TCGETS +#undef TCSETS +#undef TCSETSW +#undef TCSETSF +#define TCGETS _IOR ('T', 8, char[36]) +#define TCSETS _IOW ('T', 9, char[36]) +#define TCSETSW _IOW ('T', 10, char[36]) +#define TCSETSF _IOW ('T', 11, char[36]) + +#include \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/ipc.h b/libc/include/sparcv9-linux-gnu/bits/ipc.h new file mode 100644 index 0000000000..abda8ba408 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/ipc.h @@ -0,0 +1,61 @@ +/* Copyright (C) 1995-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IPC_H +# error "Never use directly; include instead." +#endif + +#include +#include + +/* Mode bits for `msgget', `semget', and `shmget'. */ +#define IPC_CREAT 01000 /* Create key if key does not exist. */ +#define IPC_EXCL 02000 /* Fail if key exists. */ +#define IPC_NOWAIT 04000 /* Return error on wait. */ + +/* Control commands for `msgctl', `semctl', and `shmctl'. */ +#define IPC_RMID 0 /* Remove identifier. */ +#define IPC_SET 1 /* Set `ipc_perm' options. */ +#define IPC_STAT 2 /* Get `ipc_perm' options. */ +#ifdef __USE_GNU +# define IPC_INFO 3 /* See ipcs. */ +#endif + +/* Special key values. */ +#define IPC_PRIVATE ((__key_t) 0) /* Private key. */ + + +/* Data structure used to pass permission information to IPC operations. */ +struct ipc_perm + { + __key_t __key; /* Key. */ + __uid_t uid; /* Owner's user ID. */ + __gid_t gid; /* Owner's group ID. */ + __uid_t cuid; /* Creator's user ID. */ + __gid_t cgid; /* Creator's group ID. */ +#if __WORDSIZE == 32 + unsigned short int __pad1; + unsigned short int mode; /* Read/write permission. */ + unsigned short int __pad2; +#else + __mode_t mode; /* Read/write permission. */ + unsigned short int __pad1; +#endif + unsigned short int __seq; /* Sequence number. */ + __extension__ unsigned long long int __glibc_reserved1; + __extension__ unsigned long long int __glibc_reserved2; + }; \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/link.h b/libc/include/sparcv9-linux-gnu/bits/link.h new file mode 100644 index 0000000000..05e2fe6aac --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/link.h @@ -0,0 +1,99 @@ +/* Machine-specific audit interfaces for dynamic linker. SPARC version. + Copyright (C) 2005-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + +#if __WORDSIZE == 32 + +typedef struct La_sparc32_regs +{ + uint32_t lr_lreg[8]; /* %l0 through %l7 */ + uint32_t lr_reg[6]; /* %o0 through %o5 */ + uint32_t lr_sp; /* %o6 */ + uint32_t lr_ra; /* %o7 */ + uint32_t lr_struct; /* Pass-by-reference struct pointer */ +} La_sparc32_regs; + +typedef struct La_sparc32_retval +{ + uint32_t lrv_reg[2]; /* %o0 and %o1 */ + double lrv_fpreg[2]; /* %f0 and %f2 */ +} La_sparc32_retval; + +#else + +typedef struct La_sparc64_regs +{ + uint64_t lr_lreg[8]; /* %l0 through %l7 */ + uint64_t lr_reg[6]; /* %o0 through %o5 */ + uint64_t lr_sp; /* %o6 */ + uint64_t lr_ra; /* %o7 */ + double lr_fpreg[16]; /* %f0 through %f30 */ +} La_sparc64_regs; + +typedef struct La_sparc64_retval +{ + uint64_t lrv_reg[4]; /* %o0 through %o3 */ + double lrv_fprev[4]; /* %f0 through %f8 */ +} La_sparc64_retval; + +#endif + +__BEGIN_DECLS + +#if __WORDSIZE == 32 + +extern Elf32_Addr la_sparc32_gnu_pltenter (Elf32_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_sparc32_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_sparc32_gnu_pltexit (Elf32_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_sparc32_regs *__inregs, + La_sparc32_retval *__outregs, + const char *__symname); + +#else + +extern Elf64_Addr la_sparc64_gnu_pltenter (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_sparc64_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_sparc64_gnu_pltexit (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_sparc64_regs *__inregs, + La_sparc64_retval *__outregs, + const char *__symname); + +#endif + +__END_DECLS \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/local_lim.h b/libc/include/sparcv9-linux-gnu/bits/local_lim.h new file mode 100644 index 0000000000..0f3afc18be --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/local_lim.h @@ -0,0 +1,99 @@ +/* Minimum guaranteed maximum values for system limits. Linux/SPARC version. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. We are free to choose a reasonable value. */ +#define PTHREAD_STACK_MIN 24576 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/long-double.h b/libc/include/sparcv9-linux-gnu/bits/long-double.h new file mode 100644 index 0000000000..9858947c1b --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/long-double.h @@ -0,0 +1,26 @@ +/* Properties of long double type. SPARC version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include + +#if !defined __NO_LONG_DOUBLE_MATH && __WORDSIZE == 32 +# define __LONG_DOUBLE_MATH_OPTIONAL 1 +# ifndef __LONG_DOUBLE_128__ +# define __NO_LONG_DOUBLE_MATH 1 +# endif +#endif \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/mman.h b/libc/include/sparcv9-linux-gnu/bits/mman.h new file mode 100644 index 0000000000..3d71e80356 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/mman.h @@ -0,0 +1,55 @@ +/* Definitions for POSIX memory map interface. Linux/SPARC version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_GROWSDOWN 0x0200 /* Stack-like segment. */ +# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ +# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ +# define MAP_LOCKED 0x0100 /* Lock the mapping. */ +# define MAP_NORESERVE 0x0040 /* Don't check for reservations. */ +# define _MAP_NEW 0x80000000 /* Binary compatibility with SunOS. */ +# define MAP_POPULATE 0x8000 /* Populate (prefault) pagetables. */ +# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +# define MAP_STACK 0x20000 /* Allocation is for a stack. */ +# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ +# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap + underlying mapping. */ +#endif + +/* Flags for `mlockall'. */ +#define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */ +#define MCL_FUTURE 0x4000 /* Lock all additions to address + space. */ +#define MCL_ONFAULT 0x8000 /* Lock all pages that are + faulted in. */ +/* Include generic Linux declarations. */ +#include + +/* Other flags. */ +#ifdef __USE_MISC +# define MAP_RENAME MAP_ANONYMOUS +#endif \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/msq-pad.h b/libc/include/sparcv9-linux-gnu/bits/msq-pad.h new file mode 100644 index 0000000000..4e1c89ee36 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/msq-pad.h @@ -0,0 +1,26 @@ +/* Define where padding goes in struct msqid_ds. SPARC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_MSG_H +# error "Never use directly; include instead." +#endif + +#include + +#define __MSQ_PAD_AFTER_TIME 0 +#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/poll.h b/libc/include/sparcv9-linux-gnu/bits/poll.h new file mode 100644 index 0000000000..b62004fb16 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/poll.h @@ -0,0 +1,49 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 0x200 +# define POLLREMOVE 0x400 +# define POLLRDHUP 0x800 +#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/libc/include/sparcv9-linux-gnu/bits/procfs-extra.h b/libc/include/sparcv9-linux-gnu/bits/procfs-extra.h new file mode 100644 index 0000000000..3804e18a0f --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/procfs-extra.h @@ -0,0 +1,88 @@ +/* Extra sys/procfs.h definitions. SPARC version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +#if __WORDSIZE == 64 + +/* Provide 32-bit variants so that BFD can read 32-bit + core files. */ +#define ELF_NGREG32 38 +typedef struct + { + union + { + unsigned int pr_regs[32]; + double pr_dregs[16]; + } pr_fr; + unsigned int __glibc_reserved; + unsigned int pr_fsr; + unsigned char pr_qcnt; + unsigned char pr_q_entrysize; + unsigned char pr_en; + unsigned int pr_q[64]; + } elf_fpregset_t32; + +typedef unsigned int elf_greg_t32; +typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG32]; + +struct elf_prstatus32 + { + struct elf_siginfo pr_info; /* Info associated with signal. */ + short int pr_cursig; /* Current signal. */ + unsigned int pr_sigpend; /* Set of pending signals. */ + unsigned int pr_sighold; /* Set of held signals. */ + __pid_t pr_pid; + __pid_t pr_ppid; + __pid_t pr_pgrp; + __pid_t pr_sid; + struct + { + int tv_sec, tv_usec; + } pr_utime, /* User time. */ + pr_stime, /* System time. */ + pr_cutime, /* Cumulative user time. */ + pr_cstime; /* Cumulative system time. */ + elf_gregset_t32 pr_reg; /* GP registers. */ + int pr_fpvalid; /* True if math copro being used. */ + }; + +struct elf_prpsinfo32 + { + char pr_state; /* Numeric process state. */ + char pr_sname; /* Char for pr_state. */ + char pr_zomb; /* Zombie. */ + char pr_nice; /* Nice val. */ + unsigned int pr_flag; /* Flags. */ + unsigned short int pr_uid; + unsigned short int pr_gid; + int pr_pid, pr_ppid, pr_pgrp, pr_sid; + /* Lots missing */ + char pr_fname[16]; /* Filename of executable. */ + char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ + }; + +typedef elf_gregset_t32 prgregset32_t; +typedef elf_fpregset_t32 prfpregset32_t; + +typedef struct elf_prstatus32 prstatus32_t; +typedef struct elf_prpsinfo32 prpsinfo32_t; + +#endif /* sparc64 */ \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/procfs-id.h b/libc/include/sparcv9-linux-gnu/bits/procfs-id.h new file mode 100644 index 0000000000..64fb74a6e7 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/procfs-id.h @@ -0,0 +1,30 @@ +/* Types of pr_uid and pr_gid in struct elf_prpsinfo. SPARC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +#if __WORDSIZE == 64 +typedef unsigned int __pr_uid_t; +typedef unsigned int __pr_gid_t; +#else +typedef unsigned short int __pr_uid_t; +typedef unsigned short int __pr_gid_t; +#endif \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/procfs.h b/libc/include/sparcv9-linux-gnu/bits/procfs.h new file mode 100644 index 0000000000..d7908b1b0f --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/procfs.h @@ -0,0 +1,61 @@ +/* Types for registers for sys/procfs.h. SPARC version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +#include +#include +#include + +#if __WORDSIZE == 64 + +#define ELF_NGREG 36 + +typedef struct + { + unsigned long pr_regs[32]; + unsigned long pr_fsr; + unsigned long pr_gsr; + unsigned long pr_fprs; + } elf_fpregset_t; + +#else /* sparc32 */ + +#define ELF_NGREG 38 + +typedef struct + { + union + { + unsigned long pr_regs[32]; + double pr_dregs[16]; + } pr_fr; + unsigned long __glibc_reserved; + unsigned long pr_fsr; + unsigned char pr_qcnt; + unsigned char pr_q_entrysize; + unsigned char pr_en; + unsigned int pr_q[64]; + } elf_fpregset_t; + +#endif /* sparc32 */ + +typedef unsigned long elf_greg_t; +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/pthreadtypes-arch.h b/libc/include/sparcv9-linux-gnu/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..6460ba9584 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/pthreadtypes-arch.h @@ -0,0 +1,81 @@ +/* Machine-specific pthread type layouts. SPARC version. + Copyright (C) 2003-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 __WORDSIZE == 64 +# define __SIZEOF_PTHREAD_ATTR_T 56 +# define __SIZEOF_PTHREAD_MUTEX_T 40 +# define __SIZEOF_PTHREAD_CONDATTR_T 4 +# 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_CONDATTR_T 4 +# 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_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +/* Definitions for internal mutex struct. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 0 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND (__WORDSIZE != 64) +#define __PTHREAD_MUTEX_USE_UNION (__WORDSIZE != 64) + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +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 __WORDSIZE == 64 + 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 + 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; + int __cur_writer; +#endif +}; + +#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 + +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/resource.h b/libc/include/sparcv9-linux-gnu/bits/resource.h new file mode 100644 index 0000000000..d3f58fd4c6 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/resource.h @@ -0,0 +1,238 @@ +/* Bit values & structures for resource limits. Linux/SPARC version. + Copyright (C) 1994-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 = 5, +#define RLIMIT_RSS __RLIMIT_RSS + + /* Number of open files. */ + RLIMIT_NOFILE = 6, + __RLIMIT_OFILE = RLIMIT_NOFILE, /* BSD name for same. */ +#define RLIMIT_NOFILE RLIMIT_NOFILE +#define RLIMIT_OFILE __RLIMIT_OFILE + + /* Address space limit (?) */ + RLIMIT_AS = 9, +#define RLIMIT_AS RLIMIT_AS + + /* Number of processes. */ + __RLIMIT_NPROC = 7, +#define RLIMIT_NPROC __RLIMIT_NPROC + + /* Locked-in-memory address space. */ + __RLIMIT_MEMLOCK = 8, +#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 µs 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 __WORDSIZE == 64 + +#ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY ((unsigned long int)(~0UL)) +#else +# define RLIM_INFINITY 0xffffffffffffffffuLL +#endif + +#ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0xffffffffffffffffuLL +#endif + +#else + +#ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY ((long int)(~0UL >> 1)) +#else +# define RLIM_INFINITY 0xffffffffffffffffLL +#endif + +#ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0xffffffffffffffffLL +#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/libc/include/sparcv9-linux-gnu/bits/sem-pad.h b/libc/include/sparcv9-linux-gnu/bits/sem-pad.h new file mode 100644 index 0000000000..1fd5475b40 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/sem-pad.h @@ -0,0 +1,26 @@ +/* Define where padding goes in struct semid_ds. SPARC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SEM_H +# error "Never use directly; include instead." +#endif + +#include + +#define __SEM_PAD_AFTER_TIME 0 +#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32) \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/semaphore.h b/libc/include/sparcv9-linux-gnu/bits/semaphore.h new file mode 100644 index 0000000000..f309c0c2b8 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/semaphore.h @@ -0,0 +1,40 @@ +/* Machine-specific POSIX semaphore type layouts. SPARC version. + Copyright (C) 2003-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + +#include + +#if __WORDSIZE == 64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/setjmp.h b/libc/include/sparcv9-linux-gnu/bits/setjmp.h new file mode 100644 index 0000000000..bec6fd8fc8 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/setjmp.h @@ -0,0 +1,67 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +#include + +#if __WORDSIZE == 64 + +#ifndef _ASM +typedef struct __sparc64_jmp_buf + { + struct __sparc64_jmp_buf *__uc_link; + unsigned long __uc_flags; + unsigned long __uc_sigmask; + struct __sparc64_jmp_buf_mcontext + { + unsigned long __mc_gregs[19]; + unsigned long __mc_fp; + unsigned long __mc_i7; + struct __sparc64_jmp_buf_fpu + { + union + { + unsigned int __sregs[32]; + unsigned long __dregs[32]; + long double __qregs[16]; + } __mcfpu_fpregs; + unsigned long __mcfpu_fprs; + unsigned long __mcfpu_gsr; + void *__mcfpu_fq; + unsigned char __mcfpu_qcnt; + unsigned char __mcfpu_qentsz; + unsigned char __mcfpu_enab; + } __mc_fpregs; + } __uc_mcontext; + } __jmp_buf[1]; +#endif + +#else + +#ifndef _ASM +typedef int __jmp_buf[3]; +#endif + +#endif + +#endif /* bits/setjmp.h */ \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/shm-pad.h b/libc/include/sparcv9-linux-gnu/bits/shm-pad.h new file mode 100644 index 0000000000..48bf143456 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/shm-pad.h @@ -0,0 +1,28 @@ +/* Define where padding goes in struct shmid_ds. SPARC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SHM_H +# error "Never use directly; include instead." +#endif + +#include + +#define __SHM_PAD_AFTER_TIME 0 +#define __SHM_PAD_BEFORE_TIME (__TIMESIZE == 32) +#define __SHM_SEGSZ_AFTER_TIME 1 +#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ 0 \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/shmlba.h b/libc/include/sparcv9-linux-gnu/bits/shmlba.h new file mode 100644 index 0000000000..5c736778ba --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/shmlba.h @@ -0,0 +1,29 @@ +/* Define SHMLBA. SPARC version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +__BEGIN_DECLS + +/* Segment low boundary address multiple. */ +#define SHMLBA (__getshmlba ()) +extern int __getshmlba (void) __attribute__ ((__const__)); + +__END_DECLS \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/sigaction.h b/libc/include/sparcv9-linux-gnu/bits/sigaction.h new file mode 100644 index 0000000000..3e18d99602 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/sigaction.h @@ -0,0 +1,89 @@ +/* The proper definitions for Linux/SPARC sigaction. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#include + +/* Structure describing the action to be taken when a signal arrives. */ +struct sigaction + { + /* 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; + + /* Special flags. */ +#if __WORDSIZE == 64 + int __glibc_reserved0; +#endif + int sa_flags; + + /* Not used by Linux/Sparc yet. */ + void (*sa_restorer) (void); + }; + + +/* Bits in `sa_flags'. */ +#define SA_NOCLDSTOP 0x00000008 /* Don't send SIGCHLD when children stop. */ +#define SA_NOCLDWAIT 0x00000100 /* Don't create zombie on child death. */ +#define SA_SIGINFO 0x00000200 /* Invoke signal-catching function with + three arguments instead of one. */ +#if defined __USE_XOPEN_EXTENDED || defined __USE_MISC +# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */ +#endif +#if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 +# define SA_RESTART 0x00000002 /* Restart syscall on signal return. */ +# define SA_NODEFER 0x00000020 /* Don't automatically block the signal when + its handler is being executed. */ +# define SA_RESETHAND 0x00000004 /* Reset to SIG_DFL on entry to handler. */ +#endif +#ifdef __USE_MISC +# define SA_INTERRUPT 0x00000010 /* 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_BLOCK 1 /* Block signals. */ +#define SIG_UNBLOCK 2 /* Unblock signals. */ +#define SIG_SETMASK 4 /* Set the set of blocked signals. */ + +#endif \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/sigcontext.h b/libc/include/sparcv9-linux-gnu/bits/sigcontext.h new file mode 100644 index 0000000000..e0f4caf2f6 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/sigcontext.h @@ -0,0 +1,82 @@ +/* Copyright (C) 2000-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 __WORDSIZE == 32 + +/* It is quite hard to choose what to put here, because + Linux/sparc32 had at least 3 totally incompatible + signal stack layouts. + This one is for the "new" style signals, which are + now delivered unless SA_SIGINFO is requested. */ + +struct sigcontext + { + struct + { + unsigned int psr; + unsigned int pc; + unsigned int npc; + unsigned int y; + unsigned int u_regs[16]; /* globals and ins */ + } si_regs; + int si_mask; + }; + +#else /* sparc64 */ + +typedef struct + { + unsigned int si_float_regs [64]; + unsigned long si_fsr; + unsigned long si_gsr; + unsigned long si_fprs; + } __siginfo_fpu_t; + +struct sigcontext + { + char sigc_info[128]; + struct + { + unsigned long u_regs[16]; /* globals and ins */ + unsigned long tstate; + unsigned long tpc; + unsigned long tnpc; + unsigned int y; + unsigned int fprs; + } sigc_regs; + __siginfo_fpu_t * sigc_fpu_save; + struct + { + void * ss_sp; + int ss_flags; + unsigned long ss_size; + } sigc_stack; + unsigned long sigc_mask; +}; + +#endif /* sparc64 */ + +#endif /* bits/sigcontext.h */ \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/siginfo-arch.h b/libc/include/sparcv9-linux-gnu/bits/siginfo-arch.h new file mode 100644 index 0000000000..f3360b0cca --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/siginfo-arch.h @@ -0,0 +1,17 @@ +/* Architecture-specific adjustments to siginfo_t. SPARC version. */ +#ifndef _BITS_SIGINFO_ARCH_H +#define _BITS_SIGINFO_ARCH_H 1 + +/* The kernel uses int instead of long int (as in POSIX). In 32-bit + mode, we can still use long int, but in 64-bit mode, we need to + deviate from POSIX. */ +#if __WORDSIZE == 64 +# define __SI_BAND_TYPE int +#endif + +#define __SI_SIGFAULT_ADDL \ + int _si_trapno; + +#define si_trapno _sifields._sigfault._si_trapno + +#endif \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/siginfo-consts-arch.h b/libc/include/sparcv9-linux-gnu/bits/siginfo-consts-arch.h new file mode 100644 index 0000000000..a1dd324ec7 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/siginfo-consts-arch.h @@ -0,0 +1,12 @@ +/* Architecture-specific additional siginfo constants. SPARC version. */ +#ifndef _BITS_SIGINFO_CONSTS_ARCH_H +#define _BITS_SIGINFO_CONSTS_ARCH_H 1 + +/* `si_code' values for SIGEMT signal. */ +enum +{ + EMT_TAGOVF = 1 /* Tag overflow. */ +#define EMT_TAGOVF EMT_TAGOVF +}; + +#endif \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/signalfd.h b/libc/include/sparcv9-linux-gnu/bits/signalfd.h new file mode 100644 index 0000000000..f3ad2383f0 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/signalfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2007-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 = 0x400000, +#define SFD_CLOEXEC SFD_CLOEXEC + SFD_NONBLOCK = 0x004000 +#define SFD_NONBLOCK SFD_NONBLOCK + }; \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/signum.h b/libc/include/sparcv9-linux-gnu/bits/signum.h new file mode 100644 index 0000000000..4486a253b0 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/signum.h @@ -0,0 +1,39 @@ +/* Signal number definitions. Linux/SPARC version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _BITS_SIGNUM_H +#define _BITS_SIGNUM_H 1 + +#ifndef _SIGNAL_H +#error "Never include directly; use instead." +#endif + +#include + +/* Adjustments and additions to the signal number constants for + Linux/SPARC systems. Signal values on this platform were chosen + for SunOS binary compatibility. */ + +#define SIGEMT 7 /* Emulator trap. */ +#define SIGLOST 29 /* Resource lost (Sun); server died (GNU). */ +#define SIGPWR SIGLOST /* Power failure imminent (SysV). */ + +#undef __SIGRTMAX +#define __SIGRTMAX 64 + +#endif /* included. */ \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/sigstack.h b/libc/include/sparcv9-linux-gnu/bits/sigstack.h new file mode 100644 index 0000000000..f3029e811a --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/sigstack.h @@ -0,0 +1,32 @@ +/* sigstack, sigaltstack definitions. + Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_SIGSTACK_H +#define _BITS_SIGSTACK_H 1 + +#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H +# error "Never include this file directly. Use instead" +#endif + +/* Minimum stack size for a signal handler. */ +#define MINSIGSTKSZ 4096 + +/* System default stack size. */ +#define SIGSTKSZ 16384 + +#endif /* bits/sigstack.h */ \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/socket_type.h b/libc/include/sparcv9-linux-gnu/bits/socket_type.h new file mode 100644 index 0000000000..411c8e8770 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/socket_type.h @@ -0,0 +1,55 @@ +/* Define enum __socket_type for Linux/SPARC. + Copyright (C) 1991-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_STREAM = 1, /* Sequenced, reliable, connection-based + byte streams. */ +#define SOCK_STREAM SOCK_STREAM + SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams + of fixed maximum length. */ +#define SOCK_DGRAM SOCK_DGRAM + 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, /* Datagram Congestion Control Protocol. */ +#define SOCK_DCCP SOCK_DCCP + 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 = 0x400000, /* Atomically set close-on-exec flag for the + new descriptor(s). */ +#define SOCK_CLOEXEC SOCK_CLOEXEC + SOCK_NONBLOCK = 0x004000 /* Atomically mark descriptor(s) as + non-blocking. */ +#define SOCK_NONBLOCK SOCK_NONBLOCK +}; \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/stat.h b/libc/include/sparcv9-linux-gnu/bits/stat.h new file mode 100644 index 0000000000..5330f3a46d --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/stat.h @@ -0,0 +1,173 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +/* Versions of the `struct stat' data structure. */ +#define _STAT_VER_LINUX_OLD 1 +#define _STAT_VER_KERNEL 1 +#define _STAT_VER_SVR4 2 +#define _STAT_VER_LINUX 3 +#define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ + +/* Versions of the `xmknod' interface. */ +#define _MKNOD_VER_LINUX 1 +#define _MKNOD_VER_SVR4 2 +#define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ + + +struct stat + { + __dev_t st_dev; /* Device. */ +#if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64 + unsigned short int __pad1; + __ino_t st_ino; /* File serial number. */ +#else + __ino64_t st_ino; /* File serial number. */ +#endif + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned short int __pad2; +#ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +#else + __off64_t st_size; /* Size of file, in bytes. */ +#endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +#ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +#else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#endif +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +#endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; + }; + +#ifdef __USE_LARGEFILE64 +struct stat64 + { + __dev_t st_dev; /* Device. */ +# if __WORDSIZE == 64 + unsigned short int __pad1; +# endif + __ino64_t st_ino; /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned short int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ + __blksize_t st_blksize; /* Optimal block size for I/O. */ + + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +# endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/termios-baud.h b/libc/include/sparcv9-linux-gnu/bits/termios-baud.h new file mode 100644 index 0000000000..5fb05af14a --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/termios-baud.h @@ -0,0 +1,46 @@ +/* termios baud rate selection definitions. Linux/sparc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#ifdef __USE_MISC +# define CBAUD 0x0000100f +# define CBAUDEX 0x00001000 +# define CIBAUD 0x100f0000 /* input baud rate (not used) */ +# define CMSPAR 0x40000000 /* mark or space (stick) parity */ +# define CRTSCTS 0x80000000 /* flow control */ +#endif + +#define B57600 0x00001001 +#define B115200 0x00001002 +#define B230400 0x00001003 +#define B460800 0x00001004 +#define B76800 0x00001005 +#define B153600 0x00001006 +#define B307200 0x00001007 +#define B614400 0x00001008 +#define B921600 0x00001009 +#define B500000 0x0000100a +#define B576000 0x0000100b +#define B1000000 0x0000100c +#define B1152000 0x0000100d +#define B1500000 0x0000100e +#define B2000000 0x0000100f +#define __MAX_BAUD B2000000 \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/termios-c_cc.h b/libc/include/sparcv9-linux-gnu/bits/termios-c_cc.h new file mode 100644 index 0000000000..03bf3dc37d --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/termios-c_cc.h @@ -0,0 +1,43 @@ +/* termios c_cc symbolic constant definitions. Linux/sparc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 +#define VQUIT 1 +#define VERASE 2 +#define VKILL 3 +#define VEOF 4 +#define VEOL 5 +#define VEOL2 6 +#define VSWTC 7 +#define VSTART 8 +#define VSTOP 9 +#define VSUSP 10 +#define VDSUSP 11 /* SunOS POSIX nicety I do believe... */ +#define VREPRINT 12 +#define VDISCARD 13 +#define VWERASE 14 +#define VLNEXT 15 + +/* User apps assume vmin/vtime is shared with eof/eol */ +#define VMIN VEOF +#define VTIME VEOL \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/termios-c_oflag.h b/libc/include/sparcv9-linux-gnu/bits/termios-c_oflag.h new file mode 100644 index 0000000000..fb2d8d1e16 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/termios-c_oflag.h @@ -0,0 +1,64 @@ +/* termios output mode definitions. Linux/sparc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_oflag bits */ +#define OPOST 0x00000001 +#define OLCUC 0x00000002 +#define ONLCR 0x00000004 +#define OCRNL 0x00000008 +#define ONOCR 0x00000010 +#define ONLRET 0x00000020 +#define OFILL 0x00000040 +#define OFDEL 0x00000080 +#if defined __USE_MISC || defined __USE_XOPEN +# define NLDLY 0x00000100 +# define NL0 0x00000000 +# define NL1 0x00000100 +# define CRDLY 0x00000600 +# define CR0 0x00000000 +# define CR1 0x00000200 +# define CR2 0x00000400 +# define CR3 0x00000600 +# define TABDLY 0x00001800 +# define TAB0 0x00000000 +# define TAB1 0x00000800 +# define TAB2 0x00001000 +# define TAB3 0x00001800 +# define BSDLY 0x00002000 +# define BS0 0x00000000 +# define BS1 0x00002000 +#define FFDLY 0x00008000 +#define FF0 0x00000000 +#define FF1 0x00008000 +#endif +#define VTDLY 0x00004000 +#define VT0 0x00000000 +#define VT1 0x00004000 + +# if defined __USE_GNU +#define PAGEOUT 0x00010000 /* SUNOS specific */ +#define WRAP 0x00020000 /* SUNOS specific */ +# endif + +#ifdef __USE_MISC +# define XTABS 0x00001800 +#endif \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/termios-struct.h b/libc/include/sparcv9-linux-gnu/bits/termios-struct.h new file mode 100644 index 0000000000..c76457619c --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/termios-struct.h @@ -0,0 +1,34 @@ +/* struct termios definition. Linux/sparc version. + Copyright (C) 2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 17 +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/libc/include/sparcv9-linux-gnu/bits/timerfd.h b/libc/include/sparcv9-linux-gnu/bits/timerfd.h new file mode 100644 index 0000000000..e858253959 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/timerfd.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2008-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 = 0x400000, +#define TFD_CLOEXEC TFD_CLOEXEC + TFD_NONBLOCK = 0x004000 +#define TFD_NONBLOCK TFD_NONBLOCK + }; \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/typesizes.h b/libc/include/sparcv9-linux-gnu/bits/typesizes.h new file mode 100644 index 0000000000..ac12c705b9 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/typesizes.h @@ -0,0 +1,83 @@ +/* bits/typesizes.h -- underlying types for *_t. Linux/SPARC version. + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_TYPES_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_TYPESIZES_H +#define _BITS_TYPESIZES_H 1 + +/* See for the meaning of these macros. This file exists so + that need not vary across different GNU platforms. */ + +#define __DEV_T_TYPE __UQUAD_TYPE +#define __UID_T_TYPE __U32_TYPE +#define __GID_T_TYPE __U32_TYPE +#define __INO_T_TYPE __ULONGWORD_TYPE +#define __INO64_T_TYPE __UQUAD_TYPE +#define __MODE_T_TYPE __U32_TYPE +#define __NLINK_T_TYPE __U32_TYPE +#define __OFF_T_TYPE __SLONGWORD_TYPE +#define __OFF64_T_TYPE __SQUAD_TYPE +#define __PID_T_TYPE __S32_TYPE +#define __RLIM_T_TYPE __ULONGWORD_TYPE +#define __RLIM64_T_TYPE __UQUAD_TYPE +#define __BLKCNT_T_TYPE __SLONGWORD_TYPE +#define __BLKCNT64_T_TYPE __SQUAD_TYPE +#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE +#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE +#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE +#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __FSWORD_T_TYPE __SWORD_TYPE +#define __ID_T_TYPE __U32_TYPE +#define __CLOCK_T_TYPE __SLONGWORD_TYPE +#define __TIME_T_TYPE __SLONGWORD_TYPE +#define __USECONDS_T_TYPE __U32_TYPE +#define __SUSECONDS_T_TYPE __S32_TYPE +#define __DADDR_T_TYPE __S32_TYPE +#define __KEY_T_TYPE __S32_TYPE +#define __CLOCKID_T_TYPE __S32_TYPE +#define __TIMER_T_TYPE void * +#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE +#define __FSID_T_TYPE struct { int __val[2]; } +#define __SSIZE_T_TYPE __SWORD_TYPE +#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE +#define __CPU_MASK_TYPE __ULONGWORD_TYPE + +#if defined __arch64__ || defined __sparcv9 +/* Tell the libc code that off_t and off64_t are actually the same type + for all ABI purposes, even if possibly expressed as different base types + for C type-checking purposes. */ +# define __OFF_T_MATCHES_OFF64_T 1 + +/* Same for ino_t and ino64_t. */ +# define __INO_T_MATCHES_INO64_T 1 + +/* And for __rlim_t and __rlim64_t. */ +# define __RLIM_T_MATCHES_RLIM64_T 1 +#else +# define __RLIM_T_MATCHES_RLIM64_T 0 +#endif + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + + +#endif /* bits/typesizes.h */ \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/bits/wordsize.h b/libc/include/sparcv9-linux-gnu/bits/wordsize.h new file mode 100644 index 0000000000..e08131d423 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/bits/wordsize.h @@ -0,0 +1,11 @@ +/* Determine the wordsize from the preprocessor defines. */ + +#if defined __arch64__ || defined __sparcv9 +# define __WORDSIZE 64 +# define __WORDSIZE_TIME64_COMPAT32 1 +#else +# define __WORDSIZE 32 +# define __WORDSIZE32_SIZE_ULONG 0 +# define __WORDSIZE32_PTRDIFF_LONG 0 +# define __WORDSIZE_TIME64_COMPAT32 0 +#endif \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/fpu_control.h b/libc/include/sparcv9-linux-gnu/fpu_control.h new file mode 100644 index 0000000000..5456801580 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/fpu_control.h @@ -0,0 +1,72 @@ +/* FPU control word bits. SPARC version. + Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Miguel de Icaza + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FPU_CONTROL_H +#define _FPU_CONTROL_H 1 + + +#include +#include + +/* masking of interrupts */ +#define _FPU_MASK_IM 0x08000000 +#define _FPU_MASK_OM 0x04000000 +#define _FPU_MASK_UM 0x02000000 +#define _FPU_MASK_ZM 0x01000000 +#define _FPU_MASK_PM 0x00800000 + +/* precision control */ +#define _FPU_EXTENDED 0x00000000 /* RECOMMENDED */ +#define _FPU_DOUBLE 0x20000000 +#define _FPU_80BIT 0x30000000 +#define _FPU_SINGLE 0x10000000 /* DO NOT USE */ + +/* rounding control / Sparc */ +#define _FPU_RC_DOWN 0xc0000000 +#define _FPU_RC_UP 0x80000000 +#define _FPU_RC_ZERO 0x40000000 +#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */ + +#define _FPU_RESERVED 0x30300000 /* Reserved bits in cw */ + + +/* Now two recommended cw */ + +/* Linux and IEEE default: + - extended precision + - rounding to nearest + - no exceptions */ +#define _FPU_DEFAULT 0x0 +#define _FPU_IEEE 0x0 + +/* Type of the control word. */ +typedef unsigned long int fpu_control_t; + +#if __WORDSIZE == 64 +# define _FPU_GETCW(cw) __asm__ __volatile__ ("stx %%fsr,%0" : "=m" (*&cw)) +# define _FPU_SETCW(cw) __asm__ __volatile__ ("ldx %0,%%fsr" : : "m" (*&cw)) +#else +# define _FPU_GETCW(cw) __asm__ __volatile__ ("st %%fsr,%0" : "=m" (*&cw)) +# define _FPU_SETCW(cw) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (*&cw)) +#endif + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* fpu_control.h */ \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/gnu/lib-names.h b/libc/include/sparcv9-linux-gnu/gnu/lib-names.h new file mode 100644 index 0000000000..ad6471507a --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/gnu/lib-names.h @@ -0,0 +1,16 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#include + +#if __WORDSIZE == 32 +# include +#endif +#if __WORDSIZE == 64 +# include +#endif + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/gnu/stubs-32.h b/libc/include/sparcv9-linux-gnu/gnu/stubs-32.h new file mode 100644 index 0000000000..cab3cfc760 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/gnu/stubs-32.h @@ -0,0 +1,26 @@ +/* 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_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_getmsg +#define __stub_getpmsg +#define __stub_gtty +#define __stub_lchmod +#define __stub_pkey_alloc +#define __stub_pkey_free +#define __stub_putmsg +#define __stub_putpmsg +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/gnu/stubs.h b/libc/include/sparcv9-linux-gnu/gnu/stubs.h new file mode 100644 index 0000000000..120171a87a --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/gnu/stubs.h @@ -0,0 +1,12 @@ +/* This file is automatically generated. + This file selects the right generated file of `__stub_FUNCTION' macros + based on the architecture being compiled for. */ + +#include + +#if __WORDSIZE == 32 +# include +#endif +#if __WORDSIZE == 64 +# include +#endif \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/ieee754.h b/libc/include/sparcv9-linux-gnu/ieee754.h new file mode 100644 index 0000000000..e347e4a6e5 --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/ieee754.h @@ -0,0 +1,170 @@ +/* Copyright (C) 1992-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +__BEGIN_DECLS + +union ieee754_float + { + float f; + + /* This is the IEEE 754 single-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int mantissa:23; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:23; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:8; + unsigned int quiet_nan:1; + unsigned int mantissa:22; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + unsigned int mantissa:22; + unsigned int quiet_nan:1; + unsigned int exponent:8; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee_nan; + }; + +#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ + + +union ieee754_double + { + double d; + + /* This is the IEEE 754 double-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:20; + unsigned int mantissa1:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:11; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:19; + unsigned int mantissa1:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:19; + unsigned int quiet_nan:1; + unsigned int exponent:11; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ + + +union ieee854_long_double + { + long double d; + + /* This is the IEEE 854 quad-precision format. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:16; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#endif /* Big endian. */ +#if __BYTE_ORDER == __LITTLE_ENDIAN + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:16; + unsigned int exponent:15; + unsigned int negative:1; +#endif /* Little endian. */ + } ieee; + + /* This format makes it easier to see if a NaN is a signalling NaN. */ + struct + { +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned int negative:1; + unsigned int exponent:15; + unsigned int quiet_nan:1; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:15; + unsigned int mantissa1:32; + unsigned int mantissa2:32; + unsigned int mantissa3:32; +#else + /* Together these comprise the mantissa. */ + unsigned int mantissa3:32; + unsigned int mantissa2:32; + unsigned int mantissa1:32; + unsigned int mantissa0:15; + unsigned int quiet_nan:1; + unsigned int exponent:15; + unsigned int negative:1; +#endif + } ieee_nan; + }; + +#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */ + +__END_DECLS + +#endif /* ieee754.h */ \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/sys/ptrace.h b/libc/include/sparcv9-linux-gnu/sys/ptrace.h new file mode 100644 index 0000000000..c64858789a --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/sys/ptrace.h @@ -0,0 +1,229 @@ +/* `ptrace' debugger support interface. Linux/SPARC version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include +#include +#include + +/* Linux/SPARC kernels up to 2.3.18 do not care much + about what namespace polution, so use a kludge now. */ +#undef PTRACE_GETREGS +#undef PTRACE_SETREGS +#undef PTRACE_GETFPREGS +#undef PTRACE_SETFPREGS +#undef PTRACE_READDATA +#undef PTRACE_WRITEDATA +#undef PTRACE_READTEXT +#undef PTRACE_WRITETEXT +#undef PTRACE_SUNDETACH + +__BEGIN_DECLS + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 11, +#define PT_DETACH PTRACE_DETACH + + /* This define is needed for older programs which were + trying to work around sparc-linux ptrace nastiness. */ +#define PTRACE_SUNDETACH PTRACE_DETACH + +#if __WORDSIZE == 32 + + /* Get all general purpose registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETREGS = 12, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETREGS = 13, +#define PT_SETREGS PTRACE_SETREGS + + /* Get all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETFPREGS = 14, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETFPREGS = 15, +#define PT_SETFPREGS PTRACE_SETFPREGS + +#endif + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Write several bytes at a time. */ + PTRACE_WRITEDATA = 17, +#define PTRACE_WRITEDATA PTRACE_WRITEDATA + + /* Read several bytes at a time. */ + PTRACE_READTEXT = 18, +#define PTRACE_READTEXT PTRACE_READTEXT +#define PTRACE_READDATA PTRACE_READTEXT + + /* Write several bytes at a time. */ + PTRACE_WRITETEXT = 19, +#define PTRACE_WRITETEXT PTRACE_WRITETEXT + +#if __WORDSIZE == 64 + + /* Get all general purpose registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETREGS = 22, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETREGS = 23, +#define PT_SETREGS PTRACE_SETREGS + +#endif + + /* Continue and stop at the next entry to or return from syscall. */ + PTRACE_SYSCALL = 24, +#define PTRACE_SYSCALL PTRACE_SYSCALL + +#if __WORDSIZE == 64 + + /* Get all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_GETFPREGS = 25, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a processes. + This is not supported on all machines. */ + PTRACE_SETFPREGS = 26, +#define PT_SETFPREGS PTRACE_SETFPREGS + +#endif + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + /* Retrieve siginfo_t structures without removing signals from a queue. */ + PTRACE_PEEKSIGINFO = 0x4209, +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO + + /* Get the mask of blocked signals. */ + PTRACE_GETSIGMASK = 0x420a, +#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK + + /* Change the mask of blocked signals. */ + PTRACE_SETSIGMASK = 0x420b, +#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK + + /* Get seccomp BPF filters. */ + PTRACE_SECCOMP_GET_FILTER = 0x420c, +#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER + + /* Get seccomp BPF filter metadata. */ + PTRACE_SECCOMP_GET_METADATA = 0x420d +#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA +}; + + +#include + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/sys/ucontext.h b/libc/include/sparcv9-linux-gnu/sys/ucontext.h new file mode 100644 index 0000000000..ce917b46da --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/sys/ucontext.h @@ -0,0 +1,304 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include + +#include + + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + +#if __WORDSIZE == 64 + +#define __MC_NGREG 19 +#ifdef __USE_MISC +# define MC_TSTATE 0 +# define MC_PC 1 +# define MC_NPC 2 +# define MC_Y 3 +# define MC_G1 4 +# define MC_G2 5 +# define MC_G3 6 +# define MC_G4 7 +# define MC_G5 8 +# define MC_G6 9 +# define MC_G7 10 +# define MC_O0 11 +# define MC_O1 12 +# define MC_O2 13 +# define MC_O3 14 +# define MC_O4 15 +# define MC_O5 16 +# define MC_O6 17 +# define MC_O7 18 +# define MC_NGREG __MC_NGREG +#endif + +typedef unsigned long mc_greg_t; +typedef mc_greg_t mc_gregset_t[__MC_NGREG]; + +#ifdef __USE_MISC +# define MC_MAXFPQ 16 +#endif +struct __mc_fq { + unsigned long *__ctx(mcfq_addr); + unsigned int __ctx(mcfq_insn); +}; + +typedef struct { + union { + unsigned int __ctx(sregs)[32]; + unsigned long __ctx(dregs)[32]; + long double __ctx(qregs)[16]; + } __ctx(mcfpu_fregs); + unsigned long __ctx(mcfpu_fsr); + unsigned long __ctx(mcfpu_fprs); + unsigned long __ctx(mcfpu_gsr); + struct __mc_fq *__ctx(mcfpu_fq); + unsigned char __ctx(mcfpu_qcnt); + unsigned char __ctx(mcfpu_qentsz); + unsigned char __ctx(mcfpu_enab); +} mc_fpu_t; + +typedef struct { + mc_gregset_t __ctx(mc_gregs); + mc_greg_t __ctx(mc_fp); + mc_greg_t __ctx(mc_i7); + mc_fpu_t __ctx(mc_fpregs); +} mcontext_t; + +typedef struct ucontext_t { + struct ucontext_t *uc_link; + unsigned long __ctx(uc_flags); + unsigned long __uc_sigmask; + mcontext_t uc_mcontext; + stack_t uc_stack; + sigset_t uc_sigmask; +} ucontext_t; + +#endif /* __WORDISIZE == 64 */ + +/* + * Location of the users' stored registers relative to R0. + * Usage is as an index into a gregset_t array or as u.u_ar0[XX]. + */ +#ifdef __USE_MISC +# define REG_PSR (0) +# define REG_PC (1) +# define REG_nPC (2) +# define REG_Y (3) +# define REG_G1 (4) +# define REG_G2 (5) +# define REG_G3 (6) +# define REG_G4 (7) +# define REG_G5 (8) +# define REG_G6 (9) +# define REG_G7 (10) +# define REG_O0 (11) +# define REG_O1 (12) +# define REG_O2 (13) +# define REG_O3 (14) +# define REG_O4 (15) +# define REG_O5 (16) +# define REG_O6 (17) +# define REG_O7 (18) +#endif + +/* + * A gregset_t is defined as an array type for compatibility with the reference + * source. This is important due to differences in the way the C language + * treats arrays and structures as parameters. + * + * Note that NGREG is really (sizeof (struct regs) / sizeof (greg_t)), + * but that the ABI defines it absolutely to be 21 (resp. 19). + */ + +#if __WORDSIZE == 64 + +# define __NGREG 21 +# ifdef __USE_MISC +# define REG_ASI (19) +# define REG_FPRS (20) + +# define NGREG __NGREG +# endif +typedef long greg_t; + +#else /* __WORDSIZE == 32 */ + +# define __NGREG 19 +# ifdef __USE_MISC +# define NGREG __NGREG +# endif +typedef int greg_t; + +#endif /* __WORDSIZE == 32 */ + +typedef greg_t gregset_t[__NGREG]; + +/* + * The following structures define how a register window can appear on the + * stack. This structure is available (when required) through the `gwins' + * field of an mcontext (nested within ucontext). SPARC_MAXWINDOW is the + * maximum number of outstanding regiters window defined in the SPARC + * architecture (*not* implementation). + */ +# define __SPARC_MAXREGWINDOW 31 /* max windows in SPARC arch. */ +#ifdef __USE_MISC +# define SPARC_MAXREGWINDOW __SPARC_MAXREGWINDOW +#endif +struct __rwindow + { + greg_t __ctx(rw_local)[8]; /* locals */ + greg_t __ctx(rw_in)[8]; /* ins */ + }; + +#ifdef __USE_MISC +# define rw_fp __ctx(rw_in)[6] /* frame pointer */ +# define rw_rtn __ctx(rw_in)[7] /* return address */ +#endif + +typedef struct + { + int __ctx(wbcnt); + int *__ctx(spbuf)[__SPARC_MAXREGWINDOW]; + struct __rwindow __ctx(wbuf)[__SPARC_MAXREGWINDOW]; + } gwindows_t; + +/* + * Floating point definitions. + */ + +#ifdef __USE_MISC +# define MAXFPQ 16 /* max # of fpu queue entries currently supported */ +#endif + +/* + * struct fq defines the minimal format of a floating point instruction queue + * entry. The size of entries in the floating point queue are implementation + * dependent. The union FQu is guarenteed to be the first field in any ABI + * conformant system implementation. Any additional fields provided by an + * implementation should not be used applications designed to be ABI conformant. */ + +struct __fpq + { + unsigned long *__ctx(fpq_addr); /* address */ + unsigned long __ctx(fpq_instr); /* instruction */ + }; + +struct __fq + { + union /* FPU inst/addr queue */ + { + double __ctx(whole); + struct __fpq __ctx(fpq); + } __ctx(FQu); + }; + +#ifdef __USE_MISC +# define FPU_REGS_TYPE unsigned +# define FPU_DREGS_TYPE unsigned long long +# define V7_FPU_FSR_TYPE unsigned +# define V9_FPU_FSR_TYPE unsigned long long +# define V9_FPU_FPRS_TYPE unsigned +#endif + +#if __WORDSIZE == 64 + +typedef struct + { + union { /* FPU floating point regs */ + unsigned __ctx(fpu_regs)[32]; /* 32 singles */ + double __ctx(fpu_dregs)[32]; /* 32 doubles */ + long double __ctx(fpu_qregs)[16]; /* 16 quads */ + } __ctx(fpu_fr); + struct __fq *__ctx(fpu_q); /* ptr to array of FQ entries */ + unsigned long __ctx(fpu_fsr); /* FPU status register */ + unsigned char __ctx(fpu_qcnt); /* # of entries in saved FQ */ + unsigned char __ctx(fpu_q_entrysize); /* # of bytes per FQ entry */ + unsigned char __ctx(fpu_en); /* flag signifying fpu in use */ + } fpregset_t; + +#else /* __WORDSIZE == 32 */ + +typedef struct + { + union { /* FPU floating point regs */ + __extension__ unsigned long long __ctx(fpu_regs)[32]; /* 32 singles */ + double __ctx(fpu_dregs)[16]; /* 16 doubles */ + } __ctx(fpu_fr); + struct __fq *__ctx(fpu_q); /* ptr to array of FQ entries */ + unsigned __ctx(fpu_fsr); /* FPU status register */ + unsigned char __ctx(fpu_qcnt); /* # of entries in saved FQ */ + unsigned char __ctx(fpu_q_entrysize); /* # of bytes per FQ entry */ + unsigned char __ctx(fpu_en); /* flag signifying fpu in use */ + } fpregset_t; + +/* + * The following structure is for associating extra register state with + * the ucontext structure and is kept within the uc_mcontext filler area. + * + * If (xrs_id == XRS_ID) then the xrs_ptr field is a valid pointer to + * extra register state. The exact format of the extra register state + * pointed to by xrs_ptr is platform-dependent. + * + * Note: a platform may or may not manage extra register state. + */ +typedef struct + { + unsigned int __ctx(xrs_id); /* indicates xrs_ptr validity */ + void * __ctx(xrs_ptr); /* ptr to extra reg state */ + } xrs_t; + +#ifdef __USE_MISC +# define XRS_ID 0x78727300 /* the string "xrs" */ +#endif + +typedef struct + { + gregset_t __ctx(gregs); /* general register set */ + gwindows_t *__ctx(gwins); /* POSSIBLE pointer to register + windows */ + fpregset_t __ctx(fpregs); /* floating point register set */ + xrs_t __ctx(xrs); /* POSSIBLE extra register state + association */ + long __glibc_reserved1[19]; + } mcontext_t; + + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long __ctx(uc_flags); + struct ucontext_t *uc_link; + sigset_t uc_sigmask; + stack_t uc_stack; + mcontext_t uc_mcontext; + } ucontext_t; + +#endif /* __WORDSIZE == 32 */ +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/include/sparcv9-linux-gnu/sys/user.h b/libc/include/sparcv9-linux-gnu/sys/user.h new file mode 100644 index 0000000000..142047ab1b --- /dev/null +++ b/libc/include/sparcv9-linux-gnu/sys/user.h @@ -0,0 +1,86 @@ +/* Copyright (C) 2003-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H +#define _SYS_USER_H 1 + +#include + +struct sunos_regs +{ + unsigned int psr, pc, npc, y; + unsigned int regs[15]; +}; + +struct sunos_fpqueue +{ + unsigned int *addr; + unsigned int inst; +}; + +struct sunos_fp +{ + union + { + unsigned int regs[32]; + double reg_dbls[16]; + } fregs; + unsigned int fsr; + unsigned int flags; + unsigned int extra; + unsigned int fpq_count; + struct sunos_fpqueue fpq[16]; +}; + +struct sunos_fpu +{ + struct sunos_fp fpstatus; +}; + +/* The SunOS core file header layout. */ +struct user { + unsigned int magic; + unsigned int len; + struct sunos_regs regs; + struct + { + unsigned char a_dynamic :1; + unsigned char a_toolversion :7; + unsigned char a_machtype; + unsigned short a_info; + unsigned int a_text; + unsigned int a_data; + unsigned int a_bss; + unsigned int a_syms; + unsigned int a_entry; + unsigned int a_trsize; + unsigned int a_drsize; + } uexec; + int signal; + size_t u_tsize; + size_t u_dsize; + size_t u_ssize; + char u_comm[17]; + struct sunos_fpu fpu; + unsigned int sigcode; +}; + +#define NBPG 0x2000 +#define UPAGES 1 +#define SUNOS_CORE_MAGIC 0x080456 + +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/asm/unistd.h b/libc/include/x86_64-linux-gnu/asm/unistd.h new file mode 100644 index 0000000000..30d7d04d72 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/asm/unistd.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +#ifndef _UAPI_ASM_X86_UNISTD_H +#define _UAPI_ASM_X86_UNISTD_H + +/* x32 syscall flag bit */ +#define __X32_SYSCALL_BIT 0x40000000 + +#ifndef __KERNEL__ +# ifdef __i386__ +# include +# elif defined(__ILP32__) +# include +# else +# include +# endif +#endif + +#endif /* _UAPI_ASM_X86_UNISTD_H */ diff --git a/libc/include/x86_64-linux-gnu/bits/a.out.h b/libc/include/x86_64-linux-gnu/bits/a.out.h new file mode 100644 index 0000000000..3c81a52dbb --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/a.out.h @@ -0,0 +1,11 @@ +#ifndef __A_OUT_GNU_H__ +# error "Never use directly; include instead." +#endif + +#ifdef __x86_64__ + +/* Signal to users of this header that this architecture really doesn't + support a.out binary format. */ +#define __NO_A_OUT_SUPPORT 1 + +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/endian.h b/libc/include/x86_64-linux-gnu/bits/endian.h new file mode 100644 index 0000000000..35c898d0ec --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/endian.h @@ -0,0 +1,7 @@ +/* i386/x86_64 are little-endian. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#define __BYTE_ORDER __LITTLE_ENDIAN \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/environments.h b/libc/include/x86_64-linux-gnu/bits/environments.h new file mode 100644 index 0000000000..76f12fe085 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/environments.h @@ -0,0 +1,105 @@ +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _UNISTD_H +# error "Never include this file directly. Use instead" +#endif + +#include + +/* This header should define the following symbols under the described + situations. A value `1' means that the model is always supported, + `-1' means it is never supported. Undefined means it cannot be + statically decided. + + _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type + _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type + + _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type + _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type + + The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, + _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, + _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were + used in previous versions of the Unix standard and are available + only for compatibility. +*/ + +#if __WORDSIZE == 64 + +/* Environments with 32-bit wide pointers are optionally provided. + Therefore following macros aren't defined: + # undef _POSIX_V7_ILP32_OFF32 + # undef _POSIX_V7_ILP32_OFFBIG + # undef _POSIX_V6_ILP32_OFF32 + # undef _POSIX_V6_ILP32_OFFBIG + # undef _XBS5_ILP32_OFF32 + # undef _XBS5_ILP32_OFFBIG + and users need to check at runtime. */ + +/* We also have no use (for now) for an environment with bigger pointers + and offsets. */ +# define _POSIX_V7_LPBIG_OFFBIG -1 +# define _POSIX_V6_LPBIG_OFFBIG -1 +# define _XBS5_LPBIG_OFFBIG -1 + +/* By default we have 64-bit wide `long int', pointers and `off_t'. */ +# define _POSIX_V7_LP64_OFF64 1 +# define _POSIX_V6_LP64_OFF64 1 +# define _XBS5_LP64_OFF64 1 + +#else /* __WORDSIZE == 32 */ + +/* We have 32-bit wide `int', `long int' and pointers and all platforms + support LFS. -mx32 has 64-bit wide `off_t'. */ +# define _POSIX_V7_ILP32_OFFBIG 1 +# define _POSIX_V6_ILP32_OFFBIG 1 +# define _XBS5_ILP32_OFFBIG 1 + +# ifndef __x86_64__ +/* -m32 has 32-bit wide `off_t'. */ +# define _POSIX_V7_ILP32_OFF32 1 +# define _POSIX_V6_ILP32_OFF32 1 +# define _XBS5_ILP32_OFF32 1 +# endif + +/* We optionally provide an environment with the above size but an 64-bit + side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ + +/* Environments with 64-bit wide pointers can be provided, + so these macros aren't defined: + # undef _POSIX_V7_LP64_OFF64 + # undef _POSIX_V7_LPBIG_OFFBIG + # undef _POSIX_V6_LP64_OFF64 + # undef _POSIX_V6_LPBIG_OFFBIG + # undef _XBS5_LP64_OFF64 + # undef _XBS5_LPBIG_OFFBIG + and sysconf tests for it at runtime. */ + +#endif /* __WORDSIZE == 32 */ + +#define __ILP32_OFF32_CFLAGS "-m32" +#define __ILP32_OFF32_LDFLAGS "-m32" +#if defined __x86_64__ && defined __ILP32__ +# define __ILP32_OFFBIG_CFLAGS "-mx32" +# define __ILP32_OFFBIG_LDFLAGS "-mx32" +#else +# define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +# define __ILP32_OFFBIG_LDFLAGS "-m32" +#endif +#define __LP64_OFF64_CFLAGS "-m64" +#define __LP64_OFF64_LDFLAGS "-m64" \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/epoll.h b/libc/include/x86_64-linux-gnu/bits/epoll.h new file mode 100644 index 0000000000..205d42ad63 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/epoll.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_EPOLL_H +# error "Never use directly; include instead." +#endif + +/* Flags to be passed to epoll_create1. */ +enum + { + EPOLL_CLOEXEC = 02000000 +#define EPOLL_CLOEXEC EPOLL_CLOEXEC + }; + +#define __EPOLL_PACKED __attribute__ ((__packed__)) \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/fcntl.h b/libc/include/x86_64-linux-gnu/bits/fcntl.h new file mode 100644 index 0000000000..d3229a6782 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/fcntl.h @@ -0,0 +1,61 @@ +/* O_*, F_*, FD_* bit values for Linux/x86. + Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#ifdef __x86_64__ +# define __O_LARGEFILE 0 +#endif + +#ifdef __x86_64__ +/* Not necessary, we always have 64-bit offsets. */ +# define F_GETLK64 5 /* Get record locking info. */ +# define F_SETLK64 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW64 7 /* Set record locking info (blocking). */ +#endif + + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/fenv.h b/libc/include/x86_64-linux-gnu/bits/fenv.h new file mode 100644 index 0000000000..74151486b4 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/fenv.h @@ -0,0 +1,170 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + +/* Define bits representing the exception. We use the bit positions + of the appropriate bits in the FPU control word. */ +enum + { + FE_INVALID = +#define FE_INVALID 0x01 + FE_INVALID, + __FE_DENORM = 0x02, + FE_DIVBYZERO = +#define FE_DIVBYZERO 0x04 + FE_DIVBYZERO, + FE_OVERFLOW = +#define FE_OVERFLOW 0x08 + FE_OVERFLOW, + FE_UNDERFLOW = +#define FE_UNDERFLOW 0x10 + FE_UNDERFLOW, + FE_INEXACT = +#define FE_INEXACT 0x20 + FE_INEXACT + }; + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +/* The ix87 FPU supports all of the four defined rounding modes. We + use again the bit positions in the FPU control word as the values + for the appropriate macros. */ +enum + { + FE_TONEAREST = +#define FE_TONEAREST 0 + FE_TONEAREST, + FE_DOWNWARD = +#define FE_DOWNWARD 0x400 + FE_DOWNWARD, + FE_UPWARD = +#define FE_UPWARD 0x800 + FE_UPWARD, + FE_TOWARDZERO = +#define FE_TOWARDZERO 0xc00 + FE_TOWARDZERO + }; + + +/* Type representing exception flags. */ +typedef unsigned short int fexcept_t; + + +/* Type representing floating-point environment. This structure + corresponds to the layout of the block written by the `fstenv' + instruction and has additional fields for the contents of the MXCSR + register as written by the `stmxcsr' instruction. */ +typedef struct + { + unsigned short int __control_word; + unsigned short int __glibc_reserved1; + unsigned short int __status_word; + unsigned short int __glibc_reserved2; + unsigned short int __tags; + unsigned short int __glibc_reserved3; + unsigned int __eip; + unsigned short int __cs_selector; + unsigned int __opcode:11; + unsigned int __glibc_reserved4:5; + unsigned int __data_offset; + unsigned short int __data_selector; + unsigned short int __glibc_reserved5; +#ifdef __x86_64__ + unsigned int __mxcsr; +#endif + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((const fenv_t *) -1) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exception is masked. */ +# define FE_NOMASK_ENV ((const fenv_t *) -2) +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef struct + { + unsigned short int __control_word; + unsigned short int __glibc_reserved; + unsigned int __mxcsr; + } +femode_t; + +/* Default floating-point control modes. */ +# define FE_DFL_MODE ((const femode_t *) -1L) +#endif + + +#ifdef __USE_EXTERN_INLINES +__BEGIN_DECLS + +/* Optimized versions. */ +#ifndef _LIBC +extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), feraiseexcept); +#endif +__extern_always_inline void +__NTH (__feraiseexcept_invalid_divbyzero (int __excepts)) +{ + if ((FE_INVALID & __excepts) != 0) + { + /* One example of an invalid operation is 0.0 / 0.0. */ + float __f = 0.0; + +# ifdef __SSE_MATH__ + __asm__ __volatile__ ("divss %0, %0 " : : "x" (__f)); +# else + __asm__ __volatile__ ("fdiv %%st, %%st(0); fwait" + : "=t" (__f) : "0" (__f)); +# endif + (void) &__f; + } + if ((FE_DIVBYZERO & __excepts) != 0) + { + float __f = 1.0; + float __g = 0.0; + +# ifdef __SSE_MATH__ + __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g)); +# else + __asm__ __volatile__ ("fdivp %%st, %%st(1); fwait" + : "=t" (__f) : "0" (__f), "u" (__g) : "st(1)"); +# endif + (void) &__f; + } +} +__extern_inline int +__NTH (feraiseexcept (int __excepts)) +{ + if (__builtin_constant_p (__excepts) + && (__excepts & ~(FE_INVALID | FE_DIVBYZERO)) == 0) + { + __feraiseexcept_invalid_divbyzero (__excepts); + return 0; + } + + return __feraiseexcept_renamed (__excepts); +} + +__END_DECLS +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/floatn.h b/libc/include/x86_64-linux-gnu/bits/floatn.h new file mode 100644 index 0000000000..1d7ba69ea8 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/floatn.h @@ -0,0 +1,121 @@ +/* Macros to control TS 18661-3 glibc features on x86. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +/* 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. The required + libgcc support was added some time after the basic compiler + support, for x86_64 and x86. */ +#if (defined __x86_64__ \ + ? __GNUC_PREREQ (4, 3) \ + : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4))) +# define __HAVE_FLOAT128 1 +#else +# 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. */ +#if __HAVE_FLOAT128 +# define __HAVE_DISTINCT_FLOAT128 1 +#else +# define __HAVE_DISTINCT_FLOAT128 0 +#endif + +/* Defined to 1 if the current compiler invocation provides a + floating-point type with the right format for _Float64x, and this + glibc includes corresponding *f64x interfaces for it. */ +#define __HAVE_FLOAT64X 1 + +/* 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 1 + +#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##q +# 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 +/* Add a typedef for older GCC compilers which don't natively support + _Complex _Float128. */ +typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__))); +# define __CFLOAT128 __cfloat128 +# 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 __float128 _Float128; +# endif + +/* __builtin_huge_valf128 doesn't exist before GCC 7.0. */ +# if !__GNUC_PREREQ (7, 0) +# define __builtin_huge_valf128() ((_Float128) __builtin_huge_val ()) +# endif + +/* Older GCC has only a subset of built-in functions for _Float128 on + x86, and __builtin_infq is not usable in static initializers. + Converting a narrower sNaN to _Float128 produces a quiet NaN, so + attempts to use _Float128 sNaNs will not work properly with older + compilers. */ +# if !__GNUC_PREREQ (7, 0) +# define __builtin_copysignf128 __builtin_copysignq +# define __builtin_fabsf128 __builtin_fabsq +# define __builtin_inff128() ((_Float128) __builtin_inf ()) +# define __builtin_nanf128(x) ((_Float128) __builtin_nan (x)) +# define __builtin_nansf128(x) ((_Float128) __builtin_nans (x)) +# endif + +/* In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*, + e.g.: __builtin_signbitf128, before GCC 6. However, there has never + been a __builtin_signbitf128 in GCC and the type-generic builtin is + only available since GCC 6. */ +# if !__GNUC_PREREQ (6, 0) +# define __builtin_signbitf128 __signbitf128 +# endif + +# endif + +#endif /* !__ASSEMBLER__. */ + +#include + +#endif /* _BITS_FLOATN_H */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/flt-eval-method.h b/libc/include/x86_64-linux-gnu/bits/flt-eval-method.h new file mode 100644 index 0000000000..87e06c4354 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/flt-eval-method.h @@ -0,0 +1,33 @@ +/* Define __GLIBC_FLT_EVAL_METHOD. x86 version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +#ifdef __FLT_EVAL_METHOD__ +# if __FLT_EVAL_METHOD__ == -1 +# define __GLIBC_FLT_EVAL_METHOD 2 +# else +# define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__ +# endif +#elif defined __x86_64__ +# define __GLIBC_FLT_EVAL_METHOD 0 +#else +# define __GLIBC_FLT_EVAL_METHOD 2 +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/fp-logb.h b/libc/include/x86_64-linux-gnu/bits/fp-logb.h new file mode 100644 index 0000000000..f3e55ea50c --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/fp-logb.h @@ -0,0 +1,24 @@ +/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +#define __FP_LOGB0_IS_MIN 1 +#define __FP_LOGBNAN_IS_MIN 1 \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/indirect-return.h b/libc/include/x86_64-linux-gnu/bits/indirect-return.h new file mode 100644 index 0000000000..fd170e8a42 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/indirect-return.h @@ -0,0 +1,37 @@ +/* Definition of __INDIRECT_RETURN. x86 version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _UCONTEXT_H +# error "Never include directly; use instead." +#endif + +/* On x86, swapcontext returns via indirect branch when the shadow stack + is enabled. Define __INDIRECT_RETURN to indicate whether swapcontext + returns via indirect branch. */ +#if defined __CET__ && (__CET__ & 2) != 0 +# if __glibc_has_attribute (__indirect_return__) +# define __INDIRECT_RETURN __attribute__ ((__indirect_return__)) +# else +/* Newer compilers provide the indirect_return attribute, but without + it we can use returns_twice to affect the optimizer in the same + way and avoid unsafe optimizations. */ +# define __INDIRECT_RETURN __attribute__ ((__returns_twice__)) +# endif +#else +# define __INDIRECT_RETURN +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/ipctypes.h b/libc/include/x86_64-linux-gnu/bits/ipctypes.h new file mode 100644 index 0000000000..2b471d1e52 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/ipctypes.h @@ -0,0 +1,33 @@ +/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. + Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IPC_H +# error "Never use directly; include instead." +#endif + +#ifndef _BITS_IPCTYPES_H +#define _BITS_IPCTYPES_H 1 + +/* Used in `struct shmid_ds'. */ +# ifdef __x86_64__ +typedef int __ipc_pid_t; +# else +typedef unsigned short int __ipc_pid_t; +# endif + +#endif /* bits/ipctypes.h */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/iscanonical.h b/libc/include/x86_64-linux-gnu/bits/iscanonical.h new file mode 100644 index 0000000000..1fa01edaad --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/iscanonical.h @@ -0,0 +1,54 @@ +/* Define iscanonical macro. ldbl-96 version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +extern int __iscanonicall (long double __x) + __THROW __attribute__ ((__const__)); +#define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1) +#define __iscanonical(x) ((void) (__typeof (x)) (x), 1) +#if __HAVE_DISTINCT_FLOAT128 +# define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1) +#endif + +/* Return nonzero value if X is canonical. In IEEE interchange binary + formats, all values are canonical, but the argument must still be + converted to its semantic type for any exceptions arising from the + conversion, before being discarded; in extended precision, there + are encodings that are not consistently handled as corresponding to + any particular value of the type, and we return 0 for those. */ +#ifndef __cplusplus +# define iscanonical(x) __MATH_TG ((x), __iscanonical, (x)) +#else +/* In C++ mode, __MATH_TG cannot be used, because it relies on + __builtin_types_compatible_p, which is a C-only builtin. On the + other hand, overloading provides the means to distinguish between + the floating-point types. The overloading resolution will match + the correct parameter (regardless of type qualifiers (i.e.: const + and volatile)). */ +extern "C++" { +inline int iscanonical (float __val) { return __iscanonicalf (__val); } +inline int iscanonical (double __val) { return __iscanonical (__val); } +inline int iscanonical (long double __val) { return __iscanonicall (__val); } +# if __HAVE_DISTINCT_FLOAT128 +inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); } +# endif +} +#endif /* __cplusplus */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/link.h b/libc/include/x86_64-linux-gnu/bits/link.h new file mode 100644 index 0000000000..2724980f6b --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/link.h @@ -0,0 +1,159 @@ +/* Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + + +#ifndef __x86_64__ +/* Registers for entry into PLT on IA-32. */ +typedef struct La_i86_regs +{ + uint32_t lr_edx; + uint32_t lr_ecx; + uint32_t lr_eax; + uint32_t lr_ebp; + uint32_t lr_esp; +} La_i86_regs; + +/* Return values for calls from PLT on IA-32. */ +typedef struct La_i86_retval +{ + uint32_t lrv_eax; + uint32_t lrv_edx; + long double lrv_st0; + long double lrv_st1; + uint64_t lrv_bnd0; + uint64_t lrv_bnd1; +} La_i86_retval; + + +__BEGIN_DECLS + +extern Elf32_Addr la_i86_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_i86_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_i86_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_i86_regs *__inregs, + La_i86_retval *__outregs, + const char *symname); + +__END_DECLS + +#else + +/* Registers for entry into PLT on x86-64. */ +# if __GNUC_PREREQ (4,0) +typedef float La_x86_64_xmm __attribute__ ((__vector_size__ (16))); +typedef float La_x86_64_ymm + __attribute__ ((__vector_size__ (32), __aligned__ (16))); +typedef double La_x86_64_zmm + __attribute__ ((__vector_size__ (64), __aligned__ (16))); +# else +typedef float La_x86_64_xmm __attribute__ ((__mode__ (__V4SF__))); +# endif + +typedef union +{ +# if __GNUC_PREREQ (4,0) + La_x86_64_ymm ymm[2]; + La_x86_64_zmm zmm[1]; +# endif + La_x86_64_xmm xmm[4]; +} La_x86_64_vector __attribute__ ((__aligned__ (16))); + +typedef struct La_x86_64_regs +{ + uint64_t lr_rdx; + uint64_t lr_r8; + uint64_t lr_r9; + uint64_t lr_rcx; + uint64_t lr_rsi; + uint64_t lr_rdi; + uint64_t lr_rbp; + uint64_t lr_rsp; + La_x86_64_xmm lr_xmm[8]; + La_x86_64_vector lr_vector[8]; +#ifndef __ILP32__ + __int128_t lr_bnd[4]; +#endif +} La_x86_64_regs; + +/* Return values for calls from PLT on x86-64. */ +typedef struct La_x86_64_retval +{ + uint64_t lrv_rax; + uint64_t lrv_rdx; + La_x86_64_xmm lrv_xmm0; + La_x86_64_xmm lrv_xmm1; + long double lrv_st0; + long double lrv_st1; + La_x86_64_vector lrv_vector0; + La_x86_64_vector lrv_vector1; +#ifndef __ILP32__ + __int128_t lrv_bnd0; + __int128_t lrv_bnd1; +#endif +} La_x86_64_retval; + +#define La_x32_regs La_x86_64_regs +#define La_x32_retval La_x86_64_retval + +__BEGIN_DECLS + +extern Elf64_Addr la_x86_64_gnu_pltenter (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_x86_64_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_x86_64_gnu_pltexit (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_x86_64_regs *__inregs, + La_x86_64_retval *__outregs, + const char *__symname); + +extern Elf32_Addr la_x32_gnu_pltenter (Elf32_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_x32_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_x32_gnu_pltexit (Elf32_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_x32_regs *__inregs, + La_x32_retval *__outregs, + const char *__symname); + +__END_DECLS + +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/long-double.h b/libc/include/x86_64-linux-gnu/bits/long-double.h new file mode 100644 index 0000000000..6a582416cf --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/long-double.h @@ -0,0 +1,20 @@ +/* Properties of long double type. ldbl-96 version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* long double is distinct from double, so there is nothing to + define here. */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/math-vector-fortran.h b/libc/include/x86_64-linux-gnu/bits/math-vector-fortran.h new file mode 100644 index 0000000000..fc3aa3e3b2 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/math-vector-fortran.h @@ -0,0 +1,43 @@ +! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*- +! Copyright (C) 2019 Free Software Foundation, Inc. +! This file is part of the GNU C Library. +! +! The GNU C Library is free software; you can redistribute it and/or +! modify it under the terms of the GNU Lesser General Public +! License as published by the Free Software Foundation; either +! version 2.1 of the License, or (at your option) any later version. +! +! The GNU C Library is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +! Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with the GNU C Library; if not, see +! . + +!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (sin) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (sinf) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (sincos) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (log) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (logf) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (exp) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64') + +!GCC$ builtin (cos) attributes simd (notinbranch) if('x32') +!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32') +!GCC$ builtin (sin) attributes simd (notinbranch) if('x32') +!GCC$ builtin (sinf) attributes simd (notinbranch) if('x32') +!GCC$ builtin (sincos) attributes simd (notinbranch) if('x32') +!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x32') +!GCC$ builtin (log) attributes simd (notinbranch) if('x32') +!GCC$ builtin (logf) attributes simd (notinbranch) if('x32') +!GCC$ builtin (exp) attributes simd (notinbranch) if('x32') +!GCC$ builtin (expf) attributes simd (notinbranch) if('x32') +!GCC$ builtin (pow) attributes simd (notinbranch) if('x32') +!GCC$ builtin (powf) attributes simd (notinbranch) if('x32') \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/math-vector.h b/libc/include/x86_64-linux-gnu/bits/math-vector.h new file mode 100644 index 0000000000..67e2c8aea8 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/math-vector.h @@ -0,0 +1,63 @@ +/* Platform-specific SIMD declarations of math functions. + Copyright (C) 2014-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never include directly;\ + include instead." +#endif + +/* Get default empty definitions for simd declarations. */ +#include + +#if defined __x86_64__ && defined __FAST_MATH__ +# if defined _OPENMP && _OPENMP >= 201307 +/* OpenMP case. */ +# define __DECL_SIMD_x86_64 _Pragma ("omp declare simd notinbranch") +# elif __GNUC_PREREQ (6,0) +/* W/o OpenMP use GCC 6.* __attribute__ ((__simd__)). */ +# define __DECL_SIMD_x86_64 __attribute__ ((__simd__ ("notinbranch"))) +# endif + +# ifdef __DECL_SIMD_x86_64 +# undef __DECL_SIMD_cos +# define __DECL_SIMD_cos __DECL_SIMD_x86_64 +# undef __DECL_SIMD_cosf +# define __DECL_SIMD_cosf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_sin +# define __DECL_SIMD_sin __DECL_SIMD_x86_64 +# undef __DECL_SIMD_sinf +# define __DECL_SIMD_sinf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_sincos +# define __DECL_SIMD_sincos __DECL_SIMD_x86_64 +# undef __DECL_SIMD_sincosf +# define __DECL_SIMD_sincosf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_log +# define __DECL_SIMD_log __DECL_SIMD_x86_64 +# undef __DECL_SIMD_logf +# define __DECL_SIMD_logf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_exp +# define __DECL_SIMD_exp __DECL_SIMD_x86_64 +# undef __DECL_SIMD_expf +# define __DECL_SIMD_expf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_pow +# define __DECL_SIMD_pow __DECL_SIMD_x86_64 +# undef __DECL_SIMD_powf +# define __DECL_SIMD_powf __DECL_SIMD_x86_64 + +# endif +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/mman.h b/libc/include/x86_64-linux-gnu/bits/mman.h new file mode 100644 index 0000000000..90f3588b6e --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/mman.h @@ -0,0 +1,34 @@ +/* Definitions for POSIX memory map interface. Linux/x86_64 version. + Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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. */ + +/* Other flags. */ +#ifdef __USE_MISC +# define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */ +#endif + +#include + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/procfs-id.h b/libc/include/x86_64-linux-gnu/bits/procfs-id.h new file mode 100644 index 0000000000..79f85bfd44 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/procfs-id.h @@ -0,0 +1,30 @@ +/* Types of pr_uid and pr_gid in struct elf_prpsinfo. x86 version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +#if __WORDSIZE == 32 +typedef unsigned short int __pr_uid_t; +typedef unsigned short int __pr_gid_t; +#else +typedef unsigned int __pr_uid_t; +typedef unsigned int __pr_gid_t; +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/procfs.h b/libc/include/x86_64-linux-gnu/bits/procfs.h new file mode 100644 index 0000000000..ea3cbfe1be --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/procfs.h @@ -0,0 +1,50 @@ +/* Types for registers for sys/procfs.h. x86 version. + Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +/* Type for a general-purpose register. */ +#ifdef __x86_64__ +__extension__ typedef unsigned long long elf_greg_t; +#else +typedef unsigned long elf_greg_t; +#endif + +/* And the whole bunch of them. We could have used `struct + user_regs_struct' directly in the typedef, but tradition says that + the register set is an array, which does have some peculiar + semantics, so leave it that way. */ +#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t)) +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +#ifndef __x86_64__ +/* Register set for the floating-point registers. */ +typedef struct user_fpregs_struct elf_fpregset_t; + +/* Register set for the extended floating-point registers. Includes + the Pentium III SSE registers in addition to the classic + floating-point stuff. */ +typedef struct user_fpxregs_struct elf_fpxregset_t; +#else +/* Register set for the extended floating-point registers. Includes + the Pentium III SSE registers in addition to the classic + floating-point stuff. */ +typedef struct user_fpregs_struct elf_fpregset_t; +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h b/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..7c5701b0b8 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h @@ -0,0 +1,106 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#ifdef __x86_64__ +# if __WORDSIZE == 64 +# define __SIZEOF_PTHREAD_MUTEX_T 40 +# 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_MUTEX_T 32 +# define __SIZEOF_PTHREAD_ATTR_T 32 +# define __SIZEOF_PTHREAD_MUTEX_T 32 +# define __SIZEOF_PTHREAD_RWLOCK_T 44 +# define __SIZEOF_PTHREAD_BARRIER_T 20 +# endif +#else +# define __SIZEOF_PTHREAD_MUTEX_T 24 +# 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 + +/* Definitions for internal mutex struct. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 1 +#ifdef __x86_64__ +# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 +# define __PTHREAD_MUTEX_USE_UNION 0 +#else +# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 +# define __PTHREAD_MUTEX_USE_UNION 1 +#endif + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +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; +#ifdef __x86_64__ + int __cur_writer; + int __shared; + signed char __rwelision; +# ifdef __ILP32__ + unsigned char __pad1[3]; +# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 } +# else + unsigned char __pad1[7]; +# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 } +# endif + unsigned long int __pad2; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned int __flags; +# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1 +#else + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned char __flags; + unsigned char __shared; + signed char __rwelision; +# define __PTHREAD_RWLOCK_ELISION_EXTRA 0 + unsigned char __pad2; + int __cur_writer; +#endif +}; + +#ifndef __x86_64__ +/* Extra attributes for the cleanup functions. */ +# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1))) +#endif + +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/select.h b/libc/include/x86_64-linux-gnu/bits/select.h new file mode 100644 index 0000000000..24d5067c62 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/select.h @@ -0,0 +1,63 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SELECT_H +# error "Never use directly; include instead." +#endif + +#include + + +#if defined __GNUC__ && __GNUC__ >= 2 + +# if __WORDSIZE == 64 +# define __FD_ZERO_STOS "stosq" +# else +# define __FD_ZERO_STOS "stosl" +# endif + +# define __FD_ZERO(fdsp) \ + do { \ + int __d0, __d1; \ + __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS \ + : "=c" (__d0), "=D" (__d1) \ + : "a" (0), "0" (sizeof (fd_set) \ + / sizeof (__fd_mask)), \ + "1" (&__FDS_BITS (fdsp)[0]) \ + : "memory"); \ + } while (0) + +#else /* ! GNU CC */ + +/* We don't use `memset' because this would require a prototype and + the array isn't too big. */ +# define __FD_ZERO(set) \ + do { \ + unsigned int __i; \ + fd_set *__arr = (set); \ + for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ + __FDS_BITS (__arr)[__i] = 0; \ + } while (0) + +#endif /* GNU CC */ + +#define __FD_SET(d, set) \ + ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d))) +#define __FD_CLR(d, set) \ + ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d))) +#define __FD_ISSET(d, set) \ + ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0) \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/sem-pad.h b/libc/include/x86_64-linux-gnu/bits/sem-pad.h new file mode 100644 index 0000000000..bd8df25ace --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/sem-pad.h @@ -0,0 +1,24 @@ +/* Define where padding goes in struct semid_ds. x86 version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SEM_H +# error "Never use directly; include instead." +#endif + +#define __SEM_PAD_AFTER_TIME 1 +#define __SEM_PAD_BEFORE_TIME 0 \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/semaphore.h b/libc/include/x86_64-linux-gnu/bits/semaphore.h new file mode 100644 index 0000000000..c5733e31f4 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/semaphore.h @@ -0,0 +1,40 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2002. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + +#include + +#if __WORDSIZE == 64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif + + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/setjmp.h b/libc/include/x86_64-linux-gnu/bits/setjmp.h new file mode 100644 index 0000000000..aec176f8d2 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/setjmp.h @@ -0,0 +1,40 @@ +/* Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 the machine-dependent type `jmp_buf'. x86-64 version. */ +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +#include + +#ifndef _ASM + +# if __WORDSIZE == 64 +typedef long int __jmp_buf[8]; +# elif defined __x86_64__ +__extension__ typedef long long int __jmp_buf[8]; +# else +typedef int __jmp_buf[6]; +# endif + +#endif + +#endif /* bits/setjmp.h */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/sigcontext.h b/libc/include/x86_64-linux-gnu/bits/sigcontext.h new file mode 100644 index 0000000000..481a8a7bb5 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/sigcontext.h @@ -0,0 +1,196 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#define FP_XSTATE_MAGIC1 0x46505853U +#define FP_XSTATE_MAGIC2 0x46505845U +#define FP_XSTATE_MAGIC2_SIZE sizeof (FP_XSTATE_MAGIC2) + +struct _fpx_sw_bytes +{ + __uint32_t magic1; + __uint32_t extended_size; + __uint64_t xstate_bv; + __uint32_t xstate_size; + __uint32_t __glibc_reserved1[7]; +}; + +struct _fpreg +{ + unsigned short significand[4]; + unsigned short exponent; +}; + +struct _fpxreg +{ + unsigned short significand[4]; + unsigned short exponent; + unsigned short __glibc_reserved1[3]; +}; + +struct _xmmreg +{ + __uint32_t element[4]; +}; + + + +#ifndef __x86_64__ + +struct _fpstate +{ + /* Regular FPU environment. */ + __uint32_t cw; + __uint32_t sw; + __uint32_t tag; + __uint32_t ipoff; + __uint32_t cssel; + __uint32_t dataoff; + __uint32_t datasel; + struct _fpreg _st[8]; + unsigned short status; + unsigned short magic; + + /* FXSR FPU environment. */ + __uint32_t _fxsr_env[6]; + __uint32_t mxcsr; + __uint32_t __glibc_reserved1; + struct _fpxreg _fxsr_st[8]; + struct _xmmreg _xmm[8]; + __uint32_t __glibc_reserved2[56]; +}; + +#ifndef sigcontext_struct +/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but + we need sigcontext. Some packages have come to rely on + sigcontext_struct being defined on 32-bit x86, so define this for + their benefit. */ +# define sigcontext_struct sigcontext +#endif + +#define X86_FXSR_MAGIC 0x0000 + +struct sigcontext +{ + unsigned short gs, __gsh; + unsigned short fs, __fsh; + unsigned short es, __esh; + unsigned short ds, __dsh; + unsigned long edi; + unsigned long esi; + unsigned long ebp; + unsigned long esp; + unsigned long ebx; + unsigned long edx; + unsigned long ecx; + unsigned long eax; + unsigned long trapno; + unsigned long err; + unsigned long eip; + unsigned short cs, __csh; + unsigned long eflags; + unsigned long esp_at_signal; + unsigned short ss, __ssh; + struct _fpstate * fpstate; + unsigned long oldmask; + unsigned long cr2; +}; + +#else /* __x86_64__ */ + +struct _fpstate +{ + /* FPU environment matching the 64-bit FXSAVE layout. */ + __uint16_t cwd; + __uint16_t swd; + __uint16_t ftw; + __uint16_t fop; + __uint64_t rip; + __uint64_t rdp; + __uint32_t mxcsr; + __uint32_t mxcr_mask; + struct _fpxreg _st[8]; + struct _xmmreg _xmm[16]; + __uint32_t __glibc_reserved1[24]; +}; + +struct sigcontext +{ + __uint64_t r8; + __uint64_t r9; + __uint64_t r10; + __uint64_t r11; + __uint64_t r12; + __uint64_t r13; + __uint64_t r14; + __uint64_t r15; + __uint64_t rdi; + __uint64_t rsi; + __uint64_t rbp; + __uint64_t rbx; + __uint64_t rdx; + __uint64_t rax; + __uint64_t rcx; + __uint64_t rsp; + __uint64_t rip; + __uint64_t eflags; + unsigned short cs; + unsigned short gs; + unsigned short fs; + unsigned short __pad0; + __uint64_t err; + __uint64_t trapno; + __uint64_t oldmask; + __uint64_t cr2; + __extension__ union + { + struct _fpstate * fpstate; + __uint64_t __fpstate_word; + }; + __uint64_t __reserved1 [8]; +}; + +#endif /* __x86_64__ */ + +struct _xsave_hdr +{ + __uint64_t xstate_bv; + __uint64_t __glibc_reserved1[2]; + __uint64_t __glibc_reserved2[5]; +}; + +struct _ymmh_state +{ + __uint32_t ymmh_space[64]; +}; + +struct _xstate +{ + struct _fpstate fpstate; + struct _xsave_hdr xstate_hdr; + struct _ymmh_state ymmh; +}; + +#endif /* _BITS_SIGCONTEXT_H */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/siginfo-arch.h b/libc/include/x86_64-linux-gnu/bits/siginfo-arch.h new file mode 100644 index 0000000000..0f430f0772 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/siginfo-arch.h @@ -0,0 +1,17 @@ +/* Architecture-specific adjustments to siginfo_t. x86 version. */ +#ifndef _BITS_SIGINFO_ARCH_H +#define _BITS_SIGINFO_ARCH_H 1 + +#if defined __x86_64__ && __WORDSIZE == 32 +/* si_utime and si_stime must be 4 byte aligned for x32 to match the + kernel. We align siginfo_t to 8 bytes so that si_utime and + si_stime are actually aligned to 8 bytes since their offsets are + multiple of 8 bytes. Note: with some compilers, the alignment + attribute would be ignored if it were put in __SI_CLOCK_T instead + of encapsulated in a typedef. */ +typedef __clock_t __attribute__ ((__aligned__ (4))) __sigchld_clock_t; +# define __SI_ALIGNMENT __attribute__ ((__aligned__ (8))) +# define __SI_CLOCK_T __sigchld_clock_t +#endif + +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/stat.h b/libc/include/x86_64-linux-gnu/bits/stat.h new file mode 100644 index 0000000000..ee7f88c463 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/stat.h @@ -0,0 +1,210 @@ +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +/* Versions of the `struct stat' data structure. */ +#ifndef __x86_64__ +# define _STAT_VER_LINUX_OLD 1 +# define _STAT_VER_KERNEL 1 +# define _STAT_VER_SVR4 2 +# define _STAT_VER_LINUX 3 + +/* i386 versions of the `xmknod' interface. */ +# define _MKNOD_VER_LINUX 1 +# define _MKNOD_VER_SVR4 2 +# define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ +#else +# define _STAT_VER_KERNEL 0 +# define _STAT_VER_LINUX 1 + +/* x86-64 versions of the `xmknod' interface. */ +# define _MKNOD_VER_LINUX 0 +#endif + +#define _STAT_VER _STAT_VER_LINUX + +struct stat + { + __dev_t st_dev; /* Device. */ +#ifndef __x86_64__ + unsigned short int __pad1; +#endif +#if defined __x86_64__ || !defined __USE_FILE_OFFSET64 + __ino_t st_ino; /* File serial number. */ +#else + __ino_t __st_ino; /* 32bit file serial number. */ +#endif +#ifndef __x86_64__ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ +#else + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ +#endif + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ +#ifdef __x86_64__ + int __pad0; +#endif + __dev_t st_rdev; /* Device number, if device. */ +#ifndef __x86_64__ + unsigned short int __pad2; +#endif +#if defined __x86_64__ || !defined __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +#else + __off64_t st_size; /* Size of file, in bytes. */ +#endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ +#if defined __x86_64__ || !defined __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +#else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#endif +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + __syscall_ulong_t st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */ +#endif +#ifdef __x86_64__ + __syscall_slong_t __glibc_reserved[3]; +#else +# ifndef __USE_FILE_OFFSET64 + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; +# else + __ino64_t st_ino; /* File serial number. */ +# endif +#endif + }; + +#ifdef __USE_LARGEFILE64 +/* Note stat64 has the same shape as stat for x86-64. */ +struct stat64 + { + __dev_t st_dev; /* Device. */ +# ifdef __x86_64__ + __ino64_t st_ino; /* File serial number. */ + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ +# else + unsigned int __pad1; + __ino_t __st_ino; /* 32bit file serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ +# endif + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ +# ifdef __x86_64__ + int __pad0; + __dev_t st_rdev; /* Device number, if device. */ + __off_t st_size; /* Size of file, in bytes. */ +# else + __dev_t st_rdev; /* Device number, if device. */ + unsigned int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ +# endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# else + __time_t st_atime; /* Time of last access. */ + __syscall_ulong_t st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */ +# endif +# ifdef __x86_64__ + __syscall_slong_t __glibc_reserved[3]; +# else + __ino64_t st_ino; /* File serial number. */ +# endif + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/sysctl.h b/libc/include/x86_64-linux-gnu/bits/sysctl.h new file mode 100644 index 0000000000..6b29199909 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/sysctl.h @@ -0,0 +1,20 @@ +/* Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if defined __x86_64__ && defined __ILP32__ +# error "sysctl system call is unsupported in x32 kernel" +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/timesize.h b/libc/include/x86_64-linux-gnu/bits/timesize.h new file mode 100644 index 0000000000..48fb555234 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/timesize.h @@ -0,0 +1,25 @@ +/* Bit size of the time_t type at glibc build time, x86-64 and x32 case. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if defined __x86_64__ && defined __ILP32__ +/* For x32, time is 64-bit even though word size is 32-bit. */ +# define __TIMESIZE 64 +#else +/* For others, time size is word size. */ +# define __TIMESIZE __WORDSIZE +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/typesizes.h b/libc/include/x86_64-linux-gnu/bits/typesizes.h new file mode 100644 index 0000000000..7c14f5d7f8 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/typesizes.h @@ -0,0 +1,95 @@ +/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. + Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_TYPES_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_TYPESIZES_H +#define _BITS_TYPESIZES_H 1 + +/* See for the meaning of these macros. This file exists so + that need not vary across different GNU platforms. */ + +/* X32 kernel interface is 64-bit. */ +#if defined __x86_64__ && defined __ILP32__ +# define __SYSCALL_SLONG_TYPE __SQUAD_TYPE +# define __SYSCALL_ULONG_TYPE __UQUAD_TYPE +#else +# define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +# define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE +#endif + +#define __DEV_T_TYPE __UQUAD_TYPE +#define __UID_T_TYPE __U32_TYPE +#define __GID_T_TYPE __U32_TYPE +#define __INO_T_TYPE __SYSCALL_ULONG_TYPE +#define __INO64_T_TYPE __UQUAD_TYPE +#define __MODE_T_TYPE __U32_TYPE +#ifdef __x86_64__ +# define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE +# define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE +#else +# define __NLINK_T_TYPE __UWORD_TYPE +# define __FSWORD_T_TYPE __SWORD_TYPE +#endif +#define __OFF_T_TYPE __SYSCALL_SLONG_TYPE +#define __OFF64_T_TYPE __SQUAD_TYPE +#define __PID_T_TYPE __S32_TYPE +#define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE +#define __RLIM64_T_TYPE __UQUAD_TYPE +#define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE +#define __BLKCNT64_T_TYPE __SQUAD_TYPE +#define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE +#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE +#define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE +#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __ID_T_TYPE __U32_TYPE +#define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE +#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE +#define __USECONDS_T_TYPE __U32_TYPE +#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE +#define __DADDR_T_TYPE __S32_TYPE +#define __KEY_T_TYPE __S32_TYPE +#define __CLOCKID_T_TYPE __S32_TYPE +#define __TIMER_T_TYPE void * +#define __BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE +#define __FSID_T_TYPE struct { int __val[2]; } +#define __SSIZE_T_TYPE __SWORD_TYPE +#define __CPU_MASK_TYPE __SYSCALL_ULONG_TYPE + +#ifdef __x86_64__ +/* Tell the libc code that off_t and off64_t are actually the same type + for all ABI purposes, even if possibly expressed as different base types + for C type-checking purposes. */ +# define __OFF_T_MATCHES_OFF64_T 1 + +/* Same for ino_t and ino64_t. */ +# define __INO_T_MATCHES_INO64_T 1 + +/* And for __rlim_t and __rlim64_t. */ +# define __RLIM_T_MATCHES_RLIM64_T 1 +#else +# define __RLIM_T_MATCHES_RLIM64_T 0 +#endif + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + + +#endif /* bits/typesizes.h */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/wordsize.h b/libc/include/x86_64-linux-gnu/bits/wordsize.h new file mode 100644 index 0000000000..0bf84a4e99 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/wordsize.h @@ -0,0 +1,17 @@ +/* Determine the wordsize from the preprocessor defines. */ + +#if defined __x86_64__ && !defined __ILP32__ +# define __WORDSIZE 64 +#else +# define __WORDSIZE 32 +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 +#endif + +#ifdef __x86_64__ +# define __WORDSIZE_TIME64_COMPAT32 1 +/* Both x86-64 and x32 use the 64-bit system call interface. */ +# define __SYSCALL_WORDSIZE 64 +#else +# define __WORDSIZE_TIME64_COMPAT32 0 +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/bits/xtitypes.h b/libc/include/x86_64-linux-gnu/bits/xtitypes.h new file mode 100644 index 0000000000..1eb0c84d8f --- /dev/null +++ b/libc/include/x86_64-linux-gnu/bits/xtitypes.h @@ -0,0 +1,33 @@ +/* bits/xtitypes.h -- Define some types used by . x86-64. + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _STROPTS_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_XTITYPES_H +#define _BITS_XTITYPES_H 1 + +#include + +/* This type is used by some structs in . */ +typedef __SLONG32_TYPE __t_scalar_t; +typedef __ULONG32_TYPE __t_uscalar_t; + + +#endif /* bits/xtitypes.h */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/fpu_control.h b/libc/include/x86_64-linux-gnu/fpu_control.h new file mode 100644 index 0000000000..1c06450778 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/fpu_control.h @@ -0,0 +1,109 @@ +/* FPU control word bits. x86 version. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Olaf Flebbe. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FPU_CONTROL_H +#define _FPU_CONTROL_H 1 + +/* Note that this file sets on x86-64 only the x87 FPU, it does not + touch the SSE unit. */ + +/* Here is the dirty part. Set up your 387 through the control word + * (cw) register. + * + * 15-13 12 11-10 9-8 7-6 5 4 3 2 1 0 + * | reserved | IC | RC | PC | reserved | PM | UM | OM | ZM | DM | IM + * + * IM: Invalid operation mask + * DM: Denormalized operand mask + * ZM: Zero-divide mask + * OM: Overflow mask + * UM: Underflow mask + * PM: Precision (inexact result) mask + * + * Mask bit is 1 means no interrupt. + * + * PC: Precision control + * 11 - round to extended precision + * 10 - round to double precision + * 00 - round to single precision + * + * RC: Rounding control + * 00 - rounding to nearest + * 01 - rounding down (toward - infinity) + * 10 - rounding up (toward + infinity) + * 11 - rounding toward zero + * + * IC: Infinity control + * That is for 8087 and 80287 only. + * + * The hardware default is 0x037f which we use. + */ + +#include + +/* masking of interrupts */ +#define _FPU_MASK_IM 0x01 +#define _FPU_MASK_DM 0x02 +#define _FPU_MASK_ZM 0x04 +#define _FPU_MASK_OM 0x08 +#define _FPU_MASK_UM 0x10 +#define _FPU_MASK_PM 0x20 + +/* precision control */ +#define _FPU_EXTENDED 0x300 /* libm requires double extended precision. */ +#define _FPU_DOUBLE 0x200 +#define _FPU_SINGLE 0x0 + +/* rounding control */ +#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */ +#define _FPU_RC_DOWN 0x400 +#define _FPU_RC_UP 0x800 +#define _FPU_RC_ZERO 0xC00 + +#define _FPU_RESERVED 0xF0C0 /* Reserved bits in cw */ + + +/* The fdlibm code requires strict IEEE double precision arithmetic, + and no interrupts for exceptions, rounding to nearest. */ + +#define _FPU_DEFAULT 0x037f + +/* IEEE: same as above. */ +#define _FPU_IEEE 0x037f + +/* Type of the control word. */ +typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__))); + +/* Macros for accessing the hardware control word. "*&" is used to + work around a bug in older versions of GCC. __volatile__ is used + to support combination of writing the control register and reading + it back. Without __volatile__, the old value may be used for reading + back under compiler optimization. + + Note that the use of these macros is not sufficient anymore with + recent hardware nor on x86-64. Some floating point operations are + executed in the SSE/SSE2 engines which have their own control and + status register. */ +#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw)) +#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw)) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* fpu_control.h */ \ No newline at end of file diff --git a/libc/glibc-include/gnu/lib-names-64.h b/libc/include/x86_64-linux-gnu/gnu/lib-names-64.h similarity index 96% rename from libc/glibc-include/gnu/lib-names-64.h rename to libc/include/x86_64-linux-gnu/gnu/lib-names-64.h index 70965dbf2f..3d707eaca3 100644 --- a/libc/glibc-include/gnu/lib-names-64.h +++ b/libc/include/x86_64-linux-gnu/gnu/lib-names-64.h @@ -28,4 +28,4 @@ #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" +#define LIBUTIL_SO "libutil.so.1" \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/gnu/lib-names.h b/libc/include/x86_64-linux-gnu/gnu/lib-names.h new file mode 100644 index 0000000000..aafc03bf7e --- /dev/null +++ b/libc/include/x86_64-linux-gnu/gnu/lib-names.h @@ -0,0 +1,17 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#if !defined __x86_64__ +# include +#endif +#if defined __x86_64__ && defined __LP64__ +# include +#endif +#if defined __x86_64__ && defined __ILP32__ +# include +#endif + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/glibc-include/gnu/stubs-64.h b/libc/include/x86_64-linux-gnu/gnu/stubs-64.h similarity index 96% rename from libc/glibc-include/gnu/stubs-64.h rename to libc/include/x86_64-linux-gnu/gnu/stubs-64.h index 477c8e4931..e3f5d47f5f 100644 --- a/libc/glibc-include/gnu/stubs-64.h +++ b/libc/include/x86_64-linux-gnu/gnu/stubs-64.h @@ -20,4 +20,4 @@ #define __stub_setlogin #define __stub_sigreturn #define __stub_sstk -#define __stub_stty +#define __stub_stty \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/gnu/stubs.h b/libc/include/x86_64-linux-gnu/gnu/stubs.h new file mode 100644 index 0000000000..a4c9b5f097 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/gnu/stubs.h @@ -0,0 +1,14 @@ +/* This file is automatically generated. + This file selects the right generated file of `__stub_FUNCTION' macros + based on the architecture being compiled for. */ + + +#if !defined __x86_64__ +# include +#endif +#if defined __x86_64__ && defined __LP64__ +# include +#endif +#if defined __x86_64__ && defined __ILP32__ +# include +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/sys/elf.h b/libc/include/x86_64-linux-gnu/sys/elf.h new file mode 100644 index 0000000000..d8c2c7acc8 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/sys/elf.h @@ -0,0 +1,29 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_ELF_H +#define _SYS_ELF_H 1 + +#ifdef __x86_64__ +# error This header is unsupported on x86-64. +#else +# warning "This header is obsolete; use instead." + +# include +#endif + +#endif /* _SYS_ELF_H */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/sys/io.h b/libc/include/x86_64-linux-gnu/sys/io.h new file mode 100644 index 0000000000..c27e96f4af --- /dev/null +++ b/libc/include/x86_64-linux-gnu/sys/io.h @@ -0,0 +1,183 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IO_H +#define _SYS_IO_H 1 + +#include + +__BEGIN_DECLS + +/* If TURN_ON is TRUE, request for permission to do direct i/o on the + port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O + permission off for that range. This call requires root privileges. + + Portability note: not all Linux platforms support this call. Most + platforms based on the PC I/O architecture probably will, however. + E.g., Linux/Alpha for Alpha PCs supports this. */ +extern int ioperm (unsigned long int __from, unsigned long int __num, + int __turn_on) __THROW; + +/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to + access any I/O port is granted. This call requires root + privileges. */ +extern int iopl (int __level) __THROW; + +#if defined __GNUC__ && __GNUC__ >= 2 + +static __inline unsigned char +inb (unsigned short int __port) +{ + unsigned char _v; + + __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port)); + return _v; +} + +static __inline unsigned char +inb_p (unsigned short int __port) +{ + unsigned char _v; + + __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port)); + return _v; +} + +static __inline unsigned short int +inw (unsigned short int __port) +{ + unsigned short _v; + + __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (__port)); + return _v; +} + +static __inline unsigned short int +inw_p (unsigned short int __port) +{ + unsigned short int _v; + + __asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port)); + return _v; +} + +static __inline unsigned int +inl (unsigned short int __port) +{ + unsigned int _v; + + __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (__port)); + return _v; +} + +static __inline unsigned int +inl_p (unsigned short int __port) +{ + unsigned int _v; + __asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port)); + return _v; +} + +static __inline void +outb (unsigned char __value, unsigned short int __port) +{ + __asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port)); +} + +static __inline void +outb_p (unsigned char __value, unsigned short int __port) +{ + __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value), + "Nd" (__port)); +} + +static __inline void +outw (unsigned short int __value, unsigned short int __port) +{ + __asm__ __volatile__ ("outw %w0,%w1": :"a" (__value), "Nd" (__port)); + +} + +static __inline void +outw_p (unsigned short int __value, unsigned short int __port) +{ + __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (__value), + "Nd" (__port)); +} + +static __inline void +outl (unsigned int __value, unsigned short int __port) +{ + __asm__ __volatile__ ("outl %0,%w1": :"a" (__value), "Nd" (__port)); +} + +static __inline void +outl_p (unsigned int __value, unsigned short int __port) +{ + __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (__value), + "Nd" (__port)); +} + +static __inline void +insb (unsigned short int __port, void *__addr, unsigned long int __count) +{ + __asm__ __volatile__ ("cld ; rep ; insb":"=D" (__addr), "=c" (__count) + :"d" (__port), "0" (__addr), "1" (__count)); +} + +static __inline void +insw (unsigned short int __port, void *__addr, unsigned long int __count) +{ + __asm__ __volatile__ ("cld ; rep ; insw":"=D" (__addr), "=c" (__count) + :"d" (__port), "0" (__addr), "1" (__count)); +} + +static __inline void +insl (unsigned short int __port, void *__addr, unsigned long int __count) +{ + __asm__ __volatile__ ("cld ; rep ; insl":"=D" (__addr), "=c" (__count) + :"d" (__port), "0" (__addr), "1" (__count)); +} + +static __inline void +outsb (unsigned short int __port, const void *__addr, + unsigned long int __count) +{ + __asm__ __volatile__ ("cld ; rep ; outsb":"=S" (__addr), "=c" (__count) + :"d" (__port), "0" (__addr), "1" (__count)); +} + +static __inline void +outsw (unsigned short int __port, const void *__addr, + unsigned long int __count) +{ + __asm__ __volatile__ ("cld ; rep ; outsw":"=S" (__addr), "=c" (__count) + :"d" (__port), "0" (__addr), "1" (__count)); +} + +static __inline void +outsl (unsigned short int __port, const void *__addr, + unsigned long int __count) +{ + __asm__ __volatile__ ("cld ; rep ; outsl":"=S" (__addr), "=c" (__count) + :"d" (__port), "0" (__addr), "1" (__count)); +} + +#endif /* GNU C */ + +__END_DECLS +#endif /* _SYS_IO_H */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/sys/ptrace.h b/libc/include/x86_64-linux-gnu/sys/ptrace.h new file mode 100644 index 0000000000..1f6c5b50fd --- /dev/null +++ b/libc/include/x86_64-linux-gnu/sys/ptrace.h @@ -0,0 +1,198 @@ +/* `ptrace' debugger support interface. Linux/x86 version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include +#include + +__BEGIN_DECLS + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Get all general purpose registers used by a processes. */ + PTRACE_GETREGS = 12, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a processes. */ + PTRACE_SETREGS = 13, +#define PT_SETREGS PTRACE_SETREGS + + /* Get all floating point registers used by a processes. */ + PTRACE_GETFPREGS = 14, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a processes. */ + PTRACE_SETFPREGS = 15, +#define PT_SETFPREGS PTRACE_SETFPREGS + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Get all extended floating point registers used by a processes. */ + PTRACE_GETFPXREGS = 18, +#define PT_GETFPXREGS PTRACE_GETFPXREGS + + /* Set all extended floating point registers used by a processes. */ + PTRACE_SETFPXREGS = 19, +#define PT_SETFPXREGS PTRACE_SETFPXREGS + + /* Continue and stop at the next entry to or return from syscall. */ + PTRACE_SYSCALL = 24, +#define PT_SYSCALL PTRACE_SYSCALL + + /* Get a TLS entry in the GDT. */ + PTRACE_GET_THREAD_AREA = 25, +#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA + + /* Change a TLS entry in the GDT. */ + PTRACE_SET_THREAD_AREA = 26, +#define PT_SET_THREAD_AREA PTRACE_SET_THREAD_AREA + +#ifdef __x86_64__ + /* Access TLS data. */ + PTRACE_ARCH_PRCTL = 30, +# define PT_ARCH_PRCTL PTRACE_ARCH_PRCTL +#endif + + /* Continue and stop at the next syscall, it will not be executed. */ + PTRACE_SYSEMU = 31, +#define PT_SYSEMU PTRACE_SYSEMU + + /* Single step the process, the next syscall will not be executed. */ + PTRACE_SYSEMU_SINGLESTEP = 32, +#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP + + /* Execute process until next taken branch. */ + PTRACE_SINGLEBLOCK = 33, +#define PT_STEPBLOCK PTRACE_SINGLEBLOCK + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + /* Retrieve siginfo_t structures without removing signals from a queue. */ + PTRACE_PEEKSIGINFO = 0x4209, +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO + + /* Get the mask of blocked signals. */ + PTRACE_GETSIGMASK = 0x420a, +#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK + + /* Change the mask of blocked signals. */ + PTRACE_SETSIGMASK = 0x420b, +#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK + + /* Get seccomp BPF filters. */ + PTRACE_SECCOMP_GET_FILTER = 0x420c, +#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER + + /* Get seccomp BPF filter metadata. */ + PTRACE_SECCOMP_GET_METADATA = 0x420d +#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA +}; + + +#include + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/sys/ucontext.h b/libc/include/x86_64-linux-gnu/sys/ucontext.h new file mode 100644 index 0000000000..2127a222a9 --- /dev/null +++ b/libc/include/x86_64-linux-gnu/sys/ucontext.h @@ -0,0 +1,262 @@ +/* Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include +#include + + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + +#ifdef __x86_64__ + +/* Type for general register. */ +__extension__ typedef long long int greg_t; + +/* Number of general registers. */ +#define __NGREG 23 +#ifdef __USE_MISC +# define NGREG __NGREG +#endif + +/* Container for all general registers. */ +typedef greg_t gregset_t[__NGREG]; + +#ifdef __USE_GNU +/* Number of each register in the `gregset_t' array. */ +enum +{ + REG_R8 = 0, +# define REG_R8 REG_R8 + REG_R9, +# define REG_R9 REG_R9 + REG_R10, +# define REG_R10 REG_R10 + REG_R11, +# define REG_R11 REG_R11 + REG_R12, +# define REG_R12 REG_R12 + REG_R13, +# define REG_R13 REG_R13 + REG_R14, +# define REG_R14 REG_R14 + REG_R15, +# define REG_R15 REG_R15 + REG_RDI, +# define REG_RDI REG_RDI + REG_RSI, +# define REG_RSI REG_RSI + REG_RBP, +# define REG_RBP REG_RBP + REG_RBX, +# define REG_RBX REG_RBX + REG_RDX, +# define REG_RDX REG_RDX + REG_RAX, +# define REG_RAX REG_RAX + REG_RCX, +# define REG_RCX REG_RCX + REG_RSP, +# define REG_RSP REG_RSP + REG_RIP, +# define REG_RIP REG_RIP + REG_EFL, +# define REG_EFL REG_EFL + REG_CSGSFS, /* Actually short cs, gs, fs, __pad0. */ +# define REG_CSGSFS REG_CSGSFS + REG_ERR, +# define REG_ERR REG_ERR + REG_TRAPNO, +# define REG_TRAPNO REG_TRAPNO + REG_OLDMASK, +# define REG_OLDMASK REG_OLDMASK + REG_CR2 +# define REG_CR2 REG_CR2 +}; +#endif + +struct _libc_fpxreg +{ + unsigned short int __ctx(significand)[4]; + unsigned short int __ctx(exponent); + unsigned short int __glibc_reserved1[3]; +}; + +struct _libc_xmmreg +{ + __uint32_t __ctx(element)[4]; +}; + +struct _libc_fpstate +{ + /* 64-bit FXSAVE format. */ + __uint16_t __ctx(cwd); + __uint16_t __ctx(swd); + __uint16_t __ctx(ftw); + __uint16_t __ctx(fop); + __uint64_t __ctx(rip); + __uint64_t __ctx(rdp); + __uint32_t __ctx(mxcsr); + __uint32_t __ctx(mxcr_mask); + struct _libc_fpxreg _st[8]; + struct _libc_xmmreg _xmm[16]; + __uint32_t __glibc_reserved1[24]; +}; + +/* Structure to describe FPU registers. */ +typedef struct _libc_fpstate *fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct + { + gregset_t __ctx(gregs); + /* Note that fpregs is a pointer. */ + fpregset_t __ctx(fpregs); + __extension__ unsigned long long __reserved1 [8]; +} mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long int __ctx(uc_flags); + struct ucontext_t *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; + struct _libc_fpstate __fpregs_mem; + __extension__ unsigned long long int __ssp[4]; + } ucontext_t; + +#else /* !__x86_64__ */ + +/* Type for general register. */ +typedef int greg_t; + +/* Number of general registers. */ +#define __NGREG 19 +#ifdef __USE_MISC +# define NGREG __NGREG +#endif + +/* Container for all general registers. */ +typedef greg_t gregset_t[__NGREG]; + +#ifdef __USE_GNU +/* Number of each register is the `gregset_t' array. */ +enum +{ + REG_GS = 0, +# define REG_GS REG_GS + REG_FS, +# define REG_FS REG_FS + REG_ES, +# define REG_ES REG_ES + REG_DS, +# define REG_DS REG_DS + REG_EDI, +# define REG_EDI REG_EDI + REG_ESI, +# define REG_ESI REG_ESI + REG_EBP, +# define REG_EBP REG_EBP + REG_ESP, +# define REG_ESP REG_ESP + REG_EBX, +# define REG_EBX REG_EBX + REG_EDX, +# define REG_EDX REG_EDX + REG_ECX, +# define REG_ECX REG_ECX + REG_EAX, +# define REG_EAX REG_EAX + REG_TRAPNO, +# define REG_TRAPNO REG_TRAPNO + REG_ERR, +# define REG_ERR REG_ERR + REG_EIP, +# define REG_EIP REG_EIP + REG_CS, +# define REG_CS REG_CS + REG_EFL, +# define REG_EFL REG_EFL + REG_UESP, +# define REG_UESP REG_UESP + REG_SS +# define REG_SS REG_SS +}; +#endif + +/* Definitions taken from the kernel headers. */ +struct _libc_fpreg +{ + unsigned short int __ctx(significand)[4]; + unsigned short int __ctx(exponent); +}; + +struct _libc_fpstate +{ + unsigned long int __ctx(cw); + unsigned long int __ctx(sw); + unsigned long int __ctx(tag); + unsigned long int __ctx(ipoff); + unsigned long int __ctx(cssel); + unsigned long int __ctx(dataoff); + unsigned long int __ctx(datasel); + struct _libc_fpreg _st[8]; + unsigned long int __ctx(status); +}; + +/* Structure to describe FPU registers. */ +typedef struct _libc_fpstate *fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct + { + gregset_t __ctx(gregs); + /* Due to Linux's history we have to use a pointer here. The SysV/i386 + ABI requires a struct with the values. */ + fpregset_t __ctx(fpregs); + unsigned long int __ctx(oldmask); + unsigned long int __ctx(cr2); + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long int __ctx(uc_flags); + struct ucontext_t *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; + struct _libc_fpstate __fpregs_mem; + unsigned long int __ssp[4]; + } ucontext_t; + +#endif /* !__x86_64__ */ + +#undef __ctx + +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnu/sys/user.h b/libc/include/x86_64-linux-gnu/sys/user.h new file mode 100644 index 0000000000..74bd6e393a --- /dev/null +++ b/libc/include/x86_64-linux-gnu/sys/user.h @@ -0,0 +1,180 @@ +/* Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H +#define _SYS_USER_H 1 + +/* The whole purpose of this file is for GDB and GDB only. Don't read + too much into it. Don't use it for anything other than GDB unless + you know what you are doing. */ + +#ifdef __x86_64__ + +struct user_fpregs_struct +{ + unsigned short int cwd; + unsigned short int swd; + unsigned short int ftw; + unsigned short int fop; + __extension__ unsigned long long int rip; + __extension__ unsigned long long int rdp; + unsigned int mxcsr; + unsigned int mxcr_mask; + unsigned int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */ + unsigned int xmm_space[64]; /* 16*16 bytes for each XMM-reg = 256 bytes */ + unsigned int padding[24]; +}; + +struct user_regs_struct +{ + __extension__ unsigned long long int r15; + __extension__ unsigned long long int r14; + __extension__ unsigned long long int r13; + __extension__ unsigned long long int r12; + __extension__ unsigned long long int rbp; + __extension__ unsigned long long int rbx; + __extension__ unsigned long long int r11; + __extension__ unsigned long long int r10; + __extension__ unsigned long long int r9; + __extension__ unsigned long long int r8; + __extension__ unsigned long long int rax; + __extension__ unsigned long long int rcx; + __extension__ unsigned long long int rdx; + __extension__ unsigned long long int rsi; + __extension__ unsigned long long int rdi; + __extension__ unsigned long long int orig_rax; + __extension__ unsigned long long int rip; + __extension__ unsigned long long int cs; + __extension__ unsigned long long int eflags; + __extension__ unsigned long long int rsp; + __extension__ unsigned long long int ss; + __extension__ unsigned long long int fs_base; + __extension__ unsigned long long int gs_base; + __extension__ unsigned long long int ds; + __extension__ unsigned long long int es; + __extension__ unsigned long long int fs; + __extension__ unsigned long long int gs; +}; + +struct user +{ + struct user_regs_struct regs; + int u_fpvalid; + struct user_fpregs_struct i387; + __extension__ unsigned long long int u_tsize; + __extension__ unsigned long long int u_dsize; + __extension__ unsigned long long int u_ssize; + __extension__ unsigned long long int start_code; + __extension__ unsigned long long int start_stack; + __extension__ long long int signal; + int reserved; + __extension__ union + { + struct user_regs_struct* u_ar0; + __extension__ unsigned long long int __u_ar0_word; + }; + __extension__ union + { + struct user_fpregs_struct* u_fpstate; + __extension__ unsigned long long int __u_fpstate_word; + }; + __extension__ unsigned long long int magic; + char u_comm [32]; + __extension__ unsigned long long int u_debugreg [8]; +}; + +#else +/* These are the 32-bit x86 structures. */ +struct user_fpregs_struct +{ + long int cwd; + long int swd; + long int twd; + long int fip; + long int fcs; + long int foo; + long int fos; + long int st_space [20]; +}; + +struct user_fpxregs_struct +{ + unsigned short int cwd; + unsigned short int swd; + unsigned short int twd; + unsigned short int fop; + long int fip; + long int fcs; + long int foo; + long int fos; + long int mxcsr; + long int reserved; + long int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */ + long int xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */ + long int padding[56]; +}; + +struct user_regs_struct +{ + long int ebx; + long int ecx; + long int edx; + long int esi; + long int edi; + long int ebp; + long int eax; + long int xds; + long int xes; + long int xfs; + long int xgs; + long int orig_eax; + long int eip; + long int xcs; + long int eflags; + long int esp; + long int xss; +}; + +struct user +{ + struct user_regs_struct regs; + int u_fpvalid; + struct user_fpregs_struct i387; + unsigned long int u_tsize; + unsigned long int u_dsize; + unsigned long int u_ssize; + unsigned long int start_code; + unsigned long int start_stack; + long int signal; + int reserved; + struct user_regs_struct* u_ar0; + struct user_fpregs_struct* u_fpstate; + unsigned long int magic; + char u_comm [32]; + int u_debugreg [8]; +}; +#endif /* __x86_64__ */ + +#define PAGE_SHIFT 12 +#define PAGE_SIZE (1UL << PAGE_SHIFT) +#define PAGE_MASK (~(PAGE_SIZE-1)) +#define NBPG PAGE_SIZE +#define UPAGES 1 +#define HOST_TEXT_START_ADDR (u.start_code) +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) + +#endif /* _SYS_USER_H */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/a.out.h b/libc/include/x86_64-linux-gnux32/bits/a.out.h new file mode 100644 index 0000000000..3c81a52dbb --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/a.out.h @@ -0,0 +1,11 @@ +#ifndef __A_OUT_GNU_H__ +# error "Never use directly; include instead." +#endif + +#ifdef __x86_64__ + +/* Signal to users of this header that this architecture really doesn't + support a.out binary format. */ +#define __NO_A_OUT_SUPPORT 1 + +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/endian.h b/libc/include/x86_64-linux-gnux32/bits/endian.h new file mode 100644 index 0000000000..35c898d0ec --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/endian.h @@ -0,0 +1,7 @@ +/* i386/x86_64 are little-endian. */ + +#ifndef _ENDIAN_H +# error "Never use directly; include instead." +#endif + +#define __BYTE_ORDER __LITTLE_ENDIAN \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/environments.h b/libc/include/x86_64-linux-gnux32/bits/environments.h new file mode 100644 index 0000000000..76f12fe085 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/environments.h @@ -0,0 +1,105 @@ +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _UNISTD_H +# error "Never include this file directly. Use instead" +#endif + +#include + +/* This header should define the following symbols under the described + situations. A value `1' means that the model is always supported, + `-1' means it is never supported. Undefined means it cannot be + statically decided. + + _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type + _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type + + _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type + _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type + + The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, + _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, + _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were + used in previous versions of the Unix standard and are available + only for compatibility. +*/ + +#if __WORDSIZE == 64 + +/* Environments with 32-bit wide pointers are optionally provided. + Therefore following macros aren't defined: + # undef _POSIX_V7_ILP32_OFF32 + # undef _POSIX_V7_ILP32_OFFBIG + # undef _POSIX_V6_ILP32_OFF32 + # undef _POSIX_V6_ILP32_OFFBIG + # undef _XBS5_ILP32_OFF32 + # undef _XBS5_ILP32_OFFBIG + and users need to check at runtime. */ + +/* We also have no use (for now) for an environment with bigger pointers + and offsets. */ +# define _POSIX_V7_LPBIG_OFFBIG -1 +# define _POSIX_V6_LPBIG_OFFBIG -1 +# define _XBS5_LPBIG_OFFBIG -1 + +/* By default we have 64-bit wide `long int', pointers and `off_t'. */ +# define _POSIX_V7_LP64_OFF64 1 +# define _POSIX_V6_LP64_OFF64 1 +# define _XBS5_LP64_OFF64 1 + +#else /* __WORDSIZE == 32 */ + +/* We have 32-bit wide `int', `long int' and pointers and all platforms + support LFS. -mx32 has 64-bit wide `off_t'. */ +# define _POSIX_V7_ILP32_OFFBIG 1 +# define _POSIX_V6_ILP32_OFFBIG 1 +# define _XBS5_ILP32_OFFBIG 1 + +# ifndef __x86_64__ +/* -m32 has 32-bit wide `off_t'. */ +# define _POSIX_V7_ILP32_OFF32 1 +# define _POSIX_V6_ILP32_OFF32 1 +# define _XBS5_ILP32_OFF32 1 +# endif + +/* We optionally provide an environment with the above size but an 64-bit + side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ + +/* Environments with 64-bit wide pointers can be provided, + so these macros aren't defined: + # undef _POSIX_V7_LP64_OFF64 + # undef _POSIX_V7_LPBIG_OFFBIG + # undef _POSIX_V6_LP64_OFF64 + # undef _POSIX_V6_LPBIG_OFFBIG + # undef _XBS5_LP64_OFF64 + # undef _XBS5_LPBIG_OFFBIG + and sysconf tests for it at runtime. */ + +#endif /* __WORDSIZE == 32 */ + +#define __ILP32_OFF32_CFLAGS "-m32" +#define __ILP32_OFF32_LDFLAGS "-m32" +#if defined __x86_64__ && defined __ILP32__ +# define __ILP32_OFFBIG_CFLAGS "-mx32" +# define __ILP32_OFFBIG_LDFLAGS "-mx32" +#else +# define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +# define __ILP32_OFFBIG_LDFLAGS "-m32" +#endif +#define __LP64_OFF64_CFLAGS "-m64" +#define __LP64_OFF64_LDFLAGS "-m64" \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/epoll.h b/libc/include/x86_64-linux-gnux32/bits/epoll.h new file mode 100644 index 0000000000..205d42ad63 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/epoll.h @@ -0,0 +1,29 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_EPOLL_H +# error "Never use directly; include instead." +#endif + +/* Flags to be passed to epoll_create1. */ +enum + { + EPOLL_CLOEXEC = 02000000 +#define EPOLL_CLOEXEC EPOLL_CLOEXEC + }; + +#define __EPOLL_PACKED __attribute__ ((__packed__)) \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/fcntl.h b/libc/include/x86_64-linux-gnux32/bits/fcntl.h new file mode 100644 index 0000000000..d3229a6782 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/fcntl.h @@ -0,0 +1,61 @@ +/* O_*, F_*, FD_* bit values for Linux/x86. + Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FCNTL_H +# error "Never use directly; include instead." +#endif + +#ifdef __x86_64__ +# define __O_LARGEFILE 0 +#endif + +#ifdef __x86_64__ +/* Not necessary, we always have 64-bit offsets. */ +# define F_GETLK64 5 /* Get record locking info. */ +# define F_SETLK64 6 /* Set record locking info (non-blocking). */ +# define F_SETLKW64 7 /* Set record locking info (blocking). */ +#endif + + +struct flock + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ +#ifndef __USE_FILE_OFFSET64 + __off_t l_start; /* Offset where the lock begins. */ + __off_t l_len; /* Size of the locked area; zero means until EOF. */ +#else + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ +#endif + __pid_t l_pid; /* Process holding the lock. */ + }; + +#ifdef __USE_LARGEFILE64 +struct flock64 + { + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ + __off64_t l_start; /* Offset where the lock begins. */ + __off64_t l_len; /* Size of the locked area; zero means until EOF. */ + __pid_t l_pid; /* Process holding the lock. */ + }; +#endif + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/fenv.h b/libc/include/x86_64-linux-gnux32/bits/fenv.h new file mode 100644 index 0000000000..74151486b4 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/fenv.h @@ -0,0 +1,170 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FENV_H +# error "Never use directly; include instead." +#endif + +/* Define bits representing the exception. We use the bit positions + of the appropriate bits in the FPU control word. */ +enum + { + FE_INVALID = +#define FE_INVALID 0x01 + FE_INVALID, + __FE_DENORM = 0x02, + FE_DIVBYZERO = +#define FE_DIVBYZERO 0x04 + FE_DIVBYZERO, + FE_OVERFLOW = +#define FE_OVERFLOW 0x08 + FE_OVERFLOW, + FE_UNDERFLOW = +#define FE_UNDERFLOW 0x10 + FE_UNDERFLOW, + FE_INEXACT = +#define FE_INEXACT 0x20 + FE_INEXACT + }; + +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) + +/* The ix87 FPU supports all of the four defined rounding modes. We + use again the bit positions in the FPU control word as the values + for the appropriate macros. */ +enum + { + FE_TONEAREST = +#define FE_TONEAREST 0 + FE_TONEAREST, + FE_DOWNWARD = +#define FE_DOWNWARD 0x400 + FE_DOWNWARD, + FE_UPWARD = +#define FE_UPWARD 0x800 + FE_UPWARD, + FE_TOWARDZERO = +#define FE_TOWARDZERO 0xc00 + FE_TOWARDZERO + }; + + +/* Type representing exception flags. */ +typedef unsigned short int fexcept_t; + + +/* Type representing floating-point environment. This structure + corresponds to the layout of the block written by the `fstenv' + instruction and has additional fields for the contents of the MXCSR + register as written by the `stmxcsr' instruction. */ +typedef struct + { + unsigned short int __control_word; + unsigned short int __glibc_reserved1; + unsigned short int __status_word; + unsigned short int __glibc_reserved2; + unsigned short int __tags; + unsigned short int __glibc_reserved3; + unsigned int __eip; + unsigned short int __cs_selector; + unsigned int __opcode:11; + unsigned int __glibc_reserved4:5; + unsigned int __data_offset; + unsigned short int __data_selector; + unsigned short int __glibc_reserved5; +#ifdef __x86_64__ + unsigned int __mxcsr; +#endif + } +fenv_t; + +/* If the default argument is used we use this value. */ +#define FE_DFL_ENV ((const fenv_t *) -1) + +#ifdef __USE_GNU +/* Floating-point environment where none of the exception is masked. */ +# define FE_NOMASK_ENV ((const fenv_t *) -2) +#endif + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef struct + { + unsigned short int __control_word; + unsigned short int __glibc_reserved; + unsigned int __mxcsr; + } +femode_t; + +/* Default floating-point control modes. */ +# define FE_DFL_MODE ((const femode_t *) -1L) +#endif + + +#ifdef __USE_EXTERN_INLINES +__BEGIN_DECLS + +/* Optimized versions. */ +#ifndef _LIBC +extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), feraiseexcept); +#endif +__extern_always_inline void +__NTH (__feraiseexcept_invalid_divbyzero (int __excepts)) +{ + if ((FE_INVALID & __excepts) != 0) + { + /* One example of an invalid operation is 0.0 / 0.0. */ + float __f = 0.0; + +# ifdef __SSE_MATH__ + __asm__ __volatile__ ("divss %0, %0 " : : "x" (__f)); +# else + __asm__ __volatile__ ("fdiv %%st, %%st(0); fwait" + : "=t" (__f) : "0" (__f)); +# endif + (void) &__f; + } + if ((FE_DIVBYZERO & __excepts) != 0) + { + float __f = 1.0; + float __g = 0.0; + +# ifdef __SSE_MATH__ + __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g)); +# else + __asm__ __volatile__ ("fdivp %%st, %%st(1); fwait" + : "=t" (__f) : "0" (__f), "u" (__g) : "st(1)"); +# endif + (void) &__f; + } +} +__extern_inline int +__NTH (feraiseexcept (int __excepts)) +{ + if (__builtin_constant_p (__excepts) + && (__excepts & ~(FE_INVALID | FE_DIVBYZERO)) == 0) + { + __feraiseexcept_invalid_divbyzero (__excepts); + return 0; + } + + return __feraiseexcept_renamed (__excepts); +} + +__END_DECLS +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/floatn.h b/libc/include/x86_64-linux-gnux32/bits/floatn.h new file mode 100644 index 0000000000..1d7ba69ea8 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/floatn.h @@ -0,0 +1,121 @@ +/* Macros to control TS 18661-3 glibc features on x86. + Copyright (C) 2017-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +/* 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. The required + libgcc support was added some time after the basic compiler + support, for x86_64 and x86. */ +#if (defined __x86_64__ \ + ? __GNUC_PREREQ (4, 3) \ + : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4))) +# define __HAVE_FLOAT128 1 +#else +# 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. */ +#if __HAVE_FLOAT128 +# define __HAVE_DISTINCT_FLOAT128 1 +#else +# define __HAVE_DISTINCT_FLOAT128 0 +#endif + +/* Defined to 1 if the current compiler invocation provides a + floating-point type with the right format for _Float64x, and this + glibc includes corresponding *f64x interfaces for it. */ +#define __HAVE_FLOAT64X 1 + +/* 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 1 + +#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##q +# 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 +/* Add a typedef for older GCC compilers which don't natively support + _Complex _Float128. */ +typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__))); +# define __CFLOAT128 __cfloat128 +# 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 __float128 _Float128; +# endif + +/* __builtin_huge_valf128 doesn't exist before GCC 7.0. */ +# if !__GNUC_PREREQ (7, 0) +# define __builtin_huge_valf128() ((_Float128) __builtin_huge_val ()) +# endif + +/* Older GCC has only a subset of built-in functions for _Float128 on + x86, and __builtin_infq is not usable in static initializers. + Converting a narrower sNaN to _Float128 produces a quiet NaN, so + attempts to use _Float128 sNaNs will not work properly with older + compilers. */ +# if !__GNUC_PREREQ (7, 0) +# define __builtin_copysignf128 __builtin_copysignq +# define __builtin_fabsf128 __builtin_fabsq +# define __builtin_inff128() ((_Float128) __builtin_inf ()) +# define __builtin_nanf128(x) ((_Float128) __builtin_nan (x)) +# define __builtin_nansf128(x) ((_Float128) __builtin_nans (x)) +# endif + +/* In math/math.h, __MATH_TG will expand signbit to __builtin_signbit*, + e.g.: __builtin_signbitf128, before GCC 6. However, there has never + been a __builtin_signbitf128 in GCC and the type-generic builtin is + only available since GCC 6. */ +# if !__GNUC_PREREQ (6, 0) +# define __builtin_signbitf128 __signbitf128 +# endif + +# endif + +#endif /* !__ASSEMBLER__. */ + +#include + +#endif /* _BITS_FLOATN_H */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/flt-eval-method.h b/libc/include/x86_64-linux-gnux32/bits/flt-eval-method.h new file mode 100644 index 0000000000..87e06c4354 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/flt-eval-method.h @@ -0,0 +1,33 @@ +/* Define __GLIBC_FLT_EVAL_METHOD. x86 version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +#ifdef __FLT_EVAL_METHOD__ +# if __FLT_EVAL_METHOD__ == -1 +# define __GLIBC_FLT_EVAL_METHOD 2 +# else +# define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__ +# endif +#elif defined __x86_64__ +# define __GLIBC_FLT_EVAL_METHOD 0 +#else +# define __GLIBC_FLT_EVAL_METHOD 2 +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/fp-logb.h b/libc/include/x86_64-linux-gnux32/bits/fp-logb.h new file mode 100644 index 0000000000..f3e55ea50c --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/fp-logb.h @@ -0,0 +1,24 @@ +/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. x86 version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +#define __FP_LOGB0_IS_MIN 1 +#define __FP_LOGBNAN_IS_MIN 1 \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/indirect-return.h b/libc/include/x86_64-linux-gnux32/bits/indirect-return.h new file mode 100644 index 0000000000..fd170e8a42 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/indirect-return.h @@ -0,0 +1,37 @@ +/* Definition of __INDIRECT_RETURN. x86 version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _UCONTEXT_H +# error "Never include directly; use instead." +#endif + +/* On x86, swapcontext returns via indirect branch when the shadow stack + is enabled. Define __INDIRECT_RETURN to indicate whether swapcontext + returns via indirect branch. */ +#if defined __CET__ && (__CET__ & 2) != 0 +# if __glibc_has_attribute (__indirect_return__) +# define __INDIRECT_RETURN __attribute__ ((__indirect_return__)) +# else +/* Newer compilers provide the indirect_return attribute, but without + it we can use returns_twice to affect the optimizer in the same + way and avoid unsafe optimizations. */ +# define __INDIRECT_RETURN __attribute__ ((__returns_twice__)) +# endif +#else +# define __INDIRECT_RETURN +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/ipctypes.h b/libc/include/x86_64-linux-gnux32/bits/ipctypes.h new file mode 100644 index 0000000000..2b471d1e52 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/ipctypes.h @@ -0,0 +1,33 @@ +/* bits/ipctypes.h -- Define some types used by SysV IPC/MSG/SHM. + Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IPC_H +# error "Never use directly; include instead." +#endif + +#ifndef _BITS_IPCTYPES_H +#define _BITS_IPCTYPES_H 1 + +/* Used in `struct shmid_ds'. */ +# ifdef __x86_64__ +typedef int __ipc_pid_t; +# else +typedef unsigned short int __ipc_pid_t; +# endif + +#endif /* bits/ipctypes.h */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/iscanonical.h b/libc/include/x86_64-linux-gnux32/bits/iscanonical.h new file mode 100644 index 0000000000..1fa01edaad --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/iscanonical.h @@ -0,0 +1,54 @@ +/* Define iscanonical macro. ldbl-96 version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never use directly; include instead." +#endif + +extern int __iscanonicall (long double __x) + __THROW __attribute__ ((__const__)); +#define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1) +#define __iscanonical(x) ((void) (__typeof (x)) (x), 1) +#if __HAVE_DISTINCT_FLOAT128 +# define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1) +#endif + +/* Return nonzero value if X is canonical. In IEEE interchange binary + formats, all values are canonical, but the argument must still be + converted to its semantic type for any exceptions arising from the + conversion, before being discarded; in extended precision, there + are encodings that are not consistently handled as corresponding to + any particular value of the type, and we return 0 for those. */ +#ifndef __cplusplus +# define iscanonical(x) __MATH_TG ((x), __iscanonical, (x)) +#else +/* In C++ mode, __MATH_TG cannot be used, because it relies on + __builtin_types_compatible_p, which is a C-only builtin. On the + other hand, overloading provides the means to distinguish between + the floating-point types. The overloading resolution will match + the correct parameter (regardless of type qualifiers (i.e.: const + and volatile)). */ +extern "C++" { +inline int iscanonical (float __val) { return __iscanonicalf (__val); } +inline int iscanonical (double __val) { return __iscanonical (__val); } +inline int iscanonical (long double __val) { return __iscanonicall (__val); } +# if __HAVE_DISTINCT_FLOAT128 +inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); } +# endif +} +#endif /* __cplusplus */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/link.h b/libc/include/x86_64-linux-gnux32/bits/link.h new file mode 100644 index 0000000000..2724980f6b --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/link.h @@ -0,0 +1,159 @@ +/* Copyright (C) 2004-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _LINK_H +# error "Never include directly; use instead." +#endif + + +#ifndef __x86_64__ +/* Registers for entry into PLT on IA-32. */ +typedef struct La_i86_regs +{ + uint32_t lr_edx; + uint32_t lr_ecx; + uint32_t lr_eax; + uint32_t lr_ebp; + uint32_t lr_esp; +} La_i86_regs; + +/* Return values for calls from PLT on IA-32. */ +typedef struct La_i86_retval +{ + uint32_t lrv_eax; + uint32_t lrv_edx; + long double lrv_st0; + long double lrv_st1; + uint64_t lrv_bnd0; + uint64_t lrv_bnd1; +} La_i86_retval; + + +__BEGIN_DECLS + +extern Elf32_Addr la_i86_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_i86_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_i86_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_i86_regs *__inregs, + La_i86_retval *__outregs, + const char *symname); + +__END_DECLS + +#else + +/* Registers for entry into PLT on x86-64. */ +# if __GNUC_PREREQ (4,0) +typedef float La_x86_64_xmm __attribute__ ((__vector_size__ (16))); +typedef float La_x86_64_ymm + __attribute__ ((__vector_size__ (32), __aligned__ (16))); +typedef double La_x86_64_zmm + __attribute__ ((__vector_size__ (64), __aligned__ (16))); +# else +typedef float La_x86_64_xmm __attribute__ ((__mode__ (__V4SF__))); +# endif + +typedef union +{ +# if __GNUC_PREREQ (4,0) + La_x86_64_ymm ymm[2]; + La_x86_64_zmm zmm[1]; +# endif + La_x86_64_xmm xmm[4]; +} La_x86_64_vector __attribute__ ((__aligned__ (16))); + +typedef struct La_x86_64_regs +{ + uint64_t lr_rdx; + uint64_t lr_r8; + uint64_t lr_r9; + uint64_t lr_rcx; + uint64_t lr_rsi; + uint64_t lr_rdi; + uint64_t lr_rbp; + uint64_t lr_rsp; + La_x86_64_xmm lr_xmm[8]; + La_x86_64_vector lr_vector[8]; +#ifndef __ILP32__ + __int128_t lr_bnd[4]; +#endif +} La_x86_64_regs; + +/* Return values for calls from PLT on x86-64. */ +typedef struct La_x86_64_retval +{ + uint64_t lrv_rax; + uint64_t lrv_rdx; + La_x86_64_xmm lrv_xmm0; + La_x86_64_xmm lrv_xmm1; + long double lrv_st0; + long double lrv_st1; + La_x86_64_vector lrv_vector0; + La_x86_64_vector lrv_vector1; +#ifndef __ILP32__ + __int128_t lrv_bnd0; + __int128_t lrv_bnd1; +#endif +} La_x86_64_retval; + +#define La_x32_regs La_x86_64_regs +#define La_x32_retval La_x86_64_retval + +__BEGIN_DECLS + +extern Elf64_Addr la_x86_64_gnu_pltenter (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_x86_64_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_x86_64_gnu_pltexit (Elf64_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_x86_64_regs *__inregs, + La_x86_64_retval *__outregs, + const char *__symname); + +extern Elf32_Addr la_x32_gnu_pltenter (Elf32_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + La_x32_regs *__regs, + unsigned int *__flags, + const char *__symname, + long int *__framesizep); +extern unsigned int la_x32_gnu_pltexit (Elf32_Sym *__sym, + unsigned int __ndx, + uintptr_t *__refcook, + uintptr_t *__defcook, + const La_x32_regs *__inregs, + La_x32_retval *__outregs, + const char *__symname); + +__END_DECLS + +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/long-double.h b/libc/include/x86_64-linux-gnux32/bits/long-double.h new file mode 100644 index 0000000000..6a582416cf --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/long-double.h @@ -0,0 +1,20 @@ +/* Properties of long double type. ldbl-96 version. + Copyright (C) 2016-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* long double is distinct from double, so there is nothing to + define here. */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/math-vector-fortran.h b/libc/include/x86_64-linux-gnux32/bits/math-vector-fortran.h new file mode 100644 index 0000000000..fc3aa3e3b2 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/math-vector-fortran.h @@ -0,0 +1,43 @@ +! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*- +! Copyright (C) 2019 Free Software Foundation, Inc. +! This file is part of the GNU C Library. +! +! The GNU C Library is free software; you can redistribute it and/or +! modify it under the terms of the GNU Lesser General Public +! License as published by the Free Software Foundation; either +! version 2.1 of the License, or (at your option) any later version. +! +! The GNU C Library is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +! Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with the GNU C Library; if not, see +! . + +!GCC$ builtin (cos) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (cosf) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (sin) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (sinf) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (sincos) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (log) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (logf) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (exp) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (expf) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (pow) attributes simd (notinbranch) if('x86_64') +!GCC$ builtin (powf) attributes simd (notinbranch) if('x86_64') + +!GCC$ builtin (cos) attributes simd (notinbranch) if('x32') +!GCC$ builtin (cosf) attributes simd (notinbranch) if('x32') +!GCC$ builtin (sin) attributes simd (notinbranch) if('x32') +!GCC$ builtin (sinf) attributes simd (notinbranch) if('x32') +!GCC$ builtin (sincos) attributes simd (notinbranch) if('x32') +!GCC$ builtin (sincosf) attributes simd (notinbranch) if('x32') +!GCC$ builtin (log) attributes simd (notinbranch) if('x32') +!GCC$ builtin (logf) attributes simd (notinbranch) if('x32') +!GCC$ builtin (exp) attributes simd (notinbranch) if('x32') +!GCC$ builtin (expf) attributes simd (notinbranch) if('x32') +!GCC$ builtin (pow) attributes simd (notinbranch) if('x32') +!GCC$ builtin (powf) attributes simd (notinbranch) if('x32') \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/math-vector.h b/libc/include/x86_64-linux-gnux32/bits/math-vector.h new file mode 100644 index 0000000000..67e2c8aea8 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/math-vector.h @@ -0,0 +1,63 @@ +/* Platform-specific SIMD declarations of math functions. + Copyright (C) 2014-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _MATH_H +# error "Never include directly;\ + include instead." +#endif + +/* Get default empty definitions for simd declarations. */ +#include + +#if defined __x86_64__ && defined __FAST_MATH__ +# if defined _OPENMP && _OPENMP >= 201307 +/* OpenMP case. */ +# define __DECL_SIMD_x86_64 _Pragma ("omp declare simd notinbranch") +# elif __GNUC_PREREQ (6,0) +/* W/o OpenMP use GCC 6.* __attribute__ ((__simd__)). */ +# define __DECL_SIMD_x86_64 __attribute__ ((__simd__ ("notinbranch"))) +# endif + +# ifdef __DECL_SIMD_x86_64 +# undef __DECL_SIMD_cos +# define __DECL_SIMD_cos __DECL_SIMD_x86_64 +# undef __DECL_SIMD_cosf +# define __DECL_SIMD_cosf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_sin +# define __DECL_SIMD_sin __DECL_SIMD_x86_64 +# undef __DECL_SIMD_sinf +# define __DECL_SIMD_sinf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_sincos +# define __DECL_SIMD_sincos __DECL_SIMD_x86_64 +# undef __DECL_SIMD_sincosf +# define __DECL_SIMD_sincosf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_log +# define __DECL_SIMD_log __DECL_SIMD_x86_64 +# undef __DECL_SIMD_logf +# define __DECL_SIMD_logf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_exp +# define __DECL_SIMD_exp __DECL_SIMD_x86_64 +# undef __DECL_SIMD_expf +# define __DECL_SIMD_expf __DECL_SIMD_x86_64 +# undef __DECL_SIMD_pow +# define __DECL_SIMD_pow __DECL_SIMD_x86_64 +# undef __DECL_SIMD_powf +# define __DECL_SIMD_powf __DECL_SIMD_x86_64 + +# endif +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/mman.h b/libc/include/x86_64-linux-gnux32/bits/mman.h new file mode 100644 index 0000000000..90f3588b6e --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/mman.h @@ -0,0 +1,34 @@ +/* Definitions for POSIX memory map interface. Linux/x86_64 version. + Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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. */ + +/* Other flags. */ +#ifdef __USE_MISC +# define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */ +#endif + +#include + +/* Include generic Linux declarations. */ +#include \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/procfs-id.h b/libc/include/x86_64-linux-gnux32/bits/procfs-id.h new file mode 100644 index 0000000000..79f85bfd44 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/procfs-id.h @@ -0,0 +1,30 @@ +/* Types of pr_uid and pr_gid in struct elf_prpsinfo. x86 version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +#if __WORDSIZE == 32 +typedef unsigned short int __pr_uid_t; +typedef unsigned short int __pr_gid_t; +#else +typedef unsigned int __pr_uid_t; +typedef unsigned int __pr_gid_t; +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/procfs.h b/libc/include/x86_64-linux-gnux32/bits/procfs.h new file mode 100644 index 0000000000..ea3cbfe1be --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/procfs.h @@ -0,0 +1,50 @@ +/* Types for registers for sys/procfs.h. x86 version. + Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PROCFS_H +# error "Never include directly; use instead." +#endif + +/* Type for a general-purpose register. */ +#ifdef __x86_64__ +__extension__ typedef unsigned long long elf_greg_t; +#else +typedef unsigned long elf_greg_t; +#endif + +/* And the whole bunch of them. We could have used `struct + user_regs_struct' directly in the typedef, but tradition says that + the register set is an array, which does have some peculiar + semantics, so leave it that way. */ +#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t)) +typedef elf_greg_t elf_gregset_t[ELF_NGREG]; + +#ifndef __x86_64__ +/* Register set for the floating-point registers. */ +typedef struct user_fpregs_struct elf_fpregset_t; + +/* Register set for the extended floating-point registers. Includes + the Pentium III SSE registers in addition to the classic + floating-point stuff. */ +typedef struct user_fpxregs_struct elf_fpxregset_t; +#else +/* Register set for the extended floating-point registers. Includes + the Pentium III SSE registers in addition to the classic + floating-point stuff. */ +typedef struct user_fpregs_struct elf_fpregset_t; +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/pthreadtypes-arch.h b/libc/include/x86_64-linux-gnux32/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..7c5701b0b8 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/pthreadtypes-arch.h @@ -0,0 +1,106 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#ifdef __x86_64__ +# if __WORDSIZE == 64 +# define __SIZEOF_PTHREAD_MUTEX_T 40 +# 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_MUTEX_T 32 +# define __SIZEOF_PTHREAD_ATTR_T 32 +# define __SIZEOF_PTHREAD_MUTEX_T 32 +# define __SIZEOF_PTHREAD_RWLOCK_T 44 +# define __SIZEOF_PTHREAD_BARRIER_T 20 +# endif +#else +# define __SIZEOF_PTHREAD_MUTEX_T 24 +# 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 + +/* Definitions for internal mutex struct. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 1 +#ifdef __x86_64__ +# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 +# define __PTHREAD_MUTEX_USE_UNION 0 +#else +# define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 +# define __PTHREAD_MUTEX_USE_UNION 1 +#endif + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +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; +#ifdef __x86_64__ + int __cur_writer; + int __shared; + signed char __rwelision; +# ifdef __ILP32__ + unsigned char __pad1[3]; +# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0 } +# else + unsigned char __pad1[7]; +# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 } +# endif + unsigned long int __pad2; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned int __flags; +# define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1 +#else + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned char __flags; + unsigned char __shared; + signed char __rwelision; +# define __PTHREAD_RWLOCK_ELISION_EXTRA 0 + unsigned char __pad2; + int __cur_writer; +#endif +}; + +#ifndef __x86_64__ +/* Extra attributes for the cleanup functions. */ +# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1))) +#endif + +#endif /* bits/pthreadtypes.h */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/select.h b/libc/include/x86_64-linux-gnux32/bits/select.h new file mode 100644 index 0000000000..24d5067c62 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/select.h @@ -0,0 +1,63 @@ +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SELECT_H +# error "Never use directly; include instead." +#endif + +#include + + +#if defined __GNUC__ && __GNUC__ >= 2 + +# if __WORDSIZE == 64 +# define __FD_ZERO_STOS "stosq" +# else +# define __FD_ZERO_STOS "stosl" +# endif + +# define __FD_ZERO(fdsp) \ + do { \ + int __d0, __d1; \ + __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS \ + : "=c" (__d0), "=D" (__d1) \ + : "a" (0), "0" (sizeof (fd_set) \ + / sizeof (__fd_mask)), \ + "1" (&__FDS_BITS (fdsp)[0]) \ + : "memory"); \ + } while (0) + +#else /* ! GNU CC */ + +/* We don't use `memset' because this would require a prototype and + the array isn't too big. */ +# define __FD_ZERO(set) \ + do { \ + unsigned int __i; \ + fd_set *__arr = (set); \ + for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ + __FDS_BITS (__arr)[__i] = 0; \ + } while (0) + +#endif /* GNU CC */ + +#define __FD_SET(d, set) \ + ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d))) +#define __FD_CLR(d, set) \ + ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d))) +#define __FD_ISSET(d, set) \ + ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0) \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/sem-pad.h b/libc/include/x86_64-linux-gnux32/bits/sem-pad.h new file mode 100644 index 0000000000..bd8df25ace --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/sem-pad.h @@ -0,0 +1,24 @@ +/* Define where padding goes in struct semid_ds. x86 version. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SYS_SEM_H +# error "Never use directly; include instead." +#endif + +#define __SEM_PAD_AFTER_TIME 1 +#define __SEM_PAD_BEFORE_TIME 0 \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/semaphore.h b/libc/include/x86_64-linux-gnux32/bits/semaphore.h new file mode 100644 index 0000000000..c5733e31f4 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/semaphore.h @@ -0,0 +1,40 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2002. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _SEMAPHORE_H +# error "Never use directly; include instead." +#endif + +#include + +#if __WORDSIZE == 64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif + + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/setjmp.h b/libc/include/x86_64-linux-gnux32/bits/setjmp.h new file mode 100644 index 0000000000..aec176f8d2 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/setjmp.h @@ -0,0 +1,40 @@ +/* Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 the machine-dependent type `jmp_buf'. x86-64 version. */ +#ifndef _BITS_SETJMP_H +#define _BITS_SETJMP_H 1 + +#if !defined _SETJMP_H && !defined _PTHREAD_H +# error "Never include directly; use instead." +#endif + +#include + +#ifndef _ASM + +# if __WORDSIZE == 64 +typedef long int __jmp_buf[8]; +# elif defined __x86_64__ +__extension__ typedef long long int __jmp_buf[8]; +# else +typedef int __jmp_buf[6]; +# endif + +#endif + +#endif /* bits/setjmp.h */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/sigcontext.h b/libc/include/x86_64-linux-gnux32/bits/sigcontext.h new file mode 100644 index 0000000000..481a8a7bb5 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/sigcontext.h @@ -0,0 +1,196 @@ +/* Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 + +#define FP_XSTATE_MAGIC1 0x46505853U +#define FP_XSTATE_MAGIC2 0x46505845U +#define FP_XSTATE_MAGIC2_SIZE sizeof (FP_XSTATE_MAGIC2) + +struct _fpx_sw_bytes +{ + __uint32_t magic1; + __uint32_t extended_size; + __uint64_t xstate_bv; + __uint32_t xstate_size; + __uint32_t __glibc_reserved1[7]; +}; + +struct _fpreg +{ + unsigned short significand[4]; + unsigned short exponent; +}; + +struct _fpxreg +{ + unsigned short significand[4]; + unsigned short exponent; + unsigned short __glibc_reserved1[3]; +}; + +struct _xmmreg +{ + __uint32_t element[4]; +}; + + + +#ifndef __x86_64__ + +struct _fpstate +{ + /* Regular FPU environment. */ + __uint32_t cw; + __uint32_t sw; + __uint32_t tag; + __uint32_t ipoff; + __uint32_t cssel; + __uint32_t dataoff; + __uint32_t datasel; + struct _fpreg _st[8]; + unsigned short status; + unsigned short magic; + + /* FXSR FPU environment. */ + __uint32_t _fxsr_env[6]; + __uint32_t mxcsr; + __uint32_t __glibc_reserved1; + struct _fpxreg _fxsr_st[8]; + struct _xmmreg _xmm[8]; + __uint32_t __glibc_reserved2[56]; +}; + +#ifndef sigcontext_struct +/* Kernel headers before 2.1.1 define a struct sigcontext_struct, but + we need sigcontext. Some packages have come to rely on + sigcontext_struct being defined on 32-bit x86, so define this for + their benefit. */ +# define sigcontext_struct sigcontext +#endif + +#define X86_FXSR_MAGIC 0x0000 + +struct sigcontext +{ + unsigned short gs, __gsh; + unsigned short fs, __fsh; + unsigned short es, __esh; + unsigned short ds, __dsh; + unsigned long edi; + unsigned long esi; + unsigned long ebp; + unsigned long esp; + unsigned long ebx; + unsigned long edx; + unsigned long ecx; + unsigned long eax; + unsigned long trapno; + unsigned long err; + unsigned long eip; + unsigned short cs, __csh; + unsigned long eflags; + unsigned long esp_at_signal; + unsigned short ss, __ssh; + struct _fpstate * fpstate; + unsigned long oldmask; + unsigned long cr2; +}; + +#else /* __x86_64__ */ + +struct _fpstate +{ + /* FPU environment matching the 64-bit FXSAVE layout. */ + __uint16_t cwd; + __uint16_t swd; + __uint16_t ftw; + __uint16_t fop; + __uint64_t rip; + __uint64_t rdp; + __uint32_t mxcsr; + __uint32_t mxcr_mask; + struct _fpxreg _st[8]; + struct _xmmreg _xmm[16]; + __uint32_t __glibc_reserved1[24]; +}; + +struct sigcontext +{ + __uint64_t r8; + __uint64_t r9; + __uint64_t r10; + __uint64_t r11; + __uint64_t r12; + __uint64_t r13; + __uint64_t r14; + __uint64_t r15; + __uint64_t rdi; + __uint64_t rsi; + __uint64_t rbp; + __uint64_t rbx; + __uint64_t rdx; + __uint64_t rax; + __uint64_t rcx; + __uint64_t rsp; + __uint64_t rip; + __uint64_t eflags; + unsigned short cs; + unsigned short gs; + unsigned short fs; + unsigned short __pad0; + __uint64_t err; + __uint64_t trapno; + __uint64_t oldmask; + __uint64_t cr2; + __extension__ union + { + struct _fpstate * fpstate; + __uint64_t __fpstate_word; + }; + __uint64_t __reserved1 [8]; +}; + +#endif /* __x86_64__ */ + +struct _xsave_hdr +{ + __uint64_t xstate_bv; + __uint64_t __glibc_reserved1[2]; + __uint64_t __glibc_reserved2[5]; +}; + +struct _ymmh_state +{ + __uint32_t ymmh_space[64]; +}; + +struct _xstate +{ + struct _fpstate fpstate; + struct _xsave_hdr xstate_hdr; + struct _ymmh_state ymmh; +}; + +#endif /* _BITS_SIGCONTEXT_H */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/siginfo-arch.h b/libc/include/x86_64-linux-gnux32/bits/siginfo-arch.h new file mode 100644 index 0000000000..0f430f0772 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/siginfo-arch.h @@ -0,0 +1,17 @@ +/* Architecture-specific adjustments to siginfo_t. x86 version. */ +#ifndef _BITS_SIGINFO_ARCH_H +#define _BITS_SIGINFO_ARCH_H 1 + +#if defined __x86_64__ && __WORDSIZE == 32 +/* si_utime and si_stime must be 4 byte aligned for x32 to match the + kernel. We align siginfo_t to 8 bytes so that si_utime and + si_stime are actually aligned to 8 bytes since their offsets are + multiple of 8 bytes. Note: with some compilers, the alignment + attribute would be ignored if it were put in __SI_CLOCK_T instead + of encapsulated in a typedef. */ +typedef __clock_t __attribute__ ((__aligned__ (4))) __sigchld_clock_t; +# define __SI_ALIGNMENT __attribute__ ((__aligned__ (8))) +# define __SI_CLOCK_T __sigchld_clock_t +#endif + +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/stat.h b/libc/include/x86_64-linux-gnux32/bits/stat.h new file mode 100644 index 0000000000..ee7f88c463 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/stat.h @@ -0,0 +1,210 @@ +/* Copyright (C) 1999-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined _SYS_STAT_H && !defined _FCNTL_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_STAT_H +#define _BITS_STAT_H 1 + +/* Versions of the `struct stat' data structure. */ +#ifndef __x86_64__ +# define _STAT_VER_LINUX_OLD 1 +# define _STAT_VER_KERNEL 1 +# define _STAT_VER_SVR4 2 +# define _STAT_VER_LINUX 3 + +/* i386 versions of the `xmknod' interface. */ +# define _MKNOD_VER_LINUX 1 +# define _MKNOD_VER_SVR4 2 +# define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ +#else +# define _STAT_VER_KERNEL 0 +# define _STAT_VER_LINUX 1 + +/* x86-64 versions of the `xmknod' interface. */ +# define _MKNOD_VER_LINUX 0 +#endif + +#define _STAT_VER _STAT_VER_LINUX + +struct stat + { + __dev_t st_dev; /* Device. */ +#ifndef __x86_64__ + unsigned short int __pad1; +#endif +#if defined __x86_64__ || !defined __USE_FILE_OFFSET64 + __ino_t st_ino; /* File serial number. */ +#else + __ino_t __st_ino; /* 32bit file serial number. */ +#endif +#ifndef __x86_64__ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ +#else + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ +#endif + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ +#ifdef __x86_64__ + int __pad0; +#endif + __dev_t st_rdev; /* Device number, if device. */ +#ifndef __x86_64__ + unsigned short int __pad2; +#endif +#if defined __x86_64__ || !defined __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +#else + __off64_t st_size; /* Size of file, in bytes. */ +#endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ +#if defined __x86_64__ || !defined __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +#else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +#endif +#ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# define st_atime st_atim.tv_sec /* Backward compatibility. */ +# define st_mtime st_mtim.tv_sec +# define st_ctime st_ctim.tv_sec +#else + __time_t st_atime; /* Time of last access. */ + __syscall_ulong_t st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */ +#endif +#ifdef __x86_64__ + __syscall_slong_t __glibc_reserved[3]; +#else +# ifndef __USE_FILE_OFFSET64 + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; +# else + __ino64_t st_ino; /* File serial number. */ +# endif +#endif + }; + +#ifdef __USE_LARGEFILE64 +/* Note stat64 has the same shape as stat for x86-64. */ +struct stat64 + { + __dev_t st_dev; /* Device. */ +# ifdef __x86_64__ + __ino64_t st_ino; /* File serial number. */ + __nlink_t st_nlink; /* Link count. */ + __mode_t st_mode; /* File mode. */ +# else + unsigned int __pad1; + __ino_t __st_ino; /* 32bit file serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ +# endif + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ +# ifdef __x86_64__ + int __pad0; + __dev_t st_rdev; /* Device number, if device. */ + __off_t st_size; /* Size of file, in bytes. */ +# else + __dev_t st_rdev; /* Device number, if device. */ + unsigned int __pad2; + __off64_t st_size; /* Size of file, in bytes. */ +# endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + __blkcnt64_t st_blocks; /* Nr. 512-byte blocks allocated. */ +# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the + identifier 'timespec' to appear in the header. + Therefore we have to handle the use of this header in strictly + standard-compliant sources special. */ + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +# else + __time_t st_atime; /* Time of last access. */ + __syscall_ulong_t st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + __syscall_ulong_t st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + __syscall_ulong_t st_ctimensec; /* Nsecs of last status change. */ +# endif +# ifdef __x86_64__ + __syscall_slong_t __glibc_reserved[3]; +# else + __ino64_t st_ino; /* File serial number. */ +# endif + }; +#endif + +/* Tell code we have these members. */ +#define _STATBUF_ST_BLKSIZE +#define _STATBUF_ST_RDEV +/* Nanosecond resolution time values are supported. */ +#define _STATBUF_ST_NSEC + +/* Encoding of the file mode. */ + +#define __S_IFMT 0170000 /* These bits determine file type. */ + +/* File types. */ +#define __S_IFDIR 0040000 /* Directory. */ +#define __S_IFCHR 0020000 /* Character device. */ +#define __S_IFBLK 0060000 /* Block device. */ +#define __S_IFREG 0100000 /* Regular file. */ +#define __S_IFIFO 0010000 /* FIFO. */ +#define __S_IFLNK 0120000 /* Symbolic link. */ +#define __S_IFSOCK 0140000 /* Socket. */ + +/* POSIX.1b objects. Note that these macros always evaluate to zero. But + they do it by enforcing the correct use of the macros. */ +#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) +#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) + +/* Protection bits. */ + +#define __S_ISUID 04000 /* Set user ID on execution. */ +#define __S_ISGID 02000 /* Set group ID on execution. */ +#define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ +#define __S_IREAD 0400 /* Read by owner. */ +#define __S_IWRITE 0200 /* Write by owner. */ +#define __S_IEXEC 0100 /* Execute by owner. */ + +#ifdef __USE_ATFILE +# define UTIME_NOW ((1l << 30) - 1l) +# define UTIME_OMIT ((1l << 30) - 2l) +#endif + +#endif /* bits/stat.h */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/sysctl.h b/libc/include/x86_64-linux-gnux32/bits/sysctl.h new file mode 100644 index 0000000000..6b29199909 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/sysctl.h @@ -0,0 +1,20 @@ +/* Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if defined __x86_64__ && defined __ILP32__ +# error "sysctl system call is unsupported in x32 kernel" +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/timesize.h b/libc/include/x86_64-linux-gnux32/bits/timesize.h new file mode 100644 index 0000000000..48fb555234 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/timesize.h @@ -0,0 +1,25 @@ +/* Bit size of the time_t type at glibc build time, x86-64 and x32 case. + Copyright (C) 2018-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if defined __x86_64__ && defined __ILP32__ +/* For x32, time is 64-bit even though word size is 32-bit. */ +# define __TIMESIZE 64 +#else +/* For others, time size is word size. */ +# define __TIMESIZE __WORDSIZE +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/typesizes.h b/libc/include/x86_64-linux-gnux32/bits/typesizes.h new file mode 100644 index 0000000000..7c14f5d7f8 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/typesizes.h @@ -0,0 +1,95 @@ +/* bits/typesizes.h -- underlying types for *_t. Linux/x86-64 version. + Copyright (C) 2012-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_TYPES_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_TYPESIZES_H +#define _BITS_TYPESIZES_H 1 + +/* See for the meaning of these macros. This file exists so + that need not vary across different GNU platforms. */ + +/* X32 kernel interface is 64-bit. */ +#if defined __x86_64__ && defined __ILP32__ +# define __SYSCALL_SLONG_TYPE __SQUAD_TYPE +# define __SYSCALL_ULONG_TYPE __UQUAD_TYPE +#else +# define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE +# define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE +#endif + +#define __DEV_T_TYPE __UQUAD_TYPE +#define __UID_T_TYPE __U32_TYPE +#define __GID_T_TYPE __U32_TYPE +#define __INO_T_TYPE __SYSCALL_ULONG_TYPE +#define __INO64_T_TYPE __UQUAD_TYPE +#define __MODE_T_TYPE __U32_TYPE +#ifdef __x86_64__ +# define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE +# define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE +#else +# define __NLINK_T_TYPE __UWORD_TYPE +# define __FSWORD_T_TYPE __SWORD_TYPE +#endif +#define __OFF_T_TYPE __SYSCALL_SLONG_TYPE +#define __OFF64_T_TYPE __SQUAD_TYPE +#define __PID_T_TYPE __S32_TYPE +#define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE +#define __RLIM64_T_TYPE __UQUAD_TYPE +#define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE +#define __BLKCNT64_T_TYPE __SQUAD_TYPE +#define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE +#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE +#define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE +#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __ID_T_TYPE __U32_TYPE +#define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE +#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE +#define __USECONDS_T_TYPE __U32_TYPE +#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE +#define __DADDR_T_TYPE __S32_TYPE +#define __KEY_T_TYPE __S32_TYPE +#define __CLOCKID_T_TYPE __S32_TYPE +#define __TIMER_T_TYPE void * +#define __BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE +#define __FSID_T_TYPE struct { int __val[2]; } +#define __SSIZE_T_TYPE __SWORD_TYPE +#define __CPU_MASK_TYPE __SYSCALL_ULONG_TYPE + +#ifdef __x86_64__ +/* Tell the libc code that off_t and off64_t are actually the same type + for all ABI purposes, even if possibly expressed as different base types + for C type-checking purposes. */ +# define __OFF_T_MATCHES_OFF64_T 1 + +/* Same for ino_t and ino64_t. */ +# define __INO_T_MATCHES_INO64_T 1 + +/* And for __rlim_t and __rlim64_t. */ +# define __RLIM_T_MATCHES_RLIM64_T 1 +#else +# define __RLIM_T_MATCHES_RLIM64_T 0 +#endif + +/* Number of descriptors that can fit in an `fd_set'. */ +#define __FD_SETSIZE 1024 + + +#endif /* bits/typesizes.h */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/wordsize.h b/libc/include/x86_64-linux-gnux32/bits/wordsize.h new file mode 100644 index 0000000000..0bf84a4e99 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/wordsize.h @@ -0,0 +1,17 @@ +/* Determine the wordsize from the preprocessor defines. */ + +#if defined __x86_64__ && !defined __ILP32__ +# define __WORDSIZE 64 +#else +# define __WORDSIZE 32 +#define __WORDSIZE32_SIZE_ULONG 0 +#define __WORDSIZE32_PTRDIFF_LONG 0 +#endif + +#ifdef __x86_64__ +# define __WORDSIZE_TIME64_COMPAT32 1 +/* Both x86-64 and x32 use the 64-bit system call interface. */ +# define __SYSCALL_WORDSIZE 64 +#else +# define __WORDSIZE_TIME64_COMPAT32 0 +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/bits/xtitypes.h b/libc/include/x86_64-linux-gnux32/bits/xtitypes.h new file mode 100644 index 0000000000..1eb0c84d8f --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/bits/xtitypes.h @@ -0,0 +1,33 @@ +/* bits/xtitypes.h -- Define some types used by . x86-64. + Copyright (C) 2002-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _STROPTS_H +# error "Never include directly; use instead." +#endif + +#ifndef _BITS_XTITYPES_H +#define _BITS_XTITYPES_H 1 + +#include + +/* This type is used by some structs in . */ +typedef __SLONG32_TYPE __t_scalar_t; +typedef __ULONG32_TYPE __t_uscalar_t; + + +#endif /* bits/xtitypes.h */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/fpu_control.h b/libc/include/x86_64-linux-gnux32/fpu_control.h new file mode 100644 index 0000000000..1c06450778 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/fpu_control.h @@ -0,0 +1,109 @@ +/* FPU control word bits. x86 version. + Copyright (C) 1993-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Olaf Flebbe. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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 _FPU_CONTROL_H +#define _FPU_CONTROL_H 1 + +/* Note that this file sets on x86-64 only the x87 FPU, it does not + touch the SSE unit. */ + +/* Here is the dirty part. Set up your 387 through the control word + * (cw) register. + * + * 15-13 12 11-10 9-8 7-6 5 4 3 2 1 0 + * | reserved | IC | RC | PC | reserved | PM | UM | OM | ZM | DM | IM + * + * IM: Invalid operation mask + * DM: Denormalized operand mask + * ZM: Zero-divide mask + * OM: Overflow mask + * UM: Underflow mask + * PM: Precision (inexact result) mask + * + * Mask bit is 1 means no interrupt. + * + * PC: Precision control + * 11 - round to extended precision + * 10 - round to double precision + * 00 - round to single precision + * + * RC: Rounding control + * 00 - rounding to nearest + * 01 - rounding down (toward - infinity) + * 10 - rounding up (toward + infinity) + * 11 - rounding toward zero + * + * IC: Infinity control + * That is for 8087 and 80287 only. + * + * The hardware default is 0x037f which we use. + */ + +#include + +/* masking of interrupts */ +#define _FPU_MASK_IM 0x01 +#define _FPU_MASK_DM 0x02 +#define _FPU_MASK_ZM 0x04 +#define _FPU_MASK_OM 0x08 +#define _FPU_MASK_UM 0x10 +#define _FPU_MASK_PM 0x20 + +/* precision control */ +#define _FPU_EXTENDED 0x300 /* libm requires double extended precision. */ +#define _FPU_DOUBLE 0x200 +#define _FPU_SINGLE 0x0 + +/* rounding control */ +#define _FPU_RC_NEAREST 0x0 /* RECOMMENDED */ +#define _FPU_RC_DOWN 0x400 +#define _FPU_RC_UP 0x800 +#define _FPU_RC_ZERO 0xC00 + +#define _FPU_RESERVED 0xF0C0 /* Reserved bits in cw */ + + +/* The fdlibm code requires strict IEEE double precision arithmetic, + and no interrupts for exceptions, rounding to nearest. */ + +#define _FPU_DEFAULT 0x037f + +/* IEEE: same as above. */ +#define _FPU_IEEE 0x037f + +/* Type of the control word. */ +typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__HI__))); + +/* Macros for accessing the hardware control word. "*&" is used to + work around a bug in older versions of GCC. __volatile__ is used + to support combination of writing the control register and reading + it back. Without __volatile__, the old value may be used for reading + back under compiler optimization. + + Note that the use of these macros is not sufficient anymore with + recent hardware nor on x86-64. Some floating point operations are + executed in the SSE/SSE2 engines which have their own control and + status register. */ +#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw)) +#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw)) + +/* Default control word set at startup. */ +extern fpu_control_t __fpu_control; + +#endif /* fpu_control.h */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/gnu/lib-names-x32.h b/libc/include/x86_64-linux-gnux32/gnu/lib-names-x32.h new file mode 100644 index 0000000000..e9ea9cb4be --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/gnu/lib-names-x32.h @@ -0,0 +1,31 @@ +/* This file is automatically generated. */ +#ifndef __GNU_LIB_NAMES_H +# error "Never use directly; include instead." +#endif + +#define LD_LINUX_X32_SO "ld-linux-x32.so.2" +#define LD_SO "ld-linux-x32.so.2" +#define LIBANL_SO "libanl.so.1" +#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1" +#define LIBCRYPT_SO "libcrypt.so.1" +#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_NISPLUS_SO "libnss_nisplus.so.2" +#define LIBNSS_NIS_SO "libnss_nis.so.2" +#define LIBNSS_TEST1_SO "libnss_test1.so.2" +#define LIBNSS_TEST2_SO "libnss_test2.so.2" +#define LIBPTHREAD_SO "libpthread.so.0" +#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/libc/include/x86_64-linux-gnux32/gnu/lib-names.h b/libc/include/x86_64-linux-gnux32/gnu/lib-names.h new file mode 100644 index 0000000000..aafc03bf7e --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/gnu/lib-names.h @@ -0,0 +1,17 @@ +/* This file is automatically generated. + It defines macros to allow user program to find the shared + library files which come as part of GNU libc. */ +#ifndef __GNU_LIB_NAMES_H +#define __GNU_LIB_NAMES_H 1 + +#if !defined __x86_64__ +# include +#endif +#if defined __x86_64__ && defined __LP64__ +# include +#endif +#if defined __x86_64__ && defined __ILP32__ +# include +#endif + +#endif /* gnu/lib-names.h */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/gnu/stubs-x32.h b/libc/include/x86_64-linux-gnux32/gnu/stubs-x32.h new file mode 100644 index 0000000000..34fab3804a --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/gnu/stubs-x32.h @@ -0,0 +1,28 @@ +/* This file is automatically generated. + It defines a symbol `__stub_FUNCTION' for each function + in the C library which is a stub, meaning it will fail + every time called, usually setting errno to ENOSYS. */ + +#ifdef _LIBC + #error Applications may not define the macro _LIBC +#endif + +#define __stub___compat_bdflush +#define __stub___compat_create_module +#define __stub___compat_get_kernel_syms +#define __stub___compat_nfsservctl +#define __stub___compat_query_module +#define __stub___compat_uselib +#define __stub_chflags +#define __stub_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_getmsg +#define __stub_gtty +#define __stub_lchmod +#define __stub_putmsg +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/gnu/stubs.h b/libc/include/x86_64-linux-gnux32/gnu/stubs.h new file mode 100644 index 0000000000..a4c9b5f097 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/gnu/stubs.h @@ -0,0 +1,14 @@ +/* This file is automatically generated. + This file selects the right generated file of `__stub_FUNCTION' macros + based on the architecture being compiled for. */ + + +#if !defined __x86_64__ +# include +#endif +#if defined __x86_64__ && defined __LP64__ +# include +#endif +#if defined __x86_64__ && defined __ILP32__ +# include +#endif \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/sys/elf.h b/libc/include/x86_64-linux-gnux32/sys/elf.h new file mode 100644 index 0000000000..d8c2c7acc8 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/sys/elf.h @@ -0,0 +1,29 @@ +/* Copyright (C) 1998-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_ELF_H +#define _SYS_ELF_H 1 + +#ifdef __x86_64__ +# error This header is unsupported on x86-64. +#else +# warning "This header is obsolete; use instead." + +# include +#endif + +#endif /* _SYS_ELF_H */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/sys/io.h b/libc/include/x86_64-linux-gnux32/sys/io.h new file mode 100644 index 0000000000..c27e96f4af --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/sys/io.h @@ -0,0 +1,183 @@ +/* Copyright (C) 1996-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_IO_H +#define _SYS_IO_H 1 + +#include + +__BEGIN_DECLS + +/* If TURN_ON is TRUE, request for permission to do direct i/o on the + port numbers in the range [FROM,FROM+NUM-1]. Otherwise, turn I/O + permission off for that range. This call requires root privileges. + + Portability note: not all Linux platforms support this call. Most + platforms based on the PC I/O architecture probably will, however. + E.g., Linux/Alpha for Alpha PCs supports this. */ +extern int ioperm (unsigned long int __from, unsigned long int __num, + int __turn_on) __THROW; + +/* Set the I/O privilege level to LEVEL. If LEVEL>3, permission to + access any I/O port is granted. This call requires root + privileges. */ +extern int iopl (int __level) __THROW; + +#if defined __GNUC__ && __GNUC__ >= 2 + +static __inline unsigned char +inb (unsigned short int __port) +{ + unsigned char _v; + + __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (__port)); + return _v; +} + +static __inline unsigned char +inb_p (unsigned short int __port) +{ + unsigned char _v; + + __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port)); + return _v; +} + +static __inline unsigned short int +inw (unsigned short int __port) +{ + unsigned short _v; + + __asm__ __volatile__ ("inw %w1,%0":"=a" (_v):"Nd" (__port)); + return _v; +} + +static __inline unsigned short int +inw_p (unsigned short int __port) +{ + unsigned short int _v; + + __asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port)); + return _v; +} + +static __inline unsigned int +inl (unsigned short int __port) +{ + unsigned int _v; + + __asm__ __volatile__ ("inl %w1,%0":"=a" (_v):"Nd" (__port)); + return _v; +} + +static __inline unsigned int +inl_p (unsigned short int __port) +{ + unsigned int _v; + __asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port)); + return _v; +} + +static __inline void +outb (unsigned char __value, unsigned short int __port) +{ + __asm__ __volatile__ ("outb %b0,%w1": :"a" (__value), "Nd" (__port)); +} + +static __inline void +outb_p (unsigned char __value, unsigned short int __port) +{ + __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value), + "Nd" (__port)); +} + +static __inline void +outw (unsigned short int __value, unsigned short int __port) +{ + __asm__ __volatile__ ("outw %w0,%w1": :"a" (__value), "Nd" (__port)); + +} + +static __inline void +outw_p (unsigned short int __value, unsigned short int __port) +{ + __asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (__value), + "Nd" (__port)); +} + +static __inline void +outl (unsigned int __value, unsigned short int __port) +{ + __asm__ __volatile__ ("outl %0,%w1": :"a" (__value), "Nd" (__port)); +} + +static __inline void +outl_p (unsigned int __value, unsigned short int __port) +{ + __asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (__value), + "Nd" (__port)); +} + +static __inline void +insb (unsigned short int __port, void *__addr, unsigned long int __count) +{ + __asm__ __volatile__ ("cld ; rep ; insb":"=D" (__addr), "=c" (__count) + :"d" (__port), "0" (__addr), "1" (__count)); +} + +static __inline void +insw (unsigned short int __port, void *__addr, unsigned long int __count) +{ + __asm__ __volatile__ ("cld ; rep ; insw":"=D" (__addr), "=c" (__count) + :"d" (__port), "0" (__addr), "1" (__count)); +} + +static __inline void +insl (unsigned short int __port, void *__addr, unsigned long int __count) +{ + __asm__ __volatile__ ("cld ; rep ; insl":"=D" (__addr), "=c" (__count) + :"d" (__port), "0" (__addr), "1" (__count)); +} + +static __inline void +outsb (unsigned short int __port, const void *__addr, + unsigned long int __count) +{ + __asm__ __volatile__ ("cld ; rep ; outsb":"=S" (__addr), "=c" (__count) + :"d" (__port), "0" (__addr), "1" (__count)); +} + +static __inline void +outsw (unsigned short int __port, const void *__addr, + unsigned long int __count) +{ + __asm__ __volatile__ ("cld ; rep ; outsw":"=S" (__addr), "=c" (__count) + :"d" (__port), "0" (__addr), "1" (__count)); +} + +static __inline void +outsl (unsigned short int __port, const void *__addr, + unsigned long int __count) +{ + __asm__ __volatile__ ("cld ; rep ; outsl":"=S" (__addr), "=c" (__count) + :"d" (__port), "0" (__addr), "1" (__count)); +} + +#endif /* GNU C */ + +__END_DECLS +#endif /* _SYS_IO_H */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/sys/ptrace.h b/libc/include/x86_64-linux-gnux32/sys/ptrace.h new file mode 100644 index 0000000000..1f6c5b50fd --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/sys/ptrace.h @@ -0,0 +1,198 @@ +/* `ptrace' debugger support interface. Linux/x86 version. + Copyright (C) 1996-2019 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_PTRACE_H +#define _SYS_PTRACE_H 1 + +#include +#include + +__BEGIN_DECLS + +/* Type of the REQUEST argument to `ptrace.' */ +enum __ptrace_request +{ + /* Indicate that the process making this request should be traced. + All signals received by this process can be intercepted by its + parent, and its parent can use the other `ptrace' requests. */ + PTRACE_TRACEME = 0, +#define PT_TRACE_ME PTRACE_TRACEME + + /* Return the word in the process's text space at address ADDR. */ + PTRACE_PEEKTEXT = 1, +#define PT_READ_I PTRACE_PEEKTEXT + + /* Return the word in the process's data space at address ADDR. */ + PTRACE_PEEKDATA = 2, +#define PT_READ_D PTRACE_PEEKDATA + + /* Return the word in the process's user area at offset ADDR. */ + PTRACE_PEEKUSER = 3, +#define PT_READ_U PTRACE_PEEKUSER + + /* Write the word DATA into the process's text space at address ADDR. */ + PTRACE_POKETEXT = 4, +#define PT_WRITE_I PTRACE_POKETEXT + + /* Write the word DATA into the process's data space at address ADDR. */ + PTRACE_POKEDATA = 5, +#define PT_WRITE_D PTRACE_POKEDATA + + /* Write the word DATA into the process's user area at offset ADDR. */ + PTRACE_POKEUSER = 6, +#define PT_WRITE_U PTRACE_POKEUSER + + /* Continue the process. */ + PTRACE_CONT = 7, +#define PT_CONTINUE PTRACE_CONT + + /* Kill the process. */ + PTRACE_KILL = 8, +#define PT_KILL PTRACE_KILL + + /* Single step the process. */ + PTRACE_SINGLESTEP = 9, +#define PT_STEP PTRACE_SINGLESTEP + + /* Get all general purpose registers used by a processes. */ + PTRACE_GETREGS = 12, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a processes. */ + PTRACE_SETREGS = 13, +#define PT_SETREGS PTRACE_SETREGS + + /* Get all floating point registers used by a processes. */ + PTRACE_GETFPREGS = 14, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a processes. */ + PTRACE_SETFPREGS = 15, +#define PT_SETFPREGS PTRACE_SETFPREGS + + /* Attach to a process that is already running. */ + PTRACE_ATTACH = 16, +#define PT_ATTACH PTRACE_ATTACH + + /* Detach from a process attached to with PTRACE_ATTACH. */ + PTRACE_DETACH = 17, +#define PT_DETACH PTRACE_DETACH + + /* Get all extended floating point registers used by a processes. */ + PTRACE_GETFPXREGS = 18, +#define PT_GETFPXREGS PTRACE_GETFPXREGS + + /* Set all extended floating point registers used by a processes. */ + PTRACE_SETFPXREGS = 19, +#define PT_SETFPXREGS PTRACE_SETFPXREGS + + /* Continue and stop at the next entry to or return from syscall. */ + PTRACE_SYSCALL = 24, +#define PT_SYSCALL PTRACE_SYSCALL + + /* Get a TLS entry in the GDT. */ + PTRACE_GET_THREAD_AREA = 25, +#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA + + /* Change a TLS entry in the GDT. */ + PTRACE_SET_THREAD_AREA = 26, +#define PT_SET_THREAD_AREA PTRACE_SET_THREAD_AREA + +#ifdef __x86_64__ + /* Access TLS data. */ + PTRACE_ARCH_PRCTL = 30, +# define PT_ARCH_PRCTL PTRACE_ARCH_PRCTL +#endif + + /* Continue and stop at the next syscall, it will not be executed. */ + PTRACE_SYSEMU = 31, +#define PT_SYSEMU PTRACE_SYSEMU + + /* Single step the process, the next syscall will not be executed. */ + PTRACE_SYSEMU_SINGLESTEP = 32, +#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP + + /* Execute process until next taken branch. */ + PTRACE_SINGLEBLOCK = 33, +#define PT_STEPBLOCK PTRACE_SINGLEBLOCK + + /* Set ptrace filter options. */ + PTRACE_SETOPTIONS = 0x4200, +#define PT_SETOPTIONS PTRACE_SETOPTIONS + + /* Get last ptrace message. */ + PTRACE_GETEVENTMSG = 0x4201, +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG + + /* Get siginfo for process. */ + PTRACE_GETSIGINFO = 0x4202, +#define PT_GETSIGINFO PTRACE_GETSIGINFO + + /* Set new siginfo for process. */ + PTRACE_SETSIGINFO = 0x4203, +#define PT_SETSIGINFO PTRACE_SETSIGINFO + + /* Get register content. */ + PTRACE_GETREGSET = 0x4204, +#define PTRACE_GETREGSET PTRACE_GETREGSET + + /* Set register content. */ + PTRACE_SETREGSET = 0x4205, +#define PTRACE_SETREGSET PTRACE_SETREGSET + + /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect + signal or group stop state. */ + PTRACE_SEIZE = 0x4206, +#define PTRACE_SEIZE PTRACE_SEIZE + + /* Trap seized tracee. */ + PTRACE_INTERRUPT = 0x4207, +#define PTRACE_INTERRUPT PTRACE_INTERRUPT + + /* Wait for next group event. */ + PTRACE_LISTEN = 0x4208, +#define PTRACE_LISTEN PTRACE_LISTEN + + /* Retrieve siginfo_t structures without removing signals from a queue. */ + PTRACE_PEEKSIGINFO = 0x4209, +#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO + + /* Get the mask of blocked signals. */ + PTRACE_GETSIGMASK = 0x420a, +#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK + + /* Change the mask of blocked signals. */ + PTRACE_SETSIGMASK = 0x420b, +#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK + + /* Get seccomp BPF filters. */ + PTRACE_SECCOMP_GET_FILTER = 0x420c, +#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER + + /* Get seccomp BPF filter metadata. */ + PTRACE_SECCOMP_GET_METADATA = 0x420d +#define PTRACE_SECCOMP_GET_METADATA PTRACE_SECCOMP_GET_METADATA +}; + + +#include + +__END_DECLS + +#endif /* _SYS_PTRACE_H */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/sys/ucontext.h b/libc/include/x86_64-linux-gnux32/sys/ucontext.h new file mode 100644 index 0000000000..2127a222a9 --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/sys/ucontext.h @@ -0,0 +1,262 @@ +/* Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_UCONTEXT_H +#define _SYS_UCONTEXT_H 1 + +#include + +#include +#include +#include + + +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + +#ifdef __x86_64__ + +/* Type for general register. */ +__extension__ typedef long long int greg_t; + +/* Number of general registers. */ +#define __NGREG 23 +#ifdef __USE_MISC +# define NGREG __NGREG +#endif + +/* Container for all general registers. */ +typedef greg_t gregset_t[__NGREG]; + +#ifdef __USE_GNU +/* Number of each register in the `gregset_t' array. */ +enum +{ + REG_R8 = 0, +# define REG_R8 REG_R8 + REG_R9, +# define REG_R9 REG_R9 + REG_R10, +# define REG_R10 REG_R10 + REG_R11, +# define REG_R11 REG_R11 + REG_R12, +# define REG_R12 REG_R12 + REG_R13, +# define REG_R13 REG_R13 + REG_R14, +# define REG_R14 REG_R14 + REG_R15, +# define REG_R15 REG_R15 + REG_RDI, +# define REG_RDI REG_RDI + REG_RSI, +# define REG_RSI REG_RSI + REG_RBP, +# define REG_RBP REG_RBP + REG_RBX, +# define REG_RBX REG_RBX + REG_RDX, +# define REG_RDX REG_RDX + REG_RAX, +# define REG_RAX REG_RAX + REG_RCX, +# define REG_RCX REG_RCX + REG_RSP, +# define REG_RSP REG_RSP + REG_RIP, +# define REG_RIP REG_RIP + REG_EFL, +# define REG_EFL REG_EFL + REG_CSGSFS, /* Actually short cs, gs, fs, __pad0. */ +# define REG_CSGSFS REG_CSGSFS + REG_ERR, +# define REG_ERR REG_ERR + REG_TRAPNO, +# define REG_TRAPNO REG_TRAPNO + REG_OLDMASK, +# define REG_OLDMASK REG_OLDMASK + REG_CR2 +# define REG_CR2 REG_CR2 +}; +#endif + +struct _libc_fpxreg +{ + unsigned short int __ctx(significand)[4]; + unsigned short int __ctx(exponent); + unsigned short int __glibc_reserved1[3]; +}; + +struct _libc_xmmreg +{ + __uint32_t __ctx(element)[4]; +}; + +struct _libc_fpstate +{ + /* 64-bit FXSAVE format. */ + __uint16_t __ctx(cwd); + __uint16_t __ctx(swd); + __uint16_t __ctx(ftw); + __uint16_t __ctx(fop); + __uint64_t __ctx(rip); + __uint64_t __ctx(rdp); + __uint32_t __ctx(mxcsr); + __uint32_t __ctx(mxcr_mask); + struct _libc_fpxreg _st[8]; + struct _libc_xmmreg _xmm[16]; + __uint32_t __glibc_reserved1[24]; +}; + +/* Structure to describe FPU registers. */ +typedef struct _libc_fpstate *fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct + { + gregset_t __ctx(gregs); + /* Note that fpregs is a pointer. */ + fpregset_t __ctx(fpregs); + __extension__ unsigned long long __reserved1 [8]; +} mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long int __ctx(uc_flags); + struct ucontext_t *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; + struct _libc_fpstate __fpregs_mem; + __extension__ unsigned long long int __ssp[4]; + } ucontext_t; + +#else /* !__x86_64__ */ + +/* Type for general register. */ +typedef int greg_t; + +/* Number of general registers. */ +#define __NGREG 19 +#ifdef __USE_MISC +# define NGREG __NGREG +#endif + +/* Container for all general registers. */ +typedef greg_t gregset_t[__NGREG]; + +#ifdef __USE_GNU +/* Number of each register is the `gregset_t' array. */ +enum +{ + REG_GS = 0, +# define REG_GS REG_GS + REG_FS, +# define REG_FS REG_FS + REG_ES, +# define REG_ES REG_ES + REG_DS, +# define REG_DS REG_DS + REG_EDI, +# define REG_EDI REG_EDI + REG_ESI, +# define REG_ESI REG_ESI + REG_EBP, +# define REG_EBP REG_EBP + REG_ESP, +# define REG_ESP REG_ESP + REG_EBX, +# define REG_EBX REG_EBX + REG_EDX, +# define REG_EDX REG_EDX + REG_ECX, +# define REG_ECX REG_ECX + REG_EAX, +# define REG_EAX REG_EAX + REG_TRAPNO, +# define REG_TRAPNO REG_TRAPNO + REG_ERR, +# define REG_ERR REG_ERR + REG_EIP, +# define REG_EIP REG_EIP + REG_CS, +# define REG_CS REG_CS + REG_EFL, +# define REG_EFL REG_EFL + REG_UESP, +# define REG_UESP REG_UESP + REG_SS +# define REG_SS REG_SS +}; +#endif + +/* Definitions taken from the kernel headers. */ +struct _libc_fpreg +{ + unsigned short int __ctx(significand)[4]; + unsigned short int __ctx(exponent); +}; + +struct _libc_fpstate +{ + unsigned long int __ctx(cw); + unsigned long int __ctx(sw); + unsigned long int __ctx(tag); + unsigned long int __ctx(ipoff); + unsigned long int __ctx(cssel); + unsigned long int __ctx(dataoff); + unsigned long int __ctx(datasel); + struct _libc_fpreg _st[8]; + unsigned long int __ctx(status); +}; + +/* Structure to describe FPU registers. */ +typedef struct _libc_fpstate *fpregset_t; + +/* Context to describe whole processor state. */ +typedef struct + { + gregset_t __ctx(gregs); + /* Due to Linux's history we have to use a pointer here. The SysV/i386 + ABI requires a struct with the values. */ + fpregset_t __ctx(fpregs); + unsigned long int __ctx(oldmask); + unsigned long int __ctx(cr2); + } mcontext_t; + +/* Userlevel context. */ +typedef struct ucontext_t + { + unsigned long int __ctx(uc_flags); + struct ucontext_t *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; + struct _libc_fpstate __fpregs_mem; + unsigned long int __ssp[4]; + } ucontext_t; + +#endif /* !__x86_64__ */ + +#undef __ctx + +#endif /* sys/ucontext.h */ \ No newline at end of file diff --git a/libc/include/x86_64-linux-gnux32/sys/user.h b/libc/include/x86_64-linux-gnux32/sys/user.h new file mode 100644 index 0000000000..74bd6e393a --- /dev/null +++ b/libc/include/x86_64-linux-gnux32/sys/user.h @@ -0,0 +1,180 @@ +/* Copyright (C) 2001-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for 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_USER_H +#define _SYS_USER_H 1 + +/* The whole purpose of this file is for GDB and GDB only. Don't read + too much into it. Don't use it for anything other than GDB unless + you know what you are doing. */ + +#ifdef __x86_64__ + +struct user_fpregs_struct +{ + unsigned short int cwd; + unsigned short int swd; + unsigned short int ftw; + unsigned short int fop; + __extension__ unsigned long long int rip; + __extension__ unsigned long long int rdp; + unsigned int mxcsr; + unsigned int mxcr_mask; + unsigned int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */ + unsigned int xmm_space[64]; /* 16*16 bytes for each XMM-reg = 256 bytes */ + unsigned int padding[24]; +}; + +struct user_regs_struct +{ + __extension__ unsigned long long int r15; + __extension__ unsigned long long int r14; + __extension__ unsigned long long int r13; + __extension__ unsigned long long int r12; + __extension__ unsigned long long int rbp; + __extension__ unsigned long long int rbx; + __extension__ unsigned long long int r11; + __extension__ unsigned long long int r10; + __extension__ unsigned long long int r9; + __extension__ unsigned long long int r8; + __extension__ unsigned long long int rax; + __extension__ unsigned long long int rcx; + __extension__ unsigned long long int rdx; + __extension__ unsigned long long int rsi; + __extension__ unsigned long long int rdi; + __extension__ unsigned long long int orig_rax; + __extension__ unsigned long long int rip; + __extension__ unsigned long long int cs; + __extension__ unsigned long long int eflags; + __extension__ unsigned long long int rsp; + __extension__ unsigned long long int ss; + __extension__ unsigned long long int fs_base; + __extension__ unsigned long long int gs_base; + __extension__ unsigned long long int ds; + __extension__ unsigned long long int es; + __extension__ unsigned long long int fs; + __extension__ unsigned long long int gs; +}; + +struct user +{ + struct user_regs_struct regs; + int u_fpvalid; + struct user_fpregs_struct i387; + __extension__ unsigned long long int u_tsize; + __extension__ unsigned long long int u_dsize; + __extension__ unsigned long long int u_ssize; + __extension__ unsigned long long int start_code; + __extension__ unsigned long long int start_stack; + __extension__ long long int signal; + int reserved; + __extension__ union + { + struct user_regs_struct* u_ar0; + __extension__ unsigned long long int __u_ar0_word; + }; + __extension__ union + { + struct user_fpregs_struct* u_fpstate; + __extension__ unsigned long long int __u_fpstate_word; + }; + __extension__ unsigned long long int magic; + char u_comm [32]; + __extension__ unsigned long long int u_debugreg [8]; +}; + +#else +/* These are the 32-bit x86 structures. */ +struct user_fpregs_struct +{ + long int cwd; + long int swd; + long int twd; + long int fip; + long int fcs; + long int foo; + long int fos; + long int st_space [20]; +}; + +struct user_fpxregs_struct +{ + unsigned short int cwd; + unsigned short int swd; + unsigned short int twd; + unsigned short int fop; + long int fip; + long int fcs; + long int foo; + long int fos; + long int mxcsr; + long int reserved; + long int st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */ + long int xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */ + long int padding[56]; +}; + +struct user_regs_struct +{ + long int ebx; + long int ecx; + long int edx; + long int esi; + long int edi; + long int ebp; + long int eax; + long int xds; + long int xes; + long int xfs; + long int xgs; + long int orig_eax; + long int eip; + long int xcs; + long int eflags; + long int esp; + long int xss; +}; + +struct user +{ + struct user_regs_struct regs; + int u_fpvalid; + struct user_fpregs_struct i387; + unsigned long int u_tsize; + unsigned long int u_dsize; + unsigned long int u_ssize; + unsigned long int start_code; + unsigned long int start_stack; + long int signal; + int reserved; + struct user_regs_struct* u_ar0; + struct user_fpregs_struct* u_fpstate; + unsigned long int magic; + char u_comm [32]; + int u_debugreg [8]; +}; +#endif /* __x86_64__ */ + +#define PAGE_SHIFT 12 +#define PAGE_SIZE (1UL << PAGE_SHIFT) +#define PAGE_MASK (~(PAGE_SIZE-1)) +#define NBPG PAGE_SIZE +#define UPAGES 1 +#define HOST_TEXT_START_ADDR (u.start_code) +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) + +#endif /* _SYS_USER_H */ \ No newline at end of file diff --git a/src/all_types.hpp b/src/all_types.hpp index 0cf3504ce9..c6826664ef 100644 --- a/src/all_types.hpp +++ b/src/all_types.hpp @@ -1753,7 +1753,8 @@ struct CodeGen { Buf o_file_output_path; Buf *wanted_output_file_path; Buf *cache_dir; - Buf *libc_include_dir; + Buf **libc_include_dir_list; + size_t libc_include_dir_len; Buf *zig_c_headers_dir; // Cannot be overridden; derived from zig_lib_dir. Buf *zig_std_special_dir; // Cannot be overridden; derived from zig_lib_dir. @@ -1842,6 +1843,7 @@ struct CodeGen { bool linker_rdynamic; bool each_lib_rpath; bool disable_pic; + bool is_dummy_so; Buf *mmacosx_version_min; Buf *mios_version_min; diff --git a/src/codegen.cpp b/src/codegen.cpp index d106c7dab6..05ad11c799 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -7961,11 +7961,20 @@ static void detect_libc(CodeGen *g) { exit(1); } - Buf *libc_dir = buf_alloc(); - os_path_join(g->zig_lib_dir, buf_create_from_str("libc"), libc_dir); + Buf libc_include_dir = BUF_INIT; + os_path_join(g->zig_lib_dir, buf_create_from_str("libc" OS_SEP "include"), &libc_include_dir); - g->libc_include_dir = buf_alloc(); - os_path_join(libc_dir, buf_create_from_str("glibc-include"), g->libc_include_dir); + Buf *arch_include_dir = buf_sprintf("%s" OS_SEP "libc" OS_SEP "include" OS_SEP "%s-%s-%s", + buf_ptr(g->zig_lib_dir), target_arch_name(g->zig_target->arch), + target_os_name(g->zig_target->os), target_abi_name(g->zig_target->abi)); + + Buf *generic_include_dir = buf_sprintf("%s" OS_SEP "libc" OS_SEP "include" OS_SEP "generic-glibc", + buf_ptr(g->zig_lib_dir)); + + g->libc_include_dir_len = 2; + g->libc_include_dir_list = allocate(2); + g->libc_include_dir_list[0] = arch_include_dir; + g->libc_include_dir_list[1] = generic_include_dir; return; } @@ -8003,7 +8012,14 @@ static void detect_libc(CodeGen *g) { exit(1); } } - g->libc_include_dir = &g->libc->include_dir; + bool want_sys_dir = !buf_eql_buf(&g->libc->include_dir, &g->libc->sys_include_dir); + size_t dir_count = 1 + want_sys_dir; + g->libc_include_dir_len = dir_count; + g->libc_include_dir_list = allocate(dir_count); + g->libc_include_dir_list[0] = &g->libc->include_dir; + if (want_sys_dir) { + g->libc_include_dir_list[1] = &g->libc->sys_include_dir; + } } else if ((g->out_type == OutTypeExe || (g->out_type == OutTypeLib && !g->is_static)) && !target_is_darwin(g->zig_target)) { @@ -8171,7 +8187,7 @@ static void gen_root_source(CodeGen *g) { assert(g->root_out_name); assert(g->out_type != OutTypeUnknown); - { + if (!g->is_dummy_so) { // Zig has lazy top level definitions. Here we semantically analyze the panic function. ZigType *import_with_panic; if (g->have_pub_panic) { @@ -8216,7 +8232,9 @@ static void gen_root_source(CodeGen *g) { } } - typecheck_panic_fn(g, g->panic_tld_fn, g->panic_fn); + if (!g->is_dummy_so) { + typecheck_panic_fn(g, g->panic_tld_fn, g->panic_fn); + } report_errors_and_maybe_exit(g); @@ -8296,10 +8314,7 @@ static bool gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) { cache_buf(cache_hash, compiler_id); cache_int(cache_hash, g->err_color); cache_buf(cache_hash, g->zig_c_headers_dir); - cache_buf_opt(cache_hash, g->libc_include_dir); - if (g->libc != nullptr) { - cache_buf(cache_hash, &g->libc->sys_include_dir); - } + cache_list_of_buf(cache_hash, g->libc_include_dir_list, g->libc_include_dir_len); cache_int(cache_hash, g->zig_target->is_native); cache_int(cache_hash, g->zig_target->arch); cache_int(cache_hash, g->zig_target->sub_arch); @@ -8376,15 +8391,10 @@ static bool gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) { args.append("-isystem"); args.append(buf_ptr(g->zig_c_headers_dir)); - if (g->libc_include_dir != nullptr) { + for (size_t i = 0; i < g->libc_include_dir_len; i += 1) { + Buf *include_dir = g->libc_include_dir_list[i]; args.append("-isystem"); - args.append(buf_ptr(g->libc_include_dir)); - } - if (g->libc != nullptr) { - if (!buf_eql_buf(&g->libc->include_dir, &g->libc->sys_include_dir)) { - args.append("-isystem"); - args.append(buf_ptr(&g->libc->sys_include_dir)); - } + args.append(buf_ptr(include_dir)); } if (g->zig_target->is_native) { @@ -9063,6 +9073,7 @@ static Error check_cache(CodeGen *g, Buf *manifest_dir, Buf *digest, bool *c_obj cache_bool(ch, g->each_lib_rpath); cache_bool(ch, g->disable_pic); cache_bool(ch, g->valgrind_support); + cache_bool(ch, g->is_dummy_so); cache_buf_opt(ch, g->mmacosx_version_min); cache_buf_opt(ch, g->mios_version_min); cache_usize(ch, g->version_major); diff --git a/src/link.cpp b/src/link.cpp index 6459347e0b..9892c3d417 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -86,6 +86,7 @@ static const char *build_dummy_so(CodeGen *parent, const char *name, size_t majo codegen_set_out_name(child_gen, buf_create_from_str(name)); codegen_set_lib_version(child_gen, major_version, 0, 0); child_gen->is_static = false; + child_gen->is_dummy_so = true; codegen_build_and_link(child_gen); return buf_ptr(&child_gen->output_file_path); } @@ -174,6 +175,14 @@ static void glibc_add_include_dirs_arch(CFile *c_file, ZigLLVM_ArchType arch, co c_file->args.append("-I"); c_file->args.append(buf_ptr(buf_sprintf("%s" OS_SEP "x86_64", dir))); } + } else if (arch == ZigLLVM_x86) { + if (nptl != nullptr) { + c_file->args.append("-I"); + c_file->args.append(buf_ptr(buf_sprintf("%s" OS_SEP "i386" OS_SEP "%s", dir, nptl))); + } else { + c_file->args.append("-I"); + c_file->args.append(buf_ptr(buf_sprintf("%s" OS_SEP "i386", dir))); + } } if (nptl != nullptr) { c_file->args.append("-I"); @@ -303,6 +312,14 @@ static void glibc_add_include_dirs(CodeGen *parent, CFile *c_file) { c_file->args.append("-I"); c_file->args.append(path_from_libc(parent, "glibc")); + + c_file->args.append("-I"); + c_file->args.append(buf_ptr(buf_sprintf("%s" OS_SEP "libc" OS_SEP "include" OS_SEP "%s-%s-%s", + buf_ptr(parent->zig_lib_dir), target_arch_name(parent->zig_target->arch), + target_os_name(parent->zig_target->os), target_abi_name(parent->zig_target->abi)))); + + c_file->args.append("-I"); + c_file->args.append(path_from_libc(parent, "include" OS_SEP "generic-glibc")); } static const char *glibc_start_asm_path(CodeGen *parent, const char *file) { @@ -367,13 +384,6 @@ static const char *get_libc_crt_file(CodeGen *parent, const char *file) { c_file->args.append(path_from_libc(parent, "glibc" OS_SEP "include" OS_SEP "libc-symbols.h")); c_file->args.append("-DTOP_NAMESPACE=glibc"); c_file->args.append("-DASSEMBLER"); - - // this is a workaround for: - // glibc/sysdeps/x86_64/crti.S:64:2: error: invalid instruction mnemonic '_cet_endbr' - // _CET_ENDBR - // ^~~~~~~~~~ - c_file->args.append("-D_CET_ENDBR="); - c_file->args.append("-g"); c_file->args.append("-Wa,--noexecstack"); return build_libc_object(parent, "crti", c_file); @@ -781,13 +791,15 @@ static void construct_linker_job_elf(LinkJob *lj) { } if (g->out_type == OutTypeExe || (g->out_type == OutTypeLib && !g->is_static)) { - if (g->libc_link_lib == nullptr) { + if (g->libc_link_lib == nullptr && !g->is_dummy_so) { Buf *builtin_a_path = build_a(g, "builtin"); lj->args.append(buf_ptr(builtin_a_path)); } - Buf *compiler_rt_o_path = build_compiler_rt(g); - lj->args.append(buf_ptr(compiler_rt_o_path)); + if (!g->is_dummy_so) { + Buf *compiler_rt_o_path = build_compiler_rt(g); + lj->args.append(buf_ptr(compiler_rt_o_path)); + } } for (size_t i = 0; i < g->link_libs_list.length; i += 1) { @@ -1043,7 +1055,7 @@ static void construct_linker_job_coff(LinkJob *lj) { } if (g->out_type == OutTypeExe || (g->out_type == OutTypeLib && !g->is_static)) { - if (g->libc_link_lib == nullptr) { + if (g->libc_link_lib == nullptr && !g->is_dummy_so) { Buf *builtin_a_path = build_a(g, "builtin"); lj->args.append(buf_ptr(builtin_a_path)); } diff --git a/src/translate_c.cpp b/src/translate_c.cpp index 5dc28c3f9f..c869acd8f9 100644 --- a/src/translate_c.cpp +++ b/src/translate_c.cpp @@ -4814,15 +4814,10 @@ Error parse_h_file(ZigType *import, ZigList *errors, const char *tar clang_argv.append("-isystem"); clang_argv.append(buf_ptr(codegen->zig_c_headers_dir)); - if (codegen->libc_include_dir != nullptr) { + for (size_t i = 0; i < codegen->libc_include_dir_len; i += 1) { + Buf *include_dir = codegen->libc_include_dir_list[i]; clang_argv.append("-isystem"); - clang_argv.append(buf_ptr(codegen->libc_include_dir)); - } - if (codegen->libc != nullptr) { - if (!buf_eql_buf(&codegen->libc->include_dir, &codegen->libc->sys_include_dir)) { - clang_argv.append("-isystem"); - clang_argv.append(buf_ptr(&codegen->libc->sys_include_dir)); - } + clang_argv.append(buf_ptr(include_dir)); } // windows c runtime requires -D_DEBUG if using debug libraries diff --git a/std/special/builtin.zig b/std/special/builtin.zig index 38c1493ba2..868b880dcf 100644 --- a/std/special/builtin.zig +++ b/std/special/builtin.zig @@ -101,7 +101,7 @@ nakedcc fn clone() void { \\1: ret \\ ); - } else if (builtin.arch == builtin.Arch.aarch64v8) { + } else if (builtin.arch == builtin.Arch.aarch64) { // __clone(func, stack, flags, arg, ptid, tls, ctid) // x0, x1, w2, x3, x4, x5, x6