summaryrefslogtreecommitdiff
path: root/locale.c
diff options
context:
space:
mode:
authorFrancois Perrad <francois.perrad@gadz.org>2018-07-02 00:17:44 +0200
committerKarl Williamson <khw@cpan.org>2018-07-16 11:15:04 -0600
commit17dd77cd74f0a69332c091f816162e34abff30c5 (patch)
tree2e4503ac30303ed19f9e1a7838270a56f15f7b93 /locale.c
parent75d3e525390a7acfd95b0fc94e41aeb4af6587d4 (diff)
downloadperl-17dd77cd74f0a69332c091f816162e34abff30c5.tar.gz
locale.c: Fix conditional compilation
With Perl 5.28.0, there are some mismatches between blocks and conditional compilation in the Perl__is_cur_LC_category_utf8() function. The compilation of miniperl could fails like this: ``` locale.c: In function `Perl__is_cur_LC_category_utf8`: locale.c:5481:1: error: expected declaration or statement at end of input } ^ ``` Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Diffstat (limited to 'locale.c')
-rw-r--r--locale.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/locale.c b/locale.c
index f8f77fb3d0..f2731846ad 100644
--- a/locale.c
+++ b/locale.c
@@ -4649,11 +4649,12 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category)
&& wc == (wchar_t) UNICODE_REPLACEMENT);
}
+# endif
+
restore_switched_locale(LC_CTYPE, original_ctype_locale);
goto finish_and_return;
}
-# endif
# else
/* Here, we must have a C89 compiler that doesn't have mbtowc(). Next
@@ -4885,9 +4886,9 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category)
is_utf8 = TRUE;
goto finish_and_return;
}
- }
# endif
+ }
# endif
/* Other common encodings are the ISO 8859 series, which aren't UTF-8. But