@@ -8963,6 +8963,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
8963
8963
* categories into our internal indices. */
8964
8964
if (map_LC_ALL_position_to_index [0 ]== LC_ALL_INDEX_ ) {
8965
8965
8966
+ # ifdef PERL_LC_ALL_CATEGORY_POSITIONS_INIT
8966
8967
/* Use this array, initialized by a config.h constant */
8967
8968
int lc_all_category_positions []= PERL_LC_ALL_CATEGORY_POSITIONS_INIT ;
8968
8969
STATIC_ASSERT_STMT (C_ARRAY_LENGTH (lc_all_category_positions )
@@ -8975,6 +8976,21 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
8975
8976
map_LC_ALL_position_to_index [i ]=
8976
8977
get_category_index (lc_all_category_positions [i ]);
8977
8978
}
8979
+ # else
8980
+ /* It is possible for both PERL_LC_ALL_USES_NAME_VALUE_PAIRS and
8981
+ * PERL_LC_ALL_CATEGORY_POSITIONS_INIT not to be defined, e.g. on
8982
+ * systems with only a C locale during ./Configure. Assume that this
8983
+ * can only happen as part of some sort of bootstrapping so allow
8984
+ * compilation to succeed by ignoring correctness.
8985
+ */
8986
+ for (unsignedint i = 0 ;
8987
+ i < C_ARRAY_LENGTH (map_LC_ALL_position_to_index );
8988
+ i ++ )
8989
+ {
8990
+ map_LC_ALL_position_to_index [i ]= 0 ;
8991
+ }
8992
+ # endif
8993
+
8978
8994
}
8979
8995
8980
8996
LOCALE_UNLOCK ;