chiark / gitweb /
basic/missing: move syscall definitions to basic/missing_syscall.h
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 17 Mar 2016 17:26:13 +0000 (13:26 -0400)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:12:57 +0000 (10:12 +0200)
commit0d904a6edf6566ed403e75f835f7cc03829e336e
tree184e7db2c1268f74bea49c93e59210da8e695f23
parent35bd3f136e3762fe35289def573133a1d9ac8a04
basic/missing: move syscall definitions to basic/missing_syscall.h

We have a bunch of syscall wrapper definitions and it's easier to
see that they follow the same pattern if they are not interspersed
with other defines.

Change the wrappers to be uniform:
- if __NR_XXX is not defined, do not bother to call the syscall,
  and return -1/ENOSYS immediately.
- do not check __NR_XXX defines if we detect the symbol as defined,
  since we don't need them anyway
- reindent stuff for readability

New file basic/missing_syscall.h is included at the end of missing.h
because it might make use of some of the definitions in missing.h.
src/basic/missing_syscall.h [new file with mode: 0644]