1--- misc/icu/source/config/mh-bsd-gcc 2009-01-15 16:46:10.000000000 +0900 2+++ misc/build/icu/source/config/mh-bsd-gcc 2011-06-14 17:12:14.000000000 +0900 3@@ -18,7 +18,15 @@ 4 5 ## Compiler switch to embed a runtime search path 6 LD_RPATH= 7-LD_RPATH_PRE= -Wl,-rpath, 8+LD_RPATH_PRE= -Wl,-z,origin -Wl,-rpath, 9+ 10+## Force RPATH=$ORIGIN to locate own dependencies w/o need for LD_LIBRARY_PATH 11+## (incl. the C++ runtime libs potentially found in the URE lib dir): 12+ENABLE_RPATH=YES 13+RPATHLDFLAGS=${LD_RPATH_PRE}'$$ORIGIN:$$ORIGIN/../ure-link/lib' 14+ 15+#SH# ENABLE_RPATH=YES 16+#SH# RPATHLDFLAGS="${LD_RPATH_PRE}'$$ORIGIN:$$ORIGIN/../ure-link/lib'" 17 18 ## Compiler switch to embed a library name 19 LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET)) 20 21--- misc/icu/source/common/putil.c 2008-07-01 03:41:12.000000000 +0200 22+++ misc/build/icu/source/common/putil.c 2008-09-02 07:01:29.335795765 +0200 23@@ -52,7 +52,7 @@ 24 Poorly upgraded Solaris machines can't have this defined. 25 Cleanly installed Solaris can use this #define. 26 */ 27-#if !defined(_XOPEN_SOURCE_EXTENDED) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ >= 199901L) 28+#if !defined(_XOPEN_SOURCE_EXTENDED) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) 29 #define _XOPEN_SOURCE_EXTENDED 1 30 #endif 31 32--- misc/icu/source/common/unicode/pwin32.h 2008-07-01 10:41:12.000000000 +0900 33+++ misc/build/icu/source/common/unicode/pwin32.h 2008-11-05 22:37:21.479250000 +0900 34@@ -32,6 +32,10 @@ 35 #define __STDC_CONSTANT_MACROS 36 #endif 37 38+#if defined(__MINGW32__) 39+#define U_HAVE_INTTYPES_H 1 40+#endif 41+ 42 /* _MSC_VER is used to detect the Microsoft compiler. */ 43 #if defined(_MSC_VER) 44 #define U_INT64_IS_LONG_LONG 0 45--- misc/icu/source/config/mh-darwin Tue Jul 1 03:41:24 2008 46+++ misc/build/icu/source/config/mh-darwin Tue Jan 20 18:33:16 2009 47@@ -25,7 +25,7 @@ 48 SHLIB.cc= $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS) 49 50 ## Compiler switches to embed a library name and version information 51-LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir $(MIDDLE_SO_TARGET)) 52+LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name @executable_path/$(notdir $(FINAL_SO_TARGET)) 53 54 ## Compiler switch to embed a runtime search path 55 LD_RPATH= 56@@ -41,10 +41,6 @@ 57 ## Non-shared intermediate object suffix 58 STATIC_O = ao 59 60-## Override Versioned target for a shared library. 61-FINAL_SO_TARGET= $(basename $(SO_TARGET)).$(SO_TARGET_VERSION).$(SO) 62-MIDDLE_SO_TARGET= $(basename $(SO_TARGET)).$(SO_TARGET_VERSION_MAJOR).$(SO) 63- 64 ## Compilation rules 65 %.$(STATIC_O): $(srcdir)/%.c 66 $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -o $@ $< 67@@ -76,15 +72,9 @@ 68 69 ## Versioned libraries rules 70 71-%.$(SO_TARGET_VERSION_MAJOR).$(SO): %.$(SO_TARGET_VERSION).$(SO) 72+%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION) 73 $(RM) $@ && ln -s ${<F} $@ 74-%.$(SO): %.$(SO_TARGET_VERSION_MAJOR).$(SO) 75- $(RM) $@ && ln -s ${*F}.$(SO_TARGET_VERSION).$(SO) $@ 76- 77-# tzcode option 78-TZORIG_EXTRA_CFLAGS=-DSTD_INSPIRED 79- 80-# genren opts 81-GENREN_PL_OPTS=-x Mach-O -n '-g' -p '| c++filt' 82+%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR) 83+ $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@ 84 85 ## End Darwin-specific setup 86--- misc/icu/source/config/mh-linux 2007-12-12 19:57:36.000000000 +0100 87+++ misc/build/icu/source/config/mh-linux 2008-05-21 18:59:13.000000000 +0200 88@@ -20,6 +20,14 @@ 89 LD_RPATH= 90 LD_RPATH_PRE = -Wl,-rpath, 91 92+## Force RPATH=$ORIGIN to locate own dependencies w/o need for LD_LIBRARY_PATH 93+## (incl. the C++ runtime libs potentially found in the URE lib dir): 94+ENABLE_RPATH=YES 95+RPATHLDFLAGS=${LD_RPATH_PRE}'$$ORIGIN:$$ORIGIN/../ure-link/lib' 96+ 97+#SH# ENABLE_RPATH=YES 98+#SH# RPATHLDFLAGS="${LD_RPATH_PRE}'$$ORIGIN:$$ORIGIN/../ure-link/lib'" 99+ 100 ## These are the library specific LDFLAGS 101 LDFLAGSICUDT=-nodefaultlibs -nostdlib 102 103--- misc/icu/source/config/mh-mingw 2008-07-01 10:41:24.000000000 +0900 104+++ misc/build/icu/source/config/mh-mingw 2008-11-06 00:18:30.261250000 +0900 105@@ -72,10 +72,12 @@ 106 # The #M# is used to delete lines for icu-config 107 # Current full path directory. 108 #CURR_FULL_DIR=$(shell pwd -W)#M# for MSYS 109-CURR_FULL_DIR=$(subst \,/,$(shell cmd /c cd | tail --bytes=+3))#M# for Cygwin shell 110+CURR_FULL_DIR=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell 111 # Current full path directory for use in source code in a -D compiler option. 112 #CURR_SRCCODE_FULL_DIR=$(subst /,\\\\,$(shell pwd -W))#M# for MSYS 113-CURR_SRCCODE_FULL_DIR=$(subst \,/,$(shell cmd /c cd | tail --bytes=+3))#M# for Cygwin shell 114+CURR_SRCCODE_FULL_DIR=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell 115+SRCDIR_DEPEND=$(shell cd $(SRCDIR) && pwd) 116+DATAFILEPATHS_DEPEND=$(foreach p,$(DATAFILEPATHS),$(shell cd $(dir $(p)) && pwd)/$(notdir $(p))) 117 118 ## Compilation rules 119 %.$(STATIC_O): $(srcdir)/%.c 120--- misc/icu/source/config/mh-solaris 2008-07-01 03:41:26.000000000 +0200 121+++ misc/build/icu/source/config/mh-solaris 2009-02-17 11:54:45.105890123 +0100 122@@ -18,17 +18,24 @@ 123 124 ## Commands to link 125 ## For Sun Workshop, use CC to link to bring in C++ runtime 126-LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) 127-LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) 128+LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) -norunpath 129+LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -norunpath 130 131 ## Commands to make a shared library 132 SHLIB.c= $(CC) $(CFLAGS) $(LDFLAGS) -G 133-SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G 134+SHLIB.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -G -norunpath 135 136 ## Compiler switch to embed a runtime search path 137 LD_RPATH= -R 138 LD_RPATH_PRE= 139 140+## Force RPATH=$ORIGIN to locate own dependencies w/o need for LD_LIBRARY_PATH 141+ENABLE_RPATH=YES 142+RPATHLDFLAGS=${LD_RPATH}'$$ORIGIN' 143+ 144+#SH# ENABLE_RPATH=YES 145+#SH# RPATHLDFLAGS="${LD_RPATH}'$$ORIGIN'" 146+ 147 #LIBRARY_PATH_PREFIX=/usr/lib/lwp: 148 149 ## Compiler switch to embed a library name 150--- misc/icu/source/layout/ArabicShaping.cpp 2008-07-01 03:42:04.000000000 +0200 151+++ misc/build/icu/source/layout/ArabicShaping.cpp 2009-02-17 12:04:34.264869737 +0100 152@@ -79,7 +79,6 @@ 153 #define markFeatureMask 0x00040000UL 154 #define mkmkFeatureMask 0x00020000UL 155 156-#define NO_FEATURES 0 157 #define ISOL_FEATURES (isolFeatureMask | ligaFeatureMask | msetFeatureMask | markFeatureMask | ccmpFeatureMask | rligFeatureMask | caltFeatureMask | dligFeatureMask | cswhFeatureMask | cursFeatureMask | kernFeatureMask | mkmkFeatureMask) 158 159 #define SHAPE_MASK 0xF0000000UL 160@@ -174,11 +173,7 @@ 161 LEUnicode c = chars[in]; 162 ShapeType t = getShapeType(c); 163 164- if (t == ST_NOSHAPE_NONE) { 165- glyphStorage.setAuxData(out, NO_FEATURES, success); 166- } else { 167- glyphStorage.setAuxData(out, ISOL_FEATURES, success); 168- } 169+ glyphStorage.setAuxData(out, ISOL_FEATURES, success); 170 171 if ((t & MASK_TRANSPARENT) != 0) { 172 continue; 173--- misc/icu/source/layoutex/ParagraphLayout.cpp 2008-07-01 03:42:02.000000000 +0200 174+++ misc/build/icu/source/layoutex/ParagraphLayout.cpp 2008-12-01 19:32:58.000000000 +0100 175@@ -868,7 +868,7 @@ 176 177 return nullLanguageCode; 178 } 179-#elif 180+#else 181 182 // TODO - dummy implementation for right now... 183 le_int32 ParagraphLayout::getLanguageCode(const Locale *locale) 184--- misc/icu/source/tools/pkgdata/cmnmode.c 2008-07-01 10:41:20.000000000 +0900 185+++ misc/build/icu/source/tools/pkgdata/cmnmode.c 2008-11-07 00:03:32.393500000 +0900 186@@ -69,7 +69,11 @@ 187 sprintf(tmp, "# List file for gencmn:\n" 188 "CMNLIST=%s%s%s_common.lst\n\n", 189 o->tmpDir, 190+#ifdef __MINGW32__ 191+ U_FILE_ALT_SEP_STRING, 192+#else 193 U_FILE_SEP_STRING, 194+#endif 195 o->shortName); 196 T_FileStream_writeLine(makefile, tmp); 197 198--- misc/icu/source/tools/pkgdata/dllmode.c 2008-07-01 10:41:20.000000000 +0900 199+++ misc/build/icu/source/tools/pkgdata/dllmode.c 2008-11-07 06:08:36.016750000 +0900 200@@ -139,7 +139,11 @@ 201 sprintf(tmp, "# List file for gencmn:\n" 202 "CMNLIST=%s%s$(NAME)_dll.lst\n\n", 203 o->tmpDir, 204+#ifdef __MINGW32__ 205+ U_FILE_ALT_SEP_STRING); 206+#else 207 U_FILE_SEP_STRING); 208+#endif 209 T_FileStream_writeLine(makefile, tmp); 210 211 if(o->hadStdin == FALSE) { /* shortcut */ 212--- misc/icu/source/tools/pkgdata/make.c 2008-07-01 10:41:20.000000000 +0900 213+++ misc/build/icu/source/tools/pkgdata/make.c 2008-11-06 23:23:04.096625000 +0900 214@@ -313,8 +313,13 @@ 215 uprv_strcpy(cfile+uprv_strlen(cfile)-uprv_strlen(objSuffix), ".c" ); /* replace .o with .c */ 216 217 /* Make up parents.. */ 218+#ifdef __MINGW32__ 219+ parentPath = uprv_malloc(1+uprv_strlen(baseName) + uprv_strlen("$(SRCDIR_DEPEND)/")); 220+ sprintf(parentPath, "$(SRCDIR_DEPEND)/%s", baseName); 221+#else 222 parentPath = uprv_malloc(1+uprv_strlen(baseName) + uprv_strlen("$(SRCDIR)/")); 223 sprintf(parentPath, "$(SRCDIR)/%s", baseName); 224+#endif 225 parents = pkg_appendToList(parents, NULL, parentPath); 226 227 /* make up commands.. */ 228@@ -379,7 +384,11 @@ 229 T_FileStream_writeLine(f, "\n"); 230 T_FileStream_writeLine(f, "BASE_OBJECTS=$(NAME)_dat.o\n"); 231 T_FileStream_writeLine(f, "\n"); 232+#ifdef __MINGW32__ 233+ T_FileStream_writeLine(f, "$(TEMP_DIR)/$(NAME).dat: $(CMNLIST) $(DATAFILEPATHS_DEPEND)\n"); 234+#else 235 T_FileStream_writeLine(f, "$(TEMP_DIR)/$(NAME).dat: $(CMNLIST) $(DATAFILEPATHS)\n"); 236+#endif 237 T_FileStream_writeLine(f, "\t$(INVOKE) $(ICUPKG) -t$(ICUDATA_CHAR) -c -s $(SRCDIR) -a $(CMNLIST) new $(TEMP_DIR)/$(CNAME).dat\n"); 238 T_FileStream_writeLine(f, "\n"); 239 T_FileStream_writeLine(f, "$(TEMP_DIR)/$(NAME)_dat.o : $(TEMP_DIR)/$(NAME).dat\n"); 240--- misc/icu/source/tools/pkgdata/pkgdata.c 2008-07-01 10:41:20.000000000 +0900 241+++ misc/build/icu/source/tools/pkgdata/pkgdata.c 2008-11-07 05:59:27.110500000 +0900 242@@ -594,7 +594,11 @@ 243 exit(U_ILLEGAL_ARGUMENT_ERROR); 244 } 245 uprv_strcpy(tmp, o->srcDir); 246+#ifdef __MINGW32__ 247+ uprv_strcat(tmp, o->srcDir[uprv_strlen(o->srcDir)-1]==U_FILE_SEP_CHAR?"":U_FILE_ALT_SEP_STRING); 248+#else 249 uprv_strcat(tmp, o->srcDir[uprv_strlen(o->srcDir)-1]==U_FILE_SEP_CHAR?"":U_FILE_SEP_STRING); 250+#endif 251 uprv_strcat(tmp, s); 252 o->filePaths = pkg_appendToList(o->filePaths, &tail2, uprv_strdup(tmp)); 253 linePtr = lineNext; 254--- misc/icu/source/tools/pkgdata/sttcmode.c 2008-07-01 10:41:20.000000000 +0900 255+++ misc/build/icu/source/tools/pkgdata/sttcmode.c 2008-11-07 00:30:05.690375000 +0900 256@@ -172,7 +172,11 @@ 257 sprintf(tmp, "# List file for gencmn:\n" 258 "CMNLIST=%s%s$(NAME)_static.lst\n\n", 259 o->tmpDir, 260+#ifdef __MINGW32__ 261+ U_FILE_ALT_SEP_STRING); 262+#else 263 U_FILE_SEP_STRING); 264+#endif 265 T_FileStream_writeLine(makefile, tmp); 266 267 if(o->hadStdin == FALSE) { /* shortcut */ 268--- misc/icu/source/common/uloc.c 2009-01-15 08:45:56.000000000 +0100 269+++ misc/build/icu/source/common/uloc.c 2009-12-14 10:51:38.000000000 +0100 270@@ -1736,7 +1736,7 @@ 271 int32_t variantLen = _deleteVariant(variant, uprv_min(variantSize, (nameCapacity-len)), variantToCompare, n); 272 len -= variantLen; 273 if (variantLen > 0) { 274- if (name[len-1] == '_') { /* delete trailing '_' */ 275+ if (len > 0 && name[len-1] == '_') { /* delete trailing '_' */ 276 --len; 277 } 278 addKeyword = VARIANT_MAP[j].keyword; 279@@ -1744,7 +1744,7 @@ 280 break; 281 } 282 } 283- if (name[len-1] == '_') { /* delete trailing '_' */ 284+ if (len > 0 && name[len-1] == '_') { /* delete trailing '_' */ 285 --len; 286 } 287 } 288