From d8cba8ab2d55197f2f2b5c40c780647b2fb5c488 Mon Sep 17 00:00:00 2001 From: Michael Ow Date: Fri, 9 Jan 2015 06:45:59 +0000 Subject: [PATCH] ICU-11391 Fix data build on windows X-SVN-Rev: 36934 --- icu4c/source/tools/pkgdata/pkgdata.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/icu4c/source/tools/pkgdata/pkgdata.cpp b/icu4c/source/tools/pkgdata/pkgdata.cpp index cb56ccff699..3050460775a 100644 --- a/icu4c/source/tools/pkgdata/pkgdata.cpp +++ b/icu4c/source/tools/pkgdata/pkgdata.cpp @@ -2160,6 +2160,7 @@ static void loadLists(UPKGOptions *o, UErrorCode *status) #ifdef CAN_WRITE_OBJ_CODE /* Create optMatchArch for genccode architecture detection */ static void pkg_createOptMatchArch(char *optMatchArch) { +#if !defined(WINDOWS_WITH_MSVC) || defined(USING_CYGWIN) const char* code = "void oma(){}"; const char* source = "oma.c"; const char* obj = "oma.obj"; @@ -2189,9 +2190,10 @@ static void pkg_createOptMatchArch(char *optMatchArch) { else { fprintf(stderr, "T_FileStream_open failed to open %s for writing\n", source); } +#endif } static void pkg_destroyOptMatchArch(char *optMatchArch) { - if(!T_FileStream_remove(optMatchArch)){ + if(T_FileStream_file_exists(optMatchArch) && !T_FileStream_remove(optMatchArch)){ fprintf(stderr, "T_FileStream_remove failed to delete %s\n", optMatchArch); } } -- 2.40.0