Browse Source

libc: rename TRUNCATE64_HAS_4_ARGS to SYSCALL_ALIGN_64BIT

The reason truncate64 takes 4 args on some arches is that their ABI
requires 64bit values to be aligned on register pair boundaries.
Since this alignment affects more than just truncate64, rename the
define to properly document its purpose.  This also allows us to
expand it to the other impacted syscalls (which will be done in a
follow up commit).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger 11 years ago
parent
commit
e8cc14e59e
31 changed files with 60 additions and 60 deletions
  1. 2 2
      libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h
  2. 3 3
      libc/sysdeps/linux/arm/bits/uClibc_arch_features.h
  3. 2 2
      libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h
  4. 2 2
      libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h
  5. 2 2
      libc/sysdeps/linux/c6x/bits/uClibc_arch_features.h
  6. 2 2
      libc/sysdeps/linux/common/bits/uClibc_arch_features.h
  7. 1 1
      libc/sysdeps/linux/common/ftruncate64.c
  8. 1 1
      libc/sysdeps/linux/common/truncate.c
  9. 1 1
      libc/sysdeps/linux/common/truncate64.c
  10. 2 2
      libc/sysdeps/linux/cris/bits/uClibc_arch_features.h
  11. 2 2
      libc/sysdeps/linux/e1/bits/uClibc_arch_features.h
  12. 2 2
      libc/sysdeps/linux/frv/bits/uClibc_arch_features.h
  13. 2 2
      libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h
  14. 2 2
      libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h
  15. 2 2
      libc/sysdeps/linux/i386/bits/uClibc_arch_features.h
  16. 2 2
      libc/sysdeps/linux/i960/bits/uClibc_arch_features.h
  17. 2 2
      libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h
  18. 2 2
      libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h
  19. 2 2
      libc/sysdeps/linux/metag/bits/uClibc_arch_features.h
  20. 2 2
      libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h
  21. 2 2
      libc/sysdeps/linux/mips/bits/uClibc_arch_features.h
  22. 2 2
      libc/sysdeps/linux/nios/bits/uClibc_arch_features.h
  23. 2 2
      libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h
  24. 2 2
      libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h
  25. 2 2
      libc/sysdeps/linux/sh/bits/uClibc_arch_features.h
  26. 2 2
      libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h
  27. 2 2
      libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h
  28. 2 2
      libc/sysdeps/linux/v850/bits/uClibc_arch_features.h
  29. 2 2
      libc/sysdeps/linux/vax/bits/uClibc_arch_features.h
  30. 2 2
      libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h
  31. 2 2
      libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h

+ 2 - 2
libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h

@@ -11,8 +11,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #define __UCLIBC_SLIGHTLY_BROKEN_CREATE_MODULE__

+ 3 - 3
libc/sysdeps/linux/arm/bits/uClibc_arch_features.h

@@ -11,11 +11,11 @@
 /* can your target use syscall6() for mmap ? */
 #undef __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
 #ifdef __ARM_EABI__
-#define __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+#define __UCLIBC_SYSCALL_ALIGN_64BIT__
 #else
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 #endif
 
 /* does your target have a broken create_module() ? */

+ 2 - 2
libc/sysdeps/linux/avr32/bits/uClibc_arch_features.h

@@ -12,8 +12,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h

@@ -11,8 +11,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/c6x/bits/uClibc_arch_features.h

@@ -12,8 +12,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/common/bits/uClibc_arch_features.h

@@ -14,8 +14,8 @@
 /* can your target use syscall6() for mmap ? */
 #undef __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 1 - 1
libc/sysdeps/linux/common/ftruncate64.c

@@ -31,7 +31,7 @@ int ftruncate64 (int fd, __off64_t length)
 {
     uint32_t low = length & 0xffffffff;
     uint32_t high = length >> 32;
-#  if defined(__UCLIBC_TRUNCATE64_HAS_4_ARGS__)
+#  if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
     return INLINE_SYSCALL(ftruncate64,
 	    4, fd, 0, __LONG_LONG_PAIR (high, low));
 #  else

+ 1 - 1
libc/sysdeps/linux/common/truncate.c

@@ -19,7 +19,7 @@ int truncate(const char *path, __off_t length)
 # if defined __UCLIBC_HAS_LFS
 	return truncate64(path, length);
 # elif __WORDSIZE == 32
-#  if defined(__UCLIBC_TRUNCATE64_HAS_4_ARGS__)
+#  if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
 	return INLINE_SYSCALL(truncate64, 4, path, 0, OFF_HI_LO(length));
 #  else
 	return INLINE_SYSCALL(truncate64, 3, path, OFF_HI_LO(length));

+ 1 - 1
libc/sysdeps/linux/common/truncate64.c

@@ -26,7 +26,7 @@ int truncate64(const char * path, __off64_t length)
 {
 	uint32_t low = length & 0xffffffff;
 	uint32_t high = length >> 32;
-#  if defined(__UCLIBC_TRUNCATE64_HAS_4_ARGS__)
+#  if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
 	return INLINE_SYSCALL(truncate64, 4, path, 0,
 			__LONG_LONG_PAIR(high, low));
 #  else

+ 2 - 2
libc/sysdeps/linux/cris/bits/uClibc_arch_features.h

@@ -12,8 +12,8 @@
 /* can your target use syscall6() for mmap ? */
 #undef __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #define __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/e1/bits/uClibc_arch_features.h

@@ -12,8 +12,8 @@
 /* can your target use syscall6() for mmap ? */
 #undef __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/frv/bits/uClibc_arch_features.h

@@ -12,8 +12,8 @@
 /* can your target use syscall6() for mmap ? */
 #undef __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h

@@ -12,8 +12,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h

@@ -11,8 +11,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/i386/bits/uClibc_arch_features.h

@@ -11,8 +11,8 @@
 /* can your target use syscall6() for mmap ? */
 #undef __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #define __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/i960/bits/uClibc_arch_features.h

@@ -12,8 +12,8 @@
 /* can your target use syscall6() for mmap ? */
 #undef __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #define __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/ia64/bits/uClibc_arch_features.h

@@ -11,8 +11,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h

@@ -15,8 +15,8 @@
 /* can your target use syscall6() for mmap ? */
 #undef __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #define __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/metag/bits/uClibc_arch_features.h

@@ -16,8 +16,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h

@@ -12,8 +12,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/mips/bits/uClibc_arch_features.h

@@ -11,8 +11,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#define __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#define __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/nios/bits/uClibc_arch_features.h

@@ -12,8 +12,8 @@
 /* can your target use syscall6() for mmap ? */
 #undef __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h

@@ -12,8 +12,8 @@
 /* can your target use syscall6() for mmap ? */
 #undef __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h

@@ -11,8 +11,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#define __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#define __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/sh/bits/uClibc_arch_features.h

@@ -15,8 +15,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h

@@ -11,8 +11,8 @@
 /* can your target use syscall6() for mmap ? */
 #undef __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h

@@ -11,8 +11,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/v850/bits/uClibc_arch_features.h

@@ -12,8 +12,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/vax/bits/uClibc_arch_features.h

@@ -11,8 +11,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h

@@ -11,8 +11,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#undef __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__

+ 2 - 2
libc/sysdeps/linux/xtensa/bits/uClibc_arch_features.h

@@ -11,8 +11,8 @@
 /* can your target use syscall6() for mmap ? */
 #define __UCLIBC_MMAP_HAS_6_ARGS__
 
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#define __UCLIBC_TRUNCATE64_HAS_4_ARGS__
+/* does your target align 64bit values in register pairs ? (32bit arches only) */
+#define __UCLIBC_SYSCALL_ALIGN_64BIT__
 
 /* does your target have a broken create_module() ? */
 #undef __UCLIBC_BROKEN_CREATE_MODULE__