authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-12 19:56:38-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2020-03-12 19:56:38-04:00
log2f06971a7e2f004b76c0ac4502c3e84cd63a1fba
treeda060f6ddc854c15aec976b7311f5d27245899d6
parentf51bec321b1ef9196b143295d47a9ea919cdba28
parent6e25ac2a2bc74aa6ec9b0d369c5583c98d6a1de8
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #4725 from ziglang/update-musl

Upgrade musl libc to 1.2.0

399 files changed, 4392 insertions(+), 2701 deletions(-)

lib/libc/include/aarch64-linux-musl/bits/alltypes.h+66-55
...@@ -2,16 +2,13 @@...@@ -2,16 +2,13 @@
2#define _Int64 long2#define _Int64 long
3#define _Reg long3#define _Reg long
44
5#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)5#if __AARCH64EB__
6typedef __builtin_va_list va_list;6#define __BYTE_ORDER 4321
7#define __DEFINED_va_list7#else
8#endif8#define __BYTE_ORDER 1234
9
10#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
11typedef __builtin_va_list __isoc_va_list;
12#define __DEFINED___isoc_va_list
13#endif9#endif
1410
11#define __LONG_MAX 0x7fffffffffffffffL
1512
16#ifndef __cplusplus13#ifndef __cplusplus
17#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)14#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
...@@ -53,52 +50,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;...@@ -53,52 +50,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;
53#define __DEFINED_max_align_t50#define __DEFINED_max_align_t
54#endif51#endif
5552
5653#define __LITTLE_ENDIAN 1234
57#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)54#define __BIG_ENDIAN 4321
58typedef long time_t;55#define __USE_TIME_BITS64 1
59#define __DEFINED_time_t
60#endif
61
62#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
63typedef long suseconds_t;
64#define __DEFINED_suseconds_t
65#endif
66
67
68#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
69typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
70#define __DEFINED_pthread_attr_t
71#endif
72
73#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
74typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
75#define __DEFINED_pthread_mutex_t
76#endif
77
78#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
79typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
80#define __DEFINED_mtx_t
81#endif
82
83#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
84typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
85#define __DEFINED_pthread_cond_t
86#endif
87
88#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
89typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
90#define __DEFINED_cnd_t
91#endif
92
93#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
94typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
95#define __DEFINED_pthread_rwlock_t
96#endif
97
98#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
99typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
100#define __DEFINED_pthread_barrier_t
101#endif
10256
103#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)57#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
104typedef unsigned _Addr size_t;58typedef unsigned _Addr size_t;
...@@ -135,6 +89,16 @@ typedef _Reg register_t;...@@ -135,6 +89,16 @@ typedef _Reg register_t;
135#define __DEFINED_register_t89#define __DEFINED_register_t
136#endif90#endif
13791
92#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
93typedef _Int64 time_t;
94#define __DEFINED_time_t
95#endif
96
97#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
98typedef _Int64 suseconds_t;
99#define __DEFINED_suseconds_t
100#endif
101
138102
139#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)103#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
140typedef signed char int8_t;104typedef signed char int8_t;
...@@ -270,7 +234,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };...@@ -270,7 +234,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };
270#endif234#endif
271235
272#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)236#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
273struct timespec { time_t tv_sec; long tv_nsec; };237struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
274#define __DEFINED_struct_timespec238#define __DEFINED_struct_timespec
275#endif239#endif
276240
...@@ -366,6 +330,17 @@ typedef struct _IO_FILE FILE;...@@ -366,6 +330,17 @@ typedef struct _IO_FILE FILE;
366#endif330#endif
367331
368332
333#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
334typedef __builtin_va_list va_list;
335#define __DEFINED_va_list
336#endif
337
338#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
339typedef __builtin_va_list __isoc_va_list;
340#define __DEFINED___isoc_va_list
341#endif
342
343
369#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)344#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
370typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;345typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
371#define __DEFINED_mbstate_t346#define __DEFINED_mbstate_t
...@@ -401,6 +376,42 @@ typedef unsigned short sa_family_t;...@@ -401,6 +376,42 @@ typedef unsigned short sa_family_t;
401#endif376#endif
402377
403378
379#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
380typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
381#define __DEFINED_pthread_attr_t
382#endif
383
384#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
385typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
386#define __DEFINED_pthread_mutex_t
387#endif
388
389#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
390typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
391#define __DEFINED_mtx_t
392#endif
393
394#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
395typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
396#define __DEFINED_pthread_cond_t
397#endif
398
399#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
400typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
401#define __DEFINED_cnd_t
402#endif
403
404#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
405typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
406#define __DEFINED_pthread_rwlock_t
407#endif
408
409#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
410typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
411#define __DEFINED_pthread_barrier_t
412#endif
413
414
404#undef _Addr415#undef _Addr
405#undef _Int64416#undef _Int64
406#undef _Reg417#undef _Reg
\ No newline at end of file
lib/libc/include/aarch64-linux-musl/bits/endian.h deleted-5
...@@ -1,5 +0,0 @@
1#if __AARCH64EB__
2#define __BYTE_ORDER __BIG_ENDIAN
3#else
4#define __BYTE_ORDER __LITTLE_ENDIAN
5#endif
\ No newline at end of file
lib/libc/include/aarch64-linux-musl/bits/socket.h deleted-33
...@@ -1,33 +0,0 @@
1#include <endian.h>
2
3struct msghdr {
4 void *msg_name;
5 socklen_t msg_namelen;
6 struct iovec *msg_iov;
7#if __BYTE_ORDER == __BIG_ENDIAN
8 int __pad1, msg_iovlen;
9#else
10 int msg_iovlen, __pad1;
11#endif
12 void *msg_control;
13#if __BYTE_ORDER == __BIG_ENDIAN
14 int __pad2;
15 socklen_t msg_controllen;
16#else
17 socklen_t msg_controllen;
18 int __pad2;
19#endif
20 int msg_flags;
21};
22
23struct cmsghdr {
24#if __BYTE_ORDER == __BIG_ENDIAN
25 int __pad1;
26 socklen_t cmsg_len;
27#else
28 socklen_t cmsg_len;
29 int __pad1;
30#endif
31 int cmsg_level;
32 int cmsg_type;
33};
\ No newline at end of file
lib/libc/include/aarch64-linux-musl/bits/syscall.h+5-1
...@@ -287,6 +287,8 @@...@@ -287,6 +287,8 @@
287#define __NR_fsconfig 431287#define __NR_fsconfig 431
288#define __NR_fsmount 432288#define __NR_fsmount 432
289#define __NR_fspick 433289#define __NR_fspick 433
290#define __NR_pidfd_open 434
291#define __NR_clone3 435
290292
291#define SYS_io_setup 0293#define SYS_io_setup 0
292#define SYS_io_destroy 1294#define SYS_io_destroy 1
...@@ -576,4 +578,6 @@...@@ -576,4 +578,6 @@
576#define SYS_fsopen 430578#define SYS_fsopen 430
577#define SYS_fsconfig 431579#define SYS_fsconfig 431
578#define SYS_fsmount 432580#define SYS_fsmount 432
579#define SYS_fspick 433
\ No newline at end of file
581#define SYS_fspick 433
582#define SYS_pidfd_open 434
583#define SYS_clone3 435
\ No newline at end of file
lib/libc/include/arm-linux-musl/bits/alltypes.h+67-55
...@@ -1,17 +1,15 @@...@@ -1,17 +1,15 @@
1#define _REDIR_TIME64 1
1#define _Addr int2#define _Addr int
2#define _Int64 long long3#define _Int64 long long
3#define _Reg int4#define _Reg int
45
5#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)6#if __ARMEB__
6typedef __builtin_va_list va_list;7#define __BYTE_ORDER 4321
7#define __DEFINED_va_list8#else
8#endif9#define __BYTE_ORDER 1234
9
10#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
11typedef __builtin_va_list __isoc_va_list;
12#define __DEFINED___isoc_va_list
13#endif10#endif
1411
12#define __LONG_MAX 0x7fffffffL
1513
16#ifndef __cplusplus14#ifndef __cplusplus
17#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)15#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
...@@ -37,52 +35,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;...@@ -37,52 +35,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;
37#define __DEFINED_max_align_t35#define __DEFINED_max_align_t
38#endif36#endif
3937
4038#define __LITTLE_ENDIAN 1234
41#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)39#define __BIG_ENDIAN 4321
42typedef long time_t;40#define __USE_TIME_BITS64 1
43#define __DEFINED_time_t
44#endif
45
46#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
47typedef long suseconds_t;
48#define __DEFINED_suseconds_t
49#endif
50
51
52#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
53typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
54#define __DEFINED_pthread_attr_t
55#endif
56
57#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
58typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
59#define __DEFINED_pthread_mutex_t
60#endif
61
62#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
63typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
64#define __DEFINED_mtx_t
65#endif
66
67#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
68typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
69#define __DEFINED_pthread_cond_t
70#endif
71
72#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
73typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
74#define __DEFINED_cnd_t
75#endif
76
77#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
78typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
79#define __DEFINED_pthread_rwlock_t
80#endif
81
82#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
83typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
84#define __DEFINED_pthread_barrier_t
85#endif
8641
87#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)42#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
88typedef unsigned _Addr size_t;43typedef unsigned _Addr size_t;
...@@ -119,6 +74,16 @@ typedef _Reg register_t;...@@ -119,6 +74,16 @@ typedef _Reg register_t;
119#define __DEFINED_register_t74#define __DEFINED_register_t
120#endif75#endif
12176
77#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
78typedef _Int64 time_t;
79#define __DEFINED_time_t
80#endif
81
82#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
83typedef _Int64 suseconds_t;
84#define __DEFINED_suseconds_t
85#endif
86
12287
123#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)88#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
124typedef signed char int8_t;89typedef signed char int8_t;
...@@ -254,7 +219,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };...@@ -254,7 +219,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };
254#endif219#endif
255220
256#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)221#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
257struct timespec { time_t tv_sec; long tv_nsec; };222struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
258#define __DEFINED_struct_timespec223#define __DEFINED_struct_timespec
259#endif224#endif
260225
...@@ -350,6 +315,17 @@ typedef struct _IO_FILE FILE;...@@ -350,6 +315,17 @@ typedef struct _IO_FILE FILE;
350#endif315#endif
351316
352317
318#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
319typedef __builtin_va_list va_list;
320#define __DEFINED_va_list
321#endif
322
323#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
324typedef __builtin_va_list __isoc_va_list;
325#define __DEFINED___isoc_va_list
326#endif
327
328
353#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)329#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
354typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;330typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
355#define __DEFINED_mbstate_t331#define __DEFINED_mbstate_t
...@@ -385,6 +361,42 @@ typedef unsigned short sa_family_t;...@@ -385,6 +361,42 @@ typedef unsigned short sa_family_t;
385#endif361#endif
386362
387363
364#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
365typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
366#define __DEFINED_pthread_attr_t
367#endif
368
369#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
370typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
371#define __DEFINED_pthread_mutex_t
372#endif
373
374#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
375typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
376#define __DEFINED_mtx_t
377#endif
378
379#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
380typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
381#define __DEFINED_pthread_cond_t
382#endif
383
384#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
385typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
386#define __DEFINED_cnd_t
387#endif
388
389#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
390typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
391#define __DEFINED_pthread_rwlock_t
392#endif
393
394#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
395typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
396#define __DEFINED_pthread_barrier_t
397#endif
398
399
388#undef _Addr400#undef _Addr
389#undef _Int64401#undef _Int64
390#undef _Reg402#undef _Reg
\ No newline at end of file
lib/libc/include/arm-linux-musl/bits/endian.h deleted-5
...@@ -1,5 +0,0 @@
1#if __ARMEB__
2#define __BYTE_ORDER __BIG_ENDIAN
3#else
4#define __BYTE_ORDER __LITTLE_ENDIAN
5#endif
\ No newline at end of file
lib/libc/include/arm-linux-musl/bits/ipcstat.h created+1
...@@ -0,0 +1 @@
1#define IPC_STAT 0x102
\ No newline at end of file
lib/libc/include/arm-linux-musl/bits/limits.h deleted-7
...@@ -1,7 +0,0 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define LONG_BIT 32
4#endif
5
6#define LONG_MAX 0x7fffffffL
7#define LLONG_MAX 0x7fffffffffffffffLL
\ No newline at end of file
lib/libc/include/arm-linux-musl/bits/msg.h+9-6
...@@ -1,15 +1,18 @@...@@ -1,15 +1,18 @@
1struct msqid_ds {1struct msqid_ds {
2 struct ipc_perm msg_perm;2 struct ipc_perm msg_perm;
3 time_t msg_stime;3 unsigned long __msg_stime_lo;
4 int __unused1;4 unsigned long __msg_stime_hi;
5 time_t msg_rtime;5 unsigned long __msg_rtime_lo;
6 int __unused2;6 unsigned long __msg_rtime_hi;
7 time_t msg_ctime;7 unsigned long __msg_ctime_lo;
8 int __unused3;8 unsigned long __msg_ctime_hi;
9 unsigned long msg_cbytes;9 unsigned long msg_cbytes;
10 msgqnum_t msg_qnum;10 msgqnum_t msg_qnum;
11 msglen_t msg_qbytes;11 msglen_t msg_qbytes;
12 pid_t msg_lspid;12 pid_t msg_lspid;
13 pid_t msg_lrpid;13 pid_t msg_lrpid;
14 unsigned long __unused[2];14 unsigned long __unused[2];
15 time_t msg_stime;
16 time_t msg_rtime;
17 time_t msg_ctime;
15};18};
\ No newline at end of file
lib/libc/include/arm-linux-musl/bits/sem.h+6-4
...@@ -1,9 +1,9 @@...@@ -1,9 +1,9 @@
1struct semid_ds {1struct semid_ds {
2 struct ipc_perm sem_perm;2 struct ipc_perm sem_perm;
3 time_t sem_otime;3 unsigned long __sem_otime_lo;
4 long __unused1;4 unsigned long __sem_otime_hi;
5 time_t sem_ctime;5 unsigned long __sem_ctime_lo;
6 long __unused2;6 unsigned long __sem_ctime_hi;
7#if __BYTE_ORDER == __LITTLE_ENDIAN7#if __BYTE_ORDER == __LITTLE_ENDIAN
8 unsigned short sem_nsems;8 unsigned short sem_nsems;
9 char __sem_nsems_pad[sizeof(long)-sizeof(short)];9 char __sem_nsems_pad[sizeof(long)-sizeof(short)];
...@@ -13,4 +13,6 @@ struct semid_ds {...@@ -13,4 +13,6 @@ struct semid_ds {
13#endif13#endif
14 long __unused3;14 long __unused3;
15 long __unused4;15 long __unused4;
16 time_t sem_otime;
17 time_t sem_ctime;
16};18};
\ No newline at end of file
lib/libc/include/arm-linux-musl/bits/shm.h+10-6
...@@ -3,17 +3,21 @@...@@ -3,17 +3,21 @@
3struct shmid_ds {3struct shmid_ds {
4 struct ipc_perm shm_perm;4 struct ipc_perm shm_perm;
5 size_t shm_segsz;5 size_t shm_segsz;
6 time_t shm_atime;6 unsigned long __shm_atime_lo;
7 int __unused1;7 unsigned long __shm_atime_hi;
8 time_t shm_dtime;8 unsigned long __shm_dtime_lo;
9 int __unused2;9 unsigned long __shm_dtime_hi;
10 time_t shm_ctime;10 unsigned long __shm_ctime_lo;
11 int __unused3;11 unsigned long __shm_ctime_hi;
12 pid_t shm_cpid;12 pid_t shm_cpid;
13 pid_t shm_lpid;13 pid_t shm_lpid;
14 unsigned long shm_nattch;14 unsigned long shm_nattch;
15 unsigned long __pad1;15 unsigned long __pad1;
16 unsigned long __pad2;16 unsigned long __pad2;
17 unsigned long __pad3;
18 time_t shm_atime;
19 time_t shm_dtime;
20 time_t shm_ctime;
17};21};
1822
19struct shminfo {23struct shminfo {
lib/libc/include/arm-linux-musl/bits/stat.h+5-1
...@@ -14,8 +14,12 @@ struct stat {...@@ -14,8 +14,12 @@ struct stat {
14 off_t st_size;14 off_t st_size;
15 blksize_t st_blksize;15 blksize_t st_blksize;
16 blkcnt_t st_blocks;16 blkcnt_t st_blocks;
17 struct {
18 long tv_sec;
19 long tv_nsec;
20 } __st_atim32, __st_mtim32, __st_ctim32;
21 ino_t st_ino;
17 struct timespec st_atim;22 struct timespec st_atim;
18 struct timespec st_mtim;23 struct timespec st_mtim;
19 struct timespec st_ctim;24 struct timespec st_ctim;
20 ino_t st_ino;
21};25};
\ No newline at end of file
lib/libc/include/arm-linux-musl/bits/syscall.h+25-21
...@@ -55,8 +55,8 @@...@@ -55,8 +55,8 @@
55#define __NR_sethostname 7455#define __NR_sethostname 74
56#define __NR_setrlimit 7556#define __NR_setrlimit 75
57#define __NR_getrusage 7757#define __NR_getrusage 77
58#define __NR_gettimeofday 7858#define __NR_gettimeofday_time32 78
59#define __NR_settimeofday 7959#define __NR_settimeofday_time32 79
60#define __NR_getgroups 8060#define __NR_getgroups 80
61#define __NR_setgroups 8161#define __NR_setgroups 81
62#define __NR_symlink 8362#define __NR_symlink 83
...@@ -211,14 +211,14 @@...@@ -211,14 +211,14 @@
211#define __NR_remap_file_pages 253211#define __NR_remap_file_pages 253
212#define __NR_set_tid_address 256212#define __NR_set_tid_address 256
213#define __NR_timer_create 257213#define __NR_timer_create 257
214#define __NR_timer_settime 258214#define __NR_timer_settime32 258
215#define __NR_timer_gettime 259215#define __NR_timer_gettime32 259
216#define __NR_timer_getoverrun 260216#define __NR_timer_getoverrun 260
217#define __NR_timer_delete 261217#define __NR_timer_delete 261
218#define __NR_clock_settime 262218#define __NR_clock_settime32 262
219#define __NR_clock_gettime 263219#define __NR_clock_gettime32 263
220#define __NR_clock_getres 264220#define __NR_clock_getres_time32 264
221#define __NR_clock_nanosleep 265221#define __NR_clock_nanosleep_time32 265
222#define __NR_statfs64 266222#define __NR_statfs64 266
223#define __NR_fstatfs64 267223#define __NR_fstatfs64 267
224#define __NR_tgkill 268224#define __NR_tgkill 268
...@@ -308,8 +308,8 @@...@@ -308,8 +308,8 @@
308#define __NR_timerfd_create 350308#define __NR_timerfd_create 350
309#define __NR_eventfd 351309#define __NR_eventfd 351
310#define __NR_fallocate 352310#define __NR_fallocate 352
311#define __NR_timerfd_settime 353311#define __NR_timerfd_settime32 353
312#define __NR_timerfd_gettime 354312#define __NR_timerfd_gettime32 354
313#define __NR_signalfd4 355313#define __NR_signalfd4 355
314#define __NR_eventfd2 356314#define __NR_eventfd2 356
315#define __NR_epoll_create1 357315#define __NR_epoll_create1 357
...@@ -387,6 +387,8 @@...@@ -387,6 +387,8 @@
387#define __NR_fsconfig 431387#define __NR_fsconfig 431
388#define __NR_fsmount 432388#define __NR_fsmount 432
389#define __NR_fspick 433389#define __NR_fspick 433
390#define __NR_pidfd_open 434
391#define __NR_clone3 435
390392
391#define __ARM_NR_breakpoint 0x0f0001393#define __ARM_NR_breakpoint 0x0f0001
392#define __ARM_NR_cacheflush 0x0f0002394#define __ARM_NR_cacheflush 0x0f0002
...@@ -452,8 +454,8 @@...@@ -452,8 +454,8 @@
452#define SYS_sethostname 74454#define SYS_sethostname 74
453#define SYS_setrlimit 75455#define SYS_setrlimit 75
454#define SYS_getrusage 77456#define SYS_getrusage 77
455#define SYS_gettimeofday 78457#define SYS_gettimeofday_time32 78
456#define SYS_settimeofday 79458#define SYS_settimeofday_time32 79
457#define SYS_getgroups 80459#define SYS_getgroups 80
458#define SYS_setgroups 81460#define SYS_setgroups 81
459#define SYS_symlink 83461#define SYS_symlink 83
...@@ -608,14 +610,14 @@...@@ -608,14 +610,14 @@
608#define SYS_remap_file_pages 253610#define SYS_remap_file_pages 253
609#define SYS_set_tid_address 256611#define SYS_set_tid_address 256
610#define SYS_timer_create 257612#define SYS_timer_create 257
611#define SYS_timer_settime 258613#define SYS_timer_settime32 258
612#define SYS_timer_gettime 259614#define SYS_timer_gettime32 259
613#define SYS_timer_getoverrun 260615#define SYS_timer_getoverrun 260
614#define SYS_timer_delete 261616#define SYS_timer_delete 261
615#define SYS_clock_settime 262617#define SYS_clock_settime32 262
616#define SYS_clock_gettime 263618#define SYS_clock_gettime32 263
617#define SYS_clock_getres 264619#define SYS_clock_getres_time32 264
618#define SYS_clock_nanosleep 265620#define SYS_clock_nanosleep_time32 265
619#define SYS_statfs64 266621#define SYS_statfs64 266
620#define SYS_fstatfs64 267622#define SYS_fstatfs64 267
621#define SYS_tgkill 268623#define SYS_tgkill 268
...@@ -705,8 +707,8 @@...@@ -705,8 +707,8 @@
705#define SYS_timerfd_create 350707#define SYS_timerfd_create 350
706#define SYS_eventfd 351708#define SYS_eventfd 351
707#define SYS_fallocate 352709#define SYS_fallocate 352
708#define SYS_timerfd_settime 353710#define SYS_timerfd_settime32 353
709#define SYS_timerfd_gettime 354711#define SYS_timerfd_gettime32 354
710#define SYS_signalfd4 355712#define SYS_signalfd4 355
711#define SYS_eventfd2 356713#define SYS_eventfd2 356
712#define SYS_epoll_create1 357714#define SYS_epoll_create1 357
...@@ -783,4 +785,6 @@...@@ -783,4 +785,6 @@
783#define SYS_fsopen 430785#define SYS_fsopen 430
784#define SYS_fsconfig 431786#define SYS_fsconfig 431
785#define SYS_fsmount 432787#define SYS_fsmount 432
786#define SYS_fspick 433
\ No newline at end of file
788#define SYS_fspick 433
789#define SYS_pidfd_open 434
790#define SYS_clone3 435
\ No newline at end of file
lib/libc/include/generic-musl/aio.h+4
...@@ -62,6 +62,10 @@ int lio_listio(int, struct aiocb *__restrict const *__restrict, int, struct sige...@@ -62,6 +62,10 @@ int lio_listio(int, struct aiocb *__restrict const *__restrict, int, struct sige
62#define off64_t off_t62#define off64_t off_t
63#endif63#endif
6464
65#if _REDIR_TIME64
66__REDIR(aio_suspend, __aio_suspend_time64);
67#endif
68
65#ifdef __cplusplus69#ifdef __cplusplus
66}70}
67#endif71#endif
lib/libc/include/generic-musl/alloca.h-2
...@@ -10,9 +10,7 @@ extern "C" {...@@ -10,9 +10,7 @@ extern "C" {
1010
11void *alloca(size_t);11void *alloca(size_t);
1212
13#ifdef __GNUC__
14#define alloca __builtin_alloca13#define alloca __builtin_alloca
15#endif
1614
17#ifdef __cplusplus15#ifdef __cplusplus
18}16}
lib/libc/include/generic-musl/arpa/nameser.h-1
...@@ -7,7 +7,6 @@ extern "C" {...@@ -7,7 +7,6 @@ extern "C" {
77
8#include <stddef.h>8#include <stddef.h>
9#include <stdint.h>9#include <stdint.h>
10#include <endian.h>
1110
12#define __NAMESER 1999100611#define __NAMESER 19991006
13#define NS_PACKETSZ 51212#define NS_PACKETSZ 512
lib/libc/include/generic-musl/bits/dirent.h created+11
...@@ -0,0 +1,11 @@
1#define _DIRENT_HAVE_D_RECLEN
2#define _DIRENT_HAVE_D_OFF
3#define _DIRENT_HAVE_D_TYPE
4
5struct dirent {
6 ino_t d_ino;
7 off_t d_off;
8 unsigned short d_reclen;
9 unsigned char d_type;
10 char d_name[256];
11};
\ No newline at end of file
lib/libc/include/generic-musl/bits/endian.h deleted-1
...@@ -1 +0,0 @@
1#define __BYTE_ORDER __LITTLE_ENDIAN
\ No newline at end of file
lib/libc/include/generic-musl/bits/ioctl.h+5
...@@ -104,7 +104,12 @@...@@ -104,7 +104,12 @@
104#define FIOGETOWN 0x8903104#define FIOGETOWN 0x8903
105#define SIOCGPGRP 0x8904105#define SIOCGPGRP 0x8904
106#define SIOCATMARK 0x8905106#define SIOCATMARK 0x8905
107#if __LONG_MAX == 0x7fffffff
108#define SIOCGSTAMP _IOR(0x89, 6, char[16])
109#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])
110#else
107#define SIOCGSTAMP 0x8906111#define SIOCGSTAMP 0x8906
108#define SIOCGSTAMPNS 0x8907112#define SIOCGSTAMPNS 0x8907
113#endif
109114
110#include <bits/ioctl_fix.h>115#include <bits/ioctl_fix.h>
\ No newline at end of file
lib/libc/include/generic-musl/bits/limits.h-7
...@@ -1,7 +0,0 @@...@@ -1,7 +0,0 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define LONG_BIT 64
4#endif
5
6#define LONG_MAX 0x7fffffffffffffffL
7#define LLONG_MAX 0x7fffffffffffffffLL
\ No newline at end of file
lib/libc/include/generic-musl/bits/socket.h-15
...@@ -1,15 +0,0 @@...@@ -1,15 +0,0 @@
1struct msghdr {
2 void *msg_name;
3 socklen_t msg_namelen;
4 struct iovec *msg_iov;
5 int msg_iovlen;
6 void *msg_control;
7 socklen_t msg_controllen;
8 int msg_flags;
9};
10
11struct cmsghdr {
12 socklen_t cmsg_len;
13 int cmsg_level;
14 int cmsg_type;
15};
\ No newline at end of file
lib/libc/include/generic-musl/dirent.h+2-12
...@@ -15,19 +15,9 @@ extern "C" {...@@ -15,19 +15,9 @@ extern "C" {
1515
16#include <bits/alltypes.h>16#include <bits/alltypes.h>
1717
18typedef struct __dirstream DIR;18#include <bits/dirent.h>
19
20#define _DIRENT_HAVE_D_RECLEN
21#define _DIRENT_HAVE_D_OFF
22#define _DIRENT_HAVE_D_TYPE
2319
24struct dirent {20typedef struct __dirstream DIR;
25 ino_t d_ino;
26 off_t d_off;
27 unsigned short d_reclen;
28 unsigned char d_type;
29 char d_name[256];
30};
3121
32#define d_fileno d_ino22#define d_fileno d_ino
3323
lib/libc/include/generic-musl/dlfcn.h+4
...@@ -35,6 +35,10 @@ int dladdr(const void *, Dl_info *);...@@ -35,6 +35,10 @@ int dladdr(const void *, Dl_info *);
35int dlinfo(void *, int, void *);35int dlinfo(void *, int, void *);
36#endif36#endif
3737
38#if _REDIR_TIME64
39__REDIR(dlsym, __dlsym_time64);
40#endif
41
38#ifdef __cplusplus42#ifdef __cplusplus
39}43}
40#endif44#endif
lib/libc/include/generic-musl/endian.h+21-23
...@@ -3,25 +3,19 @@...@@ -3,25 +3,19 @@
33
4#include <features.h>4#include <features.h>
55
6#define __LITTLE_ENDIAN 12346#define __NEED_uint16_t
7#define __BIG_ENDIAN 43217#define __NEED_uint32_t
8#define __PDP_ENDIAN 34128#define __NEED_uint64_t
99
10#if defined(__GNUC__) && defined(__BYTE_ORDER__)10#include <bits/alltypes.h>
11#define __BYTE_ORDER __BYTE_ORDER__
12#else
13#include <bits/endian.h>
14#endif
1511
16#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)12#define __PDP_ENDIAN 3412
1713
18#define BIG_ENDIAN __BIG_ENDIAN14#define BIG_ENDIAN __BIG_ENDIAN
19#define LITTLE_ENDIAN __LITTLE_ENDIAN15#define LITTLE_ENDIAN __LITTLE_ENDIAN
20#define PDP_ENDIAN __PDP_ENDIAN16#define PDP_ENDIAN __PDP_ENDIAN
21#define BYTE_ORDER __BYTE_ORDER17#define BYTE_ORDER __BYTE_ORDER
2218
23#include <stdint.h>
24
25static __inline uint16_t __bswap16(uint16_t __x)19static __inline uint16_t __bswap16(uint16_t __x)
26{20{
27 return __x<<8 | __x>>8;21 return __x<<8 | __x>>8;
...@@ -40,43 +34,47 @@ static __inline uint64_t __bswap64(uint64_t __x)...@@ -40,43 +34,47 @@ static __inline uint64_t __bswap64(uint64_t __x)
40#if __BYTE_ORDER == __LITTLE_ENDIAN34#if __BYTE_ORDER == __LITTLE_ENDIAN
41#define htobe16(x) __bswap16(x)35#define htobe16(x) __bswap16(x)
42#define be16toh(x) __bswap16(x)36#define be16toh(x) __bswap16(x)
43#define betoh16(x) __bswap16(x)
44#define htobe32(x) __bswap32(x)37#define htobe32(x) __bswap32(x)
45#define be32toh(x) __bswap32(x)38#define be32toh(x) __bswap32(x)
46#define betoh32(x) __bswap32(x)
47#define htobe64(x) __bswap64(x)39#define htobe64(x) __bswap64(x)
48#define be64toh(x) __bswap64(x)40#define be64toh(x) __bswap64(x)
49#define betoh64(x) __bswap64(x)
50#define htole16(x) (uint16_t)(x)41#define htole16(x) (uint16_t)(x)
51#define le16toh(x) (uint16_t)(x)42#define le16toh(x) (uint16_t)(x)
52#define letoh16(x) (uint16_t)(x)
53#define htole32(x) (uint32_t)(x)43#define htole32(x) (uint32_t)(x)
54#define le32toh(x) (uint32_t)(x)44#define le32toh(x) (uint32_t)(x)
55#define letoh32(x) (uint32_t)(x)
56#define htole64(x) (uint64_t)(x)45#define htole64(x) (uint64_t)(x)
57#define le64toh(x) (uint64_t)(x)46#define le64toh(x) (uint64_t)(x)
58#define letoh64(x) (uint64_t)(x)
59#else47#else
60#define htobe16(x) (uint16_t)(x)48#define htobe16(x) (uint16_t)(x)
61#define be16toh(x) (uint16_t)(x)49#define be16toh(x) (uint16_t)(x)
62#define betoh16(x) (uint16_t)(x)
63#define htobe32(x) (uint32_t)(x)50#define htobe32(x) (uint32_t)(x)
64#define be32toh(x) (uint32_t)(x)51#define be32toh(x) (uint32_t)(x)
65#define betoh32(x) (uint32_t)(x)
66#define htobe64(x) (uint64_t)(x)52#define htobe64(x) (uint64_t)(x)
67#define be64toh(x) (uint64_t)(x)53#define be64toh(x) (uint64_t)(x)
68#define betoh64(x) (uint64_t)(x)
69#define htole16(x) __bswap16(x)54#define htole16(x) __bswap16(x)
70#define le16toh(x) __bswap16(x)55#define le16toh(x) __bswap16(x)
71#define letoh16(x) __bswap16(x)
72#define htole32(x) __bswap32(x)56#define htole32(x) __bswap32(x)
73#define le32toh(x) __bswap32(x)57#define le32toh(x) __bswap32(x)
74#define letoh32(x) __bswap32(x)
75#define htole64(x) __bswap64(x)58#define htole64(x) __bswap64(x)
76#define le64toh(x) __bswap64(x)59#define le64toh(x) __bswap64(x)
77#define letoh64(x) __bswap64(x)
78#endif60#endif
7961
62#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
63#if __BYTE_ORDER == __LITTLE_ENDIAN
64#define betoh16(x) __bswap16(x)
65#define betoh32(x) __bswap32(x)
66#define betoh64(x) __bswap64(x)
67#define letoh16(x) (uint16_t)(x)
68#define letoh32(x) (uint32_t)(x)
69#define letoh64(x) (uint64_t)(x)
70#else
71#define betoh16(x) (uint16_t)(x)
72#define betoh32(x) (uint32_t)(x)
73#define betoh64(x) (uint64_t)(x)
74#define letoh16(x) __bswap16(x)
75#define letoh32(x) __bswap32(x)
76#define letoh64(x) __bswap64(x)
77#endif
80#endif78#endif
8179
82#endif80#endif
\ No newline at end of file
lib/libc/include/generic-musl/features.h+2
...@@ -35,4 +35,6 @@...@@ -35,4 +35,6 @@
35#define _Noreturn35#define _Noreturn
36#endif36#endif
3737
38#define __REDIR(x,y) __typeof__(x) x __asm__(#y)
39
38#endif40#endif
\ No newline at end of file
lib/libc/include/generic-musl/limits.h+13-5
...@@ -3,9 +3,7 @@...@@ -3,9 +3,7 @@
33
4#include <features.h>4#include <features.h>
55
6/* Most limits are system-specific */6#include <bits/alltypes.h> /* __LONG_MAX */
7
8#include <bits/limits.h>
97
10/* Support signed or unsigned plain-char */8/* Support signed or unsigned plain-char */
119
...@@ -17,8 +15,6 @@...@@ -17,8 +15,6 @@
17#define CHAR_MAX 12715#define CHAR_MAX 127
18#endif16#endif
1917
20/* Some universal constants... */
21
22#define CHAR_BIT 818#define CHAR_BIT 8
23#define SCHAR_MIN (-128)19#define SCHAR_MIN (-128)
24#define SCHAR_MAX 12720#define SCHAR_MAX 127
...@@ -30,8 +26,10 @@...@@ -30,8 +26,10 @@
30#define INT_MAX 0x7fffffff26#define INT_MAX 0x7fffffff
31#define UINT_MAX 0xffffffffU27#define UINT_MAX 0xffffffffU
32#define LONG_MIN (-LONG_MAX-1)28#define LONG_MIN (-LONG_MAX-1)
29#define LONG_MAX __LONG_MAX
33#define ULONG_MAX (2UL*LONG_MAX+1)30#define ULONG_MAX (2UL*LONG_MAX+1)
34#define LLONG_MIN (-LLONG_MAX-1)31#define LLONG_MIN (-LLONG_MAX-1)
32#define LLONG_MAX 0x7fffffffffffffffLL
35#define ULLONG_MAX (2ULL*LLONG_MAX+1)33#define ULLONG_MAX (2ULL*LLONG_MAX+1)
3634
37#define MB_LEN_MAX 435#define MB_LEN_MAX 4
...@@ -39,9 +37,13 @@...@@ -39,9 +37,13 @@
39#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \37#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
40 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)38 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
4139
40#include <bits/limits.h>
41
42#define PIPE_BUF 409642#define PIPE_BUF 4096
43#define FILESIZEBITS 6443#define FILESIZEBITS 64
44#ifndef NAME_MAX
44#define NAME_MAX 25545#define NAME_MAX 255
46#endif
45#define PATH_MAX 409647#define PATH_MAX 4096
46#define NGROUPS_MAX 3248#define NGROUPS_MAX 32
47#define ARG_MAX 13107249#define ARG_MAX 131072
...@@ -53,6 +55,12 @@...@@ -53,6 +55,12 @@
53#define TTY_NAME_MAX 3255#define TTY_NAME_MAX 32
54#define HOST_NAME_MAX 25556#define HOST_NAME_MAX 255
5557
58#if LONG_MAX == 0x7fffffffL
59#define LONG_BIT 32
60#else
61#define LONG_BIT 64
62#endif
63
56/* Implementation choices... */64/* Implementation choices... */
5765
58#define PTHREAD_KEYS_MAX 12866#define PTHREAD_KEYS_MAX 128
lib/libc/include/generic-musl/mqueue.h+5
...@@ -30,6 +30,11 @@ ssize_t mq_timedreceive(mqd_t, char *__restrict, size_t, unsigned *__restrict, c...@@ -30,6 +30,11 @@ ssize_t mq_timedreceive(mqd_t, char *__restrict, size_t, unsigned *__restrict, c
30int mq_timedsend(mqd_t, const char *, size_t, unsigned, const struct timespec *);30int mq_timedsend(mqd_t, const char *, size_t, unsigned, const struct timespec *);
31int mq_unlink(const char *);31int mq_unlink(const char *);
3232
33#if _REDIR_TIME64
34__REDIR(mq_timedreceive, __mq_timedreceive_time64);
35__REDIR(mq_timedsend, __mq_timedsend_time64);
36#endif
37
33#ifdef __cplusplus38#ifdef __cplusplus
34}39}
35#endif40#endif
lib/libc/include/generic-musl/netinet/icmp6.h-1
...@@ -9,7 +9,6 @@ extern "C" {...@@ -9,7 +9,6 @@ extern "C" {
9#include <string.h>9#include <string.h>
10#include <sys/types.h>10#include <sys/types.h>
11#include <netinet/in.h>11#include <netinet/in.h>
12#include <endian.h>
1312
14#define ICMP6_FILTER 113#define ICMP6_FILTER 1
1514
lib/libc/include/generic-musl/netinet/if_ether.h+1
...@@ -58,6 +58,7 @@...@@ -58,6 +58,7 @@
58#define ETH_P_ERSPAN 0x88BE58#define ETH_P_ERSPAN 0x88BE
59#define ETH_P_PREAUTH 0x88C759#define ETH_P_PREAUTH 0x88C7
60#define ETH_P_TIPC 0x88CA60#define ETH_P_TIPC 0x88CA
61#define ETH_P_LLDP 0x88CC
61#define ETH_P_MACSEC 0x88E562#define ETH_P_MACSEC 0x88E5
62#define ETH_P_8021AH 0x88E763#define ETH_P_8021AH 0x88E7
63#define ETH_P_MVRP 0x88F564#define ETH_P_MVRP 0x88F5
lib/libc/include/generic-musl/netinet/ip.h+2-1
...@@ -7,7 +7,6 @@ extern "C" {...@@ -7,7 +7,6 @@ extern "C" {
77
8#include <stdint.h>8#include <stdint.h>
9#include <netinet/in.h>9#include <netinet/in.h>
10#include <endian.h>
1110
12struct timestamp {11struct timestamp {
13 uint8_t len;12 uint8_t len;
...@@ -191,6 +190,8 @@ struct ip_timestamp {...@@ -191,6 +190,8 @@ struct ip_timestamp {
191190
192#define IP_MSS 576191#define IP_MSS 576
193192
193#define __UAPI_DEF_IPHDR 0
194
194#ifdef __cplusplus195#ifdef __cplusplus
195}196}
196#endif197#endif
lib/libc/include/generic-musl/netinet/ip6.h-1
...@@ -7,7 +7,6 @@ extern "C" {...@@ -7,7 +7,6 @@ extern "C" {
77
8#include <stdint.h>8#include <stdint.h>
9#include <netinet/in.h>9#include <netinet/in.h>
10#include <endian.h>
1110
12struct ip6_hdr {11struct ip6_hdr {
13 union {12 union {
lib/libc/include/generic-musl/netinet/tcp.h+3-1
...@@ -38,6 +38,7 @@...@@ -38,6 +38,7 @@
38#define TCP_FASTOPEN_NO_COOKIE 3438#define TCP_FASTOPEN_NO_COOKIE 34
39#define TCP_ZEROCOPY_RECEIVE 3539#define TCP_ZEROCOPY_RECEIVE 35
40#define TCP_INQ 3640#define TCP_INQ 36
41#define TCP_TX_DELAY 37
4142
42#define TCP_CM_INQ TCP_INQ43#define TCP_CM_INQ TCP_INQ
4344
...@@ -97,7 +98,6 @@ enum {...@@ -97,7 +98,6 @@ enum {
97#include <sys/types.h>98#include <sys/types.h>
98#include <sys/socket.h>99#include <sys/socket.h>
99#include <stdint.h>100#include <stdint.h>
100#include <endian.h>
101101
102typedef uint32_t tcp_seq;102typedef uint32_t tcp_seq;
103103
...@@ -234,6 +234,8 @@ struct tcp_info {...@@ -234,6 +234,8 @@ struct tcp_info {
234 uint64_t tcpi_bytes_retrans;234 uint64_t tcpi_bytes_retrans;
235 uint32_t tcpi_dsack_dups;235 uint32_t tcpi_dsack_dups;
236 uint32_t tcpi_reord_seen;236 uint32_t tcpi_reord_seen;
237 uint32_t tcpi_rcv_ooopack;
238 uint32_t tcpi_snd_wnd;
237};239};
238240
239#define TCP_MD5SIG_MAXKEYLEN 80241#define TCP_MD5SIG_MAXKEYLEN 80
lib/libc/include/generic-musl/poll.h+6
...@@ -44,6 +44,12 @@ int poll (struct pollfd *, nfds_t, int);...@@ -44,6 +44,12 @@ int poll (struct pollfd *, nfds_t, int);
44int ppoll(struct pollfd *, nfds_t, const struct timespec *, const sigset_t *);44int ppoll(struct pollfd *, nfds_t, const struct timespec *, const sigset_t *);
45#endif45#endif
4646
47#if _REDIR_TIME64
48#ifdef _GNU_SOURCE
49__REDIR(ppoll, __ppoll_time64);
50#endif
51#endif
52
47#ifdef __cplusplus53#ifdef __cplusplus
48}54}
49#endif55#endif
lib/libc/include/generic-musl/pthread.h+10
...@@ -224,6 +224,16 @@ int pthread_tryjoin_np(pthread_t, void **);...@@ -224,6 +224,16 @@ int pthread_tryjoin_np(pthread_t, void **);
224int pthread_timedjoin_np(pthread_t, void **, const struct timespec *);224int pthread_timedjoin_np(pthread_t, void **, const struct timespec *);
225#endif225#endif
226226
227#if _REDIR_TIME64
228__REDIR(pthread_mutex_timedlock, __pthread_mutex_timedlock_time64);
229__REDIR(pthread_cond_timedwait, __pthread_cond_timedwait_time64);
230__REDIR(pthread_rwlock_timedrdlock, __pthread_rwlock_timedrdlock_time64);
231__REDIR(pthread_rwlock_timedwrlock, __pthread_rwlock_timedwrlock_time64);
232#ifdef _GNU_SOURCE
233__REDIR(pthread_timedjoin_np, __pthread_timedjoin_np_time64);
234#endif
235#endif
236
227#ifdef __cplusplus237#ifdef __cplusplus
228}238}
229#endif239#endif
lib/libc/include/generic-musl/sched.h+8
...@@ -19,10 +19,14 @@ extern "C" {...@@ -19,10 +19,14 @@ extern "C" {
19struct sched_param {19struct sched_param {
20 int sched_priority;20 int sched_priority;
21 int __reserved1;21 int __reserved1;
22#if _REDIR_TIME64
23 long __reserved2[4];
24#else
22 struct {25 struct {
23 time_t __reserved1;26 time_t __reserved1;
24 long __reserved2;27 long __reserved2;
25 } __reserved2[2];28 } __reserved2[2];
29#endif
26 int __reserved3;30 int __reserved3;
27};31};
2832
...@@ -133,6 +137,10 @@ __CPU_op_func_S(XOR, ^)...@@ -133,6 +137,10 @@ __CPU_op_func_S(XOR, ^)
133137
134#endif138#endif
135139
140#if _REDIR_TIME64
141__REDIR(sched_rr_get_interval, __sched_rr_get_interval_time64);
142#endif
143
136#ifdef __cplusplus144#ifdef __cplusplus
137}145}
138#endif146#endif
lib/libc/include/generic-musl/semaphore.h+4
...@@ -29,6 +29,10 @@ int sem_trywait(sem_t *);...@@ -29,6 +29,10 @@ int sem_trywait(sem_t *);
29int sem_unlink(const char *);29int sem_unlink(const char *);
30int sem_wait(sem_t *);30int sem_wait(sem_t *);
3131
32#if _REDIR_TIME64
33__REDIR(sem_timedwait, __sem_timedwait_time64);
34#endif
35
32#ifdef __cplusplus36#ifdef __cplusplus
33}37}
34#endif38#endif
lib/libc/include/generic-musl/signal.h+8
...@@ -271,6 +271,14 @@ typedef int sig_atomic_t;...@@ -271,6 +271,14 @@ typedef int sig_atomic_t;
271void (*signal(int, void (*)(int)))(int);271void (*signal(int, void (*)(int)))(int);
272int raise(int);272int raise(int);
273273
274#if _REDIR_TIME64
275#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
276 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
277 || defined(_BSD_SOURCE)
278__REDIR(sigtimedwait, __sigtimedwait_time64);
279#endif
280#endif
281
274#ifdef __cplusplus282#ifdef __cplusplus
275}283}
276#endif284#endif
lib/libc/include/generic-musl/sys/acct.h-1
...@@ -6,7 +6,6 @@ extern "C" {...@@ -6,7 +6,6 @@ extern "C" {
6#endif6#endif
77
8#include <features.h>8#include <features.h>
9#include <endian.h>
10#include <time.h>9#include <time.h>
11#include <stdint.h>10#include <stdint.h>
1211
lib/libc/include/generic-musl/sys/ioctl.h+1
...@@ -4,6 +4,7 @@...@@ -4,6 +4,7 @@
4extern "C" {4extern "C" {
5#endif5#endif
66
7#include <bits/alltypes.h>
7#include <bits/ioctl.h>8#include <bits/ioctl.h>
89
9#define N_TTY 010#define N_TTY 0
lib/libc/include/generic-musl/sys/mman.h+2
...@@ -92,6 +92,8 @@ extern "C" {...@@ -92,6 +92,8 @@ extern "C" {
92#define MADV_DODUMP 1792#define MADV_DODUMP 17
93#define MADV_WIPEONFORK 1893#define MADV_WIPEONFORK 18
94#define MADV_KEEPONFORK 1994#define MADV_KEEPONFORK 19
95#define MADV_COLD 20
96#define MADV_PAGEOUT 21
95#define MADV_HWPOISON 10097#define MADV_HWPOISON 100
96#define MADV_SOFT_OFFLINE 10198#define MADV_SOFT_OFFLINE 101
97#endif99#endif
lib/libc/include/generic-musl/sys/prctl.h+4
...@@ -154,6 +154,10 @@ struct prctl_mm_map {...@@ -154,6 +154,10 @@ struct prctl_mm_map {
154#define PR_PAC_APDBKEY (1UL << 3)154#define PR_PAC_APDBKEY (1UL << 3)
155#define PR_PAC_APGAKEY (1UL << 4)155#define PR_PAC_APGAKEY (1UL << 4)
156156
157#define PR_SET_TAGGED_ADDR_CTRL 55
158#define PR_GET_TAGGED_ADDR_CTRL 56
159#define PR_TAGGED_ADDR_ENABLE (1UL << 0)
160
157int prctl (int, ...);161int prctl (int, ...);
158162
159#ifdef __cplusplus163#ifdef __cplusplus
lib/libc/include/generic-musl/sys/procfs.h+3-4
...@@ -23,10 +23,9 @@ struct elf_prstatus {...@@ -23,10 +23,9 @@ struct elf_prstatus {
23 pid_t pr_ppid;23 pid_t pr_ppid;
24 pid_t pr_pgrp;24 pid_t pr_pgrp;
25 pid_t pr_sid;25 pid_t pr_sid;
26 struct timeval pr_utime;26 struct {
27 struct timeval pr_stime;27 long tv_sec, tv_usec;
28 struct timeval pr_cutime;28 } pr_utime, pr_stime, pr_cutime, pr_cstime;
29 struct timeval pr_cstime;
30 elf_gregset_t pr_reg;29 elf_gregset_t pr_reg;
31 int pr_fpvalid;30 int pr_fpvalid;
32};31};
lib/libc/include/generic-musl/sys/ptrace.h+29
...@@ -41,6 +41,7 @@ extern "C" {...@@ -41,6 +41,7 @@ extern "C" {
41#define PTRACE_SETSIGMASK 0x420b41#define PTRACE_SETSIGMASK 0x420b
42#define PTRACE_SECCOMP_GET_FILTER 0x420c42#define PTRACE_SECCOMP_GET_FILTER 0x420c
43#define PTRACE_SECCOMP_GET_METADATA 0x420d43#define PTRACE_SECCOMP_GET_METADATA 0x420d
44#define PTRACE_GET_SYSCALL_INFO 0x420e
4445
45#define PT_READ_I PTRACE_PEEKTEXT46#define PT_READ_I PTRACE_PEEKTEXT
46#define PT_READ_D PTRACE_PEEKDATA47#define PT_READ_D PTRACE_PEEKDATA
...@@ -88,6 +89,11 @@ extern "C" {...@@ -88,6 +89,11 @@ extern "C" {
8889
89#define PTRACE_PEEKSIGINFO_SHARED 190#define PTRACE_PEEKSIGINFO_SHARED 1
9091
92#define PTRACE_SYSCALL_INFO_NONE 0
93#define PTRACE_SYSCALL_INFO_ENTRY 1
94#define PTRACE_SYSCALL_INFO_EXIT 2
95#define PTRACE_SYSCALL_INFO_SECCOMP 3
96
91#include <bits/ptrace.h>97#include <bits/ptrace.h>
9298
93struct __ptrace_peeksiginfo_args {99struct __ptrace_peeksiginfo_args {
...@@ -101,6 +107,29 @@ struct __ptrace_seccomp_metadata {...@@ -101,6 +107,29 @@ struct __ptrace_seccomp_metadata {
101 uint64_t flags;107 uint64_t flags;
102};108};
103109
110struct __ptrace_syscall_info {
111 uint8_t op;
112 uint8_t __pad[3];
113 uint32_t arch;
114 uint64_t instruction_pointer;
115 uint64_t stack_pointer;
116 union {
117 struct {
118 uint64_t nr;
119 uint64_t args[6];
120 } entry;
121 struct {
122 int64_t rval;
123 uint8_t is_error;
124 } exit;
125 struct {
126 uint64_t nr;
127 uint64_t args[6];
128 uint32_t ret_data;
129 } seccomp;
130 };
131};
132
104long ptrace(int, ...);133long ptrace(int, ...);
105134
106#ifdef __cplusplus135#ifdef __cplusplus
lib/libc/include/generic-musl/sys/resource.h+6-1
...@@ -90,7 +90,8 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);...@@ -90,7 +90,8 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
90#define RLIMIT_MSGQUEUE 1290#define RLIMIT_MSGQUEUE 12
91#define RLIMIT_NICE 1391#define RLIMIT_NICE 13
92#define RLIMIT_RTPRIO 1492#define RLIMIT_RTPRIO 14
93#define RLIMIT_NLIMITS 1593#define RLIMIT_RTTIME 15
94#define RLIMIT_NLIMITS 16
9495
95#define RLIM_NLIMITS RLIMIT_NLIMITS96#define RLIM_NLIMITS RLIMIT_NLIMITS
9697
...@@ -104,6 +105,10 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);...@@ -104,6 +105,10 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
104#define rlim64_t rlim_t105#define rlim64_t rlim_t
105#endif106#endif
106107
108#if _REDIR_TIME64
109__REDIR(getrusage, __getrusage_time64);
110#endif
111
107#ifdef __cplusplus112#ifdef __cplusplus
108}113}
109#endif114#endif
lib/libc/include/generic-musl/sys/select.h+5
...@@ -35,6 +35,11 @@ int pselect (int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict, co...@@ -35,6 +35,11 @@ int pselect (int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict, co
35#define NFDBITS (8*(int)sizeof(long))35#define NFDBITS (8*(int)sizeof(long))
36#endif36#endif
3737
38#if _REDIR_TIME64
39__REDIR(select, __select_time64);
40__REDIR(pselect, __pselect_time64);
41#endif
42
38#ifdef __cplusplus43#ifdef __cplusplus
39}44}
40#endif45#endif
lib/libc/include/generic-musl/sys/sem.h+6-2
...@@ -25,8 +25,6 @@ extern "C" {...@@ -25,8 +25,6 @@ extern "C" {
25#define SETVAL 1625#define SETVAL 16
26#define SETALL 1726#define SETALL 17
2727
28#include <endian.h>
29
30#include <bits/sem.h>28#include <bits/sem.h>
3129
32#define _SEM_SEMUN_UNDEFINED 130#define _SEM_SEMUN_UNDEFINED 1
...@@ -62,6 +60,12 @@ int semop(int, struct sembuf *, size_t);...@@ -62,6 +60,12 @@ int semop(int, struct sembuf *, size_t);
62int semtimedop(int, struct sembuf *, size_t, const struct timespec *);60int semtimedop(int, struct sembuf *, size_t, const struct timespec *);
63#endif61#endif
6462
63#if _REDIR_TIME64
64#ifdef _GNU_SOURCE
65__REDIR(semtimedop, __semtimedop_time64);
66#endif
67#endif
68
65#ifdef __cplusplus69#ifdef __cplusplus
66}70}
67#endif71#endif
lib/libc/include/generic-musl/sys/socket.h+63-6
...@@ -19,6 +19,40 @@ extern "C" {...@@ -19,6 +19,40 @@ extern "C" {
1919
20#include <bits/socket.h>20#include <bits/socket.h>
2121
22struct msghdr {
23 void *msg_name;
24 socklen_t msg_namelen;
25 struct iovec *msg_iov;
26#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
27 int __pad1;
28#endif
29 int msg_iovlen;
30#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
31 int __pad1;
32#endif
33 void *msg_control;
34#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
35 int __pad2;
36#endif
37 socklen_t msg_controllen;
38#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
39 int __pad2;
40#endif
41 int msg_flags;
42};
43
44struct cmsghdr {
45#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
46 int __pad1;
47#endif
48 socklen_t cmsg_len;
49#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
50 int __pad1;
51#endif
52 int cmsg_level;
53 int cmsg_type;
54};
55
22#ifdef _GNU_SOURCE56#ifdef _GNU_SOURCE
23struct ucred {57struct ucred {
24 pid_t pid;58 pid_t pid;
...@@ -182,8 +216,6 @@ struct linger {...@@ -182,8 +216,6 @@ struct linger {
182#define SO_PEERCRED 17216#define SO_PEERCRED 17
183#define SO_RCVLOWAT 18217#define SO_RCVLOWAT 18
184#define SO_SNDLOWAT 19218#define SO_SNDLOWAT 19
185#define SO_RCVTIMEO 20
186#define SO_SNDTIMEO 21
187#define SO_ACCEPTCONN 30219#define SO_ACCEPTCONN 30
188#define SO_PEERSEC 31220#define SO_PEERSEC 31
189#define SO_SNDBUFFORCE 32221#define SO_SNDBUFFORCE 32
...@@ -192,6 +224,28 @@ struct linger {...@@ -192,6 +224,28 @@ struct linger {
192#define SO_DOMAIN 39224#define SO_DOMAIN 39
193#endif225#endif
194226
227#ifndef SO_RCVTIMEO
228#if __LONG_MAX == 0x7fffffff
229#define SO_RCVTIMEO 66
230#define SO_SNDTIMEO 67
231#else
232#define SO_RCVTIMEO 20
233#define SO_SNDTIMEO 21
234#endif
235#endif
236
237#ifndef SO_TIMESTAMP
238#if __LONG_MAX == 0x7fffffff
239#define SO_TIMESTAMP 63
240#define SO_TIMESTAMPNS 64
241#define SO_TIMESTAMPING 65
242#else
243#define SO_TIMESTAMP 29
244#define SO_TIMESTAMPNS 35
245#define SO_TIMESTAMPING 37
246#endif
247#endif
248
195#define SO_SECURITY_AUTHENTICATION 22249#define SO_SECURITY_AUTHENTICATION 22
196#define SO_SECURITY_ENCRYPTION_TRANSPORT 23250#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
197#define SO_SECURITY_ENCRYPTION_NETWORK 24251#define SO_SECURITY_ENCRYPTION_NETWORK 24
...@@ -203,14 +257,10 @@ struct linger {...@@ -203,14 +257,10 @@ struct linger {
203#define SO_GET_FILTER SO_ATTACH_FILTER257#define SO_GET_FILTER SO_ATTACH_FILTER
204258
205#define SO_PEERNAME 28259#define SO_PEERNAME 28
206#define SO_TIMESTAMP 29
207#define SCM_TIMESTAMP SO_TIMESTAMP260#define SCM_TIMESTAMP SO_TIMESTAMP
208
209#define SO_PASSSEC 34261#define SO_PASSSEC 34
210#define SO_TIMESTAMPNS 35
211#define SCM_TIMESTAMPNS SO_TIMESTAMPNS262#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
212#define SO_MARK 36263#define SO_MARK 36
213#define SO_TIMESTAMPING 37
214#define SCM_TIMESTAMPING SO_TIMESTAMPING264#define SCM_TIMESTAMPING SO_TIMESTAMPING
215#define SO_RXQ_OVFL 40265#define SO_RXQ_OVFL 40
216#define SO_WIFI_STATUS 41266#define SO_WIFI_STATUS 41
...@@ -238,6 +288,7 @@ struct linger {...@@ -238,6 +288,7 @@ struct linger {
238#define SO_TXTIME 61288#define SO_TXTIME 61
239#define SCM_TXTIME SO_TXTIME289#define SCM_TXTIME SO_TXTIME
240#define SO_BINDTOIFINDEX 62290#define SO_BINDTOIFINDEX 62
291#define SO_DETACH_REUSEPORT_BPF 68
241292
242#ifndef SOL_SOCKET293#ifndef SOL_SOCKET
243#define SOL_SOCKET 1294#define SOL_SOCKET 1
...@@ -350,6 +401,12 @@ int setsockopt (int, int, int, const void *, socklen_t);...@@ -350,6 +401,12 @@ int setsockopt (int, int, int, const void *, socklen_t);
350401
351int sockatmark (int);402int sockatmark (int);
352403
404#if _REDIR_TIME64
405#ifdef _GNU_SOURCE
406__REDIR(recvmmsg, __recvmmsg_time64);
407#endif
408#endif
409
353#ifdef __cplusplus410#ifdef __cplusplus
354}411}
355#endif412#endif
lib/libc/include/generic-musl/sys/stat.h+9
...@@ -110,6 +110,15 @@ int lchmod(const char *, mode_t);...@@ -110,6 +110,15 @@ int lchmod(const char *, mode_t);
110#define off64_t off_t110#define off64_t off_t
111#endif111#endif
112112
113#if _REDIR_TIME64
114__REDIR(stat, __stat_time64);
115__REDIR(fstat, __fstat_time64);
116__REDIR(lstat, __lstat_time64);
117__REDIR(fstatat, __fstatat_time64);
118__REDIR(futimens, __futimens_time64);
119__REDIR(utimensat, __utimensat_time64);
120#endif
121
113#ifdef __cplusplus122#ifdef __cplusplus
114}123}
115#endif124#endif
lib/libc/include/generic-musl/sys/statvfs.h-2
...@@ -11,8 +11,6 @@ extern "C" {...@@ -11,8 +11,6 @@ extern "C" {
11#define __NEED_fsfilcnt_t11#define __NEED_fsfilcnt_t
12#include <bits/alltypes.h>12#include <bits/alltypes.h>
1313
14#include <endian.h>
15
16struct statvfs {14struct statvfs {
17 unsigned long f_bsize, f_frsize;15 unsigned long f_bsize, f_frsize;
18 fsblkcnt_t f_blocks, f_bfree, f_bavail;16 fsblkcnt_t f_blocks, f_bfree, f_bavail;
lib/libc/include/generic-musl/sys/time.h+14
...@@ -56,6 +56,20 @@ int adjtime (const struct timeval *, struct timeval *);...@@ -56,6 +56,20 @@ int adjtime (const struct timeval *, struct timeval *);
56 (void)0 )56 (void)0 )
57#endif57#endif
5858
59#if _REDIR_TIME64
60__REDIR(gettimeofday, __gettimeofday_time64);
61__REDIR(getitimer, __getitimer_time64);
62__REDIR(setitimer, __setitimer_time64);
63__REDIR(utimes, __utimes_time64);
64#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
65__REDIR(futimes, __futimes_time64);
66__REDIR(futimesat, __futimesat_time64);
67__REDIR(lutimes, __lutimes_time64);
68__REDIR(settimeofday, __settimeofday_time64);
69__REDIR(adjtime, __adjtime64);
70#endif
71#endif
72
59#ifdef __cplusplus73#ifdef __cplusplus
60}74}
61#endif75#endif
lib/libc/include/generic-musl/sys/timeb.h+6
...@@ -4,6 +4,8 @@...@@ -4,6 +4,8 @@
4extern "C" {4extern "C" {
5#endif5#endif
66
7#include <features.h>
8
7#define __NEED_time_t9#define __NEED_time_t
810
9#include <bits/alltypes.h>11#include <bits/alltypes.h>
...@@ -16,6 +18,10 @@ struct timeb {...@@ -16,6 +18,10 @@ struct timeb {
1618
17int ftime(struct timeb *);19int ftime(struct timeb *);
1820
21#if _REDIR_TIME64
22__REDIR(ftime, __ftime64);
23#endif
24
19#ifdef __cplusplus25#ifdef __cplusplus
20}26}
21#endif27#endif
lib/libc/include/generic-musl/sys/timerfd.h+5
...@@ -20,6 +20,11 @@ int timerfd_create(int, int);...@@ -20,6 +20,11 @@ int timerfd_create(int, int);
20int timerfd_settime(int, int, const struct itimerspec *, struct itimerspec *);20int timerfd_settime(int, int, const struct itimerspec *, struct itimerspec *);
21int timerfd_gettime(int, struct itimerspec *);21int timerfd_gettime(int, struct itimerspec *);
2222
23#if _REDIR_TIME64
24__REDIR(timerfd_settime, __timerfd_settime64);
25__REDIR(timerfd_gettime, __timerfd_gettime64);
26#endif
27
23#ifdef __cplusplus28#ifdef __cplusplus
24}29}
25#endif30#endif
lib/libc/include/generic-musl/sys/timex.h+5
...@@ -91,6 +91,11 @@ struct timex {...@@ -91,6 +91,11 @@ struct timex {
91int adjtimex(struct timex *);91int adjtimex(struct timex *);
92int clock_adjtime(clockid_t, struct timex *);92int clock_adjtime(clockid_t, struct timex *);
9393
94#if _REDIR_TIME64
95__REDIR(adjtimex, __adjtimex_time64);
96__REDIR(clock_adjtime, __clock_adjtime64);
97#endif
98
94#ifdef __cplusplus99#ifdef __cplusplus
95}100}
96#endif101#endif
lib/libc/include/generic-musl/sys/ttydefaults.h+1-6
...@@ -6,16 +6,11 @@...@@ -6,16 +6,11 @@
6#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)6#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
7#define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL)7#define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL)
8#define TTYDEF_SPEED (B9600)8#define TTYDEF_SPEED (B9600)
9#define CTRL(x) (x&037)9#define CTRL(x) ((x)&037)
10#define CEOF CTRL('d')10#define CEOF CTRL('d')
1111
12#ifdef _POSIX_VDISABLE
13#define CEOL _POSIX_VDISABLE
14#define CSTATUS _POSIX_VDISABLE
15#else
16#define CEOL '\0'12#define CEOL '\0'
17#define CSTATUS '\0'13#define CSTATUS '\0'
18#endif
1914
20#define CERASE 017715#define CERASE 0177
21#define CINTR CTRL('c')16#define CINTR CTRL('c')
lib/libc/include/generic-musl/sys/wait.h+9-1
...@@ -13,7 +13,8 @@ extern "C" {...@@ -13,7 +13,8 @@ extern "C" {
13typedef enum {13typedef enum {
14 P_ALL = 0,14 P_ALL = 0,
15 P_PID = 1,15 P_PID = 1,
16 P_PGID = 216 P_PGID = 2,
17 P_PIDFD = 3
17} idtype_t;18} idtype_t;
1819
19pid_t wait (int *);20pid_t wait (int *);
...@@ -53,6 +54,13 @@ pid_t wait4 (pid_t, int *, int, struct rusage *);...@@ -53,6 +54,13 @@ pid_t wait4 (pid_t, int *, int, struct rusage *);
53#define WIFSIGNALED(s) (((s)&0xffff)-1U < 0xffu)54#define WIFSIGNALED(s) (((s)&0xffff)-1U < 0xffu)
54#define WIFCONTINUED(s) ((s) == 0xffff)55#define WIFCONTINUED(s) ((s) == 0xffff)
5556
57#if _REDIR_TIME64
58#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
59__REDIR(wait3, __wait3_time64);
60__REDIR(wait4, __wait4_time64);
61#endif
62#endif
63
56#ifdef __cplusplus64#ifdef __cplusplus
57}65}
58#endif66#endif
lib/libc/include/generic-musl/threads.h+6
...@@ -80,6 +80,12 @@ void tss_delete(tss_t);...@@ -80,6 +80,12 @@ void tss_delete(tss_t);
80int tss_set(tss_t, void *);80int tss_set(tss_t, void *);
81void *tss_get(tss_t);81void *tss_get(tss_t);
8282
83#if _REDIR_TIME64
84__REDIR(thrd_sleep, __thrd_sleep_time64);
85__REDIR(mtx_timedlock, __mtx_timedlock_time64);
86__REDIR(cnd_timedwait, __cnd_timedwait_time64);
87#endif
88
83#ifdef __cplusplus89#ifdef __cplusplus
84}90}
85#endif91#endif
lib/libc/include/generic-musl/time.h+28
...@@ -130,6 +130,34 @@ int stime(const time_t *);...@@ -130,6 +130,34 @@ int stime(const time_t *);
130time_t timegm(struct tm *);130time_t timegm(struct tm *);
131#endif131#endif
132132
133#if _REDIR_TIME64
134__REDIR(time, __time64);
135__REDIR(difftime, __difftime64);
136__REDIR(mktime, __mktime64);
137__REDIR(gmtime, __gmtime64);
138__REDIR(localtime, __localtime64);
139__REDIR(ctime, __ctime64);
140__REDIR(timespec_get, __timespec_get_time64);
141#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
142 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
143 || defined(_BSD_SOURCE)
144__REDIR(gmtime_r, __gmtime64_r);
145__REDIR(localtime_r, __localtime64_r);
146__REDIR(ctime_r, __ctime64_r);
147__REDIR(nanosleep, __nanosleep_time64);
148__REDIR(clock_getres, __clock_getres_time64);
149__REDIR(clock_gettime, __clock_gettime64);
150__REDIR(clock_settime, __clock_settime64);
151__REDIR(clock_nanosleep, __clock_nanosleep_time64);
152__REDIR(timer_settime, __timer_settime64);
153__REDIR(timer_gettime, __timer_gettime64);
154#endif
155#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
156__REDIR(stime, __stime64);
157__REDIR(timegm, __timegm_time64);
158#endif
159#endif
160
133#ifdef __cplusplus161#ifdef __cplusplus
134}162}
135#endif163#endif
lib/libc/include/generic-musl/utime.h+6
...@@ -5,6 +5,8 @@...@@ -5,6 +5,8 @@
5extern "C" {5extern "C" {
6#endif6#endif
77
8#include <features.h>
9
8#define __NEED_time_t10#define __NEED_time_t
911
10#include <bits/alltypes.h>12#include <bits/alltypes.h>
...@@ -16,6 +18,10 @@ struct utimbuf {...@@ -16,6 +18,10 @@ struct utimbuf {
1618
17int utime (const char *, const struct utimbuf *);19int utime (const char *, const struct utimbuf *);
1820
21#if _REDIR_TIME64
22__REDIR(utime, __utime64);
23#endif
24
19#ifdef __cplusplus25#ifdef __cplusplus
20}26}
21#endif27#endif
lib/libc/include/generic-musl/utmpx.h+6-1
...@@ -16,6 +16,7 @@ extern "C" {...@@ -16,6 +16,7 @@ extern "C" {
1616
17struct utmpx {17struct utmpx {
18 short ut_type;18 short ut_type;
19 short __ut_pad1;
19 pid_t ut_pid;20 pid_t ut_pid;
20 char ut_line[32];21 char ut_line[32];
21 char ut_id[4];22 char ut_id[4];
...@@ -25,7 +26,11 @@ struct utmpx {...@@ -25,7 +26,11 @@ struct utmpx {
25 short __e_termination;26 short __e_termination;
26 short __e_exit;27 short __e_exit;
27 } ut_exit;28 } ut_exit;
28 long ut_session;29#if __BYTE_ORDER == 1234
30 int ut_session, __ut_pad2;
31#else
32 int __ut_pad2, ut_session;
33#endif
29 struct timeval ut_tv;34 struct timeval ut_tv;
30 unsigned ut_addr_v6[4];35 unsigned ut_addr_v6[4];
31 char __unused[20];36 char __unused[20];
lib/libc/include/i386-linux-musl/bits/alltypes.h+64-70
...@@ -1,30 +1,10 @@...@@ -1,30 +1,10 @@
1#define _REDIR_TIME64 1
1#define _Addr int2#define _Addr int
2#define _Int64 long long3#define _Int64 long long
3#define _Reg int4#define _Reg int
45
5#if __GNUC__ >= 36#define __BYTE_ORDER 1234
6#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)7#define __LONG_MAX 0x7fffffffL
7typedef __builtin_va_list va_list;
8#define __DEFINED_va_list
9#endif
10
11#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
12typedef __builtin_va_list __isoc_va_list;
13#define __DEFINED___isoc_va_list
14#endif
15
16#else
17#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
18typedef struct __va_list * va_list;
19#define __DEFINED_va_list
20#endif
21
22#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
23typedef struct __va_list * __isoc_va_list;
24#define __DEFINED___isoc_va_list
25#endif
26
27#endif
288
29#ifndef __cplusplus9#ifndef __cplusplus
30#ifdef __WCHAR_TYPE__10#ifdef __WCHAR_TYPE__
...@@ -85,52 +65,9 @@ typedef struct { alignas(8) long long __ll; long double __ld; } max_align_t;...@@ -85,52 +65,9 @@ typedef struct { alignas(8) long long __ll; long double __ld; } max_align_t;
85#endif65#endif
8666
87#endif67#endif
8868#define __LITTLE_ENDIAN 1234
89#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)69#define __BIG_ENDIAN 4321
90typedef long time_t;70#define __USE_TIME_BITS64 1
91#define __DEFINED_time_t
92#endif
93
94#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
95typedef long suseconds_t;
96#define __DEFINED_suseconds_t
97#endif
98
99
100#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
101typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
102#define __DEFINED_pthread_attr_t
103#endif
104
105#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
106typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
107#define __DEFINED_pthread_mutex_t
108#endif
109
110#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
111typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
112#define __DEFINED_mtx_t
113#endif
114
115#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
116typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
117#define __DEFINED_pthread_cond_t
118#endif
119
120#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
121typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
122#define __DEFINED_cnd_t
123#endif
124
125#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
126typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
127#define __DEFINED_pthread_rwlock_t
128#endif
129
130#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
131typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
132#define __DEFINED_pthread_barrier_t
133#endif
13471
135#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)72#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
136typedef unsigned _Addr size_t;73typedef unsigned _Addr size_t;
...@@ -167,6 +104,16 @@ typedef _Reg register_t;...@@ -167,6 +104,16 @@ typedef _Reg register_t;
167#define __DEFINED_register_t104#define __DEFINED_register_t
168#endif105#endif
169106
107#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
108typedef _Int64 time_t;
109#define __DEFINED_time_t
110#endif
111
112#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
113typedef _Int64 suseconds_t;
114#define __DEFINED_suseconds_t
115#endif
116
170117
171#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)118#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
172typedef signed char int8_t;119typedef signed char int8_t;
...@@ -302,7 +249,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };...@@ -302,7 +249,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };
302#endif249#endif
303250
304#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)251#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
305struct timespec { time_t tv_sec; long tv_nsec; };252struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
306#define __DEFINED_struct_timespec253#define __DEFINED_struct_timespec
307#endif254#endif
308255
...@@ -398,6 +345,17 @@ typedef struct _IO_FILE FILE;...@@ -398,6 +345,17 @@ typedef struct _IO_FILE FILE;
398#endif345#endif
399346
400347
348#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
349typedef __builtin_va_list va_list;
350#define __DEFINED_va_list
351#endif
352
353#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
354typedef __builtin_va_list __isoc_va_list;
355#define __DEFINED___isoc_va_list
356#endif
357
358
401#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)359#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
402typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;360typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
403#define __DEFINED_mbstate_t361#define __DEFINED_mbstate_t
...@@ -433,6 +391,42 @@ typedef unsigned short sa_family_t;...@@ -433,6 +391,42 @@ typedef unsigned short sa_family_t;
433#endif391#endif
434392
435393
394#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
395typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
396#define __DEFINED_pthread_attr_t
397#endif
398
399#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
400typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
401#define __DEFINED_pthread_mutex_t
402#endif
403
404#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
405typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
406#define __DEFINED_mtx_t
407#endif
408
409#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
410typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
411#define __DEFINED_pthread_cond_t
412#endif
413
414#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
415typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
416#define __DEFINED_cnd_t
417#endif
418
419#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
420typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
421#define __DEFINED_pthread_rwlock_t
422#endif
423
424#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
425typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
426#define __DEFINED_pthread_barrier_t
427#endif
428
429
436#undef _Addr430#undef _Addr
437#undef _Int64431#undef _Int64
438#undef _Reg432#undef _Reg
\ No newline at end of file
lib/libc/include/i386-linux-musl/bits/ipcstat.h created+1
...@@ -0,0 +1 @@
1#define IPC_STAT 0x102
\ No newline at end of file
lib/libc/include/i386-linux-musl/bits/limits.h+1-8
...@@ -1,8 +1 @@...@@ -1,8 +1 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define PAGESIZE 4096
4#define LONG_BIT 32
5#endif
6
7#define LONG_MAX 0x7fffffffL
8#define LLONG_MAX 0x7fffffffffffffffLL
\ No newline at end of file
1#define PAGESIZE 4096
\ No newline at end of file
lib/libc/include/i386-linux-musl/bits/msg.h+9-6
...@@ -1,15 +1,18 @@...@@ -1,15 +1,18 @@
1struct msqid_ds {1struct msqid_ds {
2 struct ipc_perm msg_perm;2 struct ipc_perm msg_perm;
3 time_t msg_stime;3 unsigned long __msg_stime_lo;
4 int __unused1;4 unsigned long __msg_stime_hi;
5 time_t msg_rtime;5 unsigned long __msg_rtime_lo;
6 int __unused2;6 unsigned long __msg_rtime_hi;
7 time_t msg_ctime;7 unsigned long __msg_ctime_lo;
8 int __unused3;8 unsigned long __msg_ctime_hi;
9 unsigned long msg_cbytes;9 unsigned long msg_cbytes;
10 msgqnum_t msg_qnum;10 msgqnum_t msg_qnum;
11 msglen_t msg_qbytes;11 msglen_t msg_qbytes;
12 pid_t msg_lspid;12 pid_t msg_lspid;
13 pid_t msg_lrpid;13 pid_t msg_lrpid;
14 unsigned long __unused[2];14 unsigned long __unused[2];
15 time_t msg_stime;
16 time_t msg_rtime;
17 time_t msg_ctime;
15};18};
\ No newline at end of file
lib/libc/include/i386-linux-musl/bits/sem.h+6-4
...@@ -1,11 +1,13 @@...@@ -1,11 +1,13 @@
1struct semid_ds {1struct semid_ds {
2 struct ipc_perm sem_perm;2 struct ipc_perm sem_perm;
3 time_t sem_otime;3 unsigned long __sem_otime_lo;
4 long __unused1;4 unsigned long __sem_otime_hi;
5 time_t sem_ctime;5 unsigned long __sem_ctime_lo;
6 long __unused2;6 unsigned long __sem_ctime_hi;
7 unsigned short sem_nsems;7 unsigned short sem_nsems;
8 char __sem_nsems_pad[sizeof(long)-sizeof(short)];8 char __sem_nsems_pad[sizeof(long)-sizeof(short)];
9 long __unused3;9 long __unused3;
10 long __unused4;10 long __unused4;
11 time_t sem_otime;
12 time_t sem_ctime;
11};13};
\ No newline at end of file
lib/libc/include/i386-linux-musl/bits/shm.h+10-6
...@@ -3,17 +3,21 @@...@@ -3,17 +3,21 @@
3struct shmid_ds {3struct shmid_ds {
4 struct ipc_perm shm_perm;4 struct ipc_perm shm_perm;
5 size_t shm_segsz;5 size_t shm_segsz;
6 time_t shm_atime;6 unsigned long __shm_atime_lo;
7 int __unused1;7 unsigned long __shm_atime_hi;
8 time_t shm_dtime;8 unsigned long __shm_dtime_lo;
9 int __unused2;9 unsigned long __shm_dtime_hi;
10 time_t shm_ctime;10 unsigned long __shm_ctime_lo;
11 int __unused3;11 unsigned long __shm_ctime_hi;
12 pid_t shm_cpid;12 pid_t shm_cpid;
13 pid_t shm_lpid;13 pid_t shm_lpid;
14 unsigned long shm_nattch;14 unsigned long shm_nattch;
15 unsigned long __pad1;15 unsigned long __pad1;
16 unsigned long __pad2;16 unsigned long __pad2;
17 unsigned long __pad3;
18 time_t shm_atime;
19 time_t shm_dtime;
20 time_t shm_ctime;
17};21};
1822
19struct shminfo {23struct shminfo {
lib/libc/include/i386-linux-musl/bits/stat.h+5-1
...@@ -14,8 +14,12 @@ struct stat {...@@ -14,8 +14,12 @@ struct stat {
14 off_t st_size;14 off_t st_size;
15 blksize_t st_blksize;15 blksize_t st_blksize;
16 blkcnt_t st_blocks;16 blkcnt_t st_blocks;
17 struct {
18 long tv_sec;
19 long tv_nsec;
20 } __st_atim32, __st_mtim32, __st_ctim32;
21 ino_t st_ino;
17 struct timespec st_atim;22 struct timespec st_atim;
18 struct timespec st_mtim;23 struct timespec st_mtim;
19 struct timespec st_ctim;24 struct timespec st_ctim;
20 ino_t st_ino;
21};25};
\ No newline at end of file
lib/libc/include/i386-linux-musl/bits/syscall.h+25-21
...@@ -76,8 +76,8 @@...@@ -76,8 +76,8 @@
76#define __NR_setrlimit 7576#define __NR_setrlimit 75
77#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */77#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */
78#define __NR_getrusage 7778#define __NR_getrusage 77
79#define __NR_gettimeofday 7879#define __NR_gettimeofday_time32 78
80#define __NR_settimeofday 7980#define __NR_settimeofday_time32 79
81#define __NR_getgroups 8081#define __NR_getgroups 80
82#define __NR_setgroups 8182#define __NR_setgroups 81
83#define __NR_select 8283#define __NR_select 82
...@@ -257,14 +257,14 @@...@@ -257,14 +257,14 @@
257#define __NR_remap_file_pages 257257#define __NR_remap_file_pages 257
258#define __NR_set_tid_address 258258#define __NR_set_tid_address 258
259#define __NR_timer_create 259259#define __NR_timer_create 259
260#define __NR_timer_settime (__NR_timer_create+1)260#define __NR_timer_settime32 (__NR_timer_create+1)
261#define __NR_timer_gettime (__NR_timer_create+2)261#define __NR_timer_gettime32 (__NR_timer_create+2)
262#define __NR_timer_getoverrun (__NR_timer_create+3)262#define __NR_timer_getoverrun (__NR_timer_create+3)
263#define __NR_timer_delete (__NR_timer_create+4)263#define __NR_timer_delete (__NR_timer_create+4)
264#define __NR_clock_settime (__NR_timer_create+5)264#define __NR_clock_settime32 (__NR_timer_create+5)
265#define __NR_clock_gettime (__NR_timer_create+6)265#define __NR_clock_gettime32 (__NR_timer_create+6)
266#define __NR_clock_getres (__NR_timer_create+7)266#define __NR_clock_getres_time32 (__NR_timer_create+7)
267#define __NR_clock_nanosleep (__NR_timer_create+8)267#define __NR_clock_nanosleep_time32 (__NR_timer_create+8)
268#define __NR_statfs64 268268#define __NR_statfs64 268
269#define __NR_fstatfs64 269269#define __NR_fstatfs64 269
270#define __NR_tgkill 270270#define __NR_tgkill 270
...@@ -322,8 +322,8 @@...@@ -322,8 +322,8 @@
322#define __NR_timerfd_create 322322#define __NR_timerfd_create 322
323#define __NR_eventfd 323323#define __NR_eventfd 323
324#define __NR_fallocate 324324#define __NR_fallocate 324
325#define __NR_timerfd_settime 325325#define __NR_timerfd_settime32 325
326#define __NR_timerfd_gettime 326326#define __NR_timerfd_gettime32 326
327#define __NR_signalfd4 327327#define __NR_signalfd4 327
328#define __NR_eventfd2 328328#define __NR_eventfd2 328
329#define __NR_epoll_create1 329329#define __NR_epoll_create1 329
...@@ -424,6 +424,8 @@...@@ -424,6 +424,8 @@
424#define __NR_fsconfig 431424#define __NR_fsconfig 431
425#define __NR_fsmount 432425#define __NR_fsmount 432
426#define __NR_fspick 433426#define __NR_fspick 433
427#define __NR_pidfd_open 434
428#define __NR_clone3 435
427429
428#define SYS_restart_syscall 0430#define SYS_restart_syscall 0
429#define SYS_exit 1431#define SYS_exit 1
...@@ -503,8 +505,8 @@...@@ -503,8 +505,8 @@
503#define SYS_setrlimit 75505#define SYS_setrlimit 75
504#define SYS_getrlimit 76 /* Back compatible 2Gig limited rlimit */506#define SYS_getrlimit 76 /* Back compatible 2Gig limited rlimit */
505#define SYS_getrusage 77507#define SYS_getrusage 77
506#define SYS_gettimeofday 78508#define SYS_gettimeofday_time32 78
507#define SYS_settimeofday 79509#define SYS_settimeofday_time32 79
508#define SYS_getgroups 80510#define SYS_getgroups 80
509#define SYS_setgroups 81511#define SYS_setgroups 81
510#define SYS_select 82512#define SYS_select 82
...@@ -682,14 +684,14 @@...@@ -682,14 +684,14 @@
682#define SYS_remap_file_pages 257684#define SYS_remap_file_pages 257
683#define SYS_set_tid_address 258685#define SYS_set_tid_address 258
684#define SYS_timer_create 259686#define SYS_timer_create 259
685#define SYS_timer_settime (__NR_timer_create+1)687#define SYS_timer_settime32 (__NR_timer_create+1)
686#define SYS_timer_gettime (__NR_timer_create+2)688#define SYS_timer_gettime32 (__NR_timer_create+2)
687#define SYS_timer_getoverrun (__NR_timer_create+3)689#define SYS_timer_getoverrun (__NR_timer_create+3)
688#define SYS_timer_delete (__NR_timer_create+4)690#define SYS_timer_delete (__NR_timer_create+4)
689#define SYS_clock_settime (__NR_timer_create+5)691#define SYS_clock_settime32 (__NR_timer_create+5)
690#define SYS_clock_gettime (__NR_timer_create+6)692#define SYS_clock_gettime32 (__NR_timer_create+6)
691#define SYS_clock_getres (__NR_timer_create+7)693#define SYS_clock_getres_time32 (__NR_timer_create+7)
692#define SYS_clock_nanosleep (__NR_timer_create+8)694#define SYS_clock_nanosleep_time32 (__NR_timer_create+8)
693#define SYS_statfs64 268695#define SYS_statfs64 268
694#define SYS_fstatfs64 269696#define SYS_fstatfs64 269
695#define SYS_tgkill 270697#define SYS_tgkill 270
...@@ -747,8 +749,8 @@...@@ -747,8 +749,8 @@
747#define SYS_timerfd_create 322749#define SYS_timerfd_create 322
748#define SYS_eventfd 323750#define SYS_eventfd 323
749#define SYS_fallocate 324751#define SYS_fallocate 324
750#define SYS_timerfd_settime 325752#define SYS_timerfd_settime32 325
751#define SYS_timerfd_gettime 326753#define SYS_timerfd_gettime32 326
752#define SYS_signalfd4 327754#define SYS_signalfd4 327
753#define SYS_eventfd2 328755#define SYS_eventfd2 328
754#define SYS_epoll_create1 329756#define SYS_epoll_create1 329
...@@ -848,4 +850,6 @@...@@ -848,4 +850,6 @@
848#define SYS_fsopen 430850#define SYS_fsopen 430
849#define SYS_fsconfig 431851#define SYS_fsconfig 431
850#define SYS_fsmount 432852#define SYS_fsmount 432
851#define SYS_fspick 433
\ No newline at end of file
853#define SYS_fspick 433
854#define SYS_pidfd_open 434
855#define SYS_clone3 435
\ No newline at end of file
lib/libc/include/mips-linux-musl/bits/alltypes.h+67-55
...@@ -1,17 +1,15 @@...@@ -1,17 +1,15 @@
1#define _REDIR_TIME64 1
1#define _Addr int2#define _Addr int
2#define _Int64 long long3#define _Int64 long long
3#define _Reg int4#define _Reg int
45
5#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)6#if _MIPSEL || __MIPSEL || __MIPSEL__
6typedef __builtin_va_list va_list;7#define __BYTE_ORDER 1234
7#define __DEFINED_va_list8#else
8#endif9#define __BYTE_ORDER 4321
9
10#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
11typedef __builtin_va_list __isoc_va_list;
12#define __DEFINED___isoc_va_list
13#endif10#endif
1411
12#define __LONG_MAX 0x7fffffffL
1513
16#ifndef __cplusplus14#ifndef __cplusplus
17#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)15#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
...@@ -37,52 +35,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;...@@ -37,52 +35,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;
37#define __DEFINED_max_align_t35#define __DEFINED_max_align_t
38#endif36#endif
3937
4038#define __LITTLE_ENDIAN 1234
41#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)39#define __BIG_ENDIAN 4321
42typedef long time_t;40#define __USE_TIME_BITS64 1
43#define __DEFINED_time_t
44#endif
45
46#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
47typedef long suseconds_t;
48#define __DEFINED_suseconds_t
49#endif
50
51
52#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
53typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
54#define __DEFINED_pthread_attr_t
55#endif
56
57#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
58typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
59#define __DEFINED_pthread_mutex_t
60#endif
61
62#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
63typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
64#define __DEFINED_mtx_t
65#endif
66
67#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
68typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
69#define __DEFINED_pthread_cond_t
70#endif
71
72#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
73typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
74#define __DEFINED_cnd_t
75#endif
76
77#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
78typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
79#define __DEFINED_pthread_rwlock_t
80#endif
81
82#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
83typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
84#define __DEFINED_pthread_barrier_t
85#endif
8641
87#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)42#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
88typedef unsigned _Addr size_t;43typedef unsigned _Addr size_t;
...@@ -119,6 +74,16 @@ typedef _Reg register_t;...@@ -119,6 +74,16 @@ typedef _Reg register_t;
119#define __DEFINED_register_t74#define __DEFINED_register_t
120#endif75#endif
12176
77#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
78typedef _Int64 time_t;
79#define __DEFINED_time_t
80#endif
81
82#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
83typedef _Int64 suseconds_t;
84#define __DEFINED_suseconds_t
85#endif
86
12287
123#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)88#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
124typedef signed char int8_t;89typedef signed char int8_t;
...@@ -254,7 +219,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };...@@ -254,7 +219,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };
254#endif219#endif
255220
256#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)221#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
257struct timespec { time_t tv_sec; long tv_nsec; };222struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
258#define __DEFINED_struct_timespec223#define __DEFINED_struct_timespec
259#endif224#endif
260225
...@@ -350,6 +315,17 @@ typedef struct _IO_FILE FILE;...@@ -350,6 +315,17 @@ typedef struct _IO_FILE FILE;
350#endif315#endif
351316
352317
318#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
319typedef __builtin_va_list va_list;
320#define __DEFINED_va_list
321#endif
322
323#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
324typedef __builtin_va_list __isoc_va_list;
325#define __DEFINED___isoc_va_list
326#endif
327
328
353#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)329#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
354typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;330typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
355#define __DEFINED_mbstate_t331#define __DEFINED_mbstate_t
...@@ -385,6 +361,42 @@ typedef unsigned short sa_family_t;...@@ -385,6 +361,42 @@ typedef unsigned short sa_family_t;
385#endif361#endif
386362
387363
364#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
365typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
366#define __DEFINED_pthread_attr_t
367#endif
368
369#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
370typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
371#define __DEFINED_pthread_mutex_t
372#endif
373
374#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
375typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
376#define __DEFINED_mtx_t
377#endif
378
379#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
380typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
381#define __DEFINED_pthread_cond_t
382#endif
383
384#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
385typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
386#define __DEFINED_cnd_t
387#endif
388
389#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
390typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
391#define __DEFINED_pthread_rwlock_t
392#endif
393
394#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
395typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
396#define __DEFINED_pthread_barrier_t
397#endif
398
399
388#undef _Addr400#undef _Addr
389#undef _Int64401#undef _Int64
390#undef _Reg402#undef _Reg
\ No newline at end of file
lib/libc/include/mips-linux-musl/bits/endian.h deleted-5
...@@ -1,5 +0,0 @@
1#if _MIPSEL || __MIPSEL || __MIPSEL__
2#define __BYTE_ORDER __LITTLE_ENDIAN
3#else
4#define __BYTE_ORDER __BIG_ENDIAN
5#endif
\ No newline at end of file
lib/libc/include/mips-linux-musl/bits/hwcap.h+12-1
...@@ -1,3 +1,14 @@...@@ -1,3 +1,14 @@
1#define HWCAP_MIPS_R6 (1 << 0)1#define HWCAP_MIPS_R6 (1 << 0)
2#define HWCAP_MIPS_MSA (1 << 1)2#define HWCAP_MIPS_MSA (1 << 1)
3#define HWCAP_MIPS_CRC32 (1 << 2)
\ No newline at end of file
3#define HWCAP_MIPS_CRC32 (1 << 2)
4#define HWCAP_MIPS_MIPS16 (1 << 3)
5#define HWCAP_MIPS_MDMX (1 << 4)
6#define HWCAP_MIPS_MIPS3D (1 << 5)
7#define HWCAP_MIPS_SMARTMIPS (1 << 6)
8#define HWCAP_MIPS_DSP (1 << 7)
9#define HWCAP_MIPS_DSP2 (1 << 8)
10#define HWCAP_MIPS_DSP3 (1 << 9)
11#define HWCAP_MIPS_MIPS16E2 (1 << 10)
12#define HWCAP_LOONGSON_MMI (1 << 11)
13#define HWCAP_LOONGSON_EXT (1 << 12)
14#define HWCAP_LOONGSON_EXT2 (1 << 13)
\ No newline at end of file
lib/libc/include/mips-linux-musl/bits/ioctl.h+2-2
...@@ -110,5 +110,5 @@...@@ -110,5 +110,5 @@
110#define SIOCATMARK _IOR('s', 7, int)110#define SIOCATMARK _IOR('s', 7, int)
111#define SIOCSPGRP _IOW('s', 8, pid_t)111#define SIOCSPGRP _IOW('s', 8, pid_t)
112#define SIOCGPGRP _IOR('s', 9, pid_t)112#define SIOCGPGRP _IOR('s', 9, pid_t)
113#define SIOCGSTAMP 0x8906
114#define SIOCGSTAMPNS 0x8907
\ No newline at end of file
113#define SIOCGSTAMP _IOR(0x89, 6, char[16])
114#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])
\ No newline at end of file
lib/libc/include/mips-linux-musl/bits/ipcstat.h created+1
...@@ -0,0 +1 @@
1#define IPC_STAT 0x102
\ No newline at end of file
lib/libc/include/mips-linux-musl/bits/limits.h deleted-7
...@@ -1,7 +0,0 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define LONG_BIT 32
4#endif
5
6#define LONG_MAX 0x7fffffffL
7#define LLONG_MAX 0x7fffffffffffffffLL
\ No newline at end of file
lib/libc/include/mips-linux-musl/bits/msg.h+15-12
...@@ -1,19 +1,19 @@...@@ -1,19 +1,19 @@
1struct msqid_ds {1struct msqid_ds {
2 struct ipc_perm msg_perm;2 struct ipc_perm msg_perm;
3#if _MIPSEL || __MIPSEL || __MIPSEL__3#if _MIPSEL || __MIPSEL || __MIPSEL__
4 time_t msg_stime;4 unsigned long __msg_stime_lo;
5 int __unused1;5 unsigned long __msg_stime_hi;
6 time_t msg_rtime;6 unsigned long __msg_rtime_lo;
7 int __unused2;7 unsigned long __msg_rtime_hi;
8 time_t msg_ctime;8 unsigned long __msg_ctime_lo;
9 int __unused3;9 unsigned long __msg_ctime_hi;
10#else10#else
11 int __unused1;11 unsigned long __msg_stime_hi;
12 time_t msg_stime;12 unsigned long __msg_stime_lo;
13 int __unused2;13 unsigned long __msg_rtime_hi;
14 time_t msg_rtime;14 unsigned long __msg_rtime_lo;
15 int __unused3;15 unsigned long __msg_ctime_hi;
16 time_t msg_ctime;16 unsigned long __msg_ctime_lo;
17#endif17#endif
18 unsigned long msg_cbytes;18 unsigned long msg_cbytes;
19 msgqnum_t msg_qnum;19 msgqnum_t msg_qnum;
...@@ -21,4 +21,7 @@ struct msqid_ds {...@@ -21,4 +21,7 @@ struct msqid_ds {
21 pid_t msg_lspid;21 pid_t msg_lspid;
22 pid_t msg_lrpid;22 pid_t msg_lrpid;
23 unsigned long __unused[2];23 unsigned long __unused[2];
24 time_t msg_stime;
25 time_t msg_rtime;
26 time_t msg_ctime;
24};27};
\ No newline at end of file
lib/libc/include/mips-linux-musl/bits/sem.h created+16
...@@ -0,0 +1,16 @@
1struct semid_ds {
2 struct ipc_perm sem_perm;
3 unsigned long __sem_otime_lo;
4 unsigned long __sem_ctime_lo;
5#if __BYTE_ORDER == __LITTLE_ENDIAN
6 unsigned short sem_nsems;
7 char __sem_nsems_pad[sizeof(long)-sizeof(short)];
8#else
9 char __sem_nsems_pad[sizeof(long)-sizeof(short)];
10 unsigned short sem_nsems;
11#endif
12 unsigned long __sem_otime_hi;
13 unsigned long __sem_ctime_hi;
14 time_t sem_otime;
15 time_t sem_ctime;
16};
\ No newline at end of file
lib/libc/include/mips-linux-musl/bits/shm.h created+29
...@@ -0,0 +1,29 @@
1#define SHMLBA 4096
2
3struct shmid_ds {
4 struct ipc_perm shm_perm;
5 size_t shm_segsz;
6 unsigned long __shm_atime_lo;
7 unsigned long __shm_dtime_lo;
8 unsigned long __shm_ctime_lo;
9 pid_t shm_cpid;
10 pid_t shm_lpid;
11 unsigned long shm_nattch;
12 unsigned short __shm_atime_hi;
13 unsigned short __shm_dtime_hi;
14 unsigned short __shm_ctime_hi;
15 unsigned short __pad1;
16 time_t shm_atime;
17 time_t shm_dtime;
18 time_t shm_ctime;
19};
20
21struct shminfo {
22 unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
23};
24
25struct shm_info {
26 int __used_ids;
27 unsigned long shm_tot, shm_rss, shm_swp;
28 unsigned long __swap_attempts, __swap_successes;
29};
\ No newline at end of file
lib/libc/include/mips-linux-musl/bits/signal.h+6-2
...@@ -19,14 +19,18 @@ typedef struct {...@@ -19,14 +19,18 @@ typedef struct {
19} fpregset_t;19} fpregset_t;
20struct sigcontext {20struct sigcontext {
21 unsigned sc_regmask, sc_status;21 unsigned sc_regmask, sc_status;
22 unsigned long long sc_pc, sc_regs[32], sc_fpregs[32];22 unsigned long long sc_pc;
23 gregset_t sc_regs;
24 fpregset_t sc_fpregs;
23 unsigned sc_ownedfp, sc_fpc_csr, sc_fpc_eir, sc_used_math, sc_dsp;25 unsigned sc_ownedfp, sc_fpc_csr, sc_fpc_eir, sc_used_math, sc_dsp;
24 unsigned long long sc_mdhi, sc_mdlo;26 unsigned long long sc_mdhi, sc_mdlo;
25 unsigned long sc_hi1, sc_lo1, sc_hi2, sc_lo2, sc_hi3, sc_lo3;27 unsigned long sc_hi1, sc_lo1, sc_hi2, sc_lo2, sc_hi3, sc_lo3;
26};28};
27typedef struct {29typedef struct {
28 unsigned regmask, status;30 unsigned regmask, status;
29 unsigned long long pc, gregs[32], fpregs[32];31 unsigned long long pc;
32 gregset_t gregs;
33 fpregset_t fpregs;
30 unsigned ownedfp, fpc_csr, fpc_eir, used_math, dsp;34 unsigned ownedfp, fpc_csr, fpc_eir, used_math, dsp;
31 unsigned long long mdhi, mdlo;35 unsigned long long mdhi, mdlo;
32 unsigned long hi1, lo1, hi2, lo2, hi3, lo3;36 unsigned long hi1, lo1, hi2, lo2, hi3, lo3;
lib/libc/include/mips-linux-musl/bits/socket.h-18
...@@ -1,19 +1,3 @@...@@ -1,19 +1,3 @@
1struct msghdr {
2 void *msg_name;
3 socklen_t msg_namelen;
4 struct iovec *msg_iov;
5 int msg_iovlen;
6 void *msg_control;
7 socklen_t msg_controllen;
8 int msg_flags;
9};
10
11struct cmsghdr {
12 socklen_t cmsg_len;
13 int cmsg_level;
14 int cmsg_type;
15};
16
17#define SOCK_STREAM 21#define SOCK_STREAM 2
18#define SOCK_DGRAM 12#define SOCK_DGRAM 1
193
...@@ -32,8 +16,6 @@ struct cmsghdr {...@@ -32,8 +16,6 @@ struct cmsghdr {
32#define SO_RCVBUF 0x100216#define SO_RCVBUF 0x1002
33#define SO_SNDLOWAT 0x100317#define SO_SNDLOWAT 0x1003
34#define SO_RCVLOWAT 0x100418#define SO_RCVLOWAT 0x1004
35#define SO_RCVTIMEO 0x1006
36#define SO_SNDTIMEO 0x1005
37#define SO_ERROR 0x100719#define SO_ERROR 0x1007
38#define SO_TYPE 0x100820#define SO_TYPE 0x1008
39#define SO_ACCEPTCONN 0x100921#define SO_ACCEPTCONN 0x1009
lib/libc/include/mips-linux-musl/bits/stat.h+8-4
...@@ -12,11 +12,15 @@ struct stat {...@@ -12,11 +12,15 @@ struct stat {
12 dev_t st_rdev;12 dev_t st_rdev;
13 long __st_padding2[2];13 long __st_padding2[2];
14 off_t st_size;14 off_t st_size;
15 struct timespec st_atim;15 struct {
16 struct timespec st_mtim;16 long tv_sec;
17 struct timespec st_ctim;17 long tv_nsec;
18 } __st_atim32, __st_mtim32, __st_ctim32;
18 blksize_t st_blksize;19 blksize_t st_blksize;
19 long __st_padding3;20 long __st_padding3;
20 blkcnt_t st_blocks;21 blkcnt_t st_blocks;
21 long __st_padding4[14];22 struct timespec st_atim;
23 struct timespec st_mtim;
24 struct timespec st_ctim;
25 long __st_padding4[2];
22};26};
\ No newline at end of file
lib/libc/include/mips-linux-musl/bits/syscall.h+25-21
...@@ -76,8 +76,8 @@...@@ -76,8 +76,8 @@
76#define __NR_setrlimit 407576#define __NR_setrlimit 4075
77#define __NR_getrlimit 407677#define __NR_getrlimit 4076
78#define __NR_getrusage 407778#define __NR_getrusage 4077
79#define __NR_gettimeofday 407879#define __NR_gettimeofday_time32 4078
80#define __NR_settimeofday 407980#define __NR_settimeofday_time32 4079
81#define __NR_getgroups 408081#define __NR_getgroups 4080
82#define __NR_setgroups 408182#define __NR_setgroups 4081
83#define __NR_reserved82 408283#define __NR_reserved82 4082
...@@ -256,14 +256,14 @@...@@ -256,14 +256,14 @@
256#define __NR_statfs64 4255256#define __NR_statfs64 4255
257#define __NR_fstatfs64 4256257#define __NR_fstatfs64 4256
258#define __NR_timer_create 4257258#define __NR_timer_create 4257
259#define __NR_timer_settime 4258259#define __NR_timer_settime32 4258
260#define __NR_timer_gettime 4259260#define __NR_timer_gettime32 4259
261#define __NR_timer_getoverrun 4260261#define __NR_timer_getoverrun 4260
262#define __NR_timer_delete 4261262#define __NR_timer_delete 4261
263#define __NR_clock_settime 4262263#define __NR_clock_settime32 4262
264#define __NR_clock_gettime 4263264#define __NR_clock_gettime32 4263
265#define __NR_clock_getres 4264265#define __NR_clock_getres_time32 4264
266#define __NR_clock_nanosleep 4265266#define __NR_clock_nanosleep_time32 4265
267#define __NR_tgkill 4266267#define __NR_tgkill 4266
268#define __NR_utimes 4267268#define __NR_utimes 4267
269#define __NR_mbind 4268269#define __NR_mbind 4268
...@@ -319,8 +319,8 @@...@@ -319,8 +319,8 @@
319#define __NR_eventfd 4319319#define __NR_eventfd 4319
320#define __NR_fallocate 4320320#define __NR_fallocate 4320
321#define __NR_timerfd_create 4321321#define __NR_timerfd_create 4321
322#define __NR_timerfd_gettime 4322322#define __NR_timerfd_gettime32 4322
323#define __NR_timerfd_settime 4323323#define __NR_timerfd_settime32 4323
324#define __NR_signalfd4 4324324#define __NR_signalfd4 4324
325#define __NR_eventfd2 4325325#define __NR_eventfd2 4325
326#define __NR_epoll_create1 4326326#define __NR_epoll_create1 4326
...@@ -406,6 +406,8 @@...@@ -406,6 +406,8 @@
406#define __NR_fsconfig 4431406#define __NR_fsconfig 4431
407#define __NR_fsmount 4432407#define __NR_fsmount 4432
408#define __NR_fspick 4433408#define __NR_fspick 4433
409#define __NR_pidfd_open 4434
410#define __NR_clone3 4435
409411
410#define SYS_syscall 4000412#define SYS_syscall 4000
411#define SYS_exit 4001413#define SYS_exit 4001
...@@ -485,8 +487,8 @@...@@ -485,8 +487,8 @@
485#define SYS_setrlimit 4075487#define SYS_setrlimit 4075
486#define SYS_getrlimit 4076488#define SYS_getrlimit 4076
487#define SYS_getrusage 4077489#define SYS_getrusage 4077
488#define SYS_gettimeofday 4078490#define SYS_gettimeofday_time32 4078
489#define SYS_settimeofday 4079491#define SYS_settimeofday_time32 4079
490#define SYS_getgroups 4080492#define SYS_getgroups 4080
491#define SYS_setgroups 4081493#define SYS_setgroups 4081
492#define SYS_reserved82 4082494#define SYS_reserved82 4082
...@@ -665,14 +667,14 @@...@@ -665,14 +667,14 @@
665#define SYS_statfs64 4255667#define SYS_statfs64 4255
666#define SYS_fstatfs64 4256668#define SYS_fstatfs64 4256
667#define SYS_timer_create 4257669#define SYS_timer_create 4257
668#define SYS_timer_settime 4258670#define SYS_timer_settime32 4258
669#define SYS_timer_gettime 4259671#define SYS_timer_gettime32 4259
670#define SYS_timer_getoverrun 4260672#define SYS_timer_getoverrun 4260
671#define SYS_timer_delete 4261673#define SYS_timer_delete 4261
672#define SYS_clock_settime 4262674#define SYS_clock_settime32 4262
673#define SYS_clock_gettime 4263675#define SYS_clock_gettime32 4263
674#define SYS_clock_getres 4264676#define SYS_clock_getres_time32 4264
675#define SYS_clock_nanosleep 4265677#define SYS_clock_nanosleep_time32 4265
676#define SYS_tgkill 4266678#define SYS_tgkill 4266
677#define SYS_utimes 4267679#define SYS_utimes 4267
678#define SYS_mbind 4268680#define SYS_mbind 4268
...@@ -728,8 +730,8 @@...@@ -728,8 +730,8 @@
728#define SYS_eventfd 4319730#define SYS_eventfd 4319
729#define SYS_fallocate 4320731#define SYS_fallocate 4320
730#define SYS_timerfd_create 4321732#define SYS_timerfd_create 4321
731#define SYS_timerfd_gettime 4322733#define SYS_timerfd_gettime32 4322
732#define SYS_timerfd_settime 4323734#define SYS_timerfd_settime32 4323
733#define SYS_signalfd4 4324735#define SYS_signalfd4 4324
734#define SYS_eventfd2 4325736#define SYS_eventfd2 4325
735#define SYS_epoll_create1 4326737#define SYS_epoll_create1 4326
...@@ -814,4 +816,6 @@...@@ -814,4 +816,6 @@
814#define SYS_fsopen 4430816#define SYS_fsopen 4430
815#define SYS_fsconfig 4431817#define SYS_fsconfig 4431
816#define SYS_fsmount 4432818#define SYS_fsmount 4432
817#define SYS_fspick 4433
\ No newline at end of file
819#define SYS_fspick 4433
820#define SYS_pidfd_open 4434
821#define SYS_clone3 4435
\ No newline at end of file
lib/libc/include/mips64-linux-musl/bits/alltypes.h+66-55
...@@ -2,16 +2,13 @@...@@ -2,16 +2,13 @@
2#define _Int64 long2#define _Int64 long
3#define _Reg long3#define _Reg long
44
5#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)5#if _MIPSEL || __MIPSEL || __MIPSEL__
6typedef __builtin_va_list va_list;6#define __BYTE_ORDER 1234
7#define __DEFINED_va_list7#else
8#endif8#define __BYTE_ORDER 4321
9
10#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
11typedef __builtin_va_list __isoc_va_list;
12#define __DEFINED___isoc_va_list
13#endif9#endif
1410
11#define __LONG_MAX 0x7fffffffffffffffL
1512
16#ifndef __cplusplus13#ifndef __cplusplus
17#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)14#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
...@@ -38,57 +35,14 @@ typedef struct { long long __ll; long double __ld; } max_align_t;...@@ -38,57 +35,14 @@ typedef struct { long long __ll; long double __ld; } max_align_t;
38#endif35#endif
3936
4037
41#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
42typedef long time_t;
43#define __DEFINED_time_t
44#endif
45
46#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
47typedef long suseconds_t;
48#define __DEFINED_suseconds_t
49#endif
50
51
52#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)38#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t)
53typedef unsigned nlink_t;39typedef unsigned nlink_t;
54#define __DEFINED_nlink_t40#define __DEFINED_nlink_t
55#endif41#endif
5642
5743#define __LITTLE_ENDIAN 1234
58#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)44#define __BIG_ENDIAN 4321
59typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;45#define __USE_TIME_BITS64 1
60#define __DEFINED_pthread_attr_t
61#endif
62
63#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
64typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
65#define __DEFINED_pthread_mutex_t
66#endif
67
68#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
69typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
70#define __DEFINED_mtx_t
71#endif
72
73#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
74typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
75#define __DEFINED_pthread_cond_t
76#endif
77
78#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
79typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
80#define __DEFINED_cnd_t
81#endif
82
83#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
84typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
85#define __DEFINED_pthread_rwlock_t
86#endif
87
88#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
89typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
90#define __DEFINED_pthread_barrier_t
91#endif
9246
93#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)47#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
94typedef unsigned _Addr size_t;48typedef unsigned _Addr size_t;
...@@ -125,6 +79,16 @@ typedef _Reg register_t;...@@ -125,6 +79,16 @@ typedef _Reg register_t;
125#define __DEFINED_register_t79#define __DEFINED_register_t
126#endif80#endif
12781
82#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
83typedef _Int64 time_t;
84#define __DEFINED_time_t
85#endif
86
87#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
88typedef _Int64 suseconds_t;
89#define __DEFINED_suseconds_t
90#endif
91
12892
129#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)93#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
130typedef signed char int8_t;94typedef signed char int8_t;
...@@ -260,7 +224,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };...@@ -260,7 +224,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };
260#endif224#endif
261225
262#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)226#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
263struct timespec { time_t tv_sec; long tv_nsec; };227struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
264#define __DEFINED_struct_timespec228#define __DEFINED_struct_timespec
265#endif229#endif
266230
...@@ -356,6 +320,17 @@ typedef struct _IO_FILE FILE;...@@ -356,6 +320,17 @@ typedef struct _IO_FILE FILE;
356#endif320#endif
357321
358322
323#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
324typedef __builtin_va_list va_list;
325#define __DEFINED_va_list
326#endif
327
328#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
329typedef __builtin_va_list __isoc_va_list;
330#define __DEFINED___isoc_va_list
331#endif
332
333
359#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)334#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
360typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;335typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
361#define __DEFINED_mbstate_t336#define __DEFINED_mbstate_t
...@@ -391,6 +366,42 @@ typedef unsigned short sa_family_t;...@@ -391,6 +366,42 @@ typedef unsigned short sa_family_t;
391#endif366#endif
392367
393368
369#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
370typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
371#define __DEFINED_pthread_attr_t
372#endif
373
374#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
375typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
376#define __DEFINED_pthread_mutex_t
377#endif
378
379#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
380typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
381#define __DEFINED_mtx_t
382#endif
383
384#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
385typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
386#define __DEFINED_pthread_cond_t
387#endif
388
389#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
390typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
391#define __DEFINED_cnd_t
392#endif
393
394#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
395typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
396#define __DEFINED_pthread_rwlock_t
397#endif
398
399#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
400typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
401#define __DEFINED_pthread_barrier_t
402#endif
403
404
394#undef _Addr405#undef _Addr
395#undef _Int64406#undef _Int64
396#undef _Reg407#undef _Reg
\ No newline at end of file
lib/libc/include/mips64-linux-musl/bits/endian.h deleted-5
...@@ -1,5 +0,0 @@
1#if _MIPSEL || __MIPSEL || __MIPSEL__
2#define __BYTE_ORDER __LITTLE_ENDIAN
3#else
4#define __BYTE_ORDER __BIG_ENDIAN
5#endif
\ No newline at end of file
lib/libc/include/mips64-linux-musl/bits/limits.h deleted-7
...@@ -1,7 +0,0 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define LONG_BIT 64
4#endif
5
6#define LONG_MAX 0x7fffffffffffffffL
7#define LLONG_MAX 0x7fffffffffffffffLL
\ No newline at end of file
lib/libc/include/mips64-linux-musl/bits/socket.h-34
...@@ -1,37 +1,3 @@...@@ -1,37 +1,3 @@
1#include <endian.h>
2
3struct msghdr {
4 void *msg_name;
5 socklen_t msg_namelen;
6 struct iovec *msg_iov;
7#if __BYTE_ORDER == __BIG_ENDIAN
8 int __pad1, msg_iovlen;
9#else
10 int msg_iovlen, __pad1;
11#endif
12 void *msg_control;
13#if __BYTE_ORDER == __BIG_ENDIAN
14 int __pad2;
15 socklen_t msg_controllen;
16#else
17 socklen_t msg_controllen;
18 int __pad2;
19#endif
20 int msg_flags;
21};
22
23struct cmsghdr {
24#if __BYTE_ORDER == __BIG_ENDIAN
25 int __pad1;
26 socklen_t cmsg_len;
27#else
28 socklen_t cmsg_len;
29 int __pad1;
30#endif
31 int cmsg_level;
32 int cmsg_type;
33};
34
35#define SOCK_STREAM 21#define SOCK_STREAM 2
36#define SOCK_DGRAM 12#define SOCK_DGRAM 1
37#define SOL_SOCKET 655353#define SOL_SOCKET 65535
lib/libc/include/mips64-linux-musl/bits/syscall.h+5-1
...@@ -336,6 +336,8 @@...@@ -336,6 +336,8 @@
336#define __NR_fsconfig 5431336#define __NR_fsconfig 5431
337#define __NR_fsmount 5432337#define __NR_fsmount 5432
338#define __NR_fspick 5433338#define __NR_fspick 5433
339#define __NR_pidfd_open 5434
340#define __NR_clone3 5435
339341
340#define SYS_read 5000342#define SYS_read 5000
341#define SYS_write 5001343#define SYS_write 5001
...@@ -674,4 +676,6 @@...@@ -674,4 +676,6 @@
674#define SYS_fsopen 5430676#define SYS_fsopen 5430
675#define SYS_fsconfig 5431677#define SYS_fsconfig 5431
676#define SYS_fsmount 5432678#define SYS_fsmount 5432
677#define SYS_fspick 5433
\ No newline at end of file
679#define SYS_fspick 5433
680#define SYS_pidfd_open 5434
681#define SYS_clone3 5435
\ No newline at end of file
lib/libc/include/powerpc-linux-musl/bits/alltypes.h+64-57
...@@ -1,17 +1,10 @@...@@ -1,17 +1,10 @@
1#define _REDIR_TIME64 1
1#define _Addr int2#define _Addr int
2#define _Int64 long long3#define _Int64 long long
3#define _Reg int4#define _Reg int
45
5#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)6#define __BYTE_ORDER 4321
6typedef __builtin_va_list va_list;7#define __LONG_MAX 0x7fffffffL
7#define __DEFINED_va_list
8#endif
9
10#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
11typedef __builtin_va_list __isoc_va_list;
12#define __DEFINED___isoc_va_list
13#endif
14
158
16#ifndef __cplusplus9#ifndef __cplusplus
17#ifdef __WCHAR_TYPE__10#ifdef __WCHAR_TYPE__
...@@ -45,52 +38,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;...@@ -45,52 +38,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;
45#define __DEFINED_max_align_t38#define __DEFINED_max_align_t
46#endif39#endif
4740
4841#define __LITTLE_ENDIAN 1234
49#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)42#define __BIG_ENDIAN 4321
50typedef long time_t;43#define __USE_TIME_BITS64 1
51#define __DEFINED_time_t
52#endif
53
54#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
55typedef long suseconds_t;
56#define __DEFINED_suseconds_t
57#endif
58
59
60#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
61typedef struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
62#define __DEFINED_pthread_attr_t
63#endif
64
65#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
66typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
67#define __DEFINED_pthread_mutex_t
68#endif
69
70#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
71typedef struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
72#define __DEFINED_mtx_t
73#endif
74
75#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
76typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
77#define __DEFINED_pthread_cond_t
78#endif
79
80#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
81typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
82#define __DEFINED_cnd_t
83#endif
84
85#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
86typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
87#define __DEFINED_pthread_rwlock_t
88#endif
89
90#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
91typedef struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
92#define __DEFINED_pthread_barrier_t
93#endif
9444
95#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)45#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
96typedef unsigned _Addr size_t;46typedef unsigned _Addr size_t;
...@@ -127,6 +77,16 @@ typedef _Reg register_t;...@@ -127,6 +77,16 @@ typedef _Reg register_t;
127#define __DEFINED_register_t77#define __DEFINED_register_t
128#endif78#endif
12979
80#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
81typedef _Int64 time_t;
82#define __DEFINED_time_t
83#endif
84
85#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
86typedef _Int64 suseconds_t;
87#define __DEFINED_suseconds_t
88#endif
89
13090
131#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)91#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
132typedef signed char int8_t;92typedef signed char int8_t;
...@@ -262,7 +222,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };...@@ -262,7 +222,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };
262#endif222#endif
263223
264#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)224#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
265struct timespec { time_t tv_sec; long tv_nsec; };225struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
266#define __DEFINED_struct_timespec226#define __DEFINED_struct_timespec
267#endif227#endif
268228
...@@ -358,6 +318,17 @@ typedef struct _IO_FILE FILE;...@@ -358,6 +318,17 @@ typedef struct _IO_FILE FILE;
358#endif318#endif
359319
360320
321#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
322typedef __builtin_va_list va_list;
323#define __DEFINED_va_list
324#endif
325
326#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
327typedef __builtin_va_list __isoc_va_list;
328#define __DEFINED___isoc_va_list
329#endif
330
331
361#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)332#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
362typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;333typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
363#define __DEFINED_mbstate_t334#define __DEFINED_mbstate_t
...@@ -393,6 +364,42 @@ typedef unsigned short sa_family_t;...@@ -393,6 +364,42 @@ typedef unsigned short sa_family_t;
393#endif364#endif
394365
395366
367#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
368typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
369#define __DEFINED_pthread_attr_t
370#endif
371
372#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
373typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
374#define __DEFINED_pthread_mutex_t
375#endif
376
377#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
378typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
379#define __DEFINED_mtx_t
380#endif
381
382#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
383typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
384#define __DEFINED_pthread_cond_t
385#endif
386
387#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
388typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
389#define __DEFINED_cnd_t
390#endif
391
392#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
393typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
394#define __DEFINED_pthread_rwlock_t
395#endif
396
397#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
398typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
399#define __DEFINED_pthread_barrier_t
400#endif
401
402
396#undef _Addr403#undef _Addr
397#undef _Int64404#undef _Int64
398#undef _Reg405#undef _Reg
\ No newline at end of file
lib/libc/include/powerpc-linux-musl/bits/endian.h deleted-15
...@@ -1,15 +0,0 @@
1#ifdef __BIG_ENDIAN__
2 #if __BIG_ENDIAN__
3 #define __BYTE_ORDER __BIG_ENDIAN
4 #endif
5#endif /* __BIG_ENDIAN__ */
6
7#ifdef __LITTLE_ENDIAN__
8 #if __LITTLE_ENDIAN__
9 #define __BYTE_ORDER __LITTLE_ENDIAN
10 #endif
11#endif /* __LITTLE_ENDIAN__ */
12
13#ifndef __BYTE_ORDER
14 #define __BYTE_ORDER __BIG_ENDIAN
15#endif
\ No newline at end of file
lib/libc/include/powerpc-linux-musl/bits/ioctl.h+2-2
...@@ -116,5 +116,5 @@...@@ -116,5 +116,5 @@
116#define FIOGETOWN 0x8903116#define FIOGETOWN 0x8903
117#define SIOCGPGRP 0x8904117#define SIOCGPGRP 0x8904
118#define SIOCATMARK 0x8905118#define SIOCATMARK 0x8905
119#define SIOCGSTAMP 0x8906
120#define SIOCGSTAMPNS 0x8907
\ No newline at end of file
119#define SIOCGSTAMP _IOR(0x89, 6, char[16])
120#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])
\ No newline at end of file
lib/libc/include/powerpc-linux-musl/bits/ipcstat.h created+1
...@@ -0,0 +1 @@
1#define IPC_STAT 0x102
\ No newline at end of file
lib/libc/include/powerpc-linux-musl/bits/limits.h deleted-7
...@@ -1,7 +0,0 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define LONG_BIT 32
4#endif
5
6#define LONG_MAX 0x7fffffffL
7#define LLONG_MAX 0x7fffffffffffffffLL
\ No newline at end of file
lib/libc/include/powerpc-linux-musl/bits/msg.h+9-6
...@@ -1,15 +1,18 @@...@@ -1,15 +1,18 @@
1struct msqid_ds {1struct msqid_ds {
2 struct ipc_perm msg_perm;2 struct ipc_perm msg_perm;
3 int __unused1;3 unsigned long __msg_stime_hi;
4 time_t msg_stime;4 unsigned long __msg_stime_lo;
5 int __unused2;5 unsigned long __msg_rtime_hi;
6 time_t msg_rtime;6 unsigned long __msg_rtime_lo;
7 int __unused3;7 unsigned long __msg_ctime_hi;
8 time_t msg_ctime;8 unsigned long __msg_ctime_lo;
9 unsigned long msg_cbytes;9 unsigned long msg_cbytes;
10 msgqnum_t msg_qnum;10 msgqnum_t msg_qnum;
11 msglen_t msg_qbytes;11 msglen_t msg_qbytes;
12 pid_t msg_lspid;12 pid_t msg_lspid;
13 pid_t msg_lrpid;13 pid_t msg_lrpid;
14 unsigned long __unused[2];14 unsigned long __unused[2];
15 time_t msg_stime;
16 time_t msg_rtime;
17 time_t msg_ctime;
15};18};
\ No newline at end of file
lib/libc/include/powerpc-linux-musl/bits/sem.h+6-4
...@@ -1,10 +1,12 @@...@@ -1,10 +1,12 @@
1struct semid_ds {1struct semid_ds {
2 struct ipc_perm sem_perm;2 struct ipc_perm sem_perm;
3 int __unused1;3 unsigned long __sem_otime_hi;
4 time_t sem_otime;4 unsigned long __sem_otime_lo;
5 int __unused2;5 unsigned long __sem_ctime_hi;
6 time_t sem_ctime;6 unsigned long __sem_ctime_lo;
7 unsigned short __sem_nsems_pad, sem_nsems;7 unsigned short __sem_nsems_pad, sem_nsems;
8 long __unused3;8 long __unused3;
9 long __unused4;9 long __unused4;
10 time_t sem_otime;
11 time_t sem_ctime;
10};12};
\ No newline at end of file
lib/libc/include/powerpc-linux-musl/bits/shm.h+9-7
...@@ -2,19 +2,21 @@...@@ -2,19 +2,21 @@
22
3struct shmid_ds {3struct shmid_ds {
4 struct ipc_perm shm_perm;4 struct ipc_perm shm_perm;
5 int __unused1;5 unsigned long __shm_atime_hi;
6 time_t shm_atime;6 unsigned long __shm_atime_lo;
7 int __unused2;7 unsigned long __shm_dtime_hi;
8 time_t shm_dtime;8 unsigned long __shm_dtime_lo;
9 int __unused3;9 unsigned long __shm_ctime_hi;
10 time_t shm_ctime;10 unsigned long __shm_ctime_lo;
11 int __unused4;
12 size_t shm_segsz;11 size_t shm_segsz;
13 pid_t shm_cpid;12 pid_t shm_cpid;
14 pid_t shm_lpid;13 pid_t shm_lpid;
15 unsigned long shm_nattch;14 unsigned long shm_nattch;
16 unsigned long __pad1;15 unsigned long __pad1;
17 unsigned long __pad2;16 unsigned long __pad2;
17 time_t shm_atime;
18 time_t shm_dtime;
19 time_t shm_ctime;
18};20};
1921
20struct shminfo {22struct shminfo {
lib/libc/include/powerpc-linux-musl/bits/signal.h+1-1
...@@ -28,7 +28,7 @@ struct sigcontext {...@@ -28,7 +28,7 @@ struct sigcontext {
28 int signal;28 int signal;
29 unsigned long handler;29 unsigned long handler;
30 unsigned long oldmask;30 unsigned long oldmask;
31 void *regs;31 struct pt_regs *regs;
32};32};
3333
34typedef struct {34typedef struct {
lib/libc/include/powerpc-linux-musl/bits/socket.h-18
...@@ -1,19 +1,3 @@...@@ -1,19 +1,3 @@
1struct msghdr {
2 void *msg_name;
3 socklen_t msg_namelen;
4 struct iovec *msg_iov;
5 int msg_iovlen;
6 void *msg_control;
7 socklen_t msg_controllen;
8 int msg_flags;
9};
10
11struct cmsghdr {
12 socklen_t cmsg_len;
13 int cmsg_level;
14 int cmsg_type;
15};
16
17#define SO_DEBUG 11#define SO_DEBUG 1
18#define SO_REUSEADDR 22#define SO_REUSEADDR 2
19#define SO_TYPE 33#define SO_TYPE 3
...@@ -31,8 +15,6 @@ struct cmsghdr {...@@ -31,8 +15,6 @@ struct cmsghdr {
31#define SO_REUSEPORT 1515#define SO_REUSEPORT 15
32#define SO_RCVLOWAT 1616#define SO_RCVLOWAT 16
33#define SO_SNDLOWAT 1717#define SO_SNDLOWAT 17
34#define SO_RCVTIMEO 18
35#define SO_SNDTIMEO 19
36#define SO_PASSCRED 2018#define SO_PASSCRED 20
37#define SO_PEERCRED 2119#define SO_PEERCRED 21
38#define SO_ACCEPTCONN 3020#define SO_ACCEPTCONN 30
lib/libc/include/powerpc-linux-musl/bits/stat.h+5-1
...@@ -13,8 +13,12 @@ struct stat {...@@ -13,8 +13,12 @@ struct stat {
13 off_t st_size;13 off_t st_size;
14 blksize_t st_blksize;14 blksize_t st_blksize;
15 blkcnt_t st_blocks;15 blkcnt_t st_blocks;
16 struct {
17 long tv_sec;
18 long tv_nsec;
19 } __st_atim32, __st_mtim32, __st_ctim32;
20 unsigned __unused[2];
16 struct timespec st_atim;21 struct timespec st_atim;
17 struct timespec st_mtim;22 struct timespec st_mtim;
18 struct timespec st_ctim;23 struct timespec st_ctim;
19 unsigned __unused[2];
20};24};
\ No newline at end of file
lib/libc/include/powerpc-linux-musl/bits/syscall.h+25-21
...@@ -76,8 +76,8 @@...@@ -76,8 +76,8 @@
76#define __NR_setrlimit 7576#define __NR_setrlimit 75
77#define __NR_getrlimit 7677#define __NR_getrlimit 76
78#define __NR_getrusage 7778#define __NR_getrusage 77
79#define __NR_gettimeofday 7879#define __NR_gettimeofday_time32 78
80#define __NR_settimeofday 7980#define __NR_settimeofday_time32 79
81#define __NR_getgroups 8081#define __NR_getgroups 80
82#define __NR_setgroups 8182#define __NR_setgroups 81
83#define __NR_select 8283#define __NR_select 82
...@@ -238,14 +238,14 @@...@@ -238,14 +238,14 @@
238#define __NR_epoll_wait 238238#define __NR_epoll_wait 238
239#define __NR_remap_file_pages 239239#define __NR_remap_file_pages 239
240#define __NR_timer_create 240240#define __NR_timer_create 240
241#define __NR_timer_settime 241241#define __NR_timer_settime32 241
242#define __NR_timer_gettime 242242#define __NR_timer_gettime32 242
243#define __NR_timer_getoverrun 243243#define __NR_timer_getoverrun 243
244#define __NR_timer_delete 244244#define __NR_timer_delete 244
245#define __NR_clock_settime 245245#define __NR_clock_settime32 245
246#define __NR_clock_gettime 246246#define __NR_clock_gettime32 246
247#define __NR_clock_getres 247247#define __NR_clock_getres_time32 247
248#define __NR_clock_nanosleep 248248#define __NR_clock_nanosleep_time32 248
249#define __NR_swapcontext 249249#define __NR_swapcontext 249
250#define __NR_tgkill 250250#define __NR_tgkill 250
251#define __NR_utimes 251251#define __NR_utimes 251
...@@ -307,8 +307,8 @@...@@ -307,8 +307,8 @@
307#define __NR_sync_file_range2 308307#define __NR_sync_file_range2 308
308#define __NR_fallocate 309308#define __NR_fallocate 309
309#define __NR_subpage_prot 310309#define __NR_subpage_prot 310
310#define __NR_timerfd_settime 311310#define __NR_timerfd_settime32 311
311#define __NR_timerfd_gettime 312311#define __NR_timerfd_gettime32 312
312#define __NR_signalfd4 313312#define __NR_signalfd4 313
313#define __NR_eventfd2 314313#define __NR_eventfd2 314
314#define __NR_epoll_create1 315314#define __NR_epoll_create1 315
...@@ -413,6 +413,8 @@...@@ -413,6 +413,8 @@
413#define __NR_fsconfig 431413#define __NR_fsconfig 431
414#define __NR_fsmount 432414#define __NR_fsmount 432
415#define __NR_fspick 433415#define __NR_fspick 433
416#define __NR_pidfd_open 434
417#define __NR_clone3 435
416418
417#define SYS_restart_syscall 0419#define SYS_restart_syscall 0
418#define SYS_exit 1420#define SYS_exit 1
...@@ -492,8 +494,8 @@...@@ -492,8 +494,8 @@
492#define SYS_setrlimit 75494#define SYS_setrlimit 75
493#define SYS_getrlimit 76495#define SYS_getrlimit 76
494#define SYS_getrusage 77496#define SYS_getrusage 77
495#define SYS_gettimeofday 78497#define SYS_gettimeofday_time32 78
496#define SYS_settimeofday 79498#define SYS_settimeofday_time32 79
497#define SYS_getgroups 80499#define SYS_getgroups 80
498#define SYS_setgroups 81500#define SYS_setgroups 81
499#define SYS_select 82501#define SYS_select 82
...@@ -654,14 +656,14 @@...@@ -654,14 +656,14 @@
654#define SYS_epoll_wait 238656#define SYS_epoll_wait 238
655#define SYS_remap_file_pages 239657#define SYS_remap_file_pages 239
656#define SYS_timer_create 240658#define SYS_timer_create 240
657#define SYS_timer_settime 241659#define SYS_timer_settime32 241
658#define SYS_timer_gettime 242660#define SYS_timer_gettime32 242
659#define SYS_timer_getoverrun 243661#define SYS_timer_getoverrun 243
660#define SYS_timer_delete 244662#define SYS_timer_delete 244
661#define SYS_clock_settime 245663#define SYS_clock_settime32 245
662#define SYS_clock_gettime 246664#define SYS_clock_gettime32 246
663#define SYS_clock_getres 247665#define SYS_clock_getres_time32 247
664#define SYS_clock_nanosleep 248666#define SYS_clock_nanosleep_time32 248
665#define SYS_swapcontext 249667#define SYS_swapcontext 249
666#define SYS_tgkill 250668#define SYS_tgkill 250
667#define SYS_utimes 251669#define SYS_utimes 251
...@@ -723,8 +725,8 @@...@@ -723,8 +725,8 @@
723#define SYS_sync_file_range2 308725#define SYS_sync_file_range2 308
724#define SYS_fallocate 309726#define SYS_fallocate 309
725#define SYS_subpage_prot 310727#define SYS_subpage_prot 310
726#define SYS_timerfd_settime 311728#define SYS_timerfd_settime32 311
727#define SYS_timerfd_gettime 312729#define SYS_timerfd_gettime32 312
728#define SYS_signalfd4 313730#define SYS_signalfd4 313
729#define SYS_eventfd2 314731#define SYS_eventfd2 314
730#define SYS_epoll_create1 315732#define SYS_epoll_create1 315
...@@ -828,4 +830,6 @@...@@ -828,4 +830,6 @@
828#define SYS_fsopen 430830#define SYS_fsopen 430
829#define SYS_fsconfig 431831#define SYS_fsconfig 431
830#define SYS_fsmount 432832#define SYS_fsmount 432
831#define SYS_fspick 433
\ No newline at end of file
833#define SYS_fspick 433
834#define SYS_pidfd_open 434
835#define SYS_clone3 435
\ No newline at end of file
lib/libc/include/powerpc64-linux-musl/bits/alltypes.h+66-55
...@@ -2,16 +2,13 @@...@@ -2,16 +2,13 @@
2#define _Int64 long2#define _Int64 long
3#define _Reg long3#define _Reg long
44
5#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)5#if __BIG_ENDIAN__
6typedef __builtin_va_list va_list;6#define __BYTE_ORDER 4321
7#define __DEFINED_va_list7#else
8#endif8#define __BYTE_ORDER 1234
9
10#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
11typedef __builtin_va_list __isoc_va_list;
12#define __DEFINED___isoc_va_list
13#endif9#endif
1410
11#define __LONG_MAX 0x7fffffffffffffffL
1512
16#ifndef __cplusplus13#ifndef __cplusplus
17#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)14#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
...@@ -37,52 +34,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;...@@ -37,52 +34,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;
37#define __DEFINED_max_align_t34#define __DEFINED_max_align_t
38#endif35#endif
3936
4037#define __LITTLE_ENDIAN 1234
41#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)38#define __BIG_ENDIAN 4321
42typedef long time_t;39#define __USE_TIME_BITS64 1
43#define __DEFINED_time_t
44#endif
45
46#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
47typedef long suseconds_t;
48#define __DEFINED_suseconds_t
49#endif
50
51
52#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
53typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
54#define __DEFINED_pthread_attr_t
55#endif
56
57#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
58typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
59#define __DEFINED_pthread_mutex_t
60#endif
61
62#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
63typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
64#define __DEFINED_mtx_t
65#endif
66
67#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
68typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
69#define __DEFINED_pthread_cond_t
70#endif
71
72#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
73typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
74#define __DEFINED_cnd_t
75#endif
76
77#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
78typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
79#define __DEFINED_pthread_rwlock_t
80#endif
81
82#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
83typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
84#define __DEFINED_pthread_barrier_t
85#endif
8640
87#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)41#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
88typedef unsigned _Addr size_t;42typedef unsigned _Addr size_t;
...@@ -119,6 +73,16 @@ typedef _Reg register_t;...@@ -119,6 +73,16 @@ typedef _Reg register_t;
119#define __DEFINED_register_t73#define __DEFINED_register_t
120#endif74#endif
12175
76#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
77typedef _Int64 time_t;
78#define __DEFINED_time_t
79#endif
80
81#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
82typedef _Int64 suseconds_t;
83#define __DEFINED_suseconds_t
84#endif
85
12286
123#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)87#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
124typedef signed char int8_t;88typedef signed char int8_t;
...@@ -254,7 +218,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };...@@ -254,7 +218,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };
254#endif218#endif
255219
256#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)220#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
257struct timespec { time_t tv_sec; long tv_nsec; };221struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
258#define __DEFINED_struct_timespec222#define __DEFINED_struct_timespec
259#endif223#endif
260224
...@@ -350,6 +314,17 @@ typedef struct _IO_FILE FILE;...@@ -350,6 +314,17 @@ typedef struct _IO_FILE FILE;
350#endif314#endif
351315
352316
317#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
318typedef __builtin_va_list va_list;
319#define __DEFINED_va_list
320#endif
321
322#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
323typedef __builtin_va_list __isoc_va_list;
324#define __DEFINED___isoc_va_list
325#endif
326
327
353#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)328#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
354typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;329typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
355#define __DEFINED_mbstate_t330#define __DEFINED_mbstate_t
...@@ -385,6 +360,42 @@ typedef unsigned short sa_family_t;...@@ -385,6 +360,42 @@ typedef unsigned short sa_family_t;
385#endif360#endif
386361
387362
363#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
364typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
365#define __DEFINED_pthread_attr_t
366#endif
367
368#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
369typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
370#define __DEFINED_pthread_mutex_t
371#endif
372
373#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
374typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
375#define __DEFINED_mtx_t
376#endif
377
378#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
379typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
380#define __DEFINED_pthread_cond_t
381#endif
382
383#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
384typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
385#define __DEFINED_cnd_t
386#endif
387
388#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
389typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
390#define __DEFINED_pthread_rwlock_t
391#endif
392
393#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
394typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
395#define __DEFINED_pthread_barrier_t
396#endif
397
398
388#undef _Addr399#undef _Addr
389#undef _Int64400#undef _Int64
390#undef _Reg401#undef _Reg
\ No newline at end of file
lib/libc/include/powerpc64-linux-musl/bits/endian.h deleted-5
...@@ -1,5 +0,0 @@
1#if __BIG_ENDIAN__
2#define __BYTE_ORDER __BIG_ENDIAN
3#else
4#define __BYTE_ORDER __LITTLE_ENDIAN
5#endif
\ No newline at end of file
lib/libc/include/powerpc64-linux-musl/bits/signal.h+2-6
...@@ -9,11 +9,7 @@...@@ -9,11 +9,7 @@
9#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)9#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
1010
11typedef unsigned long greg_t, gregset_t[48];11typedef unsigned long greg_t, gregset_t[48];
1212typedef double fpregset_t[33];
13typedef struct {
14 double fpregs[32];
15 double fpscr;
16} fpregset_t;
1713
18typedef struct {14typedef struct {
19#ifdef __GNUC__15#ifdef __GNUC__
...@@ -36,7 +32,7 @@ typedef struct sigcontext {...@@ -36,7 +32,7 @@ typedef struct sigcontext {
36 int _pad0;32 int _pad0;
37 unsigned long handler;33 unsigned long handler;
38 unsigned long oldmask;34 unsigned long oldmask;
39 void *regs;35 struct pt_regs *regs;
40 gregset_t gp_regs;36 gregset_t gp_regs;
41 fpregset_t fp_regs;37 fpregset_t fp_regs;
42 vrregset_t *v_regs;38 vrregset_t *v_regs;
lib/libc/include/powerpc64-linux-musl/bits/socket.h-34
...@@ -1,37 +1,3 @@...@@ -1,37 +1,3 @@
1#include <endian.h>
2
3struct msghdr {
4 void *msg_name;
5 socklen_t msg_namelen;
6 struct iovec *msg_iov;
7#if __BYTE_ORDER == __BIG_ENDIAN
8 int __pad1, msg_iovlen;
9#else
10 int msg_iovlen, __pad1;
11#endif
12 void *msg_control;
13#if __BYTE_ORDER == __BIG_ENDIAN
14 int __pad2;
15 socklen_t msg_controllen;
16#else
17 socklen_t msg_controllen;
18 int __pad2;
19#endif
20 int msg_flags;
21};
22
23struct cmsghdr {
24#if __BYTE_ORDER == __BIG_ENDIAN
25 int __pad1;
26 socklen_t cmsg_len;
27#else
28 socklen_t cmsg_len;
29 int __pad1;
30#endif
31 int cmsg_level;
32 int cmsg_type;
33};
34
35#define SO_DEBUG 11#define SO_DEBUG 1
36#define SO_REUSEADDR 22#define SO_REUSEADDR 2
37#define SO_TYPE 33#define SO_TYPE 3
lib/libc/include/powerpc64-linux-musl/bits/syscall.h+5-1
...@@ -385,6 +385,8 @@...@@ -385,6 +385,8 @@
385#define __NR_fsconfig 431385#define __NR_fsconfig 431
386#define __NR_fsmount 432386#define __NR_fsmount 432
387#define __NR_fspick 433387#define __NR_fspick 433
388#define __NR_pidfd_open 434
389#define __NR_clone3 435
388390
389#define SYS_restart_syscall 0391#define SYS_restart_syscall 0
390#define SYS_exit 1392#define SYS_exit 1
...@@ -772,4 +774,6 @@...@@ -772,4 +774,6 @@
772#define SYS_fsopen 430774#define SYS_fsopen 430
773#define SYS_fsconfig 431775#define SYS_fsconfig 431
774#define SYS_fsmount 432776#define SYS_fsmount 432
775#define SYS_fspick 433
\ No newline at end of file
777#define SYS_fspick 433
778#define SYS_pidfd_open 434
779#define SYS_clone3 435
\ No newline at end of file
lib/libc/include/riscv64-linux-musl/bits/alltypes.h+63-57
...@@ -2,16 +2,8 @@...@@ -2,16 +2,8 @@
2#define _Int64 long2#define _Int64 long
3#define _Reg long3#define _Reg long
44
5#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)5#define __BYTE_ORDER 1234
6typedef __builtin_va_list va_list;6#define __LONG_MAX 0x7fffffffffffffffL
7#define __DEFINED_va_list
8#endif
9
10#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
11typedef __builtin_va_list __isoc_va_list;
12#define __DEFINED___isoc_va_list
13#endif
14
157
16#ifndef __cplusplus8#ifndef __cplusplus
17#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)9#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
...@@ -48,52 +40,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;...@@ -48,52 +40,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;
48#define __DEFINED_max_align_t40#define __DEFINED_max_align_t
49#endif41#endif
5042
5143#define __LITTLE_ENDIAN 1234
52#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)44#define __BIG_ENDIAN 4321
53typedef long time_t;45#define __USE_TIME_BITS64 1
54#define __DEFINED_time_t
55#endif
56
57#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
58typedef long suseconds_t;
59#define __DEFINED_suseconds_t
60#endif
61
62
63#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
64typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
65#define __DEFINED_pthread_attr_t
66#endif
67
68#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
69typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
70#define __DEFINED_pthread_mutex_t
71#endif
72
73#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
74typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
75#define __DEFINED_mtx_t
76#endif
77
78#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
79typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
80#define __DEFINED_pthread_cond_t
81#endif
82
83#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
84typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
85#define __DEFINED_cnd_t
86#endif
87
88#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
89typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
90#define __DEFINED_pthread_rwlock_t
91#endif
92
93#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
94typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
95#define __DEFINED_pthread_barrier_t
96#endif
9746
98#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)47#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
99typedef unsigned _Addr size_t;48typedef unsigned _Addr size_t;
...@@ -130,6 +79,16 @@ typedef _Reg register_t;...@@ -130,6 +79,16 @@ typedef _Reg register_t;
130#define __DEFINED_register_t79#define __DEFINED_register_t
131#endif80#endif
13281
82#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
83typedef _Int64 time_t;
84#define __DEFINED_time_t
85#endif
86
87#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
88typedef _Int64 suseconds_t;
89#define __DEFINED_suseconds_t
90#endif
91
13392
134#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)93#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
135typedef signed char int8_t;94typedef signed char int8_t;
...@@ -265,7 +224,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };...@@ -265,7 +224,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };
265#endif224#endif
266225
267#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)226#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
268struct timespec { time_t tv_sec; long tv_nsec; };227struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
269#define __DEFINED_struct_timespec228#define __DEFINED_struct_timespec
270#endif229#endif
271230
...@@ -361,6 +320,17 @@ typedef struct _IO_FILE FILE;...@@ -361,6 +320,17 @@ typedef struct _IO_FILE FILE;
361#endif320#endif
362321
363322
323#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
324typedef __builtin_va_list va_list;
325#define __DEFINED_va_list
326#endif
327
328#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
329typedef __builtin_va_list __isoc_va_list;
330#define __DEFINED___isoc_va_list
331#endif
332
333
364#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)334#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
365typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;335typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
366#define __DEFINED_mbstate_t336#define __DEFINED_mbstate_t
...@@ -396,6 +366,42 @@ typedef unsigned short sa_family_t;...@@ -396,6 +366,42 @@ typedef unsigned short sa_family_t;
396#endif366#endif
397367
398368
369#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
370typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
371#define __DEFINED_pthread_attr_t
372#endif
373
374#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
375typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
376#define __DEFINED_pthread_mutex_t
377#endif
378
379#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
380typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
381#define __DEFINED_mtx_t
382#endif
383
384#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
385typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
386#define __DEFINED_pthread_cond_t
387#endif
388
389#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
390typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
391#define __DEFINED_cnd_t
392#endif
393
394#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
395typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
396#define __DEFINED_pthread_rwlock_t
397#endif
398
399#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
400typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
401#define __DEFINED_pthread_barrier_t
402#endif
403
404
399#undef _Addr405#undef _Addr
400#undef _Int64406#undef _Int64
401#undef _Reg407#undef _Reg
\ No newline at end of file
lib/libc/include/riscv64-linux-musl/bits/reg.h deleted-8
...@@ -1,8 +0,0 @@
1#undef __WORDSIZE
2#define __WORDSIZE 64
3#define REG_PC 0
4#define REG_RA 1
5#define REG_SP 2
6#define REG_TP 4
7#define REG_S0 8
8#define REG_A0 10
\ No newline at end of file
lib/libc/include/riscv64-linux-musl/bits/signal.h+9
...@@ -35,6 +35,15 @@ typedef struct mcontext_t {...@@ -35,6 +35,15 @@ typedef struct mcontext_t {
35 union __riscv_mc_fp_state __fpregs;35 union __riscv_mc_fp_state __fpregs;
36} mcontext_t;36} mcontext_t;
3737
38#if defined(_GNU_SOURCE)
39#define REG_PC 0
40#define REG_RA 1
41#define REG_SP 2
42#define REG_TP 4
43#define REG_S0 8
44#define REG_A0 10
45#endif
46
38#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)47#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
39typedef unsigned long greg_t;48typedef unsigned long greg_t;
40typedef unsigned long gregset_t[32];49typedef unsigned long gregset_t[32];
lib/libc/include/riscv64-linux-musl/bits/socket.h deleted-19
...@@ -1,19 +0,0 @@
1#include <endian.h>
2
3struct msghdr {
4 void *msg_name;
5 socklen_t msg_namelen;
6 struct iovec *msg_iov;
7 int msg_iovlen, __pad1;
8 void *msg_control;
9 socklen_t msg_controllen;
10 int __pad2;
11 int msg_flags;
12};
13
14struct cmsghdr {
15 socklen_t cmsg_len;
16 int __pad1;
17 int cmsg_level;
18 int cmsg_type;
19};
\ No newline at end of file
lib/libc/include/riscv64-linux-musl/bits/syscall.h+4
...@@ -287,6 +287,8 @@...@@ -287,6 +287,8 @@
287#define __NR_fsconfig 431287#define __NR_fsconfig 431
288#define __NR_fsmount 432288#define __NR_fsmount 432
289#define __NR_fspick 433289#define __NR_fspick 433
290#define __NR_pidfd_open 434
291#define __NR_clone3 435
290292
291#define __NR_sysriscv __NR_arch_specific_syscall293#define __NR_sysriscv __NR_arch_specific_syscall
292#define __NR_riscv_flush_icache (__NR_sysriscv + 15)294#define __NR_riscv_flush_icache (__NR_sysriscv + 15)
...@@ -579,5 +581,7 @@...@@ -579,5 +581,7 @@
579#define SYS_fsconfig 431581#define SYS_fsconfig 431
580#define SYS_fsmount 432582#define SYS_fsmount 432
581#define SYS_fspick 433583#define SYS_fspick 433
584#define SYS_pidfd_open 434
585#define SYS_clone3 435
582#define SYS_sysriscv __NR_arch_specific_syscall586#define SYS_sysriscv __NR_arch_specific_syscall
583#define SYS_riscv_flush_icache (__NR_sysriscv + 15)587#define SYS_riscv_flush_icache (__NR_sysriscv + 15)
\ No newline at end of file
lib/libc/include/s390x-linux-musl/bits/alltypes.h+63-57
...@@ -2,16 +2,8 @@...@@ -2,16 +2,8 @@
2#define _Int64 long2#define _Int64 long
3#define _Reg long3#define _Reg long
44
5#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)5#define __BYTE_ORDER 4321
6typedef __builtin_va_list va_list;6#define __LONG_MAX 0x7fffffffffffffffL
7#define __DEFINED_va_list
8#endif
9
10#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
11typedef __builtin_va_list __isoc_va_list;
12#define __DEFINED___isoc_va_list
13#endif
14
157
16#ifndef __cplusplus8#ifndef __cplusplus
17#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)9#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
...@@ -37,52 +29,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;...@@ -37,52 +29,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;
37#define __DEFINED_max_align_t29#define __DEFINED_max_align_t
38#endif30#endif
3931
4032#define __LITTLE_ENDIAN 1234
41#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)33#define __BIG_ENDIAN 4321
42typedef long time_t;34#define __USE_TIME_BITS64 1
43#define __DEFINED_time_t
44#endif
45
46#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
47typedef long suseconds_t;
48#define __DEFINED_suseconds_t
49#endif
50
51
52#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
53typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
54#define __DEFINED_pthread_attr_t
55#endif
56
57#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
58typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
59#define __DEFINED_pthread_mutex_t
60#endif
61
62#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
63typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
64#define __DEFINED_mtx_t
65#endif
66
67#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
68typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
69#define __DEFINED_pthread_cond_t
70#endif
71
72#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
73typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
74#define __DEFINED_cnd_t
75#endif
76
77#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
78typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
79#define __DEFINED_pthread_rwlock_t
80#endif
81
82#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
83typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
84#define __DEFINED_pthread_barrier_t
85#endif
8635
87#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)36#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
88typedef unsigned _Addr size_t;37typedef unsigned _Addr size_t;
...@@ -119,6 +68,16 @@ typedef _Reg register_t;...@@ -119,6 +68,16 @@ typedef _Reg register_t;
119#define __DEFINED_register_t68#define __DEFINED_register_t
120#endif69#endif
12170
71#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
72typedef _Int64 time_t;
73#define __DEFINED_time_t
74#endif
75
76#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
77typedef _Int64 suseconds_t;
78#define __DEFINED_suseconds_t
79#endif
80
12281
123#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)82#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
124typedef signed char int8_t;83typedef signed char int8_t;
...@@ -254,7 +213,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };...@@ -254,7 +213,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };
254#endif213#endif
255214
256#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)215#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
257struct timespec { time_t tv_sec; long tv_nsec; };216struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
258#define __DEFINED_struct_timespec217#define __DEFINED_struct_timespec
259#endif218#endif
260219
...@@ -350,6 +309,17 @@ typedef struct _IO_FILE FILE;...@@ -350,6 +309,17 @@ typedef struct _IO_FILE FILE;
350#endif309#endif
351310
352311
312#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
313typedef __builtin_va_list va_list;
314#define __DEFINED_va_list
315#endif
316
317#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
318typedef __builtin_va_list __isoc_va_list;
319#define __DEFINED___isoc_va_list
320#endif
321
322
353#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)323#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
354typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;324typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
355#define __DEFINED_mbstate_t325#define __DEFINED_mbstate_t
...@@ -385,6 +355,42 @@ typedef unsigned short sa_family_t;...@@ -385,6 +355,42 @@ typedef unsigned short sa_family_t;
385#endif355#endif
386356
387357
358#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
359typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
360#define __DEFINED_pthread_attr_t
361#endif
362
363#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
364typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
365#define __DEFINED_pthread_mutex_t
366#endif
367
368#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
369typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
370#define __DEFINED_mtx_t
371#endif
372
373#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
374typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
375#define __DEFINED_pthread_cond_t
376#endif
377
378#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
379typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
380#define __DEFINED_cnd_t
381#endif
382
383#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
384typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
385#define __DEFINED_pthread_rwlock_t
386#endif
387
388#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
389typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
390#define __DEFINED_pthread_barrier_t
391#endif
392
393
388#undef _Addr394#undef _Addr
389#undef _Int64395#undef _Int64
390#undef _Reg396#undef _Reg
\ No newline at end of file
lib/libc/include/s390x-linux-musl/bits/endian.h deleted-1
...@@ -1 +0,0 @@
1#define __BYTE_ORDER __BIG_ENDIAN
\ No newline at end of file
lib/libc/include/s390x-linux-musl/bits/limits.h+1-8
...@@ -1,8 +1 @@...@@ -1,8 +1 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define PAGESIZE 4096
4#define LONG_BIT 64
5#endif
6
7#define LONG_MAX 0x7fffffffffffffffL
8#define LLONG_MAX 0x7fffffffffffffffLL
\ No newline at end of file
1#define PAGESIZE 4096
\ No newline at end of file
lib/libc/include/s390x-linux-musl/bits/socket.h deleted-17
...@@ -1,17 +0,0 @@
1struct msghdr {
2 void *msg_name;
3 socklen_t msg_namelen;
4 struct iovec *msg_iov;
5 int __pad1, msg_iovlen;
6 void *msg_control;
7 int __pad2;
8 socklen_t msg_controllen;
9 int msg_flags;
10};
11
12struct cmsghdr {
13 int __pad1;
14 socklen_t cmsg_len;
15 int cmsg_level;
16 int cmsg_type;
17};
\ No newline at end of file
lib/libc/include/s390x-linux-musl/bits/syscall.h+5-1
...@@ -350,6 +350,8 @@...@@ -350,6 +350,8 @@
350#define __NR_fsconfig 431350#define __NR_fsconfig 431
351#define __NR_fsmount 432351#define __NR_fsmount 432
352#define __NR_fspick 433352#define __NR_fspick 433
353#define __NR_pidfd_open 434
354#define __NR_clone3 435
353355
354#define SYS_exit 1356#define SYS_exit 1
355#define SYS_fork 2357#define SYS_fork 2
...@@ -702,4 +704,6 @@...@@ -702,4 +704,6 @@
702#define SYS_fsopen 430704#define SYS_fsopen 430
703#define SYS_fsconfig 431705#define SYS_fsconfig 431
704#define SYS_fsmount 432706#define SYS_fsmount 432
705#define SYS_fspick 433
\ No newline at end of file
707#define SYS_fspick 433
708#define SYS_pidfd_open 434
709#define SYS_clone3 435
\ No newline at end of file
lib/libc/include/x86_64-linux-musl/bits/alltypes.h+63-57
...@@ -2,16 +2,8 @@...@@ -2,16 +2,8 @@
2#define _Int64 long2#define _Int64 long
3#define _Reg long3#define _Reg long
44
5#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)5#define __BYTE_ORDER 1234
6typedef __builtin_va_list va_list;6#define __LONG_MAX 0x7fffffffffffffffL
7#define __DEFINED_va_list
8#endif
9
10#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
11typedef __builtin_va_list __isoc_va_list;
12#define __DEFINED___isoc_va_list
13#endif
14
157
16#ifndef __cplusplus8#ifndef __cplusplus
17#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)9#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
...@@ -50,52 +42,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;...@@ -50,52 +42,9 @@ typedef struct { long long __ll; long double __ld; } max_align_t;
50#define __DEFINED_max_align_t42#define __DEFINED_max_align_t
51#endif43#endif
5244
5345#define __LITTLE_ENDIAN 1234
54#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)46#define __BIG_ENDIAN 4321
55typedef long time_t;47#define __USE_TIME_BITS64 1
56#define __DEFINED_time_t
57#endif
58
59#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
60typedef long suseconds_t;
61#define __DEFINED_suseconds_t
62#endif
63
64
65#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
66typedef struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
67#define __DEFINED_pthread_attr_t
68#endif
69
70#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
71typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
72#define __DEFINED_pthread_mutex_t
73#endif
74
75#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
76typedef struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
77#define __DEFINED_mtx_t
78#endif
79
80#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
81typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
82#define __DEFINED_pthread_cond_t
83#endif
84
85#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
86typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
87#define __DEFINED_cnd_t
88#endif
89
90#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
91typedef struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
92#define __DEFINED_pthread_rwlock_t
93#endif
94
95#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
96typedef struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
97#define __DEFINED_pthread_barrier_t
98#endif
9948
100#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)49#if defined(__NEED_size_t) && !defined(__DEFINED_size_t)
101typedef unsigned _Addr size_t;50typedef unsigned _Addr size_t;
...@@ -132,6 +81,16 @@ typedef _Reg register_t;...@@ -132,6 +81,16 @@ typedef _Reg register_t;
132#define __DEFINED_register_t81#define __DEFINED_register_t
133#endif82#endif
13483
84#if defined(__NEED_time_t) && !defined(__DEFINED_time_t)
85typedef _Int64 time_t;
86#define __DEFINED_time_t
87#endif
88
89#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t)
90typedef _Int64 suseconds_t;
91#define __DEFINED_suseconds_t
92#endif
93
13594
136#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)95#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t)
137typedef signed char int8_t;96typedef signed char int8_t;
...@@ -267,7 +226,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };...@@ -267,7 +226,7 @@ struct timeval { time_t tv_sec; suseconds_t tv_usec; };
267#endif226#endif
268227
269#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)228#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec)
270struct timespec { time_t tv_sec; long tv_nsec; };229struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
271#define __DEFINED_struct_timespec230#define __DEFINED_struct_timespec
272#endif231#endif
273232
...@@ -363,6 +322,17 @@ typedef struct _IO_FILE FILE;...@@ -363,6 +322,17 @@ typedef struct _IO_FILE FILE;
363#endif322#endif
364323
365324
325#if defined(__NEED_va_list) && !defined(__DEFINED_va_list)
326typedef __builtin_va_list va_list;
327#define __DEFINED_va_list
328#endif
329
330#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list)
331typedef __builtin_va_list __isoc_va_list;
332#define __DEFINED___isoc_va_list
333#endif
334
335
366#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)336#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t)
367typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;337typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
368#define __DEFINED_mbstate_t338#define __DEFINED_mbstate_t
...@@ -398,6 +368,42 @@ typedef unsigned short sa_family_t;...@@ -398,6 +368,42 @@ typedef unsigned short sa_family_t;
398#endif368#endif
399369
400370
371#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t)
372typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
373#define __DEFINED_pthread_attr_t
374#endif
375
376#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
377typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
378#define __DEFINED_pthread_mutex_t
379#endif
380
381#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t)
382typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
383#define __DEFINED_mtx_t
384#endif
385
386#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t)
387typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
388#define __DEFINED_pthread_cond_t
389#endif
390
391#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t)
392typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
393#define __DEFINED_cnd_t
394#endif
395
396#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t)
397typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
398#define __DEFINED_pthread_rwlock_t
399#endif
400
401#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t)
402typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
403#define __DEFINED_pthread_barrier_t
404#endif
405
406
401#undef _Addr407#undef _Addr
402#undef _Int64408#undef _Int64
403#undef _Reg409#undef _Reg
\ No newline at end of file
lib/libc/include/x86_64-linux-musl/bits/limits.h+1-8
...@@ -1,8 +1 @@...@@ -1,8 +1 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define PAGESIZE 4096
4#define LONG_BIT 64
5#endif
6
7#define LONG_MAX 0x7fffffffffffffffL
8#define LLONG_MAX 0x7fffffffffffffffLL
\ No newline at end of file
1#define PAGESIZE 4096
\ No newline at end of file
lib/libc/include/x86_64-linux-musl/bits/socket.h deleted-16
...@@ -1,16 +0,0 @@
1struct msghdr {
2 void *msg_name;
3 socklen_t msg_namelen;
4 struct iovec *msg_iov;
5 int msg_iovlen, __pad1;
6 void *msg_control;
7 socklen_t msg_controllen, __pad2;
8 int msg_flags;
9};
10
11struct cmsghdr {
12 socklen_t cmsg_len;
13 int __pad1;
14 int cmsg_level;
15 int cmsg_type;
16};
\ No newline at end of file
lib/libc/include/x86_64-linux-musl/bits/syscall.h+5-1
...@@ -343,6 +343,8 @@...@@ -343,6 +343,8 @@
343#define __NR_fsconfig 431343#define __NR_fsconfig 431
344#define __NR_fsmount 432344#define __NR_fsmount 432
345#define __NR_fspick 433345#define __NR_fspick 433
346#define __NR_pidfd_open 434
347#define __NR_clone3 435
346348
347#define SYS_read 0349#define SYS_read 0
348#define SYS_write 1350#define SYS_write 1
...@@ -688,4 +690,6 @@...@@ -688,4 +690,6 @@
688#define SYS_fsopen 430690#define SYS_fsopen 430
689#define SYS_fsconfig 431691#define SYS_fsconfig 431
690#define SYS_fsmount 432692#define SYS_fsmount 432
691#define SYS_fspick 433
\ No newline at end of file
693#define SYS_fspick 433
694#define SYS_pidfd_open 434
695#define SYS_clone3 435
\ No newline at end of file
lib/libc/musl/COPYRIGHT+2-2
...@@ -1,7 +1,7 @@...@@ -1,7 +1,7 @@
1musl as a whole is licensed under the following standard MIT license:1musl as a whole is licensed under the following standard MIT license:
22
3----------------------------------------------------------------------3----------------------------------------------------------------------
4Copyright © 2005-2019 Rich Felker, et al.4Copyright © 2005-2020 Rich Felker, et al.
55
6Permission is hereby granted, free of charge, to any person obtaining6Permission is hereby granted, free of charge, to any person obtaining
7a copy of this software and associated documentation files (the7a copy of this software and associated documentation files (the
...@@ -26,6 +26,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE....@@ -26,6 +26,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26Authors/contributors include:26Authors/contributors include:
2727
28A. Wilcox28A. Wilcox
29Ada Worcester
29Alex Dowad30Alex Dowad
30Alex Suykov31Alex Suykov
31Alexander Monakov32Alexander Monakov
...@@ -65,7 +66,6 @@ Jeremy Huntwork...@@ -65,7 +66,6 @@ Jeremy Huntwork
65Jo-Philipp Wich66Jo-Philipp Wich
66Joakim Sindholt67Joakim Sindholt
67John Spencer68John Spencer
68Josiah Worcester
69Julien Ramseier69Julien Ramseier
70Justin Cormack70Justin Cormack
71Kaarle Ritvanen71Kaarle Ritvanen
lib/libc/musl/arch/aarch64/bits/alltypes.h.in+7-13
...@@ -2,8 +2,13 @@...@@ -2,8 +2,13 @@
2#define _Int64 long2#define _Int64 long
3#define _Reg long3#define _Reg long
44
5TYPEDEF __builtin_va_list va_list;5#if __AARCH64EB__
6TYPEDEF __builtin_va_list __isoc_va_list;6#define __BYTE_ORDER 4321
7#else
8#define __BYTE_ORDER 1234
9#endif
10
11#define __LONG_MAX 0x7fffffffffffffffL
712
8#ifndef __cplusplus13#ifndef __cplusplus
9TYPEDEF unsigned wchar_t;14TYPEDEF unsigned wchar_t;
...@@ -17,14 +22,3 @@ TYPEDEF float float_t;...@@ -17,14 +22,3 @@ TYPEDEF float float_t;
17TYPEDEF double double_t;22TYPEDEF double double_t;
1823
19TYPEDEF struct { long long __ll; long double __ld; } max_align_t;24TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
20
21TYPEDEF long time_t;
22TYPEDEF long suseconds_t;
23
24TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
25TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
26TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
27TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
28TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
29TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
30TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
lib/libc/musl/arch/aarch64/bits/endian.h deleted-5
...@@ -1,5 +0,0 @@
1#if __AARCH64EB__
2#define __BYTE_ORDER __BIG_ENDIAN
3#else
4#define __BYTE_ORDER __LITTLE_ENDIAN
5#endif
lib/libc/musl/arch/aarch64/bits/limits.h deleted-7
...@@ -1,7 +0,0 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define LONG_BIT 64
4#endif
5
6#define LONG_MAX 0x7fffffffffffffffL
7#define LLONG_MAX 0x7fffffffffffffffLL
lib/libc/musl/arch/aarch64/bits/socket.h deleted-33
...@@ -1,33 +0,0 @@
1#include <endian.h>
2
3struct msghdr {
4 void *msg_name;
5 socklen_t msg_namelen;
6 struct iovec *msg_iov;
7#if __BYTE_ORDER == __BIG_ENDIAN
8 int __pad1, msg_iovlen;
9#else
10 int msg_iovlen, __pad1;
11#endif
12 void *msg_control;
13#if __BYTE_ORDER == __BIG_ENDIAN
14 int __pad2;
15 socklen_t msg_controllen;
16#else
17 socklen_t msg_controllen;
18 int __pad2;
19#endif
20 int msg_flags;
21};
22
23struct cmsghdr {
24#if __BYTE_ORDER == __BIG_ENDIAN
25 int __pad1;
26 socklen_t cmsg_len;
27#else
28 socklen_t cmsg_len;
29 int __pad1;
30#endif
31 int cmsg_level;
32 int cmsg_type;
33};
lib/libc/musl/arch/aarch64/bits/syscall.h.in+2
...@@ -287,4 +287,6 @@...@@ -287,4 +287,6 @@
287#define __NR_fsconfig 431287#define __NR_fsconfig 431
288#define __NR_fsmount 432288#define __NR_fsmount 432
289#define __NR_fspick 433289#define __NR_fspick 433
290#define __NR_pidfd_open 434
291#define __NR_clone3 435
290292
lib/libc/musl/arch/aarch64/reloc.h-2
...@@ -1,5 +1,3 @@...@@ -1,5 +1,3 @@
1#include <endian.h>
2
3#if __BYTE_ORDER == __BIG_ENDIAN1#if __BYTE_ORDER == __BIG_ENDIAN
4#define ENDIAN_SUFFIX "_be"2#define ENDIAN_SUFFIX "_be"
5#else3#else
lib/libc/musl/arch/arm/bits/alltypes.h.in+8-13
...@@ -1,9 +1,15 @@...@@ -1,9 +1,15 @@
1#define _REDIR_TIME64 1
1#define _Addr int2#define _Addr int
2#define _Int64 long long3#define _Int64 long long
3#define _Reg int4#define _Reg int
45
5TYPEDEF __builtin_va_list va_list;6#if __ARMEB__
6TYPEDEF __builtin_va_list __isoc_va_list;7#define __BYTE_ORDER 4321
8#else
9#define __BYTE_ORDER 1234
10#endif
11
12#define __LONG_MAX 0x7fffffffL
713
8#ifndef __cplusplus14#ifndef __cplusplus
9TYPEDEF unsigned wchar_t;15TYPEDEF unsigned wchar_t;
...@@ -13,14 +19,3 @@ TYPEDEF float float_t;...@@ -13,14 +19,3 @@ TYPEDEF float float_t;
13TYPEDEF double double_t;19TYPEDEF double double_t;
1420
15TYPEDEF struct { long long __ll; long double __ld; } max_align_t;21TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
16
17TYPEDEF long time_t;
18TYPEDEF long suseconds_t;
19
20TYPEDEF struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
21TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
22TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
23TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
24TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
25TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
26TYPEDEF struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
lib/libc/musl/arch/arm/bits/endian.h deleted-5
...@@ -1,5 +0,0 @@
1#if __ARMEB__
2#define __BYTE_ORDER __BIG_ENDIAN
3#else
4#define __BYTE_ORDER __LITTLE_ENDIAN
5#endif
lib/libc/musl/arch/arm/bits/ipcstat.h+1-1
...@@ -1 +1 @@...@@ -1 +1 @@
1#define IPC_STAT 21#define IPC_STAT 0x102
lib/libc/musl/arch/arm/bits/limits.h deleted-7
...@@ -1,7 +0,0 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define LONG_BIT 32
4#endif
5
6#define LONG_MAX 0x7fffffffL
7#define LLONG_MAX 0x7fffffffffffffffLL
lib/libc/musl/arch/arm/bits/msg.h+9-6
...@@ -1,15 +1,18 @@...@@ -1,15 +1,18 @@
1struct msqid_ds {1struct msqid_ds {
2 struct ipc_perm msg_perm;2 struct ipc_perm msg_perm;
3 time_t msg_stime;3 unsigned long __msg_stime_lo;
4 int __unused1;4 unsigned long __msg_stime_hi;
5 time_t msg_rtime;5 unsigned long __msg_rtime_lo;
6 int __unused2;6 unsigned long __msg_rtime_hi;
7 time_t msg_ctime;7 unsigned long __msg_ctime_lo;
8 int __unused3;8 unsigned long __msg_ctime_hi;
9 unsigned long msg_cbytes;9 unsigned long msg_cbytes;
10 msgqnum_t msg_qnum;10 msgqnum_t msg_qnum;
11 msglen_t msg_qbytes;11 msglen_t msg_qbytes;
12 pid_t msg_lspid;12 pid_t msg_lspid;
13 pid_t msg_lrpid;13 pid_t msg_lrpid;
14 unsigned long __unused[2];14 unsigned long __unused[2];
15 time_t msg_stime;
16 time_t msg_rtime;
17 time_t msg_ctime;
15};18};
lib/libc/musl/arch/arm/bits/sem.h+6-4
...@@ -1,9 +1,9 @@...@@ -1,9 +1,9 @@
1struct semid_ds {1struct semid_ds {
2 struct ipc_perm sem_perm;2 struct ipc_perm sem_perm;
3 time_t sem_otime;3 unsigned long __sem_otime_lo;
4 long __unused1;4 unsigned long __sem_otime_hi;
5 time_t sem_ctime;5 unsigned long __sem_ctime_lo;
6 long __unused2;6 unsigned long __sem_ctime_hi;
7#if __BYTE_ORDER == __LITTLE_ENDIAN7#if __BYTE_ORDER == __LITTLE_ENDIAN
8 unsigned short sem_nsems;8 unsigned short sem_nsems;
9 char __sem_nsems_pad[sizeof(long)-sizeof(short)];9 char __sem_nsems_pad[sizeof(long)-sizeof(short)];
...@@ -13,4 +13,6 @@ struct semid_ds {...@@ -13,4 +13,6 @@ struct semid_ds {
13#endif13#endif
14 long __unused3;14 long __unused3;
15 long __unused4;15 long __unused4;
16 time_t sem_otime;
17 time_t sem_ctime;
16};18};
lib/libc/musl/arch/arm/bits/shm.h+10-6
...@@ -3,17 +3,21 @@...@@ -3,17 +3,21 @@
3struct shmid_ds {3struct shmid_ds {
4 struct ipc_perm shm_perm;4 struct ipc_perm shm_perm;
5 size_t shm_segsz;5 size_t shm_segsz;
6 time_t shm_atime;6 unsigned long __shm_atime_lo;
7 int __unused1;7 unsigned long __shm_atime_hi;
8 time_t shm_dtime;8 unsigned long __shm_dtime_lo;
9 int __unused2;9 unsigned long __shm_dtime_hi;
10 time_t shm_ctime;10 unsigned long __shm_ctime_lo;
11 int __unused3;11 unsigned long __shm_ctime_hi;
12 pid_t shm_cpid;12 pid_t shm_cpid;
13 pid_t shm_lpid;13 pid_t shm_lpid;
14 unsigned long shm_nattch;14 unsigned long shm_nattch;
15 unsigned long __pad1;15 unsigned long __pad1;
16 unsigned long __pad2;16 unsigned long __pad2;
17 unsigned long __pad3;
18 time_t shm_atime;
19 time_t shm_dtime;
20 time_t shm_ctime;
17};21};
1822
19struct shminfo {23struct shminfo {
lib/libc/musl/arch/arm/bits/stat.h+5-1
...@@ -14,8 +14,12 @@ struct stat {...@@ -14,8 +14,12 @@ struct stat {
14 off_t st_size;14 off_t st_size;
15 blksize_t st_blksize;15 blksize_t st_blksize;
16 blkcnt_t st_blocks;16 blkcnt_t st_blocks;
17 struct {
18 long tv_sec;
19 long tv_nsec;
20 } __st_atim32, __st_mtim32, __st_ctim32;
21 ino_t st_ino;
17 struct timespec st_atim;22 struct timespec st_atim;
18 struct timespec st_mtim;23 struct timespec st_mtim;
19 struct timespec st_ctim;24 struct timespec st_ctim;
20 ino_t st_ino;
21};25};
lib/libc/musl/arch/arm/bits/syscall.h.in+12-10
...@@ -55,8 +55,8 @@...@@ -55,8 +55,8 @@
55#define __NR_sethostname 7455#define __NR_sethostname 74
56#define __NR_setrlimit 7556#define __NR_setrlimit 75
57#define __NR_getrusage 7757#define __NR_getrusage 77
58#define __NR_gettimeofday 7858#define __NR_gettimeofday_time32 78
59#define __NR_settimeofday 7959#define __NR_settimeofday_time32 79
60#define __NR_getgroups 8060#define __NR_getgroups 80
61#define __NR_setgroups 8161#define __NR_setgroups 81
62#define __NR_symlink 8362#define __NR_symlink 83
...@@ -211,14 +211,14 @@...@@ -211,14 +211,14 @@
211#define __NR_remap_file_pages 253211#define __NR_remap_file_pages 253
212#define __NR_set_tid_address 256212#define __NR_set_tid_address 256
213#define __NR_timer_create 257213#define __NR_timer_create 257
214#define __NR_timer_settime 258214#define __NR_timer_settime32 258
215#define __NR_timer_gettime 259215#define __NR_timer_gettime32 259
216#define __NR_timer_getoverrun 260216#define __NR_timer_getoverrun 260
217#define __NR_timer_delete 261217#define __NR_timer_delete 261
218#define __NR_clock_settime 262218#define __NR_clock_settime32 262
219#define __NR_clock_gettime 263219#define __NR_clock_gettime32 263
220#define __NR_clock_getres 264220#define __NR_clock_getres_time32 264
221#define __NR_clock_nanosleep 265221#define __NR_clock_nanosleep_time32 265
222#define __NR_statfs64 266222#define __NR_statfs64 266
223#define __NR_fstatfs64 267223#define __NR_fstatfs64 267
224#define __NR_tgkill 268224#define __NR_tgkill 268
...@@ -308,8 +308,8 @@...@@ -308,8 +308,8 @@
308#define __NR_timerfd_create 350308#define __NR_timerfd_create 350
309#define __NR_eventfd 351309#define __NR_eventfd 351
310#define __NR_fallocate 352310#define __NR_fallocate 352
311#define __NR_timerfd_settime 353311#define __NR_timerfd_settime32 353
312#define __NR_timerfd_gettime 354312#define __NR_timerfd_gettime32 354
313#define __NR_signalfd4 355313#define __NR_signalfd4 355
314#define __NR_eventfd2 356314#define __NR_eventfd2 356
315#define __NR_epoll_create1 357315#define __NR_epoll_create1 357
...@@ -387,6 +387,8 @@...@@ -387,6 +387,8 @@
387#define __NR_fsconfig 431387#define __NR_fsconfig 431
388#define __NR_fsmount 432388#define __NR_fsmount 432
389#define __NR_fspick 433389#define __NR_fspick 433
390#define __NR_pidfd_open 434
391#define __NR_clone3 435
390392
391#define __ARM_NR_breakpoint 0x0f0001393#define __ARM_NR_breakpoint 0x0f0001
392#define __ARM_NR_cacheflush 0x0f0002394#define __ARM_NR_cacheflush 0x0f0002
lib/libc/musl/arch/arm/reloc.h-2
...@@ -1,5 +1,3 @@...@@ -1,5 +1,3 @@
1#include <endian.h>
2
3#if __BYTE_ORDER == __BIG_ENDIAN1#if __BYTE_ORDER == __BIG_ENDIAN
4#define ENDIAN_SUFFIX "eb"2#define ENDIAN_SUFFIX "eb"
5#else3#else
lib/libc/musl/arch/arm/syscall_arch.h+3-1
...@@ -99,7 +99,9 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo...@@ -99,7 +99,9 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
99}99}
100100
101#define VDSO_USEFUL101#define VDSO_USEFUL
102#define VDSO_CGT_SYM "__vdso_clock_gettime"102#define VDSO_CGT32_SYM "__vdso_clock_gettime"
103#define VDSO_CGT32_VER "LINUX_2.6"
104#define VDSO_CGT_SYM "__vdso_clock_gettime64"
103#define VDSO_CGT_VER "LINUX_2.6"105#define VDSO_CGT_VER "LINUX_2.6"
104106
105#define SYSCALL_FADVISE_6_ARG107#define SYSCALL_FADVISE_6_ARG
lib/libc/musl/arch/generic/bits/dirent.h created+11
...@@ -0,0 +1,11 @@
1#define _DIRENT_HAVE_D_RECLEN
2#define _DIRENT_HAVE_D_OFF
3#define _DIRENT_HAVE_D_TYPE
4
5struct dirent {
6 ino_t d_ino;
7 off_t d_off;
8 unsigned short d_reclen;
9 unsigned char d_type;
10 char d_name[256];
11};
lib/libc/musl/arch/generic/bits/ioctl.h+5
...@@ -104,7 +104,12 @@...@@ -104,7 +104,12 @@
104#define FIOGETOWN 0x8903104#define FIOGETOWN 0x8903
105#define SIOCGPGRP 0x8904105#define SIOCGPGRP 0x8904
106#define SIOCATMARK 0x8905106#define SIOCATMARK 0x8905
107#if __LONG_MAX == 0x7fffffff
108#define SIOCGSTAMP _IOR(0x89, 6, char[16])
109#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])
110#else
107#define SIOCGSTAMP 0x8906111#define SIOCGSTAMP 0x8906
108#define SIOCGSTAMPNS 0x8907112#define SIOCGSTAMPNS 0x8907
113#endif
109114
110#include <bits/ioctl_fix.h>115#include <bits/ioctl_fix.h>
lib/libc/musl/arch/generic/bits/limits.h created
lib/libc/musl/arch/generic/bits/socket.h-15
...@@ -1,15 +0,0 @@...@@ -1,15 +0,0 @@
1struct msghdr {
2 void *msg_name;
3 socklen_t msg_namelen;
4 struct iovec *msg_iov;
5 int msg_iovlen;
6 void *msg_control;
7 socklen_t msg_controllen;
8 int msg_flags;
9};
10
11struct cmsghdr {
12 socklen_t cmsg_len;
13 int cmsg_level;
14 int cmsg_type;
15};
lib/libc/musl/arch/i386/bits/alltypes.h.in+3-18
...@@ -1,14 +1,10 @@...@@ -1,14 +1,10 @@
1#define _REDIR_TIME64 1
1#define _Addr int2#define _Addr int
2#define _Int64 long long3#define _Int64 long long
3#define _Reg int4#define _Reg int
45
5#if __GNUC__ >= 36#define __BYTE_ORDER 1234
6TYPEDEF __builtin_va_list va_list;7#define __LONG_MAX 0x7fffffffL
7TYPEDEF __builtin_va_list __isoc_va_list;
8#else
9TYPEDEF struct __va_list * va_list;
10TYPEDEF struct __va_list * __isoc_va_list;
11#endif
128
13#ifndef __cplusplus9#ifndef __cplusplus
14#ifdef __WCHAR_TYPE__10#ifdef __WCHAR_TYPE__
...@@ -33,14 +29,3 @@ TYPEDEF struct { __attribute__((__aligned__(8))) long long __ll; long double __l...@@ -33,14 +29,3 @@ TYPEDEF struct { __attribute__((__aligned__(8))) long long __ll; long double __l
33#else29#else
34TYPEDEF struct { alignas(8) long long __ll; long double __ld; } max_align_t;30TYPEDEF struct { alignas(8) long long __ll; long double __ld; } max_align_t;
35#endif31#endif
36
37TYPEDEF long time_t;
38TYPEDEF long suseconds_t;
39
40TYPEDEF struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
41TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
42TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
43TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
44TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
45TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
46TYPEDEF struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
lib/libc/musl/arch/i386/bits/endian.h deleted-1
...@@ -1 +0,0 @@
1#define __BYTE_ORDER __LITTLE_ENDIAN
lib/libc/musl/arch/i386/bits/ipcstat.h+1-1
...@@ -1 +1 @@...@@ -1 +1 @@
1#define IPC_STAT 21#define IPC_STAT 0x102
lib/libc/musl/arch/i386/bits/limits.h-7
...@@ -1,8 +1 @@...@@ -1,8 +1 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define PAGESIZE 40961#define PAGESIZE 4096
4#define LONG_BIT 32
5#endif
6
7#define LONG_MAX 0x7fffffffL
8#define LLONG_MAX 0x7fffffffffffffffLL
lib/libc/musl/arch/i386/bits/msg.h+9-6
...@@ -1,15 +1,18 @@...@@ -1,15 +1,18 @@
1struct msqid_ds {1struct msqid_ds {
2 struct ipc_perm msg_perm;2 struct ipc_perm msg_perm;
3 time_t msg_stime;3 unsigned long __msg_stime_lo;
4 int __unused1;4 unsigned long __msg_stime_hi;
5 time_t msg_rtime;5 unsigned long __msg_rtime_lo;
6 int __unused2;6 unsigned long __msg_rtime_hi;
7 time_t msg_ctime;7 unsigned long __msg_ctime_lo;
8 int __unused3;8 unsigned long __msg_ctime_hi;
9 unsigned long msg_cbytes;9 unsigned long msg_cbytes;
10 msgqnum_t msg_qnum;10 msgqnum_t msg_qnum;
11 msglen_t msg_qbytes;11 msglen_t msg_qbytes;
12 pid_t msg_lspid;12 pid_t msg_lspid;
13 pid_t msg_lrpid;13 pid_t msg_lrpid;
14 unsigned long __unused[2];14 unsigned long __unused[2];
15 time_t msg_stime;
16 time_t msg_rtime;
17 time_t msg_ctime;
15};18};
lib/libc/musl/arch/i386/bits/sem.h+6-4
...@@ -1,11 +1,13 @@...@@ -1,11 +1,13 @@
1struct semid_ds {1struct semid_ds {
2 struct ipc_perm sem_perm;2 struct ipc_perm sem_perm;
3 time_t sem_otime;3 unsigned long __sem_otime_lo;
4 long __unused1;4 unsigned long __sem_otime_hi;
5 time_t sem_ctime;5 unsigned long __sem_ctime_lo;
6 long __unused2;6 unsigned long __sem_ctime_hi;
7 unsigned short sem_nsems;7 unsigned short sem_nsems;
8 char __sem_nsems_pad[sizeof(long)-sizeof(short)];8 char __sem_nsems_pad[sizeof(long)-sizeof(short)];
9 long __unused3;9 long __unused3;
10 long __unused4;10 long __unused4;
11 time_t sem_otime;
12 time_t sem_ctime;
11};13};
lib/libc/musl/arch/i386/bits/shm.h+10-6
...@@ -3,17 +3,21 @@...@@ -3,17 +3,21 @@
3struct shmid_ds {3struct shmid_ds {
4 struct ipc_perm shm_perm;4 struct ipc_perm shm_perm;
5 size_t shm_segsz;5 size_t shm_segsz;
6 time_t shm_atime;6 unsigned long __shm_atime_lo;
7 int __unused1;7 unsigned long __shm_atime_hi;
8 time_t shm_dtime;8 unsigned long __shm_dtime_lo;
9 int __unused2;9 unsigned long __shm_dtime_hi;
10 time_t shm_ctime;10 unsigned long __shm_ctime_lo;
11 int __unused3;11 unsigned long __shm_ctime_hi;
12 pid_t shm_cpid;12 pid_t shm_cpid;
13 pid_t shm_lpid;13 pid_t shm_lpid;
14 unsigned long shm_nattch;14 unsigned long shm_nattch;
15 unsigned long __pad1;15 unsigned long __pad1;
16 unsigned long __pad2;16 unsigned long __pad2;
17 unsigned long __pad3;
18 time_t shm_atime;
19 time_t shm_dtime;
20 time_t shm_ctime;
17};21};
1822
19struct shminfo {23struct shminfo {
lib/libc/musl/arch/i386/bits/stat.h+5-1
...@@ -14,8 +14,12 @@ struct stat {...@@ -14,8 +14,12 @@ struct stat {
14 off_t st_size;14 off_t st_size;
15 blksize_t st_blksize;15 blksize_t st_blksize;
16 blkcnt_t st_blocks;16 blkcnt_t st_blocks;
17 struct {
18 long tv_sec;
19 long tv_nsec;
20 } __st_atim32, __st_mtim32, __st_ctim32;
21 ino_t st_ino;
17 struct timespec st_atim;22 struct timespec st_atim;
18 struct timespec st_mtim;23 struct timespec st_mtim;
19 struct timespec st_ctim;24 struct timespec st_ctim;
20 ino_t st_ino;
21};25};
lib/libc/musl/arch/i386/bits/syscall.h.in+12-10
...@@ -76,8 +76,8 @@...@@ -76,8 +76,8 @@
76#define __NR_setrlimit 7576#define __NR_setrlimit 75
77#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */77#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */
78#define __NR_getrusage 7778#define __NR_getrusage 77
79#define __NR_gettimeofday 7879#define __NR_gettimeofday_time32 78
80#define __NR_settimeofday 7980#define __NR_settimeofday_time32 79
81#define __NR_getgroups 8081#define __NR_getgroups 80
82#define __NR_setgroups 8182#define __NR_setgroups 81
83#define __NR_select 8283#define __NR_select 82
...@@ -257,14 +257,14 @@...@@ -257,14 +257,14 @@
257#define __NR_remap_file_pages 257257#define __NR_remap_file_pages 257
258#define __NR_set_tid_address 258258#define __NR_set_tid_address 258
259#define __NR_timer_create 259259#define __NR_timer_create 259
260#define __NR_timer_settime (__NR_timer_create+1)260#define __NR_timer_settime32 (__NR_timer_create+1)
261#define __NR_timer_gettime (__NR_timer_create+2)261#define __NR_timer_gettime32 (__NR_timer_create+2)
262#define __NR_timer_getoverrun (__NR_timer_create+3)262#define __NR_timer_getoverrun (__NR_timer_create+3)
263#define __NR_timer_delete (__NR_timer_create+4)263#define __NR_timer_delete (__NR_timer_create+4)
264#define __NR_clock_settime (__NR_timer_create+5)264#define __NR_clock_settime32 (__NR_timer_create+5)
265#define __NR_clock_gettime (__NR_timer_create+6)265#define __NR_clock_gettime32 (__NR_timer_create+6)
266#define __NR_clock_getres (__NR_timer_create+7)266#define __NR_clock_getres_time32 (__NR_timer_create+7)
267#define __NR_clock_nanosleep (__NR_timer_create+8)267#define __NR_clock_nanosleep_time32 (__NR_timer_create+8)
268#define __NR_statfs64 268268#define __NR_statfs64 268
269#define __NR_fstatfs64 269269#define __NR_fstatfs64 269
270#define __NR_tgkill 270270#define __NR_tgkill 270
...@@ -322,8 +322,8 @@...@@ -322,8 +322,8 @@
322#define __NR_timerfd_create 322322#define __NR_timerfd_create 322
323#define __NR_eventfd 323323#define __NR_eventfd 323
324#define __NR_fallocate 324324#define __NR_fallocate 324
325#define __NR_timerfd_settime 325325#define __NR_timerfd_settime32 325
326#define __NR_timerfd_gettime 326326#define __NR_timerfd_gettime32 326
327#define __NR_signalfd4 327327#define __NR_signalfd4 327
328#define __NR_eventfd2 328328#define __NR_eventfd2 328
329#define __NR_epoll_create1 329329#define __NR_epoll_create1 329
...@@ -424,4 +424,6 @@...@@ -424,4 +424,6 @@
424#define __NR_fsconfig 431424#define __NR_fsconfig 431
425#define __NR_fsmount 432425#define __NR_fsmount 432
426#define __NR_fspick 433426#define __NR_fspick 433
427#define __NR_pidfd_open 434
428#define __NR_clone3 435
427429
lib/libc/musl/arch/i386/syscall_arch.h+3-1
...@@ -83,7 +83,9 @@ static inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a...@@ -83,7 +83,9 @@ static inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a
83}83}
8484
85#define VDSO_USEFUL85#define VDSO_USEFUL
86#define VDSO_CGT_SYM "__vdso_clock_gettime"86#define VDSO_CGT32_SYM "__vdso_clock_gettime"
87#define VDSO_CGT32_VER "LINUX_2.6"
88#define VDSO_CGT_SYM "__vdso_clock_gettime64"
87#define VDSO_CGT_VER "LINUX_2.6"89#define VDSO_CGT_VER "LINUX_2.6"
8890
89#define SYSCALL_USE_SOCKETCALL91#define SYSCALL_USE_SOCKETCALL
lib/libc/musl/arch/mips/bits/alltypes.h.in+8-13
...@@ -1,9 +1,15 @@...@@ -1,9 +1,15 @@
1#define _REDIR_TIME64 1
1#define _Addr int2#define _Addr int
2#define _Int64 long long3#define _Int64 long long
3#define _Reg int4#define _Reg int
45
5TYPEDEF __builtin_va_list va_list;6#if _MIPSEL || __MIPSEL || __MIPSEL__
6TYPEDEF __builtin_va_list __isoc_va_list;7#define __BYTE_ORDER 1234
8#else
9#define __BYTE_ORDER 4321
10#endif
11
12#define __LONG_MAX 0x7fffffffL
713
8#ifndef __cplusplus14#ifndef __cplusplus
9TYPEDEF int wchar_t;15TYPEDEF int wchar_t;
...@@ -13,14 +19,3 @@ TYPEDEF float float_t;...@@ -13,14 +19,3 @@ TYPEDEF float float_t;
13TYPEDEF double double_t;19TYPEDEF double double_t;
1420
15TYPEDEF struct { long long __ll; long double __ld; } max_align_t;21TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
16
17TYPEDEF long time_t;
18TYPEDEF long suseconds_t;
19
20TYPEDEF struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
21TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
22TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
23TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
24TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
25TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
26TYPEDEF struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
lib/libc/musl/arch/mips/bits/endian.h deleted-5
...@@ -1,5 +0,0 @@
1#if _MIPSEL || __MIPSEL || __MIPSEL__
2#define __BYTE_ORDER __LITTLE_ENDIAN
3#else
4#define __BYTE_ORDER __BIG_ENDIAN
5#endif
lib/libc/musl/arch/mips/bits/hwcap.h+11
...@@ -1,3 +1,14 @@...@@ -1,3 +1,14 @@
1#define HWCAP_MIPS_R6 (1 << 0)1#define HWCAP_MIPS_R6 (1 << 0)
2#define HWCAP_MIPS_MSA (1 << 1)2#define HWCAP_MIPS_MSA (1 << 1)
3#define HWCAP_MIPS_CRC32 (1 << 2)3#define HWCAP_MIPS_CRC32 (1 << 2)
4#define HWCAP_MIPS_MIPS16 (1 << 3)
5#define HWCAP_MIPS_MDMX (1 << 4)
6#define HWCAP_MIPS_MIPS3D (1 << 5)
7#define HWCAP_MIPS_SMARTMIPS (1 << 6)
8#define HWCAP_MIPS_DSP (1 << 7)
9#define HWCAP_MIPS_DSP2 (1 << 8)
10#define HWCAP_MIPS_DSP3 (1 << 9)
11#define HWCAP_MIPS_MIPS16E2 (1 << 10)
12#define HWCAP_LOONGSON_MMI (1 << 11)
13#define HWCAP_LOONGSON_EXT (1 << 12)
14#define HWCAP_LOONGSON_EXT2 (1 << 13)
lib/libc/musl/arch/mips/bits/ioctl.h+2-2
...@@ -110,5 +110,5 @@...@@ -110,5 +110,5 @@
110#define SIOCATMARK _IOR('s', 7, int)110#define SIOCATMARK _IOR('s', 7, int)
111#define SIOCSPGRP _IOW('s', 8, pid_t)111#define SIOCSPGRP _IOW('s', 8, pid_t)
112#define SIOCGPGRP _IOR('s', 9, pid_t)112#define SIOCGPGRP _IOR('s', 9, pid_t)
113#define SIOCGSTAMP 0x8906113#define SIOCGSTAMP _IOR(0x89, 6, char[16])
114#define SIOCGSTAMPNS 0x8907114#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])
lib/libc/musl/arch/mips/bits/ipcstat.h+1-1
...@@ -1 +1 @@...@@ -1 +1 @@
1#define IPC_STAT 21#define IPC_STAT 0x102
lib/libc/musl/arch/mips/bits/limits.h deleted-7
...@@ -1,7 +0,0 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define LONG_BIT 32
4#endif
5
6#define LONG_MAX 0x7fffffffL
7#define LLONG_MAX 0x7fffffffffffffffLL
lib/libc/musl/arch/mips/bits/msg.h+15-12
...@@ -1,19 +1,19 @@...@@ -1,19 +1,19 @@
1struct msqid_ds {1struct msqid_ds {
2 struct ipc_perm msg_perm;2 struct ipc_perm msg_perm;
3#if _MIPSEL || __MIPSEL || __MIPSEL__3#if _MIPSEL || __MIPSEL || __MIPSEL__
4 time_t msg_stime;4 unsigned long __msg_stime_lo;
5 int __unused1;5 unsigned long __msg_stime_hi;
6 time_t msg_rtime;6 unsigned long __msg_rtime_lo;
7 int __unused2;7 unsigned long __msg_rtime_hi;
8 time_t msg_ctime;8 unsigned long __msg_ctime_lo;
9 int __unused3;9 unsigned long __msg_ctime_hi;
10#else10#else
11 int __unused1;11 unsigned long __msg_stime_hi;
12 time_t msg_stime;12 unsigned long __msg_stime_lo;
13 int __unused2;13 unsigned long __msg_rtime_hi;
14 time_t msg_rtime;14 unsigned long __msg_rtime_lo;
15 int __unused3;15 unsigned long __msg_ctime_hi;
16 time_t msg_ctime;16 unsigned long __msg_ctime_lo;
17#endif17#endif
18 unsigned long msg_cbytes;18 unsigned long msg_cbytes;
19 msgqnum_t msg_qnum;19 msgqnum_t msg_qnum;
...@@ -21,4 +21,7 @@ struct msqid_ds {...@@ -21,4 +21,7 @@ struct msqid_ds {
21 pid_t msg_lspid;21 pid_t msg_lspid;
22 pid_t msg_lrpid;22 pid_t msg_lrpid;
23 unsigned long __unused[2];23 unsigned long __unused[2];
24 time_t msg_stime;
25 time_t msg_rtime;
26 time_t msg_ctime;
24};27};
lib/libc/musl/arch/mips/bits/sem.h+6-4
...@@ -1,7 +1,7 @@...@@ -1,7 +1,7 @@
1struct semid_ds {1struct semid_ds {
2 struct ipc_perm sem_perm;2 struct ipc_perm sem_perm;
3 time_t sem_otime;3 unsigned long __sem_otime_lo;
4 time_t sem_ctime;4 unsigned long __sem_ctime_lo;
5#if __BYTE_ORDER == __LITTLE_ENDIAN5#if __BYTE_ORDER == __LITTLE_ENDIAN
6 unsigned short sem_nsems;6 unsigned short sem_nsems;
7 char __sem_nsems_pad[sizeof(long)-sizeof(short)];7 char __sem_nsems_pad[sizeof(long)-sizeof(short)];
...@@ -9,6 +9,8 @@ struct semid_ds {...@@ -9,6 +9,8 @@ struct semid_ds {
9 char __sem_nsems_pad[sizeof(long)-sizeof(short)];9 char __sem_nsems_pad[sizeof(long)-sizeof(short)];
10 unsigned short sem_nsems;10 unsigned short sem_nsems;
11#endif11#endif
12 long __unused3;12 unsigned long __sem_otime_hi;
13 long __unused4;13 unsigned long __sem_ctime_hi;
14 time_t sem_otime;
15 time_t sem_ctime;
14};16};
lib/libc/musl/arch/mips/bits/shm.h+10-5
...@@ -3,14 +3,19 @@...@@ -3,14 +3,19 @@
3struct shmid_ds {3struct shmid_ds {
4 struct ipc_perm shm_perm;4 struct ipc_perm shm_perm;
5 size_t shm_segsz;5 size_t shm_segsz;
6 time_t shm_atime;6 unsigned long __shm_atime_lo;
7 time_t shm_dtime;7 unsigned long __shm_dtime_lo;
8 time_t shm_ctime;8 unsigned long __shm_ctime_lo;
9 pid_t shm_cpid;9 pid_t shm_cpid;
10 pid_t shm_lpid;10 pid_t shm_lpid;
11 unsigned long shm_nattch;11 unsigned long shm_nattch;
12 unsigned long __pad1;12 unsigned short __shm_atime_hi;
13 unsigned long __pad2;13 unsigned short __shm_dtime_hi;
14 unsigned short __shm_ctime_hi;
15 unsigned short __pad1;
16 time_t shm_atime;
17 time_t shm_dtime;
18 time_t shm_ctime;
14};19};
1520
16struct shminfo {21struct shminfo {
lib/libc/musl/arch/mips/bits/signal.h+6-2
...@@ -19,14 +19,18 @@ typedef struct {...@@ -19,14 +19,18 @@ typedef struct {
19} fpregset_t;19} fpregset_t;
20struct sigcontext {20struct sigcontext {
21 unsigned sc_regmask, sc_status;21 unsigned sc_regmask, sc_status;
22 unsigned long long sc_pc, sc_regs[32], sc_fpregs[32];22 unsigned long long sc_pc;
23 gregset_t sc_regs;
24 fpregset_t sc_fpregs;
23 unsigned sc_ownedfp, sc_fpc_csr, sc_fpc_eir, sc_used_math, sc_dsp;25 unsigned sc_ownedfp, sc_fpc_csr, sc_fpc_eir, sc_used_math, sc_dsp;
24 unsigned long long sc_mdhi, sc_mdlo;26 unsigned long long sc_mdhi, sc_mdlo;
25 unsigned long sc_hi1, sc_lo1, sc_hi2, sc_lo2, sc_hi3, sc_lo3;27 unsigned long sc_hi1, sc_lo1, sc_hi2, sc_lo2, sc_hi3, sc_lo3;
26};28};
27typedef struct {29typedef struct {
28 unsigned regmask, status;30 unsigned regmask, status;
29 unsigned long long pc, gregs[32], fpregs[32];31 unsigned long long pc;
32 gregset_t gregs;
33 fpregset_t fpregs;
30 unsigned ownedfp, fpc_csr, fpc_eir, used_math, dsp;34 unsigned ownedfp, fpc_csr, fpc_eir, used_math, dsp;
31 unsigned long long mdhi, mdlo;35 unsigned long long mdhi, mdlo;
32 unsigned long hi1, lo1, hi2, lo2, hi3, lo3;36 unsigned long hi1, lo1, hi2, lo2, hi3, lo3;
lib/libc/musl/arch/mips/bits/socket.h-18
...@@ -1,19 +1,3 @@...@@ -1,19 +1,3 @@
1struct msghdr {
2 void *msg_name;
3 socklen_t msg_namelen;
4 struct iovec *msg_iov;
5 int msg_iovlen;
6 void *msg_control;
7 socklen_t msg_controllen;
8 int msg_flags;
9};
10
11struct cmsghdr {
12 socklen_t cmsg_len;
13 int cmsg_level;
14 int cmsg_type;
15};
16
17#define SOCK_STREAM 21#define SOCK_STREAM 2
18#define SOCK_DGRAM 12#define SOCK_DGRAM 1
193
...@@ -32,8 +16,6 @@ struct cmsghdr {...@@ -32,8 +16,6 @@ struct cmsghdr {
32#define SO_RCVBUF 0x100216#define SO_RCVBUF 0x1002
33#define SO_SNDLOWAT 0x100317#define SO_SNDLOWAT 0x1003
34#define SO_RCVLOWAT 0x100418#define SO_RCVLOWAT 0x1004
35#define SO_RCVTIMEO 0x1006
36#define SO_SNDTIMEO 0x1005
37#define SO_ERROR 0x100719#define SO_ERROR 0x1007
38#define SO_TYPE 0x100820#define SO_TYPE 0x1008
39#define SO_ACCEPTCONN 0x100921#define SO_ACCEPTCONN 0x1009
lib/libc/musl/arch/mips/bits/stat.h+8-4
...@@ -12,11 +12,15 @@ struct stat {...@@ -12,11 +12,15 @@ struct stat {
12 dev_t st_rdev;12 dev_t st_rdev;
13 long __st_padding2[2];13 long __st_padding2[2];
14 off_t st_size;14 off_t st_size;
15 struct timespec st_atim;15 struct {
16 struct timespec st_mtim;16 long tv_sec;
17 struct timespec st_ctim;17 long tv_nsec;
18 } __st_atim32, __st_mtim32, __st_ctim32;
18 blksize_t st_blksize;19 blksize_t st_blksize;
19 long __st_padding3;20 long __st_padding3;
20 blkcnt_t st_blocks;21 blkcnt_t st_blocks;
21 long __st_padding4[14];22 struct timespec st_atim;
23 struct timespec st_mtim;
24 struct timespec st_ctim;
25 long __st_padding4[2];
22};26};
lib/libc/musl/arch/mips/bits/syscall.h.in+12-10
...@@ -76,8 +76,8 @@...@@ -76,8 +76,8 @@
76#define __NR_setrlimit 407576#define __NR_setrlimit 4075
77#define __NR_getrlimit 407677#define __NR_getrlimit 4076
78#define __NR_getrusage 407778#define __NR_getrusage 4077
79#define __NR_gettimeofday 407879#define __NR_gettimeofday_time32 4078
80#define __NR_settimeofday 407980#define __NR_settimeofday_time32 4079
81#define __NR_getgroups 408081#define __NR_getgroups 4080
82#define __NR_setgroups 408182#define __NR_setgroups 4081
83#define __NR_reserved82 408283#define __NR_reserved82 4082
...@@ -256,14 +256,14 @@...@@ -256,14 +256,14 @@
256#define __NR_statfs64 4255256#define __NR_statfs64 4255
257#define __NR_fstatfs64 4256257#define __NR_fstatfs64 4256
258#define __NR_timer_create 4257258#define __NR_timer_create 4257
259#define __NR_timer_settime 4258259#define __NR_timer_settime32 4258
260#define __NR_timer_gettime 4259260#define __NR_timer_gettime32 4259
261#define __NR_timer_getoverrun 4260261#define __NR_timer_getoverrun 4260
262#define __NR_timer_delete 4261262#define __NR_timer_delete 4261
263#define __NR_clock_settime 4262263#define __NR_clock_settime32 4262
264#define __NR_clock_gettime 4263264#define __NR_clock_gettime32 4263
265#define __NR_clock_getres 4264265#define __NR_clock_getres_time32 4264
266#define __NR_clock_nanosleep 4265266#define __NR_clock_nanosleep_time32 4265
267#define __NR_tgkill 4266267#define __NR_tgkill 4266
268#define __NR_utimes 4267268#define __NR_utimes 4267
269#define __NR_mbind 4268269#define __NR_mbind 4268
...@@ -319,8 +319,8 @@...@@ -319,8 +319,8 @@
319#define __NR_eventfd 4319319#define __NR_eventfd 4319
320#define __NR_fallocate 4320320#define __NR_fallocate 4320
321#define __NR_timerfd_create 4321321#define __NR_timerfd_create 4321
322#define __NR_timerfd_gettime 4322322#define __NR_timerfd_gettime32 4322
323#define __NR_timerfd_settime 4323323#define __NR_timerfd_settime32 4323
324#define __NR_signalfd4 4324324#define __NR_signalfd4 4324
325#define __NR_eventfd2 4325325#define __NR_eventfd2 4325
326#define __NR_epoll_create1 4326326#define __NR_epoll_create1 4326
...@@ -406,4 +406,6 @@...@@ -406,4 +406,6 @@
406#define __NR_fsconfig 4431406#define __NR_fsconfig 4431
407#define __NR_fsmount 4432407#define __NR_fsmount 4432
408#define __NR_fspick 4433408#define __NR_fspick 4433
409#define __NR_pidfd_open 4434
410#define __NR_clone3 4435
409411
lib/libc/musl/arch/mips/reloc.h-2
...@@ -1,5 +1,3 @@...@@ -1,5 +1,3 @@
1#include <endian.h>
2
3#if __mips_isa_rev >= 61#if __mips_isa_rev >= 6
4#define ISA_SUFFIX "r6"2#define ISA_SUFFIX "r6"
5#else3#else
lib/libc/musl/arch/mips/syscall_arch.h+3-1
...@@ -142,7 +142,9 @@ static inline long __syscall7(long n, long a, long b, long c, long d, long e, lo...@@ -142,7 +142,9 @@ static inline long __syscall7(long n, long a, long b, long c, long d, long e, lo
142}142}
143143
144#define VDSO_USEFUL144#define VDSO_USEFUL
145#define VDSO_CGT_SYM "__vdso_clock_gettime"145#define VDSO_CGT32_SYM "__vdso_clock_gettime"
146#define VDSO_CGT32_VER "LINUX_2.6"
147#define VDSO_CGT_SYM "__vdso_clock_gettime64"
146#define VDSO_CGT_VER "LINUX_2.6"148#define VDSO_CGT_VER "LINUX_2.6"
147149
148#define SO_SNDTIMEO_OLD 0x1005150#define SO_SNDTIMEO_OLD 0x1005
lib/libc/musl/arch/mips64/bits/alltypes.h.in+7-13
...@@ -2,8 +2,13 @@...@@ -2,8 +2,13 @@
2#define _Int64 long2#define _Int64 long
3#define _Reg long3#define _Reg long
44
5TYPEDEF __builtin_va_list va_list;5#if _MIPSEL || __MIPSEL || __MIPSEL__
6TYPEDEF __builtin_va_list __isoc_va_list;6#define __BYTE_ORDER 1234
7#else
8#define __BYTE_ORDER 4321
9#endif
10
11#define __LONG_MAX 0x7fffffffffffffffL
712
8#ifndef __cplusplus13#ifndef __cplusplus
9TYPEDEF int wchar_t;14TYPEDEF int wchar_t;
...@@ -14,15 +19,4 @@ TYPEDEF double double_t;...@@ -14,15 +19,4 @@ TYPEDEF double double_t;
1419
15TYPEDEF struct { long long __ll; long double __ld; } max_align_t;20TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
1621
17TYPEDEF long time_t;
18TYPEDEF long suseconds_t;
19
20TYPEDEF unsigned nlink_t;22TYPEDEF unsigned nlink_t;
21
22TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
23TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
24TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
25TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
26TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
27TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
28TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
lib/libc/musl/arch/mips64/bits/endian.h deleted-5
...@@ -1,5 +0,0 @@
1#if _MIPSEL || __MIPSEL || __MIPSEL__
2#define __BYTE_ORDER __LITTLE_ENDIAN
3#else
4#define __BYTE_ORDER __BIG_ENDIAN
5#endif
lib/libc/musl/arch/mips64/bits/limits.h deleted-7
...@@ -1,7 +0,0 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define LONG_BIT 64
4#endif
5
6#define LONG_MAX 0x7fffffffffffffffL
7#define LLONG_MAX 0x7fffffffffffffffLL
lib/libc/musl/arch/mips64/bits/socket.h-34
...@@ -1,37 +1,3 @@...@@ -1,37 +1,3 @@
1#include <endian.h>
2
3struct msghdr {
4 void *msg_name;
5 socklen_t msg_namelen;
6 struct iovec *msg_iov;
7#if __BYTE_ORDER == __BIG_ENDIAN
8 int __pad1, msg_iovlen;
9#else
10 int msg_iovlen, __pad1;
11#endif
12 void *msg_control;
13#if __BYTE_ORDER == __BIG_ENDIAN
14 int __pad2;
15 socklen_t msg_controllen;
16#else
17 socklen_t msg_controllen;
18 int __pad2;
19#endif
20 int msg_flags;
21};
22
23struct cmsghdr {
24#if __BYTE_ORDER == __BIG_ENDIAN
25 int __pad1;
26 socklen_t cmsg_len;
27#else
28 socklen_t cmsg_len;
29 int __pad1;
30#endif
31 int cmsg_level;
32 int cmsg_type;
33};
34
35#define SOCK_STREAM 21#define SOCK_STREAM 2
36#define SOCK_DGRAM 12#define SOCK_DGRAM 1
37#define SOL_SOCKET 655353#define SOL_SOCKET 65535
lib/libc/musl/arch/mips64/bits/syscall.h.in+2
...@@ -336,4 +336,6 @@...@@ -336,4 +336,6 @@
336#define __NR_fsconfig 5431336#define __NR_fsconfig 5431
337#define __NR_fsmount 5432337#define __NR_fsmount 5432
338#define __NR_fspick 5433338#define __NR_fspick 5433
339#define __NR_pidfd_open 5434
340#define __NR_clone3 5435
339341
lib/libc/musl/arch/mips64/reloc.h+2-8
...@@ -1,9 +1,3 @@...@@ -1,9 +1,3 @@
1#ifndef __RELOC_H__
2#define __RELOC_H__
3
4#define _GNU_SOURCE
5#include <endian.h>
6
7#if __mips_isa_rev >= 61#if __mips_isa_rev >= 6
8#define ISA_SUFFIX "r6"2#define ISA_SUFFIX "r6"
9#else3#else
...@@ -33,6 +27,8 @@...@@ -33,6 +27,8 @@
33#define REL_DTPOFF R_MIPS_TLS_DTPREL6427#define REL_DTPOFF R_MIPS_TLS_DTPREL64
34#define REL_TPOFF R_MIPS_TLS_TPREL6428#define REL_TPOFF R_MIPS_TLS_TPREL64
3529
30#include <endian.h>
31
36#undef R_TYPE32#undef R_TYPE
37#undef R_SYM33#undef R_SYM
38#undef R_INFO34#undef R_INFO
...@@ -62,5 +58,3 @@...@@ -62,5 +58,3 @@
62 " daddu %0, %0, $ra \n" \58 " daddu %0, %0, $ra \n" \
63 ".set pop \n" \59 ".set pop \n" \
64 : "=r"(*(fp)) : : "memory", "ra" )60 : "=r"(*(fp)) : : "memory", "ra" )
65
66#endif
lib/libc/musl/arch/powerpc/bits/alltypes.h.in+3-13
...@@ -1,9 +1,10 @@...@@ -1,9 +1,10 @@
1#define _REDIR_TIME64 1
1#define _Addr int2#define _Addr int
2#define _Int64 long long3#define _Int64 long long
3#define _Reg int4#define _Reg int
45
5TYPEDEF __builtin_va_list va_list;6#define __BYTE_ORDER 4321
6TYPEDEF __builtin_va_list __isoc_va_list;7#define __LONG_MAX 0x7fffffffL
78
8#ifndef __cplusplus9#ifndef __cplusplus
9#ifdef __WCHAR_TYPE__10#ifdef __WCHAR_TYPE__
...@@ -17,14 +18,3 @@ TYPEDEF float float_t;...@@ -17,14 +18,3 @@ TYPEDEF float float_t;
17TYPEDEF double double_t;18TYPEDEF double double_t;
1819
19TYPEDEF struct { long long __ll; long double __ld; } max_align_t;20TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
20
21TYPEDEF long time_t;
22TYPEDEF long suseconds_t;
23
24TYPEDEF struct { union { int __i[9]; volatile int __vi[9]; unsigned __s[9]; } __u; } pthread_attr_t;
25TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } pthread_mutex_t;
26TYPEDEF struct { union { int __i[6]; volatile int __vi[6]; volatile void *volatile __p[6]; } __u; } mtx_t;
27TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } pthread_cond_t;
28TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12]; } __u; } cnd_t;
29TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[8]; } __u; } pthread_rwlock_t;
30TYPEDEF struct { union { int __i[5]; volatile int __vi[5]; void *__p[5]; } __u; } pthread_barrier_t;
lib/libc/musl/arch/powerpc/bits/endian.h deleted-15
...@@ -1,15 +0,0 @@
1#ifdef __BIG_ENDIAN__
2 #if __BIG_ENDIAN__
3 #define __BYTE_ORDER __BIG_ENDIAN
4 #endif
5#endif /* __BIG_ENDIAN__ */
6
7#ifdef __LITTLE_ENDIAN__
8 #if __LITTLE_ENDIAN__
9 #define __BYTE_ORDER __LITTLE_ENDIAN
10 #endif
11#endif /* __LITTLE_ENDIAN__ */
12
13#ifndef __BYTE_ORDER
14 #define __BYTE_ORDER __BIG_ENDIAN
15#endif
lib/libc/musl/arch/powerpc/bits/ioctl.h+2-2
...@@ -116,5 +116,5 @@...@@ -116,5 +116,5 @@
116#define FIOGETOWN 0x8903116#define FIOGETOWN 0x8903
117#define SIOCGPGRP 0x8904117#define SIOCGPGRP 0x8904
118#define SIOCATMARK 0x8905118#define SIOCATMARK 0x8905
119#define SIOCGSTAMP 0x8906119#define SIOCGSTAMP _IOR(0x89, 6, char[16])
120#define SIOCGSTAMPNS 0x8907120#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])
lib/libc/musl/arch/powerpc/bits/ipcstat.h+1-1
...@@ -1 +1 @@...@@ -1 +1 @@
1#define IPC_STAT 21#define IPC_STAT 0x102
lib/libc/musl/arch/powerpc/bits/limits.h deleted-7
...@@ -1,7 +0,0 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define LONG_BIT 32
4#endif
5
6#define LONG_MAX 0x7fffffffL
7#define LLONG_MAX 0x7fffffffffffffffLL
lib/libc/musl/arch/powerpc/bits/msg.h+9-6
...@@ -1,15 +1,18 @@...@@ -1,15 +1,18 @@
1struct msqid_ds {1struct msqid_ds {
2 struct ipc_perm msg_perm;2 struct ipc_perm msg_perm;
3 int __unused1;3 unsigned long __msg_stime_hi;
4 time_t msg_stime;4 unsigned long __msg_stime_lo;
5 int __unused2;5 unsigned long __msg_rtime_hi;
6 time_t msg_rtime;6 unsigned long __msg_rtime_lo;
7 int __unused3;7 unsigned long __msg_ctime_hi;
8 time_t msg_ctime;8 unsigned long __msg_ctime_lo;
9 unsigned long msg_cbytes;9 unsigned long msg_cbytes;
10 msgqnum_t msg_qnum;10 msgqnum_t msg_qnum;
11 msglen_t msg_qbytes;11 msglen_t msg_qbytes;
12 pid_t msg_lspid;12 pid_t msg_lspid;
13 pid_t msg_lrpid;13 pid_t msg_lrpid;
14 unsigned long __unused[2];14 unsigned long __unused[2];
15 time_t msg_stime;
16 time_t msg_rtime;
17 time_t msg_ctime;
15};18};
lib/libc/musl/arch/powerpc/bits/sem.h+6-4
...@@ -1,10 +1,12 @@...@@ -1,10 +1,12 @@
1struct semid_ds {1struct semid_ds {
2 struct ipc_perm sem_perm;2 struct ipc_perm sem_perm;
3 int __unused1;3 unsigned long __sem_otime_hi;
4 time_t sem_otime;4 unsigned long __sem_otime_lo;
5 int __unused2;5 unsigned long __sem_ctime_hi;
6 time_t sem_ctime;6 unsigned long __sem_ctime_lo;
7 unsigned short __sem_nsems_pad, sem_nsems;7 unsigned short __sem_nsems_pad, sem_nsems;
8 long __unused3;8 long __unused3;
9 long __unused4;9 long __unused4;
10 time_t sem_otime;
11 time_t sem_ctime;
10};12};
lib/libc/musl/arch/powerpc/bits/shm.h+9-7
...@@ -2,19 +2,21 @@...@@ -2,19 +2,21 @@
22
3struct shmid_ds {3struct shmid_ds {
4 struct ipc_perm shm_perm;4 struct ipc_perm shm_perm;
5 int __unused1;5 unsigned long __shm_atime_hi;
6 time_t shm_atime;6 unsigned long __shm_atime_lo;
7 int __unused2;7 unsigned long __shm_dtime_hi;
8 time_t shm_dtime;8 unsigned long __shm_dtime_lo;
9 int __unused3;9 unsigned long __shm_ctime_hi;
10 time_t shm_ctime;10 unsigned long __shm_ctime_lo;
11 int __unused4;
12 size_t shm_segsz;11 size_t shm_segsz;
13 pid_t shm_cpid;12 pid_t shm_cpid;
14 pid_t shm_lpid;13 pid_t shm_lpid;
15 unsigned long shm_nattch;14 unsigned long shm_nattch;
16 unsigned long __pad1;15 unsigned long __pad1;
17 unsigned long __pad2;16 unsigned long __pad2;
17 time_t shm_atime;
18 time_t shm_dtime;
19 time_t shm_ctime;
18};20};
1921
20struct shminfo {22struct shminfo {
lib/libc/musl/arch/powerpc/bits/signal.h+1-1
...@@ -28,7 +28,7 @@ struct sigcontext {...@@ -28,7 +28,7 @@ struct sigcontext {
28 int signal;28 int signal;
29 unsigned long handler;29 unsigned long handler;
30 unsigned long oldmask;30 unsigned long oldmask;
31 void *regs;31 struct pt_regs *regs;
32};32};
3333
34typedef struct {34typedef struct {
lib/libc/musl/arch/powerpc/bits/socket.h-18
...@@ -1,19 +1,3 @@...@@ -1,19 +1,3 @@
1struct msghdr {
2 void *msg_name;
3 socklen_t msg_namelen;
4 struct iovec *msg_iov;
5 int msg_iovlen;
6 void *msg_control;
7 socklen_t msg_controllen;
8 int msg_flags;
9};
10
11struct cmsghdr {
12 socklen_t cmsg_len;
13 int cmsg_level;
14 int cmsg_type;
15};
16
17#define SO_DEBUG 11#define SO_DEBUG 1
18#define SO_REUSEADDR 22#define SO_REUSEADDR 2
19#define SO_TYPE 33#define SO_TYPE 3
...@@ -31,8 +15,6 @@ struct cmsghdr {...@@ -31,8 +15,6 @@ struct cmsghdr {
31#define SO_REUSEPORT 1515#define SO_REUSEPORT 15
32#define SO_RCVLOWAT 1616#define SO_RCVLOWAT 16
33#define SO_SNDLOWAT 1717#define SO_SNDLOWAT 17
34#define SO_RCVTIMEO 18
35#define SO_SNDTIMEO 19
36#define SO_PASSCRED 2018#define SO_PASSCRED 20
37#define SO_PEERCRED 2119#define SO_PEERCRED 21
38#define SO_ACCEPTCONN 3020#define SO_ACCEPTCONN 30
lib/libc/musl/arch/powerpc/bits/stat.h+5-1
...@@ -13,8 +13,12 @@ struct stat {...@@ -13,8 +13,12 @@ struct stat {
13 off_t st_size;13 off_t st_size;
14 blksize_t st_blksize;14 blksize_t st_blksize;
15 blkcnt_t st_blocks;15 blkcnt_t st_blocks;
16 struct {
17 long tv_sec;
18 long tv_nsec;
19 } __st_atim32, __st_mtim32, __st_ctim32;
20 unsigned __unused[2];
16 struct timespec st_atim;21 struct timespec st_atim;
17 struct timespec st_mtim;22 struct timespec st_mtim;
18 struct timespec st_ctim;23 struct timespec st_ctim;
19 unsigned __unused[2];
20};24};
lib/libc/musl/arch/powerpc/bits/syscall.h.in+12-10
...@@ -76,8 +76,8 @@...@@ -76,8 +76,8 @@
76#define __NR_setrlimit 7576#define __NR_setrlimit 75
77#define __NR_getrlimit 7677#define __NR_getrlimit 76
78#define __NR_getrusage 7778#define __NR_getrusage 77
79#define __NR_gettimeofday 7879#define __NR_gettimeofday_time32 78
80#define __NR_settimeofday 7980#define __NR_settimeofday_time32 79
81#define __NR_getgroups 8081#define __NR_getgroups 80
82#define __NR_setgroups 8182#define __NR_setgroups 81
83#define __NR_select 8283#define __NR_select 82
...@@ -238,14 +238,14 @@...@@ -238,14 +238,14 @@
238#define __NR_epoll_wait 238238#define __NR_epoll_wait 238
239#define __NR_remap_file_pages 239239#define __NR_remap_file_pages 239
240#define __NR_timer_create 240240#define __NR_timer_create 240
241#define __NR_timer_settime 241241#define __NR_timer_settime32 241
242#define __NR_timer_gettime 242242#define __NR_timer_gettime32 242
243#define __NR_timer_getoverrun 243243#define __NR_timer_getoverrun 243
244#define __NR_timer_delete 244244#define __NR_timer_delete 244
245#define __NR_clock_settime 245245#define __NR_clock_settime32 245
246#define __NR_clock_gettime 246246#define __NR_clock_gettime32 246
247#define __NR_clock_getres 247247#define __NR_clock_getres_time32 247
248#define __NR_clock_nanosleep 248248#define __NR_clock_nanosleep_time32 248
249#define __NR_swapcontext 249249#define __NR_swapcontext 249
250#define __NR_tgkill 250250#define __NR_tgkill 250
251#define __NR_utimes 251251#define __NR_utimes 251
...@@ -307,8 +307,8 @@...@@ -307,8 +307,8 @@
307#define __NR_sync_file_range2 308307#define __NR_sync_file_range2 308
308#define __NR_fallocate 309308#define __NR_fallocate 309
309#define __NR_subpage_prot 310309#define __NR_subpage_prot 310
310#define __NR_timerfd_settime 311310#define __NR_timerfd_settime32 311
311#define __NR_timerfd_gettime 312311#define __NR_timerfd_gettime32 312
312#define __NR_signalfd4 313312#define __NR_signalfd4 313
313#define __NR_eventfd2 314313#define __NR_eventfd2 314
314#define __NR_epoll_create1 315314#define __NR_epoll_create1 315
...@@ -413,4 +413,6 @@...@@ -413,4 +413,6 @@
413#define __NR_fsconfig 431413#define __NR_fsconfig 431
414#define __NR_fsmount 432414#define __NR_fsmount 432
415#define __NR_fspick 433415#define __NR_fspick 433
416#define __NR_pidfd_open 434
417#define __NR_clone3 435
416418
lib/libc/musl/arch/powerpc64/bits/alltypes.h.in+7-13
...@@ -2,8 +2,13 @@...@@ -2,8 +2,13 @@
2#define _Int64 long2#define _Int64 long
3#define _Reg long3#define _Reg long
44
5TYPEDEF __builtin_va_list va_list;5#if __BIG_ENDIAN__
6TYPEDEF __builtin_va_list __isoc_va_list;6#define __BYTE_ORDER 4321
7#else
8#define __BYTE_ORDER 1234
9#endif
10
11#define __LONG_MAX 0x7fffffffffffffffL
712
8#ifndef __cplusplus13#ifndef __cplusplus
9TYPEDEF int wchar_t;14TYPEDEF int wchar_t;
...@@ -13,14 +18,3 @@ TYPEDEF float float_t;...@@ -13,14 +18,3 @@ TYPEDEF float float_t;
13TYPEDEF double double_t;18TYPEDEF double double_t;
1419
15TYPEDEF struct { long long __ll; long double __ld; } max_align_t;20TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
16
17TYPEDEF long time_t;
18TYPEDEF long suseconds_t;
19
20TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
21TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
22TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
23TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
24TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
25TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
26TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
lib/libc/musl/arch/powerpc64/bits/endian.h deleted-5
...@@ -1,5 +0,0 @@
1#if __BIG_ENDIAN__
2#define __BYTE_ORDER __BIG_ENDIAN
3#else
4#define __BYTE_ORDER __LITTLE_ENDIAN
5#endif
lib/libc/musl/arch/powerpc64/bits/limits.h deleted-7
...@@ -1,7 +0,0 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define LONG_BIT 64
4#endif
5
6#define LONG_MAX 0x7fffffffffffffffL
7#define LLONG_MAX 0x7fffffffffffffffLL
lib/libc/musl/arch/powerpc64/bits/signal.h+2-6
...@@ -9,11 +9,7 @@...@@ -9,11 +9,7 @@
9#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)9#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
1010
11typedef unsigned long greg_t, gregset_t[48];11typedef unsigned long greg_t, gregset_t[48];
1212typedef double fpregset_t[33];
13typedef struct {
14 double fpregs[32];
15 double fpscr;
16} fpregset_t;
1713
18typedef struct {14typedef struct {
19#ifdef __GNUC__15#ifdef __GNUC__
...@@ -36,7 +32,7 @@ typedef struct sigcontext {...@@ -36,7 +32,7 @@ typedef struct sigcontext {
36 int _pad0;32 int _pad0;
37 unsigned long handler;33 unsigned long handler;
38 unsigned long oldmask;34 unsigned long oldmask;
39 void *regs;35 struct pt_regs *regs;
40 gregset_t gp_regs;36 gregset_t gp_regs;
41 fpregset_t fp_regs;37 fpregset_t fp_regs;
42 vrregset_t *v_regs;38 vrregset_t *v_regs;
lib/libc/musl/arch/powerpc64/bits/socket.h-34
...@@ -1,37 +1,3 @@...@@ -1,37 +1,3 @@
1#include <endian.h>
2
3struct msghdr {
4 void *msg_name;
5 socklen_t msg_namelen;
6 struct iovec *msg_iov;
7#if __BYTE_ORDER == __BIG_ENDIAN
8 int __pad1, msg_iovlen;
9#else
10 int msg_iovlen, __pad1;
11#endif
12 void *msg_control;
13#if __BYTE_ORDER == __BIG_ENDIAN
14 int __pad2;
15 socklen_t msg_controllen;
16#else
17 socklen_t msg_controllen;
18 int __pad2;
19#endif
20 int msg_flags;
21};
22
23struct cmsghdr {
24#if __BYTE_ORDER == __BIG_ENDIAN
25 int __pad1;
26 socklen_t cmsg_len;
27#else
28 socklen_t cmsg_len;
29 int __pad1;
30#endif
31 int cmsg_level;
32 int cmsg_type;
33};
34
35#define SO_DEBUG 11#define SO_DEBUG 1
36#define SO_REUSEADDR 22#define SO_REUSEADDR 2
37#define SO_TYPE 33#define SO_TYPE 3
lib/libc/musl/arch/powerpc64/bits/syscall.h.in+2
...@@ -385,4 +385,6 @@...@@ -385,4 +385,6 @@
385#define __NR_fsconfig 431385#define __NR_fsconfig 431
386#define __NR_fsmount 432386#define __NR_fsmount 432
387#define __NR_fspick 433387#define __NR_fspick 433
388#define __NR_pidfd_open 434
389#define __NR_clone3 435
388390
lib/libc/musl/arch/powerpc64/reloc.h-2
...@@ -1,5 +1,3 @@...@@ -1,5 +1,3 @@
1#include <endian.h>
2
3#if __BYTE_ORDER == __LITTLE_ENDIAN1#if __BYTE_ORDER == __LITTLE_ENDIAN
4#define ENDIAN_SUFFIX "le"2#define ENDIAN_SUFFIX "le"
5#else3#else
lib/libc/musl/arch/riscv64/atomic_arch.h+1-1
...@@ -15,7 +15,7 @@ static inline int a_cas(volatile int *p, int t, int s)...@@ -15,7 +15,7 @@ static inline int a_cas(volatile int *p, int t, int s)
15 " bnez %1, 1b\n"15 " bnez %1, 1b\n"
16 "1:"16 "1:"
17 : "=&r"(old), "=&r"(tmp)17 : "=&r"(old), "=&r"(tmp)
18 : "r"(p), "r"(t), "r"(s)18 : "r"(p), "r"((long)t), "r"((long)s)
19 : "memory");19 : "memory");
20 return old;20 return old;
21}21}
lib/libc/musl/arch/riscv64/bits/alltypes.h.in+2-13
...@@ -2,8 +2,8 @@...@@ -2,8 +2,8 @@
2#define _Int64 long2#define _Int64 long
3#define _Reg long3#define _Reg long
44
5TYPEDEF __builtin_va_list va_list;5#define __BYTE_ORDER 1234
6TYPEDEF __builtin_va_list __isoc_va_list;6#define __LONG_MAX 0x7fffffffffffffffL
77
8#ifndef __cplusplus8#ifndef __cplusplus
9TYPEDEF int wchar_t;9TYPEDEF int wchar_t;
...@@ -16,14 +16,3 @@ TYPEDEF float float_t;...@@ -16,14 +16,3 @@ TYPEDEF float float_t;
16TYPEDEF double double_t;16TYPEDEF double double_t;
1717
18TYPEDEF struct { long long __ll; long double __ld; } max_align_t;18TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
19
20TYPEDEF long time_t;
21TYPEDEF long suseconds_t;
22
23TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
24TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
25TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
26TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
27TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
28TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
29TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
lib/libc/musl/arch/riscv64/bits/endian.h deleted-1
...@@ -1 +0,0 @@
1#define __BYTE_ORDER __LITTLE_ENDIAN
lib/libc/musl/arch/riscv64/bits/limits.h deleted-7
...@@ -1,7 +0,0 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define LONG_BIT 64
4#endif
5
6#define LONG_MAX 0x7fffffffffffffffL
7#define LLONG_MAX 0x7fffffffffffffffLL
lib/libc/musl/arch/riscv64/bits/reg.h-6
...@@ -1,8 +1,2 @@...@@ -1,8 +1,2 @@
1#undef __WORDSIZE1#undef __WORDSIZE
2#define __WORDSIZE 642#define __WORDSIZE 64
3#define REG_PC 0
4#define REG_RA 1
5#define REG_SP 2
6#define REG_TP 4
7#define REG_S0 8
8#define REG_A0 10
lib/libc/musl/arch/riscv64/bits/signal.h+9
...@@ -35,6 +35,15 @@ typedef struct mcontext_t {...@@ -35,6 +35,15 @@ typedef struct mcontext_t {
35 union __riscv_mc_fp_state __fpregs;35 union __riscv_mc_fp_state __fpregs;
36} mcontext_t;36} mcontext_t;
3737
38#if defined(_GNU_SOURCE)
39#define REG_PC 0
40#define REG_RA 1
41#define REG_SP 2
42#define REG_TP 4
43#define REG_S0 8
44#define REG_A0 10
45#endif
46
38#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)47#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
39typedef unsigned long greg_t;48typedef unsigned long greg_t;
40typedef unsigned long gregset_t[32];49typedef unsigned long gregset_t[32];
lib/libc/musl/arch/riscv64/bits/socket.h deleted-19
...@@ -1,19 +0,0 @@
1#include <endian.h>
2
3struct msghdr {
4 void *msg_name;
5 socklen_t msg_namelen;
6 struct iovec *msg_iov;
7 int msg_iovlen, __pad1;
8 void *msg_control;
9 socklen_t msg_controllen;
10 int __pad2;
11 int msg_flags;
12};
13
14struct cmsghdr {
15 socklen_t cmsg_len;
16 int __pad1;
17 int cmsg_level;
18 int cmsg_type;
19};
lib/libc/musl/arch/riscv64/bits/syscall.h.in+2
...@@ -287,6 +287,8 @@...@@ -287,6 +287,8 @@
287#define __NR_fsconfig 431287#define __NR_fsconfig 431
288#define __NR_fsmount 432288#define __NR_fsmount 432
289#define __NR_fspick 433289#define __NR_fspick 433
290#define __NR_pidfd_open 434
291#define __NR_clone3 435
290292
291#define __NR_sysriscv __NR_arch_specific_syscall293#define __NR_sysriscv __NR_arch_specific_syscall
292#define __NR_riscv_flush_icache (__NR_sysriscv + 15)294#define __NR_riscv_flush_icache (__NR_sysriscv + 15)
lib/libc/musl/arch/s390x/bits/alltypes.h.in+2-13
...@@ -2,8 +2,8 @@...@@ -2,8 +2,8 @@
2#define _Int64 long2#define _Int64 long
3#define _Reg long3#define _Reg long
44
5TYPEDEF __builtin_va_list va_list;5#define __BYTE_ORDER 4321
6TYPEDEF __builtin_va_list __isoc_va_list;6#define __LONG_MAX 0x7fffffffffffffffL
77
8#ifndef __cplusplus8#ifndef __cplusplus
9TYPEDEF int wchar_t;9TYPEDEF int wchar_t;
...@@ -13,14 +13,3 @@ TYPEDEF double float_t;...@@ -13,14 +13,3 @@ TYPEDEF double float_t;
13TYPEDEF double double_t;13TYPEDEF double double_t;
1414
15TYPEDEF struct { long long __ll; long double __ld; } max_align_t;15TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
16
17TYPEDEF long time_t;
18TYPEDEF long suseconds_t;
19
20TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
21TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
22TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
23TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
24TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
25TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
26TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
lib/libc/musl/arch/s390x/bits/endian.h deleted-1
...@@ -1 +0,0 @@
1#define __BYTE_ORDER __BIG_ENDIAN
lib/libc/musl/arch/s390x/bits/limits.h-7
...@@ -1,8 +1 @@...@@ -1,8 +1 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define PAGESIZE 40961#define PAGESIZE 4096
4#define LONG_BIT 64
5#endif
6
7#define LONG_MAX 0x7fffffffffffffffL
8#define LLONG_MAX 0x7fffffffffffffffLL
lib/libc/musl/arch/s390x/bits/socket.h deleted-17
...@@ -1,17 +0,0 @@
1struct msghdr {
2 void *msg_name;
3 socklen_t msg_namelen;
4 struct iovec *msg_iov;
5 int __pad1, msg_iovlen;
6 void *msg_control;
7 int __pad2;
8 socklen_t msg_controllen;
9 int msg_flags;
10};
11
12struct cmsghdr {
13 int __pad1;
14 socklen_t cmsg_len;
15 int cmsg_level;
16 int cmsg_type;
17};
lib/libc/musl/arch/s390x/bits/syscall.h.in+2
...@@ -350,4 +350,6 @@...@@ -350,4 +350,6 @@
350#define __NR_fsconfig 431350#define __NR_fsconfig 431
351#define __NR_fsmount 432351#define __NR_fsmount 432
352#define __NR_fspick 433352#define __NR_fspick 433
353#define __NR_pidfd_open 434
354#define __NR_clone3 435
353355
lib/libc/musl/arch/s390x/reloc.h-2
...@@ -1,5 +1,3 @@...@@ -1,5 +1,3 @@
1#include <endian.h>
2
3#define LDSO_ARCH "s390x"1#define LDSO_ARCH "s390x"
42
5#define REL_SYMBOLIC R_390_643#define REL_SYMBOLIC R_390_64
lib/libc/musl/arch/x86_64/bits/alltypes.h.in+2-13
...@@ -2,8 +2,8 @@...@@ -2,8 +2,8 @@
2#define _Int64 long2#define _Int64 long
3#define _Reg long3#define _Reg long
44
5TYPEDEF __builtin_va_list va_list;5#define __BYTE_ORDER 1234
6TYPEDEF __builtin_va_list __isoc_va_list;6#define __LONG_MAX 0x7fffffffffffffffL
77
8#ifndef __cplusplus8#ifndef __cplusplus
9TYPEDEF int wchar_t;9TYPEDEF int wchar_t;
...@@ -18,14 +18,3 @@ TYPEDEF double double_t;...@@ -18,14 +18,3 @@ TYPEDEF double double_t;
18#endif18#endif
1919
20TYPEDEF struct { long long __ll; long double __ld; } max_align_t;20TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
21
22TYPEDEF long time_t;
23TYPEDEF long suseconds_t;
24
25TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; unsigned long __s[7]; } __u; } pthread_attr_t;
26TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } pthread_mutex_t;
27TYPEDEF struct { union { int __i[10]; volatile int __vi[10]; volatile void *volatile __p[5]; } __u; } mtx_t;
28TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } pthread_cond_t;
29TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[6]; } __u; } cnd_t;
30TYPEDEF struct { union { int __i[14]; volatile int __vi[14]; void *__p[7]; } __u; } pthread_rwlock_t;
31TYPEDEF struct { union { int __i[8]; volatile int __vi[8]; void *__p[4]; } __u; } pthread_barrier_t;
lib/libc/musl/arch/x86_64/bits/endian.h deleted-1
...@@ -1 +0,0 @@
1#define __BYTE_ORDER __LITTLE_ENDIAN
lib/libc/musl/arch/x86_64/bits/limits.h-7
...@@ -1,8 +1 @@...@@ -1,8 +1 @@
1#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
2 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
3#define PAGESIZE 40961#define PAGESIZE 4096
4#define LONG_BIT 64
5#endif
6
7#define LONG_MAX 0x7fffffffffffffffL
8#define LLONG_MAX 0x7fffffffffffffffLL
lib/libc/musl/arch/x86_64/bits/socket.h deleted-16
...@@ -1,16 +0,0 @@
1struct msghdr {
2 void *msg_name;
3 socklen_t msg_namelen;
4 struct iovec *msg_iov;
5 int msg_iovlen, __pad1;
6 void *msg_control;
7 socklen_t msg_controllen, __pad2;
8 int msg_flags;
9};
10
11struct cmsghdr {
12 socklen_t cmsg_len;
13 int __pad1;
14 int cmsg_level;
15 int cmsg_type;
16};
lib/libc/musl/arch/x86_64/bits/syscall.h.in+2
...@@ -343,4 +343,6 @@...@@ -343,4 +343,6 @@
343#define __NR_fsconfig 431343#define __NR_fsconfig 431
344#define __NR_fsmount 432344#define __NR_fsmount 432
345#define __NR_fspick 433345#define __NR_fspick 433
346#define __NR_pidfd_open 434
347#define __NR_clone3 435
346348
lib/libc/musl/compat/time32/__xstat.c created+24
...@@ -0,0 +1,24 @@
1#include "time32.h"
2#include <sys/stat.h>
3
4struct stat32;
5
6int __fxstat64(int ver, int fd, struct stat32 *buf)
7{
8 return __fstat_time32(fd, buf);
9}
10
11int __fxstatat64(int ver, int fd, const char *path, struct stat32 *buf, int flag)
12{
13 return __fstatat_time32(fd, path, buf, flag);
14}
15
16int __lxstat64(int ver, const char *path, struct stat32 *buf)
17{
18 return __lstat_time32(path, buf);
19}
20
21int __xstat64(int ver, const char *path, struct stat32 *buf)
22{
23 return __stat_time32(path, buf);
24}
lib/libc/musl/compat/time32/adjtime32.c created+21
...@@ -0,0 +1,21 @@
1#define _GNU_SOURCE
2#include "time32.h"
3#include <time.h>
4#include <sys/time.h>
5#include <sys/timex.h>
6
7int __adjtime32(const struct timeval32 *in32, struct timeval32 *out32)
8{
9 struct timeval out;
10 int r = adjtime((&(struct timeval){
11 .tv_sec = in32->tv_sec,
12 .tv_usec = in32->tv_usec}), &out);
13 if (r) return r;
14 /* We can't range-check the result because success was already
15 * committed by the above call. */
16 if (out32) {
17 out32->tv_sec = out.tv_sec;
18 out32->tv_usec = out.tv_usec;
19 }
20 return r;
21}
lib/libc/musl/compat/time32/adjtimex_time32.c created+10
...@@ -0,0 +1,10 @@
1#include "time32.h"
2#include <time.h>
3#include <sys/timex.h>
4
5struct timex32;
6
7int __adjtimex_time32(struct timex32 *tx32)
8{
9 return __clock_adjtime32(CLOCK_REALTIME, tx32);
10}
lib/libc/musl/compat/time32/aio_suspend_time32.c created+11
...@@ -0,0 +1,11 @@
1#include "time32.h"
2#include <time.h>
3#include <aio.h>
4
5int __aio_suspend_time32(const struct aiocb *const cbs[], int cnt, const struct timespec32 *ts32)
6{
7 return aio_suspend(cbs, cnt, ts32 ? (&(struct timespec){
8 .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}) : 0);
9}
10
11weak_alias(aio_suspend, aio_suspend64);
lib/libc/musl/compat/time32/clock_adjtime32.c created+70
...@@ -0,0 +1,70 @@
1#include "time32.h"
2#include <time.h>
3#include <sys/time.h>
4#include <sys/timex.h>
5#include <string.h>
6#include <stddef.h>
7
8struct timex32 {
9 unsigned modes;
10 long offset, freq, maxerror, esterror;
11 int status;
12 long constant, precision, tolerance;
13 struct timeval32 time;
14 long tick, ppsfreq, jitter;
15 int shift;
16 long stabil, jitcnt, calcnt, errcnt, stbcnt;
17 int tai;
18 int __padding[11];
19};
20
21int __clock_adjtime32(clockid_t clock_id, struct timex32 *tx32)
22{
23 struct timex utx = {
24 .modes = tx32->modes,
25 .offset = tx32->offset,
26 .freq = tx32->freq,
27 .maxerror = tx32->maxerror,
28 .esterror = tx32->esterror,
29 .status = tx32->status,
30 .constant = tx32->constant,
31 .precision = tx32->precision,
32 .tolerance = tx32->tolerance,
33 .time.tv_sec = tx32->time.tv_sec,
34 .time.tv_usec = tx32->time.tv_usec,
35 .tick = tx32->tick,
36 .ppsfreq = tx32->ppsfreq,
37 .jitter = tx32->jitter,
38 .shift = tx32->shift,
39 .stabil = tx32->stabil,
40 .jitcnt = tx32->jitcnt,
41 .calcnt = tx32->calcnt,
42 .errcnt = tx32->errcnt,
43 .stbcnt = tx32->stbcnt,
44 .tai = tx32->tai,
45 };
46 int r = clock_adjtime(clock_id, &utx);
47 if (r<0) return r;
48 tx32->modes = utx.modes;
49 tx32->offset = utx.offset;
50 tx32->freq = utx.freq;
51 tx32->maxerror = utx.maxerror;
52 tx32->esterror = utx.esterror;
53 tx32->status = utx.status;
54 tx32->constant = utx.constant;
55 tx32->precision = utx.precision;
56 tx32->tolerance = utx.tolerance;
57 tx32->time.tv_sec = utx.time.tv_sec;
58 tx32->time.tv_usec = utx.time.tv_usec;
59 tx32->tick = utx.tick;
60 tx32->ppsfreq = utx.ppsfreq;
61 tx32->jitter = utx.jitter;
62 tx32->shift = utx.shift;
63 tx32->stabil = utx.stabil;
64 tx32->jitcnt = utx.jitcnt;
65 tx32->calcnt = utx.calcnt;
66 tx32->errcnt = utx.errcnt;
67 tx32->stbcnt = utx.stbcnt;
68 tx32->tai = utx.tai;
69 return r;
70}
lib/libc/musl/compat/time32/clock_getres_time32.c created+13
...@@ -0,0 +1,13 @@
1#include "time32.h"
2#include <time.h>
3
4int __clock_getres_time32(clockid_t clk, struct timespec32 *ts32)
5{
6 struct timespec ts;
7 int r = clock_getres(clk, &ts);
8 if (!r && ts32) {
9 ts32->tv_sec = ts.tv_sec;
10 ts32->tv_nsec = ts.tv_nsec;
11 }
12 return r;
13}
lib/libc/musl/compat/time32/clock_gettime32.c created+18
...@@ -0,0 +1,18 @@
1#include "time32.h"
2#include <time.h>
3#include <errno.h>
4#include <stdint.h>
5
6int __clock_gettime32(clockid_t clk, struct timespec32 *ts32)
7{
8 struct timespec ts;
9 int r = clock_gettime(clk, &ts);
10 if (r) return r;
11 if (ts.tv_sec < INT32_MIN || ts.tv_sec > INT32_MAX) {
12 errno = EOVERFLOW;
13 return -1;
14 }
15 ts32->tv_sec = ts.tv_sec;
16 ts32->tv_nsec = ts.tv_nsec;
17 return 0;
18}
lib/libc/musl/compat/time32/clock_nanosleep_time32.c created+15
...@@ -0,0 +1,15 @@
1#include "time32.h"
2#include <time.h>
3#include <errno.h>
4
5int __clock_nanosleep_time32(clockid_t clk, int flags, const struct timespec32 *req32, struct timespec32 *rem32)
6{
7 struct timespec rem;
8 int ret = clock_nanosleep(clk, flags, (&(struct timespec){
9 .tv_sec = req32->tv_sec, .tv_nsec = req32->tv_nsec}), &rem);
10 if (ret==EINTR && rem32 && !(flags & TIMER_ABSTIME)) {
11 rem32->tv_sec = rem.tv_sec;
12 rem32->tv_nsec = rem.tv_nsec;
13 }
14 return ret;
15}
lib/libc/musl/compat/time32/clock_settime32.c created+9
...@@ -0,0 +1,9 @@
1#include "time32.h"
2#include <time.h>
3
4int __clock_settime32(clockid_t clk, const struct timespec32 *ts32)
5{
6 return clock_settime(clk, (&(struct timespec){
7 .tv_sec = ts32->tv_sec,
8 .tv_nsec = ts32->tv_nsec}));
9}
lib/libc/musl/compat/time32/cnd_timedwait_time32.c created+9
...@@ -0,0 +1,9 @@
1#include "time32.h"
2#include <time.h>
3#include <threads.h>
4
5int __cnd_timedwait_time32(cnd_t *restrict c, mtx_t *restrict m, const struct timespec32 *restrict ts32)
6{
7 return cnd_timedwait(c, m, ts32 ? (&(struct timespec){
8 .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}) : 0);
9}
lib/libc/musl/compat/time32/ctime32.c created+7
...@@ -0,0 +1,7 @@
1#include "time32.h"
2#include <time.h>
3
4char *__ctime32(time32_t *t)
5{
6 return ctime(&(time_t){*t});
7}
lib/libc/musl/compat/time32/ctime32_r.c created+7
...@@ -0,0 +1,7 @@
1#include "time32.h"
2#include <time.h>
3
4char *__ctime32_r(time32_t *t, char *buf)
5{
6 return ctime_r(&(time_t){*t}, buf);
7}
lib/libc/musl/compat/time32/difftime32.c created+7
...@@ -0,0 +1,7 @@
1#include "time32.h"
2#include <time.h>
3
4double __difftime32(time32_t t1, time32_t t2)
5{
6 return difftime(t1, t2);
7}
lib/libc/musl/compat/time32/fstat_time32.c created+17
...@@ -0,0 +1,17 @@
1#include "time32.h"
2#include <time.h>
3#include <string.h>
4#include <sys/stat.h>
5#include <stddef.h>
6
7struct stat32;
8
9int __fstat_time32(int fd, struct stat32 *restrict st32)
10{
11 struct stat st;
12 int r = fstat(fd, &st);
13 if (!r) memcpy(st32, &st, offsetof(struct stat, st_atim));
14 return r;
15}
16
17weak_alias(fstat, fstat64);
lib/libc/musl/compat/time32/fstatat_time32.c created+17
...@@ -0,0 +1,17 @@
1#include "time32.h"
2#include <time.h>
3#include <string.h>
4#include <sys/stat.h>
5#include <stddef.h>
6
7struct stat32;
8
9int __fstatat_time32(int fd, const char *restrict path, struct stat32 *restrict st32, int flag)
10{
11 struct stat st;
12 int r = fstatat(fd, path, &st, flag);
13 if (!r) memcpy(st32, &st, offsetof(struct stat, st_atim));
14 return r;
15}
16
17weak_alias(fstatat, fstatat64);
lib/libc/musl/compat/time32/ftime32.c created+25
...@@ -0,0 +1,25 @@
1#include "time32.h"
2#include <sys/timeb.h>
3#include <errno.h>
4#include <stdint.h>
5
6struct timeb32 {
7 int32_t time;
8 unsigned short millitm;
9 short timezone, dstflag;
10};
11
12int __ftime32(struct timeb32 *tp)
13{
14 struct timeb tb;
15 if (ftime(&tb) < 0) return -1;
16 if (tb.time < INT32_MIN || tb.time > INT32_MAX) {
17 errno = EOVERFLOW;
18 return -1;
19 }
20 tp->time = tb.time;
21 tp->millitm = tb.millitm;
22 tp->timezone = tb.timezone;
23 tp->dstflag = tb.dstflag;
24 return 0;
25}
lib/libc/musl/compat/time32/futimens_time32.c created+10
...@@ -0,0 +1,10 @@
1#include "time32.h"
2#include <time.h>
3#include <sys/stat.h>
4
5int __futimens_time32(int fd, const struct timespec32 *times32)
6{
7 return futimens(fd, !times32 ? 0 : ((struct timespec[2]){
8 {.tv_sec = times32[0].tv_sec,.tv_nsec = times32[0].tv_nsec},
9 {.tv_sec = times32[1].tv_sec,.tv_nsec = times32[1].tv_nsec}}));
10}
lib/libc/musl/compat/time32/futimes_time32.c created+12
...@@ -0,0 +1,12 @@
1#define _GNU_SOURCE
2#include "time32.h"
3#include <time.h>
4#include <sys/time.h>
5#include <sys/stat.h>
6
7int __futimes_time32(int fd, const struct timeval32 times32[2])
8{
9 return futimes(fd, !times32 ? 0 : ((struct timeval[2]){
10 {.tv_sec = times32[0].tv_sec,.tv_usec = times32[0].tv_usec},
11 {.tv_sec = times32[1].tv_sec,.tv_usec = times32[1].tv_usec}}));
12}
lib/libc/musl/compat/time32/futimesat_time32.c created+12
...@@ -0,0 +1,12 @@
1#define _GNU_SOURCE
2#include "time32.h"
3#include <time.h>
4#include <sys/time.h>
5#include <sys/stat.h>
6
7int __futimesat_time32(int dirfd, const char *pathname, const struct timeval32 times32[2])
8{
9 return futimesat(dirfd, pathname, !times32 ? 0 : ((struct timeval[2]){
10 {.tv_sec = times32[0].tv_sec,.tv_usec = times32[0].tv_usec},
11 {.tv_sec = times32[1].tv_sec,.tv_usec = times32[1].tv_usec}}));
12}
lib/libc/musl/compat/time32/getitimer_time32.c created+15
...@@ -0,0 +1,15 @@
1#include "time32.h"
2#include <time.h>
3#include <sys/time.h>
4
5int __getitimer_time32(int which, struct itimerval32 *old32)
6{
7 struct itimerval old;
8 int r = getitimer(which, &old);
9 if (r) return r;
10 old32->it_interval.tv_sec = old.it_interval.tv_sec;
11 old32->it_interval.tv_usec = old.it_interval.tv_usec;
12 old32->it_value.tv_sec = old.it_value.tv_sec;
13 old32->it_value.tv_usec = old.it_value.tv_usec;
14 return 0;
15}
lib/libc/musl/compat/time32/getrusage_time32.c created+39
...@@ -0,0 +1,39 @@
1#include "time32.h"
2#include <string.h>
3#include <stddef.h>
4#include <sys/resource.h>
5
6struct compat_rusage {
7 struct timeval32 ru_utime;
8 struct timeval32 ru_stime;
9 long ru_maxrss;
10 long ru_ixrss;
11 long ru_idrss;
12 long ru_isrss;
13 long ru_minflt;
14 long ru_majflt;
15 long ru_nswap;
16 long ru_inblock;
17 long ru_oublock;
18 long ru_msgsnd;
19 long ru_msgrcv;
20 long ru_nsignals;
21 long ru_nvcsw;
22 long ru_nivcsw;
23};
24
25int __getrusage_time32(int who, struct compat_rusage *usage)
26{
27 struct rusage ru;
28 int r = getrusage(who, &ru);
29 if (!r) {
30 usage->ru_utime.tv_sec = ru.ru_utime.tv_sec;
31 usage->ru_utime.tv_usec = ru.ru_utime.tv_usec;
32 usage->ru_stime.tv_sec = ru.ru_stime.tv_sec;
33 usage->ru_stime.tv_usec = ru.ru_stime.tv_usec;
34 memcpy(&usage->ru_maxrss, &ru.ru_maxrss,
35 sizeof(struct compat_rusage) -
36 offsetof(struct compat_rusage, ru_maxrss));
37 }
38 return r;
39}
lib/libc/musl/compat/time32/gettimeofday_time32.c created+19
...@@ -0,0 +1,19 @@
1#include "time32.h"
2#include <sys/time.h>
3#include <errno.h>
4#include <stdint.h>
5
6int __gettimeofday_time32(struct timeval32 *tv32, void *tz)
7{
8 struct timeval tv;
9 if (!tv32) return 0;
10 int r = gettimeofday(&tv, 0);
11 if (r) return r;
12 if (tv.tv_sec < INT32_MIN || tv.tv_sec > INT32_MAX) {
13 errno = EOVERFLOW;
14 return -1;
15 }
16 tv32->tv_sec = tv.tv_sec;
17 tv32->tv_usec = tv.tv_usec;
18 return 0;
19}
lib/libc/musl/compat/time32/gmtime32.c created+7
...@@ -0,0 +1,7 @@
1#include "time32.h"
2#include <time.h>
3
4struct tm *__gmtime32(time32_t *t)
5{
6 return gmtime(&(time_t){*t});
7}
lib/libc/musl/compat/time32/gmtime32_r.c created+7
...@@ -0,0 +1,7 @@
1#include "time32.h"
2#include <time.h>
3
4struct tm *__gmtime32_r(time32_t *t, struct tm *tm)
5{
6 return gmtime_r(&(time_t){*t}, tm);
7}
lib/libc/musl/compat/time32/localtime32.c created+7
...@@ -0,0 +1,7 @@
1#include "time32.h"
2#include <time.h>
3
4struct tm *__localtime32(time32_t *t)
5{
6 return localtime(&(time_t){*t});
7}
lib/libc/musl/compat/time32/localtime32_r.c created+7
...@@ -0,0 +1,7 @@
1#include "time32.h"
2#include <time.h>
3
4struct tm *__localtime32_r(time32_t *t, struct tm *tm)
5{
6 return localtime_r(&(time_t){*t}, tm);
7}
lib/libc/musl/compat/time32/lstat_time32.c created+17
...@@ -0,0 +1,17 @@
1#include "time32.h"
2#include <time.h>
3#include <string.h>
4#include <sys/stat.h>
5#include <stddef.h>
6
7struct stat32;
8
9int __lstat_time32(const char *restrict path, struct stat32 *restrict st32)
10{
11 struct stat st;
12 int r = lstat(path, &st);
13 if (!r) memcpy(st32, &st, offsetof(struct stat, st_atim));
14 return r;
15}
16
17weak_alias(lstat, lstat64);
lib/libc/musl/compat/time32/lutimes_time32.c created+12
...@@ -0,0 +1,12 @@
1#define _GNU_SOURCE
2#include "time32.h"
3#include <time.h>
4#include <sys/time.h>
5#include <sys/stat.h>
6
7int __lutimes_time32(const char *path, const struct timeval32 times32[2])
8{
9 return lutimes(path, !times32 ? 0 : ((struct timeval[2]){
10 {.tv_sec = times32[0].tv_sec,.tv_usec = times32[0].tv_usec},
11 {.tv_sec = times32[1].tv_sec,.tv_usec = times32[1].tv_usec}}));
12}
lib/libc/musl/compat/time32/mktime32.c created+16
...@@ -0,0 +1,16 @@
1#include "time32.h"
2#include <time.h>
3#include <errno.h>
4#include <stdint.h>
5
6time32_t __mktime32(struct tm *tm)
7{
8 struct tm tmp = *tm;
9 time_t t = mktime(&tmp);
10 if (t < INT32_MIN || t > INT32_MAX) {
11 errno = EOVERFLOW;
12 return -1;
13 }
14 *tm = tmp;
15 return t;
16}
lib/libc/musl/compat/time32/mq_timedreceive_time32.c created+9
...@@ -0,0 +1,9 @@
1#include "time32.h"
2#include <mqueue.h>
3#include <time.h>
4
5ssize_t __mq_timedreceive_time32(mqd_t mqd, char *restrict msg, size_t len, unsigned *restrict prio, const struct timespec32 *restrict ts32)
6{
7 return mq_timedreceive(mqd, msg, len, prio, ts32 ? (&(struct timespec){
8 .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}) : 0);
9}
lib/libc/musl/compat/time32/mq_timedsend_time32.c created+9
...@@ -0,0 +1,9 @@
1#include "time32.h"
2#include <mqueue.h>
3#include <time.h>
4
5int __mq_timedsend_time32(mqd_t mqd, const char *msg, size_t len, unsigned prio, const struct timespec32 *ts32)
6{
7 return mq_timedsend(mqd, msg, len, prio, ts32 ? (&(struct timespec){
8 .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}) : 0);
9}
lib/libc/musl/compat/time32/mtx_timedlock_time32.c created+9
...@@ -0,0 +1,9 @@
1#include "time32.h"
2#include <time.h>
3#include <threads.h>
4
5int __mtx_timedlock_time32(mtx_t *restrict m, const struct timespec32 *restrict ts32)
6{
7 return mtx_timedlock(m, !ts32 ? 0 : (&(struct timespec){
8 .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}));
9}
lib/libc/musl/compat/time32/nanosleep_time32.c created+15
...@@ -0,0 +1,15 @@
1#include "time32.h"
2#include <time.h>
3#include <errno.h>
4
5int __nanosleep_time32(const struct timespec32 *req32, struct timespec32 *rem32)
6{
7 struct timespec rem;
8 int ret = nanosleep((&(struct timespec){
9 .tv_sec = req32->tv_sec, .tv_nsec = req32->tv_nsec}), &rem);
10 if (ret<0 && errno==EINTR && rem32) {
11 rem32->tv_sec = rem.tv_sec;
12 rem32->tv_nsec = rem.tv_nsec;
13 }
14 return ret;
15}
lib/libc/musl/compat/time32/ppoll_time32.c created+10
...@@ -0,0 +1,10 @@
1#include "time32.h"
2#define _GNU_SOURCE
3#include <time.h>
4#include <poll.h>
5
6int __ppoll_time32(struct pollfd *fds, nfds_t n, const struct timespec32 *ts32, const sigset_t *mask)
7{
8 return ppoll(fds, n, !ts32 ? 0 : (&(struct timespec){
9 .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}), mask);
10}
lib/libc/musl/compat/time32/pselect_time32.c created+9
...@@ -0,0 +1,9 @@
1#include "time32.h"
2#include <time.h>
3#include <sys/select.h>
4
5int __pselect_time32(int n, fd_set *restrict rfds, fd_set *restrict wfds, fd_set *restrict efds, const struct timespec32 *restrict ts32, const sigset_t *restrict mask)
6{
7 return pselect(n, rfds, wfds, efds, !ts32 ? 0 : (&(struct timespec){
8 .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}), mask);
9}
lib/libc/musl/compat/time32/pthread_cond_timedwait_time32.c created+9
...@@ -0,0 +1,9 @@
1#include "time32.h"
2#include <time.h>
3#include <pthread.h>
4
5int __pthread_cond_timedwait_time32(pthread_cond_t *restrict c, pthread_mutex_t *restrict m, const struct timespec32 *restrict ts32)
6{
7 return pthread_cond_timedwait(c, m, !ts32 ? 0 : (&(struct timespec){
8 .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}));
9}
lib/libc/musl/compat/time32/pthread_mutex_timedlock_time32.c created+9
...@@ -0,0 +1,9 @@
1#include "time32.h"
2#include <time.h>
3#include <pthread.h>
4
5int __pthread_mutex_timedlock_time32(pthread_mutex_t *restrict m, const struct timespec32 *restrict ts32)
6{
7 return pthread_mutex_timedlock(m, !ts32 ? 0 : (&(struct timespec){
8 .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}));
9}
lib/libc/musl/compat/time32/pthread_rwlock_timedrdlock_time32.c created+9
...@@ -0,0 +1,9 @@
1#include "time32.h"
2#include <time.h>
3#include <pthread.h>
4
5int __pthread_rwlock_timedrdlock_time32(pthread_rwlock_t *restrict rw, const struct timespec32 *restrict ts32)
6{
7 return pthread_rwlock_timedrdlock(rw, !ts32 ? 0 : (&(struct timespec){
8 .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}));
9}
lib/libc/musl/compat/time32/pthread_rwlock_timedwrlock_time32.c created+9
...@@ -0,0 +1,9 @@
1#include "time32.h"
2#include <time.h>
3#include <pthread.h>
4
5int __pthread_rwlock_timedwrlock_time32(pthread_rwlock_t *restrict rw, const struct timespec32 *restrict ts32)
6{
7 return pthread_rwlock_timedwrlock(rw, !ts32 ? 0 : (&(struct timespec){
8 .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}));
9}
lib/libc/musl/compat/time32/pthread_timedjoin_np_time32.c created+10
...@@ -0,0 +1,10 @@
1#define _GNU_SOURCE
2#include "time32.h"
3#include <time.h>
4#include <pthread.h>
5
6int __pthread_timedjoin_np_time32(pthread_t t, void **res, const struct timespec32 *at32)
7{
8 return pthread_timedjoin_np(t, res, !at32 ? 0 : (&(struct timespec){
9 .tv_sec = at32->tv_sec, .tv_nsec = at32->tv_nsec}));
10}
lib/libc/musl/compat/time32/recvmmsg_time32.c created+10
...@@ -0,0 +1,10 @@
1#include "time32.h"
2#define _GNU_SOURCE
3#include <time.h>
4#include <sys/socket.h>
5
6int __recvmmsg_time32(int fd, struct mmsghdr *msgvec, unsigned int vlen, unsigned int flags, struct timespec32 *ts32)
7{
8 return recvmmsg(fd, msgvec, vlen, flags, ts32 ? (&(struct timespec){
9 .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}) : 0);
10}
lib/libc/musl/compat/time32/sched_rr_get_interval_time32.c created+13
...@@ -0,0 +1,13 @@
1#include "time32.h"
2#include <time.h>
3#include <sched.h>
4
5int __sched_rr_get_interval_time32(pid_t pid, struct timespec32 *ts32)
6{
7 struct timespec ts;
8 int r = sched_rr_get_interval(pid, &ts);
9 if (r) return r;
10 ts32->tv_sec = ts.tv_sec;
11 ts32->tv_nsec = ts.tv_nsec;
12 return r;
13}
lib/libc/musl/compat/time32/select_time32.c created+10
...@@ -0,0 +1,10 @@
1#include "time32.h"
2#include <time.h>
3#include <sys/time.h>
4#include <sys/select.h>
5
6int __select_time32(int n, fd_set *restrict rfds, fd_set *restrict wfds, fd_set *restrict efds, struct timeval32 *restrict tv32)
7{
8 return select(n, rfds, wfds, efds, !tv32 ? 0 : (&(struct timeval){
9 .tv_sec = tv32->tv_sec, .tv_usec = tv32->tv_usec}));
10}
lib/libc/musl/compat/time32/sem_timedwait_time32.c created+9
...@@ -0,0 +1,9 @@
1#include "time32.h"
2#include <time.h>
3#include <semaphore.h>
4
5int __sem_timedwait_time32(sem_t *sem, const struct timespec32 *restrict ts32)
6{
7 return sem_timedwait(sem, !ts32 ? 0 : (&(struct timespec){
8 .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}));
9}
lib/libc/musl/compat/time32/semtimedop_time32.c created+10
...@@ -0,0 +1,10 @@
1#include "time32.h"
2#define _GNU_SOURCE
3#include <sys/sem.h>
4#include <time.h>
5
6int __semtimedop_time32(int id, struct sembuf *buf, size_t n, const struct timespec32 *ts32)
7{
8 return semtimedop(id, buf, n, !ts32 ? 0 : (&(struct timespec){
9 .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}));
10}
lib/libc/musl/compat/time32/setitimer_time32.c created+25
...@@ -0,0 +1,25 @@
1#include "time32.h"
2#include <time.h>
3#include <sys/time.h>
4
5int __setitimer_time32(int which, const struct itimerval32 *restrict new32, struct itimerval32 *restrict old32)
6{
7 struct itimerval old;
8 int r = setitimer(which, (&(struct itimerval){
9 .it_interval.tv_sec = new32->it_interval.tv_sec,
10 .it_interval.tv_usec = new32->it_interval.tv_usec,
11 .it_value.tv_sec = new32->it_value.tv_sec,
12 .it_value.tv_usec = new32->it_value.tv_usec}), &old);
13 if (r) return r;
14 /* The above call has already committed to success by changing the
15 * timer setting, so we can't fail on out-of-range old value.
16 * Since these are relative times, values large enough to overflow
17 * don't make sense anyway. */
18 if (old32) {
19 old32->it_interval.tv_sec = old.it_interval.tv_sec;
20 old32->it_interval.tv_usec = old.it_interval.tv_usec;
21 old32->it_value.tv_sec = old.it_value.tv_sec;
22 old32->it_value.tv_usec = old.it_value.tv_usec;
23 }
24 return 0;
25}
lib/libc/musl/compat/time32/settimeofday_time32.c created+10
...@@ -0,0 +1,10 @@
1#define _BSD_SOURCE
2#include "time32.h"
3#include <sys/time.h>
4
5int __settimeofday_time32(const struct timeval32 *tv32, const void *tz)
6{
7 return settimeofday(!tv32 ? 0 : (&(struct timeval){
8 .tv_sec = tv32->tv_sec,
9 .tv_usec = tv32->tv_usec}), 0);
10}
lib/libc/musl/compat/time32/sigtimedwait_time32.c created+9
...@@ -0,0 +1,9 @@
1#include "time32.h"
2#include <time.h>
3#include <signal.h>
4
5int __sigtimedwait_time32(const sigset_t *restrict set, siginfo_t *restrict si, const struct timespec32 *restrict ts32)
6{
7 return sigtimedwait(set, si, !ts32 ? 0 : (&(struct timespec){
8 .tv_sec = ts32->tv_sec, .tv_nsec = ts32->tv_nsec}));
9}
lib/libc/musl/compat/time32/stat_time32.c created+17
...@@ -0,0 +1,17 @@
1#include "time32.h"
2#include <time.h>
3#include <string.h>
4#include <sys/stat.h>
5#include <stddef.h>
6
7struct stat32;
8
9int __stat_time32(const char *restrict path, struct stat32 *restrict st32)
10{
11 struct stat st;
12 int r = stat(path, &st);
13 if (!r) memcpy(st32, &st, offsetof(struct stat, st_atim));
14 return r;
15}
16
17weak_alias(stat, stat64);
lib/libc/musl/compat/time32/stime32.c created+8
...@@ -0,0 +1,8 @@
1#define _GNU_SOURCE
2#include "time32.h"
3#include <time.h>
4
5int __stime32(const time32_t *t)
6{
7 return stime(&(time_t){*t});
8}
lib/libc/musl/compat/time32/thrd_sleep_time32.c created+16
...@@ -0,0 +1,16 @@
1#include "time32.h"
2#include <time.h>
3#include <threads.h>
4#include <errno.h>
5
6int __thrd_sleep_time32(const struct timespec32 *req32, struct timespec32 *rem32)
7{
8 struct timespec rem;
9 int ret = thrd_sleep((&(struct timespec){
10 .tv_sec = req32->tv_sec, .tv_nsec = req32->tv_nsec}), &rem);
11 if (ret<0 && errno==EINTR && rem32) {
12 rem32->tv_sec = rem.tv_sec;
13 rem32->tv_nsec = rem.tv_nsec;
14 }
15 return ret;
16}
lib/libc/musl/compat/time32/time32.c created+15
...@@ -0,0 +1,15 @@
1#include "time32.h"
2#include <time.h>
3#include <errno.h>
4#include <stdint.h>
5
6time32_t __time32(time32_t *p)
7{
8 time_t t = time(0);
9 if (t < INT32_MIN || t > INT32_MAX) {
10 errno = EOVERFLOW;
11 return -1;
12 }
13 if (p) *p = t;
14 return t;
15}
lib/libc/musl/compat/time32/time32.h created+91
...@@ -0,0 +1,91 @@
1#ifndef TIME32_H
2#define TIME32_H
3
4#include <sys/types.h>
5
6typedef long time32_t;
7
8struct timeval32 {
9 long tv_sec;
10 long tv_usec;
11};
12
13struct itimerval32 {
14 struct timeval32 it_interval;
15 struct timeval32 it_value;
16};
17
18struct timespec32 {
19 long tv_sec;
20 long tv_nsec;
21};
22
23struct itimerspec32 {
24 struct timespec32 it_interval;
25 struct timespec32 it_value;
26};
27
28int __adjtime32() __asm__("adjtime");
29int __adjtimex_time32() __asm__("adjtimex");
30int __aio_suspend_time32() __asm__("aio_suspend");
31int __clock_adjtime32() __asm__("clock_adjtime");
32int __clock_getres_time32() __asm__("clock_getres");
33int __clock_gettime32() __asm__("clock_gettime");
34int __clock_nanosleep_time32() __asm__("clock_nanosleep");
35int __clock_settime32() __asm__("clock_settime");
36int __cnd_timedwait_time32() __asm__("cnd_timedwait");
37char *__ctime32() __asm__("ctime");
38char *__ctime32_r() __asm__("ctime_r");
39double __difftime32() __asm__("difftime");
40int __fstat_time32() __asm__("fstat");
41int __fstatat_time32() __asm__("fstatat");
42int __ftime32() __asm__("ftime");
43int __futimens_time32() __asm__("futimens");
44int __futimes_time32() __asm__("futimes");
45int __futimesat_time32() __asm__("futimesat");
46int __getitimer_time32() __asm__("getitimer");
47int __getrusage_time32() __asm__("getrusage");
48int __gettimeofday_time32() __asm__("gettimeofday");
49struct tm *__gmtime32() __asm__("gmtime");
50struct tm *__gmtime32_r() __asm__("gmtime_r");
51struct tm *__localtime32() __asm__("localtime");
52struct tm *__localtime32_r() __asm__("localtime_r");
53int __lstat_time32() __asm__("lstat");
54int __lutimes_time32() __asm__("lutimes");
55time32_t __mktime32() __asm__("mktime");
56ssize_t __mq_timedreceive_time32() __asm__("mq_timedreceive");
57int __mq_timedsend_time32() __asm__("mq_timedsend");
58int __mtx_timedlock_time32() __asm__("mtx_timedlock");
59int __nanosleep_time32() __asm__("nanosleep");
60int __ppoll_time32() __asm__("ppoll");
61int __pselect_time32() __asm__("pselect");
62int __pthread_cond_timedwait_time32() __asm__("pthread_cond_timedwait");
63int __pthread_mutex_timedlock_time32() __asm__("pthread_mutex_timedlock");
64int __pthread_rwlock_timedrdlock_time32() __asm__("pthread_rwlock_timedrdlock");
65int __pthread_rwlock_timedwrlock_time32() __asm__("pthread_rwlock_timedwrlock");
66int __pthread_timedjoin_np_time32() __asm__("pthread_timedjoin_np");
67int __recvmmsg_time32() __asm__("recvmmsg");
68int __sched_rr_get_interval_time32() __asm__("sched_rr_get_interval");
69int __select_time32() __asm__("select");
70int __sem_timedwait_time32() __asm__("sem_timedwait");
71int __semtimedop_time32() __asm__("semtimedop");
72int __setitimer_time32() __asm__("setitimer");
73int __settimeofday_time32() __asm__("settimeofday");
74int __sigtimedwait_time32() __asm__("sigtimedwait");
75int __stat_time32() __asm__("stat");
76int __stime32() __asm__("stime");
77int __thrd_sleep_time32() __asm__("thrd_sleep");
78time32_t __time32() __asm__("time");
79time32_t __time32gm() __asm__("timegm");
80int __timer_gettime32() __asm__("timer_gettime");
81int __timer_settime32() __asm__("timer_settime");
82int __timerfd_gettime32() __asm__("timerfd_gettime");
83int __timerfd_settime32() __asm__("timerfd_settime");
84int __timespec_get_time32() __asm__("timespec_get");
85int __utime_time32() __asm__("utime");
86int __utimensat_time32() __asm__("utimensat");
87int __utimes_time32() __asm__("utimes");
88pid_t __wait3_time32() __asm__("wait3");
89pid_t __wait4_time32() __asm__("wait4");
90
91#endif
lib/libc/musl/compat/time32/time32gm.c created+15
...@@ -0,0 +1,15 @@
1#define _GNU_SOURCE
2#include "time32.h"
3#include <time.h>
4#include <errno.h>
5#include <stdint.h>
6
7time32_t __time32gm(struct tm *tm)
8{
9 time_t t = timegm(tm);
10 if (t < INT32_MIN || t > INT32_MAX) {
11 errno = EOVERFLOW;
12 return -1;
13 }
14 return t;
15}
lib/libc/musl/compat/time32/timer_gettime32.c created+15
...@@ -0,0 +1,15 @@
1#include "time32.h"
2#include <time.h>
3
4int __timer_gettime32(timer_t t, struct itimerspec32 *val32)
5{
6 struct itimerspec old;
7 int r = timer_gettime(t, &old);
8 if (r) return r;
9 /* No range checking for consistency with settime */
10 val32->it_interval.tv_sec = old.it_interval.tv_sec;
11 val32->it_interval.tv_nsec = old.it_interval.tv_nsec;
12 val32->it_value.tv_sec = old.it_value.tv_sec;
13 val32->it_value.tv_nsec = old.it_value.tv_nsec;
14 return 0;
15}
lib/libc/musl/compat/time32/timer_settime32.c created+25
...@@ -0,0 +1,25 @@
1#include "time32.h"
2#include <time.h>
3
4int __timer_settime32(timer_t t, int flags, const struct itimerspec32 *restrict val32, struct itimerspec32 *restrict old32)
5{
6 struct itimerspec old;
7 int r = timer_settime(t, flags, (&(struct itimerspec){
8 .it_interval.tv_sec = val32->it_interval.tv_sec,
9 .it_interval.tv_nsec = val32->it_interval.tv_nsec,
10 .it_value.tv_sec = val32->it_value.tv_sec,
11 .it_value.tv_nsec = val32->it_value.tv_nsec}),
12 old32 ? &old : 0);
13 if (r) return r;
14 /* The above call has already committed to success by changing the
15 * timer setting, so we can't fail on out-of-range old value.
16 * Since these are relative times, values large enough to overflow
17 * don't make sense anyway. */
18 if (old32) {
19 old32->it_interval.tv_sec = old.it_interval.tv_sec;
20 old32->it_interval.tv_nsec = old.it_interval.tv_nsec;
21 old32->it_value.tv_sec = old.it_value.tv_sec;
22 old32->it_value.tv_nsec = old.it_value.tv_nsec;
23 }
24 return 0;
25}
lib/libc/musl/compat/time32/timerfd_gettime32.c created+16
...@@ -0,0 +1,16 @@
1#include "time32.h"
2#include <time.h>
3#include <sys/timerfd.h>
4
5int __timerfd_gettime32(int t, struct itimerspec32 *val32)
6{
7 struct itimerspec old;
8 int r = timerfd_gettime(t, &old);
9 if (r) return r;
10 /* No range checking for consistency with settime */
11 val32->it_interval.tv_sec = old.it_interval.tv_sec;
12 val32->it_interval.tv_nsec = old.it_interval.tv_nsec;
13 val32->it_value.tv_sec = old.it_value.tv_sec;
14 val32->it_value.tv_nsec = old.it_value.tv_nsec;
15 return 0;
16}
lib/libc/musl/compat/time32/timerfd_settime32.c created+26
...@@ -0,0 +1,26 @@
1#include "time32.h"
2#include <time.h>
3#include <sys/timerfd.h>
4
5int __timerfd_settime32(int t, int flags, const struct itimerspec32 *restrict val32, struct itimerspec32 *restrict old32)
6{
7 struct itimerspec old;
8 int r = timerfd_settime(t, flags, (&(struct itimerspec){
9 .it_interval.tv_sec = val32->it_interval.tv_sec,
10 .it_interval.tv_nsec = val32->it_interval.tv_nsec,
11 .it_value.tv_sec = val32->it_value.tv_sec,
12 .it_value.tv_nsec = val32->it_value.tv_nsec}),
13 old32 ? &old : 0);
14 if (r) return r;
15 /* The above call has already committed to success by changing the
16 * timer setting, so we can't fail on out-of-range old value.
17 * Since these are relative times, values large enough to overflow
18 * don't make sense anyway. */
19 if (old32) {
20 old32->it_interval.tv_sec = old.it_interval.tv_sec;
21 old32->it_interval.tv_nsec = old.it_interval.tv_nsec;
22 old32->it_value.tv_sec = old.it_value.tv_sec;
23 old32->it_value.tv_nsec = old.it_value.tv_nsec;
24 }
25 return 0;
26}
lib/libc/musl/compat/time32/timespec_get_time32.c created+18
...@@ -0,0 +1,18 @@
1#include "time32.h"
2#include <time.h>
3#include <errno.h>
4#include <stdint.h>
5
6int __timespec_get_time32(struct timespec32 *ts32, int base)
7{
8 struct timespec ts;
9 int r = timespec_get(&ts, base);
10 if (!r) return r;
11 if (ts.tv_sec < INT32_MIN || ts.tv_sec > INT32_MAX) {
12 errno = EOVERFLOW;
13 return 0;
14 }
15 ts32->tv_sec = ts.tv_sec;
16 ts32->tv_nsec = ts.tv_nsec;
17 return r;
18}
lib/libc/musl/compat/time32/utime_time32.c created+14
...@@ -0,0 +1,14 @@
1#include "time32.h"
2#include <time.h>
3#include <utime.h>
4
5struct utimbuf32 {
6 time32_t actime;
7 time32_t modtime;
8};
9
10int __utime_time32(const char *path, const struct utimbuf32 *times32)
11{
12 return utime(path, !times32 ? 0 : (&(struct utimbuf){
13 .actime = times32->actime, .modtime = times32->modtime}));
14}
lib/libc/musl/compat/time32/utimensat_time32.c created+11
...@@ -0,0 +1,11 @@
1#include "time32.h"
2#include <time.h>
3#include <sys/stat.h>
4
5int __utimensat_time32(int fd, const char *path, const struct timespec32 times32[2], int flags)
6{
7 return utimensat(fd, path, !times32 ? 0 : ((struct timespec[2]){
8 {.tv_sec = times32[0].tv_sec,.tv_nsec = times32[0].tv_nsec},
9 {.tv_sec = times32[1].tv_sec,.tv_nsec = times32[1].tv_nsec}}),
10 flags);
11}
lib/libc/musl/compat/time32/utimes_time32.c created+11
...@@ -0,0 +1,11 @@
1#include "time32.h"
2#include <time.h>
3#include <sys/time.h>
4#include <sys/stat.h>
5
6int __utimes_time32(const char *path, const struct timeval32 times32[2])
7{
8 return utimes(path, !times32 ? 0 : ((struct timeval[2]){
9 {.tv_sec = times32[0].tv_sec,.tv_usec = times32[0].tv_usec},
10 {.tv_sec = times32[1].tv_sec,.tv_usec = times32[1].tv_usec}}));
11}
lib/libc/musl/compat/time32/wait3_time32.c created+40
...@@ -0,0 +1,40 @@
1#define _BSD_SOURCE
2#include "time32.h"
3#include <string.h>
4#include <stddef.h>
5#include <sys/wait.h>
6
7struct compat_rusage {
8 struct timeval32 ru_utime;
9 struct timeval32 ru_stime;
10 long ru_maxrss;
11 long ru_ixrss;
12 long ru_idrss;
13 long ru_isrss;
14 long ru_minflt;
15 long ru_majflt;
16 long ru_nswap;
17 long ru_inblock;
18 long ru_oublock;
19 long ru_msgsnd;
20 long ru_msgrcv;
21 long ru_nsignals;
22 long ru_nvcsw;
23 long ru_nivcsw;
24};
25
26pid_t __wait3_time32(int *status, int options, struct compat_rusage *usage)
27{
28 struct rusage ru;
29 int r = wait3(status, options, usage ? &ru : 0);
30 if (!r && usage) {
31 usage->ru_utime.tv_sec = ru.ru_utime.tv_sec;
32 usage->ru_utime.tv_usec = ru.ru_utime.tv_usec;
33 usage->ru_stime.tv_sec = ru.ru_stime.tv_sec;
34 usage->ru_stime.tv_usec = ru.ru_stime.tv_usec;
35 memcpy(&usage->ru_maxrss, &ru.ru_maxrss,
36 sizeof(struct compat_rusage) -
37 offsetof(struct compat_rusage, ru_maxrss));
38 }
39 return r;
40}
lib/libc/musl/compat/time32/wait4_time32.c created+40
...@@ -0,0 +1,40 @@
1#define _BSD_SOURCE
2#include "time32.h"
3#include <string.h>
4#include <stddef.h>
5#include <sys/wait.h>
6
7struct compat_rusage {
8 struct timeval32 ru_utime;
9 struct timeval32 ru_stime;
10 long ru_maxrss;
11 long ru_ixrss;
12 long ru_idrss;
13 long ru_isrss;
14 long ru_minflt;
15 long ru_majflt;
16 long ru_nswap;
17 long ru_inblock;
18 long ru_oublock;
19 long ru_msgsnd;
20 long ru_msgrcv;
21 long ru_nsignals;
22 long ru_nvcsw;
23 long ru_nivcsw;
24};
25
26pid_t __wait4_time32(pid_t pid, int *status, int options, struct compat_rusage *usage)
27{
28 struct rusage ru;
29 int r = wait4(pid, status, options, usage ? &ru : 0);
30 if (!r && usage) {
31 usage->ru_utime.tv_sec = ru.ru_utime.tv_sec;
32 usage->ru_utime.tv_usec = ru.ru_utime.tv_usec;
33 usage->ru_stime.tv_sec = ru.ru_stime.tv_sec;
34 usage->ru_stime.tv_usec = ru.ru_stime.tv_usec;
35 memcpy(&usage->ru_maxrss, &ru.ru_maxrss,
36 sizeof(struct compat_rusage) -
37 offsetof(struct compat_rusage, ru_maxrss));
38 }
39 return r;
40}
lib/libc/musl/include/aio.h+4
...@@ -62,6 +62,10 @@ int lio_listio(int, struct aiocb *__restrict const *__restrict, int, struct sige...@@ -62,6 +62,10 @@ int lio_listio(int, struct aiocb *__restrict const *__restrict, int, struct sige
62#define off64_t off_t62#define off64_t off_t
63#endif63#endif
6464
65#if _REDIR_TIME64
66__REDIR(aio_suspend, __aio_suspend_time64);
67#endif
68
65#ifdef __cplusplus69#ifdef __cplusplus
66}70}
67#endif71#endif
lib/libc/musl/include/alloca.h-2
...@@ -10,9 +10,7 @@ extern "C" {...@@ -10,9 +10,7 @@ extern "C" {
1010
11void *alloca(size_t);11void *alloca(size_t);
1212
13#ifdef __GNUC__
14#define alloca __builtin_alloca13#define alloca __builtin_alloca
15#endif
1614
17#ifdef __cplusplus15#ifdef __cplusplus
18}16}
lib/libc/musl/include/alltypes.h.in+18-1
...@@ -1,3 +1,7 @@...@@ -1,3 +1,7 @@
1#define __LITTLE_ENDIAN 1234
2#define __BIG_ENDIAN 4321
3#define __USE_TIME_BITS64 1
4
1TYPEDEF unsigned _Addr size_t;5TYPEDEF unsigned _Addr size_t;
2TYPEDEF unsigned _Addr uintptr_t;6TYPEDEF unsigned _Addr uintptr_t;
3TYPEDEF _Addr ptrdiff_t;7TYPEDEF _Addr ptrdiff_t;
...@@ -5,6 +9,8 @@ TYPEDEF _Addr ssize_t;...@@ -5,6 +9,8 @@ TYPEDEF _Addr ssize_t;
5TYPEDEF _Addr intptr_t;9TYPEDEF _Addr intptr_t;
6TYPEDEF _Addr regoff_t;10TYPEDEF _Addr regoff_t;
7TYPEDEF _Reg register_t;11TYPEDEF _Reg register_t;
12TYPEDEF _Int64 time_t;
13TYPEDEF _Int64 suseconds_t;
814
9TYPEDEF signed char int8_t;15TYPEDEF signed char int8_t;
10TYPEDEF signed short int16_t;16TYPEDEF signed short int16_t;
...@@ -35,7 +41,7 @@ TYPEDEF void * timer_t;...@@ -35,7 +41,7 @@ TYPEDEF void * timer_t;
35TYPEDEF int clockid_t;41TYPEDEF int clockid_t;
36TYPEDEF long clock_t;42TYPEDEF long clock_t;
37STRUCT timeval { time_t tv_sec; suseconds_t tv_usec; };43STRUCT timeval { time_t tv_sec; suseconds_t tv_usec; };
38STRUCT timespec { time_t tv_sec; long tv_nsec; };44STRUCT timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); };
3945
40TYPEDEF int pid_t;46TYPEDEF int pid_t;
41TYPEDEF unsigned id_t;47TYPEDEF unsigned id_t;
...@@ -60,6 +66,9 @@ TYPEDEF struct { unsigned __attr[2]; } pthread_rwlockattr_t;...@@ -60,6 +66,9 @@ TYPEDEF struct { unsigned __attr[2]; } pthread_rwlockattr_t;
60STRUCT _IO_FILE { char __x; };66STRUCT _IO_FILE { char __x; };
61TYPEDEF struct _IO_FILE FILE;67TYPEDEF struct _IO_FILE FILE;
6268
69TYPEDEF __builtin_va_list va_list;
70TYPEDEF __builtin_va_list __isoc_va_list;
71
63TYPEDEF struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;72TYPEDEF struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
6473
65TYPEDEF struct __locale_struct * locale_t;74TYPEDEF struct __locale_struct * locale_t;
...@@ -71,6 +80,14 @@ STRUCT iovec { void *iov_base; size_t iov_len; };...@@ -71,6 +80,14 @@ STRUCT iovec { void *iov_base; size_t iov_len; };
71TYPEDEF unsigned socklen_t;80TYPEDEF unsigned socklen_t;
72TYPEDEF unsigned short sa_family_t;81TYPEDEF unsigned short sa_family_t;
7382
83TYPEDEF struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
84TYPEDEF struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t;
85TYPEDEF struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t;
86TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t;
87TYPEDEF struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t;
88TYPEDEF struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t;
89TYPEDEF struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t;
90
74#undef _Addr91#undef _Addr
75#undef _Int6492#undef _Int64
76#undef _Reg93#undef _Reg
lib/libc/musl/include/arpa/nameser.h-1
...@@ -7,7 +7,6 @@ extern "C" {...@@ -7,7 +7,6 @@ extern "C" {
77
8#include <stddef.h>8#include <stddef.h>
9#include <stdint.h>9#include <stdint.h>
10#include <endian.h>
1110
12#define __NAMESER 1999100611#define __NAMESER 19991006
13#define NS_PACKETSZ 51212#define NS_PACKETSZ 512
lib/libc/musl/include/dirent.h+2-12
...@@ -15,19 +15,9 @@ extern "C" {...@@ -15,19 +15,9 @@ extern "C" {
1515
16#include <bits/alltypes.h>16#include <bits/alltypes.h>
1717
18typedef struct __dirstream DIR;18#include <bits/dirent.h>
19
20#define _DIRENT_HAVE_D_RECLEN
21#define _DIRENT_HAVE_D_OFF
22#define _DIRENT_HAVE_D_TYPE
2319
24struct dirent {20typedef struct __dirstream DIR;
25 ino_t d_ino;
26 off_t d_off;
27 unsigned short d_reclen;
28 unsigned char d_type;
29 char d_name[256];
30};
3121
32#define d_fileno d_ino22#define d_fileno d_ino
3323
lib/libc/musl/include/dlfcn.h+4
...@@ -35,6 +35,10 @@ int dladdr(const void *, Dl_info *);...@@ -35,6 +35,10 @@ int dladdr(const void *, Dl_info *);
35int dlinfo(void *, int, void *);35int dlinfo(void *, int, void *);
36#endif36#endif
3737
38#if _REDIR_TIME64
39__REDIR(dlsym, __dlsym_time64);
40#endif
41
38#ifdef __cplusplus42#ifdef __cplusplus
39}43}
40#endif44#endif
lib/libc/musl/include/endian.h+21-23
...@@ -3,25 +3,19 @@...@@ -3,25 +3,19 @@
33
4#include <features.h>4#include <features.h>
55
6#define __LITTLE_ENDIAN 12346#define __NEED_uint16_t
7#define __BIG_ENDIAN 43217#define __NEED_uint32_t
8#define __PDP_ENDIAN 34128#define __NEED_uint64_t
99
10#if defined(__GNUC__) && defined(__BYTE_ORDER__)10#include <bits/alltypes.h>
11#define __BYTE_ORDER __BYTE_ORDER__
12#else
13#include <bits/endian.h>
14#endif
1511
16#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)12#define __PDP_ENDIAN 3412
1713
18#define BIG_ENDIAN __BIG_ENDIAN14#define BIG_ENDIAN __BIG_ENDIAN
19#define LITTLE_ENDIAN __LITTLE_ENDIAN15#define LITTLE_ENDIAN __LITTLE_ENDIAN
20#define PDP_ENDIAN __PDP_ENDIAN16#define PDP_ENDIAN __PDP_ENDIAN
21#define BYTE_ORDER __BYTE_ORDER17#define BYTE_ORDER __BYTE_ORDER
2218
23#include <stdint.h>
24
25static __inline uint16_t __bswap16(uint16_t __x)19static __inline uint16_t __bswap16(uint16_t __x)
26{20{
27 return __x<<8 | __x>>8;21 return __x<<8 | __x>>8;
...@@ -40,43 +34,47 @@ static __inline uint64_t __bswap64(uint64_t __x)...@@ -40,43 +34,47 @@ static __inline uint64_t __bswap64(uint64_t __x)
40#if __BYTE_ORDER == __LITTLE_ENDIAN34#if __BYTE_ORDER == __LITTLE_ENDIAN
41#define htobe16(x) __bswap16(x)35#define htobe16(x) __bswap16(x)
42#define be16toh(x) __bswap16(x)36#define be16toh(x) __bswap16(x)
43#define betoh16(x) __bswap16(x)
44#define htobe32(x) __bswap32(x)37#define htobe32(x) __bswap32(x)
45#define be32toh(x) __bswap32(x)38#define be32toh(x) __bswap32(x)
46#define betoh32(x) __bswap32(x)
47#define htobe64(x) __bswap64(x)39#define htobe64(x) __bswap64(x)
48#define be64toh(x) __bswap64(x)40#define be64toh(x) __bswap64(x)
49#define betoh64(x) __bswap64(x)
50#define htole16(x) (uint16_t)(x)41#define htole16(x) (uint16_t)(x)
51#define le16toh(x) (uint16_t)(x)42#define le16toh(x) (uint16_t)(x)
52#define letoh16(x) (uint16_t)(x)
53#define htole32(x) (uint32_t)(x)43#define htole32(x) (uint32_t)(x)
54#define le32toh(x) (uint32_t)(x)44#define le32toh(x) (uint32_t)(x)
55#define letoh32(x) (uint32_t)(x)
56#define htole64(x) (uint64_t)(x)45#define htole64(x) (uint64_t)(x)
57#define le64toh(x) (uint64_t)(x)46#define le64toh(x) (uint64_t)(x)
58#define letoh64(x) (uint64_t)(x)
59#else47#else
60#define htobe16(x) (uint16_t)(x)48#define htobe16(x) (uint16_t)(x)
61#define be16toh(x) (uint16_t)(x)49#define be16toh(x) (uint16_t)(x)
62#define betoh16(x) (uint16_t)(x)
63#define htobe32(x) (uint32_t)(x)50#define htobe32(x) (uint32_t)(x)
64#define be32toh(x) (uint32_t)(x)51#define be32toh(x) (uint32_t)(x)
65#define betoh32(x) (uint32_t)(x)
66#define htobe64(x) (uint64_t)(x)52#define htobe64(x) (uint64_t)(x)
67#define be64toh(x) (uint64_t)(x)53#define be64toh(x) (uint64_t)(x)
68#define betoh64(x) (uint64_t)(x)
69#define htole16(x) __bswap16(x)54#define htole16(x) __bswap16(x)
70#define le16toh(x) __bswap16(x)55#define le16toh(x) __bswap16(x)
71#define letoh16(x) __bswap16(x)
72#define htole32(x) __bswap32(x)56#define htole32(x) __bswap32(x)
73#define le32toh(x) __bswap32(x)57#define le32toh(x) __bswap32(x)
74#define letoh32(x) __bswap32(x)
75#define htole64(x) __bswap64(x)58#define htole64(x) __bswap64(x)
76#define le64toh(x) __bswap64(x)59#define le64toh(x) __bswap64(x)
77#define letoh64(x) __bswap64(x)
78#endif60#endif
7961
62#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
63#if __BYTE_ORDER == __LITTLE_ENDIAN
64#define betoh16(x) __bswap16(x)
65#define betoh32(x) __bswap32(x)
66#define betoh64(x) __bswap64(x)
67#define letoh16(x) (uint16_t)(x)
68#define letoh32(x) (uint32_t)(x)
69#define letoh64(x) (uint64_t)(x)
70#else
71#define betoh16(x) (uint16_t)(x)
72#define betoh32(x) (uint32_t)(x)
73#define betoh64(x) (uint64_t)(x)
74#define letoh16(x) __bswap16(x)
75#define letoh32(x) __bswap32(x)
76#define letoh64(x) __bswap64(x)
77#endif
80#endif78#endif
8179
82#endif80#endif
lib/libc/musl/include/features.h+2
...@@ -35,4 +35,6 @@...@@ -35,4 +35,6 @@
35#define _Noreturn35#define _Noreturn
36#endif36#endif
3737
38#define __REDIR(x,y) __typeof__(x) x __asm__(#y)
39
38#endif40#endif
lib/libc/musl/include/limits.h+13-5
...@@ -3,9 +3,7 @@...@@ -3,9 +3,7 @@
33
4#include <features.h>4#include <features.h>
55
6/* Most limits are system-specific */6#include <bits/alltypes.h> /* __LONG_MAX */
7
8#include <bits/limits.h>
97
10/* Support signed or unsigned plain-char */8/* Support signed or unsigned plain-char */
119
...@@ -17,8 +15,6 @@...@@ -17,8 +15,6 @@
17#define CHAR_MAX 12715#define CHAR_MAX 127
18#endif16#endif
1917
20/* Some universal constants... */
21
22#define CHAR_BIT 818#define CHAR_BIT 8
23#define SCHAR_MIN (-128)19#define SCHAR_MIN (-128)
24#define SCHAR_MAX 12720#define SCHAR_MAX 127
...@@ -30,8 +26,10 @@...@@ -30,8 +26,10 @@
30#define INT_MAX 0x7fffffff26#define INT_MAX 0x7fffffff
31#define UINT_MAX 0xffffffffU27#define UINT_MAX 0xffffffffU
32#define LONG_MIN (-LONG_MAX-1)28#define LONG_MIN (-LONG_MAX-1)
29#define LONG_MAX __LONG_MAX
33#define ULONG_MAX (2UL*LONG_MAX+1)30#define ULONG_MAX (2UL*LONG_MAX+1)
34#define LLONG_MIN (-LLONG_MAX-1)31#define LLONG_MIN (-LLONG_MAX-1)
32#define LLONG_MAX 0x7fffffffffffffffLL
35#define ULLONG_MAX (2ULL*LLONG_MAX+1)33#define ULLONG_MAX (2ULL*LLONG_MAX+1)
3634
37#define MB_LEN_MAX 435#define MB_LEN_MAX 4
...@@ -39,9 +37,13 @@...@@ -39,9 +37,13 @@
39#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \37#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
40 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)38 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
4139
40#include <bits/limits.h>
41
42#define PIPE_BUF 409642#define PIPE_BUF 4096
43#define FILESIZEBITS 6443#define FILESIZEBITS 64
44#ifndef NAME_MAX
44#define NAME_MAX 25545#define NAME_MAX 255
46#endif
45#define PATH_MAX 409647#define PATH_MAX 4096
46#define NGROUPS_MAX 3248#define NGROUPS_MAX 32
47#define ARG_MAX 13107249#define ARG_MAX 131072
...@@ -53,6 +55,12 @@...@@ -53,6 +55,12 @@
53#define TTY_NAME_MAX 3255#define TTY_NAME_MAX 32
54#define HOST_NAME_MAX 25556#define HOST_NAME_MAX 255
5557
58#if LONG_MAX == 0x7fffffffL
59#define LONG_BIT 32
60#else
61#define LONG_BIT 64
62#endif
63
56/* Implementation choices... */64/* Implementation choices... */
5765
58#define PTHREAD_KEYS_MAX 12866#define PTHREAD_KEYS_MAX 128
lib/libc/musl/include/mqueue.h+5
...@@ -30,6 +30,11 @@ ssize_t mq_timedreceive(mqd_t, char *__restrict, size_t, unsigned *__restrict, c...@@ -30,6 +30,11 @@ ssize_t mq_timedreceive(mqd_t, char *__restrict, size_t, unsigned *__restrict, c
30int mq_timedsend(mqd_t, const char *, size_t, unsigned, const struct timespec *);30int mq_timedsend(mqd_t, const char *, size_t, unsigned, const struct timespec *);
31int mq_unlink(const char *);31int mq_unlink(const char *);
3232
33#if _REDIR_TIME64
34__REDIR(mq_timedreceive, __mq_timedreceive_time64);
35__REDIR(mq_timedsend, __mq_timedsend_time64);
36#endif
37
33#ifdef __cplusplus38#ifdef __cplusplus
34}39}
35#endif40#endif
lib/libc/musl/include/netinet/icmp6.h-1
...@@ -9,7 +9,6 @@ extern "C" {...@@ -9,7 +9,6 @@ extern "C" {
9#include <string.h>9#include <string.h>
10#include <sys/types.h>10#include <sys/types.h>
11#include <netinet/in.h>11#include <netinet/in.h>
12#include <endian.h>
1312
14#define ICMP6_FILTER 113#define ICMP6_FILTER 1
1514
lib/libc/musl/include/netinet/if_ether.h+1
...@@ -58,6 +58,7 @@...@@ -58,6 +58,7 @@
58#define ETH_P_ERSPAN 0x88BE58#define ETH_P_ERSPAN 0x88BE
59#define ETH_P_PREAUTH 0x88C759#define ETH_P_PREAUTH 0x88C7
60#define ETH_P_TIPC 0x88CA60#define ETH_P_TIPC 0x88CA
61#define ETH_P_LLDP 0x88CC
61#define ETH_P_MACSEC 0x88E562#define ETH_P_MACSEC 0x88E5
62#define ETH_P_8021AH 0x88E763#define ETH_P_8021AH 0x88E7
63#define ETH_P_MVRP 0x88F564#define ETH_P_MVRP 0x88F5
lib/libc/musl/include/netinet/ip.h+2-1
...@@ -7,7 +7,6 @@ extern "C" {...@@ -7,7 +7,6 @@ extern "C" {
77
8#include <stdint.h>8#include <stdint.h>
9#include <netinet/in.h>9#include <netinet/in.h>
10#include <endian.h>
1110
12struct timestamp {11struct timestamp {
13 uint8_t len;12 uint8_t len;
...@@ -191,6 +190,8 @@ struct ip_timestamp {...@@ -191,6 +190,8 @@ struct ip_timestamp {
191190
192#define IP_MSS 576191#define IP_MSS 576
193192
193#define __UAPI_DEF_IPHDR 0
194
194#ifdef __cplusplus195#ifdef __cplusplus
195}196}
196#endif197#endif
lib/libc/musl/include/netinet/ip6.h-1
...@@ -7,7 +7,6 @@ extern "C" {...@@ -7,7 +7,6 @@ extern "C" {
77
8#include <stdint.h>8#include <stdint.h>
9#include <netinet/in.h>9#include <netinet/in.h>
10#include <endian.h>
1110
12struct ip6_hdr {11struct ip6_hdr {
13 union {12 union {
lib/libc/musl/include/netinet/tcp.h+3-1
...@@ -38,6 +38,7 @@...@@ -38,6 +38,7 @@
38#define TCP_FASTOPEN_NO_COOKIE 3438#define TCP_FASTOPEN_NO_COOKIE 34
39#define TCP_ZEROCOPY_RECEIVE 3539#define TCP_ZEROCOPY_RECEIVE 35
40#define TCP_INQ 3640#define TCP_INQ 36
41#define TCP_TX_DELAY 37
4142
42#define TCP_CM_INQ TCP_INQ43#define TCP_CM_INQ TCP_INQ
4344
...@@ -97,7 +98,6 @@ enum {...@@ -97,7 +98,6 @@ enum {
97#include <sys/types.h>98#include <sys/types.h>
98#include <sys/socket.h>99#include <sys/socket.h>
99#include <stdint.h>100#include <stdint.h>
100#include <endian.h>
101101
102typedef uint32_t tcp_seq;102typedef uint32_t tcp_seq;
103103
...@@ -234,6 +234,8 @@ struct tcp_info {...@@ -234,6 +234,8 @@ struct tcp_info {
234 uint64_t tcpi_bytes_retrans;234 uint64_t tcpi_bytes_retrans;
235 uint32_t tcpi_dsack_dups;235 uint32_t tcpi_dsack_dups;
236 uint32_t tcpi_reord_seen;236 uint32_t tcpi_reord_seen;
237 uint32_t tcpi_rcv_ooopack;
238 uint32_t tcpi_snd_wnd;
237};239};
238240
239#define TCP_MD5SIG_MAXKEYLEN 80241#define TCP_MD5SIG_MAXKEYLEN 80
lib/libc/musl/include/poll.h+6
...@@ -44,6 +44,12 @@ int poll (struct pollfd *, nfds_t, int);...@@ -44,6 +44,12 @@ int poll (struct pollfd *, nfds_t, int);
44int ppoll(struct pollfd *, nfds_t, const struct timespec *, const sigset_t *);44int ppoll(struct pollfd *, nfds_t, const struct timespec *, const sigset_t *);
45#endif45#endif
4646
47#if _REDIR_TIME64
48#ifdef _GNU_SOURCE
49__REDIR(ppoll, __ppoll_time64);
50#endif
51#endif
52
47#ifdef __cplusplus53#ifdef __cplusplus
48}54}
49#endif55#endif
lib/libc/musl/include/pthread.h+10
...@@ -224,6 +224,16 @@ int pthread_tryjoin_np(pthread_t, void **);...@@ -224,6 +224,16 @@ int pthread_tryjoin_np(pthread_t, void **);
224int pthread_timedjoin_np(pthread_t, void **, const struct timespec *);224int pthread_timedjoin_np(pthread_t, void **, const struct timespec *);
225#endif225#endif
226226
227#if _REDIR_TIME64
228__REDIR(pthread_mutex_timedlock, __pthread_mutex_timedlock_time64);
229__REDIR(pthread_cond_timedwait, __pthread_cond_timedwait_time64);
230__REDIR(pthread_rwlock_timedrdlock, __pthread_rwlock_timedrdlock_time64);
231__REDIR(pthread_rwlock_timedwrlock, __pthread_rwlock_timedwrlock_time64);
232#ifdef _GNU_SOURCE
233__REDIR(pthread_timedjoin_np, __pthread_timedjoin_np_time64);
234#endif
235#endif
236
227#ifdef __cplusplus237#ifdef __cplusplus
228}238}
229#endif239#endif
lib/libc/musl/include/sched.h+8
...@@ -19,10 +19,14 @@ extern "C" {...@@ -19,10 +19,14 @@ extern "C" {
19struct sched_param {19struct sched_param {
20 int sched_priority;20 int sched_priority;
21 int __reserved1;21 int __reserved1;
22#if _REDIR_TIME64
23 long __reserved2[4];
24#else
22 struct {25 struct {
23 time_t __reserved1;26 time_t __reserved1;
24 long __reserved2;27 long __reserved2;
25 } __reserved2[2];28 } __reserved2[2];
29#endif
26 int __reserved3;30 int __reserved3;
27};31};
2832
...@@ -133,6 +137,10 @@ __CPU_op_func_S(XOR, ^)...@@ -133,6 +137,10 @@ __CPU_op_func_S(XOR, ^)
133137
134#endif138#endif
135139
140#if _REDIR_TIME64
141__REDIR(sched_rr_get_interval, __sched_rr_get_interval_time64);
142#endif
143
136#ifdef __cplusplus144#ifdef __cplusplus
137}145}
138#endif146#endif
lib/libc/musl/include/semaphore.h+4
...@@ -29,6 +29,10 @@ int sem_trywait(sem_t *);...@@ -29,6 +29,10 @@ int sem_trywait(sem_t *);
29int sem_unlink(const char *);29int sem_unlink(const char *);
30int sem_wait(sem_t *);30int sem_wait(sem_t *);
3131
32#if _REDIR_TIME64
33__REDIR(sem_timedwait, __sem_timedwait_time64);
34#endif
35
32#ifdef __cplusplus36#ifdef __cplusplus
33}37}
34#endif38#endif
lib/libc/musl/include/signal.h+8
...@@ -271,6 +271,14 @@ typedef int sig_atomic_t;...@@ -271,6 +271,14 @@ typedef int sig_atomic_t;
271void (*signal(int, void (*)(int)))(int);271void (*signal(int, void (*)(int)))(int);
272int raise(int);272int raise(int);
273273
274#if _REDIR_TIME64
275#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
276 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
277 || defined(_BSD_SOURCE)
278__REDIR(sigtimedwait, __sigtimedwait_time64);
279#endif
280#endif
281
274#ifdef __cplusplus282#ifdef __cplusplus
275}283}
276#endif284#endif
lib/libc/musl/include/sys/acct.h-1
...@@ -6,7 +6,6 @@ extern "C" {...@@ -6,7 +6,6 @@ extern "C" {
6#endif6#endif
77
8#include <features.h>8#include <features.h>
9#include <endian.h>
10#include <time.h>9#include <time.h>
11#include <stdint.h>10#include <stdint.h>
1211
lib/libc/musl/include/sys/ioctl.h+1
...@@ -4,6 +4,7 @@...@@ -4,6 +4,7 @@
4extern "C" {4extern "C" {
5#endif5#endif
66
7#include <bits/alltypes.h>
7#include <bits/ioctl.h>8#include <bits/ioctl.h>
89
9#define N_TTY 010#define N_TTY 0
lib/libc/musl/include/sys/mman.h+2
...@@ -92,6 +92,8 @@ extern "C" {...@@ -92,6 +92,8 @@ extern "C" {
92#define MADV_DODUMP 1792#define MADV_DODUMP 17
93#define MADV_WIPEONFORK 1893#define MADV_WIPEONFORK 18
94#define MADV_KEEPONFORK 1994#define MADV_KEEPONFORK 19
95#define MADV_COLD 20
96#define MADV_PAGEOUT 21
95#define MADV_HWPOISON 10097#define MADV_HWPOISON 100
96#define MADV_SOFT_OFFLINE 10198#define MADV_SOFT_OFFLINE 101
97#endif99#endif
lib/libc/musl/include/sys/prctl.h+4
...@@ -154,6 +154,10 @@ struct prctl_mm_map {...@@ -154,6 +154,10 @@ struct prctl_mm_map {
154#define PR_PAC_APDBKEY (1UL << 3)154#define PR_PAC_APDBKEY (1UL << 3)
155#define PR_PAC_APGAKEY (1UL << 4)155#define PR_PAC_APGAKEY (1UL << 4)
156156
157#define PR_SET_TAGGED_ADDR_CTRL 55
158#define PR_GET_TAGGED_ADDR_CTRL 56
159#define PR_TAGGED_ADDR_ENABLE (1UL << 0)
160
157int prctl (int, ...);161int prctl (int, ...);
158162
159#ifdef __cplusplus163#ifdef __cplusplus
lib/libc/musl/include/sys/procfs.h+3-4
...@@ -23,10 +23,9 @@ struct elf_prstatus {...@@ -23,10 +23,9 @@ struct elf_prstatus {
23 pid_t pr_ppid;23 pid_t pr_ppid;
24 pid_t pr_pgrp;24 pid_t pr_pgrp;
25 pid_t pr_sid;25 pid_t pr_sid;
26 struct timeval pr_utime;26 struct {
27 struct timeval pr_stime;27 long tv_sec, tv_usec;
28 struct timeval pr_cutime;28 } pr_utime, pr_stime, pr_cutime, pr_cstime;
29 struct timeval pr_cstime;
30 elf_gregset_t pr_reg;29 elf_gregset_t pr_reg;
31 int pr_fpvalid;30 int pr_fpvalid;
32};31};
lib/libc/musl/include/sys/ptrace.h+29
...@@ -41,6 +41,7 @@ extern "C" {...@@ -41,6 +41,7 @@ extern "C" {
41#define PTRACE_SETSIGMASK 0x420b41#define PTRACE_SETSIGMASK 0x420b
42#define PTRACE_SECCOMP_GET_FILTER 0x420c42#define PTRACE_SECCOMP_GET_FILTER 0x420c
43#define PTRACE_SECCOMP_GET_METADATA 0x420d43#define PTRACE_SECCOMP_GET_METADATA 0x420d
44#define PTRACE_GET_SYSCALL_INFO 0x420e
4445
45#define PT_READ_I PTRACE_PEEKTEXT46#define PT_READ_I PTRACE_PEEKTEXT
46#define PT_READ_D PTRACE_PEEKDATA47#define PT_READ_D PTRACE_PEEKDATA
...@@ -88,6 +89,11 @@ extern "C" {...@@ -88,6 +89,11 @@ extern "C" {
8889
89#define PTRACE_PEEKSIGINFO_SHARED 190#define PTRACE_PEEKSIGINFO_SHARED 1
9091
92#define PTRACE_SYSCALL_INFO_NONE 0
93#define PTRACE_SYSCALL_INFO_ENTRY 1
94#define PTRACE_SYSCALL_INFO_EXIT 2
95#define PTRACE_SYSCALL_INFO_SECCOMP 3
96
91#include <bits/ptrace.h>97#include <bits/ptrace.h>
9298
93struct __ptrace_peeksiginfo_args {99struct __ptrace_peeksiginfo_args {
...@@ -101,6 +107,29 @@ struct __ptrace_seccomp_metadata {...@@ -101,6 +107,29 @@ struct __ptrace_seccomp_metadata {
101 uint64_t flags;107 uint64_t flags;
102};108};
103109
110struct __ptrace_syscall_info {
111 uint8_t op;
112 uint8_t __pad[3];
113 uint32_t arch;
114 uint64_t instruction_pointer;
115 uint64_t stack_pointer;
116 union {
117 struct {
118 uint64_t nr;
119 uint64_t args[6];
120 } entry;
121 struct {
122 int64_t rval;
123 uint8_t is_error;
124 } exit;
125 struct {
126 uint64_t nr;
127 uint64_t args[6];
128 uint32_t ret_data;
129 } seccomp;
130 };
131};
132
104long ptrace(int, ...);133long ptrace(int, ...);
105134
106#ifdef __cplusplus135#ifdef __cplusplus
lib/libc/musl/include/sys/resource.h+6-1
...@@ -90,7 +90,8 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);...@@ -90,7 +90,8 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
90#define RLIMIT_MSGQUEUE 1290#define RLIMIT_MSGQUEUE 12
91#define RLIMIT_NICE 1391#define RLIMIT_NICE 13
92#define RLIMIT_RTPRIO 1492#define RLIMIT_RTPRIO 14
93#define RLIMIT_NLIMITS 1593#define RLIMIT_RTTIME 15
94#define RLIMIT_NLIMITS 16
9495
95#define RLIM_NLIMITS RLIMIT_NLIMITS96#define RLIM_NLIMITS RLIMIT_NLIMITS
9697
...@@ -104,6 +105,10 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);...@@ -104,6 +105,10 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
104#define rlim64_t rlim_t105#define rlim64_t rlim_t
105#endif106#endif
106107
108#if _REDIR_TIME64
109__REDIR(getrusage, __getrusage_time64);
110#endif
111
107#ifdef __cplusplus112#ifdef __cplusplus
108}113}
109#endif114#endif
lib/libc/musl/include/sys/select.h+5
...@@ -35,6 +35,11 @@ int pselect (int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict, co...@@ -35,6 +35,11 @@ int pselect (int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict, co
35#define NFDBITS (8*(int)sizeof(long))35#define NFDBITS (8*(int)sizeof(long))
36#endif36#endif
3737
38#if _REDIR_TIME64
39__REDIR(select, __select_time64);
40__REDIR(pselect, __pselect_time64);
41#endif
42
38#ifdef __cplusplus43#ifdef __cplusplus
39}44}
40#endif45#endif
lib/libc/musl/include/sys/sem.h+6-2
...@@ -25,8 +25,6 @@ extern "C" {...@@ -25,8 +25,6 @@ extern "C" {
25#define SETVAL 1625#define SETVAL 16
26#define SETALL 1726#define SETALL 17
2727
28#include <endian.h>
29
30#include <bits/sem.h>28#include <bits/sem.h>
3129
32#define _SEM_SEMUN_UNDEFINED 130#define _SEM_SEMUN_UNDEFINED 1
...@@ -62,6 +60,12 @@ int semop(int, struct sembuf *, size_t);...@@ -62,6 +60,12 @@ int semop(int, struct sembuf *, size_t);
62int semtimedop(int, struct sembuf *, size_t, const struct timespec *);60int semtimedop(int, struct sembuf *, size_t, const struct timespec *);
63#endif61#endif
6462
63#if _REDIR_TIME64
64#ifdef _GNU_SOURCE
65__REDIR(semtimedop, __semtimedop_time64);
66#endif
67#endif
68
65#ifdef __cplusplus69#ifdef __cplusplus
66}70}
67#endif71#endif
lib/libc/musl/include/sys/socket.h+63-6
...@@ -19,6 +19,40 @@ extern "C" {...@@ -19,6 +19,40 @@ extern "C" {
1919
20#include <bits/socket.h>20#include <bits/socket.h>
2121
22struct msghdr {
23 void *msg_name;
24 socklen_t msg_namelen;
25 struct iovec *msg_iov;
26#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
27 int __pad1;
28#endif
29 int msg_iovlen;
30#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
31 int __pad1;
32#endif
33 void *msg_control;
34#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
35 int __pad2;
36#endif
37 socklen_t msg_controllen;
38#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
39 int __pad2;
40#endif
41 int msg_flags;
42};
43
44struct cmsghdr {
45#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __BIG_ENDIAN
46 int __pad1;
47#endif
48 socklen_t cmsg_len;
49#if __LONG_MAX > 0x7fffffff && __BYTE_ORDER == __LITTLE_ENDIAN
50 int __pad1;
51#endif
52 int cmsg_level;
53 int cmsg_type;
54};
55
22#ifdef _GNU_SOURCE56#ifdef _GNU_SOURCE
23struct ucred {57struct ucred {
24 pid_t pid;58 pid_t pid;
...@@ -182,8 +216,6 @@ struct linger {...@@ -182,8 +216,6 @@ struct linger {
182#define SO_PEERCRED 17216#define SO_PEERCRED 17
183#define SO_RCVLOWAT 18217#define SO_RCVLOWAT 18
184#define SO_SNDLOWAT 19218#define SO_SNDLOWAT 19
185#define SO_RCVTIMEO 20
186#define SO_SNDTIMEO 21
187#define SO_ACCEPTCONN 30219#define SO_ACCEPTCONN 30
188#define SO_PEERSEC 31220#define SO_PEERSEC 31
189#define SO_SNDBUFFORCE 32221#define SO_SNDBUFFORCE 32
...@@ -192,6 +224,28 @@ struct linger {...@@ -192,6 +224,28 @@ struct linger {
192#define SO_DOMAIN 39224#define SO_DOMAIN 39
193#endif225#endif
194226
227#ifndef SO_RCVTIMEO
228#if __LONG_MAX == 0x7fffffff
229#define SO_RCVTIMEO 66
230#define SO_SNDTIMEO 67
231#else
232#define SO_RCVTIMEO 20
233#define SO_SNDTIMEO 21
234#endif
235#endif
236
237#ifndef SO_TIMESTAMP
238#if __LONG_MAX == 0x7fffffff
239#define SO_TIMESTAMP 63
240#define SO_TIMESTAMPNS 64
241#define SO_TIMESTAMPING 65
242#else
243#define SO_TIMESTAMP 29
244#define SO_TIMESTAMPNS 35
245#define SO_TIMESTAMPING 37
246#endif
247#endif
248
195#define SO_SECURITY_AUTHENTICATION 22249#define SO_SECURITY_AUTHENTICATION 22
196#define SO_SECURITY_ENCRYPTION_TRANSPORT 23250#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
197#define SO_SECURITY_ENCRYPTION_NETWORK 24251#define SO_SECURITY_ENCRYPTION_NETWORK 24
...@@ -203,14 +257,10 @@ struct linger {...@@ -203,14 +257,10 @@ struct linger {
203#define SO_GET_FILTER SO_ATTACH_FILTER257#define SO_GET_FILTER SO_ATTACH_FILTER
204258
205#define SO_PEERNAME 28259#define SO_PEERNAME 28
206#define SO_TIMESTAMP 29
207#define SCM_TIMESTAMP SO_TIMESTAMP260#define SCM_TIMESTAMP SO_TIMESTAMP
208
209#define SO_PASSSEC 34261#define SO_PASSSEC 34
210#define SO_TIMESTAMPNS 35
211#define SCM_TIMESTAMPNS SO_TIMESTAMPNS262#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
212#define SO_MARK 36263#define SO_MARK 36
213#define SO_TIMESTAMPING 37
214#define SCM_TIMESTAMPING SO_TIMESTAMPING264#define SCM_TIMESTAMPING SO_TIMESTAMPING
215#define SO_RXQ_OVFL 40265#define SO_RXQ_OVFL 40
216#define SO_WIFI_STATUS 41266#define SO_WIFI_STATUS 41
...@@ -238,6 +288,7 @@ struct linger {...@@ -238,6 +288,7 @@ struct linger {
238#define SO_TXTIME 61288#define SO_TXTIME 61
239#define SCM_TXTIME SO_TXTIME289#define SCM_TXTIME SO_TXTIME
240#define SO_BINDTOIFINDEX 62290#define SO_BINDTOIFINDEX 62
291#define SO_DETACH_REUSEPORT_BPF 68
241292
242#ifndef SOL_SOCKET293#ifndef SOL_SOCKET
243#define SOL_SOCKET 1294#define SOL_SOCKET 1
...@@ -350,6 +401,12 @@ int setsockopt (int, int, int, const void *, socklen_t);...@@ -350,6 +401,12 @@ int setsockopt (int, int, int, const void *, socklen_t);
350401
351int sockatmark (int);402int sockatmark (int);
352403
404#if _REDIR_TIME64
405#ifdef _GNU_SOURCE
406__REDIR(recvmmsg, __recvmmsg_time64);
407#endif
408#endif
409
353#ifdef __cplusplus410#ifdef __cplusplus
354}411}
355#endif412#endif
lib/libc/musl/include/sys/stat.h+9
...@@ -110,6 +110,15 @@ int lchmod(const char *, mode_t);...@@ -110,6 +110,15 @@ int lchmod(const char *, mode_t);
110#define off64_t off_t110#define off64_t off_t
111#endif111#endif
112112
113#if _REDIR_TIME64
114__REDIR(stat, __stat_time64);
115__REDIR(fstat, __fstat_time64);
116__REDIR(lstat, __lstat_time64);
117__REDIR(fstatat, __fstatat_time64);
118__REDIR(futimens, __futimens_time64);
119__REDIR(utimensat, __utimensat_time64);
120#endif
121
113#ifdef __cplusplus122#ifdef __cplusplus
114}123}
115#endif124#endif
lib/libc/musl/include/sys/statvfs.h-2
...@@ -11,8 +11,6 @@ extern "C" {...@@ -11,8 +11,6 @@ extern "C" {
11#define __NEED_fsfilcnt_t11#define __NEED_fsfilcnt_t
12#include <bits/alltypes.h>12#include <bits/alltypes.h>
1313
14#include <endian.h>
15
16struct statvfs {14struct statvfs {
17 unsigned long f_bsize, f_frsize;15 unsigned long f_bsize, f_frsize;
18 fsblkcnt_t f_blocks, f_bfree, f_bavail;16 fsblkcnt_t f_blocks, f_bfree, f_bavail;
lib/libc/musl/include/sys/time.h+14
...@@ -56,6 +56,20 @@ int adjtime (const struct timeval *, struct timeval *);...@@ -56,6 +56,20 @@ int adjtime (const struct timeval *, struct timeval *);
56 (void)0 )56 (void)0 )
57#endif57#endif
5858
59#if _REDIR_TIME64
60__REDIR(gettimeofday, __gettimeofday_time64);
61__REDIR(getitimer, __getitimer_time64);
62__REDIR(setitimer, __setitimer_time64);
63__REDIR(utimes, __utimes_time64);
64#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
65__REDIR(futimes, __futimes_time64);
66__REDIR(futimesat, __futimesat_time64);
67__REDIR(lutimes, __lutimes_time64);
68__REDIR(settimeofday, __settimeofday_time64);
69__REDIR(adjtime, __adjtime64);
70#endif
71#endif
72
59#ifdef __cplusplus73#ifdef __cplusplus
60}74}
61#endif75#endif
lib/libc/musl/include/sys/timeb.h+6
...@@ -4,6 +4,8 @@...@@ -4,6 +4,8 @@
4extern "C" {4extern "C" {
5#endif5#endif
66
7#include <features.h>
8
7#define __NEED_time_t9#define __NEED_time_t
810
9#include <bits/alltypes.h>11#include <bits/alltypes.h>
...@@ -16,6 +18,10 @@ struct timeb {...@@ -16,6 +18,10 @@ struct timeb {
1618
17int ftime(struct timeb *);19int ftime(struct timeb *);
1820
21#if _REDIR_TIME64
22__REDIR(ftime, __ftime64);
23#endif
24
19#ifdef __cplusplus25#ifdef __cplusplus
20}26}
21#endif27#endif
lib/libc/musl/include/sys/timerfd.h+5
...@@ -20,6 +20,11 @@ int timerfd_create(int, int);...@@ -20,6 +20,11 @@ int timerfd_create(int, int);
20int timerfd_settime(int, int, const struct itimerspec *, struct itimerspec *);20int timerfd_settime(int, int, const struct itimerspec *, struct itimerspec *);
21int timerfd_gettime(int, struct itimerspec *);21int timerfd_gettime(int, struct itimerspec *);
2222
23#if _REDIR_TIME64
24__REDIR(timerfd_settime, __timerfd_settime64);
25__REDIR(timerfd_gettime, __timerfd_gettime64);
26#endif
27
23#ifdef __cplusplus28#ifdef __cplusplus
24}29}
25#endif30#endif
lib/libc/musl/include/sys/timex.h+5
...@@ -91,6 +91,11 @@ struct timex {...@@ -91,6 +91,11 @@ struct timex {
91int adjtimex(struct timex *);91int adjtimex(struct timex *);
92int clock_adjtime(clockid_t, struct timex *);92int clock_adjtime(clockid_t, struct timex *);
9393
94#if _REDIR_TIME64
95__REDIR(adjtimex, __adjtimex_time64);
96__REDIR(clock_adjtime, __clock_adjtime64);
97#endif
98
94#ifdef __cplusplus99#ifdef __cplusplus
95}100}
96#endif101#endif
lib/libc/musl/include/sys/ttydefaults.h+1-6
...@@ -6,16 +6,11 @@...@@ -6,16 +6,11 @@
6#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)6#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
7#define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL)7#define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL)
8#define TTYDEF_SPEED (B9600)8#define TTYDEF_SPEED (B9600)
9#define CTRL(x) (x&037)9#define CTRL(x) ((x)&037)
10#define CEOF CTRL('d')10#define CEOF CTRL('d')
1111
12#ifdef _POSIX_VDISABLE
13#define CEOL _POSIX_VDISABLE
14#define CSTATUS _POSIX_VDISABLE
15#else
16#define CEOL '\0'12#define CEOL '\0'
17#define CSTATUS '\0'13#define CSTATUS '\0'
18#endif
1914
20#define CERASE 017715#define CERASE 0177
21#define CINTR CTRL('c')16#define CINTR CTRL('c')
lib/libc/musl/include/sys/wait.h+9-1
...@@ -13,7 +13,8 @@ extern "C" {...@@ -13,7 +13,8 @@ extern "C" {
13typedef enum {13typedef enum {
14 P_ALL = 0,14 P_ALL = 0,
15 P_PID = 1,15 P_PID = 1,
16 P_PGID = 216 P_PGID = 2,
17 P_PIDFD = 3
17} idtype_t;18} idtype_t;
1819
19pid_t wait (int *);20pid_t wait (int *);
...@@ -53,6 +54,13 @@ pid_t wait4 (pid_t, int *, int, struct rusage *);...@@ -53,6 +54,13 @@ pid_t wait4 (pid_t, int *, int, struct rusage *);
53#define WIFSIGNALED(s) (((s)&0xffff)-1U < 0xffu)54#define WIFSIGNALED(s) (((s)&0xffff)-1U < 0xffu)
54#define WIFCONTINUED(s) ((s) == 0xffff)55#define WIFCONTINUED(s) ((s) == 0xffff)
5556
57#if _REDIR_TIME64
58#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
59__REDIR(wait3, __wait3_time64);
60__REDIR(wait4, __wait4_time64);
61#endif
62#endif
63
56#ifdef __cplusplus64#ifdef __cplusplus
57}65}
58#endif66#endif
lib/libc/musl/include/threads.h+6
...@@ -80,6 +80,12 @@ void tss_delete(tss_t);...@@ -80,6 +80,12 @@ void tss_delete(tss_t);
80int tss_set(tss_t, void *);80int tss_set(tss_t, void *);
81void *tss_get(tss_t);81void *tss_get(tss_t);
8282
83#if _REDIR_TIME64
84__REDIR(thrd_sleep, __thrd_sleep_time64);
85__REDIR(mtx_timedlock, __mtx_timedlock_time64);
86__REDIR(cnd_timedwait, __cnd_timedwait_time64);
87#endif
88
83#ifdef __cplusplus89#ifdef __cplusplus
84}90}
85#endif91#endif
lib/libc/musl/include/time.h+28
...@@ -130,6 +130,34 @@ int stime(const time_t *);...@@ -130,6 +130,34 @@ int stime(const time_t *);
130time_t timegm(struct tm *);130time_t timegm(struct tm *);
131#endif131#endif
132132
133#if _REDIR_TIME64
134__REDIR(time, __time64);
135__REDIR(difftime, __difftime64);
136__REDIR(mktime, __mktime64);
137__REDIR(gmtime, __gmtime64);
138__REDIR(localtime, __localtime64);
139__REDIR(ctime, __ctime64);
140__REDIR(timespec_get, __timespec_get_time64);
141#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
142 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
143 || defined(_BSD_SOURCE)
144__REDIR(gmtime_r, __gmtime64_r);
145__REDIR(localtime_r, __localtime64_r);
146__REDIR(ctime_r, __ctime64_r);
147__REDIR(nanosleep, __nanosleep_time64);
148__REDIR(clock_getres, __clock_getres_time64);
149__REDIR(clock_gettime, __clock_gettime64);
150__REDIR(clock_settime, __clock_settime64);
151__REDIR(clock_nanosleep, __clock_nanosleep_time64);
152__REDIR(timer_settime, __timer_settime64);
153__REDIR(timer_gettime, __timer_gettime64);
154#endif
155#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
156__REDIR(stime, __stime64);
157__REDIR(timegm, __timegm_time64);
158#endif
159#endif
160
133#ifdef __cplusplus161#ifdef __cplusplus
134}162}
135#endif163#endif
lib/libc/musl/include/utime.h+6
...@@ -5,6 +5,8 @@...@@ -5,6 +5,8 @@
5extern "C" {5extern "C" {
6#endif6#endif
77
8#include <features.h>
9
8#define __NEED_time_t10#define __NEED_time_t
911
10#include <bits/alltypes.h>12#include <bits/alltypes.h>
...@@ -16,6 +18,10 @@ struct utimbuf {...@@ -16,6 +18,10 @@ struct utimbuf {
1618
17int utime (const char *, const struct utimbuf *);19int utime (const char *, const struct utimbuf *);
1820
21#if _REDIR_TIME64
22__REDIR(utime, __utime64);
23#endif
24
19#ifdef __cplusplus25#ifdef __cplusplus
20}26}
21#endif27#endif
lib/libc/musl/include/utmpx.h+6-1
...@@ -16,6 +16,7 @@ extern "C" {...@@ -16,6 +16,7 @@ extern "C" {
1616
17struct utmpx {17struct utmpx {
18 short ut_type;18 short ut_type;
19 short __ut_pad1;
19 pid_t ut_pid;20 pid_t ut_pid;
20 char ut_line[32];21 char ut_line[32];
21 char ut_id[4];22 char ut_id[4];
...@@ -25,7 +26,11 @@ struct utmpx {...@@ -25,7 +26,11 @@ struct utmpx {
25 short __e_termination;26 short __e_termination;
26 short __e_exit;27 short __e_exit;
27 } ut_exit;28 } ut_exit;
28 long ut_session;29#if __BYTE_ORDER == 1234
30 int ut_session, __ut_pad2;
31#else
32 int __ut_pad2, ut_session;
33#endif
29 struct timeval ut_tv;34 struct timeval ut_tv;
30 unsigned ut_addr_v6[4];35 unsigned ut_addr_v6[4];
31 char __unused[20];36 char __unused[20];
lib/libc/musl/src/aio/aio_suspend.c+2
...@@ -73,4 +73,6 @@ int aio_suspend(const struct aiocb *const cbs[], int cnt, const struct timespec...@@ -73,4 +73,6 @@ int aio_suspend(const struct aiocb *const cbs[], int cnt, const struct timespec
73 }73 }
74}74}
7575
76#if !_REDIR_TIME64
76weak_alias(aio_suspend, aio_suspend64);77weak_alias(aio_suspend, aio_suspend64);
78#endif
lib/libc/musl/src/complex/cacosh.c+4-1
...@@ -4,6 +4,9 @@...@@ -4,6 +4,9 @@
44
5double complex cacosh(double complex z)5double complex cacosh(double complex z)
6{6{
7 int zineg = signbit(cimag(z));
8
7 z = cacos(z);9 z = cacos(z);
8 return CMPLX(-cimag(z), creal(z));10 if (zineg) return CMPLX(cimag(z), -creal(z));
11 else return CMPLX(-cimag(z), creal(z));
9}12}
lib/libc/musl/src/complex/cacoshf.c+4-1
...@@ -2,6 +2,9 @@...@@ -2,6 +2,9 @@
22
3float complex cacoshf(float complex z)3float complex cacoshf(float complex z)
4{4{
5 int zineg = signbit(cimagf(z));
6
5 z = cacosf(z);7 z = cacosf(z);
6 return CMPLXF(-cimagf(z), crealf(z));8 if (zineg) return CMPLXF(cimagf(z), -crealf(z));
9 else return CMPLXF(-cimagf(z), crealf(z));
7}10}
lib/libc/musl/src/complex/cacoshl.c+4-1
...@@ -8,7 +8,10 @@ long double complex cacoshl(long double complex z)...@@ -8,7 +8,10 @@ long double complex cacoshl(long double complex z)
8#else8#else
9long double complex cacoshl(long double complex z)9long double complex cacoshl(long double complex z)
10{10{
11 int zineg = signbit(cimagl(z));
12
11 z = cacosl(z);13 z = cacosl(z);
12 return CMPLXL(-cimagl(z), creall(z));14 if (zineg) return CMPLXL(cimagl(z), -creall(z));
15 else return CMPLXL(-cimagl(z), creall(z));
13}16}
14#endif17#endif
lib/libc/musl/src/complex/catanf.c+1-13
...@@ -87,29 +87,17 @@ float complex catanf(float complex z)...@@ -87,29 +87,17 @@ float complex catanf(float complex z)
87 x = crealf(z);87 x = crealf(z);
88 y = cimagf(z);88 y = cimagf(z);
8989
90 if ((x == 0.0f) && (y > 1.0f))
91 goto ovrf;
92
93 x2 = x * x;90 x2 = x * x;
94 a = 1.0f - x2 - (y * y);91 a = 1.0f - x2 - (y * y);
95 if (a == 0.0f)
96 goto ovrf;
9792
98 t = 0.5f * atan2f(2.0f * x, a);93 t = 0.5f * atan2f(2.0f * x, a);
99 w = _redupif(t);94 w = _redupif(t);
10095
101 t = y - 1.0f;96 t = y - 1.0f;
102 a = x2 + (t * t);97 a = x2 + (t * t);
103 if (a == 0.0f)
104 goto ovrf;
10598
106 t = y + 1.0f;99 t = y + 1.0f;
107 a = (x2 + (t * t))/a;100 a = (x2 + (t * t))/a;
108 w = w + (0.25f * logf (a)) * I;101 w = CMPLXF(w, 0.25f * logf(a));
109 return w;
110
111ovrf:
112 // FIXME
113 w = MAXNUMF + MAXNUMF * I;
114 return w;102 return w;
115}103}
lib/libc/musl/src/complex/catanl.c+1-13
...@@ -97,30 +97,18 @@ long double complex catanl(long double complex z)...@@ -97,30 +97,18 @@ long double complex catanl(long double complex z)
97 x = creall(z);97 x = creall(z);
98 y = cimagl(z);98 y = cimagl(z);
9999
100 if ((x == 0.0L) && (y > 1.0L))
101 goto ovrf;
102
103 x2 = x * x;100 x2 = x * x;
104 a = 1.0L - x2 - (y * y);101 a = 1.0L - x2 - (y * y);
105 if (a == 0.0L)
106 goto ovrf;
107102
108 t = atan2l(2.0L * x, a) * 0.5L;103 t = atan2l(2.0L * x, a) * 0.5L;
109 w = redupil(t);104 w = redupil(t);
110105
111 t = y - 1.0L;106 t = y - 1.0L;
112 a = x2 + (t * t);107 a = x2 + (t * t);
113 if (a == 0.0L)
114 goto ovrf;
115108
116 t = y + 1.0L;109 t = y + 1.0L;
117 a = (x2 + (t * t)) / a;110 a = (x2 + (t * t)) / a;
118 w = w + (0.25L * logl(a)) * I;111 w = CMPLXF(w, 0.25L * logl(a));
119 return w;
120
121ovrf:
122 // FIXME
123 w = LDBL_MAX + LDBL_MAX * I;
124 return w;112 return w;
125}113}
126#endif114#endif
lib/libc/musl/src/ctype/alpha.h+84-75
...@@ -8,17 +8,17 @@...@@ -8,17 +8,17 @@
817,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,817,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
917,17,17,17,17,17,17,63,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,917,17,17,17,17,17,17,63,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1016,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,64,65,17,66,67,1016,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,64,65,17,66,67,
1168,69,70,71,72,73,74,17,75,76,77,78,79,80,16,16,16,81,82,83,84,85,86,87,88,89,1168,69,70,71,72,73,74,17,75,76,77,78,79,80,81,16,82,83,84,85,86,87,88,89,90,91,
1216,90,16,91,92,16,16,17,17,17,93,94,95,16,16,16,16,16,16,16,16,16,16,17,17,17,1292,93,16,94,95,96,16,17,17,17,97,98,99,16,16,16,16,16,16,16,16,16,16,17,17,17,
1317,96,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,97,16,16,16,16,16,16,1317,100,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,101,16,16,16,16,16,
1416,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1416,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1516,17,17,98,99,16,16,16,100,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,1516,16,17,17,102,103,16,16,104,105,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
1617,17,17,17,17,17,17,101,17,17,102,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1617,17,17,17,17,17,17,17,17,106,17,17,107,16,16,16,16,16,16,16,16,16,16,16,16,
1716,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,103,1716,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,
18104,16,16,16,16,16,16,16,16,16,105,16,16,16,16,16,16,16,16,16,16,16,16,16,16,18108,109,16,16,16,16,16,16,16,16,16,110,16,16,16,16,16,16,16,16,16,16,16,16,16,
1916,16,16,16,16,16,16,16,16,106,107,108,109,16,16,16,16,16,16,16,16,110,16,16,1916,16,16,16,16,16,16,16,16,16,111,112,113,114,16,16,16,16,16,16,16,16,115,116,
2016,16,16,16,16,111,112,16,16,16,16,113,16,16,114,16,16,16,16,16,16,16,16,16,20117,16,16,16,16,16,118,119,16,16,16,16,120,16,16,121,16,16,16,16,16,16,16,16,
2116,16,16,16,2116,16,16,16,16,
2216,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,2216,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,
23255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,23255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
24255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,254,255,255,7,254,24255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,254,255,255,7,254,
...@@ -27,8 +27,8 @@...@@ -27,8 +27,8 @@
27255,195,255,3,0,31,80,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,223,188,64,215,255,255,27255,195,255,3,0,31,80,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,223,188,64,215,255,255,
28251,255,255,255,255,255,255,255,255,255,191,255,255,255,255,255,255,255,255,28251,255,255,255,255,255,255,255,255,255,191,255,255,255,255,255,255,255,255,
29255,255,255,255,255,255,255,255,255,3,252,255,255,255,255,255,255,255,255,255,29255,255,255,255,255,255,255,255,255,3,252,255,255,255,255,255,255,255,255,255,
30255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,127,2,254,255,255,30255,255,255,255,255,255,255,255,255,255,255,254,255,255,255,127,2,255,255,255,
31255,255,0,0,0,0,0,255,191,182,0,255,255,255,7,7,0,0,0,255,7,255,255,255,255,31255,255,1,0,0,0,0,255,191,182,0,255,255,255,135,7,0,0,0,255,7,255,255,255,255,
32255,255,255,254,255,195,255,255,255,255,255,255,255,255,255,255,255,255,239,32255,255,255,254,255,195,255,255,255,255,255,255,255,255,255,255,255,255,239,
3331,254,225,255,3331,254,225,255,
34159,0,0,255,255,255,255,255,255,0,224,255,255,255,255,255,255,255,255,255,255,34159,0,0,255,255,255,255,255,255,0,224,255,255,255,255,255,255,255,255,255,255,
...@@ -42,54 +42,55 @@...@@ -42,54 +42,55 @@
42255,0,0,239,223,253,255,255,253,239,227,223,29,96,64,207,255,6,0,239,223,253,42255,0,0,239,223,253,255,255,253,239,227,223,29,96,64,207,255,6,0,239,223,253,
43255,255,255,255,231,223,93,240,128,207,255,0,252,236,255,127,252,255,255,251,43255,255,255,255,231,223,93,240,128,207,255,0,252,236,255,127,252,255,255,251,
4447,127,128,95,255,192,255,12,0,254,255,255,255,255,127,255,7,63,32,255,3,0,0,4447,127,128,95,255,192,255,12,0,254,255,255,255,255,127,255,7,63,32,255,3,0,0,
450,0,150,37,240,254,174,236,255,59,95,32,255,243,0,0,0,450,0,214,247,255,255,175,255,255,59,95,32,255,243,0,0,0,
460,1,0,0,0,255,3,0,0,255,254,255,255,255,31,254,255,3,255,255,254,255,255,255,460,1,0,0,0,255,3,0,0,255,254,255,255,255,31,254,255,3,255,255,254,255,255,255,
4731,0,0,0,0,0,0,0,0,255,255,255,255,255,255,127,249,255,3,255,255,231,193,255,4731,0,0,0,0,0,0,0,0,255,255,255,255,255,255,127,249,255,3,255,255,255,255,255,
48255,127,64,255,51,255,255,255,255,191,32,255,255,255,255,255,247,255,255,255,48255,255,255,255,63,255,255,255,255,191,32,255,255,255,255,255,247,255,255,255,
49255,255,255,255,255,255,61,127,61,255,255,255,255,255,61,255,255,255,255,61,49255,255,255,255,255,255,61,127,61,255,255,255,255,255,61,255,255,255,255,61,
50127,61,255,127,255,255,255,255,255,255,255,61,255,255,255,255,255,255,255,255,50127,61,255,127,255,255,255,255,255,255,255,61,255,255,255,255,255,255,255,255,
51135,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,63,63,254,255,517,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,63,63,254,255,
52255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,52255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
53255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,53255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
54255,255,255,255,255,159,255,255,254,255,255,7,255,255,255,255,255,255,255,255,54255,255,255,255,255,159,255,255,254,255,255,7,255,255,255,255,255,255,255,255,
55255,199,255,1,255,223,15,0,255,255,15,0,255,255,15,0,255,223,13,0,255,255,255,55255,199,255,1,255,223,15,0,255,255,15,0,255,255,15,0,255,223,13,0,255,255,255,
56255,255,255,207,255,255,1,128,16,255,3,0,0,0,0,255,3,255,255,255,255,255,255,56255,255,255,207,255,255,1,128,16,255,3,0,0,0,0,255,3,255,255,255,255,255,255,
57255,255,255,255,255,0,255,255,255,255,255,7,255,255,255,255,255,255,255,255,57255,255,255,255,255,1,255,255,255,255,255,7,255,255,255,255,255,255,255,255,
5863,5863,
590,255,255,255,127,255,15,255,1,192,255,255,255,255,63,31,0,255,255,255,255,590,255,255,255,127,255,15,255,1,192,255,255,255,255,63,31,0,255,255,255,255,
60255,15,255,255,255,3,255,3,0,0,0,0,255,255,255,15,255,255,255,255,255,255,255,60255,15,255,255,255,3,255,3,0,0,0,0,255,255,255,15,255,255,255,255,255,255,255,
61127,254,255,31,0,255,3,255,3,128,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,61127,254,255,31,0,255,3,255,3,128,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,
62255,239,255,239,15,255,3,0,0,0,0,255,255,255,255,255,243,255,255,255,255,255,62255,239,255,239,15,255,3,0,0,0,0,255,255,255,255,255,243,255,255,255,255,255,
63255,191,255,3,0,255,255,255,255,255,255,63,0,255,227,255,255,255,255,255,63,63255,191,255,3,0,255,255,255,255,255,255,127,0,255,227,255,255,255,255,255,63,
64255,1,0,0,0,0,0,0,0,0,0,0,0,222,111,0,255,255,255,255,255,255,255,255,255,255,64255,1,255,255,255,255,255,231,0,0,0,0,0,222,111,4,255,255,255,255,255,255,255,
65255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,128,255,31,0,65255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,
66255,255,63,63,255,255,255,255,63,63,255,170,255,255,255,63,255,255,255,255,66128,255,31,0,255,255,63,63,255,255,255,255,63,63,255,170,255,255,255,63,255,
67255,255,223,95,220,31,207,15,255,31,220,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,128,67255,255,255,255,255,223,95,220,31,207,15,255,31,220,31,0,0,0,0,0,0,0,0,0,0,0,
680,0,255,31,0,0,0,0,0,0,0,0,0,0,0,0,132,252,47,62,80,189,255,243,224,67,0,0,680,0,0,2,128,0,0,255,31,0,0,0,0,0,0,0,0,0,0,0,0,132,252,47,62,80,189,255,243,
69255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,69224,67,0,0,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
700,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,255,255,255,255,255,255,3,0,700,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,255,255,255,255,255,255,3,0,
710,255,255,255,255,255,127,255,255,255,255,255,127,255,255,255,255,255,255,255,710,255,255,255,255,255,127,255,255,255,255,255,127,255,255,255,255,255,255,255,
72255,255,255,255,255,255,255,255,255,31,120,12,0,255,255,255,255,191,32,255,72255,255,255,255,255,255,255,255,255,31,120,12,0,255,255,255,255,191,32,255,
73255,255,255,255,255,255,128,0,0,255,255,127,0,127,127,127,127,127,127,127,127,73255,255,255,255,255,255,128,0,0,255,255,127,0,127,127,127,127,127,127,127,127,
74255,255,255,255,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74255,255,255,255,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
750,0,224,0,0,0,254,3,62,31,254,255,255,255,255,255,255,255,255,255,127,224,254,750,0,224,0,0,0,254,3,62,31,254,255,255,255,255,255,255,255,255,255,127,224,254,
76255,255,255,255,255,255,255,255,255,255,247,224,255,255,255,255,127,254,255,76255,255,255,255,255,255,255,255,255,255,247,224,255,255,255,255,255,254,255,
77255,255,255,255,255,255,255,255,255,127,0,0,255,255,255,7,0,0,0,0,0,0,255,255,77255,255,255,255,255,255,255,255,255,127,0,0,255,255,255,7,0,0,0,0,0,0,255,255,
78255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,78255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
79255,255,255,63,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,79255,255,255,63,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,
80255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,7,0,80255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,
810,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,0,810,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,0,
820,0,0,0,0,0,255,255,255,255,255,63,255,31,255,255,255,15,0,0,255,255,255,255,820,0,0,0,0,0,255,255,255,255,255,63,255,31,255,255,255,15,0,0,255,255,255,255,
83255,127,240,143,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,83255,127,240,143,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,
840,128,255,252,255,255,255,255,255,255,255,255,255,255,255,255,249,255,255,255,840,128,255,252,255,255,255,255,255,255,255,255,255,255,255,255,249,255,255,255,
85127,255,0,0,0,0,0,0,0,128,255,187,247,255,255,255,0,0,0,255,255,255,255,255,85255,255,255,124,0,0,0,0,0,128,255,191,255,255,255,255,0,0,0,255,255,255,255,
86255,15,0,255,255,255,255,255,255,255,255,47,0,255,3,0,0,252,40,255,255,255,86255,255,15,0,255,255,255,255,255,255,255,255,47,0,255,3,0,0,252,232,255,255,
87255,255,7,255,255,255,255,7,0,255,255,255,31,255,255,255,255,255,255,247,255,87255,255,255,7,255,255,255,255,7,0,255,255,255,31,255,255,255,255,255,255,247,
880,128,255,3,223,255,255,127,255,255,255,255,255,255,127,0,255,63,255,3,255,88255,0,128,255,3,255,255,255,127,255,255,255,255,255,255,127,0,255,63,255,3,
89255,127,196,255,255,255,255,255,255,255,127,5,0,0,56,255,255,60,0,126,126,126,89255,255,127,252,255,255,255,255,255,255,255,127,5,0,0,56,255,255,60,0,126,126,
900,127,127,255,255,255,255,255,247,63,0,255,255,255,255,255,255,255,255,255,90126,0,127,127,255,255,255,255,255,247,255,0,255,255,255,255,255,255,255,255,
91255,255,255,255,255,255,7,255,3,255,255,255,255,255,255,255,255,255,255,255,91255,255,255,255,255,255,255,7,255,3,255,255,255,255,255,255,255,255,255,255,
92255,255,255,255,255,255,255,255,255,15,0,255,255,127,248,255,255,255,255,255,92255,255,255,255,255,255,255,255,255,255,15,0,255,255,127,248,255,255,255,255,
93255,
9315,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,255,255,255,255,9415,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,255,255,255,255,
94255,255,255,255,255,255,255,255,3,0,0,0,0,127,0,248,224,255,253,127,95,219,95255,255,255,255,255,255,255,255,3,0,0,0,0,127,0,248,224,255,253,127,95,219,
95255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,0,0,248,255,255,255,96255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,0,0,248,255,255,255,
...@@ -109,55 +110,63 @@...@@ -109,55 +110,63 @@
1090,0,0,0,0,0,0,0,0,0,0,0,63,253,255,255,255,255,191,145,255,255,63,0,255,255,1100,0,0,0,0,0,0,0,0,0,0,0,63,253,255,255,255,255,191,145,255,255,63,0,255,255,
110127,0,255,255,255,127,0,0,0,0,0,0,0,0,255,255,55,0,255,255,63,0,255,255,255,3,111127,0,255,255,255,127,0,0,0,0,0,0,0,0,255,255,55,0,255,255,63,0,255,255,255,3,
1110,0,0,0,0,0,0,0,255,255,255,255,255,255,255,192,0,0,0,0,0,0,0,0,111,240,239,1120,0,0,0,0,0,0,0,255,255,255,255,255,255,255,192,0,0,0,0,0,0,0,0,111,240,239,
112254,255,255,15,0,0,0,0,0,255,255,255,31,255,255,255,31,0,0,0,0,255,254,255,113254,255,255,63,0,0,0,0,0,255,255,255,31,255,255,255,31,0,0,0,0,255,254,255,
113255,31,0,0,0,255,255,255,255,255,255,63,0,255,255,63,0,255,255,7,0,255,255,3,114255,31,0,0,0,255,255,255,255,255,255,63,0,255,255,63,0,255,255,7,0,255,255,3,
1140,0,0,0,0,0,0,0,0,0,0,0,1150,0,0,0,0,0,0,0,0,0,0,0,
1150,255,255,255,255,255,255,255,255,255,1,0,0,0,0,0,0,255,255,255,255,255,255,7,1160,255,255,255,255,255,255,255,255,255,1,0,0,0,0,0,0,255,255,255,255,255,255,7,
1160,255,255,255,255,255,255,7,0,255,255,255,255,255,255,255,255,63,0,0,0,192,1170,255,255,255,255,255,255,7,0,255,255,255,255,255,0,255,3,0,0,0,0,0,0,0,0,0,0,
117255,0,0,252,255,255,255,255,255,255,1,0,0,255,255,255,1,255,3,255,255,255,255,1180,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,31,128,0,255,255,63,0,0,0,0,0,0,0,0,0,
118255,255,199,255,0,0,255,255,255,255,71,0,255,255,255,255,255,255,255,255,30,0,1190,0,0,0,0,0,0,0,0,0,255,255,127,0,255,255,255,255,255,255,255,255,63,0,0,0,
119255,23,0,0,0,0,255,255,251,255,255,255,159,64,0,0,0,0,0,0,0,0,127,189,255,191,120192,255,0,0,252,255,255,255,255,255,255,1,0,0,255,255,255,1,255,3,255,255,255,
120255,1,255,255,255,255,255,255,255,1,255,3,239,159,249,255,255,253,237,227,159,121255,255,255,199,255,112,0,255,255,255,255,71,0,255,255,255,255,255,255,255,
12125,129,224,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,122255,30,0,255,23,0,0,0,0,255,255,251,255,255,255,159,64,0,0,0,0,0,0,0,0,127,
122255,255,187,7,255,3,0,0,0,0,255,255,255,255,255,255,255,255,179,0,255,3,0,0,0,123189,255,191,255,1,255,255,255,255,255,255,255,1,255,3,239,159,249,255,255,253,
124237,227,159,25,129,224,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,
125255,255,255,255,255,187,7,255,131,0,0,0,0,255,255,255,255,255,255,255,255,179,
1260,255,3,0,0,0,
1230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,63,127,0,0,0,63,0,0,1270,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,63,127,0,0,0,63,0,0,
1240,0,255,255,255,255,255,255,255,127,17,0,255,3,0,0,0,0,255,255,255,255,255,1280,0,255,255,255,255,255,255,255,127,17,0,255,3,0,0,0,0,255,255,255,255,255,
125255,63,0,255,3,0,0,0,0,0,129255,63,1,255,3,0,0,0,0,0,0,255,255,255,231,255,7,255,3,0,0,0,0,0,0,0,0,0,0,0,
1260,255,255,255,227,255,7,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1300,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,
1270,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,3,1310,255,255,255,255,255,255,255,255,255,3,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1280,128,255,255,255,255,255,255,231,127,0,0,255,255,255,255,255,255,207,255,255,1320,0,0,0,255,252,255,255,255,255,255,252,26,0,0,0,255,255,255,255,255,255,231,
1290,0,0,0,0,255,255,255,255,255,255,255,1,255,253,255,255,255,255,127,127,1,0,133127,0,0,255,255,255,255,255,255,255,255,255,32,0,0,0,0,255,255,255,255,255,
130255,3,0,0,252,255,255,255,252,255,255,254,127,0,0,0,0,0,0,0,0,0,127,251,255,134255,255,1,255,253,255,255,255,255,127,127,1,0,255,3,0,0,252,255,255,255,252,
131255,255,255,127,180,203,0,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,135255,255,254,127,0,0,0,0,0,0,0,0,0,127,251,255,255,255,255,127,180,203,0,255,3,
136191,253,255,255,255,127,123,1,255,3,0,0,0,0,0,0,0,0,0,
1370,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,127,0,255,
132255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,0,138255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,0,
1330,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,127,0,1390,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,127,0,
1340,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,1400,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
135255,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,141255,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,
1360,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,142255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,
137255,255,255,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143255,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,
1380,0,255,255,255,255,255,255,255,1,255,255,255,127,255,3,0,0,0,0,0,0,0,0,0,0,0,144255,255,255,255,255,255,1,255,255,255,127,255,3,0,0,0,0,0,0,0,0,0,0,0,0,255,
1390,255,255,255,63,0,0,255,255,255,255,255,255,127,0,15,0,255,3,248,255,255,224,145255,255,63,0,0,255,255,255,255,255,255,0,0,15,0,255,3,248,255,255,224,255,255,
140255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,31,0,255,1460,0,0,0,0,0,0,0,0,0,0,0,0,
141255,255,255,255,127,0,0,248,255,0,0,0,0,0,0,0,0,3,0,0,0,255,255,255,255,255,1470,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1480,0,255,255,255,255,255,255,255,255,255,135,255,255,255,255,255,255,255,128,
149255,255,0,0,0,0,0,0,0,0,11,0,0,0,255,255,255,255,255,255,255,255,255,255,255,
142255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,150255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
143255,255,255,255,255,31,0,0,255,255,255,255,255,255,255,255,255,255,255,255,151255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
144255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,7,0,152255,255,255,255,255,255,255,255,255,255,255,255,7,0,255,255,255,127,0,0,0,0,0,
145255,255,255,127,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,1530,7,0,240,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
146255,255,255,255,255,255,255,
147255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,154255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
148255,255,255,255,255,255,255,255,255,255,255,255,255,15,255,255,255,255,255,155255,255,255,255,255,255,255,255,255,255,255,255,255,255,15,255,255,255,255,
149255,255,255,255,255,255,255,255,7,255,31,255,1,255,67,0,0,0,0,0,0,0,0,0,0,0,0,156255,255,255,255,255,255,255,255,255,7,255,31,255,1,255,67,0,0,0,0,0,0,0,0,0,0,
150255,255,255,255,255,255,255,255,255,255,223,255,255,255,255,255,255,255,255,1570,0,255,255,255,255,255,255,255,255,255,255,223,255,255,255,255,255,255,255,
151223,100,222,255,235,239,255,255,255,255,255,255,255,191,231,223,223,255,255,158255,223,100,222,255,235,239,255,255,255,255,255,255,
152255,123,95,252,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,159255,191,231,223,223,255,255,255,123,95,252,253,255,255,255,255,255,255,255,
153255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,160255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
154255,255,255,255,255,255,255,255,63,255,255,255,253,255,255,247,255,255,255,161255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,255,255,
155247,255,255,223,255,255,255,223,255,255,127,255,255,255,127,255,255,255,253,162253,255,255,247,255,255,255,247,255,255,223,255,255,255,223,255,255,127,255,
156255,255,255,253,255,255,247,207,255,255,255,255,255,255,127,255,255,249,219,7,163255,255,127,255,255,255,253,255,255,255,253,255,255,247,207,255,255,255,255,
1570,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,164255,255,127,255,255,249,219,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
158255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,1650,0,255,255,255,255,255,31,128,63,255,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1590,0,0,0,0,1660,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,
1600,255,255,255,255,255,255,255,255,143,0,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16715,255,3,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
1610,0,0,0,239,255,255,255,150,254,247,10,132,234,150,170,150,247,247,94,255,251,168255,255,255,255,255,255,255,31,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,
162255,15,238,251,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,3,255,255,255,3,169143,8,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
163255,255,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1700,239,255,255,255,150,254,247,10,132,234,150,170,150,247,247,94,255,251,255,
17115,238,251,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,3,255,255,255,3,255,
172255,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
lib/libc/musl/src/ctype/casemap.h created+297
...@@ -0,0 +1,297 @@
1static const unsigned char tab[] = {
2 7, 8, 9, 10, 11, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
3 13, 6, 6, 14, 6, 6, 6, 6, 6, 6, 6, 6, 15, 16, 17, 18,
4 6, 19, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 20, 21, 6, 6,
5 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
7 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
8 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
9 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
10 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
11 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
12 6, 6, 6, 6, 6, 6, 22, 23, 6, 6, 6, 24, 6, 6, 6, 6,
13 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
14 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
15 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
16 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
17 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 25,
18 6, 6, 6, 6, 26, 6, 6, 6, 6, 6, 6, 6, 27, 6, 6, 6,
19 6, 6, 6, 6, 6, 6, 6, 6, 28, 6, 6, 6, 6, 6, 6, 6,
20 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
21 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
22 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
23 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
24 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 29, 6,
25 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
26 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
27 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
28 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
29 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
30 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
31 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
32 6, 6, 6, 6, 6, 6, 6, 6, 6, 30, 6, 6, 6, 6, 6, 6,
33 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
34 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
35 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
36 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
37 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
38 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
39 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
40 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36,
41 43, 43, 43, 43, 43, 43, 43, 43, 1, 0, 84, 86, 86, 86, 86, 86,
42 86, 86, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
43 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 43, 43, 43, 43, 43, 43,
44 43, 7, 43, 43, 91, 86, 86, 86, 86, 86, 86, 86, 74, 86, 86, 5,
45 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80,
46 36, 80, 121, 49, 80, 49, 80, 49, 56, 80, 49, 80, 49, 80, 49, 80,
47 49, 80, 49, 80, 49, 80, 49, 80, 78, 49, 2, 78, 13, 13, 78, 3,
48 78, 0, 36, 110, 0, 78, 49, 38, 110, 81, 78, 36, 80, 78, 57, 20,
49 129, 27, 29, 29, 83, 49, 80, 49, 80, 13, 49, 80, 49, 80, 49, 80,
50 27, 83, 36, 80, 49, 2, 92, 123, 92, 123, 92, 123, 92, 123, 92, 123,
51 20, 121, 92, 123, 92, 123, 92, 45, 43, 73, 3, 72, 3, 120, 92, 123,
52 20, 0, 150, 10, 1, 43, 40, 6, 6, 0, 42, 6, 42, 42, 43, 7,
53 187, 181, 43, 30, 0, 43, 7, 43, 43, 43, 1, 43, 43, 43, 43, 43,
54 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
55 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 1, 43, 43, 43, 43,
56 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
57 43, 43, 43, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
58 43, 205, 70, 205, 43, 0, 37, 43, 7, 1, 6, 1, 85, 86, 86, 86,
59 86, 86, 85, 86, 86, 2, 36, 129, 129, 129, 129, 129, 21, 129, 129, 129,
60 0, 0, 43, 0, 178, 209, 178, 209, 178, 209, 178, 209, 0, 0, 205, 204,
61 1, 0, 215, 215, 215, 215, 215, 131, 129, 129, 129, 129, 129, 129, 129, 129,
62 129, 129, 172, 172, 172, 172, 172, 172, 172, 172, 172, 172, 28, 0, 0, 0,
63 0, 0, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 2, 0, 0,
64 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80,
65 49, 80, 78, 49, 80, 49, 80, 78, 49, 80, 49, 80, 49, 80, 49, 80,
66 49, 80, 49, 80, 49, 80, 49, 2, 135, 166, 135, 166, 135, 166, 135, 166,
67 135, 166, 135, 166, 135, 166, 135, 166, 42, 43, 43, 43, 43, 43, 43, 43,
68 43, 43, 43, 43, 43, 0, 0, 0, 84, 86, 86, 86, 86, 86, 86, 86,
69 86, 86, 86, 86, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
70 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
71 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
72 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
73 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
74 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
75 0, 0, 0, 84, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
76 12, 0, 12, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
77 43, 7, 42, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
78 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
79 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
80 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 43, 43, 43, 43, 43, 43,
81 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
82 43, 43, 43, 43, 86, 86, 108, 129, 21, 0, 43, 43, 43, 43, 43, 43,
83 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
84 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
85 43, 43, 43, 43, 7, 108, 3, 65, 43, 43, 86, 86, 86, 86, 86, 86,
86 86, 86, 86, 86, 86, 86, 86, 86, 44, 86, 43, 43, 43, 43, 43, 43,
87 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 1,
88 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
89 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
90 0, 0, 0, 0, 0, 0, 0, 0, 12, 108, 0, 0, 0, 0, 0, 6,
91 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
92 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
93 0, 0, 0, 0, 0, 0, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37,
94 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37,
95 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37,
96 6, 37, 6, 37, 6, 37, 6, 37, 86, 122, 158, 38, 6, 37, 6, 37,
97 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 37,
98 6, 37, 6, 37, 6, 37, 6, 37, 6, 37, 6, 1, 43, 43, 79, 86,
99 86, 44, 43, 127, 86, 86, 57, 43, 43, 85, 86, 86, 43, 43, 79, 86,
100 86, 44, 43, 127, 86, 86, 129, 55, 117, 91, 123, 92, 43, 43, 79, 86,
101 86, 2, 172, 4, 0, 0, 57, 43, 43, 85, 86, 86, 43, 43, 79, 86,
102 86, 44, 43, 43, 86, 86, 50, 19, 129, 87, 0, 111, 129, 126, 201, 215,
103 126, 45, 129, 129, 14, 126, 57, 127, 111, 87, 0, 129, 129, 126, 21, 0,
104 126, 3, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 7, 43,
105 36, 43, 151, 43, 43, 43, 43, 43, 43, 43, 43, 43, 42, 43, 43, 43,
106 43, 43, 86, 86, 86, 86, 86, 128, 129, 129, 129, 129, 57, 187, 42, 43,
107 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
108 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
109 43, 43, 43, 43, 43, 43, 43, 1, 129, 129, 129, 129, 129, 129, 129, 129,
110 129, 129, 129, 129, 129, 129, 129, 201, 172, 172, 172, 172, 172, 172, 172, 172,
111 172, 172, 172, 172, 172, 172, 172, 208, 13, 0, 78, 49, 2, 180, 193, 193,
112 215, 215, 36, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80,
113 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80, 49, 80,
114 49, 80, 49, 80, 215, 215, 83, 193, 71, 212, 215, 215, 215, 5, 43, 43,
115 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 7, 1, 0, 1, 0, 0,
116 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
117 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
118 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
119 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
120 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
121 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 49, 80, 49, 80, 49, 80,
122 49, 80, 49, 80, 49, 80, 49, 80, 13, 0, 0, 0, 0, 0, 36, 80,
123 49, 80, 49, 80, 49, 80, 49, 80, 0, 0, 0, 0, 0, 0, 0, 0,
124 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
125 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 43, 43, 43, 43, 43,
126 43, 43, 43, 43, 43, 121, 92, 123, 92, 123, 79, 123, 92, 123, 92, 123,
127 92, 123, 92, 123, 92, 123, 92, 123, 92, 123, 92, 123, 92, 123, 92, 45,
128 43, 43, 121, 20, 92, 123, 92, 45, 121, 42, 92, 39, 92, 123, 92, 123,
129 92, 123, 164, 0, 10, 180, 92, 123, 92, 123, 79, 3, 42, 43, 43, 43,
130 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 1,
131 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
132 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0,
133 0, 0, 0, 0, 0, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
134 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
135 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
136 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
137 0, 43, 43, 43, 43, 43, 43, 43, 43, 7, 0, 72, 86, 86, 86, 86,
138 86, 86, 86, 86, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
139 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
140 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
141 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 43, 43, 43,
142 43, 43, 43, 43, 43, 43, 43, 43, 43, 85, 86, 86, 86, 86, 86, 86,
143 86, 86, 86, 86, 86, 86, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0,
144 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
145 0, 0, 0, 0, 0, 0, 36, 43, 43, 43, 43, 43, 43, 43, 43, 43,
146 43, 43, 7, 0, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
147 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
148 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 43, 43, 43,
150 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 7, 0, 0,
151 0, 0, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
152 86, 86, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
153 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
154 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
155 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 43, 43,
156 43, 43, 43, 43, 43, 43, 43, 43, 86, 86, 86, 86, 86, 86, 86, 86,
157 86, 86, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
158 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
159 0, 0, 0, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 86, 86,
160 86, 86, 86, 86, 86, 86, 86, 86, 14, 0, 0, 0, 0, 0, 0, 0,
161 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
162 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
163 0, 0, 0, 0, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 85,
164 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 14, 0, 0, 0, 0, 0,
165 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
166 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
167 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
168 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
169};
170static const int rules[] = {
171 0x0, 0x2001, -0x2000, 0x1dbf00, 0x2e700, 0x7900,
172 0x2402, 0x101, -0x100, 0x0, 0x201, -0x200,
173 -0xc6ff, -0xe800, -0x78ff, -0x12c00, 0xc300, 0xd201,
174 0xce01, 0xcd01, 0x4f01, 0xca01, 0xcb01, 0xcf01,
175 0x6100, 0xd301, 0xd101, 0xa300, 0xd501, 0x8200,
176 0xd601, 0xda01, 0xd901, 0xdb01, 0x3800, 0x3,
177 -0x4f00, -0x60ff, -0x37ff, 0x242802, 0x0, 0x101,
178 -0x100, -0xcd00, -0xda00, -0x81ff, 0x2a2b01, -0xa2ff,
179 0x2a2801, 0x2a3f00, -0xc2ff, 0x4501, 0x4701, 0x2a1f00,
180 0x2a1c00, 0x2a1e00, -0xd200, -0xce00, -0xca00, -0xcb00,
181 0xa54f00, 0xa54b00, -0xcf00, 0xa52800, 0xa54400, -0xd100,
182 -0xd300, 0x29f700, 0xa54100, 0x29fd00, -0xd500, -0xd600,
183 0x29e700, 0xa54300, 0xa52a00, -0x4500, -0xd900, -0x4700,
184 -0xdb00, 0xa51500, 0xa51200, 0x4c2402, 0x0, 0x2001,
185 -0x2000, 0x101, -0x100, 0x5400, 0x7401, 0x2601,
186 0x2501, 0x4001, 0x3f01, -0x2600, -0x2500, -0x1f00,
187 -0x4000, -0x3f00, 0x801, -0x3e00, -0x3900, -0x2f00,
188 -0x3600, -0x800, -0x5600, -0x5000, 0x700, -0x7400,
189 -0x3bff, -0x6000, -0x6ff, 0x701a02, 0x101, -0x100,
190 0x2001, -0x2000, 0x5001, 0xf01, -0xf00, 0x0,
191 0x3001, -0x3000, 0x101, -0x100, 0x0, 0xbc000,
192 0x1c6001, 0x0, 0x97d001, 0x801, -0x800, 0x8a0502,
193 0x0, -0xbbfff, -0x186200, 0x89c200, -0x182500, -0x186e00,
194 -0x186d00, -0x186400, -0x186300, -0x185c00, 0x0, 0x8a3800,
195 0x8a0400, 0xee600, 0x101, -0x100, 0x0, -0x3b00,
196 -0x1dbeff, 0x8f1d02, 0x800, -0x7ff, 0x0, 0x5600,
197 -0x55ff, 0x4a00, 0x6400, 0x8000, 0x7000, 0x7e00,
198 0x900, -0x49ff, -0x8ff, -0x1c2500, -0x63ff, -0x6fff,
199 -0x7fff, -0x7dff, 0xac0502, 0x0, 0x1001, -0x1000,
200 0x1c01, 0x101, -0x1d5cff, -0x20beff, -0x2045ff, -0x1c00,
201 0xb10b02, 0x101, -0x100, 0x3001, -0x3000, 0x0,
202 -0x29f6ff, -0xee5ff, -0x29e6ff, -0x2a2b00, -0x2a2800, -0x2a1bff,
203 -0x29fcff, -0x2a1eff, -0x2a1dff, -0x2a3eff, 0x0, -0x1c6000,
204 0x0, 0x101, -0x100, 0xbc0c02, 0x0, 0x101,
205 -0x100, -0xa543ff, 0x3a001, -0x8a03ff, -0xa527ff, 0x3000,
206 -0xa54eff, -0xa54aff, -0xa540ff, -0xa511ff, -0xa529ff, -0xa514ff,
207 -0x2fff, -0xa542ff, -0x8a37ff, 0x0, -0x97d000, -0x3a000,
208 0x0, 0x2001, -0x2000, 0x0, 0x2801, -0x2800,
209 0x0, 0x4001, -0x4000, 0x0, 0x2001, -0x2000,
210 0x0, 0x2001, -0x2000, 0x0, 0x2201, -0x2200,
211};
212static const unsigned char rulebases[] = {
213 0, 6, 39, 81, 111, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
214 124, 0, 0, 127, 0, 0, 0, 0, 0, 0, 0, 0, 131, 142, 146, 151,
215 0, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, 196, 0, 0,
216 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
217 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
218 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
219 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
220 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
221 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
222 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
223 0, 0, 0, 0, 0, 0, 198, 201, 0, 0, 0, 219, 0, 0, 0, 0,
224 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
225 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
226 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
227 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
228 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 222,
229 0, 0, 0, 0, 225, 0, 0, 0, 0, 0, 0, 0, 228, 0, 0, 0,
230 0, 0, 0, 0, 0, 0, 0, 0, 231, 0, 0, 0, 0, 0, 0, 0,
231 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
232 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
233 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
234 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
235 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 234, 0,
236 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
237 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
238 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
239 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
240 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
241 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
242 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
243 0, 0, 0, 0, 0, 0, 0, 0, 0, 237, 0, 0, 0, 0, 0, 0,
244 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
245};
246static const unsigned char exceptions[][2] = {
247 { 48, 12 }, { 49, 13 }, { 120, 14 }, { 127, 15 },
248 { 128, 16 }, { 129, 17 }, { 134, 18 }, { 137, 19 },
249 { 138, 19 }, { 142, 20 }, { 143, 21 }, { 144, 22 },
250 { 147, 19 }, { 148, 23 }, { 149, 24 }, { 150, 25 },
251 { 151, 26 }, { 154, 27 }, { 156, 25 }, { 157, 28 },
252 { 158, 29 }, { 159, 30 }, { 166, 31 }, { 169, 31 },
253 { 174, 31 }, { 177, 32 }, { 178, 32 }, { 183, 33 },
254 { 191, 34 }, { 197, 35 }, { 200, 35 }, { 203, 35 },
255 { 221, 36 }, { 242, 35 }, { 246, 37 }, { 247, 38 },
256 { 32, 45 }, { 58, 46 }, { 61, 47 }, { 62, 48 },
257 { 63, 49 }, { 64, 49 }, { 67, 50 }, { 68, 51 },
258 { 69, 52 }, { 80, 53 }, { 81, 54 }, { 82, 55 },
259 { 83, 56 }, { 84, 57 }, { 89, 58 }, { 91, 59 },
260 { 92, 60 }, { 97, 61 }, { 99, 62 }, { 101, 63 },
261 { 102, 64 }, { 104, 65 }, { 105, 66 }, { 106, 64 },
262 { 107, 67 }, { 108, 68 }, { 111, 66 }, { 113, 69 },
263 { 114, 70 }, { 117, 71 }, { 125, 72 }, { 130, 73 },
264 { 135, 74 }, { 137, 75 }, { 138, 76 }, { 139, 76 },
265 { 140, 77 }, { 146, 78 }, { 157, 79 }, { 158, 80 },
266 { 69, 87 }, { 123, 29 }, { 124, 29 }, { 125, 29 },
267 { 127, 88 }, { 134, 89 }, { 136, 90 }, { 137, 90 },
268 { 138, 90 }, { 140, 91 }, { 142, 92 }, { 143, 92 },
269 { 172, 93 }, { 173, 94 }, { 174, 94 }, { 175, 94 },
270 { 194, 95 }, { 204, 96 }, { 205, 97 }, { 206, 97 },
271 { 207, 98 }, { 208, 99 }, { 209, 100 }, { 213, 101 },
272 { 214, 102 }, { 215, 103 }, { 240, 104 }, { 241, 105 },
273 { 242, 106 }, { 243, 107 }, { 244, 108 }, { 245, 109 },
274 { 249, 110 }, { 253, 45 }, { 254, 45 }, { 255, 45 },
275 { 80, 105 }, { 81, 105 }, { 82, 105 }, { 83, 105 },
276 { 84, 105 }, { 85, 105 }, { 86, 105 }, { 87, 105 },
277 { 88, 105 }, { 89, 105 }, { 90, 105 }, { 91, 105 },
278 { 92, 105 }, { 93, 105 }, { 94, 105 }, { 95, 105 },
279 { 130, 0 }, { 131, 0 }, { 132, 0 }, { 133, 0 },
280 { 134, 0 }, { 135, 0 }, { 136, 0 }, { 137, 0 },
281 { 192, 117 }, { 207, 118 }, { 128, 137 }, { 129, 138 },
282 { 130, 139 }, { 133, 140 }, { 134, 141 }, { 112, 157 },
283 { 113, 157 }, { 118, 158 }, { 119, 158 }, { 120, 159 },
284 { 121, 159 }, { 122, 160 }, { 123, 160 }, { 124, 161 },
285 { 125, 161 }, { 179, 162 }, { 186, 163 }, { 187, 163 },
286 { 188, 164 }, { 190, 165 }, { 195, 162 }, { 204, 164 },
287 { 218, 166 }, { 219, 166 }, { 229, 106 }, { 234, 167 },
288 { 235, 167 }, { 236, 110 }, { 243, 162 }, { 248, 168 },
289 { 249, 168 }, { 250, 169 }, { 251, 169 }, { 252, 164 },
290 { 38, 176 }, { 42, 177 }, { 43, 178 }, { 78, 179 },
291 { 132, 8 }, { 98, 186 }, { 99, 187 }, { 100, 188 },
292 { 101, 189 }, { 102, 190 }, { 109, 191 }, { 110, 192 },
293 { 111, 193 }, { 112, 194 }, { 126, 195 }, { 127, 195 },
294 { 125, 207 }, { 141, 208 }, { 148, 209 }, { 171, 210 },
295 { 172, 211 }, { 173, 212 }, { 176, 213 }, { 177, 214 },
296 { 178, 215 }, { 196, 216 }, { 197, 217 }, { 198, 218 },
297};
lib/libc/musl/src/ctype/nonspacing.h+48-40
...@@ -8,16 +8,16 @@...@@ -8,16 +8,16 @@
816,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,816,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
916,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,916,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1016,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,49,16,16,50,1016,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,49,16,16,50,
1151,16,52,53,54,16,16,16,16,16,16,55,16,16,16,16,16,56,57,58,59,60,61,62,63,16,1151,16,52,53,54,16,16,16,16,16,16,55,16,16,56,16,57,58,59,60,61,62,63,64,65,66,
1216,64,16,65,66,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1267,68,16,69,70,71,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1316,72,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1316,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1416,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1516,16,16,73,74,16,16,16,75,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1416,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1616,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1516,16,16,67,68,16,16,16,69,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1616,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1716,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1716,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1816,16,16,16,16,16,16,76,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1816,16,16,16,16,16,16,70,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1916,16,77,78,16,16,16,16,16,16,16,79,16,16,16,16,16,80,81,82,16,16,16,16,16,83,
1916,16,71,72,16,16,16,16,16,16,16,73,16,16,16,16,16,74,16,16,16,16,16,16,16,75,2084,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
2076,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
2116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,2116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,
22255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,22255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
23255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,23255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
...@@ -25,16 +25,16 @@...@@ -25,16 +25,16 @@
250,0,0,0,0,0,0,248,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,250,0,0,0,0,0,0,248,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
260,0,0,254,255,255,255,255,191,182,0,0,0,0,0,0,0,63,0,255,23,0,0,0,0,0,248,255,260,0,0,254,255,255,255,255,191,182,0,0,0,0,0,0,0,63,0,255,23,0,0,0,0,0,248,255,
27255,0,0,1,0,0,0,0,0,0,0,0,0,0,0,192,191,159,61,0,0,0,128,2,0,0,0,255,255,255,27255,0,0,1,0,0,0,0,0,0,0,0,0,0,0,192,191,159,61,0,0,0,128,2,0,0,0,255,255,255,
287,0,0,0,0,0,0,0,0,0,0,192,255,1,0,0,0,0,0,0,248,15,0,0,0,192,251,239,62,0,0,0,287,0,0,0,0,0,0,0,0,0,0,192,255,1,0,0,0,0,0,0,248,15,32,0,0,192,251,239,62,0,0,
290,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,255,255,255,255,290,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,255,255,255,255,
30255,7,0,0,0,0,0,0,20,254,33,254,0,12,0,0,0,2,0,0,0,0,0,0,16,30,32,0,0,12,0,0,30255,7,0,0,0,0,0,0,20,254,33,254,0,12,0,0,0,2,0,0,0,0,0,0,16,30,32,0,0,12,0,0,
310,6,0,0,0,0,0,0,16,134,57,2,0,0,0,35,0,6,0,0,0,0,0,0,16,190,33,0,0,12,0,0,252,3164,6,0,0,0,0,0,0,16,134,57,2,0,0,0,35,0,6,0,0,0,0,0,0,16,190,33,0,0,12,0,0,
322,0,0,0,0,0,0,144,30,32,64,0,12,0,0,0,4,0,0,0,0,0,0,0,1,32,0,0,0,0,0,0,1,0,0,32252,2,0,0,0,0,0,0,144,30,32,64,0,12,0,0,0,4,0,0,0,0,0,0,0,1,32,0,0,0,0,0,0,17,
330,0,0,0,192,193,61,96,0,12,0,0,0,2,0,0,0,0,0,0,144,64,48,0,0,12,0,0,0,3,0,0,0,330,0,0,0,0,0,192,193,61,96,0,12,0,0,0,2,0,0,0,0,0,0,144,64,48,0,0,12,0,0,0,3,0,
340,0,0,24,30,32,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,4,92,0,0,0,0,0,0,0,0,0,0,0,242,340,0,0,0,0,24,30,32,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,4,92,0,0,0,0,0,0,0,0,0,0,0,
357,128,127,0,0,0,0,0,0,0,0,0,0,0,0,242,27,0,63,0,0,0,0,0,0,0,0,0,3,0,0,160,2,0,35242,7,128,127,0,0,0,0,0,0,0,0,0,0,0,0,242,31,0,63,0,0,0,0,0,0,0,0,0,3,0,0,160,
360,0,0,0,0,254,127,223,224,255,254,255,255,255,31,64,0,0,0,0,0,0,0,0,0,0,0,0,362,0,0,0,0,0,0,254,127,223,224,255,254,255,255,255,31,64,0,0,0,0,0,0,0,0,0,0,0,
37224,253,102,0,0,0,195,1,0,30,0,100,32,0,32,0,0,0,0,0,0,0,0,0,0,0,370,224,253,102,0,0,0,195,1,0,30,0,100,32,0,32,0,0,0,0,0,0,0,0,0,0,0,
380,0,0,0,0,0,0,0,0,0,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,380,0,0,0,0,0,0,0,0,0,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,
390,0,28,0,0,0,12,0,0,0,12,0,0,0,0,0,0,0,176,63,64,254,15,32,0,0,0,0,0,120,0,0,390,0,28,0,0,0,12,0,0,0,12,0,0,0,0,0,0,0,176,63,64,254,15,32,0,0,0,0,0,120,0,0,
400,0,0,0,0,0,0,0,0,0,0,0,96,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,135,1,4,14,0,400,0,0,0,0,0,0,0,0,0,0,0,96,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,135,1,4,14,0,
...@@ -48,9 +48,9 @@...@@ -48,9 +48,9 @@
480,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,480,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,
490,60,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,490,60,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
500,0,0,128,247,63,0,0,0,192,0,0,0,0,0,0,0,0,0,0,3,0,68,8,0,0,96,0,0,0,0,0,0,0,500,0,0,128,247,63,0,0,0,192,0,0,0,0,0,0,0,0,0,0,3,0,68,8,0,0,96,0,0,0,0,0,0,0,
510,0,0,0,0,0,0,0,0,0,0,0,48,0,0,0,255,255,3,0,0,0,0,0,192,63,0,0,128,255,3,0,0,510,0,0,0,0,0,0,0,0,0,0,0,48,0,0,0,255,255,3,128,0,0,0,0,192,63,0,0,128,255,3,0,
520,0,0,7,0,0,0,0,0,200,19,0,0,0,0,32,0,0,0,0,0,0,0,0,126,102,0,8,16,0,0,0,0,0,520,0,0,0,7,0,0,0,0,0,200,51,0,0,0,0,32,0,0,0,0,0,0,0,0,126,102,0,8,16,0,0,0,0,
5316,0,0,0,0,0,0,157,193,2,0,0,0,0,48,64,530,16,0,0,0,0,0,0,157,193,2,0,0,0,0,48,64,
540,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,33,0,0,0,0,0,64,540,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,33,0,0,0,0,0,64,
550,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,550,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,255,255,0,
560,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,560,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,
...@@ -58,24 +58,32 @@...@@ -58,24 +58,32 @@
580,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,580,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
590,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,590,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
600,110,240,0,0,0,0,0,135,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,0,0,600,110,240,0,0,0,0,0,135,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,0,0,
610,2,0,0,0,0,0,0,255,127,0,0,0,0,0,0,128,3,0,0,0,0,0,120,38,0,0,0,0,0,0,0,0,7,610,0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
620,0,0,128,239,31,0,0,0,0,0,0,0,8,0,3,0,0,0,0,0,192,127,0,28,0,0,0,0,0,0,0,0,0,620,0,0,192,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,255,
630,0,128,211,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,248,7,0,0,3,0,0,0,0,63127,0,0,0,0,0,0,128,3,0,0,0,0,0,120,38,0,32,0,0,0,0,0,0,7,0,0,0,128,239,31,0,
640,0,16,1,0,0,0,192,31,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,640,0,0,0,0,0,8,0,3,0,0,0,0,0,192,127,0,30,0,0,0,0,0,0,0,0,0,0,0,128,211,64,0,0,
6592,0,0,0,0,0,0,0,0,0,0,0,0,0,248,133,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,650,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,248,7,0,0,3,0,0,0,0,0,0,24,1,0,0,0,192,
660,0,0,0,0,0,0,0,0,0,60,176,1,0,0,48,0,0,0,0,0,0,0,0,0,0,248,167,1,0,0,0,0,0,0,6631,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,92,0,0,64,0,0,0,0,0,
670,0,0,0,0,0,40,191,0,0,0,0,0,0,0,0,0,0,0,0,224,188,15,0,0,0,0,0,0,0,0,0,0,0,0,670,0,0,0,0,248,133,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
680,0,0,0,0,0,0,0,0,0,0,0,0,680,60,176,1,0,0,48,0,0,0,
690,126,6,0,0,0,0,248,121,128,0,126,14,0,0,0,0,0,252,127,3,0,0,0,0,0,0,0,0,0,0,690,0,0,0,0,0,0,248,167,1,0,0,0,0,0,0,0,0,0,0,0,0,40,191,0,0,0,0,0,0,0,0,0,0,0,
700,0,0,0,0,0,0,0,127,191,0,0,0,0,0,0,0,0,0,0,252,255,255,252,109,0,0,0,0,0,0,0,700,224,188,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
710,0,0,0,0,0,0,0,126,180,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71128,255,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
720,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,0,127,720,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,12,1,0,0,0,254,7,0,0,0,0,248,121,128,0,
730,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,73126,14,0,0,0,0,0,252,127,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,191,0,0,0,
740,0,0,128,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,740,0,0,0,0,0,0,252,255,255,252,109,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,126,180,191,0,
7596,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,3,248,255,231,15,0,0,750,0,0,0,0,0,0,0,163,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
760,60,0,0,0,0,0,0,0,0,0,760,0,0,0,0,0,0,0,0,0,0,0,0,0,24,
770,0,0,0,0,0,0,0,0,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,770,0,0,0,0,0,0,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
78255,255,255,255,127,248,255,255,255,255,255,31,32,0,16,0,0,248,254,255,0,0,0,780,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,0,127,0,0,0,
790,0,0,0,0,0,0,127,255,255,249,219,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,790,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,
800,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,800,128,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,15,
810,0,0,0,0,0,0,240,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,810,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,3,248,255,231,15,0,0,0,60,0,
820,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
830,0,0,255,255,255,255,255,255,127,248,255,255,255,255,255,31,32,0,16,0,0,248,
84254,255,0,0,0,0,0,0,0,0,0,
850,127,255,255,249,219,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
860,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
870,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
880,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,240,7,0,0,0,0,0,0,0,0,
890,0,0,0,0,0,0,0,0,0,0,0,0,0,
lib/libc/musl/src/ctype/punct.h+86-74
...@@ -8,17 +8,17 @@...@@ -8,17 +8,17 @@
816,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,816,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
916,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,64,16,16,16,16,16,16,16,16,16,916,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,64,16,16,16,16,16,16,16,16,16,
1016,16,16,16,16,16,16,16,16,16,16,16,16,16,65,16,16,66,16,67,68,1016,16,16,16,16,16,16,16,16,16,16,16,16,16,65,16,16,66,16,67,68,
1169,16,70,71,72,16,73,16,16,74,75,76,77,78,16,79,16,80,81,82,83,84,85,86,87,88,1169,16,70,71,72,16,73,16,16,74,75,76,77,78,16,79,80,81,82,83,84,85,86,87,88,89,
1216,89,16,90,91,16,16,16,16,16,16,92,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1290,91,16,92,93,94,95,16,16,16,16,96,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1316,97,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1316,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1416,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1516,16,16,98,99,16,16,100,101,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1416,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1616,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1516,16,16,93,94,16,16,16,95,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1616,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1716,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1716,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1816,16,16,16,16,16,16,16,102,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1816,16,16,16,16,16,16,96,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1916,16,16,103,104,105,106,16,16,107,108,17,17,109,16,16,16,16,16,16,110,111,16,
1916,97,98,99,100,16,16,101,102,17,17,103,16,16,16,16,16,16,16,16,16,16,16,16,2016,16,16,16,112,113,16,16,114,115,116,16,117,118,119,17,17,17,120,121,122,123,
2016,104,105,16,16,16,16,106,16,107,108,109,17,17,17,110,111,112,113,16,16,16,21124,16,16,16,16,
2116,16,
2216,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,2216,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,
23255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,23255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
24255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,254,255,0,252,1,0,0,248,1,24255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,254,255,0,252,1,0,0,248,1,
...@@ -28,25 +28,25 @@...@@ -28,25 +28,25 @@
280,0,0,0,0,0,0,0,0,0,0,0,0,0,252,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,280,0,0,0,0,0,0,0,0,0,0,0,0,0,252,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
290,0,0,252,0,0,0,0,0,230,254,255,255,255,0,64,73,0,0,0,0,0,24,0,255,255,0,216,290,0,0,252,0,0,0,0,0,230,254,255,255,255,0,64,73,0,0,0,0,0,24,0,255,255,0,216,
300,0,0,0,0,0,0,1,0,60,0,0,0,0,0,0,0,0,0,0,0,0,16,224,1,30,0,300,0,0,0,0,0,0,1,0,60,0,0,0,0,0,0,0,0,0,0,0,0,16,224,1,30,0,
3196,255,191,0,0,0,0,0,0,255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,207,3,3196,255,191,0,0,0,0,0,0,255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,207,
320,0,0,3,0,32,255,127,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,252,0,0,0,0,0,32227,0,0,0,3,0,32,255,127,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,7,252,0,0,0,
330,0,0,0,16,0,32,30,0,48,0,1,0,0,0,0,0,0,0,0,16,0,32,0,0,0,0,252,47,0,0,0,0,0,330,0,0,0,0,0,16,0,32,30,0,48,0,1,0,0,0,0,0,0,0,0,16,0,32,0,0,0,0,252,111,0,0,0,
340,0,16,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,32,0,0,0,0,3,224,0,0,0,0,0,0,0,16,340,0,0,0,16,0,32,0,0,0,0,64,0,0,0,0,0,0,0,0,16,0,32,0,0,0,0,3,224,0,0,0,0,0,0,
350,32,0,0,0,0,253,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,255,7,0,0,0,0,0,0,0,0,0,32,0,350,16,0,32,0,0,0,0,253,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,255,7,16,0,0,0,0,0,0,0,0,
360,0,0,0,255,0,0,0,0,0,0,0,16,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,160,0,127,0,3632,0,0,0,0,128,255,16,0,0,0,0,0,0,16,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,160,
370,255,3,0,0,0,0,0,0,0,0,0,4,0,0,0,0,16,0,0,0,0,0,0,128,0,128,192,223,0,12,0,0,370,127,0,0,255,3,0,0,0,0,0,0,0,0,0,4,0,0,0,0,16,0,0,0,0,0,0,128,0,128,192,223,
380,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,380,12,0,0,0,0,0,0,0,0,0,0,0,4,0,31,0,0,0,0,0,
390,254,255,255,255,0,252,255,255,0,0,0,0,0,0,0,0,252,0,0,0,0,0,0,192,255,223,390,254,255,255,255,0,252,255,255,0,0,0,0,0,0,0,0,252,0,0,0,0,0,0,192,255,223,
40255,7,0,0,0,0,0,0,0,0,0,0,128,6,0,252,0,0,24,62,0,0,128,191,0,204,0,0,0,0,0,0,40255,7,0,0,0,0,0,0,0,0,0,0,128,6,0,252,0,0,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,
410,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,96,255,255,255,31,0,0,255,3,0,0,0,0,0,0,0,0,410,0,8,0,0,0,0,0,0,0,0,0,0,0,224,255,255,255,31,0,0,255,3,0,0,0,0,0,0,0,0,0,0,
420,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,420,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
430,0,0,0,0,0,0,0,0,0,96,0,0,1,0,0,24,0,0,0,0,0,0,0,0,0,56,0,0,0,0,16,0,0,0,112,430,0,0,0,0,0,0,0,96,0,0,1,0,0,24,0,0,0,0,0,0,0,0,0,56,0,0,0,0,16,0,0,0,112,0,0,
440,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,0,0,254,127,47,0,0,255,3,255,127,0,0,0,0,0,0,440,0,0,0,0,0,0,0,0,0,0,0,0,48,0,0,254,127,47,0,0,255,3,255,127,0,0,0,0,0,0,0,0,
450,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,49,0,0,0,0,0,450,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,49,0,0,0,0,0,0,0,
460,0,0,0,0,0,0,0,0,0,0,0,0,196,255,255,255,460,0,0,0,0,0,0,0,0,0,0,196,255,255,255,
47255,0,0,0,192,0,0,0,0,0,0,0,0,1,0,224,159,0,0,0,0,127,63,255,127,0,0,0,0,0,0,47255,0,0,0,192,0,0,0,0,0,0,0,0,1,0,224,159,0,0,0,0,127,63,255,127,0,0,0,0,0,0,
480,0,0,0,0,0,0,0,16,0,16,0,0,252,255,255,255,31,0,0,0,0,0,12,0,0,0,0,0,0,64,0,480,0,0,0,0,0,0,0,16,0,16,0,0,252,255,255,255,31,0,0,0,0,0,12,0,0,0,0,0,0,64,0,
4912,240,0,0,0,0,0,0,192,248,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,255,0,255,255,4912,240,0,0,0,0,0,0,128,248,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,255,0,255,255,
50255,33,144,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,50255,33,144,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,
51127,0,224,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,3,224,0,224,0,51127,0,224,251,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,3,224,0,224,0,
52224,0,96,128,248,255,255,255,252,255,255,255,255,255,127,223,255,241,127,255,52224,0,96,128,248,255,255,255,252,255,255,255,255,255,127,223,255,241,127,255,
...@@ -55,22 +55,23 @@...@@ -55,22 +55,23 @@
55255,255,255,255,255,127,0,0,0,255,7,0,0,255,255,255,255,255,255,255,255,255,55255,255,255,255,255,127,0,0,0,255,7,0,0,255,255,255,255,255,255,255,255,255,
56255,63,0,0,0,0,0,0,252,255,56255,63,0,0,0,0,0,0,252,255,
57255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,207,255,255,255,57255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,207,255,255,255,
5863,255,255,255,255,227,255,253,7,0,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5863,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,
590,0,0,0,0,0,0,0,0,0,0,0,224,135,3,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,128,0,0,0,590,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,135,3,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
600,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,127,255,255,255,3,0,0,0,0,0,0,60128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,127,255,255,255,255,0,
61255,255,255,251,255,255,255,255,255,255,255,255,255,255,15,0,255,255,255,255,610,0,0,0,0,255,255,255,251,255,255,255,255,255,255,255,255,255,255,15,0,255,
62255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,62255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
63255,255,255,63,0,0,0,255,15,30,255,255,255,1,252,193,224,0,0,0,0,0,0,0,0,0,0,63255,255,255,255,255,255,63,0,0,0,255,15,30,255,255,255,1,252,193,224,0,0,0,0,
640,30,1,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,640,0,0,0,0,0,0,30,1,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
650,0,255,255,255,255,15,0,0,0,255,255,255,127,255,255,255,255,255,255,255,255,65255,255,0,0,0,0,255,255,255,255,15,0,0,0,255,255,255,127,255,255,255,255,255,
66255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,66255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
67127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,67255,255,255,
68255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,
68255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,127,0,0,0,69255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,127,0,0,0,
690,0,0,192,0,224,0,0,0,0,0,0,0,0,0,0,0,128,15,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,700,0,0,192,0,224,0,0,0,0,0,0,0,0,0,0,0,128,15,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
70255,0,255,255,127,0,3,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71255,0,255,255,127,0,3,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
7168,8,0,0,0,15,255,3,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,16,192,0,0,255,255,3,23,7264,0,0,0,0,15,255,3,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,16,192,0,0,255,255,3,23,
720,0,0,0,0,248,0,0,0,0,8,128,0,0,0,0,0,0,0,0,0,0,8,0,255,63,0,192,32,0,0,0,0,0,730,0,0,0,0,248,0,0,0,0,8,128,0,0,0,0,0,0,0,0,0,0,8,0,255,63,0,192,0,0,0,0,0,0,
730,0,0,0,0,0,0,0,0,240,0,0,128,59,0,0,0,0,0,0,0,128,2,0,0,192,0,0,67,0,0,0,0,0,740,0,0,0,0,0,0,0,0,240,0,0,128,3,0,0,0,0,0,0,0,128,2,0,0,192,0,0,67,0,0,0,0,0,
740,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,0,750,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,0,
750,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,760,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
760,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,2,0,0,0,0,0,0,770,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,2,0,0,0,0,0,0,
...@@ -84,46 +85,57 @@...@@ -84,46 +85,57 @@
840,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,850,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
85128,255,0,0,128,255,0,0,0,0,128,255,0,0,0,0,0,0,0,0,0,248,0,0,192,143,0,0,0,86128,255,0,0,128,255,0,0,0,0,128,255,0,0,0,0,0,0,0,0,0,248,0,0,192,143,0,0,0,
86128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,255,255,252,255,255,255,255,255,0,0,0,0,87128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,255,255,252,255,255,255,255,255,0,0,0,0,
870,0,0,135,255,0,255,1,0,0,0,224,0,0,0,224,0,0,0,0,0,1,0,0,96,248,127,0,0,0,0,880,0,0,135,255,1,255,1,0,0,0,224,0,0,0,224,0,0,0,0,0,1,0,0,96,248,127,0,0,0,0,
880,0,0,0,254,0,0,0,255,0,0,0,255,0,0,0,30,0,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,890,0,0,0,254,0,0,0,255,0,0,0,255,0,0,0,30,0,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
890,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,0,0,0,0,0,0,0,0,0,0,0,900,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,0,0,0,0,0,0,0,0,0,0,0,
900,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,910,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
910,0,0,0,0,0,0,0,0,192,63,252,255,63,0,0,128,3,0,0,0,0,0,0,254,3,0,0,0,0,0,0,0,920,0,0,0,224,127,0,0,0,192,255,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
920,0,0,0,0,0,24,0,15,0,0,0,0,0,56,0,0,0,0,0,0,0,0,0,225,63,0,232,254,255,31,0,930,0,0,0,0,0,0,192,63,252,255,63,0,0,128,3,0,0,0,0,0,0,254,3,32,0,0,0,0,0,0,0,
930,0,0,0,0,0,96,63,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,940,0,0,0,0,24,0,15,0,0,0,0,0,56,0,0,0,0,0,0,0,0,0,225,63,0,232,254,255,31,0,0,
940,16,0,32,0,0,192,31,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,950,0,0,0,0,96,63,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,
95248,0,40,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9624,0,32,0,0,192,31,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,
960,0,0,0,0,0,0,0,0,128,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,128,14,0,0,0,255,31,97248,0,104,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
970,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,252,0,0,0,0,0,0,0,0,0,0,0,980,0,0,0,0,0,0,0,0,0,128,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,128,14,0,0,0,255,
9931,0,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,
1000,0,0,0,0,0,8,0,252,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1010,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,7,0,0,0,0,0,0,0,0,0,0,0,
1020,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,24,128,255,0,0,0,0,0,
1030,0,0,0,0,223,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,62,0,0,252,255,31,3,0,
1040,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0,0,128,0,0,
1050,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1060,0,128,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,
107255,3,
108128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1090,0,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1100,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,0,0,0,0,0,0,0,255,255,48,0,0,248,
1113,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,
112255,255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1130,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,176,15,0,0,0,0,0,0,
1140,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
115255,255,255,255,255,255,255,255,255,255,255,255,255,63,
1160,255,255,255,255,127,254,255,255,255,255,255,255,255,255,255,255,255,255,255,
117255,255,255,255,255,255,255,255,255,255,1,0,0,255,255,255,255,255,255,255,255,
11863,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,15,0,255,255,255,255,255,255,
119255,255,255,255,127,0,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1200,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,8,0,0,0,8,0,0,32,0,0,0,32,0,0,128,
1210,0,0,128,0,0,0,2,0,0,0,2,0,0,8,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,
122255,255,255,255,255,255,255,255,255,15,0,248,254,255,0,0,0,0,0,0,0,0,0,0,0,0,
1230,0,0,0,127,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,0,
125128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,255,127,0,0,0,0,0,0,0,
1260,0,0,0,0,0,112,7,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1270,0,0,0,0,0,0,254,255,255,255,255,255,255,255,31,0,0,0,0,0,0,0,0,0,254,255,
128255,255,255,255,255,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1290,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,255,255,255,255,255,
13015,255,255,255,255,255,255,255,255,255,255,255,255,15,0,255,127,254,255,254,
131255,254,255,255,255,63,0,255,31,255,255,255,255,0,0,0,252,0,0,0,28,0,0,0,252,
132255,255,255,31,0,0,0,0,0,0,192,255,255,255,7,0,255,255,255,255,255,15,255,1,3,
1330,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1340,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
135255,255,255,255,255,255,255,63,0,255,31,255,7,255,255,255,255,255,255,255,255,
136255,255,255,255,255,255,15,0,255,255,255,255,255,255,255,255,255,255,255,1,
137255,15,0,0,255,15,255,255,255,255,255,255,255,0,255,3,255,255,255,255,255,0,
138255,255,255,63,0,0,0,0,0,0,0,0,0,0,255,239,255,255,255,255,255,255,255,255,
139255,255,255,255,123,252,255,255,255,255,231,199,255,255,255,231,255,255,255,
140255,255,255,255,255,255,255,255,255,255,255,255,255,15,0,255,63,15,7,7,0,63,0,
980,0,0,0,0,0,0,0,0,0,0,0,1410,0,0,0,0,0,0,0,0,0,0,0,
990,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,7,0,0,0,0,0,0,
1000,24,128,255,0,0,0,0,0,0,0,0,0,0,223,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
101128,62,0,0,252,255,31,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,
1020,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,
1030,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,
1040,0,0,0,0,0,0,0,0,63,0,0,0,0,0,0,0,128,255,48,0,0,248,3,0,0,0,0,0,0,0,0,0,0,0,
1050,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,7,0,0,0,0,0,0,0,0,0,0,0,
1060,
1070,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,176,15,0,0,0,0,0,0,0,0,0,0,0,255,255,
108255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
109255,255,255,255,255,255,255,255,255,63,0,255,255,255,255,127,254,255,255,255,
110255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
111255,1,0,0,255,255,255,255,255,255,255,255,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1120,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,127,0,255,255,3,0,0,0,0,
1130,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,
1140,8,0,0,0,8,0,0,32,0,0,0,32,0,0,128,0,0,0,128,0,0,0,2,0,0,0,2,0,0,8,0,0,0,0,0,
1150,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,15,0,
116248,254,255,0,0,0,0,0,0,0,0,0,
1170,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,255,127,0,0,0,0,0,0,0,0,
1180,0,0,0,0,112,7,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1190,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,255,255,255,255,255,15,255,
120255,255,255,255,255,255,255,255,255,255,255,15,0,255,127,254,255,254,255,254,
121255,255,255,63,0,255,31,255,255,255,127,0,0,0,252,0,0,0,12,0,0,0,252,255,255,
122255,31,0,0,0,0,0,0,192,255,255,255,7,0,255,255,255,255,255,15,255,1,3,0,63,0,
1230,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,
124255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,255,31,
125255,1,255,255,255,255,255,255,255,255,255,255,255,255,255,255,15,0,255,255,
126255,255,255,255,255,255,255,255,31,0,0,0,0,
1270,255,15,255,255,255,255,255,255,255,0,255,3,255,255,255,255,255,0,255,255,
128255,63,0,0,0,0,0,0,0,0,0,0,255,15,255,255,255,255,255,127,255,31,255,255,255,
12915,0,0,255,255,255,0,0,0,0,0,1,0,255,255,127,0,0,0,
lib/libc/musl/src/ctype/towctrans.c+55-289
...@@ -1,307 +1,73 @@...@@ -1,307 +1,73 @@
1#include <ctype.h>
2#include <stddef.h>
3#include <wctype.h>1#include <wctype.h>
42
5#define CASEMAP(u1,u2,l) { (u1), (l)-(u1), (u2)-(u1)+1 }3static const unsigned char tab[];
6#define CASELACE(u1,u2) CASEMAP((u1),(u2),(u1)+1)
74
8static const struct {5static const unsigned char rulebases[512];
9 unsigned short upper;6static const int rules[];
10 signed char lower;
11 unsigned char len;
12} casemaps[] = {
13 CASEMAP(0xc0,0xde,0xe0),
147
15 CASELACE(0x0100,0x012e),8static const unsigned char exceptions[][2];
16 CASELACE(0x0132,0x0136),
17 CASELACE(0x0139,0x0147),
18 CASELACE(0x014a,0x0176),
19 CASELACE(0x0179,0x017d),
209
21 CASELACE(0x370,0x372),10#include "casemap.h"
22 CASEMAP(0x391,0x3a1,0x3b1),
23 CASEMAP(0x3a3,0x3ab,0x3c3),
24 CASEMAP(0x400,0x40f,0x450),
25 CASEMAP(0x410,0x42f,0x430),
2611
27 CASELACE(0x460,0x480),12static int casemap(unsigned c, int dir)
28 CASELACE(0x48a,0x4be),
29 CASELACE(0x4c1,0x4cd),
30 CASELACE(0x4d0,0x50e),
31
32 CASELACE(0x514,0x52e),
33 CASEMAP(0x531,0x556,0x561),
34
35 CASELACE(0x01a0,0x01a4),
36 CASELACE(0x01b3,0x01b5),
37 CASELACE(0x01cd,0x01db),
38 CASELACE(0x01de,0x01ee),
39 CASELACE(0x01f8,0x021e),
40 CASELACE(0x0222,0x0232),
41 CASELACE(0x03d8,0x03ee),
42
43 CASELACE(0x1e00,0x1e94),
44 CASELACE(0x1ea0,0x1efe),
45
46 CASEMAP(0x1f08,0x1f0f,0x1f00),
47 CASEMAP(0x1f18,0x1f1d,0x1f10),
48 CASEMAP(0x1f28,0x1f2f,0x1f20),
49 CASEMAP(0x1f38,0x1f3f,0x1f30),
50 CASEMAP(0x1f48,0x1f4d,0x1f40),
51
52 CASEMAP(0x1f68,0x1f6f,0x1f60),
53 CASEMAP(0x1f88,0x1f8f,0x1f80),
54 CASEMAP(0x1f98,0x1f9f,0x1f90),
55 CASEMAP(0x1fa8,0x1faf,0x1fa0),
56 CASEMAP(0x1fb8,0x1fb9,0x1fb0),
57 CASEMAP(0x1fba,0x1fbb,0x1f70),
58 CASEMAP(0x1fc8,0x1fcb,0x1f72),
59 CASEMAP(0x1fd8,0x1fd9,0x1fd0),
60 CASEMAP(0x1fda,0x1fdb,0x1f76),
61 CASEMAP(0x1fe8,0x1fe9,0x1fe0),
62 CASEMAP(0x1fea,0x1feb,0x1f7a),
63 CASEMAP(0x1ff8,0x1ff9,0x1f78),
64 CASEMAP(0x1ffa,0x1ffb,0x1f7c),
65
66 CASEMAP(0x13f0,0x13f5,0x13f8),
67 CASELACE(0xa698,0xa69a),
68 CASELACE(0xa796,0xa79e),
69
70 CASELACE(0x246,0x24e),
71 CASELACE(0x510,0x512),
72 CASEMAP(0x2160,0x216f,0x2170),
73 CASEMAP(0x2c00,0x2c2e,0x2c30),
74 CASELACE(0x2c67,0x2c6b),
75 CASELACE(0x2c80,0x2ce2),
76 CASELACE(0x2ceb,0x2ced),
77
78 CASELACE(0xa640,0xa66c),
79 CASELACE(0xa680,0xa696),
80
81 CASELACE(0xa722,0xa72e),
82 CASELACE(0xa732,0xa76e),
83 CASELACE(0xa779,0xa77b),
84 CASELACE(0xa77e,0xa786),
85
86 CASELACE(0xa790,0xa792),
87 CASELACE(0xa7a0,0xa7a8),
88
89 CASELACE(0xa7b4,0xa7b6),
90
91 CASEMAP(0xff21,0xff3a,0xff41),
92 { 0,0,0 }
93};
94
95static const unsigned short pairs[][2] = {
96 { 'I', 0x0131 },
97 { 'S', 0x017f },
98 { 0x0130, 'i' },
99 { 0x0178, 0x00ff },
100 { 0x0181, 0x0253 },
101 { 0x0182, 0x0183 },
102 { 0x0184, 0x0185 },
103 { 0x0186, 0x0254 },
104 { 0x0187, 0x0188 },
105 { 0x0189, 0x0256 },
106 { 0x018a, 0x0257 },
107 { 0x018b, 0x018c },
108 { 0x018e, 0x01dd },
109 { 0x018f, 0x0259 },
110 { 0x0190, 0x025b },
111 { 0x0191, 0x0192 },
112 { 0x0193, 0x0260 },
113 { 0x0194, 0x0263 },
114 { 0x0196, 0x0269 },
115 { 0x0197, 0x0268 },
116 { 0x0198, 0x0199 },
117 { 0x019c, 0x026f },
118 { 0x019d, 0x0272 },
119 { 0x019f, 0x0275 },
120 { 0x01a6, 0x0280 },
121 { 0x01a7, 0x01a8 },
122 { 0x01a9, 0x0283 },
123 { 0x01ac, 0x01ad },
124 { 0x01ae, 0x0288 },
125 { 0x01af, 0x01b0 },
126 { 0x01b1, 0x028a },
127 { 0x01b2, 0x028b },
128 { 0x01b7, 0x0292 },
129 { 0x01b8, 0x01b9 },
130 { 0x01bc, 0x01bd },
131 { 0x01c4, 0x01c6 },
132 { 0x01c4, 0x01c5 },
133 { 0x01c5, 0x01c6 },
134 { 0x01c7, 0x01c9 },
135 { 0x01c7, 0x01c8 },
136 { 0x01c8, 0x01c9 },
137 { 0x01ca, 0x01cc },
138 { 0x01ca, 0x01cb },
139 { 0x01cb, 0x01cc },
140 { 0x01f1, 0x01f3 },
141 { 0x01f1, 0x01f2 },
142 { 0x01f2, 0x01f3 },
143 { 0x01f4, 0x01f5 },
144 { 0x01f6, 0x0195 },
145 { 0x01f7, 0x01bf },
146 { 0x0220, 0x019e },
147 { 0x0386, 0x03ac },
148 { 0x0388, 0x03ad },
149 { 0x0389, 0x03ae },
150 { 0x038a, 0x03af },
151 { 0x038c, 0x03cc },
152 { 0x038e, 0x03cd },
153 { 0x038f, 0x03ce },
154 { 0x0399, 0x0345 },
155 { 0x0399, 0x1fbe },
156 { 0x03a3, 0x03c2 },
157 { 0x03f7, 0x03f8 },
158 { 0x03fa, 0x03fb },
159 { 0x1e60, 0x1e9b },
160 { 0x1e9e, 0xdf },
161
162 { 0x1f59, 0x1f51 },
163 { 0x1f5b, 0x1f53 },
164 { 0x1f5d, 0x1f55 },
165 { 0x1f5f, 0x1f57 },
166 { 0x1fbc, 0x1fb3 },
167 { 0x1fcc, 0x1fc3 },
168 { 0x1fec, 0x1fe5 },
169 { 0x1ffc, 0x1ff3 },
170
171 { 0x23a, 0x2c65 },
172 { 0x23b, 0x23c },
173 { 0x23d, 0x19a },
174 { 0x23e, 0x2c66 },
175 { 0x241, 0x242 },
176 { 0x243, 0x180 },
177 { 0x244, 0x289 },
178 { 0x245, 0x28c },
179 { 0x3f4, 0x3b8 },
180 { 0x3f9, 0x3f2 },
181 { 0x3fd, 0x37b },
182 { 0x3fe, 0x37c },
183 { 0x3ff, 0x37d },
184 { 0x4c0, 0x4cf },
185
186 { 0x2126, 0x3c9 },
187 { 0x212a, 'k' },
188 { 0x212b, 0xe5 },
189 { 0x2132, 0x214e },
190 { 0x2183, 0x2184 },
191 { 0x2c60, 0x2c61 },
192 { 0x2c62, 0x26b },
193 { 0x2c63, 0x1d7d },
194 { 0x2c64, 0x27d },
195 { 0x2c6d, 0x251 },
196 { 0x2c6e, 0x271 },
197 { 0x2c6f, 0x250 },
198 { 0x2c70, 0x252 },
199 { 0x2c72, 0x2c73 },
200 { 0x2c75, 0x2c76 },
201 { 0x2c7e, 0x23f },
202 { 0x2c7f, 0x240 },
203 { 0x2cf2, 0x2cf3 },
204
205 { 0xa77d, 0x1d79 },
206 { 0xa78b, 0xa78c },
207 { 0xa78d, 0x265 },
208 { 0xa7aa, 0x266 },
209
210 { 0x10c7, 0x2d27 },
211 { 0x10cd, 0x2d2d },
212
213 /* bogus greek 'symbol' letters */
214 { 0x376, 0x377 },
215 { 0x39c, 0xb5 },
216 { 0x392, 0x3d0 },
217 { 0x398, 0x3d1 },
218 { 0x3a6, 0x3d5 },
219 { 0x3a0, 0x3d6 },
220 { 0x39a, 0x3f0 },
221 { 0x3a1, 0x3f1 },
222 { 0x395, 0x3f5 },
223 { 0x3cf, 0x3d7 },
224
225 { 0xa7ab, 0x25c },
226 { 0xa7ac, 0x261 },
227 { 0xa7ad, 0x26c },
228 { 0xa7ae, 0x26a },
229 { 0xa7b0, 0x29e },
230 { 0xa7b1, 0x287 },
231 { 0xa7b2, 0x29d },
232 { 0xa7b3, 0xab53 },
233
234 /* special cyrillic lowercase forms */
235 { 0x412, 0x1c80 },
236 { 0x414, 0x1c81 },
237 { 0x41e, 0x1c82 },
238 { 0x421, 0x1c83 },
239 { 0x422, 0x1c84 },
240 { 0x422, 0x1c85 },
241 { 0x42a, 0x1c86 },
242 { 0x462, 0x1c87 },
243 { 0xa64a, 0x1c88 },
244
245 { 0,0 }
246};
247
248
249static wchar_t __towcase(wchar_t wc, int lower)
250{13{
251 int i;14 unsigned b, x, y, v, rt, xb, xn;
252 int lmul = 2*lower-1;15 int r, rd, c0 = c;
253 int lmask = lower-1;16
254 /* no letters with case in these large ranges */17 if (c >= 0x20000) return c;
255 if (!iswalpha(wc)18
256 || (unsigned)wc - 0x0600 <= 0x0fff-0x060019 b = c>>8;
257 || (unsigned)wc - 0x2e00 <= 0xa63f-0x2e0020 c &= 255;
258 || (unsigned)wc - 0xa800 <= 0xab52-0xa80021 x = c/3;
259 || (unsigned)wc - 0xabc0 <= 0xfeff-0xabc0)22 y = c%3;
260 return wc;23
261 /* special case because the diff between upper/lower is too big */24 /* lookup entry in two-level base-6 table */
262 if (lower && (unsigned)wc - 0x10a0 < 0x2e)25 v = tab[tab[b]*86+x];
263 if (wc>0x10c5 && wc != 0x10c7 && wc != 0x10cd) return wc;26 static const int mt[] = { 2048, 342, 57 };
264 else return wc + 0x2d00 - 0x10a0;27 v = (v*mt[y]>>11)%6;
265 if (!lower && (unsigned)wc - 0x2d00 < 0x26)28
266 if (wc>0x2d25 && wc != 0x2d27 && wc != 0x2d2d) return wc;29 /* use the bit vector out of the tables as an index into
267 else return wc + 0x10a0 - 0x2d00;30 * a block-specific set of rules and decode the rule into
268 if (lower && (unsigned)wc - 0x13a0 < 0x50)31 * a type and a case-mapping delta. */
269 return wc + 0xab70 - 0x13a0;32 r = rules[rulebases[b]+v];
270 if (!lower && (unsigned)wc - 0xab70 < 0x50)33 rt = r & 255;
271 return wc + 0x13a0 - 0xab70;34 rd = r >> 8;
272 for (i=0; casemaps[i].len; i++) {35
273 int base = casemaps[i].upper + (lmask & casemaps[i].lower);36 /* rules 0/1 are simple lower/upper case with a delta.
274 if ((unsigned)wc-base < casemaps[i].len) {37 * apply according to desired mapping direction. */
275 if (casemaps[i].lower == 1)38 if (rt < 2) return c0 + (rd & -(rt^dir));
276 return wc + lower - ((wc-casemaps[i].upper)&1);39
277 return wc + lmul*casemaps[i].lower;40 /* binary search. endpoints of the binary search for
41 * this block are stored in the rule delta field. */
42 xn = rd & 0xff;
43 xb = (unsigned)rd >> 8;
44 while (xn) {
45 unsigned try = exceptions[xb+xn/2][0];
46 if (try == c) {
47 r = rules[exceptions[xb+xn/2][1]];
48 rt = r & 255;
49 rd = r >> 8;
50 if (rt < 2) return c0 + (rd & -(rt^dir));
51 /* Hard-coded for the four exceptional titlecase */
52 return c0 + (dir ? -1 : 1);
53 } else if (try > c) {
54 xn /= 2;
55 } else {
56 xb += xn/2;
57 xn -= xn/2;
278 }58 }
279 }59 }
280 for (i=0; pairs[i][1-lower]; i++) {60 return c0;
281 if (pairs[i][1-lower] == wc)
282 return pairs[i][lower];
283 }
284 if ((unsigned)wc - (0x10428 - 0x28*lower) < 0x28)
285 return wc - 0x28 + 0x50*lower;
286 if ((unsigned)wc - (0x104d8 - 0x28*lower) < 0x24)
287 return wc - 0x28 + 0x50*lower;
288 if ((unsigned)wc - (0x10cc0 - 0x40*lower) < 0x33)
289 return wc - 0x40 + 0x80*lower;
290 if ((unsigned)wc - (0x118c0 - 0x20*lower) < 0x20)
291 return wc - 0x20 + 0x40*lower;
292 if ((unsigned)wc - (0x1e922 - 0x22*lower) < 0x22)
293 return wc - 0x22 + 0x44*lower;
294 return wc;
295}61}
29662
297wint_t towupper(wint_t wc)63wint_t towlower(wint_t wc)
298{64{
299 return (unsigned)wc < 128 ? toupper(wc) : __towcase(wc, 0);65 return casemap(wc, 0);
300}66}
30167
302wint_t towlower(wint_t wc)68wint_t towupper(wint_t wc)
303{69{
304 return (unsigned)wc < 128 ? tolower(wc) : __towcase(wc, 1);70 return casemap(wc, 1);
305}71}
30672
307wint_t __towupper_l(wint_t c, locale_t l)73wint_t __towupper_l(wint_t c, locale_t l)
lib/libc/musl/src/ctype/wcwidth.c+1-1
...@@ -23,7 +23,7 @@ int wcwidth(wchar_t wc)...@@ -23,7 +23,7 @@ int wcwidth(wchar_t wc)
23 return -1;23 return -1;
24 if (wc-0x20000U < 0x20000)24 if (wc-0x20000U < 0x20000)
25 return 2;25 return 2;
26 if (wc == 0xe0001 || wc-0xe0020U < 0x5f || wc-0xe0100 < 0xef)26 if (wc == 0xe0001 || wc-0xe0020U < 0x5f || wc-0xe0100U < 0xef)
27 return 0;27 return 0;
28 return 1;28 return 1;
29}29}
lib/libc/musl/src/ctype/wide.h+14-12
...@@ -17,7 +17,7 @@...@@ -17,7 +17,7 @@
1716,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,38,39,16,16,1716,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,38,39,16,16,
1816,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1816,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
1916,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,1916,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
2016,16,16,16,16,16,16,40,41,42,43,44,45,46,16,16,47,16,16,16,16,16,2016,16,16,16,16,16,16,40,41,42,43,44,45,46,47,16,48,49,16,16,16,16,
2116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,2116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,
22255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,22255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
23255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,23255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
...@@ -31,10 +31,10 @@...@@ -31,10 +31,10 @@
31255,255,255,15,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31255,255,255,15,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
32255,255,255,255,255,255,255,255,255,255,255,63,0,0,0,255,15,255,255,255,255,32255,255,255,255,255,255,255,255,255,255,255,63,0,0,0,255,15,255,255,255,255,
33255,255,255,127,254,255,255,255,255,255,255,255,255,255,127,254,255,255,255,33255,255,255,127,254,255,255,255,255,255,255,255,255,255,127,254,255,255,255,
34255,255,255,255,255,255,255,255,255,224,255,255,255,255,127,254,255,255,255,34255,255,255,255,255,255,255,255,255,224,255,255,255,255,255,254,255,255,255,
35255,255,255,255,255,255,255,127,255,255,255,255,255,7,255,255,255,255,15,0,35255,255,255,255,255,255,255,127,255,255,255,255,255,7,255,255,255,255,15,0,
36255,255,255,255,255,127,255,255,255,255,255,0,255,255,255,255,255,255,255,255,36255,255,255,255,255,127,255,255,255,255,255,0,255,255,255,255,255,255,255,255,
37255,255,255,255,255,255,255,255,255,255,255,255,255,127,255,255,255,255,255,37255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
38255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,38255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,
390,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,390,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
40255,31,255,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,40255,31,255,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,
...@@ -43,13 +43,13 @@...@@ -43,13 +43,13 @@
43255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,255,3,0,0,255,255,255,255,247,255,127,15,0,0,43255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,255,3,0,0,255,255,255,255,247,255,127,15,0,0,
440,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,255,255,255,255,255,255,255,440,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,255,255,255,255,255,255,255,
45255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
460,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,255,255,255,255,255,255,255,255,255,255,255,460,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,255,255,255,255,255,255,255,255,255,255,255,
47255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,47255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
480,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,48255,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
49255,255,255,255,255,255,255,255,255,255,255,7,0,255,255,255,127,0,0,0,0,0,0,0,49255,255,255,255,255,255,255,255,255,255,255,255,7,0,255,255,255,127,0,0,0,0,0,
500,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,500,7,0,240,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
51255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,51255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
52255,255,255,255,255,255,255,255,255,255,255,255,52255,255,255,255,255,255,255,255,255,255,255,255,255,255,
5315,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,5315,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,
540,0,0,0,0,0,0,0,0,0,0,0,0,64,254,7,0,0,0,0,0,0,0,0,0,0,0,0,7,0,255,255,255,540,0,0,0,0,0,0,0,0,0,0,0,0,64,254,7,0,0,0,0,0,0,0,0,0,0,0,0,7,0,255,255,255,
55255,255,15,255,1,3,0,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,55255,255,15,255,1,3,0,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,
...@@ -58,6 +58,8 @@...@@ -58,6 +58,8 @@
58255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,58255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
59159,255,255,255,255,255,255,255,63,0,120,255,255,255,0,0,4,0,0,96,0,16,0,0,0,59159,255,255,255,255,255,255,255,63,0,120,255,255,255,0,0,4,0,0,96,0,16,0,0,0,
600,0,0,0,0,0,0,248,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,600,0,0,0,0,0,0,248,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,255,255,
61255,255,255,255,255,255,63,16,7,0,0,24,240,1,0,0,255,255,255,255,255,127,255,61255,255,255,255,255,255,63,16,39,0,0,24,240,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
6231,255,255,255,15,0,0,255,255,255,0,0,0,0,0,1,0,255,255,127,0,0,620,0,0,0,0,0,0,0,0,0,0,0,255,15,0,
630,630,0,224,255,255,255,255,255,255,255,255,255,255,255,255,123,252,255,255,255,
64255,231,199,255,255,255,231,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,
650,15,7,7,0,63,0,0,0,0,0,0,0,0,0,0,0,0,0,
lib/libc/musl/src/fenv/riscv64/fenv.S+4-1
...@@ -45,8 +45,11 @@ fegetenv:...@@ -45,8 +45,11 @@ fegetenv:
45.global fesetenv45.global fesetenv
46.type fesetenv, %function46.type fesetenv, %function
47fesetenv:47fesetenv:
48 li t2, -1
49 li t1, 0
50 beq a0, t2, 1f
48 lw t1, 0(a0)51 lw t1, 0(a0)
49 fscsr t0, t1521: fscsr t1
50 li a0, 053 li a0, 0
51 ret54 ret
5255
lib/libc/musl/src/internal/dynlink.h-1
...@@ -96,7 +96,6 @@ struct fdpic_dummy_loadmap {...@@ -96,7 +96,6 @@ struct fdpic_dummy_loadmap {
96#define DYN_CNT 3296#define DYN_CNT 32
9797
98typedef void (*stage2_func)(unsigned char *, size_t *);98typedef void (*stage2_func)(unsigned char *, size_t *);
99typedef void (*stage3_func)(size_t *);
10099
101hidden void *__dlsym(void *restrict, const char *restrict, void *restrict);100hidden void *__dlsym(void *restrict, const char *restrict, void *restrict);
102101
lib/libc/musl/src/internal/floatscan.c+1-4
...@@ -33,9 +33,6 @@...@@ -33,9 +33,6 @@
3333
34#define MASK (KMAX-1)34#define MASK (KMAX-1)
3535
36#define CONCAT2(x,y) x ## y
37#define CONCAT(x,y) CONCAT2(x,y)
38
39static long long scanexp(FILE *f, int pok)36static long long scanexp(FILE *f, int pok)
40{37{
41 int c;38 int c;
...@@ -301,7 +298,7 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po...@@ -301,7 +298,7 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po
301 y -= bias;298 y -= bias;
302299
303 if ((e2+LDBL_MANT_DIG & INT_MAX) > emax-5) {300 if ((e2+LDBL_MANT_DIG & INT_MAX) > emax-5) {
304 if (fabs(y) >= CONCAT(0x1p, LDBL_MANT_DIG)) {301 if (fabsl(y) >= 2/LDBL_EPSILON) {
305 if (denormal && bits==LDBL_MANT_DIG+e2-emin)302 if (denormal && bits==LDBL_MANT_DIG+e2-emin)
306 denormal = 0;303 denormal = 0;
307 y *= 0.5;304 y *= 0.5;
lib/libc/musl/src/internal/syscall.h+46
...@@ -193,6 +193,45 @@ hidden long __syscall_ret(unsigned long),...@@ -193,6 +193,45 @@ hidden long __syscall_ret(unsigned long),
193#define SYS_sendfile SYS_sendfile64193#define SYS_sendfile SYS_sendfile64
194#endif194#endif
195195
196#ifndef SYS_timer_settime
197#define SYS_timer_settime SYS_timer_settime32
198#endif
199
200#ifndef SYS_timer_gettime
201#define SYS_timer_gettime SYS_timer_gettime32
202#endif
203
204#ifndef SYS_timerfd_settime
205#define SYS_timerfd_settime SYS_timerfd_settime32
206#endif
207
208#ifndef SYS_timerfd_gettime
209#define SYS_timerfd_gettime SYS_timerfd_gettime32
210#endif
211
212#ifndef SYS_clock_settime
213#define SYS_clock_settime SYS_clock_settime32
214#endif
215
216#ifndef SYS_clock_gettime
217#define SYS_clock_gettime SYS_clock_gettime32
218#endif
219
220#ifndef SYS_clock_getres
221#define SYS_clock_getres SYS_clock_getres_time32
222#endif
223
224#ifndef SYS_clock_nanosleep
225#define SYS_clock_nanosleep SYS_clock_nanosleep_time32
226#endif
227
228#ifndef SYS_gettimeofday
229#define SYS_gettimeofday SYS_gettimeofday_time32
230#endif
231
232#ifndef SYS_settimeofday
233#define SYS_settimeofday SYS_settimeofday_time32
234#endif
196235
197/* Ensure that the plain syscall names are defined even for "time64-only"236/* Ensure that the plain syscall names are defined even for "time64-only"
198 * archs. These facilitate callers passing null time arguments, and make237 * archs. These facilitate callers passing null time arguments, and make
...@@ -306,6 +345,13 @@ hidden long __syscall_ret(unsigned long),...@@ -306,6 +345,13 @@ hidden long __syscall_ret(unsigned long),
306#define SO_SNDTIMEO_OLD 21345#define SO_SNDTIMEO_OLD 21
307#endif346#endif
308347
348#define SO_TIMESTAMP_OLD 29
349#define SO_TIMESTAMPNS_OLD 35
350#define SO_TIMESTAMPING_OLD 37
351#define SCM_TIMESTAMP_OLD SO_TIMESTAMP_OLD
352#define SCM_TIMESTAMPNS_OLD SO_TIMESTAMPNS_OLD
353#define SCM_TIMESTAMPING_OLD SO_TIMESTAMPING_OLD
354
309#ifndef SIOCGSTAMP_OLD355#ifndef SIOCGSTAMP_OLD
310#define SIOCGSTAMP_OLD 0x8906356#define SIOCGSTAMP_OLD 0x8906
311#endif357#endif
lib/libc/musl/src/internal/version.h+1-1
...@@ -1 +1 @@...@@ -1 +1 @@
1#define VERSION "1.1.24"1#define VERSION "1.2.0"
lib/libc/musl/src/ldso/__dlsym.c+4
...@@ -8,3 +8,7 @@ static void *stub_dlsym(void *restrict p, const char *restrict s, void *restrict...@@ -8,3 +8,7 @@ static void *stub_dlsym(void *restrict p, const char *restrict s, void *restrict
8}8}
99
10weak_alias(stub_dlsym, __dlsym);10weak_alias(stub_dlsym, __dlsym);
11
12#if _REDIR_TIME64
13weak_alias(stub_dlsym, __dlsym_redir_time64);
14#endif
lib/libc/musl/src/ldso/arm/dlsym_time64.S created+3
...@@ -0,0 +1,3 @@
1#define __dlsym __dlsym_redir_time64
2#define dlsym __dlsym_time64
3#include "dlsym.s"
lib/libc/musl/src/ldso/i386/dlsym_time64.S created+3
...@@ -0,0 +1,3 @@
1#define __dlsym __dlsym_redir_time64
2#define dlsym __dlsym_time64
3#include "dlsym.s"
lib/libc/musl/src/ldso/m68k/dlsym_time64.S created+3
...@@ -0,0 +1,3 @@
1#define __dlsym __dlsym_redir_time64
2#define dlsym __dlsym_time64
3#include "dlsym.s"
lib/libc/musl/src/ldso/microblaze/dlsym_time64.S created+3
...@@ -0,0 +1,3 @@
1#define __dlsym __dlsym_redir_time64
2#define dlsym __dlsym_time64
3#include "dlsym.s"
lib/libc/musl/src/ldso/mips/dlsym_time64.S created+3
...@@ -0,0 +1,3 @@
1#define __dlsym __dlsym_redir_time64
2#define dlsym __dlsym_time64
3#include "dlsym.s"
lib/libc/musl/src/ldso/mipsn32/dlsym_time64.S created+3
...@@ -0,0 +1,3 @@
1#define __dlsym __dlsym_redir_time64
2#define dlsym __dlsym_time64
3#include "dlsym.s"
lib/libc/musl/src/ldso/or1k/dlsym_time64.S created+3
...@@ -0,0 +1,3 @@
1#define __dlsym __dlsym_redir_time64
2#define dlsym __dlsym_time64
3#include "dlsym.s"
lib/libc/musl/src/ldso/powerpc/dlsym_time64.S created+3
...@@ -0,0 +1,3 @@
1#define __dlsym __dlsym_redir_time64
2#define dlsym __dlsym_time64
3#include "dlsym.s"
lib/libc/musl/src/ldso/sh/dlsym_time64.S created+3
...@@ -0,0 +1,3 @@
1#define __dlsym __dlsym_redir_time64
2#define dlsym __dlsym_time64
3#include "dlsym.s"
lib/libc/musl/src/linux/clock_adjtime.c+46-11
...@@ -94,21 +94,56 @@ int clock_adjtime (clockid_t clock_id, struct timex *utx)...@@ -94,21 +94,56 @@ int clock_adjtime (clockid_t clock_id, struct timex *utx)
94 return __syscall_ret(-ENOTSUP);94 return __syscall_ret(-ENOTSUP);
95#endif95#endif
96 if (sizeof(time_t) > sizeof(long)) {96 if (sizeof(time_t) > sizeof(long)) {
97 union {97 struct ktimex ktx = {
98 struct timex utx;98 .modes = utx->modes,
99 struct ktimex ktx;99 .offset = utx->offset,
100 } u = { *utx };100 .freq = utx->freq,
101 u.ktx.time_sec = utx->time.tv_sec;101 .maxerror = utx->maxerror,
102 u.ktx.time_usec = utx->time.tv_usec;102 .esterror = utx->esterror,
103 .status = utx->status,
104 .constant = utx->constant,
105 .precision = utx->precision,
106 .tolerance = utx->tolerance,
107 .time_sec = utx->time.tv_sec,
108 .time_usec = utx->time.tv_usec,
109 .tick = utx->tick,
110 .ppsfreq = utx->ppsfreq,
111 .jitter = utx->jitter,
112 .shift = utx->shift,
113 .stabil = utx->stabil,
114 .jitcnt = utx->jitcnt,
115 .calcnt = utx->calcnt,
116 .errcnt = utx->errcnt,
117 .stbcnt = utx->stbcnt,
118 .tai = utx->tai,
119 };
103#ifdef SYS_adjtimex120#ifdef SYS_adjtimex
104 if (clock_id==CLOCK_REALTIME) r = __syscall(SYS_adjtimex, &u);121 if (clock_id==CLOCK_REALTIME) r = __syscall(SYS_adjtimex, &ktx);
105 else122 else
106#endif123#endif
107 r = __syscall(SYS_clock_adjtime, clock_id, &u);124 r = __syscall(SYS_clock_adjtime, clock_id, &ktx);
108 if (r>=0) {125 if (r>=0) {
109 *utx = u.utx;126 utx->modes = ktx.modes;
110 utx->time.tv_sec = u.ktx.time_sec;127 utx->offset = ktx.offset;
111 utx->time.tv_usec = u.ktx.time_usec;128 utx->freq = ktx.freq;
129 utx->maxerror = ktx.maxerror;
130 utx->esterror = ktx.esterror;
131 utx->status = ktx.status;
132 utx->constant = ktx.constant;
133 utx->precision = ktx.precision;
134 utx->tolerance = ktx.tolerance;
135 utx->time.tv_sec = ktx.time_sec;
136 utx->time.tv_usec = ktx.time_usec;
137 utx->tick = ktx.tick;
138 utx->ppsfreq = ktx.ppsfreq;
139 utx->jitter = ktx.jitter;
140 utx->shift = ktx.shift;
141 utx->stabil = ktx.stabil;
142 utx->jitcnt = ktx.jitcnt;
143 utx->calcnt = ktx.calcnt;
144 utx->errcnt = ktx.errcnt;
145 utx->stbcnt = ktx.stbcnt;
146 utx->tai = ktx.tai;
112 }147 }
113 return __syscall_ret(r);148 return __syscall_ret(r);
114 }149 }
lib/libc/musl/src/linux/wait4.c+32-2
...@@ -1,9 +1,39 @@...@@ -1,9 +1,39 @@
1#define _GNU_SOURCE1#define _GNU_SOURCE
2#include <sys/wait.h>2#include <sys/wait.h>
3#include <sys/resource.h>3#include <sys/resource.h>
4#include <string.h>
5#include <errno.h>
4#include "syscall.h"6#include "syscall.h"
57
6pid_t wait4(pid_t pid, int *status, int options, struct rusage *usage)8pid_t wait4(pid_t pid, int *status, int options, struct rusage *ru)
7{9{
8 return syscall(SYS_wait4, pid, status, options, usage);10 int r;
11#ifdef SYS_wait4_time64
12 if (ru) {
13 long long kru64[18];
14 r = __syscall(SYS_wait4_time64, pid, status, options, kru64);
15 if (!r) {
16 ru->ru_utime = (struct timeval)
17 { .tv_sec = kru64[0], .tv_usec = kru64[1] };
18 ru->ru_stime = (struct timeval)
19 { .tv_sec = kru64[2], .tv_usec = kru64[3] };
20 char *slots = (char *)&ru->ru_maxrss;
21 for (int i=0; i<14; i++)
22 *(long *)(slots + i*sizeof(long)) = kru64[4+i];
23 }
24 if (SYS_wait4_time64 == SYS_wait4 || r != -ENOSYS)
25 return __syscall_ret(r);
26 }
27#endif
28 char *dest = ru ? (char *)&ru->ru_maxrss - 4*sizeof(long) : 0;
29 r = __syscall(SYS_wait4, pid, status, options, dest);
30 if (r>0 && ru && sizeof(time_t) > sizeof(long)) {
31 long kru[4];
32 memcpy(kru, dest, 4*sizeof(long));
33 ru->ru_utime = (struct timeval)
34 { .tv_sec = kru[0], .tv_usec = kru[1] };
35 ru->ru_stime = (struct timeval)
36 { .tv_sec = kru[2], .tv_usec = kru[3] };
37 }
38 return __syscall_ret(r);
9}39}
lib/libc/musl/src/math/i386/acos.s+3-13
...@@ -1,22 +1,10 @@...@@ -1,22 +1,10 @@
1# use acos(x) = atan2(fabs(sqrt((1-x)*(1+x))), x)1# use acos(x) = atan2(fabs(sqrt((1-x)*(1+x))), x)
22
3.global acosf
4.type acosf,@function
5acosf:
6 flds 4(%esp)
7 jmp 1f
8
9.global acosl
10.type acosl,@function
11acosl:
12 fldt 4(%esp)
13 jmp 1f
14
15.global acos3.global acos
16.type acos,@function4.type acos,@function
17acos:5acos:
18 fldl 4(%esp)6 fldl 4(%esp)
191: fld %st(0)7 fld %st(0)
20 fld18 fld1
21 fsub %st(0),%st(1)9 fsub %st(0),%st(1)
22 fadd %st(2)10 fadd %st(2)
...@@ -25,4 +13,6 @@ acos:...@@ -25,4 +13,6 @@ acos:
25 fabs # fix sign of zero (matters in downward rounding mode)13 fabs # fix sign of zero (matters in downward rounding mode)
26 fxch %st(1)14 fxch %st(1)
27 fpatan15 fpatan
16 fstpl 4(%esp)
17 fldl 4(%esp)
28 ret18 ret
lib/libc/musl/src/math/i386/acosf.s+16-1
...@@ -1 +1,16 @@...@@ -1 +1,16 @@
1# see acos.s1.global acosf
2.type acosf,@function
3acosf:
4 flds 4(%esp)
5 fld %st(0)
6 fld1
7 fsub %st(0),%st(1)
8 fadd %st(2)
9 fmulp
10 fsqrt
11 fabs # fix sign of zero (matters in downward rounding mode)
12 fxch %st(1)
13 fpatan
14 fstps 4(%esp)
15 flds 4(%esp)
16 ret
lib/libc/musl/src/math/i386/acosl.s+14-1
...@@ -1 +1,14 @@...@@ -1 +1,14 @@
1# see acos.s1.global acosl
2.type acosl,@function
3acosl:
4 fldt 4(%esp)
5 fld %st(0)
6 fld1
7 fsub %st(0),%st(1)
8 fadd %st(2)
9 fmulp
10 fsqrt
11 fabs # fix sign of zero (matters in downward rounding mode)
12 fxch %st(1)
13 fpatan
14 ret
lib/libc/musl/src/math/i386/asin.s+7-25
...@@ -1,23 +1,3 @@...@@ -1,23 +1,3 @@
1.global asinf
2.type asinf,@function
3asinf:
4 flds 4(%esp)
5 mov 4(%esp),%eax
6 add %eax,%eax
7 cmp $0x01000000,%eax
8 jae 1f
9 # subnormal x, return x with underflow
10 fld %st(0)
11 fmul %st(1)
12 fstps 4(%esp)
13 ret
14
15.global asinl
16.type asinl,@function
17asinl:
18 fldt 4(%esp)
19 jmp 1f
20
21.global asin1.global asin
22.type asin,@function2.type asin,@function
23asin:3asin:
...@@ -25,15 +5,17 @@ asin:...@@ -25,15 +5,17 @@ asin:
25 mov 8(%esp),%eax5 mov 8(%esp),%eax
26 add %eax,%eax6 add %eax,%eax
27 cmp $0x00200000,%eax7 cmp $0x00200000,%eax
28 jae 1f8 jb 1f
29 # subnormal x, return x with underflow9 fld %st(0)
30 fsts 4(%esp)
31 ret
321: fld %st(0)
33 fld110 fld1
34 fsub %st(0),%st(1)11 fsub %st(0),%st(1)
35 fadd %st(2)12 fadd %st(2)
36 fmulp13 fmulp
37 fsqrt14 fsqrt
38 fpatan15 fpatan
16 fstpl 4(%esp)
17 fldl 4(%esp)
18 ret
19 # subnormal x, return x with underflow
201: fsts 4(%esp)
39 ret21 ret
lib/libc/musl/src/math/i386/asinf.s+23-1
...@@ -1 +1,23 @@...@@ -1 +1,23 @@
1# see asin.s1.global asinf
2.type asinf,@function
3asinf:
4 flds 4(%esp)
5 mov 4(%esp),%eax
6 add %eax,%eax
7 cmp $0x01000000,%eax
8 jb 1f
9 fld %st(0)
10 fld1
11 fsub %st(0),%st(1)
12 fadd %st(2)
13 fmulp
14 fsqrt
15 fpatan
16 fstps 4(%esp)
17 flds 4(%esp)
18 ret
19 # subnormal x, return x with underflow
201: fld %st(0)
21 fmul %st(1)
22 fstps 4(%esp)
23 ret
lib/libc/musl/src/math/i386/asinl.s+12-1
...@@ -1 +1,12 @@...@@ -1 +1,12 @@
1# see asin.s1.global asinl
2.type asinl,@function
3asinl:
4 fldt 4(%esp)
5 fld %st(0)
6 fld1
7 fsub %st(0),%st(1)
8 fadd %st(2)
9 fmulp
10 fsqrt
11 fpatan
12 ret
lib/libc/musl/src/math/i386/atan.s+2
...@@ -8,6 +8,8 @@ atan:...@@ -8,6 +8,8 @@ atan:
8 jb 1f8 jb 1f
9 fld19 fld1
10 fpatan10 fpatan
11 fstpl 4(%esp)
12 fldl 4(%esp)
11 ret13 ret
12 # subnormal x, return x with underflow14 # subnormal x, return x with underflow
131: fsts 4(%esp)151: fsts 4(%esp)
lib/libc/musl/src/math/i386/atan2.s+2-1
...@@ -4,7 +4,8 @@ atan2:...@@ -4,7 +4,8 @@ atan2:
4 fldl 4(%esp)4 fldl 4(%esp)
5 fldl 12(%esp)5 fldl 12(%esp)
6 fpatan6 fpatan
7 fstl 4(%esp)7 fstpl 4(%esp)
8 fldl 4(%esp)
8 mov 8(%esp),%eax9 mov 8(%esp),%eax
9 add %eax,%eax10 add %eax,%eax
10 cmp $0x00200000,%eax11 cmp $0x00200000,%eax
lib/libc/musl/src/math/i386/atan2f.s+2-1
...@@ -4,7 +4,8 @@ atan2f:...@@ -4,7 +4,8 @@ atan2f:
4 flds 4(%esp)4 flds 4(%esp)
5 flds 8(%esp)5 flds 8(%esp)
6 fpatan6 fpatan
7 fsts 4(%esp)7 fstps 4(%esp)
8 flds 4(%esp)
8 mov 4(%esp),%eax9 mov 4(%esp),%eax
9 add %eax,%eax10 add %eax,%eax
10 cmp $0x01000000,%eax11 cmp $0x01000000,%eax
lib/libc/musl/src/math/i386/atanf.s+2
...@@ -8,6 +8,8 @@ atanf:...@@ -8,6 +8,8 @@ atanf:
8 jb 1f8 jb 1f
9 fld19 fld1
10 fpatan10 fpatan
11 fstps 4(%esp)
12 flds 4(%esp)
11 ret13 ret
12 # subnormal x, return x with underflow14 # subnormal x, return x with underflow
131: fld %st(0)151: fld %st(0)
lib/libc/musl/src/math/i386/exp.s deleted-146
...@@ -1,146 +0,0 @@
1.global expm1f
2.type expm1f,@function
3expm1f:
4 flds 4(%esp)
5 mov 4(%esp),%eax
6 add %eax,%eax
7 cmp $0x01000000,%eax
8 jae 1f
9 # subnormal x, return x with underflow
10 fld %st(0)
11 fmul %st(1)
12 fstps 4(%esp)
13 ret
14
15.global expm1l
16.type expm1l,@function
17expm1l:
18 fldt 4(%esp)
19 jmp 1f
20
21.global expm1
22.type expm1,@function
23expm1:
24 fldl 4(%esp)
25 mov 8(%esp),%eax
26 add %eax,%eax
27 cmp $0x00200000,%eax
28 jae 1f
29 # subnormal x, return x with underflow
30 fsts 4(%esp)
31 ret
321: fldl2e
33 fmulp
34 mov $0xc2820000,%eax
35 push %eax
36 flds (%esp)
37 pop %eax
38 fucomp %st(1)
39 fnstsw %ax
40 sahf
41 fld1
42 jb 1f
43 # x*log2e < -65, return -1 without underflow
44 fstp %st(1)
45 fchs
46 ret
471: fld %st(1)
48 fabs
49 fucom %st(1)
50 fnstsw %ax
51 fstp %st(0)
52 fstp %st(0)
53 sahf
54 ja 1f
55 f2xm1
56 ret
571: call 1f
58 fld1
59 fsubrp
60 ret
61
62.global exp2f
63.type exp2f,@function
64exp2f:
65 flds 4(%esp)
66 jmp 1f
67
68.global exp2l
69.global __exp2l
70.hidden __exp2l
71.type exp2l,@function
72exp2l:
73__exp2l:
74 fldt 4(%esp)
75 jmp 1f
76
77.global expf
78.type expf,@function
79expf:
80 flds 4(%esp)
81 jmp 2f
82
83.global exp
84.type exp,@function
85exp:
86 fldl 4(%esp)
872: fldl2e
88 fmulp
89 jmp 1f
90
91.global exp2
92.type exp2,@function
93exp2:
94 fldl 4(%esp)
951: sub $12,%esp
96 fld %st(0)
97 fstpt (%esp)
98 mov 8(%esp),%ax
99 and $0x7fff,%ax
100 cmp $0x3fff+13,%ax
101 jb 4f # |x| < 8192
102 cmp $0x3fff+15,%ax
103 jae 3f # |x| >= 32768
104 fsts (%esp)
105 cmpl $0xc67ff800,(%esp)
106 jb 2f # x > -16382
107 movl $0x5f000000,(%esp)
108 flds (%esp) # 0x1p63
109 fld %st(1)
110 fsub %st(1)
111 faddp
112 fucomp %st(1)
113 fnstsw
114 sahf
115 je 2f # x - 0x1p63 + 0x1p63 == x
116 movl $1,(%esp)
117 flds (%esp) # 0x1p-149
118 fdiv %st(1)
119 fstps (%esp) # raise underflow
1202: fld1
121 fld %st(1)
122 frndint
123 fxch %st(2)
124 fsub %st(2) # st(0)=x-rint(x), st(1)=1, st(2)=rint(x)
125 f2xm1
126 faddp # 2^(x-rint(x))
1271: fscale
128 fstp %st(1)
129 add $12,%esp
130 ret
1313: xor %eax,%eax
1324: cmp $0x3fff-64,%ax
133 fld1
134 jb 1b # |x| < 0x1p-64
135 fstpt (%esp)
136 fistl 8(%esp)
137 fildl 8(%esp)
138 fsubrp %st(1)
139 addl $0x3fff,8(%esp)
140 f2xm1
141 fld1
142 faddp # 2^(x-rint(x))
143 fldt (%esp) # 2^rint(x)
144 fmulp
145 add $12,%esp
146 ret
lib/libc/musl/src/math/i386/exp2.s deleted-1
...@@ -1 +0,0 @@
1# see exp.s
lib/libc/musl/src/math/i386/exp2f.s deleted-1
...@@ -1 +0,0 @@
1# see exp.s
lib/libc/musl/src/math/i386/exp2l.s+1-1
...@@ -1 +1 @@...@@ -1 +1 @@
1# see exp.s1# see exp_ld.s
lib/libc/musl/src/math/i386/exp_ld.s created+93
...@@ -0,0 +1,93 @@
1.global expm1l
2.type expm1l,@function
3expm1l:
4 fldt 4(%esp)
5 fldl2e
6 fmulp
7 mov $0xc2820000,%eax
8 push %eax
9 flds (%esp)
10 pop %eax
11 fucomp %st(1)
12 fnstsw %ax
13 sahf
14 fld1
15 jb 1f
16 # x*log2e < -65, return -1 without underflow
17 fstp %st(1)
18 fchs
19 ret
201: fld %st(1)
21 fabs
22 fucom %st(1)
23 fnstsw %ax
24 fstp %st(0)
25 fstp %st(0)
26 sahf
27 ja 1f
28 f2xm1
29 ret
301: call 1f
31 fld1
32 fsubrp
33 ret
34
35.global exp2l
36.global __exp2l
37.hidden __exp2l
38.type exp2l,@function
39exp2l:
40__exp2l:
41 fldt 4(%esp)
421: sub $12,%esp
43 fld %st(0)
44 fstpt (%esp)
45 mov 8(%esp),%ax
46 and $0x7fff,%ax
47 cmp $0x3fff+13,%ax
48 jb 4f # |x| < 8192
49 cmp $0x3fff+15,%ax
50 jae 3f # |x| >= 32768
51 fsts (%esp)
52 cmpl $0xc67ff800,(%esp)
53 jb 2f # x > -16382
54 movl $0x5f000000,(%esp)
55 flds (%esp) # 0x1p63
56 fld %st(1)
57 fsub %st(1)
58 faddp
59 fucomp %st(1)
60 fnstsw
61 sahf
62 je 2f # x - 0x1p63 + 0x1p63 == x
63 movl $1,(%esp)
64 flds (%esp) # 0x1p-149
65 fdiv %st(1)
66 fstps (%esp) # raise underflow
672: fld1
68 fld %st(1)
69 frndint
70 fxch %st(2)
71 fsub %st(2) # st(0)=x-rint(x), st(1)=1, st(2)=rint(x)
72 f2xm1
73 faddp # 2^(x-rint(x))
741: fscale
75 fstp %st(1)
76 add $12,%esp
77 ret
783: xor %eax,%eax
794: cmp $0x3fff-64,%ax
80 fld1
81 jb 1b # |x| < 0x1p-64
82 fstpt (%esp)
83 fistl 8(%esp)
84 fildl 8(%esp)
85 fsubrp %st(1)
86 addl $0x3fff,8(%esp)
87 f2xm1
88 fld1
89 faddp # 2^(x-rint(x))
90 fldt (%esp) # 2^rint(x)
91 fmulp
92 add $12,%esp
93 ret
lib/libc/musl/src/math/i386/expf.s deleted-1
...@@ -1 +0,0 @@
1# see exp.s
lib/libc/musl/src/math/i386/expm1.s deleted-1
...@@ -1 +0,0 @@
1# see exp.s
lib/libc/musl/src/math/i386/expm1f.s deleted-1
...@@ -1 +0,0 @@
1# see exp.s
lib/libc/musl/src/math/i386/expm1l.s+1-1
...@@ -1 +1 @@...@@ -1 +1 @@
1# see exp.s1# see exp_ld.s
lib/libc/musl/src/math/i386/log.s+2
...@@ -4,4 +4,6 @@ log:...@@ -4,4 +4,6 @@ log:
4 fldln24 fldln2
5 fldl 4(%esp)5 fldl 4(%esp)
6 fyl2x6 fyl2x
7 fstpl 4(%esp)
8 fldl 4(%esp)
7 ret9 ret
lib/libc/musl/src/math/i386/log10.s+2
...@@ -4,4 +4,6 @@ log10:...@@ -4,4 +4,6 @@ log10:
4 fldlg24 fldlg2
5 fldl 4(%esp)5 fldl 4(%esp)
6 fyl2x6 fyl2x
7 fstpl 4(%esp)
8 fldl 4(%esp)
7 ret9 ret
lib/libc/musl/src/math/i386/log10f.s+2
...@@ -4,4 +4,6 @@ log10f:...@@ -4,4 +4,6 @@ log10f:
4 fldlg24 fldlg2
5 flds 4(%esp)5 flds 4(%esp)
6 fyl2x6 fyl2x
7 fstps 4(%esp)
8 flds 4(%esp)
7 ret9 ret
lib/libc/musl/src/math/i386/log1p.s+4
...@@ -10,10 +10,14 @@ log1p:...@@ -10,10 +10,14 @@ log1p:
10 cmp $0x00100000,%eax10 cmp $0x00100000,%eax
11 jb 2f11 jb 2f
12 fyl2xp112 fyl2xp1
13 fstpl 4(%esp)
14 fldl 4(%esp)
13 ret15 ret
141: fld1161: fld1
15 faddp17 faddp
16 fyl2x18 fyl2x
19 fstpl 4(%esp)
20 fldl 4(%esp)
17 ret21 ret
18 # subnormal x, return x with underflow22 # subnormal x, return x with underflow
192: fsts 4(%esp)232: fsts 4(%esp)
lib/libc/musl/src/math/i386/log1pf.s+4
...@@ -10,10 +10,14 @@ log1pf:...@@ -10,10 +10,14 @@ log1pf:
10 cmp $0x00800000,%eax10 cmp $0x00800000,%eax
11 jb 2f11 jb 2f
12 fyl2xp112 fyl2xp1
13 fstps 4(%esp)
14 flds 4(%esp)
13 ret15 ret
141: fld1161: fld1
15 faddp17 faddp
16 fyl2x18 fyl2x
19 fstps 4(%esp)
20 flds 4(%esp)
17 ret21 ret
18 # subnormal x, return x with underflow22 # subnormal x, return x with underflow
192: fxch232: fxch
lib/libc/musl/src/math/i386/log2.s+2
...@@ -4,4 +4,6 @@ log2:...@@ -4,4 +4,6 @@ log2:
4 fld14 fld1
5 fldl 4(%esp)5 fldl 4(%esp)
6 fyl2x6 fyl2x
7 fstpl 4(%esp)
8 fldl 4(%esp)
7 ret9 ret
lib/libc/musl/src/math/i386/log2f.s+2
...@@ -4,4 +4,6 @@ log2f:...@@ -4,4 +4,6 @@ log2f:
4 fld14 fld1
5 flds 4(%esp)5 flds 4(%esp)
6 fyl2x6 fyl2x
7 fstps 4(%esp)
8 flds 4(%esp)
7 ret9 ret
lib/libc/musl/src/math/i386/logf.s+2
...@@ -4,4 +4,6 @@ logf:...@@ -4,4 +4,6 @@ logf:
4 fldln24 fldln2
5 flds 4(%esp)5 flds 4(%esp)
6 fyl2x6 fyl2x
7 fstps 4(%esp)
8 flds 4(%esp)
7 ret9 ret
lib/libc/musl/src/math/mips/fabs.c created+16
...@@ -0,0 +1,16 @@
1#if !defined(__mips_soft_float) && defined(__mips_abs2008)
2
3#include <math.h>
4
5double fabs(double x)
6{
7 double r;
8 __asm__("abs.d %0,%1" : "=f"(r) : "f"(x));
9 return r;
10}
11
12#else
13
14#include "../fabs.c"
15
16#endif
lib/libc/musl/src/math/mips/fabsf.c created+16
...@@ -0,0 +1,16 @@
1#if !defined(__mips_soft_float) && defined(__mips_abs2008)
2
3#include <math.h>
4
5float fabsf(float x)
6{
7 float r;
8 __asm__("abs.s %0,%1" : "=f"(r) : "f"(x));
9 return r;
10}
11
12#else
13
14#include "../fabsf.c"
15
16#endif
lib/libc/musl/src/math/mips/sqrt.c created+16
...@@ -0,0 +1,16 @@
1#if !defined(__mips_soft_float) && __mips >= 3
2
3#include <math.h>
4
5double sqrt(double x)
6{
7 double r;
8 __asm__("sqrt.d %0,%1" : "=f"(r) : "f"(x));
9 return r;
10}
11
12#else
13
14#include "../sqrt.c"
15
16#endif
lib/libc/musl/src/math/mips/sqrtf.c created+16
...@@ -0,0 +1,16 @@
1#if !defined(__mips_soft_float) && __mips >= 2
2
3#include <math.h>
4
5float sqrtf(float x)
6{
7 float r;
8 __asm__("sqrt.s %0,%1" : "=f"(r) : "f"(x));
9 return r;
10}
11
12#else
13
14#include "../sqrtf.c"
15
16#endif
lib/libc/musl/src/math/powerpc/fabs.c+1-1
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1#include <math.h>1#include <math.h>
22
3#ifdef _SOFT_FLOAT3#if defined(_SOFT_FLOAT) || defined(BROKEN_PPC_D_ASM)
44
5#include "../fabs.c"5#include "../fabs.c"
66
lib/libc/musl/src/math/powerpc/fma.c+1-1
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1#include <math.h>1#include <math.h>
22
3#ifdef _SOFT_FLOAT3#if defined(_SOFT_FLOAT) || defined(BROKEN_PPC_D_ASM)
44
5#include "../fma.c"5#include "../fma.c"
66
lib/libc/musl/src/math/x32/lrintl.s+2-2
...@@ -2,6 +2,6 @@...@@ -2,6 +2,6 @@
2.type lrintl,@function2.type lrintl,@function
3lrintl:3lrintl:
4 fldt 8(%esp)4 fldt 8(%esp)
5 fistpll 8(%esp)5 fistpl 8(%esp)
6 mov 8(%esp),%rax6 movl 8(%esp),%eax
7 ret7 ret
lib/libc/musl/src/misc/getrusage.c+29-1
...@@ -1,7 +1,35 @@...@@ -1,7 +1,35 @@
1#include <sys/resource.h>1#include <sys/resource.h>
2#include <string.h>
3#include <errno.h>
2#include "syscall.h"4#include "syscall.h"
35
4int getrusage(int who, struct rusage *ru)6int getrusage(int who, struct rusage *ru)
5{7{
6 return syscall(SYS_getrusage, who, ru);8 int r;
9#ifdef SYS_getrusage_time64
10 long long kru64[18];
11 r = __syscall(SYS_getrusage_time64, who, kru64);
12 if (!r) {
13 ru->ru_utime = (struct timeval)
14 { .tv_sec = kru64[0], .tv_usec = kru64[1] };
15 ru->ru_stime = (struct timeval)
16 { .tv_sec = kru64[2], .tv_usec = kru64[3] };
17 char *slots = (char *)&ru->ru_maxrss;
18 for (int i=0; i<14; i++)
19 *(long *)(slots + i*sizeof(long)) = kru64[4+i];
20 }
21 if (SYS_getrusage_time64 == SYS_getrusage || r != -ENOSYS)
22 return __syscall_ret(r);
23#endif
24 char *dest = (char *)&ru->ru_maxrss - 4*sizeof(long);
25 r = __syscall(SYS_getrusage, who, dest);
26 if (!r && sizeof(time_t) > sizeof(long)) {
27 long kru[4];
28 memcpy(kru, dest, 4*sizeof(long));
29 ru->ru_utime = (struct timeval)
30 { .tv_sec = kru[0], .tv_usec = kru[1] };
31 ru->ru_stime = (struct timeval)
32 { .tv_sec = kru[2], .tv_usec = kru[3] };
33 }
34 return __syscall_ret(r);
7}35}
lib/libc/musl/src/misc/ioctl.c+119-17
...@@ -3,8 +3,115 @@...@@ -3,8 +3,115 @@
3#include <errno.h>3#include <errno.h>
4#include <time.h>4#include <time.h>
5#include <sys/time.h>5#include <sys/time.h>
6#include <stddef.h>
7#include <string.h>
6#include "syscall.h"8#include "syscall.h"
79
10#define alignof(t) offsetof(struct { char c; t x; }, x)
11
12#define W 1
13#define R 2
14#define WR 3
15
16struct ioctl_compat_map {
17 int new_req, old_req;
18 unsigned char old_size, dir, force_align, noffs;
19 unsigned char offsets[8];
20};
21
22#define NINTH(a,b,c,d,e,f,g,h,i,...) i
23#define COUNT(...) NINTH(__VA_ARGS__,8,7,6,5,4,3,2,1,0)
24#define OFFS(...) COUNT(__VA_ARGS__), { __VA_ARGS__ }
25
26/* yields a type for a struct with original size n, with a misaligned
27 * timeval/timespec expanded from 32- to 64-bit. for use with ioctl
28 * number producing macros; only size of result is meaningful. */
29#define new_misaligned(n) struct { int i; time_t t; char c[(n)-4]; }
30
31static const struct ioctl_compat_map compat_map[] = {
32 { SIOCGSTAMP, SIOCGSTAMP_OLD, 8, R, 0, OFFS(0, 4) },
33 { SIOCGSTAMPNS, SIOCGSTAMPNS_OLD, 8, R, 0, OFFS(0, 4) },
34
35 /* SNDRV_TIMER_IOCTL_STATUS */
36 { _IOR('T', 0x14, char[96]), _IOR('T', 0x14, 88), 88, R, 0, OFFS(0,4) },
37
38 /* SNDRV_PCM_IOCTL_STATUS[_EXT] */
39 { _IOR('A', 0x20, char[128]), _IOR('A', 0x20, char[108]), 108, R, 1, OFFS(4,8,12,16,52,56,60,64) },
40 { _IOWR('A', 0x24, char[128]), _IOWR('A', 0x24, char[108]), 108, WR, 1, OFFS(4,8,12,16,52,56,60,64) },
41
42 /* SNDRV_RAWMIDI_IOCTL_STATUS */
43 { _IOWR('W', 0x20, char[48]), _IOWR('W', 0x20, char[36]), 36, WR, 1, OFFS(4,8) },
44
45 /* SNDRV_PCM_IOCTL_SYNC_PTR - with 3 subtables */
46 { _IOWR('A', 0x23, char[136]), _IOWR('A', 0x23, char[132]), 0, WR, 1, 0 },
47 { 0, 0, 4, WR, 1, 0 }, /* snd_pcm_sync_ptr (flags only) */
48 { 0, 0, 32, WR, 1, OFFS(8,12,16,24,28) }, /* snd_pcm_mmap_status */
49 { 0, 0, 8, WR, 1, OFFS(0,4) }, /* snd_pcm_mmap_control */
50
51 /* VIDIOC_QUERYBUF, VIDIOC_QBUF, VIDIOC_DQBUF, VIDIOC_PREPARE_BUF */
52 { _IOWR('V', 9, new_misaligned(72)), _IOWR('V', 9, char[72]), 72, WR, 0, OFFS(20) },
53 { _IOWR('V', 15, new_misaligned(72)), _IOWR('V', 15, char[72]), 72, WR, 0, OFFS(20) },
54 { _IOWR('V', 17, new_misaligned(72)), _IOWR('V', 17, char[72]), 72, WR, 0, OFFS(20) },
55 { _IOWR('V', 93, new_misaligned(72)), _IOWR('V', 93, char[72]), 72, WR, 0, OFFS(20) },
56
57 /* VIDIOC_DQEVENT */
58 { _IOR('V', 89, new_misaligned(96)), _IOR('V', 89, char[96]), 96, R, 0, OFFS(76,80) },
59
60 /* VIDIOC_OMAP3ISP_STAT_REQ */
61 { _IOWR('V', 192+6, char[32]), _IOWR('V', 192+6, char[24]), 22, WR, 0, OFFS(0,4) },
62
63 /* PPPIOCGIDLE */
64 { _IOR('t', 63, char[16]), _IOR('t', 63, char[8]), 8, R, 0, OFFS(0,4) },
65
66 /* PPGETTIME, PPSETTIME */
67 { _IOR('p', 0x95, char[16]), _IOR('p', 0x95, char[8]), 8, R, 0, OFFS(0,4) },
68 { _IOW('p', 0x96, char[16]), _IOW('p', 0x96, char[8]), 8, W, 0, OFFS(0,4) },
69
70 /* LPSETTIMEOUT */
71 { _IOW(0x6, 0xf, char[16]), 0x060f, 8, W, 0, OFFS(0,4) },
72};
73
74static void convert_ioctl_struct(const struct ioctl_compat_map *map, char *old, char *new, int dir)
75{
76 int new_offset = 0;
77 int old_offset = 0;
78 int old_size = map->old_size;
79 if (!(dir & map->dir)) return;
80 if (!map->old_size) {
81 /* offsets hard-coded for SNDRV_PCM_IOCTL_SYNC_PTR;
82 * if another exception appears this needs changing. */
83 convert_ioctl_struct(map+1, old, new, dir);
84 convert_ioctl_struct(map+2, old+4, new+8, dir);
85 convert_ioctl_struct(map+3, old+68, new+72, dir);
86 return;
87 }
88 for (int i=0; i < map->noffs; i++) {
89 int ts_offset = map->offsets[i];
90 int len = ts_offset-old_offset;
91 if (dir==W) memcpy(old+old_offset, new+new_offset, len);
92 else memcpy(new+new_offset, old+old_offset, len);
93 new_offset += len;
94 old_offset += len;
95 long long new_ts;
96 long old_ts;
97 int align = map->force_align ? sizeof(time_t) : alignof(time_t);
98 new_offset += (align-1) & -new_offset;
99 if (dir==W) {
100 memcpy(&new_ts, new+new_offset, sizeof new_ts);
101 old_ts = new_ts;
102 memcpy(old+old_offset, &old_ts, sizeof old_ts);
103 } else {
104 memcpy(&old_ts, old+old_offset, sizeof old_ts);
105 new_ts = old_ts;
106 memcpy(new+new_offset, &new_ts, sizeof new_ts);
107 }
108 new_offset += sizeof new_ts;
109 old_offset += sizeof old_ts;
110 }
111 if (dir==W) memcpy(old+old_offset, new+new_offset, old_size-old_offset);
112 else memcpy(new+new_offset, old+old_offset, old_size-old_offset);
113}
114
8int ioctl(int fd, int req, ...)115int ioctl(int fd, int req, ...)
9{116{
10 void *arg;117 void *arg;
...@@ -13,23 +120,18 @@ int ioctl(int fd, int req, ...)...@@ -13,23 +120,18 @@ int ioctl(int fd, int req, ...)
13 arg = va_arg(ap, void *);120 arg = va_arg(ap, void *);
14 va_end(ap);121 va_end(ap);
15 int r = __syscall(SYS_ioctl, fd, req, arg);122 int r = __syscall(SYS_ioctl, fd, req, arg);
16 if (r==-ENOTTY) switch (req) {123 if (SIOCGSTAMP != SIOCGSTAMP_OLD && req && r==-ENOTTY) {
17 case SIOCGSTAMP:124 for (int i=0; i<sizeof compat_map/sizeof *compat_map; i++) {
18 case SIOCGSTAMPNS:125 if (compat_map[i].new_req != req) continue;
19 if (SIOCGSTAMP==SIOCGSTAMP_OLD) break;126 union {
20 if (req==SIOCGSTAMP) req=SIOCGSTAMP_OLD;127 long long align;
21 if (req==SIOCGSTAMPNS) req=SIOCGSTAMPNS_OLD;128 char buf[256];
22 long t32[2];129 } u;
23 r = __syscall(SYS_ioctl, fd, req, t32);130 convert_ioctl_struct(&compat_map[i], u.buf, arg, W);
24 if (r<0) break;131 r = __syscall(SYS_ioctl, fd, compat_map[i].old_req, u.buf);
25 if (req==SIOCGSTAMP_OLD) {132 if (r<0) break;
26 struct timeval *tv = arg;133 convert_ioctl_struct(&compat_map[i], u.buf, arg, R);
27 tv->tv_sec = t32[0];134 break;
28 tv->tv_usec = t32[1];
29 } else {
30 struct timespec *ts = arg;
31 ts->tv_sec = t32[0];
32 ts->tv_nsec = t32[1];
33 }135 }
34 }136 }
35 return __syscall_ret(r);137 return __syscall_ret(r);
lib/libc/musl/src/misc/pty.c+3-1
...@@ -7,7 +7,9 @@...@@ -7,7 +7,9 @@
77
8int posix_openpt(int flags)8int posix_openpt(int flags)
9{9{
10 return open("/dev/ptmx", flags);10 int r = open("/dev/ptmx", flags);
11 if (r < 0 && errno == ENOSPC) errno = EAGAIN;
12 return r;
11}13}
1214
13int grantpt(int fd)15int grantpt(int fd)
lib/libc/musl/src/network/getsockopt.c+9
...@@ -26,6 +26,15 @@ int getsockopt(int fd, int level, int optname, void *restrict optval, socklen_t...@@ -26,6 +26,15 @@ int getsockopt(int fd, int level, int optname, void *restrict optval, socklen_t
26 tv->tv_sec = tv32[0];26 tv->tv_sec = tv32[0];
27 tv->tv_usec = tv32[1];27 tv->tv_usec = tv32[1];
28 *optlen = sizeof *tv;28 *optlen = sizeof *tv;
29 break;
30 case SO_TIMESTAMP:
31 case SO_TIMESTAMPNS:
32 if (SO_TIMESTAMP == SO_TIMESTAMP_OLD) break;
33 if (optname==SO_TIMESTAMP) optname=SO_TIMESTAMP_OLD;
34 if (optname==SO_TIMESTAMPNS) optname=SO_TIMESTAMPNS_OLD;
35 r = __socketcall(getsockopt, fd, level,
36 optname, optval, optlen, 0);
37 break;
29 }38 }
30 }39 }
31 return __syscall_ret(r);40 return __syscall_ret(r);
lib/libc/musl/src/network/recvmmsg.c+10-4
...@@ -8,6 +8,8 @@...@@ -8,6 +8,8 @@
8#define IS32BIT(x) !((x)+0x80000000ULL>>32)8#define IS32BIT(x) !((x)+0x80000000ULL>>32)
9#define CLAMP(x) (int)(IS32BIT(x) ? (x) : 0x7fffffffU+((0ULL+(x))>>63))9#define CLAMP(x) (int)(IS32BIT(x) ? (x) : 0x7fffffffU+((0ULL+(x))>>63))
1010
11hidden void __convert_scm_timestamps(struct msghdr *, socklen_t);
12
11int recvmmsg(int fd, struct mmsghdr *msgvec, unsigned int vlen, unsigned int flags, struct timespec *timeout)13int recvmmsg(int fd, struct mmsghdr *msgvec, unsigned int vlen, unsigned int flags, struct timespec *timeout)
12{14{
13#if LONG_MAX > INT_MAX15#if LONG_MAX > INT_MAX
...@@ -19,14 +21,18 @@ int recvmmsg(int fd, struct mmsghdr *msgvec, unsigned int vlen, unsigned int fla...@@ -19,14 +21,18 @@ int recvmmsg(int fd, struct mmsghdr *msgvec, unsigned int vlen, unsigned int fla
19#ifdef SYS_recvmmsg_time6421#ifdef SYS_recvmmsg_time64
20 time_t s = timeout ? timeout->tv_sec : 0;22 time_t s = timeout ? timeout->tv_sec : 0;
21 long ns = timeout ? timeout->tv_nsec : 0;23 long ns = timeout ? timeout->tv_nsec : 0;
22 int r = -ENOSYS;24 int r = __syscall_cp(SYS_recvmmsg_time64, fd, msgvec, vlen, flags,
23 if (SYS_recvmmsg == SYS_recvmmsg_time64 || !IS32BIT(s))
24 r = __syscall_cp(SYS_recvmmsg_time64, fd, msgvec, vlen, flags,
25 timeout ? ((long long[]){s, ns}) : 0);25 timeout ? ((long long[]){s, ns}) : 0);
26 if (SYS_recvmmsg == SYS_recvmmsg_time64 || r!=-ENOSYS)26 if (SYS_recvmmsg == SYS_recvmmsg_time64 || r!=-ENOSYS)
27 return __syscall_ret(r);27 return __syscall_ret(r);
28 return syscall_cp(SYS_recvmmsg, fd, msgvec, vlen, flags,28 if (vlen > IOV_MAX) vlen = IOV_MAX;
29 socklen_t csize[vlen];
30 for (int i=0; i<vlen; i++) csize[i] = msgvec[i].msg_hdr.msg_controllen;
31 r = __syscall_cp(SYS_recvmmsg, fd, msgvec, vlen, flags,
29 timeout ? ((long[]){CLAMP(s), ns}) : 0);32 timeout ? ((long[]){CLAMP(s), ns}) : 0);
33 for (int i=0; i<r; i++)
34 __convert_scm_timestamps(&msgvec[i].msg_hdr, csize[i]);
35 return __syscall_ret(r);
30#else36#else
31 return syscall_cp(SYS_recvmmsg, fd, msgvec, vlen, flags, timeout);37 return syscall_cp(SYS_recvmmsg, fd, msgvec, vlen, flags, timeout);
32#endif38#endif
lib/libc/musl/src/network/recvmsg.c+47
...@@ -1,10 +1,56 @@...@@ -1,10 +1,56 @@
1#include <sys/socket.h>1#include <sys/socket.h>
2#include <limits.h>2#include <limits.h>
3#include <time.h>
4#include <sys/time.h>
5#include <string.h>
3#include "syscall.h"6#include "syscall.h"
47
8hidden void __convert_scm_timestamps(struct msghdr *, socklen_t);
9
10void __convert_scm_timestamps(struct msghdr *msg, socklen_t csize)
11{
12 if (SCM_TIMESTAMP == SCM_TIMESTAMP_OLD) return;
13 if (!msg->msg_control || !msg->msg_controllen) return;
14
15 struct cmsghdr *cmsg, *last=0;
16 long tmp;
17 long long tvts[2];
18 int type = 0;
19
20 for (cmsg=CMSG_FIRSTHDR(msg); cmsg; cmsg=CMSG_NXTHDR(msg, cmsg)) {
21 if (cmsg->cmsg_level==SOL_SOCKET) switch (cmsg->cmsg_type) {
22 case SCM_TIMESTAMP_OLD:
23 if (type) break;
24 type = SCM_TIMESTAMP;
25 goto common;
26 case SCM_TIMESTAMPNS_OLD:
27 type = SCM_TIMESTAMPNS;
28 common:
29 memcpy(&tmp, CMSG_DATA(cmsg), sizeof tmp);
30 tvts[0] = tmp;
31 memcpy(&tmp, CMSG_DATA(cmsg) + sizeof tmp, sizeof tmp);
32 tvts[1] = tmp;
33 break;
34 }
35 last = cmsg;
36 }
37 if (!last || !type) return;
38 if (CMSG_SPACE(sizeof tvts) > csize-msg->msg_controllen) {
39 msg->msg_flags |= MSG_CTRUNC;
40 return;
41 }
42 msg->msg_controllen += CMSG_SPACE(sizeof tvts);
43 cmsg = CMSG_NXTHDR(msg, last);
44 cmsg->cmsg_level = SOL_SOCKET;
45 cmsg->cmsg_type = type;
46 cmsg->cmsg_len = CMSG_LEN(sizeof tvts);
47 memcpy(CMSG_DATA(cmsg), &tvts, sizeof tvts);
48}
49
5ssize_t recvmsg(int fd, struct msghdr *msg, int flags)50ssize_t recvmsg(int fd, struct msghdr *msg, int flags)
6{51{
7 ssize_t r;52 ssize_t r;
53 socklen_t orig_controllen = msg->msg_controllen;
8#if LONG_MAX > INT_MAX54#if LONG_MAX > INT_MAX
9 struct msghdr h, *orig = msg;55 struct msghdr h, *orig = msg;
10 if (msg) {56 if (msg) {
...@@ -14,6 +60,7 @@ ssize_t recvmsg(int fd, struct msghdr *msg, int flags)...@@ -14,6 +60,7 @@ ssize_t recvmsg(int fd, struct msghdr *msg, int flags)
14 }60 }
15#endif61#endif
16 r = socketcall_cp(recvmsg, fd, msg, flags, 0, 0, 0);62 r = socketcall_cp(recvmsg, fd, msg, flags, 0, 0, 0);
63 if (r >= 0) __convert_scm_timestamps(msg, orig_controllen);
17#if LONG_MAX > INT_MAX64#if LONG_MAX > INT_MAX
18 if (orig) *orig = h;65 if (orig) *orig = h;
19#endif66#endif
lib/libc/musl/src/network/setsockopt.c+9
...@@ -31,6 +31,15 @@ int setsockopt(int fd, int level, int optname, const void *optval, socklen_t opt...@@ -31,6 +31,15 @@ int setsockopt(int fd, int level, int optname, const void *optval, socklen_t opt
3131
32 r = __socketcall(setsockopt, fd, level, optname,32 r = __socketcall(setsockopt, fd, level, optname,
33 ((long[]){s, CLAMP(us)}), 2*sizeof(long), 0);33 ((long[]){s, CLAMP(us)}), 2*sizeof(long), 0);
34 break;
35 case SO_TIMESTAMP:
36 case SO_TIMESTAMPNS:
37 if (SO_TIMESTAMP == SO_TIMESTAMP_OLD) break;
38 if (optname==SO_TIMESTAMP) optname=SO_TIMESTAMP_OLD;
39 if (optname==SO_TIMESTAMPNS) optname=SO_TIMESTAMPNS_OLD;
40 r = __socketcall(setsockopt, fd, level,
41 optname, optval, optlen, 0);
42 break;
34 }43 }
35 }44 }
36 return __syscall_ret(r);45 return __syscall_ret(r);
lib/libc/musl/src/signal/arm/sigsetjmp.s+3-2
...@@ -6,9 +6,10 @@...@@ -6,9 +6,10 @@
6sigsetjmp:6sigsetjmp:
7__sigsetjmp:7__sigsetjmp:
8 tst r1,r18 tst r1,r1
9 beq setjmp9 bne 1f
10 b setjmp
1011
11 str lr,[r0,#256]121: str lr,[r0,#256]
12 str r4,[r0,#260+8]13 str r4,[r0,#260+8]
13 mov r4,r014 mov r4,r0
1415
lib/libc/musl/src/stat/__xstat.c+4
...@@ -1,5 +1,7 @@...@@ -1,5 +1,7 @@
1#include <sys/stat.h>1#include <sys/stat.h>
22
3#if !_REDIR_TIME64
4
3int __fxstat(int ver, int fd, struct stat *buf)5int __fxstat(int ver, int fd, struct stat *buf)
4{6{
5 return fstat(fd, buf);7 return fstat(fd, buf);
...@@ -25,6 +27,8 @@ weak_alias(__fxstatat, __fxstatat64);...@@ -25,6 +27,8 @@ weak_alias(__fxstatat, __fxstatat64);
25weak_alias(__lxstat, __lxstat64);27weak_alias(__lxstat, __lxstat64);
26weak_alias(__xstat, __xstat64);28weak_alias(__xstat, __xstat64);
2729
30#endif
31
28int __xmknod(int ver, const char *path, mode_t mode, dev_t *dev)32int __xmknod(int ver, const char *path, mode_t mode, dev_t *dev)
29{33{
30 return mknod(path, mode, *dev);34 return mknod(path, mode, *dev);
lib/libc/musl/src/stat/fchmodat.c+2-1
...@@ -2,6 +2,7 @@...@@ -2,6 +2,7 @@
2#include <fcntl.h>2#include <fcntl.h>
3#include <errno.h>3#include <errno.h>
4#include "syscall.h"4#include "syscall.h"
5#include "kstat.h"
56
6int fchmodat(int fd, const char *path, mode_t mode, int flag)7int fchmodat(int fd, const char *path, mode_t mode, int flag)
7{8{
...@@ -10,7 +11,7 @@ int fchmodat(int fd, const char *path, mode_t mode, int flag)...@@ -10,7 +11,7 @@ int fchmodat(int fd, const char *path, mode_t mode, int flag)
10 if (flag != AT_SYMLINK_NOFOLLOW)11 if (flag != AT_SYMLINK_NOFOLLOW)
11 return __syscall_ret(-EINVAL);12 return __syscall_ret(-EINVAL);
1213
13 struct stat st;14 struct kstat st;
14 int ret, fd2;15 int ret, fd2;
15 char proc[15+3*sizeof(int)];16 char proc[15+3*sizeof(int)];
1617
lib/libc/musl/src/stat/fstat.c+2
...@@ -10,4 +10,6 @@ int fstat(int fd, struct stat *st)...@@ -10,4 +10,6 @@ int fstat(int fd, struct stat *st)
10 return fstatat(fd, "", st, AT_EMPTY_PATH);10 return fstatat(fd, "", st, AT_EMPTY_PATH);
11}11}
1212
13#if !_REDIR_TIME64
13weak_alias(fstat, fstat64);14weak_alias(fstat, fstat64);
15#endif
lib/libc/musl/src/stat/fstatat.c+18
...@@ -57,6 +57,14 @@ static int fstatat_statx(int fd, const char *restrict path, struct stat *restric...@@ -57,6 +57,14 @@ static int fstatat_statx(int fd, const char *restrict path, struct stat *restric
57 .st_mtim.tv_nsec = stx.stx_mtime.tv_nsec,57 .st_mtim.tv_nsec = stx.stx_mtime.tv_nsec,
58 .st_ctim.tv_sec = stx.stx_ctime.tv_sec,58 .st_ctim.tv_sec = stx.stx_ctime.tv_sec,
59 .st_ctim.tv_nsec = stx.stx_ctime.tv_nsec,59 .st_ctim.tv_nsec = stx.stx_ctime.tv_nsec,
60#if _REDIR_TIME64
61 .__st_atim32.tv_sec = stx.stx_atime.tv_sec,
62 .__st_atim32.tv_nsec = stx.stx_atime.tv_nsec,
63 .__st_mtim32.tv_sec = stx.stx_mtime.tv_sec,
64 .__st_mtim32.tv_nsec = stx.stx_mtime.tv_nsec,
65 .__st_ctim32.tv_sec = stx.stx_ctime.tv_sec,
66 .__st_ctim32.tv_nsec = stx.stx_ctime.tv_nsec,
67#endif
60 };68 };
61 return 0;69 return 0;
62}70}
...@@ -110,6 +118,14 @@ static int fstatat_kstat(int fd, const char *restrict path, struct stat *restric...@@ -110,6 +118,14 @@ static int fstatat_kstat(int fd, const char *restrict path, struct stat *restric
110 .st_mtim.tv_nsec = kst.st_mtime_nsec,118 .st_mtim.tv_nsec = kst.st_mtime_nsec,
111 .st_ctim.tv_sec = kst.st_ctime_sec,119 .st_ctim.tv_sec = kst.st_ctime_sec,
112 .st_ctim.tv_nsec = kst.st_ctime_nsec,120 .st_ctim.tv_nsec = kst.st_ctime_nsec,
121#if _REDIR_TIME64
122 .__st_atim32.tv_sec = kst.st_atime_sec,
123 .__st_atim32.tv_nsec = kst.st_atime_nsec,
124 .__st_mtim32.tv_sec = kst.st_mtime_sec,
125 .__st_mtim32.tv_nsec = kst.st_mtime_nsec,
126 .__st_ctim32.tv_sec = kst.st_ctime_sec,
127 .__st_ctim32.tv_nsec = kst.st_ctime_nsec,
128#endif
113 };129 };
114130
115 return 0;131 return 0;
...@@ -126,4 +142,6 @@ int fstatat(int fd, const char *restrict path, struct stat *restrict st, int fla...@@ -126,4 +142,6 @@ int fstatat(int fd, const char *restrict path, struct stat *restrict st, int fla
126 return __syscall_ret(ret);142 return __syscall_ret(ret);
127}143}
128144
145#if !_REDIR_TIME64
129weak_alias(fstatat, fstatat64);146weak_alias(fstatat, fstatat64);
147#endif
lib/libc/musl/src/stat/lstat.c+2
...@@ -6,4 +6,6 @@ int lstat(const char *restrict path, struct stat *restrict buf)...@@ -6,4 +6,6 @@ int lstat(const char *restrict path, struct stat *restrict buf)
6 return fstatat(AT_FDCWD, path, buf, AT_SYMLINK_NOFOLLOW);6 return fstatat(AT_FDCWD, path, buf, AT_SYMLINK_NOFOLLOW);
7}7}
88
9#if !_REDIR_TIME64
9weak_alias(lstat, lstat64);10weak_alias(lstat, lstat64);
11#endif
lib/libc/musl/src/stat/stat.c+2
...@@ -6,4 +6,6 @@ int stat(const char *restrict path, struct stat *restrict buf)...@@ -6,4 +6,6 @@ int stat(const char *restrict path, struct stat *restrict buf)
6 return fstatat(AT_FDCWD, path, buf, 0);6 return fstatat(AT_FDCWD, path, buf, 0);
7}7}
88
9#if !_REDIR_TIME64
9weak_alias(stat, stat64);10weak_alias(stat, stat64);
11#endif
lib/libc/musl/src/stdio/tempnam.c+3-2
...@@ -6,6 +6,7 @@...@@ -6,6 +6,7 @@
6#include <string.h>6#include <string.h>
7#include <stdlib.h>7#include <stdlib.h>
8#include "syscall.h"8#include "syscall.h"
9#include "kstat.h"
910
10#define MAXTRIES 10011#define MAXTRIES 100
1112
...@@ -37,10 +38,10 @@ char *tempnam(const char *dir, const char *pfx)...@@ -37,10 +38,10 @@ char *tempnam(const char *dir, const char *pfx)
37 for (try=0; try<MAXTRIES; try++) {38 for (try=0; try<MAXTRIES; try++) {
38 __randname(s+l-6);39 __randname(s+l-6);
39#ifdef SYS_lstat40#ifdef SYS_lstat
40 r = __syscall(SYS_lstat, s, &(struct stat){0});41 r = __syscall(SYS_lstat, s, &(struct kstat){0});
41#else42#else
42 r = __syscall(SYS_fstatat, AT_FDCWD, s,43 r = __syscall(SYS_fstatat, AT_FDCWD, s,
43 &(struct stat){0}, AT_SYMLINK_NOFOLLOW);44 &(struct kstat){0}, AT_SYMLINK_NOFOLLOW);
44#endif45#endif
45 if (r == -ENOENT) return strdup(s);46 if (r == -ENOENT) return strdup(s);
46 }47 }
lib/libc/musl/src/stdio/tmpnam.c+3-2
...@@ -5,6 +5,7 @@...@@ -5,6 +5,7 @@
5#include <string.h>5#include <string.h>
6#include <stdlib.h>6#include <stdlib.h>
7#include "syscall.h"7#include "syscall.h"
8#include "kstat.h"
89
9#define MAXTRIES 10010#define MAXTRIES 100
1011
...@@ -17,10 +18,10 @@ char *tmpnam(char *buf)...@@ -17,10 +18,10 @@ char *tmpnam(char *buf)
17 for (try=0; try<MAXTRIES; try++) {18 for (try=0; try<MAXTRIES; try++) {
18 __randname(s+12);19 __randname(s+12);
19#ifdef SYS_lstat20#ifdef SYS_lstat
20 r = __syscall(SYS_lstat, s, &(struct stat){0});21 r = __syscall(SYS_lstat, s, &(struct kstat){0});
21#else22#else
22 r = __syscall(SYS_fstatat, AT_FDCWD, s,23 r = __syscall(SYS_fstatat, AT_FDCWD, s,
23 &(struct stat){0}, AT_SYMLINK_NOFOLLOW);24 &(struct kstat){0}, AT_SYMLINK_NOFOLLOW);
24#endif25#endif
25 if (r == -ENOENT) return strcpy(buf ? buf : internal, s);26 if (r == -ENOENT) return strcpy(buf ? buf : internal, s);
26 }27 }
lib/libc/musl/src/stdio/ungetc.c+1-1
...@@ -16,5 +16,5 @@ int ungetc(int c, FILE *f)...@@ -16,5 +16,5 @@ int ungetc(int c, FILE *f)
16 f->flags &= ~F_EOF;16 f->flags &= ~F_EOF;
1717
18 FUNLOCK(f);18 FUNLOCK(f);
19 return c;19 return (unsigned char)c;
20}20}
lib/libc/musl/src/string/arm/memcpy.c+1-1
...@@ -1,3 +1,3 @@...@@ -1,3 +1,3 @@
1#if __ARMEB__ || __thumb__1#if __ARMEB__
2#include "../memcpy.c"2#include "../memcpy.c"
3#endif3#endif
lib/libc/musl/src/string/arm/memcpy_le.S+8-5
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1#if !__ARMEB__ && !__thumb__1#if !__ARMEB__
22
3/*3/*
4 * Copyright (C) 2008 The Android Open Source Project4 * Copyright (C) 2008 The Android Open Source Project
...@@ -40,8 +40,9 @@...@@ -40,8 +40,9 @@
40 * This file has been modified from the original for use in musl libc.40 * This file has been modified from the original for use in musl libc.
41 * The main changes are: addition of .type memcpy,%function to make the41 * The main changes are: addition of .type memcpy,%function to make the
42 * code safely callable from thumb mode, adjusting the return42 * code safely callable from thumb mode, adjusting the return
43 * instructions to be compatible with pre-thumb ARM cpus, and removal43 * instructions to be compatible with pre-thumb ARM cpus, removal of
44 * of prefetch code that is not compatible with older cpus.44 * prefetch code that is not compatible with older cpus and support for
45 * building as thumb 2.
45 */46 */
4647
47.syntax unified48.syntax unified
...@@ -241,7 +242,8 @@ non_congruent:...@@ -241,7 +242,8 @@ non_congruent:
241 beq 2f242 beq 2f
242 ldr r5, [r1], #4243 ldr r5, [r1], #4
243 sub r2, r2, #4244 sub r2, r2, #4
244 orr r4, r3, r5, lsl lr245 mov r4, r5, lsl lr
246 orr r4, r4, r3
245 mov r3, r5, lsr r12247 mov r3, r5, lsr r12
246 str r4, [r0], #4248 str r4, [r0], #4
247 cmp r2, #4249 cmp r2, #4
...@@ -348,7 +350,8 @@ less_than_thirtytwo:...@@ -348,7 +350,8 @@ less_than_thirtytwo:
348350
3491: ldr r5, [r1], #43511: ldr r5, [r1], #4
350 sub r2, r2, #4352 sub r2, r2, #4
351 orr r4, r3, r5, lsl lr353 mov r4, r5, lsl lr
354 orr r4, r4, r3
352 mov r3, r5, lsr r12355 mov r3, r5, lsr r12
353 str r4, [r0], #4356 str r4, [r0], #4
354 cmp r2, #4357 cmp r2, #4
lib/libc/musl/src/time/__map_file.c+2-1
...@@ -2,10 +2,11 @@...@@ -2,10 +2,11 @@
2#include <fcntl.h>2#include <fcntl.h>
3#include <sys/stat.h>3#include <sys/stat.h>
4#include "syscall.h"4#include "syscall.h"
5#include "kstat.h"
56
6const char unsigned *__map_file(const char *pathname, size_t *size)7const char unsigned *__map_file(const char *pathname, size_t *size)
7{8{
8 struct stat st;9 struct kstat st;
9 const unsigned char *map = MAP_FAILED;10 const unsigned char *map = MAP_FAILED;
10 int fd = sys_open(pathname, O_RDONLY|O_CLOEXEC|O_NONBLOCK);11 int fd = sys_open(pathname, O_RDONLY|O_CLOEXEC|O_NONBLOCK);
11 if (fd < 0) return 0;12 if (fd < 0) return 0;
src/install_files.h+79-81
...@@ -80,7 +80,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -80,7 +80,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
80"musl/src/crypt/crypt.c",80"musl/src/crypt/crypt.c",
81"musl/src/crypt/crypt_blowfish.c",81"musl/src/crypt/crypt_blowfish.c",
82"musl/src/crypt/crypt_des.c",82"musl/src/crypt/crypt_des.c",
83"musl/src/crypt/crypt_des.h",
84"musl/src/crypt/crypt_md5.c",83"musl/src/crypt/crypt_md5.c",
85"musl/src/crypt/crypt_r.c",84"musl/src/crypt/crypt_r.c",
86"musl/src/crypt/crypt_sha256.c",85"musl/src/crypt/crypt_sha256.c",
...@@ -90,7 +89,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -90,7 +89,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
90"musl/src/ctype/__ctype_get_mb_cur_max.c",89"musl/src/ctype/__ctype_get_mb_cur_max.c",
91"musl/src/ctype/__ctype_tolower_loc.c",90"musl/src/ctype/__ctype_tolower_loc.c",
92"musl/src/ctype/__ctype_toupper_loc.c",91"musl/src/ctype/__ctype_toupper_loc.c",
93"musl/src/ctype/alpha.h",
94"musl/src/ctype/isalnum.c",92"musl/src/ctype/isalnum.c",
95"musl/src/ctype/isalpha.c",93"musl/src/ctype/isalpha.c",
96"musl/src/ctype/isascii.c",94"musl/src/ctype/isascii.c",
...@@ -117,8 +115,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -117,8 +115,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
117"musl/src/ctype/iswupper.c",115"musl/src/ctype/iswupper.c",
118"musl/src/ctype/iswxdigit.c",116"musl/src/ctype/iswxdigit.c",
119"musl/src/ctype/isxdigit.c",117"musl/src/ctype/isxdigit.c",
120"musl/src/ctype/nonspacing.h",
121"musl/src/ctype/punct.h",
122"musl/src/ctype/toascii.c",118"musl/src/ctype/toascii.c",
123"musl/src/ctype/tolower.c",119"musl/src/ctype/tolower.c",
124"musl/src/ctype/toupper.c",120"musl/src/ctype/toupper.c",
...@@ -126,8 +122,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -126,8 +122,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
126"musl/src/ctype/wcswidth.c",122"musl/src/ctype/wcswidth.c",
127"musl/src/ctype/wctrans.c",123"musl/src/ctype/wctrans.c",
128"musl/src/ctype/wcwidth.c",124"musl/src/ctype/wcwidth.c",
129"musl/src/ctype/wide.h",
130"musl/src/dirent/__dirent.h",
131"musl/src/dirent/alphasort.c",125"musl/src/dirent/alphasort.c",
132"musl/src/dirent/closedir.c",126"musl/src/dirent/closedir.c",
133"musl/src/dirent/dirfd.c",127"musl/src/dirent/dirfd.c",
...@@ -152,7 +146,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -152,7 +146,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
152"musl/src/env/setenv.c",146"musl/src/env/setenv.c",
153"musl/src/env/unsetenv.c",147"musl/src/env/unsetenv.c",
154"musl/src/errno/__errno_location.c",148"musl/src/errno/__errno_location.c",
155"musl/src/errno/__strerror.h",
156"musl/src/errno/strerror.c",149"musl/src/errno/strerror.c",
157"musl/src/exit/_Exit.c",150"musl/src/exit/_Exit.c",
158"musl/src/exit/abort.c",151"musl/src/exit/abort.c",
...@@ -196,55 +189,18 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -196,55 +189,18 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
196"musl/src/fenv/sh/fenv.S",189"musl/src/fenv/sh/fenv.S",
197"musl/src/fenv/x32/fenv.s",190"musl/src/fenv/x32/fenv.s",
198"musl/src/fenv/x86_64/fenv.s",191"musl/src/fenv/x86_64/fenv.s",
199"musl/src/include/arpa/inet.h",
200"musl/src/include/crypt.h",
201"musl/src/include/errno.h",
202"musl/src/include/features.h",
203"musl/src/include/langinfo.h",
204"musl/src/include/pthread.h",
205"musl/src/include/resolv.h",
206"musl/src/include/signal.h",
207"musl/src/include/stdio.h",
208"musl/src/include/stdlib.h",
209"musl/src/include/string.h",
210"musl/src/include/sys/auxv.h",
211"musl/src/include/sys/membarrier.h",
212"musl/src/include/sys/mman.h",
213"musl/src/include/sys/sysinfo.h",
214"musl/src/include/sys/time.h",
215"musl/src/include/time.h",
216"musl/src/include/unistd.h",
217"musl/src/include/wchar.h",
218"musl/src/internal/atomic.h",
219"musl/src/internal/complex_impl.h",
220"musl/src/internal/defsysinfo.c",192"musl/src/internal/defsysinfo.c",
221"musl/src/internal/dynlink.h",
222"musl/src/internal/fdpic_crt.h",
223"musl/src/internal/floatscan.c",193"musl/src/internal/floatscan.c",
224"musl/src/internal/floatscan.h",
225"musl/src/internal/futex.h",
226"musl/src/internal/i386/defsysinfo.s",194"musl/src/internal/i386/defsysinfo.s",
227"musl/src/internal/intscan.c",195"musl/src/internal/intscan.c",
228"musl/src/internal/intscan.h",
229"musl/src/internal/ksigaction.h",
230"musl/src/internal/libc.c",196"musl/src/internal/libc.c",
231"musl/src/internal/libc.h",
232"musl/src/internal/libm.h",
233"musl/src/internal/locale_impl.h",
234"musl/src/internal/lock.h",
235"musl/src/internal/malloc_impl.h",
236"musl/src/internal/procfdname.c",197"musl/src/internal/procfdname.c",
237"musl/src/internal/pthread_impl.h",
238"musl/src/internal/sh/__shcall.c",198"musl/src/internal/sh/__shcall.c",
239"musl/src/internal/shgetc.c",199"musl/src/internal/shgetc.c",
240"musl/src/internal/shgetc.h",
241"musl/src/internal/stdio_impl.h",
242"musl/src/internal/syscall.h",
243"musl/src/internal/syscall_ret.c",200"musl/src/internal/syscall_ret.c",
244"musl/src/internal/vdso.c",201"musl/src/internal/vdso.c",
245"musl/src/internal/version.c",202"musl/src/internal/version.c",
246"musl/src/ipc/ftok.c",203"musl/src/ipc/ftok.c",
247"musl/src/ipc/ipc.h",
248"musl/src/ipc/msgctl.c",204"musl/src/ipc/msgctl.c",
249"musl/src/ipc/msgget.c",205"musl/src/ipc/msgget.c",
250"musl/src/ipc/msgrcv.c",206"musl/src/ipc/msgrcv.c",
...@@ -261,6 +217,7 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -261,6 +217,7 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
261"musl/src/ldso/aarch64/dlsym.s",217"musl/src/ldso/aarch64/dlsym.s",
262"musl/src/ldso/aarch64/tlsdesc.s",218"musl/src/ldso/aarch64/tlsdesc.s",
263"musl/src/ldso/arm/dlsym.s",219"musl/src/ldso/arm/dlsym.s",
220"musl/src/ldso/arm/dlsym_time64.S",
264"musl/src/ldso/arm/find_exidx.c",221"musl/src/ldso/arm/find_exidx.c",
265"musl/src/ldso/arm/tlsdesc.S",222"musl/src/ldso/arm/tlsdesc.S",
266"musl/src/ldso/dl_iterate_phdr.c",223"musl/src/ldso/dl_iterate_phdr.c",
...@@ -271,18 +228,26 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -271,18 +228,26 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
271"musl/src/ldso/dlopen.c",228"musl/src/ldso/dlopen.c",
272"musl/src/ldso/dlsym.c",229"musl/src/ldso/dlsym.c",
273"musl/src/ldso/i386/dlsym.s",230"musl/src/ldso/i386/dlsym.s",
231"musl/src/ldso/i386/dlsym_time64.S",
274"musl/src/ldso/i386/tlsdesc.s",232"musl/src/ldso/i386/tlsdesc.s",
275"musl/src/ldso/m68k/dlsym.s",233"musl/src/ldso/m68k/dlsym.s",
234"musl/src/ldso/m68k/dlsym_time64.S",
276"musl/src/ldso/microblaze/dlsym.s",235"musl/src/ldso/microblaze/dlsym.s",
236"musl/src/ldso/microblaze/dlsym_time64.S",
277"musl/src/ldso/mips/dlsym.s",237"musl/src/ldso/mips/dlsym.s",
238"musl/src/ldso/mips/dlsym_time64.S",
278"musl/src/ldso/mips64/dlsym.s",239"musl/src/ldso/mips64/dlsym.s",
279"musl/src/ldso/mipsn32/dlsym.s",240"musl/src/ldso/mipsn32/dlsym.s",
241"musl/src/ldso/mipsn32/dlsym_time64.S",
280"musl/src/ldso/or1k/dlsym.s",242"musl/src/ldso/or1k/dlsym.s",
243"musl/src/ldso/or1k/dlsym_time64.S",
281"musl/src/ldso/powerpc/dlsym.s",244"musl/src/ldso/powerpc/dlsym.s",
245"musl/src/ldso/powerpc/dlsym_time64.S",
282"musl/src/ldso/powerpc64/dlsym.s",246"musl/src/ldso/powerpc64/dlsym.s",
283"musl/src/ldso/riscv64/dlsym.s",247"musl/src/ldso/riscv64/dlsym.s",
284"musl/src/ldso/s390x/dlsym.s",248"musl/src/ldso/s390x/dlsym.s",
285"musl/src/ldso/sh/dlsym.s",249"musl/src/ldso/sh/dlsym.s",
250"musl/src/ldso/sh/dlsym_time64.S",
286"musl/src/ldso/tlsdesc.c",251"musl/src/ldso/tlsdesc.c",
287"musl/src/ldso/x32/dlsym.s",252"musl/src/ldso/x32/dlsym.s",
288"musl/src/ldso/x86_64/dlsym.s",253"musl/src/ldso/x86_64/dlsym.s",
...@@ -369,30 +334,21 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -369,30 +334,21 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
369"musl/src/linux/xattr.c",334"musl/src/linux/xattr.c",
370"musl/src/locale/__lctrans.c",335"musl/src/locale/__lctrans.c",
371"musl/src/locale/__mo_lookup.c",336"musl/src/locale/__mo_lookup.c",
372"musl/src/locale/big5.h",
373"musl/src/locale/bind_textdomain_codeset.c",337"musl/src/locale/bind_textdomain_codeset.c",
374"musl/src/locale/c_locale.c",338"musl/src/locale/c_locale.c",
375"musl/src/locale/catclose.c",339"musl/src/locale/catclose.c",
376"musl/src/locale/catgets.c",340"musl/src/locale/catgets.c",
377"musl/src/locale/catopen.c",341"musl/src/locale/catopen.c",
378"musl/src/locale/codepages.h",
379"musl/src/locale/dcngettext.c",342"musl/src/locale/dcngettext.c",
380"musl/src/locale/duplocale.c",343"musl/src/locale/duplocale.c",
381"musl/src/locale/freelocale.c",344"musl/src/locale/freelocale.c",
382"musl/src/locale/gb18030.h",
383"musl/src/locale/hkscs.h",
384"musl/src/locale/iconv.c",345"musl/src/locale/iconv.c",
385"musl/src/locale/iconv_close.c",346"musl/src/locale/iconv_close.c",
386"musl/src/locale/jis0208.h",
387"musl/src/locale/ksc.h",
388"musl/src/locale/langinfo.c",347"musl/src/locale/langinfo.c",
389"musl/src/locale/legacychars.h",
390"musl/src/locale/locale_map.c",348"musl/src/locale/locale_map.c",
391"musl/src/locale/localeconv.c",349"musl/src/locale/localeconv.c",
392"musl/src/locale/newlocale.c",350"musl/src/locale/newlocale.c",
393"musl/src/locale/pleval.c",351"musl/src/locale/pleval.c",
394"musl/src/locale/pleval.h",
395"musl/src/locale/revjis.h",
396"musl/src/locale/setlocale.c",352"musl/src/locale/setlocale.c",
397"musl/src/locale/strcoll.c",353"musl/src/locale/strcoll.c",
398"musl/src/locale/strfmon.c",354"musl/src/locale/strfmon.c",
...@@ -401,7 +357,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -401,7 +357,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
401"musl/src/locale/uselocale.c",357"musl/src/locale/uselocale.c",
402"musl/src/locale/wcscoll.c",358"musl/src/locale/wcscoll.c",
403"musl/src/locale/wcsxfrm.c",359"musl/src/locale/wcsxfrm.c",
404"musl/src/malloc/DESIGN",
405"musl/src/malloc/aligned_alloc.c",360"musl/src/malloc/aligned_alloc.c",
406"musl/src/malloc/expand_heap.c",361"musl/src/malloc/expand_heap.c",
407"musl/src/malloc/lite_malloc.c",362"musl/src/malloc/lite_malloc.c",
...@@ -418,7 +373,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -418,7 +373,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
418"musl/src/math/__fpclassifyf.c",373"musl/src/math/__fpclassifyf.c",
419"musl/src/math/__fpclassifyl.c",374"musl/src/math/__fpclassifyl.c",
420"musl/src/math/__invtrigl.c",375"musl/src/math/__invtrigl.c",
421"musl/src/math/__invtrigl.h",
422"musl/src/math/__math_divzero.c",376"musl/src/math/__math_divzero.c",
423"musl/src/math/__math_divzerof.c",377"musl/src/math/__math_divzerof.c",
424"musl/src/math/__math_invalid.c",378"musl/src/math/__math_invalid.c",
...@@ -525,10 +479,8 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -525,10 +479,8 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
525"musl/src/math/exp2.c",479"musl/src/math/exp2.c",
526"musl/src/math/exp2f.c",480"musl/src/math/exp2f.c",
527"musl/src/math/exp2f_data.c",481"musl/src/math/exp2f_data.c",
528"musl/src/math/exp2f_data.h",
529"musl/src/math/exp2l.c",482"musl/src/math/exp2l.c",
530"musl/src/math/exp_data.c",483"musl/src/math/exp_data.c",
531"musl/src/math/exp_data.h",
532"musl/src/math/expf.c",484"musl/src/math/expf.c",
533"musl/src/math/expl.c",485"musl/src/math/expl.c",
534"musl/src/math/expm1.c",486"musl/src/math/expm1.c",
...@@ -579,14 +531,9 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -579,14 +531,9 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
579"musl/src/math/i386/ceil.s",531"musl/src/math/i386/ceil.s",
580"musl/src/math/i386/ceilf.s",532"musl/src/math/i386/ceilf.s",
581"musl/src/math/i386/ceill.s",533"musl/src/math/i386/ceill.s",
582"musl/src/math/i386/exp.s",
583"musl/src/math/i386/exp2.s",
584"musl/src/math/i386/exp2f.s",
585"musl/src/math/i386/exp2l.s",534"musl/src/math/i386/exp2l.s",
586"musl/src/math/i386/expf.s",535"musl/src/math/i386/exp_ld.s",
587"musl/src/math/i386/expl.s",536"musl/src/math/i386/expl.s",
588"musl/src/math/i386/expm1.s",
589"musl/src/math/i386/expm1f.s",
590"musl/src/math/i386/expm1l.s",537"musl/src/math/i386/expm1l.s",
591"musl/src/math/i386/fabs.s",538"musl/src/math/i386/fabs.s",
592"musl/src/math/i386/fabsf.s",539"musl/src/math/i386/fabsf.s",
...@@ -673,19 +620,15 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -673,19 +620,15 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
673"musl/src/math/log1pl.c",620"musl/src/math/log1pl.c",
674"musl/src/math/log2.c",621"musl/src/math/log2.c",
675"musl/src/math/log2_data.c",622"musl/src/math/log2_data.c",
676"musl/src/math/log2_data.h",
677"musl/src/math/log2f.c",623"musl/src/math/log2f.c",
678"musl/src/math/log2f_data.c",624"musl/src/math/log2f_data.c",
679"musl/src/math/log2f_data.h",
680"musl/src/math/log2l.c",625"musl/src/math/log2l.c",
681"musl/src/math/log_data.c",626"musl/src/math/log_data.c",
682"musl/src/math/log_data.h",
683"musl/src/math/logb.c",627"musl/src/math/logb.c",
684"musl/src/math/logbf.c",628"musl/src/math/logbf.c",
685"musl/src/math/logbl.c",629"musl/src/math/logbl.c",
686"musl/src/math/logf.c",630"musl/src/math/logf.c",
687"musl/src/math/logf_data.c",631"musl/src/math/logf_data.c",
688"musl/src/math/logf_data.h",
689"musl/src/math/logl.c",632"musl/src/math/logl.c",
690"musl/src/math/lrint.c",633"musl/src/math/lrint.c",
691"musl/src/math/lrintf.c",634"musl/src/math/lrintf.c",
...@@ -693,6 +636,10 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -693,6 +636,10 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
693"musl/src/math/lround.c",636"musl/src/math/lround.c",
694"musl/src/math/lroundf.c",637"musl/src/math/lroundf.c",
695"musl/src/math/lroundl.c",638"musl/src/math/lroundl.c",
639"musl/src/math/mips/fabs.c",
640"musl/src/math/mips/fabsf.c",
641"musl/src/math/mips/sqrt.c",
642"musl/src/math/mips/sqrtf.c",
696"musl/src/math/modf.c",643"musl/src/math/modf.c",
697"musl/src/math/modff.c",644"musl/src/math/modff.c",
698"musl/src/math/modfl.c",645"musl/src/math/modfl.c",
...@@ -710,7 +657,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -710,7 +657,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
710"musl/src/math/nexttowardl.c",657"musl/src/math/nexttowardl.c",
711"musl/src/math/pow.c",658"musl/src/math/pow.c",
712"musl/src/math/pow_data.c",659"musl/src/math/pow_data.c",
713"musl/src/math/pow_data.h",
714"musl/src/math/powerpc/fabs.c",660"musl/src/math/powerpc/fabs.c",
715"musl/src/math/powerpc/fabsf.c",661"musl/src/math/powerpc/fabsf.c",
716"musl/src/math/powerpc/fma.c",662"musl/src/math/powerpc/fma.c",
...@@ -741,7 +687,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -741,7 +687,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
741"musl/src/math/powerpc64/truncf.c",687"musl/src/math/powerpc64/truncf.c",
742"musl/src/math/powf.c",688"musl/src/math/powf.c",
743"musl/src/math/powf_data.c",689"musl/src/math/powf_data.c",
744"musl/src/math/powf_data.h",
745"musl/src/math/powl.c",690"musl/src/math/powl.c",
746"musl/src/math/remainder.c",691"musl/src/math/remainder.c",
747"musl/src/math/remainderf.c",692"musl/src/math/remainderf.c",
...@@ -958,7 +903,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -958,7 +903,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
958"musl/src/multibyte/c16rtomb.c",903"musl/src/multibyte/c16rtomb.c",
959"musl/src/multibyte/c32rtomb.c",904"musl/src/multibyte/c32rtomb.c",
960"musl/src/multibyte/internal.c",905"musl/src/multibyte/internal.c",
961"musl/src/multibyte/internal.h",
962"musl/src/multibyte/mblen.c",906"musl/src/multibyte/mblen.c",
963"musl/src/multibyte/mbrlen.c",907"musl/src/multibyte/mbrlen.c",
964"musl/src/multibyte/mbrtoc16.c",908"musl/src/multibyte/mbrtoc16.c",
...@@ -1021,12 +965,10 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -1021,12 +965,10 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
1021"musl/src/network/inet_ntop.c",965"musl/src/network/inet_ntop.c",
1022"musl/src/network/inet_pton.c",966"musl/src/network/inet_pton.c",
1023"musl/src/network/listen.c",967"musl/src/network/listen.c",
1024"musl/src/network/lookup.h",
1025"musl/src/network/lookup_ipliteral.c",968"musl/src/network/lookup_ipliteral.c",
1026"musl/src/network/lookup_name.c",969"musl/src/network/lookup_name.c",
1027"musl/src/network/lookup_serv.c",970"musl/src/network/lookup_serv.c",
1028"musl/src/network/netlink.c",971"musl/src/network/netlink.c",
1029"musl/src/network/netlink.h",
1030"musl/src/network/netname.c",972"musl/src/network/netname.c",
1031"musl/src/network/ns_parse.c",973"musl/src/network/ns_parse.c",
1032"musl/src/network/ntohl.c",974"musl/src/network/ntohl.c",
...@@ -1070,12 +1012,10 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -1070,12 +1012,10 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
1070"musl/src/passwd/getspnam.c",1012"musl/src/passwd/getspnam.c",
1071"musl/src/passwd/getspnam_r.c",1013"musl/src/passwd/getspnam_r.c",
1072"musl/src/passwd/lckpwdf.c",1014"musl/src/passwd/lckpwdf.c",
1073"musl/src/passwd/nscd.h",
1074"musl/src/passwd/nscd_query.c",1015"musl/src/passwd/nscd_query.c",
1075"musl/src/passwd/putgrent.c",1016"musl/src/passwd/putgrent.c",
1076"musl/src/passwd/putpwent.c",1017"musl/src/passwd/putpwent.c",
1077"musl/src/passwd/putspent.c",1018"musl/src/passwd/putspent.c",
1078"musl/src/passwd/pwf.h",
1079"musl/src/prng/__rand48_step.c",1019"musl/src/prng/__rand48_step.c",
1080"musl/src/prng/__seed48.c",1020"musl/src/prng/__seed48.c",
1081"musl/src/prng/drand48.c",1021"musl/src/prng/drand48.c",
...@@ -1083,7 +1023,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -1083,7 +1023,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
1083"musl/src/prng/lrand48.c",1023"musl/src/prng/lrand48.c",
1084"musl/src/prng/mrand48.c",1024"musl/src/prng/mrand48.c",
1085"musl/src/prng/rand.c",1025"musl/src/prng/rand.c",
1086"musl/src/prng/rand48.h",
1087"musl/src/prng/rand_r.c",1026"musl/src/prng/rand_r.c",
1088"musl/src/prng/random.c",1027"musl/src/prng/random.c",
1089"musl/src/prng/seed48.c",1028"musl/src/prng/seed48.c",
...@@ -1095,7 +1034,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -1095,7 +1034,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
1095"musl/src/process/execv.c",1034"musl/src/process/execv.c",
1096"musl/src/process/execve.c",1035"musl/src/process/execve.c",
1097"musl/src/process/execvp.c",1036"musl/src/process/execvp.c",
1098"musl/src/process/fdop.h",
1099"musl/src/process/fexecve.c",1037"musl/src/process/fexecve.c",
1100"musl/src/process/fork.c",1038"musl/src/process/fork.c",
1101"musl/src/process/i386/vfork.s",1039"musl/src/process/i386/vfork.s",
...@@ -1134,7 +1072,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -1134,7 +1072,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
1134"musl/src/regex/regerror.c",1072"musl/src/regex/regerror.c",
1135"musl/src/regex/regexec.c",1073"musl/src/regex/regexec.c",
1136"musl/src/regex/tre-mem.c",1074"musl/src/regex/tre-mem.c",
1137"musl/src/regex/tre.h",
1138"musl/src/sched/affinity.c",1075"musl/src/sched/affinity.c",
1139"musl/src/sched/sched_cpucount.c",1076"musl/src/sched/sched_cpucount.c",
1140"musl/src/sched/sched_get_priority_max.c",1077"musl/src/sched/sched_get_priority_max.c",
...@@ -1152,7 +1089,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -1152,7 +1089,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
1152"musl/src/search/tdestroy.c",1089"musl/src/search/tdestroy.c",
1153"musl/src/search/tfind.c",1090"musl/src/search/tfind.c",
1154"musl/src/search/tsearch.c",1091"musl/src/search/tsearch.c",
1155"musl/src/search/tsearch.h",
1156"musl/src/search/twalk.c",1092"musl/src/search/twalk.c",
1157"musl/src/select/poll.c",1093"musl/src/select/poll.c",
1158"musl/src/select/pselect.c",1094"musl/src/select/pselect.c",
...@@ -1335,7 +1271,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -1335,7 +1271,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
1335"musl/src/stdio/fwrite.c",1271"musl/src/stdio/fwrite.c",
1336"musl/src/stdio/fwscanf.c",1272"musl/src/stdio/fwscanf.c",
1337"musl/src/stdio/getc.c",1273"musl/src/stdio/getc.c",
1338"musl/src/stdio/getc.h",
1339"musl/src/stdio/getc_unlocked.c",1274"musl/src/stdio/getc_unlocked.c",
1340"musl/src/stdio/getchar.c",1275"musl/src/stdio/getchar.c",
1341"musl/src/stdio/getchar_unlocked.c",1276"musl/src/stdio/getchar_unlocked.c",
...@@ -1354,7 +1289,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -1354,7 +1289,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
1354"musl/src/stdio/popen.c",1289"musl/src/stdio/popen.c",
1355"musl/src/stdio/printf.c",1290"musl/src/stdio/printf.c",
1356"musl/src/stdio/putc.c",1291"musl/src/stdio/putc.c",
1357"musl/src/stdio/putc.h",
1358"musl/src/stdio/putc_unlocked.c",1292"musl/src/stdio/putc_unlocked.c",
1359"musl/src/stdio/putchar.c",1293"musl/src/stdio/putchar.c",
1360"musl/src/stdio/putchar_unlocked.c",1294"musl/src/stdio/putchar_unlocked.c",
...@@ -1746,7 +1680,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -1746,7 +1680,6 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
1746"musl/src/time/strftime.c",1680"musl/src/time/strftime.c",
1747"musl/src/time/strptime.c",1681"musl/src/time/strptime.c",
1748"musl/src/time/time.c",1682"musl/src/time/time.c",
1749"musl/src/time/time_impl.h",
1750"musl/src/time/timegm.c",1683"musl/src/time/timegm.c",
1751"musl/src/time/timer_create.c",1684"musl/src/time/timer_create.c",
1752"musl/src/time/timer_delete.c",1685"musl/src/time/timer_delete.c",
...@@ -1843,4 +1776,69 @@ static const char *ZIG_MUSL_SRC_FILES[] = {...@@ -1843,4 +1776,69 @@ static const char *ZIG_MUSL_SRC_FILES[] = {
1843"musl/src/unistd/writev.c",1776"musl/src/unistd/writev.c",
1844"musl/src/unistd/x32/lseek.c",1777"musl/src/unistd/x32/lseek.c",
1845};1778};
1779static const char *ZIG_MUSL_COMPAT_TIME32_FILES[] = {
1780"musl/compat/time32/__xstat.c",
1781"musl/compat/time32/adjtime32.c",
1782"musl/compat/time32/adjtimex_time32.c",
1783"musl/compat/time32/aio_suspend_time32.c",
1784"musl/compat/time32/clock_adjtime32.c",
1785"musl/compat/time32/clock_getres_time32.c",
1786"musl/compat/time32/clock_gettime32.c",
1787"musl/compat/time32/clock_nanosleep_time32.c",
1788"musl/compat/time32/clock_settime32.c",
1789"musl/compat/time32/cnd_timedwait_time32.c",
1790"musl/compat/time32/ctime32.c",
1791"musl/compat/time32/ctime32_r.c",
1792"musl/compat/time32/difftime32.c",
1793"musl/compat/time32/fstat_time32.c",
1794"musl/compat/time32/fstatat_time32.c",
1795"musl/compat/time32/ftime32.c",
1796"musl/compat/time32/futimens_time32.c",
1797"musl/compat/time32/futimes_time32.c",
1798"musl/compat/time32/futimesat_time32.c",
1799"musl/compat/time32/getitimer_time32.c",
1800"musl/compat/time32/getrusage_time32.c",
1801"musl/compat/time32/gettimeofday_time32.c",
1802"musl/compat/time32/gmtime32.c",
1803"musl/compat/time32/gmtime32_r.c",
1804"musl/compat/time32/localtime32.c",
1805"musl/compat/time32/localtime32_r.c",
1806"musl/compat/time32/lstat_time32.c",
1807"musl/compat/time32/lutimes_time32.c",
1808"musl/compat/time32/mktime32.c",
1809"musl/compat/time32/mq_timedreceive_time32.c",
1810"musl/compat/time32/mq_timedsend_time32.c",
1811"musl/compat/time32/mtx_timedlock_time32.c",
1812"musl/compat/time32/nanosleep_time32.c",
1813"musl/compat/time32/ppoll_time32.c",
1814"musl/compat/time32/pselect_time32.c",
1815"musl/compat/time32/pthread_cond_timedwait_time32.c",
1816"musl/compat/time32/pthread_mutex_timedlock_time32.c",
1817"musl/compat/time32/pthread_rwlock_timedrdlock_time32.c",
1818"musl/compat/time32/pthread_rwlock_timedwrlock_time32.c",
1819"musl/compat/time32/pthread_timedjoin_np_time32.c",
1820"musl/compat/time32/recvmmsg_time32.c",
1821"musl/compat/time32/sched_rr_get_interval_time32.c",
1822"musl/compat/time32/select_time32.c",
1823"musl/compat/time32/sem_timedwait_time32.c",
1824"musl/compat/time32/semtimedop_time32.c",
1825"musl/compat/time32/setitimer_time32.c",
1826"musl/compat/time32/settimeofday_time32.c",
1827"musl/compat/time32/sigtimedwait_time32.c",
1828"musl/compat/time32/stat_time32.c",
1829"musl/compat/time32/stime32.c",
1830"musl/compat/time32/thrd_sleep_time32.c",
1831"musl/compat/time32/time32.c",
1832"musl/compat/time32/time32gm.c",
1833"musl/compat/time32/timer_gettime32.c",
1834"musl/compat/time32/timer_settime32.c",
1835"musl/compat/time32/timerfd_gettime32.c",
1836"musl/compat/time32/timerfd_settime32.c",
1837"musl/compat/time32/timespec_get_time32.c",
1838"musl/compat/time32/utime_time32.c",
1839"musl/compat/time32/utimensat_time32.c",
1840"musl/compat/time32/utimes_time32.c",
1841"musl/compat/time32/wait3_time32.c",
1842"musl/compat/time32/wait4_time32.c",
1843};
1846#endif1844#endif
src/link.cpp+39-24
...@@ -983,44 +983,59 @@ static bool is_musl_arch_name(const char *name) {...@@ -983,44 +983,59 @@ static bool is_musl_arch_name(const char *name) {
983 return false;983 return false;
984}984}
985985
986enum MuslSrc {
987 MuslSrcAsm,
988 MuslSrcNormal,
989 MuslSrcO3,
990};
991
992static void add_musl_src_file(HashMap<Buf *, MuslSrc, buf_hash, buf_eql_buf> &source_table,
993 const char *file_path)
994{
995 Buf *src_file = buf_create_from_str(file_path);
996
997 MuslSrc src_kind;
998 if (buf_ends_with_str(src_file, ".c")) {
999 bool want_O3 = buf_starts_with_str(src_file, "musl/src/malloc/") ||
1000 buf_starts_with_str(src_file, "musl/src/string/") ||
1001 buf_starts_with_str(src_file, "musl/src/internal/");
1002 src_kind = want_O3 ? MuslSrcO3 : MuslSrcNormal;
1003 } else if (buf_ends_with_str(src_file, ".s") || buf_ends_with_str(src_file, ".S")) {
1004 src_kind = MuslSrcAsm;
1005 } else {
1006 zig_unreachable();
1007 }
1008 if (ZIG_OS_SEP_CHAR != '/') {
1009 buf_replace(src_file, '/', ZIG_OS_SEP_CHAR);
1010 }
1011 source_table.put_unique(src_file, src_kind);
1012}
1013
986static const char *build_musl(CodeGen *parent, Stage2ProgressNode *progress_node) {1014static const char *build_musl(CodeGen *parent, Stage2ProgressNode *progress_node) {
987 CodeGen *child_gen = create_child_codegen(parent, nullptr, OutTypeLib, nullptr, "c", progress_node);1015 CodeGen *child_gen = create_child_codegen(parent, nullptr, OutTypeLib, nullptr, "c", progress_node);
9881016
989 // When there is a src/<arch>/foo.* then it should substitute for src/foo.*1017 // When there is a src/<arch>/foo.* then it should substitute for src/foo.*
990 // Even a .s file can substitute for a .c file.1018 // Even a .s file can substitute for a .c file.
9911019
992 enum MuslSrc {
993 MuslSrcAsm,
994 MuslSrcNormal,
995 MuslSrcO3,
996 };
997
998 const char *target_musl_arch_name = target_arch_musl_name(parent->zig_target->arch);1020 const char *target_musl_arch_name = target_arch_musl_name(parent->zig_target->arch);
9991021
1000 HashMap<Buf *, MuslSrc, buf_hash, buf_eql_buf> source_table = {};1022 HashMap<Buf *, MuslSrc, buf_hash, buf_eql_buf> source_table = {};
1001 source_table.init(1800);1023 source_table.init(2000);
10021024
1003 for (size_t i = 0; i < array_length(ZIG_MUSL_SRC_FILES); i += 1) {1025 for (size_t i = 0; i < array_length(ZIG_MUSL_SRC_FILES); i += 1) {
1004 Buf *src_file = buf_create_from_str(ZIG_MUSL_SRC_FILES[i]);1026 add_musl_src_file(source_table, ZIG_MUSL_SRC_FILES[i]);
10051027 }
1006 MuslSrc src_kind;1028
1007 if (buf_ends_with_str(src_file, ".c")) {1029 static const char *time32_compat_arch_list[] = {"arm", "i386", "mips", "powerpc"};
1008 assert(buf_starts_with_str(src_file, "musl/src/"));1030 for (size_t arch_i = 0; arch_i < array_length(time32_compat_arch_list); arch_i += 1) {
1009 bool want_O3 = buf_starts_with_str(src_file, "musl/src/malloc/") ||1031 if (strcmp(target_musl_arch_name, time32_compat_arch_list[arch_i]) == 0) {
1010 buf_starts_with_str(src_file, "musl/src/string/") ||1032 for (size_t i = 0; i < array_length(ZIG_MUSL_COMPAT_TIME32_FILES); i += 1) {
1011 buf_starts_with_str(src_file, "musl/src/internal/");1033 add_musl_src_file(source_table, ZIG_MUSL_COMPAT_TIME32_FILES[i]);
1012 src_kind = want_O3 ? MuslSrcO3 : MuslSrcNormal;1034 }
1013 } else if (buf_ends_with_str(src_file, ".s") || buf_ends_with_str(src_file, ".S")) {
1014 src_kind = MuslSrcAsm;
1015 } else {
1016 continue;
1017 }
1018 if (ZIG_OS_SEP_CHAR != '/') {
1019 buf_replace(src_file, '/', ZIG_OS_SEP_CHAR);
1020 }1035 }
1021 source_table.put_unique(src_file, src_kind);
1022 }1036 }
10231037
1038
1024 ZigList<CFile *> c_source_files = {0};1039 ZigList<CFile *> c_source_files = {0};
10251040
1026 Buf dirname = BUF_INIT;1041 Buf dirname = BUF_INIT;