diff --git a/asm/sgidefs.h include/asm/sgidefs.h new file mode 100644 index 0000000..876442f --- /dev/null +++ include/asm/sgidefs.h @@ -0,0 +1,44 @@ +/* + * 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/asm/unistd.h include/asm/unistd.h new file mode 100644 index 0000000..7853f9c --- /dev/null +++ include/asm/unistd.h @@ -0,0 +1,955 @@ +/* + * 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 + */ +#if __mips__ +#ifndef _ASM_UNISTD_H +#define _ASM_UNISTD_H + +#include <asm/sgidefs.h> + +#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) + +/* + * Offset of the last Linux o32 flavoured syscall + */ +#define __NR_Linux_syscalls 320 + +#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ + +#define __NR_O32_Linux 4000 +#define __NR_O32_Linux_syscalls 320 + +#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) + +/* + * Offset of the last Linux 64-bit flavoured syscall + */ +#define __NR_Linux_syscalls 279 + +#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ + +#define __NR_64_Linux 5000 +#define __NR_64_Linux_syscalls 279 + +#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) + +/* + * Offset of the last N32 flavoured syscall + */ +#define __NR_Linux_syscalls 283 + +#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ + +#define __NR_N32_Linux 6000 +#define __NR_N32_Linux_syscalls 283 + +#endif /* _ASM_UNISTD_H */ +#endif /* __mips__ */ diff --git a/errno.h include/errno.h index d573808..38d39b8 100644 --- a/errno.h +++ include/errno.h @@ -11,6 +11,143 @@ extern "C" { +#if __mips__ || __mips64__ +#define ENOMSG 35 +#define EIDRM 36 +#define ECHRNG 37 +#define EL2NSYNC 38 +#define EL3HLT 39 +#define EL3RST 40 +#define ELNRNG 41 +#define EUNATCH 42 +#define ENOCSI 43 +#define EL2HLT 44 +#define EDEADLK 45 +#define ENOLCK 46 +#define EBADE 50 +#define EBADR 51 +#define EXFULL 52 +#define ENOANO 53 +#define EBADRQC 54 +#define EBADSLT 55 +#define EDEADLOCK 56 +#define EBFONT 59 +#define ENOSTR 60 +#define ENODATA 61 +#define ETIME 62 +#define ENOSR 63 +#define ENONET 64 +#define ENOPKG 65 +#define EREMOTE 66 +#define ENOLINK 67 +#define EADV 68 +#define ESRMNT 69 +#define ECOMM 70 +#define EPROTO 71 +#define EDOTDOT 73 +#define EMULTIHOP 74 +#define EBADMSG 77 +#define ENAMETOOLONG 78 +#define EOVERFLOW 79 +#define ENOTUNIQ 80 +#define EBADFD 81 +#define EREMCHG 82 +#define ELIBACC 83 +#define ELIBBAD 84 +#define ELIBSCN 85 +#define ELIBMAX 86 +#define ELIBEXEC 87 +#define EILSEQ 88 +#define ENOSYS 89 +#define ELOOP 90 +#define ERESTART 91 +#define ESTRPIPE 92 +#define ENOTEMPTY 93 +#define EUSERS 94 +#define ENOTSOCK 95 +#define EDESTADDRREQ 96 +#define EMSGSIZE 97 +#define EPROTOTYPE 98 +#define ENOPROTOOPT 99 +#define EPROTONOSUPPORT 120 +#define ESOCKTNOSUPPORT 121 +#define EOPNOTSUPP 122 +#define EPFNOSUPPORT 123 +#define EAFNOSUPPORT 124 +#define EADDRINUSE 125 +#define EADDRNOTAVAIL 126 +#define ENETDOWN 127 +#define ENETUNREACH 128 +#define ENETRESET 129 +#define ECONNABORTED 130 +#define ECONNRESET 131 +#define ENOBUFS 132 +#define EISCONN 133 +#define ENOTCONN 134 +#define EUCLEAN 135 +#define ENOTNAM 137 +#define ENAVAIL 138 +#define EISNAM 139 +#define EREMOTEIO 140 +#define EINIT 141 +#define EREMDEV 142 +#define ESHUTDOWN 143 +#define ETOOMANYREFS 144 +#define ETIMEDOUT 145 +#define ECONNREFUSED 146 +#define EHOSTDOWN 147 +#define EHOSTUNREACH 148 +#define EWOULDBLOCK EAGAIN +#define EALREADY 149 +#define EINPROGRESS 150 +#define ESTALE 151 +#define ECANCELED 158 +#define ENOMEDIUM 159 +#define EMEDIUMTYPE 160 +#define ENOKEY 161 +#define EKEYEXPIRED 162 +#define EKEYREVOKED 163 +#define EKEYREJECTED 164 +#define EOWNERDEAD 165 +#define ENOTRECOVERABLE 166 +#define EDQUOT 1133 +#define EPERM 1 +#define ENOENT 2 +#define ESRCH 3 +#define EINTR 4 +#define EIO 5 +#define ENXIO 6 +#define E2BIG 7 +#define ENOEXEC 8 +#define EBADF 9 +#define ECHILD 10 +#define EAGAIN 11 +#define ENOMEM 12 +#define EACCES 13 +#define EFAULT 14 +#define ENOTBLK 15 +#define EBUSY 16 +#define EEXIST 17 +#define EXDEV 18 +#define ENODEV 19 +#define ENOTDIR 20 +#define EISDIR 21 +#define EINVAL 22 +#define ENFILE 23 +#define EMFILE 24 +#define ENOTTY 25 +#define ETXTBSY 26 +#define EFBIG 27 +#define ENOSPC 28 +#define ESPIPE 29 +#define EROFS 30 +#define EMLINK 31 +#define EPIPE 32 +#define EDOM 33 +#define ERANGE 34 + +#else + /* errno values*/ #define EPERM 1 #define ECHILD 10 @@ -153,7 +290,7 @@ extern "C" { #define EDEADLOCK EDEADLK #endif #define ENOTSUP EOPNOTSUPP - +#endif extern int *__errno_location(void); diff --git a/fcntl.h include/fcntl.h index 77407bc..b5bf1f4 100644 --- a/fcntl.h +++ include/fcntl.h @@ -67,6 +67,9 @@ extern "C" { #if __s390__ && !__s390x__ #define F_GETLK64 12 #endif +#if __mips__ && !__mips64__ +#define F_GETLK64 33 +#endif #if __i386__ #define F_SETLK64 13 #endif @@ -79,6 +82,9 @@ extern "C" { #if __s390__ && !__s390x__ #define F_SETLK64 13 #endif +#if __mips__ && !__mips64__ +#define F_SETLK64 34 +#endif #if __i386__ #define F_SETLKW64 14 #endif @@ -91,6 +97,9 @@ extern "C" { #if __s390__ && !__s390x__ #define F_SETLKW64 14 #endif +#if __mips__ && !__mips64__ +#define F_SETLKW64 35 +#endif #define F_SETFD 2 #define F_UNLCK 2 #define F_GETFL 3 @@ -105,6 +114,9 @@ extern "C" { #if __s390x__ #define F_GETLK64 5 #endif +#if __mips64__ +#define F_GETLK64 14 +#endif #define F_SETLK 6 #if __ia64__ #define F_SETLK64 6 @@ -115,6 +127,9 @@ extern "C" { #if __s390x__ #define F_SETLK64 6 #endif +#if __mips64__ +#define F_SETLK64 6 +#endif #define F_SETLKW 7 #if __ia64__ #define F_SETLKW64 7 @@ -125,6 +140,9 @@ extern "C" { #if __s390x__ #define F_SETLKW64 7 #endif +#if __mips64__ +#define F_SETLKW64 7 +#endif #define F_SETOWN 8 #define F_GETOWN 9 diff --git a/fenv.h include/fenv.h index d6ca33b..2702024 100644 --- a/fenv.h +++ include/fenv.h @@ -119,6 +119,37 @@ extern "C" { #if __ia64__ #define FE_UNNORMAL 1UL << 1 #endif +#if __mips__ && !__mips64__ +#define FE_INVALID 0x40 +#endif +#if __mips64__ +#define FE_INVALID 0x40 +#endif +#if __mips__ && !__mips64__ +#define FE_OVERFLOW 0x10 +#endif +#if __mips64__ +#define FE_OVERFLOW 0x10 +#endif +#if __mips__ && !__mips64__ +#define FE_UNDERFLOW 0x08 +#endif +#if __mips64__ +#define FE_UNDERFLOW 0x08 +#endif +#if __mips__ && !__mips64__ +#define FE_DIVBYZERO 0x20 +#endif +#if __mips64__ +#define FE_DIVBYZERO 0x20 +#endif +#if __mips__ && !__mips64__ +#define FE_INEXACT 0x04 +#endif +#if __mips64__ +#define FE_INEXACT 0x04 +#endif + @@ -138,6 +169,10 @@ extern "C" { #define FE_ALL_EXCEPT \ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) #endif +#if __mips__ && !__mips64__ +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) +#endif #if __x86_64__ #define FE_ALL_EXCEPT \ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) @@ -150,6 +185,10 @@ extern "C" { #define FE_ALL_EXCEPT \ (FE_INEXACT | FE_UNDERFLOW | FE_OVERFLOW | FE_DIVBYZERO | FE_UNNORMAL | FE_INVALID) #endif +#if __mips64__ +#define FE_ALL_EXCEPT \ + (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) +#endif @@ -169,12 +208,18 @@ extern "C" { #if __s390__ && !__s390x__ #define FE_TONEAREST 0 #endif +#if __mips__ && !__mips64__ +#define FE_TONEAREST 0 +#endif #if __x86_64__ #define FE_TONEAREST 0 #endif #if __s390x__ #define FE_TONEAREST 0 #endif +#if __mips64__ +#define FE_TONEAREST 0 +#endif #if __s390__ && !__s390x__ #define FE_TOWARDZERO 0x1 #endif @@ -238,6 +283,25 @@ extern "C" { #if __ia64__ #define FE_TOWARDZERO 3 #endif +#if __mips__ && !__mips64__ +#define FE_TOWARDZERO 0x1 +#endif +#if __mips64__ +#define FE_TOWARDZERO 0x1 +#endif +#if __mips__ && !__mips64__ +#define FE_UPWARD 0x2 +#endif +#if __mips64__ +#define FE_UPWARD 0x2 +#endif +#if __mips__ && !__mips64__ +#define FE_DOWNWARD 0x3 +#endif +#if __mips64__ +#define FE_DOWNWARD 0x3 +#endif + @@ -279,6 +343,17 @@ extern "C" { typedef unsigned short fexcept_t; #endif +#if __mips__ && !__mips64__ +/* MIPS */ +typedef unsigned short int fexcept_t; + +#endif +#if __mips64__ +/* MIPS64 */ +typedef unsigned short int fexcept_t; + +#endif + /* Type representing floating-point environment.*/ @@ -353,6 +428,24 @@ extern "C" { } fenv_t; #endif +#if __mips__ && !__mips64__ +/* MIPS */ +typedef struct + { + unsigned int __fp_control_register; + } +fenv_t; + +#endif +#if __mips64__ +/* MIPS64 */ +typedef struct + { + unsigned int __fp_control_register; + } +fenv_t; + +#endif /* If the default argument is used we use this value.*/ #if __powerpc__ && !__powerpc64__ @@ -376,6 +469,12 @@ extern "C" { #if __ia64__ #define FE_DFL_ENV ((__const fenv_t *) 0xc009804c0270033fUL) #endif +#if __mips__ && !__mips64__ +#define FE_DFL_ENV ((__const fenv_t *) -1) +#endif +#if __mips64__ +#define FE_DFL_ENV ((__const fenv_t *) -1) +#endif diff --git a/inttypes.h include/inttypes.h index 36d6557..f07e2e8 100644 --- a/inttypes.h +++ include/inttypes.h @@ -63,6 +63,11 @@ extern "C" { typedef long long int intmax_t; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + typedef long long int intmax_t; + +#endif #if __ia64__ /* IA64 */ typedef unsigned long int uintmax_t; @@ -83,6 +88,11 @@ extern "C" { typedef unsigned long long int uintmax_t; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + typedef unsigned long long int uintmax_t; + +#endif #if __ia64__ /* IA64 */ typedef unsigned long int uintptr_t; @@ -103,6 +113,11 @@ extern "C" { typedef unsigned int uintptr_t; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + typedef unsigned int uintptr_t; + +#endif #if __x86_64__ /* x86-64 */ typedef long int intmax_t; @@ -133,6 +148,21 @@ extern "C" { typedef unsigned long int uintptr_t; #endif +#if __mips64__ +/* MIPS64 */ + typedef long int intmax_t; + +#endif +#if __mips64__ +/* MIPS64 */ + typedef unsigned long int uintmax_t; + +#endif +#if __mips64__ +/* MIPS64 */ + typedef unsigned long int uintptr_t; + +#endif #if __ia64__ /* IA64 */ typedef unsigned long int uint64_t; @@ -163,6 +193,16 @@ extern "C" { typedef unsigned long long int uint64_t; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + typedef unsigned long long int uint64_t; + +#endif +#if __mips64__ +/* MIPS64 */ + typedef unsigned long int uint64_t; + +#endif #define __PDP_ENDIAN 3412 #define PDP_ENDIAN __PDP_ENDIAN diff --git a/limits.h include/limits.h index 41ae207..cd95268 100644 --- a/limits.h +++ include/limits.h @@ -29,6 +29,9 @@ extern "C" { #if __s390x__ #define ULONG_MAX 0xFFFFFFFFFFFFFFFFUL #endif +#if __mips64__ +#define ULONG_MAX 18446744073709551615UL +#endif #if __i386__ #define ULONG_MAX 0xFFFFFFFFUL #endif @@ -38,10 +41,16 @@ extern "C" { #if __s390__ && !__s390x__ #define ULONG_MAX 0xFFFFFFFFUL #endif +#if __mips__ && !__mips64__ +#define ULONG_MAX 4294967295UL +#endif #define ULLONG_MAX 18446744073709551615ULL #if __s390__ && !__s390x__ #define LONG_MAX 2147483647 #endif +#if __mips__ && !__mips64__ +#define LONG_MAX 2147483647L +#endif #if __powerpc__ && !__powerpc64__ #define LONG_MAX 2147483647L #endif @@ -55,6 +64,9 @@ extern "C" { #define LONG_MAX 9223372036854775807L #endif #define LLONG_MAX 9223372036854775807LL +#if __mips64__ +#define LONG_MAX 9223372036854775807L +#endif #define SSIZE_MAX LONG_MAX diff --git a/math.h include/math.h index 016dd6f..0eb57d5 100644 --- a/math.h +++ include/math.h @@ -61,6 +61,14 @@ extern "C" { #define fpclassify(x) \ (sizeof (x) == sizeof (float) ? __fpclassifyf (x) :sizeof (x) == sizeof (double) ? __fpclassify (x) : __fpclassifyl (x)) #endif +#if __mips__ && !__mips64__ +#define fpclassify(x) \ + (sizeof (x) == sizeof (float) ? __fpclassifyf (x) :sizeof (x) == sizeof (double) ? __fpclassify (x) : __fpclassifyl (x)) +#endif +#if __mips64__ +#define fpclassify(x) \ + (sizeof (x) == sizeof (float) ? __fpclassifyf (x) :sizeof (x) == sizeof (double) ? __fpclassify (x) : __fpclassifyl (x)) +#endif #define isinf(x) \ (sizeof (x) == sizeof (float) ? __isinff (x): sizeof (x) == sizeof (double) ? __isinf (x) : __isinfl (x)) #define isnan(x) \ @@ -93,6 +101,14 @@ extern "C" { #define signbit(x) \ (sizeof (x) == sizeof (float)? __signbitf (x): __signbit (x)) #endif +#if __mips__ && !__mips64__ +#define signbit(x) \ + (sizeof (x) == sizeof (float)? __signbitf (x): sizeof (x) == sizeof (double)? __signbit (x) : __signbitl (x)) +#endif +#if __mips64__ +#define signbit(x) \ + (sizeof (x) == sizeof (float)? __signbitf (x): sizeof (x) == sizeof (double)? __signbit (x) : __signbitl (x)) +#endif @@ -132,6 +148,12 @@ extern "C" { #if __x86_64__ #define FP_ILOGBNAN -2147483648 #endif +#if __mips__ && !__mips64__ +#define FP_ILOGB0 -2147483647 +#endif +#if __mips64__ +#define FP_ILOGB0 -2147483647 +#endif #define M_1_PI 0.31830988618379067154 #define M_LOG10E 0.43429448190325182765 #define M_2_PI 0.63661977236758134308 @@ -159,6 +181,12 @@ extern "C" { #if __s390x__ #define FP_ILOGBNAN 2147483647 #endif +#if __mips__ && !__mips64__ +#define FP_ILOGBNAN 2147483647 +#endif +#if __mips64__ +#define FP_ILOGBNAN 2147483647 +#endif #define M_PI 3.14159265358979323846 #define INFINITY HUGE_VALF diff --git a/signal.h include/signal.h index 53720a4..2480d16 100644 --- a/signal.h +++ include/signal.h @@ -186,6 +186,9 @@ extern "C" { #if __s390__ && !__s390x__ #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int))-3) #endif +#if __mips__ || __mips64__ +#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE / sizeof (int)) - 3) +#endif #if __ia64__ #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int))-4) #endif @@ -231,6 +234,9 @@ extern "C" { #if __s390__ && !__s390x__ #define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int))-3) #endif +#if __mips__ && !__mips64__ +#define SI_PAD_SIZE ((SI_MAX_SIZE / sizeof (int)) - 3) +#endif #if __ia64__ #define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int))-4) #endif @@ -243,6 +249,9 @@ extern "C" { #if __s390x__ #define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int))-4) #endif +#if __mips64__ +#define SI_PAD_SIZE ((SI_MAX_SIZE / sizeof (int)) - 4) +#endif #define SI_MAX_SIZE 128 #define si_pid _sifields._kill._pid #define si_uid _sifields._kill._uid @@ -450,6 +459,19 @@ extern "C" { }; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + struct sigaction { + union { + sighandler_t _sa_handler; + void (*_sa_sigaction) (int, siginfo_t *, void *); + } __sigaction_handler; + sigset_t sa_mask; + unsigned int sa_flags; + void (*sa_restorer) (void); + }; + +#endif #if __powerpc64__ /* PPC64 */ struct sigaction { @@ -489,6 +511,20 @@ extern "C" { }; #endif +#if __mips64__ +/* MIPS */ + struct sigaction { + union { + sighandler_t _sa_handler; + void (*_sa_sigaction) (int, siginfo_t *, void *); + } __sigaction_handler; + sigset_t sa_mask; + unsigned int sa_flags; + void (*sa_restorer) (void); + int sa_resv[1]; + }; + +#endif /* Structure used in sigaltstack call.*/ #if __ia64__ @@ -821,6 +857,52 @@ extern "C" { }; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + struct sigcontext { + unsigned int sc_regmask; + unsigned int sc_status; + unsigned long long sc_pc; + unsigned long long sc_regs[32]; + 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; + unsigned long long sc_mdhi; + 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; + }; + +#endif +#if __mips64__ +/* MIPS64 */ + struct sigcontext { + unsigned long long sc_regs[32]; + unsigned long long sc_fpregs[32]; + unsigned long long sc_mdhi; + unsigned long long sc_hi1; + unsigned long long sc_hi2; + unsigned long long sc_hi3; + unsigned long long sc_mdlo; + unsigned long long sc_lo1; + unsigned long long sc_lo2; + unsigned long long sc_lo3; + unsigned long long sc_pc; + unsigned int sc_fpc_csr; + unsigned int sc_used_math; + unsigned int sc_dsp; + unsigned int sc_reserved; + } +}; + +#endif extern int __libc_current_sigrtmax(void); extern int __libc_current_sigrtmin(void); diff --git a/stddef.h include/stddef.h index f263bd8..0f5254d 100644 --- a/stddef.h +++ include/stddef.h @@ -45,6 +45,11 @@ extern "C" { typedef unsigned long int size_t; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + typedef unsigned int size_t; + +#endif #if __i386__ /* IA32 */ typedef int ptrdiff_t; @@ -60,6 +65,11 @@ extern "C" { typedef int ptrdiff_t; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + typedef int ptrdiff_t; + +#endif #if __powerpc64__ /* PPC64 */ typedef long int ptrdiff_t; @@ -85,6 +95,16 @@ extern "C" { typedef long int ptrdiff_t; #endif +#if __mips64__ +/* MIPS64 */ + typedef long int ptrdiff_t; + +#endif +#if __mips64__ +/* MIPS64 */ + typedef unsigned long int size_t; + +#endif #ifdef __cplusplus } diff --git a/stdio.h include/stdio.h index b266c5e..e84cada 100644 --- a/stdio.h +++ include/stdio.h @@ -23,6 +23,9 @@ extern "C" { #if __s390__ && !__s390x__ #define __IO_FILE_SIZE 152 #endif +#if __mips__ && !__mips64__ +#define __IO_FILE_SIZE 152 +#endif #define FOPEN_MAX 16 #define L_tmpnam 20 #if __ia64__ @@ -37,6 +40,9 @@ extern "C" { #if __s390x__ #define __IO_FILE_SIZE 216 #endif +#if __mips64__ +#define __IO_FILE_SIZE 216 +#endif #define FILENAME_MAX 4096 #define BUFSIZ 8192 #define L_ctermid 9 diff --git a/sys/ioctl.h include/sys/ioctl.h index bc2444b..fd5a680 100644 --- a/sys/ioctl.h +++ include/sys/ioctl.h @@ -22,12 +22,18 @@ extern "C" { #if __s390__ && !__s390x__ #define TIOCGWINSZ 0x5413 #endif +#if __mips__ && !__mips64__ +#define TIOCSWINSZ _IOW('t', 103, struct winsize) +#endif #if __x86_64__ #define TIOCGWINSZ 0x5413 #endif #if __s390x__ #define TIOCGWINSZ 0x5413 #endif +#if __mips64__ +#define TIOCSWINSZ _IOW('t', 103, struct winsize) +#endif #if __i386__ #define FIONREAD 0x541B #endif @@ -37,6 +43,9 @@ extern "C" { #if __s390__ && !__s390x__ #define FIONREAD 0x541B #endif +#if __mips__ && !__mips64__ +#define FIONREAD 0x467f +#endif #if __x86_64__ #define FIONREAD 0x541B #endif @@ -58,18 +67,27 @@ extern "C" { #if __s390x__ #define FIONREAD 21531 #endif +#if __mips64__ +#define FIONREAD 0x467f +#endif #if __powerpc64__ #define TIOCNOTTY 21538 #endif #if __s390__ && !__s390x__ #define TIOCNOTTY 21538 #endif +#if __mips__ && !__mips64__ +#define TIOCNOTTY 0x5471 +#endif #if __x86_64__ #define TIOCNOTTY 21538 #endif #if __s390x__ #define TIOCNOTTY 21538 #endif +#if __mips64__ +#define TIOCNOTTY 0x5471 +#endif struct winsize { diff --git a/sys/ipc.h include/sys/ipc.h index 68d7537..d73da9d 100644 --- a/sys/ipc.h +++ include/sys/ipc.h @@ -83,6 +83,23 @@ extern "C" { }; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + struct ipc_perm + { + __key_t __key; + unsigned int uid; + unsigned int gid; + unsigned int cuid; + unsigned int cgid; + unsigned int mode; + unsigned short int __seq; + unsigned short int __pad1; + unsigned long int __unused1; + unsigned long int __unused2; + }; + +#endif #if __powerpc64__ /* PPC64 */ struct ipc_perm { @@ -132,6 +149,23 @@ extern "C" { }; #endif +#if __mips64__ +/* MIPS64 */ + struct ipc_perm + { + __key_t __key; + unsigned int uid; + unsigned int gid; + unsigned int cuid; + unsigned int cgid; + unsigned int mode; + unsigned short int __seq; + unsigned short int __pad1; + unsigned long int __unused1; + unsigned long int __unused2; + }; + +#endif /* common mode bits*/ diff --git a/sys/mman.h include/sys/mman.h index bd4986d..d8e7c08 100644 --- a/sys/mman.h +++ include/sys/mman.h @@ -17,7 +17,13 @@ extern "C" { #define PROT_READ 0x1 #define MAP_FIXED 0x10 #define PROT_WRITE 0x2 +#if __mips__ && !__mips64__ +#define MAP_ANONYMOUS 0x0800 +#elif __mips64__ +#define MAP_ANONYMOUS 0x0800 +#else #define MAP_ANONYMOUS 0x20 +#endif #define PROT_EXEC 0x4 #if __i386__ #define MCL_CURRENT 1 @@ -28,12 +34,18 @@ extern "C" { #if __s390__ && !__s390x__ #define MCL_CURRENT 1 #endif +#if __mips__ && !__mips64__ +#define MCL_CURRENT 1 +#endif #if __x86_64__ #define MCL_CURRENT 1 #endif #if __s390x__ #define MCL_CURRENT 1 #endif +#if __mips64__ +#define MCL_CURRENT 1 +#endif #define MS_ASYNC 1 #if __powerpc__ && !__powerpc64__ #define MCL_FUTURE 16384 @@ -50,12 +62,18 @@ extern "C" { #if __s390__ && !__s390x__ #define MCL_FUTURE 2 #endif +#if __mips__ && !__mips64__ +#define MCL_FUTURE 2 +#endif #if __x86_64__ #define MCL_FUTURE 2 #endif #if __s390x__ #define MCL_FUTURE 2 #endif +#if __mips64__ +#define MCL_FUTURE 2 +#endif #define MS_INVALIDATE 2 #define MS_SYNC 4 #if __powerpc__ && !__powerpc64__ diff --git a/sys/msg.h include/sys/msg.h index 98f25db..bc5a8d1 100644 --- a/sys/msg.h +++ include/sys/msg.h @@ -42,6 +42,16 @@ extern "C" { typedef unsigned long int msgqnum_t; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + typedef unsigned long int msglen_t; + +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + typedef unsigned long int msgqnum_t; + +#endif #if __powerpc__ && !__powerpc64__ /* PPC32 */ typedef unsigned long int msgqnum_t; @@ -77,6 +87,17 @@ extern "C" { typedef unsigned long int msgqnum_t; #endif +#if __mips64__ +/* MIPS64 */ + typedef unsigned long int msglen_t; + +#endif +#if __mips64__ +/* MIPS64 */ + typedef unsigned long int msgqnum_t; + +#endif + /* Message Queue structure*/ @@ -209,6 +230,58 @@ extern "C" { }; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + struct msqid_ds { + struct ipc_perm msg_perm; /* structure describing operation permission */ +#if defined (__MIPSEB__) + unsigned long int __unused1; +#endif + time_t msg_stime; /* time of last msgsnd command */ +#if defined (__MIPSEL__) + unsigned long int __unused1; +#endif +#if defined (__MIPSEB__) + unsigned long int __unused2; +#endif + time_t msg_rtime; /* time of last msgrcv command */ +#if defined (__MIPSEL__) + unsigned long int __unused2; +#endif +#if defined (__MIPSEB__) + unsigned long int __unused3; +#endif + time_t msg_ctime; /* time of last change */ +#if defined (__MIPSEL__) + unsigned long int __unused3; +#endif + unsigned long int __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ + pid_t msg_lspid; /* pid of last msgsnd() */ + pid_t msg_lrpid; /* pid of last msgrcv() */ + unsigned long int __unused4; + unsigned long int __unused5; + }; + +#endif +#if __mips64__ +/* MIPS64 */ + struct msqid_ds { + struct ipc_perm msg_perm; + time_t msg_stime; + time_t msg_rtime; + time_t msg_ctime; + unsigned long int __msg_cbytes; + msgqnum_t msg_qnum; + msglen_t msg_qbytes; + pid_t msg_lspid; + pid_t msg_lrpid; + unsigned long int __unused4; + unsigned long int __unused5; + }; + +#endif extern int msgctl(int, int, struct msqid_ds *); extern int msgget(key_t, int); diff --git a/sys/sem.h include/sys/sem.h index f57e919..8894050 100644 --- a/sys/sem.h +++ include/sys/sem.h @@ -80,6 +80,19 @@ extern "C" { }; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + struct semid_ds { + struct ipc_perm sem_perm; + time_t sem_otime; + time_t sem_ctime; + unsigned long int sem_nsems; + unsigned long int __unused3; + unsigned long int __unused4; + }; + +#endif + #if __powerpc64__ /* PPC64 */ struct semid_ds { @@ -116,6 +129,18 @@ extern "C" { unsigned long int __unused3; unsigned long int __unused4; }; +#if __mips64__ +/* MIPS64 */ + struct semid_ds { + struct ipc_perm sem_perm; + time_t sem_otime; + time_t sem_ctime; + unsigned long int sem_nsems; + unsigned long int __unused3; + unsigned long int __unused4; + }; + +#endif #endif diff --git a/sys/shm.h include/sys/shm.h index 7bf0398..1574c0b 100644 --- a/sys/shm.h +++ include/sys/shm.h @@ -31,6 +31,9 @@ extern "C" { #if __s390x__ #define SHMLBA (__getpagesize()) #endif +#if __mips__ || __mips64__ +#define SHMLBA 0x40000 +#endif #define SHM_RDONLY 010000 #define SHM_W 0200 #define SHM_RND 020000 @@ -58,6 +61,11 @@ extern "C" { typedef unsigned long int shmatt_t; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + typedef unsigned long int shmatt_t; + +#endif #if __powerpc64__ /* PPC64 */ typedef unsigned long int shmatt_t; @@ -73,6 +81,11 @@ extern "C" { typedef unsigned long int shmatt_t; #endif +#if __mips64__ +/* MIPS64 */ + typedef unsigned long int shmatt_t; + +#endif @@ -150,6 +163,23 @@ extern "C" { }; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + struct shmid_ds + { + struct ipc_perm shm_perm; + size_t shm_segsz; + __time_t shm_atime; + __time_t shm_dtime; + __time_t shm_ctime; + __pid_t shm_cpid; + __pid_t shm_lpid; + shmatt_t shm_nattch; + unsigned long int __unused1; + unsigned long int __unused2; + }; + +#endif #if __powerpc64__ /* PPC64 */ struct shmid_ds { @@ -198,6 +228,23 @@ extern "C" { }; #endif +#if __mips64__ +/* MIPS64 */ + struct shmid_ds + { + struct ipc_perm shm_perm; + size_t shm_segsz; + __time_t shm_atime; + __time_t shm_dtime; + __time_t shm_ctime; + __pid_t shm_cpid; + __pid_t shm_lpid; + shmatt_t shm_nattch; + unsigned long int __unused1; + unsigned long int __unused2; + }; + +#endif extern int __getpagesize(void); extern void *shmat(int, const void *, int); diff --git a/sys/socket.h include/sys/socket.h index 075bcc7..2795a7f 100644 --- a/sys/socket.h +++ include/sys/socket.h @@ -91,7 +91,16 @@ extern "C" { typedef uint64_t __ss_aligntype; #endif + #if __mip64__ && !__mips64__ +/* MIPS */ + typedef uint32_t __ss_aligntype; +#endif +#if __mips64__ +/* MIPS64 */ + typedef uint64_t __ss_aligntype; + +#endif struct sockaddr { @@ -146,7 +155,13 @@ extern "C" { /* Socket Options*/ #define SO_DEBUG 1 +#if __mips__ && !__mips64__ +#define SO_OOBINLINE 0x0100 +#elif __mips64__ +#define SO_OOBINLINE 0x0100 +#else #define SO_OOBINLINE 10 +#endif #define SO_NO_CHECK 11 #define SO_PRIORITY 12 #define SO_LINGER 13 @@ -172,18 +187,30 @@ extern "C" { #if __s390__ && !__s390x__ #define SO_RCVLOWAT 18 #endif +#if __mips__ && !__mips64__ +#define SO_RCVLOWAT 0x1004 +#endif #if __x86_64__ #define SO_RCVLOWAT 18 #endif #if __s390x__ #define SO_RCVLOWAT 18 #endif +#if __mips64__ +#define SO_RCVLOWAT 0x1004 +#endif #if __powerpc__ && !__powerpc64__ #define SO_RCVTIMEO 18 #endif #if __powerpc64__ #define SO_RCVTIMEO 18 #endif +#if __mips__ && !__mips64__ +#define SO_RCVTIMEO 0x1006 +#endif +#if __mips64__ +#define SO_RCVTIMEO 0x1006 +#endif #if __i386__ #define SO_SNDLOWAT 19 #endif @@ -205,7 +232,19 @@ extern "C" { #if __powerpc64__ #define SO_SNDTIMEO 19 #endif +#if __mips__ && !__mips64__ +#define SO_SNDTIMEO 0x1005 +#endif +#if __mips64__ +#define SO_SNDTIMEO 0x1005 +#endif +#if __mips__ && !__mips64__ +#define SO_REUSEADDR 0x0004 +#elif __mips64__ +#define SO_REUSEADDR 0x0004 +#else #define SO_REUSEADDR 2 +#endif #if __i386__ #define SO_RCVTIMEO 20 #endif @@ -236,6 +275,16 @@ extern "C" { #if __s390x__ #define SO_SNDTIMEO 21 #endif +#if __mips__ || __mips64__ +#define SO_TYPE 0x1008 +#define SO_ACCEPTCONN 0x1009 +#define SO_ERROR 0x1007 +#define SO_DONTROUTE 0x0010 +#define SO_BROADCAST 0x0020 +#define SO_SNDBUF 0x1001 +#define SO_RCVBUF 0x1002 +#define SO_KEEPALIVE 0x0008 +#else #define SO_TYPE 3 #define SO_ACCEPTCONN 30 #define SO_ERROR 4 @@ -244,6 +293,7 @@ extern "C" { #define SO_SNDBUF 7 #define SO_RCVBUF 8 #define SO_KEEPALIVE 9 +#endif diff --git a/sys/stat.h include/sys/stat.h index 0e3ebe1..67d06d5 100644 --- a/sys/stat.h +++ include/sys/stat.h @@ -64,6 +64,12 @@ extern "C" { #if __s390__ && !__s390x__ #define _STAT_VER 3 #endif +#if __mips__ && !__mips64__ +#define _STAT_VER 3 +#endif +#if __mips64__ +#define _STAT_VER 3 +#endif #define st_atime st_atim.tv_sec #define st_ctime st_ctim.tv_sec #define st_mtime st_mtim.tv_sec @@ -379,7 +385,99 @@ extern "C" { }; #endif +#if __mips64__ +/* MIPS64 */ + struct stat { + dev_t st_dev; + int st_pad1[3]; + ino_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[2]; + off_t st_size; + int st_pad3; + 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. */ + blksize_t st_blksize; + unsigned int st_pad4; + blkcnt_t st_blocks; + int st_pad5[14]; + }; + +#endif +#if __mips64__ +/* MIPS64 */ + struct stat64 { + dev_t st_dev; + unsigned int st_pad1[3]; + 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]; + off64_t st_size; + 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. */ + blksize_t st_blksize; + unsigned int st_pad3; + blkcnt64_t st_blocks; + int st_pad4[14]; + }; + +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + struct stat { + unsigned long int st_dev; + long int st_pad1[3]; + ino_t st_ino; + mode_t st_mode; + nlink_t st_nlink; + uid_t st_uid; + gid_t st_gid; + unsigned long int st_rdev; + long int st_pad2[2]; + off_t st_size; + long int st_pad3; + 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. */ + blksize_t st_blksize; + blkcnt_t st_blocks; + long int st_pad5[14]; + }; + +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + struct stat64 { + unsigned long int st_dev; + long int st_pad1[3]; + ino64_t __st_ino; + mode_t st_mode; + nlink_t st_nlink; + uid_t st_uid; + gid_t st_gid; + unsigned long int st_rdev; + long int st_pad2[3]; + off64_t st_size; + 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. */ + blksize_t st_blksize; + long int st_pad3; + blkcnt64_t st_blocks; + long int st_pad4[14]; + }; +#endif diff --git a/sys/statvfs.h include/sys/statvfs.h index b6e9667..ee38d42 100644 --- a/sys/statvfs.h +++ include/sys/statvfs.h @@ -268,6 +268,84 @@ extern "C" { }; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + struct statvfs { + unsigned long int f_bsize; + unsigned long int f_frsize; + fsblkcnt_t f_blocks; + fsblkcnt_t f_bfree; + fsblkcnt_t f_bavail; + fsfilcnt_t f_files; + fsfilcnt_t f_ffree; + fsfilcnt_t f_favail; + unsigned long int f_fsid; + int __f_unused; + unsigned long int f_flag; + unsigned long int f_namemax; + int __f_spare[6]; + }; + +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + struct statvfs64 { + unsigned long int f_bsize; + unsigned long int f_frsize; + fsblkcnt64_t f_blocks; + fsblkcnt64_t f_bfree; + fsblkcnt64_t f_bavail; + fsfilcnt64_t f_files; + fsfilcnt64_t f_ffree; + fsfilcnt64_t f_favail; + unsigned long int f_fsid; + int __f_unused; + unsigned long int f_flag; + unsigned long int f_namemax; + int __f_spare[6]; + }; + +#endif +#if __x86_64__ +/* MIPS64 */ + struct statvfs { + unsigned long int f_bsize; + unsigned long int f_frsize; + fsblkcnt_t f_blocks; + fsblkcnt_t f_bfree; + fsblkcnt_t f_bavail; + fsfilcnt_t f_files; + fsfilcnt_t f_ffree; + fsfilcnt_t f_favail; + unsigned long int f_fsid; + int __f_unused; + unsigned long int f_flag; + unsigned long int f_namemax; + int __f_spare[6]; + }; + +#endif +#if __mips64__ +/* MIPS64 */ + struct statvfs64 { + unsigned long int f_bsize; + unsigned long int f_frsize; + fsblkcnt64_t f_blocks; + fsblkcnt64_t f_bfree; + fsblkcnt64_t f_bavail; + fsfilcnt64_t f_files; + fsfilcnt64_t f_ffree; + fsfilcnt64_t f_favail; + unsigned long int f_fsid; + int __f_unused; + unsigned long int f_flag; + unsigned long int f_namemax; + int __f_spare[6]; + }; + +#endif + + extern int fstatvfs(int, struct statvfs *); extern int fstatvfs64(int, struct statvfs64 *); diff --git a/sys/types.h include/sys/types.h index 6f107b3..b4c6a18 100644 --- a/sys/types.h +++ include/sys/types.h @@ -82,6 +82,11 @@ extern "C" { typedef long int int64_t; #endif +#if __mips64__ +/* MIPS64 */ + typedef long int int64_t; + +#endif #if __powerpc__ && !__powerpc64__ /* PPC32 */ typedef long long int int64_t; @@ -92,6 +97,11 @@ extern "C" { typedef long long int int64_t; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + typedef long long int int64_t; + +#endif /* These types are derived from the ones above*/ @@ -118,6 +128,11 @@ extern "C" { typedef int32_t ssize_t; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + typedef int32_t ssize_t; + +#endif #if __powerpc64__ /* PPC64 */ typedef int64_t ssize_t; @@ -133,6 +148,10 @@ extern "C" { typedef int64_t ssize_t; #endif +#if __mips64__ +/* MIPS64 */ + typedef int64_t ssize_t; +#endif /* Stuff that really in bits/types.h*/ @@ -188,6 +207,9 @@ extern "C" { #if __s390x__ #define __FDSET_LONGS 16 #endif +#if __mips64__ +#define __FDSET_LONGS 16 +#endif #if __i386__ #define __FDSET_LONGS 32 #endif @@ -197,6 +219,9 @@ extern "C" { #if __s390__ && !__s390x__ #define __FDSET_LONGS 32 #endif +#if __mips__ && !__mips64__ +#define __FDSET_LONGS 32 +#endif typedef struct { @@ -249,6 +274,25 @@ extern "C" { #define __WORDSIZE_COMPAT32 1 #define __BYTE_ORDER __LITTLE_ENDIAN #endif +#if __mips__ && !__mips64__ +#define __WORDSIZE 32 +#if __MIPSEB__ +#define __BYTE_ORDER __BIG_ENDIAN +#endif +#if __MIPSEL__ +#define __BYTE_ORDER __LITTLE_ENDIAN +#endif +#endif +#if __mips64__ +#define __WORDSIZE 64 +#define __WORDSIZE_COMPAT32 1 +#if __MIPSEB__ +#define __BYTE_ORDER __BIG_ENDIAN +#endif +#if __MIPSEL__ +#define __BYTE_ORDER __LITTLE_ENDIAN +#endif +#endif diff --git a/termios.h include/termios.h index 4a06fe5..fbfff6d 100644 --- a/termios.h +++ include/termios.h @@ -30,6 +30,12 @@ extern "C" { #if __x86_64__ #define OLCUC 0000002 #endif +#if __mips__ && !__mips64__ +#define OLCUC 0000002 +#endif +#if __mips64__ +#define OLCUC 0000002 +#endif #if __i386__ #define ONLCR 0000004 #endif @@ -42,6 +48,12 @@ extern "C" { #if __x86_64__ #define ONLCR 0000004 #endif +#if __mips__ && !__mips64__ +#define ONLCR 0000004 +#endif +#if __mips64__ +#define ONLCR 0000004 +#endif #if __i386__ #define XCASE 0000004 #endif @@ -54,6 +66,12 @@ extern "C" { #if __x86_64__ #define XCASE 0000004 #endif +#if __mips__ && !__mips64__ +#define XCASE 0000004 +#endif +#if __mips64__ +#define XCASE 0000004 +#endif #define OCRNL 0000010 #define ONOCR 0000020 #define ONLRET 0000040 @@ -72,6 +90,12 @@ extern "C" { #if __x86_64__ #define NLDLY 0000400 #endif +#if __mips__ && !__mips64__ +#define NLDLY 0000400 +#endif +#if __mips64__ +#define NLDLY 0000400 +#endif #if __i386__ #define CR1 0001000 #endif @@ -84,6 +108,12 @@ extern "C" { #if __x86_64__ #define CR1 0001000 #endif +#if __mips__ && !__mips64__ +#define CR1 0001000 +#endif +#if __mips64__ +#define CR1 0001000 +#endif #if __i386__ #define IUCLC 0001000 #endif @@ -96,6 +126,12 @@ extern "C" { #if __x86_64__ #define IUCLC 0001000 #endif +#if __mips__ && !__mips64__ +#define IUCLC 0001000 +#endif +#if __mips64__ +#define IUCLC 0001000 +#endif #if __i386__ #define CR2 0002000 #endif @@ -108,6 +144,12 @@ extern "C" { #if __x86_64__ #define CR2 0002000 #endif +#if __mips__ && !__mips64__ +#define CR2 0002000 +#endif +#if __mips64__ +#define CR2 0002000 +#endif #if __i386__ #define CR3 0003000 #endif @@ -120,6 +162,12 @@ extern "C" { #if __x86_64__ #define CR3 0003000 #endif +#if __mips__ && !__mips64__ +#define CR3 0003000 +#endif +#if __mips64__ +#define CR3 0003000 +#endif #if __i386__ #define CRDLY 0003000 #endif @@ -132,6 +180,12 @@ extern "C" { #if __x86_64__ #define CRDLY 0003000 #endif +#if __mips__ && !__mips64__ +#define CRDLY 0003000 +#endif +#if __mips64__ +#define CRDLY 0003000 +#endif #if __i386__ #define TAB1 0004000 #endif @@ -144,6 +198,12 @@ extern "C" { #if __x86_64__ #define TAB1 0004000 #endif +#if __mips__ && !__mips64__ +#define TAB1 0004000 +#endif +#if __mips64__ +#define TAB1 0004000 +#endif #if __i386__ #define TAB2 0010000 #endif @@ -156,6 +216,12 @@ extern "C" { #if __x86_64__ #define TAB2 0010000 #endif +#if __mips__ && !__mips64__ +#define TAB2 0010000 +#endif +#if __mips64__ +#define TAB2 0010000 +#endif #if __i386__ #define TAB3 0014000 #endif @@ -168,6 +234,12 @@ extern "C" { #if __x86_64__ #define TAB3 0014000 #endif +#if __mips__ && !__mips64__ +#define TAB3 0014000 +#endif +#if __mips64__ +#define TAB3 0014000 +#endif #if __i386__ #define TABDLY 0014000 #endif @@ -180,6 +252,12 @@ extern "C" { #if __x86_64__ #define TABDLY 0014000 #endif +#if __mips__ && !__mips64__ +#define TABDLY 0014000 +#endif +#if __mips64__ +#define TABDLY 0014000 +#endif #if __i386__ #define BS1 0020000 #endif @@ -192,6 +270,12 @@ extern "C" { #if __x86_64__ #define BS1 0020000 #endif +#if __mips__ && !__mips64__ +#define BS1 0020000 +#endif +#if __mips64__ +#define BS1 0020000 +#endif #if __i386__ #define BSDLY 0020000 #endif @@ -204,6 +288,12 @@ extern "C" { #if __x86_64__ #define BSDLY 0020000 #endif +#if __mips__ && !__mips64__ +#define BSDLY 0020000 +#endif +#if __mips64__ +#define BSDLY 0020000 +#endif #if __i386__ #define VT1 0040000 #endif @@ -216,6 +306,12 @@ extern "C" { #if __x86_64__ #define VT1 0040000 #endif +#if __mips__ && !__mips64__ +#define VT1 0040000 +#endif +#if __mips64__ +#define VT1 0040000 +#endif #if __i386__ #define VTDLY 0040000 #endif @@ -228,6 +324,12 @@ extern "C" { #if __x86_64__ #define VTDLY 0040000 #endif +#if __mips__ && !__mips64__ +#define VTDLY 0040000 +#endif +#if __mips64__ +#define VTDLY 0040000 +#endif #if __i386__ #define FF1 0100000 #endif @@ -240,6 +342,12 @@ extern "C" { #if __x86_64__ #define FF1 0100000 #endif +#if __mips__ && !__mips64__ +#define FF1 0100000 +#endif +#if __mips64__ +#define FF1 0100000 +#endif #if __i386__ #define FFDLY 0100000 #endif @@ -252,6 +360,12 @@ extern "C" { #if __x86_64__ #define FFDLY 0100000 #endif +#if __mips__ && !__mips64__ +#define FFDLY 0100000 +#endif +#if __mips64__ +#define FFDLY 0100000 +#endif #define TCOFLUSH 1 #define TCOON 1 #define TCSADRAIN 1 @@ -475,6 +589,12 @@ extern "C" { #if __s390x__ #define VSUSP 10 #endif +#if __mips__ && !__mips64__ +#define VSUSP 10 +#endif +#if __mips64__ +#define VSUSP 10 +#endif #if __powerpc__ && !__powerpc64__ #define VWERASE 10 #endif @@ -496,6 +616,12 @@ extern "C" { #if __s390x__ #define VEOL 11 #endif +#if __mips__ && !__mips64__ +#define VEOL 17 +#endif +#if __mips64__ +#define VEOL 17 +#endif #if __powerpc__ && !__powerpc64__ #define VREPRINT 11 #endif @@ -517,6 +643,12 @@ extern "C" { #if __s390x__ #define VREPRINT 12 #endif +#if __mips__ && !__mips64__ +#define VREPRINT 12 +#endif +#if __mips64__ +#define VREPRINT 12 +#endif #if __powerpc__ && !__powerpc64__ #define VSUSP 12 #endif @@ -538,6 +670,12 @@ extern "C" { #if __s390x__ #define VDISCARD 13 #endif +#if __mips__ && !__mips64__ +#define VDISCARD 13 +#endif +#if __mips64__ +#define VDISCARD 13 +#endif #if __powerpc__ && !__powerpc64__ #define VSTART 13 #endif @@ -565,6 +703,12 @@ extern "C" { #if __s390x__ #define VWERASE 14 #endif +#if __mips__ && !__mips64__ +#define VWERASE 14 +#endif +#if __mips64__ +#define VWERASE 14 +#endif #define VLNEXT 15 #if __powerpc__ && !__powerpc64__ #define VDISCARD 16 @@ -587,6 +731,12 @@ extern "C" { #if __s390x__ #define VEOL2 16 #endif +#if __mips__ && !__mips64__ +#define VEOL2 6 +#endif +#if __mips64__ +#define VEOL2 6 +#endif #define VERASE 2 #define VKILL 3 #define VEOF 4 @@ -617,6 +767,12 @@ extern "C" { #if __s390x__ #define VMIN 6 #endif +#if __mips__ && !__mips64__ +#define VMIN 4 +#endif +#if __mips64__ +#define VMIN2 4 +#endif #if __i386__ #define VSWTC 7 #endif @@ -632,6 +788,12 @@ extern "C" { #if __s390x__ #define VSWTC 7 #endif +#if __mips__ && !__mips64__ +#define VSWTC 7 +#endif +#if __mips64__ +#define VSWTC 7 +#endif #if __powerpc__ && !__powerpc64__ #define VEOL2 8 #endif @@ -653,6 +815,12 @@ extern "C" { #if __s390x__ #define VSTART 8 #endif +#if __mips__ && !__mips64__ +#define VSTART 8 +#endif +#if __mips64__ +#define VSTART 8 +#endif #if __i386__ #define VSTOP 9 #endif @@ -668,6 +836,12 @@ extern "C" { #if __s390x__ #define VSTOP 9 #endif +#if __mips__ && !__mips64__ +#define VSTOP 9 +#endif +#if __mips64__ +#define VSTOP 9 +#endif #if __powerpc__ && !__powerpc64__ #define VSWTC 9 #endif @@ -699,6 +873,12 @@ extern "C" { #if __x86_64__ #define IXON 0002000 #endif +#if __mips__ && !__mips64__ +#define IXON 0002000 +#endif +#if __mips64__ +#define IXON 0002000 +#endif #define IXANY 0004000 #if __i386__ #define IXOFF 0010000 @@ -712,6 +892,12 @@ extern "C" { #if __x86_64__ #define IXOFF 0010000 #endif +#if __mips__ && !__mips64__ +#define IXOFF 0010000 +#endif +#if __mips64__ +#define IXOFF 0010000 +#endif #define IMAXBEL 0020000 #if __powerpc__ && !__powerpc64__ #define IXOFF 1024 @@ -752,6 +938,12 @@ extern "C" { #if __x86_64__ #define CS6 0000020 #endif +#if __mips__ && !__mips64__ +#define CS6 0000020 +#endif +#if __mips64__ +#define CS6 0000020 +#endif #if __i386__ #define CS7 0000040 #endif @@ -764,6 +956,12 @@ extern "C" { #if __x86_64__ #define CS7 0000040 #endif +#if __mips__ && !__mips64__ +#define CS7 0000040 +#endif +#if __mips64__ +#define CS7 0000040 +#endif #if __i386__ #define CS8 0000060 #endif @@ -776,6 +974,12 @@ extern "C" { #if __x86_64__ #define CS8 0000060 #endif +#if __mips__ && !__mips64__ +#define CS8 0000060 +#endif +#if __mips64__ +#define CS8 0000060 +#endif #if __i386__ #define CSIZE 0000060 #endif @@ -788,6 +992,12 @@ extern "C" { #if __x86_64__ #define CSIZE 0000060 #endif +#if __mips__ && !__mips64__ +#define CSIZE 0000060 +#endif +#if __mips64__ +#define CSIZE 0000060 +#endif #if __i386__ #define CSTOPB 0000100 #endif @@ -800,6 +1010,12 @@ extern "C" { #if __x86_64__ #define CSTOPB 0000100 #endif +#if __mips__ && !__mips64__ +#define CSTOPB 0000100 +#endif +#if __mips64__ +#define CSTOPB 0000100 +#endif #if __i386__ #define CREAD 0000200 #endif @@ -812,6 +1028,12 @@ extern "C" { #if __x86_64__ #define CREAD 0000200 #endif +#if __mips__ && !__mips64__ +#define CREAD 0000200 +#endif +#if __mips64__ +#define CREAD 0000200 +#endif #if __i386__ #define PARENB 0000400 #endif @@ -824,6 +1046,12 @@ extern "C" { #if __x86_64__ #define PARENB 0000400 #endif +#if __mips__ && !__mips64__ +#define PARENB 0000400 +#endif +#if __mips64__ +#define PARENB 0000200 +#endif #if __i386__ #define PARODD 0001000 #endif @@ -836,6 +1064,12 @@ extern "C" { #if __x86_64__ #define PARODD 0001000 #endif +#if __mips__ && !__mips64__ +#define PARODD 0001000 +#endif +#if __mips64__ +#define PARODD 0001000 +#endif #if __i386__ #define HUPCL 0002000 #endif @@ -848,6 +1082,12 @@ extern "C" { #if __x86_64__ #define HUPCL 0002000 #endif +#if __mips__ && !__mips64__ +#define HUPCL 0002000 +#endif +#if __mips64__ +#define HUPCL 0002000 +#endif #if __i386__ #define CLOCAL 0004000 #endif @@ -860,6 +1100,12 @@ extern "C" { #if __x86_64__ #define CLOCAL 0004000 #endif +#if __mips__ && !__mips64__ +#define CLOCAL 0004000 +#endif +#if __mips64__ +#define CLOCAL 0004000 +#endif #if __powerpc__ && !__powerpc64__ #define CSTOPB 1024 #endif @@ -935,6 +1181,12 @@ extern "C" { #if __s390x__ #define VTIME 5 #endif +#if __mips__ && !__mips64__ +#define VTIME 5 +#endif +#if __mips64__ +#define VTIME 5 +#endif #if __powerpc__ && !__powerpc64__ #define CS7 512 #endif @@ -987,6 +1239,12 @@ extern "C" { #if __x86_64__ #define ISIG 0000001 #endif +#if __mips__ && !__mips64__ +#define ISIG 0000001 +#endif +#if __mips64__ +#define ISIG 0000001 +#endif #if __i386__ #define ICANON 0000002 #endif @@ -999,6 +1257,12 @@ extern "C" { #if __x86_64__ #define ICANON 0000002 #endif +#if __mips__ && !__mips64__ +#define ICANON 0000002 +#endif +#if __mips64__ +#define ICANON 0000002 +#endif #define ECHO 0000010 #if __i386__ #define ECHOE 0000020 @@ -1012,6 +1276,12 @@ extern "C" { #if __x86_64__ #define ECHOE 0000020 #endif +#if __mips__ && !__mips64__ +#define ECHOE 0000020 +#endif +#if __mips64__ +#define ECHOE 0000020 +#endif #if __i386__ #define ECHOK 0000040 #endif @@ -1024,6 +1294,12 @@ extern "C" { #if __x86_64__ #define ECHOK 0000040 #endif +#if __mips__ && !__mips64__ +#define ECHOK 0000040 +#endif +#if __mips64__ +#define ECHOK 0000040 +#endif #if __i386__ #define ECHONL 0000100 #endif @@ -1036,6 +1312,12 @@ extern "C" { #if __x86_64__ #define ECHONL 0000100 #endif +#if __mips__ && !__mips64__ +#define ECHONL 0000100 +#endif +#if __mips64__ +#define ECHONL 0000100 +#endif #if __i386__ #define NOFLSH 0000200 #endif @@ -1048,6 +1330,12 @@ extern "C" { #if __x86_64__ #define NOFLSH 0000200 #endif +#if __mips__ && !__mips64__ +#define NOFLSH 0000200 +#endif +#if __mips64__ +#define NOFLSH 0000200 +#endif #if __i386__ #define TOSTOP 0000400 #endif @@ -1060,6 +1348,12 @@ extern "C" { #if __x86_64__ #define TOSTOP 0000400 #endif +#if __mips__ && !__mips64__ +#define TOSTOP 0100000 +#endif +#if __mips64__ +#define TOSTOP 0100000 +#endif #if __i386__ #define ECHOCTL 0001000 #endif @@ -1072,6 +1366,12 @@ extern "C" { #if __x86_64__ #define ECHOCTL 0001000 #endif +#if __mips__ && !__mips64__ +#define ECHOCTL 0001000 +#endif +#if __mips64__ +#define ECHOCTL 0001000 +#endif #if __i386__ #define ECHOPRT 0002000 #endif @@ -1084,6 +1384,12 @@ extern "C" { #if __x86_64__ #define ECHOPRT 0002000 #endif +#if __mips__ && !__mips64__ +#define ECHOPRT 0002000 +#endif +#if __mips64__ +#define ECHOPRT 0002000 +#endif #if __i386__ #define ECHOKE 0004000 #endif @@ -1096,6 +1402,12 @@ extern "C" { #if __x86_64__ #define ECHOKE 0004000 #endif +#if __mips__ && !__mips64__ +#define ECHOKE 0004000 +#endif +#if __mips64__ +#define ECHOKE 0004000 +#endif #if __i386__ #define FLUSHO 0010000 #endif @@ -1108,6 +1420,12 @@ extern "C" { #if __x86_64__ #define FLUSHO 0010000 #endif +#if __mips__ && !__mips64__ +#define FLUSHO 0020000 +#endif +#if __mips64__ +#define FLUSHO 0020000 +#endif #if __i386__ #define PENDIN 0040000 #endif @@ -1120,6 +1438,12 @@ extern "C" { #if __x86_64__ #define PENDIN 0040000 #endif +#if __mips__ && !__mips64__ +#define PENDIN 0040000 +#endif +#if __mips64__ +#define PENDIN 0040000 +#endif #if __i386__ #define IEXTEN 0100000 #endif @@ -1132,6 +1456,12 @@ extern "C" { #if __x86_64__ #define IEXTEN 0100000 #endif +#if __mips__ && !__mips64__ +#define IEXTEN 0000400 +#endif +#if __mips64__ +#define IEXTEN 0000400 +#endif #if __powerpc__ && !__powerpc64__ #define NOFLSH 0x80000000 #endif diff --git a/ucontext.h include/ucontext.h index 934c239..1161823 100644 --- a/ucontext.h +++ include/ucontext.h @@ -106,6 +106,16 @@ extern "C" { typedef long int greg_t; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + typedef unsigned long long int greg_t; + +#endif +#if __mips64__ +/* MIPS64 */ + typedef unsigned long long int greg_t; + +#endif /* Number of general registers.*/ #if __i386__ @@ -126,6 +136,12 @@ extern "C" { #if __powerpc64__ #define NGREG 48 #endif +#if __mips__ && !__mips64__ +#define NGREG 32 +#endif +#if __mips64__ +#define NGREG 32 +#endif @@ -152,6 +168,16 @@ extern "C" { typedef unsigned long int gregset_t[48]; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + typedef greg_t gregset_t[32]; + +#endif +#if __mips64__ +/* MIPS64 */ + typedef greg_t gregset_t[32]; + +#endif /* Number of each register is the `gregset_t' array.*/ @@ -212,6 +238,32 @@ extern "C" { } fpregset_t; #endif +#if __mips64__ +/* MIPS64 */ + typedef struct fpregset { + union { + double fp_dregs[NFPREG]; + struct { + float _fp_fregs; + unsigned int _fp_pad; + } fp_fregs[NFPREG]; + } fp_r; +} fpregset_t; + +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + typedef struct fpregset { + union { + double fp_dregs[NFPREG]; + struct { + float _fp_fregs; + unsigned int _fp_pad; + } fp_fregs[NFPREG]; + } fp_r; +} fpregset_t; + +#endif #if __x86_64__ /* x86-64 */ typedef struct _libc_fpstate *fpregset_t; @@ -334,6 +386,50 @@ extern "C" { } mcontext_t; #endif +#if __mips64__ +/* MIPS64 */ + typedef struct { + gregset_t gregs; + fpregset_t fpregs; + greg_t mdhi; + greg_t hi1; + greg_t hi2; + greg_t hi3; + greg_t mdlo; + greg_t lo1; + greg_t lo2; + greg_t lo3; + greg_t pc; + unsigned int fpc_csr; + unsigned int used_math; + unsigned int dsp; + unsigned int reserved; + } mcontext_t; + +#if __mips__ && !__mips64__ +/* MIPS */ + typedef struct { + unsigned int regmask; + unsigned int status; + greg_t pc; + gregset_t gregs; + fpregset_t fpregs; + unsigned int fp_owned; + unsigned int fpc_csr; + unsigned int fpc_eir; + unsigned int used_math; + unsigned int dsp; + greg_t mdhi; + greg_t mdlo; + unsigned long hi1; + unsigned long lo1; + unsigned long hi2; + unsigned long lo2; + unsigned long hi3; + unsigned long lo3; + } mcontext_t; + +#endif #if __x86_64__ /* x86-64 */ typedef struct { @@ -398,6 +494,16 @@ extern "C" { typedef struct ucontext ucontext_t; #endif +#if __mips64__ +/* MIPS64 */ + typedef struct ucontext ucontext_t; + +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + typedef struct ucontext ucontext_t; + +#endif #if __x86_64__ /* x86-64 */ typedef struct ucontext ucontext_t; @@ -473,6 +579,30 @@ extern "C" { }; #endif +#if __mips64__ +/* MIPS64 */ + + struct ucontext { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; + }; + +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + + struct ucontext { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + sigset_t uc_sigmask; + }; + +#endif #if __x86_64__ /* x86-64 */ diff --git a/unistd.h include/unistd.h index 3768c6a..7d02132 100644 --- a/unistd.h +++ include/unistd.h @@ -50,6 +50,16 @@ extern "C" { typedef long int intptr_t; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + typedef int intptr_t; + +#endif +#if __mips64__ +/* MIPS64 */ + typedef long int intptr_t; + +#endif /* Values for the second argument to access.*/ #define F_OK 0 diff --git a/unwind.h include/unwind.h index a37917d..4b9c76b 100644 --- a/unwind.h +++ include/unwind.h @@ -354,6 +354,61 @@ extern "C" { /* S390 */ extern void _Unwind_SetIP(struct _Unwind_Context *, _Unwind_Ptr); #endif +#if __mips__ && !__mips64__ +/* MIPS */ + extern void _Unwind_DeleteException(struct _Unwind_Exception *); +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + extern fde *_Unwind_Find_FDE(void *, struct dwarf_eh_base *); +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + extern _Unwind_Ptr _Unwind_ForcedUnwind(struct _Unwind_Exception *, + _Unwind_Stop_Fn, void *); +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + extern _Unwind_Ptr _Unwind_GetDataRelBase(struct _Unwind_Context *); +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + extern _Unwind_Word _Unwind_GetGR(struct _Unwind_Context *, int); +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + extern _Unwind_Ptr _Unwind_GetIP(struct _Unwind_Context *); +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + extern _Unwind_Ptr _Unwind_GetLanguageSpecificData(struct + _Unwind_Context *); +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + extern _Unwind_Ptr _Unwind_GetRegionStart(struct _Unwind_Context *); +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + extern _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *); +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + extern _Unwind_Reason_Code _Unwind_RaiseException(struct + _Unwind_Exception *); +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + extern void _Unwind_Resume(struct _Unwind_Exception *); +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + extern void _Unwind_SetGR(struct _Unwind_Context *, int, u_int64_t); +#endif +#if __mips__ && !__mips64__ +/* MIPS */ + extern void _Unwind_SetIP(struct _Unwind_Context *, _Unwind_Ptr); +#endif #if __x86_64__ /* x86-64 */ extern void _Unwind_DeleteException(struct _Unwind_Exception *); @@ -466,6 +521,64 @@ extern "C" { /* S390 */ extern _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, void *); #endif +#if __mips64__ +/* MIPS64 */ + extern void _Unwind_DeleteException(struct _Unwind_Exception *); +#endif +#if __mips64__ +/* MIPS64 */ + extern fde *_Unwind_Find_FDE(void *, struct dwarf_eh_base *); +#endif +#if __mips64__ +/* MIPS64 */ + extern _Unwind_Ptr _Unwind_ForcedUnwind(struct _Unwind_Exception *, + _Unwind_Stop_Fn, void *); +#endif +#if __mips64__ +/* MIPS64 */ + extern _Unwind_Ptr _Unwind_GetDataRelBase(struct _Unwind_Context *); +#endif +#if __mips64__ +/* MIPS64 */ + extern _Unwind_Word _Unwind_GetGR(struct _Unwind_Context *, int); +#endif +#if __mips64__ +/* MIPS64 */ + extern _Unwind_Ptr _Unwind_GetIP(struct _Unwind_Context *); +#endif +#if __mips64__ +/* MIPS64 */ + extern _Unwind_Ptr _Unwind_GetLanguageSpecificData(void); +#endif +#if __mips64__ +/* MIPS64 */ + extern _Unwind_Ptr _Unwind_GetRegionStart(struct _Unwind_Context *); +#endif +#if __mips64__ +/* MIPS64 */ + extern _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *); +#endif +#if __mips64__ +/* MIPS64 */ + extern _Unwind_Reason_Code _Unwind_RaiseException(struct + _Unwind_Exception *); +#endif +#if __mips64__ +/* MIPS64 */ + extern void _Unwind_Resume(struct _Unwind_Exception *); +#endif +#if __mips64__ +/* MIPS64 */ + extern void _Unwind_SetGR(struct _Unwind_Context *, int, u_int64_t); +#endif +#if __mips64__ +/* MIPS64 */ + extern void _Unwind_SetIP(struct _Unwind_Context *, _Unwind_Ptr); +#endif +#if __mips64__ +/* MIPS64 */ + extern _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, void *); +#endif #if __i386__ /* IA32 */ extern _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, void *); @@ -494,6 +607,10 @@ extern "C" { /* S390 */ extern _Unwind_Reason_Code _Unwind_GetCFA(struct _Unwind_Context *); #endif +#if __mips__ && !__mips64__ +/* MIPS */ + extern _Unwind_Reason_Code _Unwind_GetCFA(struct _Unwind_Context *); +#endif #if __i386__ /* IA32 */ extern _Unwind_Reason_Code _Unwind_GetCFA(struct _Unwind_Context *); @@ -517,6 +634,9 @@ extern "C" { #if __s390x__ /* S390X */ extern _Unwind_Reason_Code _Unwind_GetCFA(struct _Unwind_Context *); +#if __mips64__ +/* MIPS64 */ + extern _Unwind_Reason_Code _Unwind_GetCFA(struct _Unwind_Context *); #endif #if __s390__ && !__s390x__ /* S390 */ @@ -524,6 +644,12 @@ extern "C" { _Unwind_Exception *); #endif +#if __mips__ && !__mips64__ +/* MIPS */ + extern _Unwind_Reason_Code _Unwind_Resume_or_Rethrow(struct + _Unwind_Exception + *); +#endif #if __i386__ /* IA32 */ extern _Unwind_Reason_Code _Unwind_Resume_or_Rethrow(struct @@ -560,10 +686,20 @@ extern "C" { _Unwind_Exception *); #endif +#if __mips64__ +/* MIPS64 */ + extern _Unwind_Reason_Code _Unwind_Resume_or_Rethrow(struct + _Unwind_Exception + *); +#endif #if __s390__ && !__s390x__ /* S390 */ extern void *_Unwind_FindEnclosingFunction(void *); #endif +#if __mips__ && !__mips64__ +/* MIPS */ + extern void *_Unwind_FindEnclosingFunction(void *); +#endif #if __i386__ /* IA32 */ extern void *_Unwind_FindEnclosingFunction(void *); @@ -588,6 +724,10 @@ extern "C" { /* S390X */ extern void *_Unwind_FindEnclosingFunction(void *); #endif +#if __mips64__ +/* MIPS64 */ + extern void *_Unwind_FindEnclosingFunction(void *); +#endif #if __ia64__ /* IA64 */ extern _Unwind_Word _Unwind_GetBSP(struct _Unwind_Context *); diff --git a/utmp.h include/utmp.h index 4cec859..d140947 100644 --- a/utmp.h +++ include/utmp.h @@ -67,6 +67,15 @@ extern "C" { }; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + struct lastlog { + time_t ll_time; + char ll_line[UT_LINESIZE]; + char ll_host[UT_HOSTSIZE]; + }; + +#endif #if __x86_64__ /* x86-64 */ struct lastlog { @@ -85,6 +94,15 @@ extern "C" { }; #endif +#if __mips64__ +/* x86-MIPS64 */ + struct lastlog { + int32_t ll_time; + char ll_line[UT_LINESIZE]; + char ll_host[UT_HOSTSIZE]; + }; + +#endif /* The structure describing an entry in the user accounting database.*/ @@ -177,6 +195,23 @@ extern "C" { }; #endif +#if __mips__ && !__mips64__ +/* MIPS */ + struct utmp { + short 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. */ + long int ut_session; /* Session ID, used for windowing. */ + struct timeval ut_tv; /* Time entry was made. */ + int32_t ut_addr_v6[4]; /* Internet address of remote host. */ + char __unused[20]; /* Reserved for future use. */ + }; + +#endif #if __x86_64__ /* x86-64 */ struct utmp { @@ -214,6 +249,26 @@ extern "C" { }; #endif +#if __mips64__ +/* MIPS64 */ + struct utmp { + short 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. */ + int ut_session; /* Session ID, used for windowing. */ + struct { + int32_t tv_sec; + int32_t tv_usec; + } ut_tv; /* Time entry was made. */ + int32_t ut_addr_v6[4]; /* Internet address of remote host. */ + char __unused[20]; /* Reserved for future use. */ + }; + +#endif /* Values for the `ut_type' field of a `struct utmp'.*/ #define EMPTY 0 diff --git a/utmpx.h include/utmpx.h index 1b923fc..e9fddde 100644 --- a/utmpx.h +++ include/utmpx.h @@ -106,6 +106,23 @@ extern "C" { }; #endif +#if __mips__ && !__mips64__ +/* S390 */ + struct utmpx { + short 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. */ + long int ut_session; /* Session ID, used for windowing. */ + struct timeval ut_tv; /* Time entry was made. */ + int32_t ut_addr_v6[4]; /* Internet address of remote host. */ + char __unused[20]; /* Reserved for future use. */ + }; + +#endif #if __x86_64__ /* x86-64 */ struct utmpx { @@ -143,6 +160,26 @@ extern "C" { }; #endif +#if __mips64__ +/* MIPS64 */ + struct utmpx { + short 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. */ + int32_t ut_session; /* Session ID, used for windowing. */ + struct { + int32_t tv_sec; /* Seconds. */ + int32_t tv_usec; /* Microseconds. */ + } ut_tv; /* Time entry was made. */ + int32_t ut_addr_v6[4]; /* Internet address of remote host. */ + char __unused[20]; /* Reserved for future use. */ + }; + +#endif