Skip to content

Commit

Permalink
ICU-22721 extend char16_t workaround to cygwin less than 3.5
Browse files Browse the repository at this point in the history
uchar.h was added in Cygwin version 3.5.0.  Unfortunately, the last version of Cygwin that supported i686 was 3.3.6, so it is still somewhat relevant to a subset of users.
  • Loading branch information
jeremyd2019 authored and markusicu committed Sep 24, 2024
1 parent 0f022dc commit ed68cff
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions icu4c/source/common/unicode/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@
# define U_PLATFORM U_PF_MINGW
#elif defined(__CYGWIN__)
# define U_PLATFORM U_PF_CYGWIN
/* Cygwin uchar.h doesn't exist until Cygwin 3.5. */
# include <cygwin/version.h>
#elif defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
# define U_PLATFORM U_PF_WINDOWS
#elif defined(__ANDROID__)
Expand Down Expand Up @@ -722,9 +724,10 @@
/*
* Notes:
* C++11 and C11 require support for UTF-16 literals
* Doesn't work on Mac C11 (see workaround in ptypes.h).
* Doesn't work on Mac C11 (see workaround in ptypes.h)
* or Cygwin less than 3.5.
*/
# if defined(__cplusplus) || !U_PLATFORM_IS_DARWIN_BASED
# if defined(__cplusplus) || !(U_PLATFORM_IS_DARWIN_BASED || (U_PLATFORM == U_PF_CYGWIN && CYGWIN_VERSION_DLL_MAJOR < 3005))
# define U_HAVE_CHAR16_T 1
# else
# define U_HAVE_CHAR16_T 0
Expand Down

0 comments on commit ed68cff

Please sign in to comment.