ICU-7581 Fix a few mingw build issues including symbolic links when building data and missing header file inclusion.

X-SVN-Rev: 28125
This commit is contained in:
Michael Ow 2010-06-03 15:51:19 +00:00
parent fc60e0868d
commit d565b3b2f3
3 changed files with 10 additions and 3 deletions

View file

@ -43,7 +43,7 @@
#if defined(U_PALMOS)
# include "unicode/ppalmos.h"
#elif defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
#elif !defined(__MINGW32__) && (defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64))
#ifdef CYGWINMSVC
# include "unicode/platform.h"
#endif

View file

@ -851,7 +851,8 @@ static int32_t pkg_createSymLinks(const char *targetDir, UBool specialHandling)
#ifndef USING_CYGWIN
/* No symbolic link to make. */
if (uprv_strlen(libFileNames[LIB_FILE_VERSION]) == 0 || uprv_strlen(libFileNames[LIB_FILE_VERSION_MAJOR]) == 0) {
if (uprv_strlen(libFileNames[LIB_FILE_VERSION]) == 0 || uprv_strlen(libFileNames[LIB_FILE_VERSION_MAJOR]) == 0 ||
uprv_strcmp(libFileNames[LIB_FILE_VERSION], libFileNames[LIB_FILE_VERSION_MAJOR]) == 0) {
return result;
}

View file

@ -35,6 +35,12 @@
# include <sys/stat.h>
# include <sys/types.h>
#endif
/* In MinGW environment, io.h needs to be included for _mkdir() */
#ifdef __MINGW32__
#include <io.h>
#endif
#include <errno.h>
#include "unicode/errorcode.h"
@ -160,7 +166,7 @@ U_CAPI void U_EXPORT2
uprv_mkdir(const char *pathname, UErrorCode *status) {
int retVal = 0;
#if defined(U_WINDOWS)
#if defined(U_WINDOWS) || defined(__MINGW32__)
retVal = _mkdir(pathname);
#else
retVal = mkdir(pathname, S_IRWXU | (S_IROTH | S_IXOTH) | (S_IROTH | S_IXOTH));