summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/arm
diff options
context:
space:
mode:
authorjmatthew <jmatthew@openbsd.org>2018-05-28 03:20:25 +0000
committerjmatthew <jmatthew@openbsd.org>2018-05-28 03:20:25 +0000
commit4f3262728f75ab09c39d31185a1ebdf9938b762e (patch)
treef8d2bd9fa1ebc2df4b55ad0707c9bb9b0932db14 /lib/libc/arch/arm
parentMention column-number-mode in the tutorial to clear up a potentially (diff)
downloadwireguard-openbsd-4f3262728f75ab09c39d31185a1ebdf9938b762e.tar.xz
wireguard-openbsd-4f3262728f75ab09c39d31185a1ebdf9938b762e.zip
Clear the sign bit in the QNAN constants used by strtof, strtod and strtold,
so passing "nan" and "-nan" produces a NaN with the right sign. Bug reported and diff provided by George Koehler. ok kettenis@
Diffstat (limited to 'lib/libc/arch/arm')
-rw-r--r--lib/libc/arch/arm/gdtoa/gd_qnan.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/arch/arm/gdtoa/gd_qnan.h b/lib/libc/arch/arm/gdtoa/gd_qnan.h
index 9c59e795bf6..68a76685974 100644
--- a/lib/libc/arch/arm/gdtoa/gd_qnan.h
+++ b/lib/libc/arch/arm/gdtoa/gd_qnan.h
@@ -1,12 +1,12 @@
-#define f_QNAN 0xffffffff
+#define f_QNAN 0x7fffffff
#define d_QNAN0 0xffffffff
-#define d_QNAN1 0xffffffff
+#define d_QNAN1 0x7fffffff
#define ld_QNAN0 0xffffffff
-#define ld_QNAN1 0xffffffff
+#define ld_QNAN1 0x7fffffff
#define ld_QNAN2 0x0
#define ld_QNAN3 0x0
#define ldus_QNAN0 0xffff
#define ldus_QNAN1 0xffff
#define ldus_QNAN2 0xffff
-#define ldus_QNAN3 0xffff
+#define ldus_QNAN3 0x7fff
#define ldus_QNAN4 0x0