|
|
5259eef |
From 17dd77cd74f0a69332c091f816162e34abff30c5 Mon Sep 17 00:00:00 2001
|
|
|
5259eef |
From: Francois Perrad <francois.perrad@gadz.org>
|
|
|
5259eef |
Date: Mon, 2 Jul 2018 00:17:44 +0200
|
|
|
5259eef |
Subject: [PATCH] locale.c: Fix conditional compilation
|
|
|
5259eef |
MIME-Version: 1.0
|
|
|
5259eef |
Content-Type: text/plain; charset=UTF-8
|
|
|
5259eef |
Content-Transfer-Encoding: 8bit
|
|
|
5259eef |
|
|
|
5259eef |
With Perl 5.28.0, there are some mismatches between blocks
|
|
|
5259eef |
and conditional compilation in the Perl__is_cur_LC_category_utf8() function.
|
|
|
5259eef |
The compilation of miniperl could fails like this:
|
|
|
5259eef |
```
|
|
|
5259eef |
locale.c: In function `Perl__is_cur_LC_category_utf8`:
|
|
|
5259eef |
locale.c:5481:1: error: expected declaration or statement at end of input
|
|
|
5259eef |
}
|
|
|
5259eef |
^
|
|
|
5259eef |
```
|
|
|
5259eef |
|
|
|
5259eef |
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
|
|
|
5259eef |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
5259eef |
---
|
|
|
5259eef |
locale.c | 5 +++--
|
|
|
5259eef |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
5259eef |
|
|
|
5259eef |
diff --git a/locale.c b/locale.c
|
|
|
5259eef |
index f8f77fb3d0..f2731846ad 100644
|
|
|
5259eef |
--- a/locale.c
|
|
|
5259eef |
+++ b/locale.c
|
|
|
5259eef |
@@ -4649,11 +4649,12 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category)
|
|
|
5259eef |
&& wc == (wchar_t) UNICODE_REPLACEMENT);
|
|
|
5259eef |
}
|
|
|
5259eef |
|
|
|
5259eef |
+# endif
|
|
|
5259eef |
+
|
|
|
5259eef |
restore_switched_locale(LC_CTYPE, original_ctype_locale);
|
|
|
5259eef |
goto finish_and_return;
|
|
|
5259eef |
}
|
|
|
5259eef |
|
|
|
5259eef |
-# endif
|
|
|
5259eef |
# else
|
|
|
5259eef |
|
|
|
5259eef |
/* Here, we must have a C89 compiler that doesn't have mbtowc(). Next
|
|
|
5259eef |
@@ -4885,9 +4886,9 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category)
|
|
|
5259eef |
is_utf8 = TRUE;
|
|
|
5259eef |
goto finish_and_return;
|
|
|
5259eef |
}
|
|
|
5259eef |
- }
|
|
|
5259eef |
|
|
|
5259eef |
# endif
|
|
|
5259eef |
+ }
|
|
|
5259eef |
# endif
|
|
|
5259eef |
|
|
|
5259eef |
/* Other common encodings are the ISO 8859 series, which aren't UTF-8. But
|
|
|
5259eef |
--
|
|
|
5259eef |
2.14.4
|
|
|
5259eef |
|