diff --git a/texk/bibtex-x/ChangeLog b/texk/bibtex-x/ChangeLog index 83647045d1..f13181f878 100644 --- a/texk/bibtex-x/ChangeLog +++ b/texk/bibtex-x/ChangeLog @@ -1,3 +1,12 @@ +2023-07-08 TANAKA Takuji + + * utils.c, gblprocs.h: + Enable to build with system ICU DLL icu.dll + for Windows 10 version 1903 (May 2019 Update) or later. + https://learn.microsoft.com/en-us/windows/win32/intl/international-components-for-unicode--icu- + * bibtex-{1,4}.c: + Enable to build with older ICU. + 2023-04-12 Karl Berry * tests/bibtex8.test, diff --git a/texk/bibtex-x/bibtex-1.c b/texk/bibtex-x/bibtex-1.c index 29ca1c4654..1f3619a8d7 100644 --- a/texk/bibtex-x/bibtex-1.c +++ b/texk/bibtex-x/bibtex-1.c @@ -330,8 +330,10 @@ BEGIN case UBLOCK_LATIN_EXTENDED_C: case UBLOCK_LATIN_EXTENDED_D: case UBLOCK_LATIN_EXTENDED_E: +#if defined(UBLOCK_LATIN_EXTENDED_G) case UBLOCK_LATIN_EXTENDED_F: case UBLOCK_LATIN_EXTENDED_G: +#endif case UBLOCK_LATIN_EXTENDED_ADDITIONAL: case UBLOCK_GREEK: case UBLOCK_GREEK_EXTENDED: diff --git a/texk/bibtex-x/bibtex-4.c b/texk/bibtex-x/bibtex-4.c index 9663f5a6b8..0c5bca2536 100644 --- a/texk/bibtex-x/bibtex-4.c +++ b/texk/bibtex-x/bibtex-4.c @@ -2818,7 +2818,9 @@ BEGIN case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D: case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E: case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F: +#if defined(UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G) case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G: +#endif string_width |= 0x001; break; /* kana */ @@ -2826,8 +2828,12 @@ BEGIN case UBLOCK_KATAKANA: case UBLOCK_KATAKANA_PHONETIC_EXTENSIONS: case UBLOCK_KANA_EXTENDED_A: +#if defined(UBLOCK_KANA_EXTENDED_B) case UBLOCK_KANA_EXTENDED_B: +#endif +#if defined(UBLOCK_SMALL_KANA_EXTENSION) case UBLOCK_SMALL_KANA_EXTENSION: +#endif string_width |= 0x002; break; /* hangul */ diff --git a/texk/bibtex-x/gblprocs.h b/texk/bibtex-x/gblprocs.h index 723da15b8d..d82cf703fe 100644 --- a/texk/bibtex-x/gblprocs.h +++ b/texk/bibtex-x/gblprocs.h @@ -92,10 +92,14 @@ #ifdef UTF_8 +#if defined(WIN32) && defined(WITH_SYSTEM_ICU) +#include "icu.h" +#else #include "unicode/uchar.h" #include "unicode/ustdio.h" #include "unicode/ustring.h" #include "unicode/ucol.h" +#endif int32_t icu_toUChars (BufType_T buf, BufPointer_T bf_ptr, BufPointer_T len, diff --git a/texk/bibtex-x/utils.c b/texk/bibtex-x/utils.c index 0dd077d8b8..fec5faba96 100644 --- a/texk/bibtex-x/utils.c +++ b/texk/bibtex-x/utils.c @@ -121,7 +121,9 @@ #include #ifdef WIN32 +#if !defined(_MSC_VER) #include +#endif #else #include #endif @@ -133,7 +135,7 @@ #include #include #include -#ifndef WIN32 +#if !defined(WIN32) || defined(_MSC_VER) #include #endif #endif