* Makefile.am (EXTRA_DIST): Add linux/subcall.h.
* linux/syscall.h (SYS_socket_subcall): Remove.
(SYS_socket_nsubcalls, SYS_ipc_subcall, SYS_ipc_nsubcalls): Move to ...
* linux/subcall.h: ... new file.
* linux/arm/syscallent.h: Define SYS_socket_subcall, include subcall.h.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
Suggested by Mike Frysinger and Chris Metcalf.
linux/sparc64/syscallent.h \
linux/sparc64/syscallent1.h \
linux/sparc64/syscallent2.h \
+ linux/subcall.h \
linux/syscall.h \
linux/tile/ioctlent.h.in \
linux/tile/syscallent.h \
{ 5, 0, NULL, NULL }, /* 397 */
{ 5, 0, NULL, NULL }, /* 398 */
{ 5, 0, NULL, NULL }, /* 399 */
-# if SYS_socket_subcall != 400
-# error fix me
-# endif
+#define SYS_socket_subcall 400
+#include "subcall.h"
{ 6, 0, printargs, "socket_subcall"}, /* 400 */
{ 3, TN, sys_socket, "socket" }, /* 401 */
{ 3, TN, sys_bind, "bind" }, /* 402 */
{ 5, 0, NULL, NULL }, /* 397 */
{ 5, 0, NULL, NULL }, /* 398 */
{ 5, 0, NULL, NULL }, /* 399 */
-
-#if SYS_socket_subcall != 400
- #error fix me
-#endif
+#define SYS_socket_subcall 400
+#include "subcall.h"
{ 6, 0, printargs, "socket_subcall"}, /* 400 */
{ 3, TN, sys_socket, "socket" }, /* 401 */
{ 3, TN, sys_bind, "bind" }, /* 402 */
{ 5, 0, NULL, NULL }, /* 397 */
{ 5, 0, NULL, NULL }, /* 398 */
{ 5, 0, NULL, NULL }, /* 399 */
-
-#if SYS_socket_subcall != 400
- #error fix me
-#endif
+#define SYS_socket_subcall 400
+#include "subcall.h"
{ 6, 0, printargs, "socket_subcall"}, /* 400 */
{ 3, TN, sys_socket, "socket" }, /* 401 */
{ 3, TN, sys_bind, "bind" }, /* 402 */
{ 5, 0, NULL, NULL }, /* 397 */
{ 5, 0, NULL, NULL }, /* 398 */
{ 5, 0, NULL, NULL }, /* 399 */
-
-#if SYS_socket_subcall != 400
- #error fix me
-#endif
+#define SYS_socket_subcall 400
+#include "subcall.h"
{ 6, 0, printargs, "socket_subcall"}, /* 400 */
{ 3, TN, sys_socket, "socket" }, /* 401 */
{ 3, TN, sys_bind, "bind" }, /* 402 */
{ 5, 0, NULL, NULL }, /* 397 */
{ 5, 0, NULL, NULL }, /* 398 */
{ 5, 0, NULL, NULL }, /* 399 */
-
-#if SYS_socket_subcall != 400
- #error fix me
-#endif
+#define SYS_socket_subcall 400
+#include "subcall.h"
{ 6, 0, printargs, "socket_subcall"}, /* 400 */
{ 3, TN, sys_socket, "socket" }, /* 401 */
{ 3, TN, sys_bind, "bind" }, /* 402 */
{ 5, 0, NULL, NULL }, /* 397 */
{ 5, 0, NULL, NULL }, /* 398 */
{ 5, 0, NULL, NULL }, /* 399 */
-
-#if SYS_socket_subcall != 400
- #error fix me
-#endif
+#define SYS_socket_subcall 400
+#include "subcall.h"
{ 6, 0, printargs, "socket_subcall"}, /* 400 */
{ 3, TN, sys_socket, "socket" }, /* 401 */
{ 3, TN, sys_bind, "bind" }, /* 402 */
{ 5, 0, NULL, NULL }, /* 397 */
{ 5, 0, NULL, NULL }, /* 398 */
{ 5, 0, NULL, NULL }, /* 399 */
-
-#if SYS_socket_subcall != 400
- #error fix me
-#endif
+#define SYS_socket_subcall 400
+#include "subcall.h"
{ 6, 0, printargs, "socket_subcall"}, /* 400 */
{ 3, TN, sys_socket, "socket" }, /* 401 */
{ 3, TN, sys_bind, "bind" }, /* 402 */
{ 5, 0, NULL, NULL }, /* 397 */
{ 5, 0, NULL, NULL }, /* 398 */
{ 5, 0, NULL, NULL }, /* 399 */
-
-#if SYS_socket_subcall != 400
- #error fix me
-#endif
+#define SYS_socket_subcall 400
+#include "subcall.h"
{ 6, 0, printargs, "socket_subcall"}, /* 400 */
{ 3, TN, sys_socket, "socket" }, /* 401 */
{ 3, TN, sys_bind, "bind" }, /* 402 */
{ 5, 0, NULL, NULL }, /* 350 */
{ 5, 0, NULL, NULL }, /* 351 */
{ 5, 0, NULL, NULL }, /* 352 */
-#if SYS_socket_subcall != 353
- #error fix me
-#endif
+#define SYS_socket_subcall 353
+#include "subcall.h"
{ 6, 0, printargs, "socket_subcall"}, /* 353 */
{ 3, TN, sys_socket, "socket" }, /* 354 */
{ 3, TN, sys_bind, "bind" }, /* 355 */
--- /dev/null
+#ifndef SYS_socket_subcall
+# error SYS_socket_subcall is not defined
+#endif
+#define SYS_socket_nsubcalls 20
+#define SYS_ipc_subcall ((SYS_socket_subcall)+(SYS_socket_nsubcalls))
+#define SYS_ipc_nsubcalls 25
int sys_osf_wait4();
#endif
-#if defined ALPHA \
- || defined __ARM_EABI__ \
- || defined BFIN \
- || defined HPPA \
- || defined METAG \
- || defined MIPS \
- || defined TILE \
- || defined XTENSA
-/*
- * This architecture does not have a socketcall or ipc subcall,
- * it has dedicated syscalls instead, so there is no need
- * to implement socket or ipc subcall decoding.
- */
-#else
-# if defined SPARC || defined SPARC64
-# define SYS_socket_subcall 353
-# else
-# define SYS_socket_subcall 400
-# endif
-# define SYS_socket_nsubcalls 20
-# define SYS_ipc_subcall ((SYS_socket_subcall)+(SYS_socket_nsubcalls))
-# define SYS_ipc_nsubcalls 25
-#endif
-
#if defined(ALPHA) || defined(IA64) || defined(SPARC) || defined(SPARC64)
int sys_getpagesize();
#endif