Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
4b16a8bf
Commit
4b16a8bf
authored
Aug 02, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/icu: require at least version 50
parent
ca4c81dd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
16 deletions
+1
-16
configure.ac
configure.ac
+1
-1
Collate.cxx
src/lib/icu/Collate.cxx
+0
-15
No files found.
configure.ac
View file @
4b16a8bf
...
@@ -467,7 +467,7 @@ AC_ARG_ENABLE(icu,
...
@@ -467,7 +467,7 @@ AC_ARG_ENABLE(icu,
[enable libicu for Unicode (default: auto)]),,
[enable libicu for Unicode (default: auto)]),,
enable_icu=auto)
enable_icu=auto)
MPD_AUTO_PKG(icu, ICU, [icu-i18n], [libicu], [libicu not found])
MPD_AUTO_PKG(icu, ICU, [icu-i18n
>= 50
], [libicu], [libicu not found])
MPD_DEFINE_CONDITIONAL(enable_icu, HAVE_ICU, [libicu])
MPD_DEFINE_CONDITIONAL(enable_icu, HAVE_ICU, [libicu])
AC_ARG_ENABLE(iconv,
AC_ARG_ENABLE(iconv,
...
...
src/lib/icu/Collate.cxx
View file @
4b16a8bf
...
@@ -85,23 +85,8 @@ IcuCollate(const char *a, const char *b) noexcept
...
@@ -85,23 +85,8 @@ IcuCollate(const char *a, const char *b) noexcept
#ifdef HAVE_ICU
#ifdef HAVE_ICU
assert
(
collator
!=
nullptr
);
assert
(
collator
!=
nullptr
);
#if U_ICU_VERSION_MAJOR_NUM >= 50
UErrorCode
code
=
U_ZERO_ERROR
;
UErrorCode
code
=
U_ZERO_ERROR
;
return
(
int
)
ucol_strcollUTF8
(
collator
,
a
,
-
1
,
b
,
-
1
,
&
code
);
return
(
int
)
ucol_strcollUTF8
(
collator
,
a
,
-
1
,
b
,
-
1
,
&
code
);
#else
/* fall back to ucol_strcoll() */
try
{
const
auto
au
=
UCharFromUTF8
(
a
);
const
auto
bu
=
UCharFromUTF8
(
b
);
return
ucol_strcoll
(
collator
,
au
.
begin
(),
au
.
size
(),
bu
.
begin
(),
bu
.
size
());
}
catch
(...)
{
/* fall back to plain strcasecmp() */
return
strcasecmp
(
a
,
b
);
}
#endif
#elif defined(_WIN32)
#elif defined(_WIN32)
AllocatedString
<
wchar_t
>
wa
=
nullptr
,
wb
=
nullptr
;
AllocatedString
<
wchar_t
>
wa
=
nullptr
,
wb
=
nullptr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment