summaryrefslogtreecommitdiff
path: root/include/sys
diff options
context:
space:
mode:
authorq662023-12-15 23:48:58 +0100
committerq662023-12-15 23:50:43 +0100
commita018052d410126f94c2602b208b099839d333b05 (patch)
tree6fb36635689a4568f384e1cc7c2ae9f4e617ad58 /include/sys
parent95441d2647a149ffa6db4a81c0a19e96e3b56ba5 (diff)
Rename some macros to be more namespace-friendly
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/select.h6
-rw-r--r--include/sys/socket.h16
2 files changed, 11 insertions, 11 deletions
diff --git a/include/sys/select.h b/include/sys/select.h
index 9e17b19..c8fbb31 100644
--- a/include/sys/select.h
+++ b/include/sys/select.h
@@ -34,7 +34,7 @@ extern "C" {
34 34
35_STI void __fortify_FD_CLR(int __f, fd_set * _FORTIFY_POS0 __s) 35_STI void __fortify_FD_CLR(int __f, fd_set * _FORTIFY_POS0 __s)
36{ 36{
37 __fh_size_t __b = __bos(__s, 0); 37 __fh_size_t __b = __fh_bos(__s, 0);
38 38
39 if (__f < 0 || __f >= FD_SETSIZE || __b < sizeof(fd_set)) 39 if (__f < 0 || __f >= FD_SETSIZE || __b < sizeof(fd_set))
40 __builtin_trap(); 40 __builtin_trap();
@@ -43,7 +43,7 @@ _STI void __fortify_FD_CLR(int __f, fd_set * _FORTIFY_POS0 __s)
43 43
44_STI void __fortify_FD_SET(int __f, fd_set * _FORTIFY_POS0 __s) 44_STI void __fortify_FD_SET(int __f, fd_set * _FORTIFY_POS0 __s)
45{ 45{
46 __fh_size_t __b = __bos(__s, 0); 46 __fh_size_t __b = __fh_bos(__s, 0);
47 47
48 if (__f < 0 || __f >= FD_SETSIZE || __b < sizeof(fd_set)) 48 if (__f < 0 || __f >= FD_SETSIZE || __b < sizeof(fd_set))
49 __builtin_trap(); 49 __builtin_trap();
@@ -52,7 +52,7 @@ _STI void __fortify_FD_SET(int __f, fd_set * _FORTIFY_POS0 __s)
52 52
53_STI int __fortify_FD_ISSET(int __f, fd_set * _FORTIFY_POS0 __s) 53_STI int __fortify_FD_ISSET(int __f, fd_set * _FORTIFY_POS0 __s)
54{ 54{
55 __fh_size_t __b = __bos(__s, 0); 55 __fh_size_t __b = __fh_bos(__s, 0);
56 56
57 if (__f < 0 || __f >= FD_SETSIZE || __b < sizeof(fd_set)) 57 if (__f < 0 || __f >= FD_SETSIZE || __b < sizeof(fd_set))
58 __builtin_trap(); 58 __builtin_trap();
diff --git a/include/sys/socket.h b/include/sys/socket.h
index b7a8cf8..18648f9 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -34,46 +34,46 @@ extern "C" {
34#undef send 34#undef send
35#undef sendto 35#undef sendto
36 36
37__access(write_only, 2, 3) 37__fh_access(write_only, 2, 3)
38_FORTIFY_FN(recv) ssize_t recv(int __f, void * _FORTIFY_POS0 __s, size_t __n, 38_FORTIFY_FN(recv) ssize_t recv(int __f, void * _FORTIFY_POS0 __s, size_t __n,
39 int __fl) 39 int __fl)
40{ 40{
41 __fh_size_t __b = __bos(__s, 0); 41 __fh_size_t __b = __fh_bos(__s, 0);
42 42
43 if (__n > __b) 43 if (__n > __b)
44 __builtin_trap(); 44 __builtin_trap();
45 return __orig_recv(__f, __s, __n, __fl); 45 return __orig_recv(__f, __s, __n, __fl);
46} 46}
47 47
48__access(write_only, 2, 3) 48__fh_access(write_only, 2, 3)
49_FORTIFY_FN(recvfrom) ssize_t recvfrom(int __f, void * _FORTIFY_POS0 __s, 49_FORTIFY_FN(recvfrom) ssize_t recvfrom(int __f, void * _FORTIFY_POS0 __s,
50 size_t __n, int __fl, 50 size_t __n, int __fl,
51 struct sockaddr *__a, socklen_t *__l) 51 struct sockaddr *__a, socklen_t *__l)
52{ 52{
53 __fh_size_t __b = __bos(__s, 0); 53 __fh_size_t __b = __fh_bos(__s, 0);
54 54
55 if (__n > __b) 55 if (__n > __b)
56 __builtin_trap(); 56 __builtin_trap();
57 return __orig_recvfrom(__f, __s, __n, __fl, __a, __l); 57 return __orig_recvfrom(__f, __s, __n, __fl, __a, __l);
58} 58}
59 59
60__access(read_only, 2, 3) 60__fh_access(read_only, 2, 3)
61_FORTIFY_FN(send) ssize_t send(int __f, const void * _FORTIFY_POS0 __s, 61_FORTIFY_FN(send) ssize_t send(int __f, const void * _FORTIFY_POS0 __s,
62 size_t __n, int __fl) 62 size_t __n, int __fl)
63{ 63{
64 __fh_size_t __b = __bos(__s, 0); 64 __fh_size_t __b = __fh_bos(__s, 0);
65 65
66 if (__n > __b) 66 if (__n > __b)
67 __builtin_trap(); 67 __builtin_trap();
68 return __orig_send(__f, __s, __n, __fl); 68 return __orig_send(__f, __s, __n, __fl);
69} 69}
70 70
71__access(read_only, 2, 3) 71__fh_access(read_only, 2, 3)
72_FORTIFY_FN(sendto) ssize_t sendto(int __f, const void * _FORTIFY_POS0 __s, 72_FORTIFY_FN(sendto) ssize_t sendto(int __f, const void * _FORTIFY_POS0 __s,
73 size_t __n, int __fl, 73 size_t __n, int __fl,
74 const struct sockaddr *__a, socklen_t __l) 74 const struct sockaddr *__a, socklen_t __l)
75{ 75{
76 __fh_size_t __b = __bos(__s, 0); 76 __fh_size_t __b = __fh_bos(__s, 0);
77 77
78 if (__n > __b) 78 if (__n > __b)
79 __builtin_trap(); 79 __builtin_trap();