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