svn commit: r240603 - stable/9/lib/libc/locale
Gleb Smirnoff
glebius at FreeBSD.org
Mon Sep 17 13:05:39 UTC 2012
Author: glebius
Date: Mon Sep 17 13:05:39 2012
New Revision: 240603
URL: http://svn.freebsd.org/changeset/base/240603
Log:
Merge r238182 by theraven@:
Restore the __collate_load_error global that was accidentally removed in the
xlocale refactoring.
Modified:
stable/9/lib/libc/locale/collate.c
stable/9/lib/libc/locale/setrunelocale.c
Directory Properties:
stable/9/lib/libc/ (props changed)
Modified: stable/9/lib/libc/locale/collate.c
==============================================================================
--- stable/9/lib/libc/locale/collate.c Mon Sep 17 12:51:48 2012 (r240602)
+++ stable/9/lib/libc/locale/collate.c Mon Sep 17 13:05:39 2012 (r240603)
@@ -56,11 +56,11 @@ __FBSDID("$FreeBSD$");
* We also modify the collation table test functions to search the thread-local
* table first and the global table second.
*/
-#define __collate_load_error (table->__collate_load_error)
#define __collate_substitute_nontrivial (table->__collate_substitute_nontrivial)
#define __collate_substitute_table_ptr (table->__collate_substitute_table_ptr)
#define __collate_char_pri_table_ptr (table->__collate_char_pri_table_ptr)
#define __collate_chain_pri_table (table->__collate_chain_pri_table)
+int __collate_load_error;
struct xlocale_collate __xlocale_global_collate = {
@@ -109,7 +109,9 @@ __collate_load(const char *encoding, loc
int
__collate_load_tables(const char *encoding)
{
- return __collate_load_tables_l(encoding, &__xlocale_global_collate);
+ int ret = __collate_load_tables_l(encoding, &__xlocale_global_collate);
+ __collate_load_error = __xlocale_global_collate.__collate_load_error;
+ return ret;
}
int
@@ -123,7 +125,7 @@ __collate_load_tables_l(const char *enco
/* 'encoding' must be already checked. */
if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) {
- __collate_load_error = 1;
+ table->__collate_load_error = 1;
return (_LDP_CACHE);
}
@@ -240,7 +242,7 @@ __collate_load_tables_l(const char *enco
break;
}
}
- __collate_load_error = 0;
+ table->__collate_load_error = 0;
return (_LDP_LOADED);
}
Modified: stable/9/lib/libc/locale/setrunelocale.c
==============================================================================
--- stable/9/lib/libc/locale/setrunelocale.c Mon Sep 17 12:51:48 2012 (r240602)
+++ stable/9/lib/libc/locale/setrunelocale.c Mon Sep 17 13:05:39 2012 (r240603)
@@ -67,7 +67,6 @@ extern _RuneLocale *_Read_RuneMagi(FILE
static int __setrunelocale(struct xlocale_ctype *l, const char *);
-#define __collate_load_error (table->__collate_load_error)
#define __collate_substitute_nontrivial (table->__collate_substitute_nontrivial)
#define __collate_substitute_table_ptr (table->__collate_substitute_table_ptr)
#define __collate_char_pri_table_ptr (table->__collate_char_pri_table_ptr)
More information about the svn-src-stable-9
mailing list