diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-08-03 09:36:43 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-08-03 09:36:43 +0000 |
commit | 9c06eb66b5b4662c22532ab03525eab46c4cf2eb (patch) | |
tree | 7f7e94cb6fe44805bab472b7d839e909c360315e /stdio-common/bug16.c | |
parent | a14219efc11f7f4f0cf6bea92be9e43f91118012 (diff) | |
download | glibc-9c06eb66b5b4662c22532ab03525eab46c4cf2eb.tar.gz glibc-9c06eb66b5b4662c22532ab03525eab46c4cf2eb.tar.xz glibc-9c06eb66b5b4662c22532ab03525eab46c4cf2eb.zip |
[BZ #2908]
* stdio-common/printf_fphex.c (__printf_fphex): When rounding up 'f', use '1' as leading digit not '\1'. * stdio-common/Makefile (tests): Add bug16. * stdio-common/bug16.c: New file. [BZ #2914] * sysdeps/unix/sysv/linux/gethostid.c: Don't define OLD_HOSTIDFILE and don't try to open it. The patch introducing the macro contained a bug and used the same file name as the new file instead of using /var/adm/hostid. Nobody complaint so I'm taking this out completely. [BZ #2926] * assert/assert.h: Move cast to void inside ?: to quiet gcc. Patch by Jerry James <Jerry.James@usu.edu>.
Diffstat (limited to 'stdio-common/bug16.c')
-rw-r--r-- | stdio-common/bug16.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/stdio-common/bug16.c b/stdio-common/bug16.c new file mode 100644 index 0000000000..42e37fa8b6 --- /dev/null +++ b/stdio-common/bug16.c @@ -0,0 +1,20 @@ +#include <stdio.h> +#include <string.h> + +static int +do_test (void) +{ + char buf[100]; + snprintf (buf, sizeof (buf), "%.0LA", 0x0.FFFFp+0L); + + if (strcmp (buf, "0X1P+0") != 0) + { + printf ("got \"%s\", expected \"0X1P+0\"\n", buf); + return 1; + } + + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" |