mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 06:25:30 +00:00
ICU-8535 Merge changes for MINGW build fix in branch to trunk and fix some other errors when building with MINGW.
X-SVN-Rev: 30247
This commit is contained in:
parent
05d9fcda26
commit
c1f1d09b70
4 changed files with 16 additions and 11 deletions
|
@ -62,7 +62,7 @@ CPPFLAGS += -I$(top_builddir)/common
|
|||
endif
|
||||
CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/i18n $(LIBCPPFLAGS) $(CPPFLAGSICUUC)
|
||||
# we want DEFS here, because we want icucfg.h
|
||||
DEFS += -DU_COMMON_IMPLEMENTATION @DEFS@
|
||||
DEFS += -DU_COMMON_IMPLEMENTATION -DU_HAVE_ICUCFG
|
||||
LDFLAGS += $(LDFLAGSICUUC)
|
||||
|
||||
# for plugin configuration
|
||||
|
|
|
@ -77,7 +77,7 @@ Cleanly installed Solaris can use this #define.
|
|||
#include <float.h>
|
||||
|
||||
/* include system headers */
|
||||
#ifdef U_WINDOWS
|
||||
#if defined(U_WINDOWS) || defined(__MINGW32__)
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# define VC_EXTRALEAN
|
||||
# define NOUSER
|
||||
|
@ -143,7 +143,7 @@ Cleanly installed Solaris can use this #define.
|
|||
* Simple things (presence of functions, etc) should just go in configure.in and be added to
|
||||
* icucfg.h via autoheader.
|
||||
*/
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#if defined(U_HAVE_ICUCFG)
|
||||
#include "icucfg.h"
|
||||
#endif
|
||||
|
||||
|
@ -176,7 +176,7 @@ static const BitPatternConversion gInf = { (int64_t) INT64_C(0x7FF0000000000000)
|
|||
functions).
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
#if defined(U_WINDOWS) || defined(XP_MAC) || defined(OS400)
|
||||
#if defined(U_WINDOWS) || defined(XP_MAC) || defined(OS400) || defined(__MINGW32__)
|
||||
# undef U_POSIX_LOCALE
|
||||
#else
|
||||
# define U_POSIX_LOCALE 1
|
||||
|
@ -613,7 +613,7 @@ uprv_maximumPtr(void * base)
|
|||
U_CAPI void U_EXPORT2
|
||||
uprv_tzset()
|
||||
{
|
||||
#ifdef U_TZSET
|
||||
#if defined(U_TZSET) && !defined(__MINGW32__)
|
||||
U_TZSET();
|
||||
#else
|
||||
/* no initialization*/
|
||||
|
@ -1048,7 +1048,7 @@ uprv_tzname(int n)
|
|||
#endif
|
||||
|
||||
#ifdef U_TZNAME
|
||||
#ifdef U_WINDOWS
|
||||
#if defined(U_WINDOWS) || defined(__MINGW32__)
|
||||
/* The return value is free'd in timezone.cpp on Windows because
|
||||
* the other code path returns a pointer to a heap location. */
|
||||
return uprv_strdup(U_TZNAME[n]);
|
||||
|
@ -1568,7 +1568,7 @@ The leftmost codepage (.xxx) wins.
|
|||
|
||||
return posixID;
|
||||
|
||||
#elif defined(U_WINDOWS)
|
||||
#elif defined(U_WINDOWS) || defined(__MINGW32__)
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
LCID id = GetThreadLocale();
|
||||
const char* locID = uprv_convertToPosix(id, &status);
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
#if defined(U_PALMOS)
|
||||
# include "unicode/ppalmos.h"
|
||||
#elif /*!defined(__MINGW32__) && */(defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64))
|
||||
#elif !defined(__MINGW32__) && (defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64))
|
||||
/*
|
||||
* platform.h is now also generated by MSVC Solution/Project files
|
||||
* from platform.win and should always be included unless you are
|
||||
|
|
|
@ -850,7 +850,7 @@ static void createFileNames(UPKGOptions *o, const char mode, const char *version
|
|||
}
|
||||
|
||||
if (version != NULL) {
|
||||
#ifdef U_CYGWIN
|
||||
#if defined(U_CYGWIN) && !defined(__MINGW32__)
|
||||
sprintf(libFileNames[LIB_FILE_CYGWIN], "cyg%s.%s",
|
||||
libName,
|
||||
pkgDataFlags[SO_EXT]);
|
||||
|
@ -1003,7 +1003,12 @@ static int32_t pkg_installLibrary(const char *installDir, const char *targetDir)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined (__MINGW32__)
|
||||
/* On MINGW, symbolic links don't need to be created. */
|
||||
return result;
|
||||
#else
|
||||
return pkg_createSymLinks(installDir, TRUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int32_t pkg_installCommonMode(const char *installDir, const char *fileName) {
|
||||
|
@ -1216,7 +1221,7 @@ static int32_t pkg_generateLibraryFile(const char *targetDir, const char mode, c
|
|||
}
|
||||
freeCmd = TRUE;
|
||||
}
|
||||
#ifdef U_CYGWIN
|
||||
#if defined(U_CYGWIN) && !defined(__MINGW32__)
|
||||
sprintf(cmd, "%s%s%s %s -o %s%s %s %s%s %s %s",
|
||||
pkgDataFlags[GENLIB],
|
||||
targetDir,
|
||||
|
@ -1692,7 +1697,7 @@ static UPKGOptions *pkg_checkFlag(UPKGOptions *o) {
|
|||
T_FileStream_close(f);
|
||||
}
|
||||
}
|
||||
#elif defined(U_CYGWIN)
|
||||
#elif defined(U_CYGWIN) && !defined(__MINGW32__)
|
||||
/* Cygwin needs to change flag options. */
|
||||
char *flag = NULL;
|
||||
int32_t length = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue