3 ms·
> A .h file with different syscalls IDs That's not portable even across versions of the same OS, many OS don't support raw syscalls and don't make any guarante
by masklinn 10y ago
> A .h file with different syscalls IDs
That's not portable even across versions of the same OS, many OS don't support raw syscalls and don't make any guarantees about them. That's why you can't statically link libc on OSX for instance, libSystem is literally the system's interface and necessarily dynamically linked.
- makapuf 10y agoThat would be the few inline functions so to abstract a bit the syscalls.
- masklinn 10y agoIt doesn't abstract anything, if the syscall changes your "abstract a bit" will be broken all the same. On many if not most OS the machine code side of the syscalls can change with no notice, Windows has changed syscalls in minor revisions, Go broke several times during the Sierra beta due to syscall changes (because it handrolls gettimeofday(2) whose assembly calling convention changed). The proper abstract interface on non-linux systems is the standard library.