[sword-svn] r208 - in trunk: . source/common/unicode source/data source/tools/icupkg source/tools/pkgdata

chrislit at crosswire.org chrislit at crosswire.org
Mon Jun 1 22:06:54 MST 2009


Author: chrislit
Date: 2009-06-01 22:06:53 -0700 (Mon, 01 Jun 2009)
New Revision: 208

Modified:
   trunk/readme.html
   trunk/source/common/unicode/uversion.h
   trunk/source/data/Makefile.in
   trunk/source/tools/icupkg/icupkg.cpp
   trunk/source/tools/pkgdata/pkgdata.cpp
Log:
synch with ICU 4.2.0.1


Modified: trunk/readme.html
===================================================================
--- trunk/readme.html	2009-05-15 19:18:34 UTC (rev 207)
+++ trunk/readme.html	2009-06-02 05:06:53 UTC (rev 208)
@@ -17,9 +17,9 @@
 
   <body class="readme">
     <h1>International Components for Unicode<br />
-     <abbr title="International Components for Unicode">ICU</abbr> 4.2 ReadMe</h1>
+     <abbr title="International Components for Unicode">ICU</abbr> 4.2.0.1 ReadMe</h1>
 
-    <p>Version: 2009 May 8th<br />
+    <p>Version: 2009 May 20th<br />
      Copyright &copy; 1997-2009 International Business Machines Corporation and
     others. All Rights Reserved.</p>
     <!-- Remember that there is a copyright at the end too -->
@@ -197,12 +197,35 @@
     <p><strong>Important:</strong> Please make sure you understand the <a href=
     "license.html">Copyright and License Information</a>.</p>
 
-    <h2><a name="News" href="#News" id="News">What is new in this
-    release?</a></h2>
+    <h2><a name="News" href="#News" id="News">What is new in this release?</a></h2>
+    
 
-    <p>To see which APIs are new or changed in this release, view the <a href="APIChangeReport.html">ICU4C API Change Report</a>. </p>
+    <p>ICU for C/C++ version 4.2.0.1 is a an update release of 4.2, containing selected platform and build related bug fixes. It does
+     not introduce new API or functionality. These changes will be rolled into the next release of ICU.  
+     	The overall ticket used for this release is <a href="http://bugs.icu-project.org/trac/ticket/6953">#6953</a>.
+     	 Here is a list of the bug fixes included in 4.2.0.1, and the revisions used to patch 4.2.0.1:
+     </p>
+     <ul>
+     	<li>
+     		<a href="http://bugs.icu-project.org/trac/ticket/6929">#6929</a> 
+     		<a href="http://bugs.icu-project.org/trac/changeset/26005">r26005</a> &mdash;
+     		Symbol Renaming disabled on Windows by default
+     	</li>
+     	<li>
+     		<a href="http://bugs.icu-project.org/trac/ticket/6936">#6936</a> 
+     		<a href="http://bugs.icu-project.org/trac/changeset/26018">r26018</a> &mdash;
+     		Data Building Difficulty on IBM i
+     	</li>
+     	<li>
+     		<a href="http://bugs.icu-project.org/trac/ticket/6925">#6925</a> 
+     		<a href="http://bugs.icu-project.org/trac/changeset/26002">r26002</a> &mdash;
+     		Data Building Difficulty on IBM zOS under ASCII Mode
+     	</li>
+     </ul>
 
+    <p>To see which APIs are new or changed in the 4.2 release, view the <a href="APIChangeReport.html">ICU4C API Change Report</a>. </p>
 
+
     <p><!-- The following list concentrates on <em>changes that affect existing
     applications migrating from previous ICU releases</em>. --> For more news about
     this release, see the <a href="http://www.icu-project.org/download/">ICU 4.2

Modified: trunk/source/common/unicode/uversion.h
===================================================================
--- trunk/source/common/unicode/uversion.h	2009-05-15 19:18:34 UTC (rev 207)
+++ trunk/source/common/unicode/uversion.h	2009-06-02 05:06:53 UTC (rev 208)
@@ -81,7 +81,7 @@
  *  @stable ICU 4.0
  */
 #ifndef U_ICU_VERSION_BUILDLEVEL_NUM
-#define U_ICU_VERSION_BUILDLEVEL_NUM 0
+#define U_ICU_VERSION_BUILDLEVEL_NUM 1
 #endif
 
 /** Glued version suffix for renamers 
@@ -90,12 +90,12 @@
  */
 #define U_ICU_VERSION_SUFFIX _4_2
 
-/** The current ICU library version as a dotted-decimal string. The patchlevel
+/** The current ICU library version as a dotted-decimal string. The patchlevel and buildlevel
  *  only appears in this string if it non-zero. 
  *  This value will change in the subsequent releases of ICU
  *  @stable ICU 2.4
  */
-#define U_ICU_VERSION "4.2"
+#define U_ICU_VERSION "4.2.0.1"
 
 /** The current ICU library major/minor version as a string without dots, for library name suffixes. 
  *  This value will change in the subsequent releases of ICU

Modified: trunk/source/data/Makefile.in
===================================================================
--- trunk/source/data/Makefile.in	2009-05-15 19:18:34 UTC (rev 207)
+++ trunk/source/data/Makefile.in	2009-06-02 05:06:53 UTC (rev 208)
@@ -367,7 +367,7 @@
 ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES)
 	@echo "Unpacking $(ICUDATA_SOURCE_ARCHIVE) and generating $@ (list of data files)"
 	@-$(RMV) $@
-	$(INVOKE) $(TOOLBINDIR)/icupkg -d $(BUILDDIR) --list -x \* $(ICUDATA_SOURCE_ARCHIVE) > $@
+	$(INVOKE) $(TOOLBINDIR)/icupkg -d $(BUILDDIR) --list -x \* $(ICUDATA_SOURCE_ARCHIVE) -o $@
 else
 	@echo "$@" > $@
 endif

Modified: trunk/source/tools/icupkg/icupkg.cpp
===================================================================
--- trunk/source/tools/icupkg/icupkg.cpp	2009-05-15 19:18:34 UTC (rev 207)
+++ trunk/source/tools/icupkg/icupkg.cpp	2009-06-02 05:06:53 UTC (rev 208)
@@ -33,6 +33,7 @@
 #include "toolutil.h"
 #include "uoptions.h"
 #include "uparse.h"
+#include "filestrm.h"
 #include "package.h"
 #include "pkg_icu.h"
 
@@ -56,7 +57,7 @@
 
     fprintf(where,
             "%csage: %s [-h|-?|--help ] [-tl|-tb|-te] [-c] [-C comment]\n"
-            "\t[-a list] [-r list] [-x list] [-l]\n"
+            "\t[-a list] [-r list] [-x list] [-l [-o outputListFileName]]\n"
             "\t[-s path] [-d path] [-w] [-m mode]\n"
             "\tinfilename [outfilename]\n",
             isHelp ? 'U' : 'u', pname);
@@ -149,7 +150,7 @@
             "\t-s path or --sourcedir path  directory for the --add items\n"
             "\t-d path or --destdir path    directory for the --extract items\n"
             "\n"
-            "\t-l or --list                 list the package items to stdout\n"
+            "\t-l or --list                 list the package items to stdout or to output list file\n"
             "\t                             (after modifying the package)\n");
     }
 }
@@ -173,7 +174,9 @@
     UOPTION_DEF("remove", 'r', UOPT_REQUIRES_ARG),
     UOPTION_DEF("extract", 'x', UOPT_REQUIRES_ARG),
 
-    UOPTION_DEF("list", 'l', UOPT_NO_ARG)
+    UOPTION_DEF("list", 'l', UOPT_NO_ARG),
+    
+    UOPTION_DEF("outlist", 'o', UOPT_REQUIRES_ARG)
 };
 
 enum {
@@ -196,6 +199,8 @@
     OPT_EXTRACT_LIST,
 
     OPT_LIST_ITEMS,
+    
+    OPT_LIST_FILE,
 
     OPT_COUNT
 };
@@ -410,9 +415,22 @@
     /* list items */
     if(options[OPT_LIST_ITEMS].doesOccur) {
         int32_t i;
-
-        for(i=0; i<pkg->getItemCount(); ++i) {
-            fprintf(stdout, "%s\n", pkg->getItem(i)->name);
+        if (options[OPT_LIST_FILE].doesOccur) {
+            FileStream *out;
+            out = T_FileStream_open(options[OPT_LIST_FILE].value, "w");
+            if (out != NULL) {
+                for(i=0; i<pkg->getItemCount(); ++i) {
+                    T_FileStream_writeLine(out, pkg->getItem(i)->name);
+                    T_FileStream_writeLine(out, "\n");
+                }
+                T_FileStream_close(out);
+            } else {
+                return U_ILLEGAL_ARGUMENT_ERROR;
+            }
+        } else {
+            for(i=0; i<pkg->getItemCount(); ++i) {
+                fprintf(stdout, "%s\n", pkg->getItem(i)->name);
+            }
         }
     }
 

Modified: trunk/source/tools/pkgdata/pkgdata.cpp
===================================================================
--- trunk/source/tools/pkgdata/pkgdata.cpp	2009-05-15 19:18:34 UTC (rev 207)
+++ trunk/source/tools/pkgdata/pkgdata.cpp	2009-06-02 05:06:53 UTC (rev 208)
@@ -77,6 +77,16 @@
 #define CAN_WRITE_OBJ_CODE
 #endif
 
+/*
+ * When building the data library without assembly,
+ * some platforms use a single c code file for all of
+ * the data to generate the final data library. This can
+ * increase the performance of the pkdata tool.
+ */
+#if defined(OS400)
+#define USE_SINGLE_CCODE_FILE
+#endif
+
 /* Need to fix the file seperator character when using MinGW. */
 #ifdef WINDOWS_WITH_GNUC
 #define PKGDATA_FILE_SEP_STRING "/"
@@ -562,13 +572,14 @@
                 }
             }
 
+#ifndef OS400
             /* Certain platforms have different library extension ordering. (e.g. libicudata.##.so vs libicudata.so.##)
              * reverseExt is FALSE if the suffix should be the version number.
              */
             if (pkgDataFlags[LIB_EXT_ORDER][uprv_strlen(pkgDataFlags[LIB_EXT_ORDER])-1] == pkgDataFlags[SO_EXT][uprv_strlen(pkgDataFlags[SO_EXT])-1]) {
                 reverseExt = TRUE;
             }
-
+#endif
             /* Using the base libName and version number, generate the library file names. */
             createFileNames(version_major, o->version, o->libName, reverseExt);
 
@@ -630,14 +641,14 @@
                 fprintf(stderr, "Error creating data archive library file.\n");
                return result;
             }
-
+#ifndef OS400
             /* Create symbolic links for the final library file. */
             result = pkg_createSymLinks(targetDir);
             if (result != 0) {
                 fprintf(stderr, "Error creating symbolic links of the data library file.\n");
                 return result;
             }
-
+#endif
             /* Install the libraries if option was set. */
             if (o->install != NULL) {
                 result = pkg_installLibrary(o->install, targetDir);
@@ -669,6 +680,10 @@
             sprintf(pkgDataFlags[SO_EXT], "%s.%s",
                     pkgDataFlags[SO_EXT],
                     pkgDataFlags[A_EXT]);
+#elif defined(OS400)
+            sprintf(libFileNames[LIB_FILE_VERSION_TMP], "%s.%s",
+                    libFileNames[LIB_FILE],
+                    pkgDataFlags[SOBJ_EXT]);
 #else
             sprintf(libFileNames[LIB_FILE_VERSION_TMP], "%s%s%s.%s",
                     libFileNames[LIB_FILE],
@@ -881,7 +896,11 @@
     }
 
     if (mode == MODE_STATIC) {
+#ifdef OS400
+        sprintf(cmd, "QSH CMD('%s %s %s%s.%s %s')",
+#else
         sprintf(cmd, "%s %s %s%s.%s %s",
+#endif
                 pkgDataFlags[AR],
                 pkgDataFlags[ARFLAGS],
                 targetDir,
@@ -889,7 +908,7 @@
                 pkgDataFlags[A_EXT],
                 objectFile);
 
-        return system(cmd);
+        result = system(cmd);
     } else /* if (mode == MODE_DLL) */ {
 #ifdef U_CYGWIN
         sprintf(cmd, "%s%s%s %s -o %s%s %s %s%s %s %s",
@@ -899,7 +918,11 @@
                 pkgDataFlags[LDICUDTFLAGS],
                 targetDir, libFileNames[LIB_FILE_CYGWIN],
 #else
+#ifdef OS400
+        sprintf(cmd, "QSH CMD('%s %s -o %s%s %s %s%s %s %s')",
+#else
         sprintf(cmd, "%s %s -o %s%s %s %s%s %s %s",
+#endif
                 pkgDataFlags[GENLIB],
                 pkgDataFlags[LDICUDTFLAGS],
                 targetDir,
@@ -973,6 +996,14 @@
     char *cmd;
     char gencmnFile[SMALL_BUFFER_MAX_SIZE] = "";
     char tempObjectFile[SMALL_BUFFER_MAX_SIZE] = "";
+#ifdef USE_SINGLE_CCODE_FILE
+    char icudtAll[SMALL_BUFFER_MAX_SIZE] = "";
+    
+    sprintf(icudtAll, "%s%s%sall.c",
+            o->tmpDir,
+            PKGDATA_FILE_SEP_STRING, 
+            libFileNames[LIB_FILE]);
+#endif
 
     if (list == NULL || listNames == NULL) {
         /* list and listNames should never be NULL since we are looping through the CharList with
@@ -998,6 +1029,27 @@
             /* The first iteration calls the gencmn function and initailizes the buffer. */
             createCommonDataFile(o->tmpDir, o->shortName, o->entryName, NULL, o->srcDir, o->comment, o->fileListFiles->str, 0, TRUE, o->verbose, gencmnFile);
             buffer[0] = 0;
+#ifdef USE_SINGLE_CCODE_FILE
+            uprv_strcpy(tempObjectFile, gencmnFile);
+            tempObjectFile[uprv_strlen(tempObjectFile) - 1] = 'o';
+            
+#ifdef OS400
+            sprintf(cmd, "QSH CMD('%s %s -o %s %s')",
+#else
+            sprintf(cmd, "%s %s -o %s %s"
+#endif
+                        pkgDataFlags[COMPILER],
+                        pkgDataFlags[LIBFLAGS],
+                        tempObjectFile,
+                        gencmnFile);
+            
+            result = system(cmd);
+            if (result != 0) {
+                break;
+            }
+            
+            sprintf(buffer, "%s",tempObjectFile);
+#endif
         } else {
             char newName[SMALL_BUFFER_MAX_SIZE];
             char dataName[SMALL_BUFFER_MAX_SIZE];
@@ -1035,11 +1087,24 @@
             }
 
             writeCCode(file, o->tmpDir, dataName[0] != 0 ? dataName : o->shortName, newName[0] != 0 ? newName : NULL, gencmnFile);
+#ifdef USE_SINGLE_CCODE_FILE
+#ifdef OS400
+            sprintf(cmd, "QSH CMD('cat %s >> %s')", gencmnFile, icudtAll);
+#else
+            sprintf(cmd, "cat %s >> %s", gencmnFile, icudtAll);
+#endif
+            
+            result = system(cmd);
+            if (result != 0) {
+                break;
+            }
+#endif
         }
 
+#ifndef USE_SINGLE_CCODE_FILE
         uprv_strcpy(tempObjectFile, gencmnFile);
         tempObjectFile[uprv_strlen(tempObjectFile) - 1] = 'o';
-
+        
         sprintf(cmd, "%s %s -o %s %s",
                     pkgDataFlags[COMPILER],
                     pkgDataFlags[LIBFLAGS],
@@ -1053,16 +1118,39 @@
         sprintf(buffer, "%s %s",
                 buffer,
                 tempObjectFile);
-
+#endif
+        
         if (i > 0) {
             list = list->next;
             listNames = listNames->next;
         }
     }
 
-    /* Generate the library file. */
-    result = pkg_generateLibraryFile(targetDir, mode, buffer, cmd);
+#ifdef USE_SINGLE_CCODE_FILE
+    uprv_strcpy(tempObjectFile, icudtAll);
+    tempObjectFile[uprv_strlen(tempObjectFile) - 1] = 'o';
+#ifdef OS400
+    sprintf(cmd, "QSH CMD('%s %s -o %s %s')",
+#else
+    sprintf(cmd, "%s %s -o %s %s",
+#endif
+        pkgDataFlags[COMPILER],
+        pkgDataFlags[LIBFLAGS],
+        tempObjectFile,
+        icudtAll);
+    
+    result = system(cmd);
+    if (result == 0) {
+        sprintf(buffer, "%s %s",
+            buffer,
+            tempObjectFile);
+    }
+#endif
 
+    if (result == 0) {
+        /* Generate the library file. */
+        result = pkg_generateLibraryFile(targetDir, mode, buffer, cmd);
+    }
     uprv_free(buffer);
     uprv_free(cmd);
 
@@ -1223,6 +1311,21 @@
     }
 
     uprv_memset(flag + position, 0, length - position);
+#elif defined(OS400)
+    /* OS400 needs to fix the ld options (swap single quote with double quote) */
+    char *flag = NULL;
+    int32_t length = 0;
+
+    flag = pkgDataFlags[GENLIB];
+    length = uprv_strlen(pkgDataFlags[GENLIB]);
+
+    int32_t position = length - 1;
+
+    for(int32_t i = 0; i < length; i++) {
+        if (flag[i] == '\'') {
+            flag[i] = '\"';
+        }
+    }
 #endif
 }
 




More information about the sword-cvs mailing list