2002-09-23 Michal Ludvig <mludvig@suse.cz>
* configure.in: Fix regular expressions. * linux/syscall.h: Added missing braces in prototype of sys_getdents64(). * file.c: Use '#ifdef LINUX' instead of '#ifdef linux'. (struct fileflags): Made extern to inhibit compiation warnings. (sys_getdents64): Merged LINUX and SVR4 part. * syscall.c(get_scno): Split multiline string into two distinct strings.
This commit is contained in:
parent
2c4e3a8061
commit
53b320f61f
2
CREDITS
2
CREDITS
@ -44,3 +44,5 @@ porting to new systems:
|
||||
Richard Hirst <rhirst@linuxcare.com>
|
||||
Ganesan Rajagopal <rganesan@myrealbox.com>
|
||||
Greg Banks <gbanks@pocketpenguins.com>
|
||||
Andi Kleen <ak@suse.de>
|
||||
Michal Ludvig <mludvig@suse.cz>
|
||||
|
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
2002-09-23 Michal Ludvig <mludvig@suse.cz>
|
||||
|
||||
* configure.in: Fix regular expressions.
|
||||
* linux/syscall.h: Added missing braces in prototype of
|
||||
sys_getdents64().
|
||||
* file.c: Use '#ifdef LINUX' instead of '#ifdef linux'.
|
||||
(struct fileflags): Made extern to inhibit compiation warnings.
|
||||
(sys_getdents64): Merged LINUX and SVR4 part.
|
||||
* syscall.c(get_scno): Split multiline string into two distinct
|
||||
strings.
|
||||
|
||||
2002-05-24 John Hughes <john@calva.com>
|
||||
|
||||
* stream.h, net.h: Avoid possible infinite loop caused by
|
||||
|
6
NEWS
6
NEWS
@ -1,3 +1,9 @@
|
||||
Changes in CVS (not yet released)
|
||||
==============
|
||||
* New port to AMD's x86-64 architecture. One strace binary can
|
||||
handle both new x86-64 and old i386 processes.
|
||||
* Fixed support for LFS64 calls.
|
||||
|
||||
Changes in 4.4
|
||||
==============
|
||||
* Fix Linux/ia64 support, looks like someone renamed a few things on us
|
||||
|
12
configure.in
12
configure.in
@ -1,7 +1,6 @@
|
||||
AC_INIT(strace.c)
|
||||
AC_CANONICAL_SYSTEM()
|
||||
AC_MSG_CHECKING(for supported operating system)
|
||||
changequote(,)dnl
|
||||
|
||||
case "$host_os" in
|
||||
linux*)
|
||||
@ -19,7 +18,7 @@ sysv4*)
|
||||
sysv5*)
|
||||
opsys=svr4
|
||||
;;
|
||||
irix[56]*)
|
||||
irix[[56]]*)
|
||||
opsys=svr4
|
||||
;;
|
||||
freebsd*)
|
||||
@ -38,7 +37,7 @@ opsys_list='
|
||||
|
||||
AC_MSG_CHECKING(for supported architecture)
|
||||
case "$target_cpu" in
|
||||
i[3456]86|pentium)
|
||||
i[[3456]]86|pentium)
|
||||
arch=i386
|
||||
;;
|
||||
ia64)
|
||||
@ -83,14 +82,13 @@ arch_list='
|
||||
'
|
||||
|
||||
osarch="$opsys"
|
||||
if [ -d "$srcdir/$opsys/$arch" ]; then
|
||||
if test -d "$srcdir/$opsys/$arch"; then
|
||||
osarch="$opsys/$arch"
|
||||
fi
|
||||
|
||||
OPSYS=`echo $opsys | tr '[a-z]' '[A-Z]'`
|
||||
ARCH=`echo $arch | tr '[a-z]' '[A-Z]'`
|
||||
OPSYS=`echo $opsys | tr '[[a-z]]' '[[A-Z]]'`
|
||||
ARCH=`echo $arch | tr '[[a-z]]' '[[A-Z]]'`
|
||||
|
||||
changequote([,])dnl
|
||||
CFLAGS="-D_GNU_SOURCE $CFLAGS"
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
AC_SUBST(opsys)
|
||||
|
66
file.c
66
file.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
#ifdef linux
|
||||
#ifdef LINUX
|
||||
* Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
|
||||
* Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
|
||||
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
|
||||
@ -34,7 +34,7 @@
|
||||
#include "defs.h"
|
||||
|
||||
#include <dirent.h>
|
||||
#ifdef linux
|
||||
#ifdef LINUX
|
||||
#define dirent kernel_dirent
|
||||
#define dirent64 kernel_dirent64
|
||||
#include <linux/types.h>
|
||||
@ -44,7 +44,7 @@
|
||||
#define kernel_dirent dirent
|
||||
#endif
|
||||
|
||||
#ifdef linux
|
||||
#ifdef LINUX
|
||||
# ifdef LINUXSPARC
|
||||
struct stat {
|
||||
unsigned short st_dev;
|
||||
@ -395,7 +395,7 @@ struct tcb *tcp;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef linux
|
||||
#ifdef LINUX
|
||||
int
|
||||
sys_llseek (tcp)
|
||||
struct tcb *tcp;
|
||||
@ -630,7 +630,7 @@ long addr;
|
||||
}
|
||||
#endif /* LINUXSPARC */
|
||||
|
||||
static struct xlat fileflags[] = {
|
||||
struct xlat fileflags[] = {
|
||||
#ifdef FREEBSD
|
||||
{ UF_NODUMP, "UF_NODUMP" },
|
||||
{ UF_IMMUTABLE, "UF_IMMUTABLE" },
|
||||
@ -889,7 +889,7 @@ long addr;
|
||||
}
|
||||
#endif /* HAVE_STAT64 */
|
||||
|
||||
#if defined(linux) && !defined(IA64) && !defined(HPPA)
|
||||
#if defined(LINUX) && !defined(IA64) && !defined(HPPA)
|
||||
static void
|
||||
convertoldstat(oldbuf, newbuf)
|
||||
const struct __old_kernel_stat *oldbuf;
|
||||
@ -942,7 +942,7 @@ long addr;
|
||||
convertoldstat(&statbuf, &newstatbuf);
|
||||
realprintstat(tcp, &newstatbuf);
|
||||
}
|
||||
#endif /* linux && !IA64 */
|
||||
#endif /* LINUX && !IA64 */
|
||||
|
||||
#ifndef HAVE_LONG_LONG_OFF_T
|
||||
int
|
||||
@ -976,7 +976,7 @@ struct tcb *tcp;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef LINUX
|
||||
# if !defined(IA64) && !defined(HPPA)
|
||||
int
|
||||
sys_oldstat(tcp)
|
||||
@ -991,7 +991,7 @@ struct tcb *tcp;
|
||||
return 0;
|
||||
}
|
||||
# endif /* !IA64 && !HPPA*/
|
||||
#endif /* linux */
|
||||
#endif /* LINUX */
|
||||
|
||||
#ifndef HAVE_LONG_LONG_OFF_T
|
||||
int
|
||||
@ -1023,7 +1023,7 @@ struct tcb *tcp;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef LINUX
|
||||
# if !defined(IA64) && !defined(HPPA)
|
||||
int
|
||||
sys_oldfstat(tcp)
|
||||
@ -1071,7 +1071,7 @@ struct tcb *tcp;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef LINUX
|
||||
# if !defined(IA64) && !defined(HPPA)
|
||||
int
|
||||
sys_oldlstat(tcp)
|
||||
@ -1285,7 +1285,7 @@ struct tcb *tcp;
|
||||
|
||||
#endif /* SVR4 || LINUXSPARC */
|
||||
|
||||
#ifdef linux
|
||||
#ifdef LINUX
|
||||
|
||||
static struct xlat fsmagic[] = {
|
||||
{ 0x73757245, "CODA_SUPER_MAGIC" },
|
||||
@ -1319,7 +1319,7 @@ static struct xlat fsmagic[] = {
|
||||
{ 0, NULL },
|
||||
};
|
||||
|
||||
#endif /* linux */
|
||||
#endif /* LINUX */
|
||||
|
||||
#ifndef SVR4
|
||||
|
||||
@ -1328,7 +1328,7 @@ sprintfstype(magic)
|
||||
int magic;
|
||||
{
|
||||
static char buf[32];
|
||||
#ifdef linux
|
||||
#ifdef LINUX
|
||||
char *s;
|
||||
|
||||
s = xlookup(fsmagic, magic);
|
||||
@ -1336,7 +1336,7 @@ int magic;
|
||||
sprintf(buf, "\"%s\"", s);
|
||||
return buf;
|
||||
}
|
||||
#endif /* linux */
|
||||
#endif /* LINUX */
|
||||
sprintf(buf, "%#x", magic);
|
||||
return buf;
|
||||
}
|
||||
@ -1372,9 +1372,9 @@ long addr;
|
||||
tprintf("f_files=%lu, f_ffree=%lu",
|
||||
(unsigned long)statbuf.f_files,
|
||||
(unsigned long)statbuf.f_ffree);
|
||||
#ifdef linux
|
||||
#ifdef LINUX
|
||||
tprintf(", f_namelen=%lu", (unsigned long)statbuf.f_namelen);
|
||||
#endif /* linux */
|
||||
#endif /* LINUX */
|
||||
#endif /* !ALPHA */
|
||||
tprintf("}");
|
||||
}
|
||||
@ -1404,7 +1404,7 @@ struct tcb *tcp;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(linux) && defined(__alpha)
|
||||
#if defined(LINUX) && defined(__alpha)
|
||||
|
||||
int
|
||||
osf_statfs(tcp)
|
||||
@ -1432,7 +1432,7 @@ struct tcb *tcp;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* linux && __alpha */
|
||||
#endif /* LINUX && __alpha */
|
||||
|
||||
#endif /* !SVR4 */
|
||||
|
||||
@ -1751,7 +1751,7 @@ struct tcb *tcp;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef linux
|
||||
#ifdef LINUX
|
||||
|
||||
static void
|
||||
printdir(tcp, addr)
|
||||
@ -1792,7 +1792,7 @@ struct tcb *tcp;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* linux */
|
||||
#endif /* LINUX */
|
||||
|
||||
#ifdef FREEBSD
|
||||
struct xlat direnttypes[] = {
|
||||
@ -1838,14 +1838,14 @@ struct tcb *tcp;
|
||||
tprintf("{");
|
||||
for (i = 0; i < len;) {
|
||||
struct kernel_dirent *d = (struct kernel_dirent *) &buf[i];
|
||||
#ifdef linux
|
||||
#ifdef LINUX
|
||||
if (!abbrev(tcp)) {
|
||||
tprintf("%s{d_ino=%lu, d_off=%lu, ",
|
||||
i ? " " : "", d->d_ino, d->d_off);
|
||||
tprintf("d_reclen=%u, d_name=\"%s\"}",
|
||||
d->d_reclen, d->d_name);
|
||||
}
|
||||
#endif /* linux */
|
||||
#endif /* LINUX */
|
||||
#ifdef SVR4
|
||||
if (!abbrev(tcp)) {
|
||||
tprintf("%s{d_ino=%lu, d_off=%lu, ",
|
||||
@ -1919,22 +1919,16 @@ struct tcb *tcp;
|
||||
tprintf("{");
|
||||
for (i = 0; i < len;) {
|
||||
struct dirent64 *d = (struct dirent64 *) &buf[i];
|
||||
#ifdef linux
|
||||
#if defined(LINUX) || defined(SVR4)
|
||||
if (!abbrev(tcp)) {
|
||||
tprintf("%s{d_ino=%lu, d_off=%lu, ",
|
||||
i ? " " : "", d->d_ino, d->d_off);
|
||||
i ? " " : "",
|
||||
(unsigned long)d->d_ino,
|
||||
(unsigned long)d->d_off);
|
||||
tprintf("d_reclen=%u, d_name=\"%s\"}",
|
||||
d->d_reclen, d->d_name);
|
||||
}
|
||||
#endif /* linux */
|
||||
#ifdef SVR4
|
||||
if (!abbrev(tcp)) {
|
||||
tprintf("%s{d_ino=%llu, d_off=%llu, ",
|
||||
i ? " " : "", d->d_ino, d->d_off);
|
||||
tprintf("d_reclen=%u, d_name=\"%s\"}",
|
||||
d->d_reclen, d->d_name);
|
||||
}
|
||||
#endif /* SVR4 */
|
||||
#endif /* LINUX || SVR4 */
|
||||
#ifdef SUNOS4
|
||||
if (!abbrev(tcp)) {
|
||||
tprintf("%s{d_off=%lu, d_fileno=%lu, d_reclen=%u, ",
|
||||
@ -2012,7 +2006,7 @@ struct tcb * tcp;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef linux
|
||||
#ifdef LINUX
|
||||
int
|
||||
sys_getcwd(tcp)
|
||||
struct tcb *tcp;
|
||||
@ -2026,7 +2020,7 @@ struct tcb *tcp;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* linux */
|
||||
#endif /* LINUX */
|
||||
|
||||
#ifdef FREEBSD
|
||||
int
|
||||
|
@ -83,7 +83,7 @@ int sys_rt_sigpending(), sys_rt_sigsuspend(), sys_rt_sigqueueinfo();
|
||||
int sys_rt_sigtimedwait(), sys_prctl(), sys_poll(), sys_vfork();
|
||||
int sys_sendfile(), sys_old_mmap(), sys_stat64(), sys_lstat64(), sys_fstat64();
|
||||
int sys_truncate64(), sys_ftruncate64(), sys_pivotroot();
|
||||
int sys_getdents64, sys_clone2();
|
||||
int sys_getdents64(), sys_clone2();
|
||||
|
||||
|
||||
/* sys_socketcall subcalls */
|
||||
|
@ -890,8 +890,8 @@ struct tcb *tcp;
|
||||
long correct_scno = (scno & 0xff);
|
||||
if (debug)
|
||||
fprintf(stderr,
|
||||
"Detected glibc bug: bogus system call number = %ld,
|
||||
correcting to %ld\n",
|
||||
"Detected glibc bug: bogus system call number = %ld, "
|
||||
"correcting to %ld\n",
|
||||
scno,
|
||||
correct_scno);
|
||||
scno = correct_scno;
|
||||
|
Loading…
Reference in New Issue
Block a user