diff options
author | mortimer <> | 2020-05-31 12:27:19 +0000 |
---|---|---|
committer | mortimer <> | 2020-05-31 12:27:19 +0000 |
commit | f05dbe69dd53b7d5eabcdb912115a58a46ab676a (patch) | |
tree | 6e11e7654570d6bb9e3c126b5db607aa001a6669 | |
parent | 0ef5f8585d34b9d2de88692d29e28b65e20c9562 (diff) | |
download | openbsd-f05dbe69dd53b7d5eabcdb912115a58a46ab676a.tar.gz openbsd-f05dbe69dd53b7d5eabcdb912115a58a46ab676a.tar.bz2 openbsd-f05dbe69dd53b7d5eabcdb912115a58a46ab676a.zip |
Fix printing long doubles on architectures with hm and lm bits.
Issue reported with initial patch by enh@google.com.
ok deraadt@
-rw-r--r-- | src/regress/lib/libc/printf/fp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/regress/lib/libc/printf/fp.c b/src/regress/lib/libc/printf/fp.c index 6ed52fdb49..299d05f55d 100644 --- a/src/regress/lib/libc/printf/fp.c +++ b/src/regress/lib/libc/printf/fp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: fp.c,v 1.1 2008/09/07 20:36:10 martynas Exp $ */ | 1 | /* $OpenBSD: fp.c,v 1.2 2020/05/31 12:27:19 mortimer Exp $ */ |
2 | /*- | 2 | /*- |
3 | * Copyright (c) 2002, 2005 David Schultz <das@FreeBSD.org> | 3 | * Copyright (c) 2002, 2005 David Schultz <das@FreeBSD.org> |
4 | * All rights reserved. | 4 | * All rights reserved. |
@@ -185,6 +185,14 @@ main(int argc, char *argv[]) | |||
185 | testfmt("0x1p-1074", "%a", 0x1p-1074); | 185 | testfmt("0x1p-1074", "%a", 0x1p-1074); |
186 | testfmt("0x1.2345p-1024", "%a", 0x1.2345p-1024); | 186 | testfmt("0x1.2345p-1024", "%a", 0x1.2345p-1024); |
187 | 187 | ||
188 | #if LDBL_MANT_DIG == 113 | ||
189 | testfmt("-0x1.e7d7c7b7a7978777675747372717p-14344", "%La", | ||
190 | -0x1.e7d7c7b7a7978777675747372717p-14344L); | ||
191 | #elif LDBL_MANT_DIG == 64 | ||
192 | testfmt("-0x8.777675747372717p-16248", "%La", | ||
193 | -0x8.777675747372717p-16248L); | ||
194 | #endif | ||
195 | |||
188 | return (0); | 196 | return (0); |
189 | } | 197 | } |
190 | 198 | ||