summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss/extern.h
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2003-11-09 03:48:13 +0000
committermarcel <marcel@FreeBSD.org>2003-11-09 03:48:13 +0000
commit3f532e652b08331243d297085d4f13318e94f586 (patch)
tree89caf91024722473ad91738e243659a20d561f8b /usr.bin/truss/extern.h
parent9162843df044ab6081d73ed699fe186f4a6fe779 (diff)
downloadFreeBSD-src-3f532e652b08331243d297085d4f13318e94f586.zip
FreeBSD-src-3f532e652b08331243d297085d4f13318e94f586.tar.gz
Port truss(1) to 64-bit architectures:
o Syscall return values do not fit in int on 64-bit architectures. Change the type of retval in <arch>_syscall_exit() to long and change the prototype of said function to return a long as well. o Change the prototype of print_syscall_ret() to take a long for the return address and change the format string accordingly. o Replace the code sequence tmp = malloc(X); sprintf(tmp, format, ...); with X by definition too small on 64-bit platforms by asprintf(&tmp, format, ...); With these changes the output makes sense again, although it does mess up the tabulation on ia64. Go widescreen... Not tested on: alpha, sparc64.
Diffstat (limited to 'usr.bin/truss/extern.h')
-rw-r--r--usr.bin/truss/extern.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/truss/extern.h b/usr.bin/truss/extern.h
index f21c494..56e80c2 100644
--- a/usr.bin/truss/extern.h
+++ b/usr.bin/truss/extern.h
@@ -37,19 +37,19 @@ extern void restore_proc(int);
extern const char *ioctlname(register_t val);
#ifdef __alpha__
extern void alpha_syscall_entry(struct trussinfo *, int);
-extern int alpha_syscall_exit(struct trussinfo *, int);
+extern long alpha_syscall_exit(struct trussinfo *, int);
#endif
#ifdef __i386__
extern void i386_syscall_entry(struct trussinfo *, int);
-extern int i386_syscall_exit(struct trussinfo *, int);
+extern long i386_syscall_exit(struct trussinfo *, int);
extern void i386_linux_syscall_entry(struct trussinfo *, int);
-extern int i386_linux_syscall_exit(struct trussinfo *, int);
+extern long i386_linux_syscall_exit(struct trussinfo *, int);
#endif
#ifdef __ia64__
extern void ia64_syscall_entry(struct trussinfo *, int);
-extern int ia64_syscall_exit(struct trussinfo *, int);
+extern long ia64_syscall_exit(struct trussinfo *, int);
#endif
#ifdef __sparc64__
extern void sparc64_syscall_entry(struct trussinfo *, int);
-extern int sparc64_syscall_exit(struct trussinfo *, int);
+extern long sparc64_syscall_exit(struct trussinfo *, int);
#endif
OpenPOWER on IntegriCloud