Преглед изворни кода

Allow for targets that don't know about signed zero floats.

"Jan-Benedict Glaw" пре 18 година
родитељ
комит
33fb411a47
24 измењених фајлова са 112 додато и 2 уклоњено
  1. 2 2
      libc/stdio/_fpmaxtostr.c
  2. 3 0
      libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h
  3. 3 0
      libc/sysdeps/linux/arm/bits/uClibc_arch_features.h
  4. 3 0
      libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h
  5. 3 0
      libc/sysdeps/linux/common/bits/uClibc_arch_features.h
  6. 3 0
      libc/sysdeps/linux/cris/bits/uClibc_arch_features.h
  7. 3 0
      libc/sysdeps/linux/e1/bits/uClibc_arch_features.h
  8. 3 0
      libc/sysdeps/linux/frv/bits/uClibc_arch_features.h
  9. 3 0
      libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h
  10. 3 0
      libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h
  11. 3 0
      libc/sysdeps/linux/i386/bits/uClibc_arch_features.h
  12. 3 0
      libc/sysdeps/linux/i960/bits/uClibc_arch_features.h
  13. 3 0
      libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h
  14. 3 0
      libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h
  15. 3 0
      libc/sysdeps/linux/mips/bits/uClibc_arch_features.h
  16. 3 0
      libc/sysdeps/linux/nios/bits/uClibc_arch_features.h
  17. 3 0
      libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h
  18. 3 0
      libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h
  19. 3 0
      libc/sysdeps/linux/sh/bits/uClibc_arch_features.h
  20. 3 0
      libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h
  21. 3 0
      libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h
  22. 3 0
      libc/sysdeps/linux/v850/bits/uClibc_arch_features.h
  23. 44 0
      libc/sysdeps/linux/vax/bits/uClibc_arch_features.h
  24. 3 0
      libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h

+ 2 - 2
libc/stdio/_fpmaxtostr.c

@@ -280,11 +280,11 @@ ssize_t attribute_hidden _fpmaxtostr(FILE * fp, __fpmax_t x, struct printf_info
 	}
 
 	if (x == 0) {				/* Handle 0 now to avoid false positive. */
-#if 1
+#ifdef __UCLIBC_HAVE_SIGNED_ZERO__
 		if (zeroisnegative(x)) { /* Handle 'signed' zero. */
 			*sign_str = '-';
 		}
-#endif
+#endif /* __UCLIBC_HAVE_SIGNED_ZERO__ */
 		exp = -1;
 		goto GENERATE_DIGITS;
 	}

+ 3 - 0
libc/sysdeps/linux/alpha/bits/uClibc_arch_features.h

@@ -35,4 +35,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

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

@@ -35,4 +35,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/bfin/bits/uClibc_arch_features.h

@@ -36,4 +36,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/common/bits/uClibc_arch_features.h

@@ -38,4 +38,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/cris/bits/uClibc_arch_features.h

@@ -36,4 +36,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/e1/bits/uClibc_arch_features.h

@@ -36,4 +36,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/frv/bits/uClibc_arch_features.h

@@ -36,4 +36,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h

@@ -36,4 +36,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/hppa/bits/uClibc_arch_features.h

@@ -35,4 +35,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/i386/bits/uClibc_arch_features.h

@@ -35,6 +35,9 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #define internal_function __attribute__ ((regparm (3), stdcall))
 
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/i960/bits/uClibc_arch_features.h

@@ -36,4 +36,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/m68k/bits/uClibc_arch_features.h

@@ -39,4 +39,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/microblaze/bits/uClibc_arch_features.h

@@ -36,4 +36,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/mips/bits/uClibc_arch_features.h

@@ -35,4 +35,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/nios/bits/uClibc_arch_features.h

@@ -36,4 +36,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/nios2/bits/uClibc_arch_features.h

@@ -36,4 +36,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/powerpc/bits/uClibc_arch_features.h

@@ -35,4 +35,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/sh/bits/uClibc_arch_features.h

@@ -39,4 +39,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h

@@ -35,4 +35,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/sparc/bits/uClibc_arch_features.h

@@ -35,4 +35,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/v850/bits/uClibc_arch_features.h

@@ -36,4 +36,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 44 - 0
libc/sysdeps/linux/vax/bits/uClibc_arch_features.h

@@ -0,0 +1,44 @@
+#ifndef _BITS_UCLIBC_ARCH_FEATURES_H
+#define _BITS_UCLIBC_ARCH_FEATURES_H
+
+/*
+ *
+ * Track misc arch-specific features that aren't config options
+ *
+ */
+
+
+/* instruction used when calling abort() to kill yourself */
+#undef __UCLIBC_ABORT_INSTRUCTION__	"halt"
+
+/* 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 have a broken create_module() ? */
+#undef __UCLIBC_BROKEN_CREATE_MODULE__
+
+/* does your target prefix all symbols with an _ ? */
+#define __UCLIBC_NO_UNDERSCORES__
+
+/* does your target have an asm .set ? */
+#define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__
+
+/* define if target doesn't like .global */
+#undef __UCLIBC_ASM_GLOBAL_DIRECTIVE__
+
+/* define if target supports .weak */
+#define __UCLIBC_HAVE_ASM_WEAK_DIRECTIVE__
+
+/* define if target supports .weakext */
+#undef __UCLIBC_HAVE_ASM_WEAKEXT_DIRECTIVE__
+
+/* needed probably only for ppc64 */
+#undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
+
+/* define if target supports IEEE signed zero floats */
+#undef __UCLIBC_HAVE_SIGNED_ZERO__
+
+#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */

+ 3 - 0
libc/sysdeps/linux/x86_64/bits/uClibc_arch_features.h

@@ -35,4 +35,7 @@
 /* needed probably only for ppc64 */
 #undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
 
+/* define if target supports IEEE signed zero floats */
+#define __UCLIBC_HAVE_SIGNED_ZERO__
+
 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */