diff --git a/icu4c/source/common/putilimp.h b/icu4c/source/common/putilimp.h index 6fe02ff8d289..8a8ff5008118 100644 --- a/icu4c/source/common/putilimp.h +++ b/icu4c/source/common/putilimp.h @@ -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 @@ -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 @@ -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 diff --git a/icu4c/source/common/unicode/platform.h b/icu4c/source/common/unicode/platform.h index 309ad8bb1fe3..b2fcb21ef130 100644 --- a/icu4c/source/common/unicode/platform.h +++ b/icu4c/source/common/unicode/platform.h @@ -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 */ @@ -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 diff --git a/icu4c/source/config/mh-haiku b/icu4c/source/config/mh-haiku index bb814cdd426e..965c9495ab5f 100644 --- a/icu4c/source/config/mh-haiku +++ b/icu4c/source/config/mh-haiku @@ -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= diff --git a/icu4c/source/configure.ac b/icu4c/source/configure.ac index f663a76998cd..be1cca633065 100644 --- a/icu4c/source/configure.ac +++ b/icu4c/source/configure.ac @@ -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" @@ -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 ;;