1 // commit 5f95f965e933c5b155db75520ac27c92ddbcf400 2014-03-18
2 // syscall should not sign extend pointers on x32
7 #include <sys/syscall.h>
11 #define T(f) (!(f) && (t_error(#f " failed: %s\n", strerror(errno)), 0))
19 // test syscall with pointer
20 T((fd
= open("/dev/zero", O_RDONLY
)) >= 0);
21 T((r
= syscall(SYS_read
, fd
, buf
, 1)) == 1);
23 t_error("read %d instead of 0\n", buf
[0]);