This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Add x86-64 x86_64/bits/statvfs.h
On Fri, May 18, 2012 at 4:14 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> __KERNEL_WORDSIZE may be confusing since you can run
>> ia32 binaries under x86-64 kernel.
>
> Ok, then make it __SYSCALL_WORDSIZE to match __syscall_slong_t.
>
>> Here is a patch to add __WORDSIZE_NO_STATVFSBUF_F_UNUSED.
>
> I prefer something that is more general.
Like this? I am trying to avoid touch all other wordsize.h files.
Thanks.
--
H.J.
---
* sysdeps/unix/sysv/linux/bits/statvfs.h (_STATVFSBUF_F_UNUSED):
Don't define if __SYSCALL_WORDSIZE is 64.
* sysdeps/x86_64/bits/wordsize.h (__SYSCALL_WORDSIZE):
New macro.
diff --git a/sysdeps/unix/sysv/linux/bits/statvfs.h
b/sysdeps/unix/sysv/linux/bits/statvfs.h
index 4b3fc57..a23d385 100644
--- a/sysdeps/unix/sysv/linux/bits/statvfs.h
+++ b/sysdeps/unix/sysv/linux/bits/statvfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997,1998,2000,2001,2002,2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@
#include <bits/types.h> /* For __fsblkcnt_t and __fsfilcnt_t. */
-#if __WORDSIZE == 32
+#if __WORDSIZE == 32 && (!defined __SYSCALL_WORDSIZE ||
__SYSCALL_WORDSIZE == 32)
#define _STATVFSBUF_F_UNUSED
#endif
diff --git a/sysdeps/x86_64/bits/wordsize.h b/sysdeps/x86_64/bits/wordsize.h
index 9b38756..b3ec015 100644
--- a/sysdeps/x86_64/bits/wordsize.h
+++ b/sysdeps/x86_64/bits/wordsize.h
@@ -2,7 +2,10 @@
#if defined __x86_64__ && !defined __ILP32__
# define __WORDSIZE 64
-# define __WORDSIZE_COMPAT32 1
#else
# define __WORDSIZE 32
#endif
+
+#ifdef __x86_64__
+# define __SYSCALL_WORDSIZE 64
+#endif