cleanup mbstowcs wrapper
[musl] / arch / powerpc / syscall_arch.h
1 #define __SYSCALL_LL_E(x) \
2 ((union { long long ll; long l[2]; }){ .ll = x }).l[0], \
3 ((union { long long ll; long l[2]; }){ .ll = x }).l[1]
4 #define __SYSCALL_LL_O(x) 0, __SYSCALL_LL_E((x))
5
6 long (__syscall)(long, ...);
7
8 static inline long __syscall0(long n)
9 {
10         return (__syscall)(n, 0, 0, 0, 0, 0, 0);
11 }
12
13 static inline long __syscall1(long n, long a)
14 {
15         return (__syscall)(n, a, 0, 0, 0, 0, 0);
16 }
17
18 static inline long __syscall2(long n, long a, long b)
19 {
20         return (__syscall)(n, a, b, 0, 0, 0, 0);
21 }
22
23 static inline long __syscall3(long n, long a, long b, long c)
24 {
25         return (__syscall)(n, a, b, c, 0, 0, 0);
26 }
27
28 static inline long __syscall4(long n, long a, long b, long c, long d)
29 {
30         return (__syscall)(n, a, b, c, d, 0, 0);
31 }
32
33 static inline long __syscall5(long n, long a, long b, long c, long d, long e)
34 {
35         return (__syscall)(n, a, b, c, d, e, 0);
36 }
37
38 static inline long __syscall6(long n, long a, long b, long c, long d, long e, long f)
39 {
40         return (__syscall)(n, a, b, c, d, e, f);
41 }
42
43 #define __SC_socket      1
44 #define __SC_bind        2
45 #define __SC_connect     3
46 #define __SC_listen      4
47 #define __SC_accept      5
48 #define __SC_getsockname 6
49 #define __SC_getpeername 7
50 #define __SC_socketpair  8
51 #define __SC_send        9
52 #define __SC_recv        10
53 #define __SC_sendto      11
54 #define __SC_recvfrom    12
55 #define __SC_shutdown    13
56 #define __SC_setsockopt  14
57 #define __SC_getsockopt  15
58 #define __SC_sendmsg     16
59 #define __SC_recvmsg     17