Skip to content

Commit fde67e8

Browse files
authored
Revert "Revert "_FoundationUnicode: apply symbol renaming for non-Darwin targ…" (#66)
This reverts commit 1323bae.
1 parent 1b571e3 commit fde67e8

File tree

4 files changed

+1990
-2
lines changed

4 files changed

+1990
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ add_compile_definitions(
4545
$<$<COMPILE_LANGUAGE:C,CXX>:U_HAVE_STRTOD_L=1>
4646
$<$<COMPILE_LANGUAGE:C,CXX>:U_HAVE_XLOCALE_H=1>
4747
$<$<COMPILE_LANGUAGE:C,CXX>:U_HAVE_STRING_VIEW=1>
48-
$<$<COMPILE_LANGUAGE:C,CXX>:U_DISABLE_RENAMING=1>
48+
$<$<COMPILE_LANGUAGE:C,CXX>:U_DISABLE_RENAMING=$<IF:$<PLATFORM_ID:Darwin>,1,0>>
4949
$<$<COMPILE_LANGUAGE:C,CXX>:U_COMBINED_IMPLEMENTATION>
5050
$<$<COMPILE_LANGUAGE:C,CXX>:U_COMMON_IMPLEMENTATION>
5151
$<$<COMPILE_LANGUAGE:C,CXX>:U_I18N_IMPLEMENTATION>

Package.swift

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,23 @@ var buildSettings: [CXXSetting] = [
3434
.define("U_HAVE_STRTOD_L", to: "1"),
3535
.define("U_HAVE_XLOCALE_H", to: "1"),
3636
.define("U_HAVE_STRING_VIEW", to: "1"),
37-
.define("U_DISABLE_RENAMING", to: "1"),
37+
.define(
38+
"U_DISABLE_RENAMING", to: "1",
39+
.when(platforms: [
40+
.macOS,
41+
.iOS,
42+
.tvOS,
43+
.watchOS,
44+
.visionOS,
45+
])),
46+
.define(
47+
"U_DISABLE_RENAMING", to: "0",
48+
.when(platforms: [
49+
.linux,
50+
.windows,
51+
.android,
52+
.wasi,
53+
])),
3854
.define("U_COMBINED_IMPLEMENTATION"),
3955
.define("U_COMMON_IMPLEMENTATION"),
4056
.define("U_I18N_IMPLEMENTATION"),

icuSources/include/_foundation_unicode/uconfig.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,13 @@
101101
#ifndef U_DISABLE_RENAMING
102102
#if APPLE_ICU_CHANGES
103103
//rdar://60884991 #58 Replace installsrc patching with changes directly in header files
104+
#if defined(__APPLE__)
104105
#define U_DISABLE_RENAMING 1
105106
#else
106107
#define U_DISABLE_RENAMING 0
108+
#endif
109+
#else
110+
#define U_DISABLE_RENAMING 0
107111
#endif // APPLE_ICU_CHANGES
108112
#endif
109113

0 commit comments

Comments
 (0)