diff --git a/icu4c/source/common/Makefile.in b/icu4c/source/common/Makefile.in index 96b67b93873..dc8ff7bfa72 100644 --- a/icu4c/source/common/Makefile.in +++ b/icu4c/source/common/Makefile.in @@ -47,7 +47,7 @@ DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS) # Data packaging options are set at configure time with --with-data-packaging. CPPFLAGS += -I. -I$(srcdir) $(LIBCPPFLAGS) @DATA_PACKAGING_CPPFLAGS@ -DEFS += -DU_LIBICUDATA_NAME=\"$(ICUDATA_NAME)\" +DEFS += -DU_LIBICUDATA_NAME=\"$(ICUDATA_NAME)\" -DU_COMMON_IMPLEMENTATION # $(LIBICUDT) is either stub data or the real DLL common data. LIBS = $(LIBICUDT) $(DEFAULT_LIBS) diff --git a/icu4c/source/common/unicode/platform.h.in b/icu4c/source/common/unicode/platform.h.in index c73d967849a..69a5b4dd249 100644 --- a/icu4c/source/common/unicode/platform.h.in +++ b/icu4c/source/common/unicode/platform.h.in @@ -232,13 +232,12 @@ typedef unsigned short uint16_t; #define U_EXPORT /* U_CALLCONV is releated to U_EXPORT2 */ #define U_EXPORT2 -#define U_IMPORT /* cygwin needs to export/import data */ #ifdef U_CYGWIN -#define U_DATA_IMPORT __declspec(dllimport) +#define U_IMPORT __declspec(dllimport) #else -#define U_DATA_IMPORT +#define U_IMPORT #endif /*===========================================================================*/ diff --git a/icu4c/source/common/unicode/pwin32.h b/icu4c/source/common/unicode/pwin32.h index 55b2c85979e..1b39246b0be 100644 --- a/icu4c/source/common/unicode/pwin32.h +++ b/icu4c/source/common/unicode/pwin32.h @@ -144,7 +144,6 @@ typedef unsigned short uint16_t; #define U_EXPORT __declspec(dllexport) #define U_EXPORT2 #define U_IMPORT __declspec(dllimport) -#define U_DATA_IMPORT __declspec(dllimport) /*===========================================================================*/ /* Code alignment and C function inlining */ diff --git a/icu4c/source/common/unicode/utf8.h b/icu4c/source/common/unicode/utf8.h index f467de7a25a..a5b58618126 100644 --- a/icu4c/source/common/unicode/utf8.h +++ b/icu4c/source/common/unicode/utf8.h @@ -43,7 +43,7 @@ U_CAPI const uint8_t utf8_countTrailBytes[256]; #else -U_CFUNC U_DATA_IMPORT const uint8_t /* U_IMPORT2? */ /*U_IMPORT*/ +U_CFUNC U_IMPORT const uint8_t /* U_IMPORT2? */ /*U_IMPORT*/ utf8_countTrailBytes[256]; #endif diff --git a/icu4c/source/extra/ustdio/Makefile.in b/icu4c/source/extra/ustdio/Makefile.in index 9861fbc6c2d..e46039f29c8 100644 --- a/icu4c/source/extra/ustdio/Makefile.in +++ b/icu4c/source/extra/ustdio/Makefile.in @@ -40,6 +40,7 @@ DYNAMICCFLAGS = $(SHAREDLIBCFLAGS) DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS) CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n $(LIBCPPFLAGS) +DEFS += -DU_USTDIO_IMPLEMENTATION LIBS = $(LIBICUUC) $(LIBICUI18N) $(DEFAULT_LIBS) OBJECTS = locbund.o loccache.o ufile.o ufmt_cmn.o uprintf.o uprntf_p.o \ diff --git a/icu4c/source/i18n/Makefile.in b/icu4c/source/i18n/Makefile.in index 3aaedc03d2b..3e20bd6f18a 100644 --- a/icu4c/source/i18n/Makefile.in +++ b/icu4c/source/i18n/Makefile.in @@ -40,6 +40,7 @@ DYNAMICCFLAGS = $(SHAREDLIBCFLAGS) DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS) CPPFLAGS += -I$(srcdir) -I$(top_builddir)/common -I$(top_srcdir)/common $(LIBCPPFLAGS) +DEFS += -DU_I18N_IMPLEMENTATION LIBS = $(LIBICUUC) $(DEFAULT_LIBS) OBJECTS = ucln_in.o \ diff --git a/icu4c/source/layout/Makefile.in b/icu4c/source/layout/Makefile.in index f608773c873..73d7bcbf7c8 100644 --- a/icu4c/source/layout/Makefile.in +++ b/icu4c/source/layout/Makefile.in @@ -37,6 +37,7 @@ DYNAMICCFLAGS = $(SHAREDLIBCFLAGS) DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS) CPPFLAGS += -I$(srcdir) -I$(top_builddir)/common -I$(srcdir)/unicode -I$(srcdir)/.. -I$(top_builddir)/common -I$(top_srcdir)/common $(LIBCPPFLAGS) +DEFS += -DU_LAYOUT_IMPLEMENTATION LIBS = $(DEFAULT_LIBS) diff --git a/icu4c/source/test/intltest/tsmthred.cpp b/icu4c/source/test/intltest/tsmthred.cpp index 61bdb3c9685..4d130032e0b 100644 --- a/icu4c/source/test/intltest/tsmthred.cpp +++ b/icu4c/source/test/intltest/tsmthred.cpp @@ -12,6 +12,12 @@ #include +// Just turn off threads on cygwin, so that we can test +// the other stuff. This needs to be investigated further. +#if defined(U_CYGWIN) +#define ICU_USE_THREADS 0 +#endif + #if !defined(WIN32) && !defined(XP_MAC) && !defined(U_RHAPSODY) #define POSIX 1 #endif diff --git a/icu4c/source/tools/ctestfw/ctest.c b/icu4c/source/tools/ctestfw/ctest.c index 17e23f2a70b..4fafaa4488d 100644 --- a/icu4c/source/tools/ctestfw/ctest.c +++ b/icu4c/source/tools/ctestfw/ctest.c @@ -34,6 +34,10 @@ static const struct TestNode* currentTest; typedef enum { RUNTESTS, SHOWTESTS } TestMode; #define TEST_SEPARATOR '/' +#ifndef C_TEST_IMPL +#define C_TEST_IMPL +#endif + #include "unicode/ctest.h" static char ERROR_LOG[MAX_TEST_LOG][MAXTESTNAME]; diff --git a/icu4c/source/tools/ctestfw/unicode/ctest.h b/icu4c/source/tools/ctestfw/unicode/ctest.h index 5267b22b2ab..440c473f4de 100644 --- a/icu4c/source/tools/ctestfw/unicode/ctest.h +++ b/icu4c/source/tools/ctestfw/unicode/ctest.h @@ -11,9 +11,10 @@ #ifndef CTEST_H #define CTEST_H +#include "unicode/utypes.h" /*Deals with imports and exports of the dynamic library*/ -#ifdef _WIN32 +#if defined(_WIN32) || defined(U_CYGWIN) #define T_CTEST_EXPORT __declspec(dllexport) #define T_CTEST_IMPORT __declspec(dllimport) #else