]> granicus.if.org Git - strace/commitdiff
2003-01-14 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Tue, 14 Jan 2003 09:46:18 +0000 (09:46 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 14 Jan 2003 09:46:18 +0000 (09:46 +0000)
* defs.h (ALIGN64): Fix defn for PPC, same as FreeBSD one.
* defs.h [_LARGEFILE64_SOURCE] (_LFS64_LARGEFILE): Define it.
* linux/syscallent.h: Use sys_getdents64, sys_truncate64,
sys_ftruncate64, instead of printargs, for those syscalls.

defs.h

diff --git a/defs.h b/defs.h
index 3c20dd1d0596f17dfb3bdd41244dfb93dd94fd02..d1bafd828daa33b25a180a9fafce285ae6f7b84b 100644 (file)
--- a/defs.h
+++ b/defs.h
 #include <features.h>
 #endif
 
+#ifdef _LARGEFILE64_SOURCE
+/* This is the macro everything checks before using foo64 names.  */
+# ifndef _LFS64_LARGEFILE
+#  define _LFS64_LARGEFILE 1
+# endif
+#endif
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -537,7 +544,8 @@ extern char *signalent2[];
 extern int nsignals2;
 #endif /* SUPPORTED_PERSONALITIES >= 3 */
 
-#if FREEBSD
+#if defined(FREEBSD) || (defined(LINUX) \
+                        && defined(POWERPC) && !defined(__powerpc64__))
 /* ARRGH!  off_t args are aligned on 64 bit boundaries! */
 #define ALIGN64(tcp,arg)                                               \
 do {                                                                   \
@@ -545,13 +553,6 @@ do {                                                                       \
            memmove (&tcp->u_arg[arg], &tcp->u_arg[arg + 1],            \
                     (tcp->u_nargs - arg - 1) * sizeof tcp->u_arg[0]);  \
 } while (0)
-#elif defined(LINUX) && defined(POWERPC) && !defined(__powerpc64__)
-#define ALIGN64(tcp,arg)                                               \
-do {                                                                   \
-       if (!(arg % 2))                                                 \
-           memmove (&tcp->u_arg[arg], &tcp->u_arg[arg + 1],            \
-                    (tcp->u_nargs - arg - 1) * sizeof tcp->u_arg[0]);  \
-} while (0)
 #else
 #define ALIGN64(tcp,arg) do { } while (0)
 #endif