diff options
| author | Jakob Kaivo <jkk@ung.org> | 2019-02-27 21:20:04 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2019-02-27 21:20:04 -0500 |
| commit | a4a76ebe51a9c25c76f88b2ae1560491372e0787 (patch) | |
| tree | f17c051f2b00b531a68bd0ad117f57f291631dae | |
| parent | 7c537140edd2b17a8932b815bef62728db593343 (diff) | |
add __lookup() convenience macro
| -rw-r--r-- | .deps/all.c | 1 | ||||
| -rw-r--r-- | .deps/nonstd/syscall.h.deps | 1 | ||||
| -rw-r--r-- | .headers.mk | 2 | ||||
| -rw-r--r-- | src/nonstd/__lookup.c | 3 |
4 files changed, 6 insertions, 1 deletions
diff --git a/.deps/all.c b/.deps/all.c index 8c253617..942eaba7 100644 --- a/.deps/all.c +++ b/.deps/all.c @@ -22,6 +22,7 @@ ./src/nonstd/struct_FILE.c ./src/nonstd/SYSCALL_NUMBER.c ./src/nonstd/__syscall.c +./src/nonstd/__lookup.c ./src/nonstd/ctype_t.c ./src/nonstd/funlockfile.c ./src/nonstd/ASSERT_NONNULL.c diff --git a/.deps/nonstd/syscall.h.deps b/.deps/nonstd/syscall.h.deps index e476e255..eea79e92 100644 --- a/.deps/nonstd/syscall.h.deps +++ b/.deps/nonstd/syscall.h.deps @@ -1,5 +1,6 @@ ./src/nonstd/SYSCALL_NUMBER.c ./src/nonstd/__syscall.c +./src/nonstd/__lookup.c ./src/nonstd/syscall_lookup_t.c ./src/nonstd/SYSCALL.c ./src/nonstd/nonstd-inernal.ref diff --git a/.headers.mk b/.headers.mk index fbdaf15c..e9ec5dbb 100644 --- a/.headers.mk +++ b/.headers.mk @@ -99,7 +99,7 @@ $(INCDIR)/nonstd/io.h: mkh.sh $(SRCDIR)/nonstd/struct_io_options.c $(SRCDIR)/non $(INCDIR)/nonstd/locale.h: mkh.sh $(SRCDIR)/nonstd/struct_locale_t.c INCDIR=$(INCDIR) sh mkh.sh $(INCDIR)/nonstd/locale.h -$(INCDIR)/nonstd/syscall.h: mkh.sh $(SRCDIR)/nonstd/SYSCALL_NUMBER.c $(SRCDIR)/nonstd/__syscall.c $(SRCDIR)/nonstd/syscall_lookup_t.c $(SRCDIR)/nonstd/SYSCALL.c $(SRCDIR)/nonstd/nonstd-inernal.ref $(SRCDIR)/nonstd/ENOSYS.ref $(SRCDIR)/nonstd/errno.ref +$(INCDIR)/nonstd/syscall.h: mkh.sh $(SRCDIR)/nonstd/SYSCALL_NUMBER.c $(SRCDIR)/nonstd/__syscall.c $(SRCDIR)/nonstd/__lookup.c $(SRCDIR)/nonstd/syscall_lookup_t.c $(SRCDIR)/nonstd/SYSCALL.c $(SRCDIR)/nonstd/nonstd-inernal.ref $(SRCDIR)/nonstd/ENOSYS.ref $(SRCDIR)/nonstd/errno.ref INCDIR=$(INCDIR) sh mkh.sh $(INCDIR)/nonstd/syscall.h $(INCDIR)/poll.h: mkh.sh $(SRCDIR)/poll/POLLIN.c $(SRCDIR)/poll/POLLWRBAND.c $(SRCDIR)/poll/POLLPRI.c $(SRCDIR)/poll/POLLRDBAND.c $(SRCDIR)/poll/POLLNVAL.c $(SRCDIR)/poll/POLLWRNORM.c $(SRCDIR)/poll/struct_pollfd.c $(SRCDIR)/poll/POLLRDNORM.c $(SRCDIR)/poll/nfds_t.c $(SRCDIR)/poll/POLLERR.c $(SRCDIR)/poll/poll.c $(SRCDIR)/poll/POLLHUP.c $(SRCDIR)/poll/POLLOUT.c diff --git a/src/nonstd/__lookup.c b/src/nonstd/__lookup.c new file mode 100644 index 00000000..dca2f6a9 --- /dev/null +++ b/src/nonstd/__lookup.c @@ -0,0 +1,3 @@ +#include <nonstd/syscall.h> + +#define __lookup(_name) ((long (*)(const char *))__libc(SYSCALL_LOOKUP))(_name) |
