From 4af0b4866c0caeeb7b40126e9579d04b14afd5f2 Mon Sep 17 00:00:00 2001
From: Andreas Schwab sch...@redhat.com
Date: Tue, 27 Oct 2009 16:56:43 +0100
Subject: [PATCH] Remove support for pre-C89
* defs.h: Remove references to __STDC__ and P macros.
* strace.c: Likewise.
---
defs.h | 186 +-
strace.c | 36 +++-
2 files changed, 96 insertions(+), 126 deletions(-)
diff --git a/defs.h b/defs.h
index 5bcaa07..6376e79 100644
--- a/defs.h
+++ b/defs.h
@@ -158,15 +158,11 @@
#include asm/ptrace.h
#undef __KERNEL__
#endif
-#ifdef __STDC__
#ifdef LINUX
extern long ptrace(int, int, char *, long);
#else /* !LINUX */
extern int ptrace(int, int, char *, int, ...);
#endif /* !LINUX */
-#else /* !__STDC__ */
-extern int ptrace();
-#endif /* !__STDC__ */
#endif /* !LINUXSPARC */
#endif /* !SVR4 */
@@ -469,112 +465,106 @@ extern unsigned int nprocs, tcbtabsize;
extern int max_strlen;
extern struct tcb *tcp_last;
-#ifdef __STDC__
-#define P(args) args
-#else
-#define P(args) ()
-#endif
-
enum bitness_t { BITNESS_CURRENT = 0, BITNESS_32 };
-extern int set_personality P((int personality));
-extern const char *xlookup P((const struct xlat *, int));
-extern struct tcb *alloc_tcb P((int, int));
-extern struct tcb *pid2tcb P((int));
-extern void droptcb P((struct tcb *));
-extern void expand_tcbtab P((void));
+extern int set_personality (int personality);
+extern const char *xlookup (const struct xlat *, int);
+extern struct tcb *alloc_tcb (int, int);
+extern struct tcb *pid2tcb (int);
+extern void droptcb (struct tcb *);
+extern void expand_tcbtab (void);
#define alloctcb(pid) alloc_tcb((pid), 1)
-extern void set_sortby P((char *));
-extern void set_overhead P((int));
-extern void qualify P((char *));
-extern int get_scno P((struct tcb *));
-extern long known_scno P((struct tcb *));
-extern long do_ptrace P((int request, struct tcb *tcp, void *addr, void
*data));
-extern int ptrace_restart P((int request, struct tcb *tcp, int sig));
-extern int trace_syscall P((struct tcb *));
-extern int count_syscall P((struct tcb *, struct timeval *));
-extern void printxval P((const struct xlat *, int, const char *));
-extern int printargs P((struct tcb *));
-extern int addflags P((const struct xlat *, int));
-extern int printflags P((const struct xlat *, int, const char *));
-extern const char *sprintflags P((const char *, const struct xlat *, int));
-extern int umoven P((struct tcb *, long, int, char *));
-extern int umovestr P((struct tcb *, long, int, char *));
-extern int upeek P((struct tcb *, long, long *));
-extern void dumpiov P((struct tcb *, int, long));
-extern void dumpstr P((struct tcb *, long, int));
-extern void printstr P((struct tcb *, long, int));
-extern void printnum P((struct tcb *, long, char *));
-extern void printnum_int P((struct tcb *, long, char *));
-extern void printpath P((struct tcb *, long));
-extern void printpathn P((struct tcb *, long, int));
-extern void printtv_bitness P((struct tcb *, long, enum bitness_t, int));
-extern void sprinttv P((struct tcb *, long, enum bitness_t, char *));
-extern void print_timespec P((struct tcb *, long));
-extern void sprint_timespec P((char *, struct tcb *, long));
+extern void set_sortby (char *);
+extern void set_overhead (int);
+extern void qualify (char *);
+extern int get_scno (struct tcb *);
+extern long known_scno (struct tcb *);
+extern long do_ptrace (int request, struct tcb *tcp, void *addr, void *data);
+extern int ptrace_restart (int request, struct tcb *tcp, int sig);
+extern int trace_syscall (struct tcb *);
+extern int count_syscall (struct tcb *, struct timeval *);
+extern void printxval (const struct xlat *, int, const char *);
+extern int printargs (struct tcb *);
+extern int addflags (const struct xlat *, int);
+extern int printflags (const struct xlat *, int, const char *);
+extern const char *sprintflags (const char *, const struct xlat *, int);
+extern int umoven (struct tcb *, long, int, char *);
+extern int umovestr (struct tcb *, long, int, char *);
+extern int upeek (struct tcb *, long, long *);
+extern void dumpiov (struct tcb *, int, long);
+extern void dumpstr (struct tcb *, long, int);
+extern void printstr (struct tcb *, long, int);
+extern void printnum (struct tcb *, long, char *);
+extern void printnum_int (struct tcb *, long, char *);
+extern void printpath (struct tcb *, long);
+extern void printpathn (struct tcb *, long, int);
+extern void printtv_bitness (struct tcb *, long, enum bitness_t, int);
+extern void sprinttv (struct tcb *, long, enum bitness_t, char *);
+extern void print_timespec (struct tcb *, long);
+extern void sprint_timespec (char *, struct tcb *, long);
#ifdef HAVE_SIGINFO_T
-extern void printsiginfo P((siginfo_t *, int));
-#endif
-extern void printsock P((struct tcb *, long, int));
-extern void print_sock_optmgmt P((struct tcb *, long, int));
-extern void printrusage P((struct tcb *, long));
-extern void printuid P