pdfgep: call setlocale only on glibc systems. Fixes #7988.

This commit is contained in:
Enno Boland 2019-01-30 18:40:03 +01:00
parent 8f11f9531c
commit 2313dad5b7
No known key found for this signature in database
GPG Key ID: D09964719BDE9971
2 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,14 @@
diff --git a/src/pdfgrep.cc b/src/pdfgrep.cc
index 7f8bdf8..5283e16 100644
--- ./src/pdfgrep.cc
+++ ./src/pdfgrep.cc
@@ -460,7 +460,9 @@ int main(int argc, char** argv)
// Set locale to user-preference. If this locale is an UTF-8 locale, the
// regex-functions regcomp/regexec become unicode aware, which means
// e.g. that '.' will match a unicode character, not a single byte.
+#ifdef __GLIBC__
locale::global(locale(""));
+#endif
enum re_engine_type {
RE_POSIX = 0,

View File

@ -1,7 +1,7 @@
# Template file for 'pdfgrep'
pkgname=pdfgrep
version=2.1.2
revision=1
revision=2
build_style=gnu-configure
hostmakedepends="pkg-config"
makedepends="libgcrypt-devel poppler-cpp-devel"