Fixes for ptrace() argument parsing.
* process.c: Add parsing of PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG,
PTRACE_GETSIGINFO, PTRACE_SETSIGINFO.
* strace.c (handle_stopped_tcbs): Make PTRACE_SETOPTIONS
define check more robust.
* defs.h: Declare several "extern const struct xlat" arrays here.
* desc.c: Remove open_mode_flags[] and open_access_modes[]
extern declarations.
* net.c: Remove open_mode_flags[] extern declaration.
* sock.c: Remove addrfams[] extern declaration.
* util.c: Remove struct_user_offsets[] extern declaration.
* signal.c: Remove open_mode_flags[] extern declaration.
diff --git a/strace.c b/strace.c
index 989db1a..57945db 100644
--- a/strace.c
+++ b/strace.c
@@ -2525,8 +2525,10 @@
 				}
 			}
 /* Add more OSes after you verified it works for them. */
-/* PTRACE_SETOPTIONS is not a #define. PT_SETOPTIONS is. */
-#if defined LINUX && defined PT_SETOPTIONS
+/* PTRACE_SETOPTIONS may be an enum, not a #define.
+ * But sometimes we can test for it by checking PT_SETOPTIONS.
+ */
+#if defined LINUX && (defined PTRACE_SETOPTIONS || defined PT_SETOPTIONS)
 # ifndef PTRACE_O_TRACESYSGOOD
 #  define PTRACE_O_TRACESYSGOOD 0x00000001
 # endif
@@ -2557,7 +2559,7 @@
 			goto tracing;
 		}
 
-#if defined LINUX && defined PT_SETOPTIONS
+#if defined LINUX && (defined PTRACE_SETOPTIONS || defined PT_SETOPTIONS)
 		if (ptrace_stop_sig != SIGTRAP && WSTOPSIG(status) == SIGTRAP) {
 			/*
 			 * We told ptrace to report SIGTRAP | 0x80 on this process