Index: generic_lc_template.h =================================================================== RCS file: /cvsroot/src/lib/libc/locale/generic_lc_template.h,v retrieving revision 1.2 diff -u -r1.2 generic_lc_template.h --- generic_lc_template.h 11 Jan 2009 02:46:28 -0000 1.2 +++ generic_lc_template.h 4 Mar 2009 10:33:24 -0000 @@ -29,17 +29,10 @@ #ifndef _GENERIC_LC_TEMPLATE_H_ #define _GENERIC_LC_TEMPLATE_H_ -#ifdef __lint__ -#define STATIC /**/ -#else -#define STATIC static -#endif - #define _LOCALE_CATEGORY_ENTRY(name) \ -STATIC const _locale_category_t name##desc = { \ +const _locale_category_t name##desc = { \ .category = _CATEGORY_ID, \ .setlocale = &name##setlocale, \ -}; \ -__link_set_add_data(all_categories, name##desc) +} #endif /*_GENERIC_LC_TEMPLATE_H_*/ Index: setlocale.c =================================================================== RCS file: /cvsroot/src/lib/libc/locale/setlocale.c,v retrieving revision 1.56 diff -u -r1.56 setlocale.c --- setlocale.c 11 Jan 2009 02:46:29 -0000 1.56 +++ setlocale.c 4 Mar 2009 10:33:24 -0000 @@ -47,15 +47,37 @@ __link_set_decl(all_categories, _locale_category_t); -#ifndef __lint__ -static +extern const _locale_category_t _generic_LC_ALL_desc; +extern const _locale_category_t _dummy_LC_COLLATE_desc; +#ifdef WITH_RUNE +extern const _locale_category_t _citrus_LC_CTYPE_desc; +extern const _locale_category_t _citrus_LC_MONETARY_desc; +extern const _locale_category_t _citrus_LC_NUMERIC_desc; +extern const _locale_category_t _citrus_LC_TIME_desc; +extern const _locale_category_t _citrus_LC_MESSAGES_desc; +#else +extern const _locale_category_t _localeio_LC_CTYPE_desc; +extern const _locale_category_t _localeio_LC_MONETARY_desc; +extern const _locale_category_t _localeio_LC_NUMERIC_desc; +extern const _locale_category_t _localeio_LC_TIME_desc; +extern const _locale_category_t _localeio_LC_MESSAGES_desc; #endif -const _locale_category_t dummy = { - .category = _LC_LAST, /* XXX */ - .setlocale = NULL, -}; -__link_set_add_data(all_categories, dummy); +__link_set_add_data(all_categories, _generic_LC_ALL_desc); +__link_set_add_data(all_categories, _dummy_LC_COLLATE_desc); +#ifdef WITH_RUNE +__link_set_add_data(all_categories, _citrus_LC_CTYPE_desc); +__link_set_add_data(all_categories, _citrus_LC_MONETARY_desc); +__link_set_add_data(all_categories, _citrus_LC_NUMERIC_desc); +__link_set_add_data(all_categories, _citrus_LC_TIME_desc); +__link_set_add_data(all_categories, _citrus_LC_MESSAGES_desc); +#else +__link_set_add_data(all_categories, _localeio_LC_CTYPE_desc); +__link_set_add_data(all_categories, _localeio_LC_MONETARY_desc); +__link_set_add_data(all_categories, _localeio_LC_NUMERIC_desc); +__link_set_add_data(all_categories, _lcoaleio_LC_TIME_desc); +__link_set_add_data(all_categories, _localeio_LC_MESSAGES_desc); +#endif _locale_category_t * _find_category(int category)