2005-06-06  Roland McGrath  <roland@redhat.com>

	* defs.h (struct sysent): New member `native_scno'.
	(known_scno): Declare new function.
	* linux/syscallent.h: Add new final field to interesting syscalls.
	* syscall.c (known_scno): New function.
	(dumpio, internal_syscall, syscall_fixup, trace_syscall): Use it.
	* process.c (internal_fork, internal_exit): Likewise.
	[IA64] (ARG_STACKSIZE, ARG_PTID, ARG_CTID, ARG_TLS): Likewise.
	* strace.c (proc_open): Likewise.
	* util.c [LINUX] (setbpt): Likewise.
	* linux/syscall.h: Remove [!defined(X86_64)] from conditional
	for defining SYS_socket_subcall et al.
	* linux/syscallent.h: Likewise for #error check.
	* syscall.c (trace_syscall): Likewise for SYS_{socketcall,ipc} cases.
	Fixes RH#158934.
diff --git a/defs.h b/defs.h
index e32e3ed..24cf19c 100644
--- a/defs.h
+++ b/defs.h
@@ -424,6 +424,7 @@
 extern void qualify P((char *));
 extern void newoutf P((struct tcb *));
 extern int get_scno P((struct tcb *));
+extern long known_scno P((struct tcb *));
 extern int trace_syscall P((struct tcb *));
 extern void printxval P((const struct xlat *, int, const char *));
 extern int printargs P((struct tcb *));
@@ -526,6 +527,7 @@
 	int	sys_flags;
 	int	(*sys_func)();
 	const char *sys_name;
+	long	native_scno;	/* Match against SYS_* constants.  */
 };
 
 extern const struct sysent *sysent;