mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-08 18:30:18 +00:00
[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>.
This commit is contained in:
parent
a14219efc1
commit
9c06eb66b5
17
ChangeLog
17
ChangeLog
@ -1,5 +1,22 @@
|
|||||||
2006-08-03 Ulrich Drepper <drepper@redhat.com>
|
2006-08-03 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
[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>.
|
||||||
|
|
||||||
* rt/Makefile (tests): Add tst-clock2.
|
* rt/Makefile (tests): Add tst-clock2.
|
||||||
* rt/tst-clock2.c: New file.
|
* rt/tst-clock2.c: New file.
|
||||||
|
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
2006-08-03 Ulrich Drepper <drepper@redhat.com>
|
2006-08-03 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
[BZ #2892]
|
||||||
|
* pthread_setspecific.c (__pthread_setspecific): Check
|
||||||
|
out-of-range index before checking for unused key.
|
||||||
|
|
||||||
* sysdeps/pthread/gai_misc.h: New file.
|
* sysdeps/pthread/gai_misc.h: New file.
|
||||||
|
|
||||||
2006-08-01 Ulrich Drepper <drepper@redhat.com>
|
2006-08-01 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||||
|
|
||||||
@ -52,8 +52,8 @@ __pthread_setspecific (key, value)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (KEY_UNUSED ((seq = __pthread_keys[key].seq))
|
if (key >= PTHREAD_KEYS_MAX
|
||||||
|| key >= PTHREAD_KEYS_MAX)
|
|| KEY_UNUSED ((seq = __pthread_keys[key].seq)))
|
||||||
/* Not valid. */
|
/* Not valid. */
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \
|
|||||||
tst-swprintf tst-fseek tst-fmemopen test-vfprintf tst-gets \
|
tst-swprintf tst-fseek tst-fmemopen test-vfprintf tst-gets \
|
||||||
tst-perror tst-sprintf tst-rndseek tst-fdopen tst-fphex bug14 bug15 \
|
tst-perror tst-sprintf tst-rndseek tst-fdopen tst-fphex bug14 bug15 \
|
||||||
tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
|
tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
|
||||||
tst-fwrite
|
tst-fwrite bug16
|
||||||
|
|
||||||
test-srcs = tst-unbputc tst-printf
|
test-srcs = tst-unbputc tst-printf
|
||||||
|
|
||||||
|
20
stdio-common/bug16.c
Normal file
20
stdio-common/bug16.c
Normal file
@ -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"
|
@ -1,5 +1,5 @@
|
|||||||
/* Print floating point number in hexadecimal notation according to ISO C99.
|
/* Print floating point number in hexadecimal notation according to ISO C99.
|
||||||
Copyright (C) 1997-2002,2004 Free Software Foundation, Inc.
|
Copyright (C) 1997-2002,2004,2006 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
||||||
|
|
||||||
@ -399,11 +399,11 @@ __printf_fphex (FILE *fp,
|
|||||||
++leading;
|
++leading;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
leading = 1;
|
leading = '1';
|
||||||
if (expnegative)
|
if (expnegative)
|
||||||
{
|
{
|
||||||
exponent += 4;
|
exponent -= 4;
|
||||||
if (exponent >= 0)
|
if (exponent <= 0)
|
||||||
expnegative = 0;
|
expnegative = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user