]>
Commit | Line | Data |
---|---|---|
3d9156a7 A |
1 | --- setlocale.c.orig 2004-11-25 11:38:19.000000000 -0800 |
2 | +++ setlocale.c 2005-02-17 12:42:40.000000000 -0800 | |
3 | @@ -41,6 +41,8 @@ | |
4 | #include <sys/cdefs.h> | |
5 | __FBSDID("$FreeBSD: src/lib/libc/locale/setlocale.c,v 1.50 2004/01/31 19:15:32 ache Exp $"); | |
6 | ||
7 | +#include "xlocale_private.h" | |
8 | + | |
9 | #include <sys/types.h> | |
10 | #include <sys/stat.h> | |
11 | #include <errno.h> | |
12 | @@ -56,7 +58,7 @@ | |
9385eb3d A |
13 | #include "lmessages.h" /* for __messages_load_locale() */ |
14 | #include "setlocale.h" | |
15 | #include "ldpart.h" | |
16 | -#include "../stdtime/timelocal.h" /* for __time_load_locale() */ | |
17 | +#include "timelocal.h" /* for __time_load_locale() */ | |
18 | ||
19 | /* | |
20 | * Category names for getenv() | |
3d9156a7 A |
21 | @@ -99,7 +101,7 @@ |
22 | ||
23 | static char *currentlocale(void); | |
24 | static char *loadlocale(int); | |
25 | -static const char *__get_locale_env(int); | |
26 | +__private_extern__ const char *__get_locale_env(int); | |
27 | ||
28 | char * | |
29 | setlocale(category, locale) | |
30 | @@ -237,7 +239,7 @@ | |
31 | { | |
32 | char *new = new_categories[category]; | |
33 | char *old = current_categories[category]; | |
34 | - int (*func)(const char *); | |
35 | + int (*func)(const char *, locale_t); | |
36 | int saved_errno; | |
37 | ||
38 | if ((new[0] == '.' && | |
39 | @@ -280,7 +282,7 @@ | |
40 | if (strcmp(new, old) == 0) | |
41 | return (old); | |
42 | ||
43 | - if (func(new) != _LDP_ERROR) { | |
44 | + if (func(new, &__global_locale) != _LDP_ERROR) { | |
45 | (void)strcpy(old, new); | |
46 | return (old); | |
47 | } | |
48 | @@ -288,7 +290,7 @@ | |
49 | return (NULL); | |
50 | } | |
51 | ||
52 | -static const char * | |
53 | +__private_extern__ const char * | |
54 | __get_locale_env(category) | |
55 | int category; | |
56 | { | |
57 | @@ -315,7 +317,7 @@ | |
58 | /* | |
59 | * Detect locale storage location and store its value to _PathLocale variable | |
60 | */ | |
61 | -int | |
62 | +__private_extern__ int | |
63 | __detect_path_locale(void) | |
64 | { | |
65 | if (_PathLocale == NULL) { |