Skip to content

Commit

Permalink
ICU-22392 Add, primary support for Haiku
Browse files Browse the repository at this point in the history
  • Loading branch information
Begasus authored and markusicu committed Sep 24, 2024
1 parent 5889a53 commit ce11068
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions icu4c/source/common/putilimp.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ typedef size_t uintptr_t;
# define U_NL_LANGINFO_CODESET -1
#elif U_PLATFORM == U_PF_OS400
/* not defined */
#elif U_PLATFORM == U_PF_HAIKU
/* not defined */
#else
# define U_NL_LANGINFO_CODESET CODESET
#endif
Expand All @@ -103,6 +105,8 @@ typedef size_t uintptr_t;
#endif
#elif U_PLATFORM == U_PF_OS400
/* not defined */
#elif U_PLATFORM == U_PF_HAIKU
/* not defined */
#else
# define U_TZSET tzset
#endif
Expand Down Expand Up @@ -141,6 +145,8 @@ typedef size_t uintptr_t;
#endif
#elif U_PLATFORM == U_PF_OS400
/* not defined */
#elif U_PLATFORM == U_PF_HAIKU
/* not defined, (well it is but a loop back to icu) */
#else
# define U_TZNAME tzname
#endif
Expand Down
4 changes: 4 additions & 0 deletions icu4c/source/common/unicode/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@
#define U_PF_BROWSER_NATIVE_CLIENT 4020
/** Android is based on Linux. @internal */
#define U_PF_ANDROID 4050
/** Haiku is a POSIX-ish platform. @internal */
#define U_PF_HAIKU 4080
/** Fuchsia is a POSIX-ish platform. @internal */
#define U_PF_FUCHSIA 4100
/* Maximum value for Linux-based platform is 4499 */
Expand Down Expand Up @@ -202,6 +204,8 @@
# define U_PLATFORM U_PF_OS390
#elif defined(__OS400__) || defined(__TOS_OS400__)
# define U_PLATFORM U_PF_OS400
#elif defined(__HAIKU__)
# define U_PLATFORM U_PF_HAIKU
#elif defined(__EMSCRIPTEN__)
# define U_PLATFORM U_PF_EMSCRIPTEN
#else
Expand Down
2 changes: 1 addition & 1 deletion icu4c/source/config/mh-haiku
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ LIBCPPFLAGS =
THREADSCPPFLAGS =

#
CPPFLAGS += -D__STDC_ISO_10646__ -DU_CHARSET_IS_UTF8=1
CPPFLAGS += -DU_CHARSET_IS_UTF8=1

## Compiler switch to embed a runtime search path
LD_RPATH=
Expand Down
3 changes: 2 additions & 1 deletion icu4c/source/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ if test "$ENABLE_STATIC" = "YES"; then
OLD_LDFLAGS="${LDFLAGS}"

case "${host}" in
*-linux*|i*86-*-*bsd*|i*86-pc-gnu)
*-linux*|i*86-*-*bsd*|i*86-pc-gnu|*-haiku*)
if test "$GCC" = yes; then
CPPFLAGS="${CPPFLAGS} -ffunction-sections -fdata-sections"
LDFLAGS="${LDFLAGS} -Wl,--gc-sections"
Expand Down Expand Up @@ -1191,6 +1191,7 @@ case "${host}" in
*-*-nto*) platform=U_QNX ;;
*-dec-osf*) platform=U_OSF ;;
*-*-beos) platform=U_BEOS ;;
*-*-haiku) platform=U_HAIKU ;;
*-*-irix*) platform=U_IRIX ;;
*-ncr-*) platform=U_MPRAS ;;
*) platform=U_UNKNOWN_PLATFORM ;;
Expand Down

0 comments on commit ce11068

Please sign in to comment.