summaryrefslogtreecommitdiff
path: root/arch/mipsn32/bits
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mipsn32/bits')
-rw-r--r--arch/mipsn32/bits/alltypes.h.in21
-rw-r--r--arch/mipsn32/bits/endian.h5
-rw-r--r--arch/mipsn32/bits/ioctl.h102
-rw-r--r--arch/mipsn32/bits/ipcstat.h1
-rw-r--r--arch/mipsn32/bits/limits.h7
-rw-r--r--arch/mipsn32/bits/msg.h27
-rw-r--r--arch/mipsn32/bits/sem.h14
-rw-r--r--arch/mipsn32/bits/shm.h15
-rw-r--r--arch/mipsn32/bits/signal.h3
-rw-r--r--arch/mipsn32/bits/socket.h18
-rw-r--r--arch/mipsn32/bits/stat.h15
-rw-r--r--arch/mipsn32/bits/syscall.h.in67
-rw-r--r--arch/mipsn32/bits/termios.h2
13 files changed, 111 insertions, 186 deletions
diff --git a/arch/mipsn32/bits/alltypes.h.in b/arch/mipsn32/bits/alltypes.h.in
index 66ca18ad..ff934a4c 100644
--- a/arch/mipsn32/bits/alltypes.h.in
+++ b/arch/mipsn32/bits/alltypes.h.in
@@ -1,9 +1,15 @@
+#define _REDIR_TIME64 1
#define _Addr int
#define _Int64 long long
#define _Reg int
-TYPEDEF __builtin_va_list va_list;
-TYPEDEF __builtin_va_list __isoc_va_list;
+#if _MIPSEL || __MIPSEL || __MIPSEL__
+#define __BYTE_ORDER 1234
+#else
+#define __BYTE_ORDER 4321
+#endif
+
+#define __LONG_MAX 0x7fffffffL
#ifndef __cplusplus
TYPEDEF int wchar_t;
@@ -13,14 +19,3 @@ TYPEDEF float float_t;
TYPEDEF double double_t;
TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
-
-TYPEDEF long time_t;
-TYPEDEF long suseconds_t;
-
-TYPEDEF struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
-TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
-TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
-TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
-TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
-TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
-TYPEDEF struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
diff --git a/arch/mipsn32/bits/endian.h b/arch/mipsn32/bits/endian.h
deleted file mode 100644
index 5399dcb5..00000000
--- a/arch/mipsn32/bits/endian.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#if _MIPSEL || __MIPSEL || __MIPSEL__
-#define __BYTE_ORDER __LITTLE_ENDIAN
-#else
-#define __BYTE_ORDER __BIG_ENDIAN
-#endif
diff --git a/arch/mipsn32/bits/ioctl.h b/arch/mipsn32/bits/ioctl.h
index b8f77cb5..e20bf19e 100644
--- a/arch/mipsn32/bits/ioctl.h
+++ b/arch/mipsn32/bits/ioctl.h
@@ -90,24 +90,6 @@
#define TIOCMIWAIT 0x5491
#define TIOCGICOUNT 0x5492
-#define TIOCPKT_DATA 0
-#define TIOCPKT_FLUSHREAD 1
-#define TIOCPKT_FLUSHWRITE 2
-#define TIOCPKT_STOP 4
-#define TIOCPKT_START 8
-#define TIOCPKT_NOSTOP 16
-#define TIOCPKT_DOSTOP 32
-#define TIOCPKT_IOCTL 64
-
-#define TIOCSER_TEMT 0x01
-
-struct winsize {
- unsigned short ws_row;
- unsigned short ws_col;
- unsigned short ws_xpixel;
- unsigned short ws_ypixel;
-};
-
#define TIOCM_LE 0x001
#define TIOCM_DTR 0x002
#define TIOCM_RTS 0x004
@@ -123,90 +105,10 @@ struct winsize {
#define TIOCM_OUT2 0x4000
#define TIOCM_LOOP 0x8000
-#define N_TTY 0
-#define N_SLIP 1
-#define N_MOUSE 2
-#define N_PPP 3
-#define N_STRIP 4
-#define N_AX25 5
-#define N_X25 6
-#define N_6PACK 7
-#define N_MASC 8
-#define N_R3964 9
-#define N_PROFIBUS_FDL 10
-#define N_IRDA 11
-#define N_SMSBLOCK 12
-#define N_HDLC 13
-#define N_SYNC_PPP 14
-#define N_HCI 15
-
#define FIOGETOWN _IOR('f', 123, int)
#define FIOSETOWN _IOW('f', 124, int)
#define SIOCATMARK _IOR('s', 7, int)
#define SIOCSPGRP _IOW('s', 8, pid_t)
#define SIOCGPGRP _IOR('s', 9, pid_t)
-#define SIOCGSTAMP 0x8906
-#define SIOCGSTAMPNS 0x8907
-
-#define SIOCADDRT 0x890B
-#define SIOCDELRT 0x890C
-#define SIOCRTMSG 0x890D
-
-#define SIOCGIFNAME 0x8910
-#define SIOCSIFLINK 0x8911
-#define SIOCGIFCONF 0x8912
-#define SIOCGIFFLAGS 0x8913
-#define SIOCSIFFLAGS 0x8914
-#define SIOCGIFADDR 0x8915
-#define SIOCSIFADDR 0x8916
-#define SIOCGIFDSTADDR 0x8917
-#define SIOCSIFDSTADDR 0x8918
-#define SIOCGIFBRDADDR 0x8919
-#define SIOCSIFBRDADDR 0x891a
-#define SIOCGIFNETMASK 0x891b
-#define SIOCSIFNETMASK 0x891c
-#define SIOCGIFMETRIC 0x891d
-#define SIOCSIFMETRIC 0x891e
-#define SIOCGIFMEM 0x891f
-#define SIOCSIFMEM 0x8920
-#define SIOCGIFMTU 0x8921
-#define SIOCSIFMTU 0x8922
-#define SIOCSIFNAME 0x8923
-#define SIOCSIFHWADDR 0x8924
-#define SIOCGIFENCAP 0x8925
-#define SIOCSIFENCAP 0x8926
-#define SIOCGIFHWADDR 0x8927
-#define SIOCGIFSLAVE 0x8929
-#define SIOCSIFSLAVE 0x8930
-#define SIOCADDMULTI 0x8931
-#define SIOCDELMULTI 0x8932
-#define SIOCGIFINDEX 0x8933
-#define SIOGIFINDEX SIOCGIFINDEX
-#define SIOCSIFPFLAGS 0x8934
-#define SIOCGIFPFLAGS 0x8935
-#define SIOCDIFADDR 0x8936
-#define SIOCSIFHWBROADCAST 0x8937
-#define SIOCGIFCOUNT 0x8938
-
-#define SIOCGIFBR 0x8940
-#define SIOCSIFBR 0x8941
-
-#define SIOCGIFTXQLEN 0x8942
-#define SIOCSIFTXQLEN 0x8943
-
-#define SIOCDARP 0x8953
-#define SIOCGARP 0x8954
-#define SIOCSARP 0x8955
-
-#define SIOCDRARP 0x8960
-#define SIOCGRARP 0x8961
-#define SIOCSRARP 0x8962
-
-#define SIOCGIFMAP 0x8970
-#define SIOCSIFMAP 0x8971
-
-#define SIOCADDDLCI 0x8980
-#define SIOCDELDLCI 0x8981
-
-#define SIOCDEVPRIVATE 0x89F0
-#define SIOCPROTOPRIVATE 0x89E0
+#define SIOCGSTAMP _IOR(0x89, 6, char[16])
+#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])
diff --git a/arch/mipsn32/bits/ipcstat.h b/arch/mipsn32/bits/ipcstat.h
new file mode 100644
index 00000000..4f4fcb0c
--- /dev/null
+++ b/arch/mipsn32/bits/ipcstat.h
@@ -0,0 +1 @@
+#define IPC_STAT 0x102
diff --git a/arch/mipsn32/bits/limits.h b/arch/mipsn32/bits/limits.h
deleted file mode 100644
index fbc6d238..00000000
--- a/arch/mipsn32/bits/limits.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#define LONG_BIT 32
-#endif
-
-#define LONG_MAX 0x7fffffffL
-#define LLONG_MAX 0x7fffffffffffffffLL
diff --git a/arch/mipsn32/bits/msg.h b/arch/mipsn32/bits/msg.h
index f28aece8..c734dbb5 100644
--- a/arch/mipsn32/bits/msg.h
+++ b/arch/mipsn32/bits/msg.h
@@ -1,19 +1,19 @@
struct msqid_ds {
struct ipc_perm msg_perm;
#if _MIPSEL || __MIPSEL || __MIPSEL__
- time_t msg_stime;
- int __unused1;
- time_t msg_rtime;
- int __unused2;
- time_t msg_ctime;
- int __unused3;
+ unsigned long __msg_stime_lo;
+ unsigned long __msg_stime_hi;
+ unsigned long __msg_rtime_lo;
+ unsigned long __msg_rtime_hi;
+ unsigned long __msg_ctime_lo;
+ unsigned long __msg_ctime_hi;
#else
- int __unused1;
- time_t msg_stime;
- int __unused2;
- time_t msg_rtime;
- int __unused3;
- time_t msg_ctime;
+ unsigned long __msg_stime_hi;
+ unsigned long __msg_stime_lo;
+ unsigned long __msg_rtime_hi;
+ unsigned long __msg_rtime_lo;
+ unsigned long __msg_ctime_hi;
+ unsigned long __msg_ctime_lo;
#endif
unsigned long msg_cbytes;
msgqnum_t msg_qnum;
@@ -21,4 +21,7 @@ struct msqid_ds {
pid_t msg_lspid;
pid_t msg_lrpid;
unsigned long __unused[2];
+ time_t msg_stime;
+ time_t msg_rtime;
+ time_t msg_ctime;
};
diff --git a/arch/mipsn32/bits/sem.h b/arch/mipsn32/bits/sem.h
index e46ced95..fe6f0948 100644
--- a/arch/mipsn32/bits/sem.h
+++ b/arch/mipsn32/bits/sem.h
@@ -1,14 +1,16 @@
struct semid_ds {
struct ipc_perm sem_perm;
- time_t sem_otime;
- time_t sem_ctime;
+ unsigned long __sem_otime_lo;
+ unsigned long __sem_ctime_lo;
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned short sem_nsems;
- char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
+ char __sem_nsems_pad[sizeof(long)-sizeof(short)];
#else
- char __sem_nsems_pad[sizeof(time_t)-sizeof(short)];
+ char __sem_nsems_pad[sizeof(long)-sizeof(short)];
unsigned short sem_nsems;
#endif
- time_t __unused3;
- time_t __unused4;
+ unsigned long __sem_otime_hi;
+ unsigned long __sem_ctime_hi;
+ time_t sem_otime;
+ time_t sem_ctime;
};
diff --git a/arch/mipsn32/bits/shm.h b/arch/mipsn32/bits/shm.h
index 8d193781..ab8c642d 100644
--- a/arch/mipsn32/bits/shm.h
+++ b/arch/mipsn32/bits/shm.h
@@ -3,14 +3,19 @@
struct shmid_ds {
struct ipc_perm shm_perm;
size_t shm_segsz;
- time_t shm_atime;
- time_t shm_dtime;
- time_t shm_ctime;
+ unsigned long __shm_atime_lo;
+ unsigned long __shm_dtime_lo;
+ unsigned long __shm_ctime_lo;
pid_t shm_cpid;
pid_t shm_lpid;
unsigned long shm_nattch;
- unsigned long __pad1;
- unsigned long __pad2;
+ unsigned short __shm_atime_hi;
+ unsigned short __shm_dtime_hi;
+ unsigned short __shm_ctime_hi;
+ unsigned short __pad1;
+ time_t shm_atime;
+ time_t shm_dtime;
+ time_t shm_ctime;
};
struct shminfo {
diff --git a/arch/mipsn32/bits/signal.h b/arch/mipsn32/bits/signal.h
index c31ad07e..ffec7fd0 100644
--- a/arch/mipsn32/bits/signal.h
+++ b/arch/mipsn32/bits/signal.h
@@ -85,7 +85,6 @@ typedef struct __ucontext {
#define SA_RESTART 0x10000000
#define SA_NODEFER 0x40000000
#define SA_RESETHAND 0x80000000
-#define SA_RESTORER 0x04000000
#undef SIG_BLOCK
#undef SIG_UNBLOCK
@@ -112,7 +111,7 @@ typedef struct __ucontext {
#define SIGTRAP 5
#define SIGABRT 6
#define SIGIOT SIGABRT
-#define SIGSTKFLT 7
+#define SIGEMT 7
#define SIGFPE 8
#define SIGKILL 9
#define SIGBUS 10
diff --git a/arch/mipsn32/bits/socket.h b/arch/mipsn32/bits/socket.h
index b82c7d34..02fbb88b 100644
--- a/arch/mipsn32/bits/socket.h
+++ b/arch/mipsn32/bits/socket.h
@@ -1,19 +1,3 @@
-struct msghdr {
- void *msg_name;
- socklen_t msg_namelen;
- struct iovec *msg_iov;
- int msg_iovlen;
- void *msg_control;
- socklen_t msg_controllen;
- int msg_flags;
-};
-
-struct cmsghdr {
- socklen_t cmsg_len;
- int cmsg_level;
- int cmsg_type;
-};
-
#define SOCK_STREAM 2
#define SOCK_DGRAM 1
@@ -32,8 +16,6 @@ struct cmsghdr {
#define SO_RCVBUF 0x1002
#define SO_SNDLOWAT 0x1003
#define SO_RCVLOWAT 0x1004
-#define SO_RCVTIMEO 0x1006
-#define SO_SNDTIMEO 0x1005
#define SO_ERROR 0x1007
#define SO_TYPE 0x1008
#define SO_ACCEPTCONN 0x1009
diff --git a/arch/mipsn32/bits/stat.h b/arch/mipsn32/bits/stat.h
index f4d1df83..6e2f2808 100644
--- a/arch/mipsn32/bits/stat.h
+++ b/arch/mipsn32/bits/stat.h
@@ -1,6 +1,3 @@
-#include <string.h>
-#include <bits/alltypes.h>
-
struct stat {
dev_t st_dev;
long __pad1[2];
@@ -12,11 +9,15 @@ struct stat {
dev_t st_rdev;
long __pad2[2];
off_t st_size;
- struct timespec st_atim;
- struct timespec st_mtim;
- struct timespec st_ctim;
+ struct {
+ long tv_sec;
+ long tv_nsec;
+ } __st_atim32, __st_mtim32, __st_ctim32;
blksize_t st_blksize;
long __pad3;
blkcnt_t st_blocks;
- long __pad4[14];
+ struct timespec st_atim;
+ struct timespec st_mtim;
+ struct timespec st_ctim;
+ long __pad4[2];
};
diff --git a/arch/mipsn32/bits/syscall.h.in b/arch/mipsn32/bits/syscall.h.in
index c1726180..9a4bd301 100644
--- a/arch/mipsn32/bits/syscall.h.in
+++ b/arch/mipsn32/bits/syscall.h.in
@@ -92,7 +92,7 @@
#define __NR_fchown 6091
#define __NR_lchown 6092
#define __NR_umask 6093
-#define __NR_gettimeofday 6094
+#define __NR_gettimeofday_time32 6094
#define __NR_getrlimit 6095
#define __NR_getrusage 6096
#define __NR_sysinfo 6097
@@ -157,7 +157,7 @@
#define __NR_chroot 6156
#define __NR_sync 6157
#define __NR_acct 6158
-#define __NR_settimeofday 6159
+#define __NR_settimeofday_time32 6159
#define __NR_mount 6160
#define __NR_umount2 6161
#define __NR_swapon 6162
@@ -219,14 +219,14 @@
#define __NR_fstatfs64 6218
#define __NR_sendfile64 6219
#define __NR_timer_create 6220
-#define __NR_timer_settime 6221
-#define __NR_timer_gettime 6222
+#define __NR_timer_settime32 6221
+#define __NR_timer_gettime32 6222
#define __NR_timer_getoverrun 6223
#define __NR_timer_delete 6224
-#define __NR_clock_settime 6225
-#define __NR_clock_gettime 6226
-#define __NR_clock_getres 6227
-#define __NR_clock_nanosleep 6228
+#define __NR_clock_settime32 6225
+#define __NR_clock_gettime32 6226
+#define __NR_clock_getres_time32 6227
+#define __NR_clock_nanosleep_time32 6228
#define __NR_tgkill 6229
#define __NR_utimes 6230
#define __NR_mbind 6231
@@ -282,8 +282,8 @@
#define __NR_eventfd 6282
#define __NR_fallocate 6283
#define __NR_timerfd_create 6284
-#define __NR_timerfd_gettime 6285
-#define __NR_timerfd_settime 6286
+#define __NR_timerfd_gettime32 6285
+#define __NR_timerfd_settime32 6286
#define __NR_signalfd4 6287
#define __NR_eventfd2 6288
#define __NR_epoll_create1 6289
@@ -330,4 +330,51 @@
#define __NR_statx 6330
#define __NR_rseq 6331
#define __NR_io_pgetevents 6332
+#define __NR_clock_gettime64 6403
+#define __NR_clock_settime64 6404
+#define __NR_clock_adjtime64 6405
+#define __NR_clock_getres_time64 6406
+#define __NR_clock_nanosleep_time64 6407
+#define __NR_timer_gettime64 6408
+#define __NR_timer_settime64 6409
+#define __NR_timerfd_gettime64 6410
+#define __NR_timerfd_settime64 6411
+#define __NR_utimensat_time64 6412
+#define __NR_pselect6_time64 6413
+#define __NR_ppoll_time64 6414
+#define __NR_io_pgetevents_time64 6416
+#define __NR_recvmmsg_time64 6417
+#define __NR_mq_timedsend_time64 6418
+#define __NR_mq_timedreceive_time64 6419
+#define __NR_semtimedop_time64 6420
+#define __NR_rt_sigtimedwait_time64 6421
+#define __NR_futex_time64 6422
+#define __NR_sched_rr_get_interval_time64 6423
+#define __NR_pidfd_send_signal 6424
+#define __NR_io_uring_setup 6425
+#define __NR_io_uring_enter 6426
+#define __NR_io_uring_register 6427
+#define __NR_open_tree 6428
+#define __NR_move_mount 6429
+#define __NR_fsopen 6430
+#define __NR_fsconfig 6431
+#define __NR_fsmount 6432
+#define __NR_fspick 6433
+#define __NR_pidfd_open 6434
+#define __NR_clone3 6435
+#define __NR_close_range 6436
+#define __NR_openat2 6437
+#define __NR_pidfd_getfd 6438
+#define __NR_faccessat2 6439
+#define __NR_process_madvise 6440
+#define __NR_epoll_pwait2 6441
+#define __NR_mount_setattr 6442
+#define __NR_landlock_create_ruleset 6444
+#define __NR_landlock_add_rule 6445
+#define __NR_landlock_restrict_self 6446
+#define __NR_process_mrelease 6448
+#define __NR_futex_waitv 6449
+#define __NR_set_mempolicy_home_node 6450
+#define __NR_cachestat 6451
+#define __NR_fchmodat2 6452
diff --git a/arch/mipsn32/bits/termios.h b/arch/mipsn32/bits/termios.h
index f7b9dd2e..9d571f78 100644
--- a/arch/mipsn32/bits/termios.h
+++ b/arch/mipsn32/bits/termios.h
@@ -165,5 +165,5 @@ struct termios {
#define EXTPROC 0200000
#define XTABS 0014000
-#define TIOCSER_TEMT 0x01
+#define TIOCSER_TEMT 1
#endif