diff --git a/intrpvar.h b/intrpvar.h index f08de2f0d078..01ad73c88c91 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -752,7 +752,7 @@ PERLVARI(I, cur_locale_obj, locale_t, NULL) /* This is the most number of categories we've encountered so far on any * platform, doesn't include LC_ALL */ -PERLVARA(I, curlocales, 12, const char *) +PERLVARA(I, curlocales, LOCALE_CATEGORIES_COUNT_, const char *) #endif #ifdef USE_PL_CUR_LC_ALL diff --git a/perl.h b/perl.h index 6d0eb93e803e..39e4f560b248 100644 --- a/perl.h +++ b/perl.h @@ -1248,6 +1248,9 @@ typedef enum { } locale_category_index; +/* And a count of all the categories, mainly for use in array declarations */ +# define LOCALE_CATEGORIES_COUNT_ LC_ALL_INDEX_ + # if defined(USE_ITHREADS) && ! defined(NO_LOCALE_THREADS) # define USE_LOCALE_THREADS # endif