Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/perl5Public

Commitbd0ab50

Browse files
committed
locale.c: Fix compilation on platforms with only a C locale
Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
1 parent67e8521 commitbd0ab50

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

‎AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ Andreas König <a.koenig@mind.de>
103103
Andreas Marienborg <andreas.marienborg@gmail.com>
104104
Andreas Schwab <schwab@suse.de>
105105
Andreas Voegele <andreas@andreasvoegele.com>
106+
Andrei Horodniceanu <a.horodniceanu@proton.me>
106107
Andrei Yelistratov <andrew@sundale.net>
107108
Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru>
108109
Andrew Bettison <andrewb@zip.com.au>

‎locale.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8963,6 +8963,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
89638963
* categories into our internal indices. */
89648964
if (map_LC_ALL_position_to_index[0]==LC_ALL_INDEX_) {
89658965

8966+
# ifdefPERL_LC_ALL_CATEGORY_POSITIONS_INIT
89668967
/* Use this array, initialized by a config.h constant */
89678968
intlc_all_category_positions[]=PERL_LC_ALL_CATEGORY_POSITIONS_INIT;
89688969
STATIC_ASSERT_STMT(C_ARRAY_LENGTH(lc_all_category_positions)
@@ -8975,6 +8976,21 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
89758976
map_LC_ALL_position_to_index[i]=
89768977
get_category_index(lc_all_category_positions[i]);
89778978
}
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 (unsignedinti=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+
89788994
}
89798995

89808996
LOCALE_UNLOCK;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp