]> granicus.if.org Git - icu/commitdiff
ICU-9368 Fix some build issues in ICU4C 4.4 code base icu-maint/maint-4-4
authorMichael Ow <mow@svn.icu-project.org>
Wed, 6 Jun 2012 16:51:05 +0000 (16:51 +0000)
committerMichael Ow <mow@svn.icu-project.org>
Wed, 6 Jun 2012 16:51:05 +0000 (16:51 +0000)
X-SVN-Rev: 31912

12 files changed:
source/common/ucol_swp.cpp
source/common/unicode/stringpiece.h
source/config/mh-aix-gcc
source/config/mh-aix-va
source/config/mh-hpux-gcc
source/config/pkgdataMakefile.in
source/data/pkgdataMakefile.in
source/extra/uconv/Makefile.in
source/extra/uconv/pkgdataMakefile.in
source/test/testdata/pkgdataMakefile.in
source/tools/gennorm2/gennorm2.cpp
source/tools/gennorm2/n2builder.cpp

index ede8dd68a827731b428b8ed946e7c04e4517b5c4..82dce18d08964d5148c326e13dab1897f764b07f 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 2003-2010, International Business Machines
+*   Copyright (C) 2003-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -108,7 +108,7 @@ ucol_looksLikeCollationBinary(const UDataSwapper *ds,
                               const void *inData, int32_t length) {
     const uint8_t *inBytes;
     const UCATableHeader *inHeader;
-    UCATableHeader header={ 0 };
+    UCATableHeader header;
 
     if(ds==NULL || inData==NULL || length<-1) {
         return FALSE;
@@ -123,6 +123,7 @@ ucol_looksLikeCollationBinary(const UDataSwapper *ds,
      * sizeof(UCATableHeader)==42*4 in ICU 2.8
      * check the length against the header size before reading the size field
      */
+    uprv_memset(&header, 0, sizeof(header));
     if(length<0) {
         header.size=udata_readInt32(ds, inHeader->size);
     } else if((length<(42*4) || length<(header.size=udata_readInt32(ds, inHeader->size)))) {
@@ -155,7 +156,7 @@ ucol_swapBinary(const UDataSwapper *ds,
 
     const UCATableHeader *inHeader;
     UCATableHeader *outHeader;
-    UCATableHeader header={ 0 };
+    UCATableHeader header;
 
     uint32_t count;
 
@@ -180,6 +181,7 @@ ucol_swapBinary(const UDataSwapper *ds,
      * sizeof(UCATableHeader)==42*4 in ICU 2.8
      * check the length against the header size before reading the size field
      */
+    uprv_memset(&header, 0, sizeof(header));
     if(length<0) {
         header.size=udata_readInt32(ds, inHeader->size);
     } else if((length<(42*4) || length<(header.size=udata_readInt32(ds, inHeader->size)))) {
@@ -363,7 +365,7 @@ ucol_swapInverseUCA(const UDataSwapper *ds,
 
     const InverseUCATableHeader *inHeader;
     InverseUCATableHeader *outHeader;
-    InverseUCATableHeader header={ 0 };
+    InverseUCATableHeader header={ 0,0,0,0,0,{0,0,0,0},{0,0,0,0,0,0,0,0} };
 
     /* udata_swapDataHeader checks the arguments */
     headerSize=udata_swapDataHeader(ds, inData, length, outData, pErrorCode);
index 79d5a050ec7475e9bddfcc5a0a952c96f23e28bc..010b1a1a559f382689b51a83b87830abefd43044 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2010, International Business Machines
+// Copyright (C) 2010-2012, International Business Machines
 // Corporation and others. All Rights Reserved.
 //
 // Copyright 2001 and onwards Google Inc.
@@ -71,7 +71,7 @@ class U_COMMON_API StringPiece : public UMemory {
    * Constructs from a std::string.
    * @stable ICU 4.2
    */
-  StringPiece(const U_STD_NSQ string& str)
+  StringPiece(const std::string& str)
     : ptr_(str.data()), length_(static_cast<int32_t>(str.size())) { }
 #endif
   /**
index 40564abf00866c64999ad1ea1f674818ab6511b5..2ad81d00219360e1171e781b6277a3fa4937a840 100644 (file)
@@ -1,5 +1,5 @@
 ## -*-makefile-*-
-## Copyright (c) 2003-2009 IBM, Ken Foskey, and others. All rights reserved.
+## Copyright (c) 2003-2012 IBM, Ken Foskey, and others. All rights reserved.
 ##
 ## Aix-specific setup (for gcc)
 ##
@@ -53,7 +53,7 @@ SHARED_OBJECT = $(notdir $(FINAL_SO_TARGET:.$(SO)=.$(SOBJ)))
 SHARED_OBJECT_NO_VERSION = $(basename $(SO_TARGET)).$(SOBJ)
 
 # The following is for Makefile.inc's use.
-ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
+#ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
 
 # this one is for icudefs.mk's use
 ifeq ($(ENABLE_SHARED),YES)
index 976649cbeae3989f4a4b26fadc5d5a115430a632..7d757b10b5bb757ce69b428b9c4b72f25612d19b 100644 (file)
@@ -1,6 +1,6 @@
 ## -*-makefile-*-
 ## Aix-specific setup (for Visual Age 5+)
-## Copyright (c) 1999-2009, International Business Machines Corporation and
+## Copyright (c) 1999-2012, International Business Machines Corporation and
 ## others. All Rights Reserved.
 
 ## Commands to generate dependency files
@@ -62,7 +62,7 @@ LD_RPATH_PRE=
 LDLIBRARYPATH_ENVVAR = LIBPATH
 
 # The following is for Makefile.inc's use.
-ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
+#ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
 
 # this one is for icudefs.mk's use
 ifeq ($(ENABLE_SHARED),YES)
index 72967f18e22e837fc862dc0b689b2da43ea800cf..d4897fcabfd542d0f2b7cf3d3ddd5239c2d2c44b 100644 (file)
@@ -1,6 +1,6 @@
 ## -*-makefile-*-
 ## HPUX/gcc specific setup
-## Copyright (c) 1999-2009, International Business Machines Corporation and
+## Copyright (c) 1999-2012, International Business Machines Corporation and
 ## others. All Rights Reserved.
 
 ## Commands to generate dependency files
@@ -16,6 +16,8 @@ SHAREDLIBCPPFLAGS = -DPIC
 ## directory, at least.
 LD_DEFAULTPATH= -Wl,+b,.:'$$'ORIGIN/
 
+GENCCODE_ASSEMBLY=-a gcc
+
 # Get some handy functions defined properly
 DEFS += -D_HPUX_SOURCE -D_POSIX_C_SOURCE=199506L
 
index bb97a10d3136331d919fc78ed1026a07212d73ab..5bac8300a73f09a3d49d89adcaf46d393d97823a 100644 (file)
@@ -1,5 +1,5 @@
 ## pkgdataMakefile.in for ICU data
-## Copyright (c) 2008, International Business Machines Corporation and
+## Copyright (c) 2008-2012, International Business Machines Corporation and
 ## others. All Rights Reserved.
 
 ## Source directory information
@@ -20,7 +20,7 @@ all : clean
        @echo SO=$(SO) >> $(OUTPUTFILE)
        @echo SOBJ=$(SOBJ) >> $(OUTPUTFILE)
        @echo A=$(A) >> $(OUTPUTFILE)
-       @echo LIBPREFIX=$(LIBPREFIX) >> $(OUTPUTFILE)
+       @echo LIBPREFIX=$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED) >> $(OUTPUTFILE)
        @echo LIB_EXT_ORDER=$(FINAL_SO_TARGET) >> $(OUTPUTFILE)
        @echo COMPILE="$(COMPILE.c)" >> $(OUTPUTFILE)
        @echo LIBFLAGS="-I$(prefix)/include $(SHAREDLIBCPPFLAGS) $(SHAREDLIBCFLAGS)" >> $(OUTPUTFILE)
index 5caec6600d83291e776d28381568cfd83bda57f1..b736529fab0ce091f3169428e599d9ebebb58dbb 100644 (file)
@@ -1,5 +1,5 @@
 ## pkgdataMakefile.in for ICU data
-## Copyright (c) 2008-2009, International Business Machines Corporation and
+## Copyright (c) 2008-2012, International Business Machines Corporation and
 ## others. All Rights Reserved.
 
 ## Source directory information
@@ -20,7 +20,7 @@ all : clean
        @echo SO=$(SO) >> $(OUTPUTFILE)
        @echo SOBJ=$(SOBJ) >> $(OUTPUTFILE)
        @echo A=$(A) >> $(OUTPUTFILE)
-       @echo LIBPREFIX=$(LIBPREFIX) >> $(OUTPUTFILE)
+       @echo LIBPREFIX=$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED) >> $(OUTPUTFILE)
        @echo LIB_EXT_ORDER=$(FINAL_SO_TARGET) >> $(OUTPUTFILE)
        @echo COMPILE="$(COMPILE.c)" >> $(OUTPUTFILE)
        @echo LIBFLAGS="-I$(top_srcdir)/common -I$(top_builddir)/common $(SHAREDLIBCPPFLAGS) $(SHAREDLIBCFLAGS)" >> $(OUTPUTFILE)
index 1ad1e31de3bae36f78ec9dec3b4c0f1216839656..ddc40efa2654553583e85b51c177599f446208b9 100644 (file)
@@ -1,6 +1,6 @@
 ## ******************************************************************************
 ## *
-## *   Copyright (C) 1999-2009, International Business Machines
+## *   Copyright (C) 1999-2012, International Business Machines
 ## *   Corporation and others.  All Rights Reserved.
 ## *
 ## *******************************************************************************
@@ -57,7 +57,7 @@ UCONVMSG_LIB=dummy
 ## Static mode
 ifeq ($(UCONVMSG_MODE),static)
 DEFS += -DUCONVMSG_LINK=$(MSGNAME)
-UCONVMSG_LIB = $(RESDIR)/$(LIBPREFIX)$(MSGNAME).$(A)
+UCONVMSG_LIB = $(RESDIR)/$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED)$(MSGNAME).$(A)
 LIBS += $(UCONVMSG_LIB)
 PKGMODE=static
 INSTALLTO=$(libdir)
index 61a3bcd6d7691d197fbd02ed217944444de8d435..0ae0c5672ba163e617b3028d8faa7b0476a31709 100644 (file)
@@ -1,5 +1,5 @@
 ## pkgdataMakefile.in for ICU data
-## Copyright (c) 2008-2009, International Business Machines Corporation and
+## Copyright (c) 2008-2012, International Business Machines Corporation and
 ## others. All Rights Reserved.
 
 ## Source directory information
@@ -21,7 +21,7 @@ all : clean
        @echo SO=$(SO) >> $(OUTPUTFILE)
        @echo SOBJ=$(SOBJ) >> $(OUTPUTFILE)
        @echo A=$(A) >> $(OUTPUTFILE)
-       @echo LIBPREFIX=$(LIBPREFIX) >> $(OUTPUTFILE)
+       @echo LIBPREFIX=$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED) >> $(OUTPUTFILE)
        @echo LIB_EXT_ORDER=$(FINAL_SO_TARGET) >> $(OUTPUTFILE)
        @echo COMPILE="$(COMPILE.c)" >> $(OUTPUTFILE)
        @echo LIBFLAGS="-I$(top_srcdir)/common -I$(top_builddir)/common $(SHAREDLIBCPPFLAGS) $(SHAREDLIBCFLAGS)" >> $(OUTPUTFILE)
index 61a3bcd6d7691d197fbd02ed217944444de8d435..0ae0c5672ba163e617b3028d8faa7b0476a31709 100644 (file)
@@ -1,5 +1,5 @@
 ## pkgdataMakefile.in for ICU data
-## Copyright (c) 2008-2009, International Business Machines Corporation and
+## Copyright (c) 2008-2012, International Business Machines Corporation and
 ## others. All Rights Reserved.
 
 ## Source directory information
@@ -21,7 +21,7 @@ all : clean
        @echo SO=$(SO) >> $(OUTPUTFILE)
        @echo SOBJ=$(SOBJ) >> $(OUTPUTFILE)
        @echo A=$(A) >> $(OUTPUTFILE)
-       @echo LIBPREFIX=$(LIBPREFIX) >> $(OUTPUTFILE)
+       @echo LIBPREFIX=$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED) >> $(OUTPUTFILE)
        @echo LIB_EXT_ORDER=$(FINAL_SO_TARGET) >> $(OUTPUTFILE)
        @echo COMPILE="$(COMPILE.c)" >> $(OUTPUTFILE)
        @echo LIBFLAGS="-I$(top_srcdir)/common -I$(top_builddir)/common $(SHAREDLIBCPPFLAGS) $(SHAREDLIBCFLAGS)" >> $(OUTPUTFILE)
index 5e717f3bb35a08626d66e4dc97f21a880ad16789..390bb0962637b43ce77e04427aec4777e226cbf5 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 2009-2010, International Business Machines
+*   Copyright (C) 2009-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -150,7 +150,7 @@ main(int argc, char* argv[]) {
     }
 
     // prepare the filename beginning with the source dir
-    U_STD_NSQ string filename(options[SOURCEDIR].value);
+    std::string filename(options[SOURCEDIR].value);
     int32_t pathLength=filename.length();
     if( pathLength>0 &&
         filename[pathLength-1]!=U_FILE_SEP_CHAR &&
index daf9e1cba6e9364a3aa434398e133cb0ec78389a..9a20fd491108cd1c827bcf81f55cc141be0674fb 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 2009-2010, International Business Machines
+*   Copyright (C) 2009-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
@@ -115,7 +115,7 @@ struct Norm {
     int32_t mappingPhase;
     MappingType mappingType;
 
-    U_STD_NSQ vector<CompositionPair> *compositions;
+    std::vector<CompositionPair> *compositions;
     uint8_t cc;
     UBool combinesBack;
     UBool hasNoCompBoundaryAfter;
@@ -342,13 +342,13 @@ Normalizer2DataBuilder::addComposition(UChar32 start, UChar32 end, uint32_t valu
         // Insert (trail, composite) pair into compositions list for the lead character.
         CompositionPair pair(trail, start);
         Norm *leadNorm=createNorm(lead);
-        U_STD_NSQ vector<CompositionPair> *compositions=leadNorm->compositions;
+        std::vector<CompositionPair> *compositions=leadNorm->compositions;
         if(compositions==NULL) {
-            compositions=leadNorm->compositions=new U_STD_NSQ vector<CompositionPair>;
+            compositions=leadNorm->compositions=new std::vector<CompositionPair>;
             compositions->push_back(pair);
         } else {
             // Insertion sort, and check for duplicate trail characters.
-            U_STD_NSQ vector<CompositionPair>::iterator it;
+            std::vector<CompositionPair>::iterator it;
             for(it=compositions->begin(); it!=compositions->end(); ++it) {
                 if(trail==it->trail) {
                     fprintf(stderr,
@@ -368,9 +368,9 @@ Normalizer2DataBuilder::addComposition(UChar32 start, UChar32 end, uint32_t valu
 
 UBool Normalizer2DataBuilder::combinesWithCCBetween(const Norm &norm,
                                                     uint8_t lowCC, uint8_t highCC) const {
-    const U_STD_NSQ vector<CompositionPair> *compositions=norm.compositions;
+    const std::vector<CompositionPair> *compositions=norm.compositions;
     if(compositions!=NULL && (highCC-lowCC)>=2) {
-        U_STD_NSQ vector<CompositionPair>::const_iterator it;
+        std::vector<CompositionPair>::const_iterator it;
         for(it=compositions->begin(); it!=compositions->end(); ++it) {
             uint8_t trailCC=getCC(it->trail);
             if(lowCC<trailCC && trailCC<highCC) {
@@ -382,9 +382,9 @@ UBool Normalizer2DataBuilder::combinesWithCCBetween(const Norm &norm,
 }
 
 UChar32 Normalizer2DataBuilder::combine(const Norm &norm, UChar32 trail) const {
-    const U_STD_NSQ vector<CompositionPair> *compositions=norm.compositions;
+    const std::vector<CompositionPair> *compositions=norm.compositions;
     if(compositions!=NULL) {
-        U_STD_NSQ vector<CompositionPair>::const_iterator it;
+        std::vector<CompositionPair>::const_iterator it;
         for(it=compositions->begin(); it!=compositions->end(); ++it) {
             if(trail==it->trail) {
                 return it->composite;