summaryrefslogtreecommitdiff
path: root/src/nonstd/SYSCALL_NUMBER.c
blob: f37e4a2188d6c6634cdb0dcb8213a11b89ff1a6d (plain)
1
2
3
4
5
6
7
8
#include <nonstd/syscall.h>

#define SYSCALL_NUMBER(_var, _name, _notfound) long _var = _notfound

	static int _var = -2; do { \
	if (_var == -2) { (_var) = __libc(SYSCALL_LOOKUP)(_name); } \
	if (_var == -1) { errno = ENOSYS; return (_notfound); } \
	} while (0)