[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r17294 - in /fsf/trunk/libc: ChangeLog configure configure.in stdlib/fmtmsg.c
- To: commits@xxxxxxxxxx
- Subject: [Commits] r17294 - in /fsf/trunk/libc: ChangeLog configure configure.in stdlib/fmtmsg.c
- From: eglibc@xxxxxxxxxx
- Date: Sun, 26 Feb 2012 00:01:40 -0000
Author: eglibc
Date: Sun Feb 26 00:01:39 2012
New Revision: 17294
Log:
Import glibc-mainline for 2012-02-26
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/configure
fsf/trunk/libc/configure.in
fsf/trunk/libc/stdlib/fmtmsg.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Sun Feb 26 00:01:39 2012
@@ -1,3 +1,12 @@
+2012-02-24 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * stdlib/fmtmsg.c (fmtmsg): Lock around use of severity list.
+ Reported by Peng Haitao <penght@xxxxxxxxxxxxxx>.
+
+2012-02-24 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * configure.in: Use -o not -a in test for unsupported multi-arch.
+
2012-02-24 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* manual/texinfo.tex: Update to version 2012-01-19.16.
Modified: fsf/trunk/libc/configure
==============================================================================
--- fsf/trunk/libc/configure (original)
+++ fsf/trunk/libc/configure Sun Feb 26 00:01:39 2012
@@ -4142,7 +4142,7 @@
fi
-if test x"$libc_cv_asm_gnu_indirect_function" != xyes -a x"$libc_cv_asm_type_prefix" = xno; then
+if test x"$libc_cv_asm_gnu_indirect_function" != xyes -o x"$libc_cv_asm_type_prefix" = xno; then
if test x"$multi_arch" = xyes; then
as_fn_error $? "--enable-multi-arch support requires assembler and linker support" "$LINENO" 5
else
Modified: fsf/trunk/libc/configure.in
==============================================================================
--- fsf/trunk/libc/configure.in (original)
+++ fsf/trunk/libc/configure.in Sun Feb 26 00:01:39 2012
@@ -598,7 +598,7 @@
AC_DEFINE_UNQUOTED(ASM_TYPE_DIRECTIVE_PREFIX, ${libc_cv_asm_type_prefix})
fi
-if test x"$libc_cv_asm_gnu_indirect_function" != xyes -a x"$libc_cv_asm_type_prefix" = xno; then
+if test x"$libc_cv_asm_gnu_indirect_function" != xyes -o x"$libc_cv_asm_type_prefix" = xno; then
if test x"$multi_arch" = xyes; then
AC_MSG_ERROR([--enable-multi-arch support requires assembler and linker support])
else
Modified: fsf/trunk/libc/stdlib/fmtmsg.c
==============================================================================
--- fsf/trunk/libc/stdlib/fmtmsg.c (original)
+++ fsf/trunk/libc/stdlib/fmtmsg.c Sun Feb 26 00:01:39 2012
@@ -103,7 +103,6 @@
const char *text, const char *action, const char *tag)
{
__libc_once_define (static, once);
- int result = MM_OK;
struct severity_info *severity_rec;
/* Make sure everything is initialized. */
@@ -123,17 +122,6 @@
|| strlen (cp + 1) > 14)
return MM_NOTOK;
}
-
- for (severity_rec = severity_list; severity_rec != NULL;
- severity_rec = severity_rec->next)
- if (severity == severity_rec->severity)
- /* Bingo. */
- break;
-
- /* If we don't know anything about the severity level return an error. */
- if (severity_rec == NULL)
- return MM_NOTOK;
-
#ifdef __libc_ptf_call
/* We do not want this call to be cut short by a thread
@@ -143,53 +131,72 @@
0);
#endif
- /* Now we can print. */
- if (classification & MM_PRINT)
- {
- int do_label = (print & label_mask) && label != MM_NULLLBL;
- int do_severity = (print & severity_mask) && severity != MM_NULLSEV;
- int do_text = (print & text_mask) && text != MM_NULLTXT;
- int do_action = (print & action_mask) && action != MM_NULLACT;
- int do_tag = (print & tag_mask) && tag != MM_NULLTAG;
-
- if (__fxprintf (stderr, "%s%s%s%s%s%s%s%s%s%s\n",
- do_label ? label : "",
- do_label && (do_severity | do_text | do_action | do_tag)
- ? ": " : "",
- do_severity ? severity_rec->string : "",
- do_severity && (do_text | do_action | do_tag)
- ? ": " : "",
- do_text ? text : "",
- do_text && (do_action | do_tag) ? "\n" : "",
- do_action ? "TO FIX: " : "",
- do_action ? action : "",
- do_action && do_tag ? " " : "",
- do_tag ? tag : "") < 0)
- /* Oh, oh. An error occurred during the output. */
- result = MM_NOMSG;
- }
-
- if (classification & MM_CONSOLE)
- {
- int do_label = label != MM_NULLLBL;
- int do_severity = severity != MM_NULLSEV;
- int do_text = text != MM_NULLTXT;
- int do_action = action != MM_NULLACT;
- int do_tag = tag != MM_NULLTAG;
-
- syslog (LOG_ERR, "%s%s%s%s%s%s%s%s%s%s\n",
- do_label ? label : "",
- do_label && (do_severity | do_text | do_action | do_tag)
- ? ": " : "",
- do_severity ? severity_rec->string : "",
- do_severity && (do_text | do_action | do_tag) ? ": " : "",
- do_text ? text : "",
- do_text && (do_action | do_tag) ? "\n" : "",
- do_action ? "TO FIX: " : "",
- do_action ? action : "",
- do_action && do_tag ? " " : "",
- do_tag ? tag : "");
- }
+ __libc_lock_lock (lock);
+
+ for (severity_rec = severity_list; severity_rec != NULL;
+ severity_rec = severity_rec->next)
+ if (severity == severity_rec->severity)
+ /* Bingo. */
+ break;
+
+ /* If we don't know anything about the severity level return an error. */
+ int result = MM_NOTOK;
+ if (severity_rec != NULL)
+ {
+ result = MM_OK;
+
+ /* Now we can print. */
+ if (classification & MM_PRINT)
+ {
+ int do_label = (print & label_mask) && label != MM_NULLLBL;
+ int do_severity = (print & severity_mask) && severity != MM_NULLSEV;
+ int do_text = (print & text_mask) && text != MM_NULLTXT;
+ int do_action = (print & action_mask) && action != MM_NULLACT;
+ int do_tag = (print & tag_mask) && tag != MM_NULLTAG;
+ int need_colon = (do_label
+ && (do_severity | do_text | do_action | do_tag));
+
+ if (__fxprintf (stderr, "%s%s%s%s%s%s%s%s%s%s\n",
+ do_label ? label : "",
+ need_colon ? ": " : "",
+ do_severity ? severity_rec->string : "",
+ do_severity && (do_text | do_action | do_tag)
+ ? ": " : "",
+ do_text ? text : "",
+ do_text && (do_action | do_tag) ? "\n" : "",
+ do_action ? "TO FIX: " : "",
+ do_action ? action : "",
+ do_action && do_tag ? " " : "",
+ do_tag ? tag : "") < 0)
+ /* Oh, oh. An error occurred during the output. */
+ result = MM_NOMSG;
+ }
+
+ if (classification & MM_CONSOLE)
+ {
+ int do_label = label != MM_NULLLBL;
+ int do_severity = severity != MM_NULLSEV;
+ int do_text = text != MM_NULLTXT;
+ int do_action = action != MM_NULLACT;
+ int do_tag = tag != MM_NULLTAG;
+ int need_colon = (do_label
+ && (do_severity | do_text | do_action | do_tag));
+
+ syslog (LOG_ERR, "%s%s%s%s%s%s%s%s%s%s\n",
+ do_label ? label : "",
+ need_colon ? ": " : "",
+ do_severity ? severity_rec->string : "",
+ do_severity && (do_text | do_action | do_tag) ? ": " : "",
+ do_text ? text : "",
+ do_text && (do_action | do_tag) ? "\n" : "",
+ do_action ? "TO FIX: " : "",
+ do_action ? action : "",
+ do_action && do_tag ? " " : "",
+ do_tag ? tag : "");
+ }
+ }
+
+ __libc_lock_unlock (lock);
#ifdef __libc_ptf_call
__libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits