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