]> granicus.if.org Git - strace/commitdiff
fix stat64 on UW
authorJohn Hughes <john@Calva.COM>
Tue, 6 Mar 2001 09:45:18 +0000 (09:45 +0000)
committerJohn Hughes <john@Calva.COM>
Tue, 6 Mar 2001 09:45:18 +0000 (09:45 +0000)
aclocal.m4
file.c

index 93d880eb48cc6c4e01f49d7836f476f89baf9cd5..a3f07c09dc19907ca987e9436c1c55fe0275b8b9 100644 (file)
@@ -287,9 +287,13 @@ fi
 
 dnl ### A macro to determine whether stat64 is defined.
 AC_DEFUN(AC_STAT64,
-[AC_MSG_CHECKING(for stat64 in asm/stat.h)
+[AC_MSG_CHECKING(for stat64 in (asm|sys)/stat.h)
 AC_CACHE_VAL(ac_cv_type_stat64,
-[AC_TRY_COMPILE([#include <asm/stat.h>],
+[AC_TRY_COMPILE([#ifdef linux
+#include <asm/stat.h>
+#else
+#include <sys/stat.h>
+#endif],
 [struct stat64 st;],
 ac_cv_type_stat64=yes,
 ac_cv_type_stat64=no)])
diff --git a/file.c b/file.c
index 911090c89b6bf357ddbb30ba647072643dba5de9..50fdd4ac87b96f8413b0fa3e1166c454469d40d9 100644 (file)
--- a/file.c
+++ b/file.c
@@ -999,6 +999,11 @@ struct tcb *tcp;
                printpath(tcp, tcp->u_arg[1]);
                tprintf(", ");
        } else {
+#ifdef _STAT64_VER
+               if (tcp->u_arg[0] == _STAT64_VER)
+                       printstat64 (tcp, tcp->u_arg[2]);
+               else
+#endif
                printstat(tcp, tcp->u_arg[2]);
        }
        return 0;
@@ -1011,6 +1016,11 @@ struct tcb *tcp;
        if (entering(tcp))
                tprintf("%ld, %ld, ", tcp->u_arg[0], tcp->u_arg[1]);
        else {
+#ifdef _STAT64_VER
+               if (tcp->u_arg[0] == _STAT64_VER)
+                       printstat64 (tcp, tcp->u_arg[2]);
+               else
+#endif
                printstat(tcp, tcp->u_arg[2]);
        }
        return 0;
@@ -1025,6 +1035,11 @@ struct tcb *tcp;
                printpath(tcp, tcp->u_arg[1]);
                tprintf(", ");
        } else {
+#ifdef _STAT64_VER
+               if (tcp->u_arg[0] == _STAT64_VER)
+                       printstat64 (tcp, tcp->u_arg[2]);
+               else
+#endif
                printstat(tcp, tcp->u_arg[2]);
        }
        return 0;