[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r13924 - in /fsf/trunk/libc: ./ iconvdata/ string/ sysdeps/unix/sysv/linux/bits/
- To: commits@xxxxxxxxxx
- Subject: [commits] r13924 - in /fsf/trunk/libc: ./ iconvdata/ string/ sysdeps/unix/sysv/linux/bits/
- From: eglibc@xxxxxxxxxx
- Date: Sun, 22 May 2011 07:19:58 -0000
Author: eglibc
Date: Sun May 22 00:19:55 2011
New Revision: 13924
Log:
Import glibc-mainline for 2011-05-22
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/configure
fsf/trunk/libc/configure.in
fsf/trunk/libc/iconvdata/CP1258.irreversible
fsf/trunk/libc/iconvdata/cp1258.c
fsf/trunk/libc/string/_strerror.c
fsf/trunk/libc/string/xpg-strerror.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/time.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sun May 22 00:19:55 2011
@@ -1,4 +1,22 @@
2011-05-21 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/bits/time.h: Define CLOCK_REALTIME_ALARM
+ and CLOCK_BOOTTIME_ALARM.
+
+ [BZ #12782]
+ * string/xpg-strerror.c (__xpg_strerror_r): Fill buffer even if error
+ is returned.
+
+ * string/_strerror.c (__strerror_r): Print negative errors as signed
+ numbers.
+
+ [BZ #12777]
+ * iconvdata/cp1258.c (comp_table_data): Remove entry 0x00A5 0xEC.
+ (decomp_table): Change U0385 entry to emit 0xA5 0xEC.
+ * iconvdata/CP1258.irreversible: Adjust entry 0xA8EC.
+
+ * configure.in: Fix typo in redirection and correct removal of test
+ files in two cases.
[BZ #12788]
* locale/setlocale.c (new_composite_name): Fix test to check for
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sun May 22 00:19:55 2011
@@ -16,7 +16,8 @@
12454, 12460, 12469, 12489, 12509, 12510, 12511, 12518, 12527, 12541,
12545, 12551, 12582, 12583, 12587, 12597, 12601, 12611, 12625, 12626,
12631, 12650, 12653, 12655, 12660, 12681, 12685, 12711, 12713, 12714,
- 12717, 12723, 12724, 12734, 12738, 12746, 12766, 12775, 12788, 12792
+ 12717, 12723, 12724, 12734, 12738, 12746, 12766, 12775, 12777, 12782,
+ 12788, 12792
* The RPC implementation in libc is obsoleted. Old programs keep working
but new programs cannot be linked with the routines in libc anymore.
Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Sun May 22 00:19:55 2011
@@ -5963,7 +5963,7 @@
fi
fi
fi
- rm -f conftest.cs
+ rm -f conftest.{c,s}
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_visibility_attribute" >&5
@@ -5985,7 +5985,7 @@
int bar (int x) { return x; }
EOF
libc_cv_broken_visibility_attribute=yes
- if { ac_try='${CC-cc} -Werror -S conftest.c -o conftest.s1>&5'
+ if { ac_try='${CC-cc} -Werror -S conftest.c -o conftest.s 1>&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6626,7 +6626,7 @@
else
libc_cv_have_section_quotes=unknown
fi
- rm -f conftest.cs
+ rm -f conftest.{c,s}
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_have_section_quotes" >&5
Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Sun May 22 00:19:55 2011
@@ -1388,7 +1388,7 @@
fi
fi
fi
- rm -f conftest.[cs]
+ rm -f conftest.{c,s}
])
if test $libc_cv_visibility_attribute != yes; then
AC_MSG_ERROR(compiler support for visibility attribute is required)
@@ -1404,7 +1404,7 @@
int bar (int x) { return x; }
EOF
libc_cv_broken_visibility_attribute=yes
- if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s1>&AS_MESSAGE_LOG_FD); then
+ if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
changequote(,)dnl
if grep '\.hidden[ _]foo' conftest.s >/dev/null; then
changequote([,])dnl
@@ -1806,7 +1806,7 @@
else
libc_cv_have_section_quotes=unknown
fi
- rm -f conftest.[cs]
+ rm -f conftest.{c,s}
])
if test $libc_cv_have_section_quotes = yes; then
AC_DEFINE(HAVE_SECTION_QUOTES)
@@ -2080,7 +2080,7 @@
if test -n "$submachine"; then
AC_CACHE_CHECK([for compiler option for CPU variant],
- libc_cv_cc_submachine, [dnl
+ libc_cv_cc_submachine, [dnl
libc_cv_cc_submachine=no
for opt in "-march=$submachine" "-mcpu=$submachine"; do
if AC_TRY_COMMAND([${CC-cc} $opt -xc /dev/null -S -o /dev/null]); then
Modified: fsf/trunk/libc/iconvdata/CP1258.irreversible
==============================================================================
--- fsf/trunk/libc/iconvdata/CP1258.irreversible (original)
+++ fsf/trunk/libc/iconvdata/CP1258.irreversible Sun May 22 00:19:55 2011
@@ -96,8 +96,8 @@
0x79F2 0x1EF5
0x7AEC 0x017A
0x7AF2 0x1E93
-0xA5EC 0x0385
0xA8CC 0x1FED
+0xA8EC 0x0385
0xA8EC 0x1FEE
0xC2CC 0x1EA6
0xC2D2 0x1EA8
Modified: fsf/trunk/libc/iconvdata/cp1258.c
==============================================================================
--- fsf/trunk/libc/iconvdata/cp1258.c (original)
+++ fsf/trunk/libc/iconvdata/cp1258.c Sun May 22 00:19:55 2011
@@ -1,5 +1,5 @@
/* Conversion from and to CP1258.
- Copyright (C) 1998, 2001, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2001, 2002, 2004, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1998,
and Bruno Haible <haible@xxxxxxxxxxxxxx>, 2001.
@@ -92,7 +92,7 @@
0x20AC, 0, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
0x02C6, 0x2030, 0, 0x2039, 0x0152, 0, 0, 0,
/* 0x90 */
- 0, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
+ 0, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
0x02DC, 0x2122, 0, 0x203A, 0x0153, 0, 0, 0x0178,
/* 0xA0 */
0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
@@ -162,7 +162,7 @@
{ 0x01AF, 0x1EEA },
{ 0x01B0, 0x1EEB },
#define COMP_TABLE_IDX_0301 (COMP_TABLE_IDX_0300 + COMP_TABLE_LEN_0300)
-#define COMP_TABLE_LEN_0301 60
+#define COMP_TABLE_LEN_0301 59
{ 0x0041, 0x00C1 },
{ 0x0043, 0x0106 },
{ 0x0045, 0x00C9 },
@@ -197,7 +197,7 @@
{ 0x0077, 0x1E83 },
{ 0x0079, 0x00FD },
{ 0x007A, 0x017A },
- { 0x00A5, 0x0385 },
+ /* { 0x00A5, 0x0385 }, Wrong, A5 is Yen sign */
{ 0x00A8, 0x1FEE },
{ 0x00C2, 0x1EA4 },
{ 0x00C5, 0x01FA },
@@ -505,7 +505,7 @@
static const unsigned char from_ucs4[] =
{
#define FROM_IDX_00 0
- 0xc4, 0xc5, 0xc6, 0xc7, /* 0x00c4-0x00c7 */
+ 0xc4, 0xc5, 0xc6, 0xc7, /* 0x00c4-0x00c7 */
0xc8, 0xc9, 0xca, 0xcb, 0x00, 0xcd, 0xce, 0xcf, /* 0x00c8-0x00cf */
0x00, 0xd1, 0x00, 0xd3, 0xd4, 0x00, 0xd6, 0xd7, /* 0x00d0-0x00d7 */
0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x00, 0x00, 0xdf, /* 0x00d8-0x00df */
@@ -517,7 +517,7 @@
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0108-0x010f */
0xd0, 0xf0, /* 0x0110-0x0111 */
#define FROM_IDX_01 (FROM_IDX_00 + 78)
- 0x8c, 0x9c, 0x00, 0x00, 0x00, 0x00, /* 0x0152-0x0157 */
+ 0x8c, 0x9c, 0x00, 0x00, 0x00, 0x00, /* 0x0152-0x0157 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0158-0x015f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0160-0x0167 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0168-0x016f */
@@ -531,7 +531,7 @@
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, /* 0x01a8-0x01af */
0xfd, /* 0x01b0-0x01b0 */
#define FROM_IDX_02 (FROM_IDX_01 + 95)
- 0x88, 0x00, /* 0x02c6-0x02c7 */
+ 0x88, 0x00, /* 0x02c6-0x02c7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x02c8-0x02cf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x02d0-0x02d7 */
0x00, 0x00, 0x00, 0x00, 0x98, /* 0x02d8-0x02dc */
@@ -542,7 +542,7 @@
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0318-0x031f */
0x00, 0x00, 0x00, 0xf2, /* 0x0320-0x0323 */
#define FROM_IDX_20 (FROM_IDX_03 + 36)
- 0x96, 0x97, 0x00, 0x00, 0x00, /* 0x2013-0x2017 */
+ 0x96, 0x97, 0x00, 0x00, 0x00, /* 0x2013-0x2017 */
0x91, 0x92, 0x82, 0x00, 0x93, 0x94, 0x84, 0x00, /* 0x2018-0x201f */
0x86, 0x87, 0x95, 0x00, 0x00, 0x00, 0x85, 0x00, /* 0x2020-0x2027 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2028-0x202f */
@@ -619,7 +619,7 @@
{ 0x01fd, 0xe6, 0xec },
{ 0x01fe, 0xd8, 0xec },
{ 0x01ff, 0xf8, 0xec },
- { 0x0385, 0xa5, 0xec },
+ { 0x0385, 0xa8, 0xec },
{ 0x1e04, 0x42, 0xf2 },
{ 0x1e05, 0x62, 0xf2 },
{ 0x1e08, 0xc7, 0xec },
Modified: fsf/trunk/libc/string/_strerror.c
==============================================================================
--- fsf/trunk/libc/string/_strerror.c (original)
+++ fsf/trunk/libc/string/_strerror.c Sun May 22 00:19:55 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,93,95,96,97,98,2000,2002,2006
+/* Copyright (C) 1991,93,95,96,97,98,2000,2002,2006,2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -18,7 +18,9 @@
02111-1307 USA. */
#include <libintl.h>
+#include <stdbool.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <stdio-common/_itoa.h>
@@ -43,15 +45,21 @@
`int' of 8 bytes we never need more than 20 digits. */
char numbuf[21];
const char *unk = _("Unknown error ");
- const size_t unklen = strlen (unk);
+ size_t unklen = strlen (unk);
char *p, *q;
+ bool negative = errnum < 0;
numbuf[20] = '\0';
- p = _itoa_word (errnum, &numbuf[20], 10, 0);
+ p = _itoa_word (abs (errnum), &numbuf[20], 10, 0);
/* Now construct the result while taking care for the destination
buffer size. */
q = __mempcpy (buf, unk, MIN (unklen, buflen));
+ if (negative && unklen < buflen)
+ {
+ *q++ = '-';
+ ++unklen;
+ }
if (unklen < buflen)
memcpy (q, p, MIN ((size_t) (&numbuf[21] - p), buflen - unklen));
Modified: fsf/trunk/libc/string/xpg-strerror.c
==============================================================================
--- fsf/trunk/libc/string/xpg-strerror.c (original)
+++ fsf/trunk/libc/string/xpg-strerror.c Sun May 22 00:19:55 2011
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1995, 1996, 1997, 1998, 2000, 2002, 2004, 2010
+/* Copyright (C) 1991, 1993, 1995-1998, 2000, 2002, 2004, 2010, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -17,36 +17,32 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <assert.h>
#include <errno.h>
-#include <libintl.h>
#include <stdio.h>
#include <string.h>
#include <sys/param.h>
-#include <stdio-common/_itoa.h>
-/* It is critical here that we always use the `dcgettext' function for
- the message translation. Since <libintl.h> only defines the macro
- `dgettext' to use `dcgettext' for optimizing programs this is not
- always guaranteed. */
-#ifndef dgettext
-# include <locale.h> /* We need LC_MESSAGES. */
-# define dgettext(domainname, msgid) dcgettext (domainname, msgid, LC_MESSAGES)
-#endif
/* Fill buf with a string describing the errno code in ERRNUM. */
int
__xpg_strerror_r (int errnum, char *buf, size_t buflen)
{
- if (errnum < 0 || errnum >= _sys_nerr_internal
- || _sys_errlist_internal[errnum] == NULL)
- return EINVAL;
+ const char *estr = __strerror_r (errnum, buf, buflen);
+ size_t estrlen = strlen (estr);
- const char *estr = (const char *) _(_sys_errlist_internal[errnum]);
- size_t estrlen = strlen (estr) + 1;
+ if (estr == buf)
+ {
+ assert (errnum < 0 || errnum >= _sys_nerr_internal
+ || _sys_errlist_internal[errnum] == NULL);
+ return EINVAL;
+ }
+ assert (errnum >= 0 && errnum < _sys_nerr_internal
+ && _sys_errlist_internal[errnum] != NULL);
- if (buflen < estrlen)
- return ERANGE;
+ /* Terminate the string in any case. */
+ if (buflen > 0)
+ *((char *) __mempcpy (buf, estr, MIN (buflen - 1, estrlen))) = '\0';
- memcpy (buf, estr, estrlen);
- return 0;
+ return buflen <= estrlen ? ERANGE : 0;
}
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/time.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/time.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/time.h Sun May 22 00:19:55 2011
@@ -73,6 +73,10 @@
# define CLOCK_MONOTONIC_COARSE 6
/* Monotonic system-wide clock that includes time spent in suspension. */
# define CLOCK_BOOTTIME 7
+/* Like CLOCK_REALTIME but also wakes suspended system. */
+# define CLOCK_REALTIME_ALARM 8
+/* Like CLOCK_BOOTTIME but also wakes suspended system. */
+# define CLOCK_BOOTTIME_ALARM 9
/* Flag to indicate time is absolute. */
# define TIMER_ABSTIME 1