Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* locale/lc-ctype.c (_nl_postload_ctype): Update _nl_global_locale's
special members.
- Loading branch information
Roland McGrath
committed
Oct 31, 2003
1 parent
decc3af
commit 158a85b
Showing
4 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* Test case for setlocale vs uselocale (LC_GLOBAL_LOCALE) bug. */ | ||
|
||
#define _GNU_SOURCE 1 | ||
#include <locale.h> | ||
#include <stdio.h> | ||
#include <ctype.h> | ||
|
||
static int | ||
do_test (void) | ||
{ | ||
__locale_t loc_new, loc_old; | ||
|
||
int first = !!isalpha(0xE4); | ||
|
||
setlocale (LC_ALL, "de_DE"); | ||
|
||
int global_de = !!isalpha(0xE4); | ||
|
||
loc_new = newlocale (1 << LC_ALL, "C", 0); | ||
loc_old = uselocale (loc_new); | ||
|
||
int used_c = !!isalpha(0xE4); | ||
|
||
uselocale (loc_old); | ||
|
||
int used_global = !!isalpha(0xE4); | ||
|
||
printf ("started %d, after setlocale %d\n", first, global_de); | ||
printf ("after uselocale %d, after LC_GLOBAL_LOCALE %d\n", | ||
used_c, used_global); | ||
|
||
freelocale (loc_new); | ||
return !(used_c == first && used_global == global_de); | ||
} | ||
|
||
|
||
#define TEST_FUNCTION do_test () | ||
#include "test-skeleton.c" |