1 --- setlocale.c.orig 2004-11-25 11:38:19.000000000 -0800
2 +++ setlocale.c 2005-02-17 12:42:40.000000000 -0800
5 __FBSDID("$FreeBSD: src/lib/libc/locale/setlocale.c,v 1.50 2004/01/31 19:15:32 ache Exp $");
7 +#include "xlocale_private.h"
13 #include "lmessages.h" /* for __messages_load_locale() */
14 #include "setlocale.h"
16 -#include "../stdtime/timelocal.h" /* for __time_load_locale() */
17 +#include "timelocal.h" /* for __time_load_locale() */
20 * Category names for getenv()
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);
29 setlocale(category, locale)
32 char *new = new_categories[category];
33 char *old = current_categories[category];
34 - int (*func)(const char *);
35 + int (*func)(const char *, locale_t);
40 if (strcmp(new, old) == 0)
43 - if (func(new) != _LDP_ERROR) {
44 + if (func(new, &__global_locale) != _LDP_ERROR) {
45 (void)strcpy(old, new);
53 +__private_extern__ const char *
54 __get_locale_env(category)
59 * Detect locale storage location and store its value to _PathLocale variable
62 +__private_extern__ int
63 __detect_path_locale(void)
65 if (_PathLocale == NULL) {