Declare syscall parsers using SYS_FUNC macro

Introduce SYS_FUNC macro to declare and define all syscall parsers.

* Makefile.am (BUILT_SOURCES, CLEANFILES): Add sys_func.h.
(sys_func.h): New rule.
* defs.h (SYS_FUNC_NAME, SYS_FUNC): New macros.
* linux/syscall.h: Include "sys_func.h".
[NEED_UID16_PARSERS]: Use SYS_FUNC to declare uid16 syscall parsers.
Remove other declarations.
* linux/alpha/syscallent.h (160, 161): Add sys_ prefix to osf_statfs
and osf_fstatfs syscall parsers.
* *.c: Use SYS_FUNC to define syscall parsers.
diff --git a/Makefile.am b/Makefile.am
index 8193c9e..549aebc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -555,11 +555,18 @@
 srpm: dist-xz
 	rpmbuild --define '%_srcrpmdir .' -ts $(distdir).tar.xz
 
-BUILT_SOURCES = .version
+BUILT_SOURCES = .version sys_func.h
 
 $(srcdir)/.version:
 	$(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
 
+strace_SOURCES_c = $(filter %.c,$(strace_SOURCES))
+
+sys_func.h: $(patsubst %,$(srcdir)/%,$(strace_SOURCES_c))
+	for f in $^; do \
+		sed -n 's/^SYS_FUNC(.*/extern &;/p' $$f; \
+	done | sort -u > $@
+
 dist-hook:
 	$(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
 
@@ -586,7 +593,7 @@
 ioctls_inc_h = $(wildcard $(srcdir)/$(OS)/$(ARCH)/ioctls_inc*.h)
 ioctlent_h = $(patsubst $(srcdir)/$(OS)/$(ARCH)/ioctls_inc%,ioctlent%,$(ioctls_inc_h))
 BUILT_SOURCES += $(ioctlent_h)
-CLEANFILES = $(ioctlent_h)
+CLEANFILES = sys_func.h $(ioctlent_h)
 
 ioctlent%.h: ioctlsort%
 	./$< > $@