From 43a7482edbc7142b91e95d7aedeb9d121fc4880f Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Tue, 27 Jun 2000 17:33:32 +0000 Subject: [PATCH] Merge changes from Ulrich --- ChangeLog | 7 +++++++ configure.in | 2 ++ defs.h | 2 +- file.c | 16 ++++++++++++++++ util.c | 2 +- 5 files changed, 27 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 07220ee4..a36ef7b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,13 @@ * strace.c: close outf before we exec a child process +2000-06-09 Ulrich Drepper + + * configure.in: Don't link against libnsl on Linux, it's unnecessary. + * defs.h (struct tcb): Make auxstr member const. + * file.c (fsmagic): And many more magic numbers. + * util.c: Don't include for glibc 2.1 and up. + 2000-04-26 Wichert Akkerman * defs.h: balance #if/#endif again diff --git a/configure.in b/configure.in index 0bb6998b..48687f50 100644 --- a/configure.in +++ b/configure.in @@ -143,7 +143,9 @@ AC_TYPE_GETGROUPS AC_HEADER_MAJOR AC_SIG_ATOMIC_T AC_STAT64 +if test x$OPSYS != xLINUX; then AC_CHECK_LIB(nsl, main) +fi AC_CHECK_FUNCS(sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl putpmsg prctl sendmsg inet_ntop) AC_CHECK_HEADERS(sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h sys/stream.h sys/tiuser.h sys/sysconfig.h asm/sigcontext.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h linux/in6.h sys/uio.h linux/netlink.h linux/if_packet.h sys/poll.h) AC_DECL_SYS_ERRLIST diff --git a/defs.h b/defs.h index 9b02bca4..f4d4c48d 100644 --- a/defs.h +++ b/defs.h @@ -195,7 +195,7 @@ struct tcb { int u_error; /* Error code */ long u_rval; /* (first) return value */ FILE *outf; /* Output file for this process */ - char *auxstr; /* Auxiliary info from syscall (see RVAL_STR) */ + const char *auxstr; /* Auxiliary info from syscall (see RVAL_STR) */ struct timeval stime; /* System time usage as of last process wait */ struct timeval dtime; /* Delta for system time usage */ struct timeval etime; /* Syscall entry time */ diff --git a/file.c b/file.c index d92948a4..ac512b19 100644 --- a/file.c +++ b/file.c @@ -1067,17 +1067,33 @@ struct tcb *tcp; #ifdef linux static struct xlat fsmagic[] = { + { 0x73757245, "CODA_SUPER_MAGIC" }, + { 0x012ff7b7, "COH_SUPER_MAGIC" }, + { 0x1373, "DEVFS_SUPER_MAGIC" }, + { 0x1cd1, "DEVPTS_SUPER_MAGIC" }, + { 0x414A53, "EFS_SUPER_MAGIC" }, { 0xef51, "EXT2_OLD_SUPER_MAGIC" }, { 0xef53, "EXT2_SUPER_MAGIC" }, { 0x137d, "EXT_SUPER_MAGIC" }, + { 0xf995e849, "HPFS_SUPER_MAGIC" }, { 0x9660, "ISOFS_SUPER_MAGIC" }, { 0x137f, "MINIX_SUPER_MAGIC" }, { 0x138f, "MINIX_SUPER_MAGIC2" }, { 0x2468, "MINIX2_SUPER_MAGIC" }, { 0x2478, "MINIX2_SUPER_MAGIC2" }, { 0x4d44, "MSDOS_SUPER_MAGIC" }, + { 0x564c, "NCP_SUPER_MAGIC" }, { 0x6969, "NFS_SUPER_MAGIC" }, { 0x9fa0, "PROC_SUPER_MAGIC" }, + { 0x002f, "QNX4_SUPER_MAGIC" }, + { 0x52654973, "REISERFS_SUPER_MAGIC" }, + { 0x02011994, "SHMFS_SUPER_MAGIC" }, + { 0x517b, "SMB_SUPER_MAGIC" }, + { 0x012ff7b6, "SYSV2_SUPER_MAGIC" }, + { 0x012ff7b5, "SYSV4_SUPER_MAGIC" }, + { 0x00011954, "UFS_MAGIC" }, + { 0x54190100, "UFS_CIGAM" }, + { 0x012ff7b4, "XENIX_SUPER_MAGIC" }, { 0x012fd16d, "XIAFS_SUPER_MAGIC" }, { 0, NULL }, }; diff --git a/util.c b/util.c index 01fe26b0..f0810b41 100644 --- a/util.c +++ b/util.c @@ -44,7 +44,7 @@ #include #endif /* SUNOS4 */ -#if defined(linux) +#if defined(linux) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1)) #include #endif -- 2.50.1