SyscallReturnCode wraps only a c_int return value from a syscall.
While generally ok, there are syscalls that return other types. For example, mmap returns a void*, which is not representable by a c_int on 64-bit systems.
One option for fixing this would be to make SyscallReturnCode generic, wrapping a value of type T.
Another option would be to simply use c_long for this, since a 64-bit int can also be used to represent the 32-bit counterpart.
SyscallReturnCode
wraps only ac_int
return value from a syscall. While generally ok, there are syscalls that return other types. For example,mmap
returns avoid*
, which is not representable by ac_int
on 64-bit systems.One option for fixing this would be to make
SyscallReturnCode
generic, wrapping a value of typeT
. Another option would be to simply usec_long
for this, since a 64-bit int can also be used to represent the 32-bit counterpart.