]> granicus.if.org Git - icu/commitdiff
ICU-12738 ICU4C BRS, fixes to conditionals/includes/makefiles/scripts from testing...
authorPeter Edberg <pedberg@unicode.org>
Wed, 28 Sep 2016 04:17:24 +0000 (04:17 +0000)
committerPeter Edberg <pedberg@unicode.org>
Wed, 28 Sep 2016 04:17:24 +0000 (04:17 +0000)
X-SVN-Rev: 39375

20 files changed:
icu4c/source/common/unicode/localpointer.h
icu4c/source/common/unicode/stringtriebuilder.h
icu4c/source/common/unicode/ubiditransform.h
icu4c/source/common/unicode/unistr.h
icu4c/source/common/unicode/unorm.h
icu4c/source/i18n/unicode/ucal.h
icu4c/source/i18n/unicode/ucol.h
icu4c/source/i18n/unicode/udat.h
icu4c/source/i18n/unicode/udatpg.h
icu4c/source/i18n/unicode/unum.h
icu4c/source/test/cintltst/calldata.h
icu4c/source/test/cintltst/ccaltst.h
icu4c/source/test/cintltst/cdattst.h
icu4c/source/test/cintltst/cdtdptst.h
icu4c/source/test/cintltst/cdtrgtst.h
icu4c/source/test/cintltst/cnmdptst.h
icu4c/source/test/cintltst/creststn.h
icu4c/source/test/cintltst/nccbtst.h
icu4c/source/test/hdrtst/Makefile.in
icu4c/source/test/hdrtst/testinternalheaders.sh

index 401705345a4de6060f604ede2d48fc3615a8cdbb..9ac5de5f06d75152891e11bd5a3cb6248842c858 100644 (file)
@@ -242,7 +242,7 @@ public:
         return moveFrom(src);
     }
 #endif
-#ifndef U_HIDE_DRAFT_API
+    // do not use #ifndef U_HIDE_DRAFT_API for moveFrom, needed by non-draft API
     /**
      * Move assignment, leaves src with isNull().
      * The behavior is undefined if *this and src are the same object.
@@ -258,7 +258,6 @@ public:
         src.ptr=NULL;
         return *this;
     }
-#endif /* U_HIDE_DRAFT_API */
     /**
      * Swap pointers.
      * @param other other smart pointer
@@ -392,7 +391,7 @@ public:
         return moveFrom(src);
     }
 #endif
-#ifndef U_HIDE_DRAFT_API
+    // do not use #ifndef U_HIDE_DRAFT_API for moveFrom, needed by non-draft API
     /**
      * Move assignment, leaves src with isNull().
      * The behavior is undefined if *this and src are the same object.
@@ -408,7 +407,6 @@ public:
         src.ptr=NULL;
         return *this;
     }
-#endif /* U_HIDE_DRAFT_API */
     /**
      * Swap pointers.
      * @param other other smart pointer
index 906273fa18ba4a924545548774bf2abba1d80d42..95cd841a374f83406b5d556e0b50363da7ebef9f 100644 (file)
@@ -186,7 +186,8 @@ protected:
     /** @internal */
     UHashtable *nodes;
 
-#ifndef U_HIDE_INTERNAL_API
+    // Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
+    // it is needed for layout of other objects.
     /** @internal */
     class Node : public UObject {
     public:
@@ -245,6 +246,7 @@ protected:
         int32_t offset;
     };
 
+#ifndef U_HIDE_INTERNAL_API
     // This class should not be overridden because
     // registerFinalValue() compares a stack-allocated FinalValueNode
     // (stack-allocated so that we don't unnecessarily create lots of duplicate nodes)
@@ -260,7 +262,10 @@ protected:
     protected:
         int32_t value;
     };
+#endif  /* U_HIDE_INTERNAL_API */
 
+    // Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
+    // it is needed for layout of other objects.
     /**
      * @internal 
      */
@@ -278,6 +283,7 @@ protected:
         int32_t value;
     };
 
+#ifndef U_HIDE_INTERNAL_API
     /** 
      * @internal 
      */
@@ -291,7 +297,10 @@ protected:
     protected:
         Node *next;
     };
+#endif  /* U_HIDE_INTERNAL_API */
 
+    // Do not conditionalize the following with #ifndef U_HIDE_INTERNAL_API,
+    // it is needed for layout of other objects.
     /**
      * @internal 
      */
@@ -307,6 +316,7 @@ protected:
         Node *next;
     };
 
+#ifndef U_HIDE_INTERNAL_API
     /**
      * @internal 
      */
index ceebf21ba040fdc65e46e31ce0ed194c4b04e8af..509f68bcc012e09cb3b16a3b49afa9f186e09fd3 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef UBIDITRANSFORM_H
 #define UBIDITRANSFORM_H
 
+#include "unicode/utypes.h"
+#include "unicode/ubidi.h"
 #include "unicode/uchar.h"
 #include "unicode/localpointer.h"
 
index c7e239aa7e35e8d6d5831173a62a9ab5797ab9e9..81ba2c5ca19c285fc59ab2222a8540ec58176e4a 100644 (file)
@@ -1915,7 +1915,7 @@ public:
     return moveFrom(src);
   }
 #endif
-#ifndef U_HIDE_DRAFT_API
+  // do not use #ifndef U_HIDE_DRAFT_API for moveFrom, needed by non-draft API
   /**
    * Move assignment, might leave src in bogus state.
    * This string will have the same contents and state that the source string had.
@@ -1927,7 +1927,6 @@ public:
    * @draft ICU 56
    */
   UnicodeString &moveFrom(UnicodeString &src) U_NOEXCEPT;
-#endif /* U_HIDE_DRAFT_API */
 
   /**
    * Swap strings.
index d553f76299a3dc1b8e3ec7a895df6ce6fe6e1af2..f527c263f0298a6985b8f9a95b6d0e3b1fd06005 100644 (file)
@@ -24,8 +24,6 @@
 #include "unicode/uiter.h"
 #include "unicode/unorm2.h"
 
-#ifndef U_HIDE_DEPRECATED_API
-
 /**
  * \file
  * \brief C API: Unicode Normalization
  * For more usage examples, see the Unicode Standard Annex.
  */
 
+// Do not conditionalize the following enum with #ifndef U_HIDE_DEPRECATED_API,
+// it is needed for layout of Normalizer object.
 /**
  * Constants for normalization modes.
  * @deprecated ICU 56 Use unorm2.h instead.
@@ -155,6 +155,8 @@ typedef enum {
   UNORM_MODE_COUNT
 } UNormalizationMode;
 
+#ifndef U_HIDE_DEPRECATED_API
+
 /**
  * Constants for options flags for normalization.
  * Use 0 for default options,
index 6605ac948c61b26a759e711ad8f20a129363a7cf..29c084574e16be667d65bb3c20c59110249f34e8 100644 (file)
@@ -425,13 +425,13 @@ enum UCalendarDateFields {
    */
   UCAL_IS_LEAP_MONTH,
 
-#ifndef U_HIDE_DEPRECATED_API
+    // Do not conditionalize with #ifndef U_HIDE_DEPRECATED_API,
+    // it is needed for layout of Calendar, DateFormat, and other objects
     /**
      * One more than the highest normal UCalendarDateFields value.
      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
      */
   UCAL_FIELD_COUNT,
-#endif  // U_HIDE_DEPRECATED_API
 
  /**
    * Field number indicating the
index b2d760a1cbe5d3ee9880812b58d40dff2012a0f1..eae88f8ce69d941e3a81bf5093fabb0dce0f84ff 100644 (file)
@@ -341,13 +341,14 @@ typedef enum {
       * @stable ICU 2.8
       */
      UCOL_NUMERIC_COLLATION = UCOL_STRENGTH + 2, 
-#ifndef U_HIDE_DEPRECATED_API
+
+    // Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API,
+    // it is needed for layout of RuleBasedCollator object.
     /**
      * One more than the highest normal UColAttribute value.
      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
      */
      UCOL_ATTRIBUTE_COUNT
-#endif  // U_HIDE_DEPRECATED_API
 } UColAttribute;
 
 /** Options for retrieving the rule string 
index 74dcc645133ef1d57294b2345be5106ccffb941f..cacfbe85009c234bf1c5b9a7114f14a671c8474d 100644 (file)
@@ -901,13 +901,14 @@ typedef enum UDateFormatBooleanAttribute {
      * @stable ICU 56
      */
     UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH = 3,
-#ifndef U_HIDE_DEPRECATED_API
+
+    // Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API,
+    // it is needed for layout of DateFormat object.
     /**
      * One more than the highest normal UDateFormatBooleanAttribute value.
      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
      */
     UDAT_BOOLEAN_ATTRIBUTE_COUNT = 4
-#endif  // U_HIDE_DEPRECATED_API
 } UDateFormatBooleanAttribute;
 
 /**
index 59ef956553c264ae585dd1d140ee58082f9e75b1..47d3afb1d0cbf208634c71bcb788ae76ea12ca80 100644 (file)
@@ -85,13 +85,14 @@ typedef enum UDateTimePatternField {
     UDATPG_FRACTIONAL_SECOND_FIELD,
     /** @stable ICU 3.8 */
     UDATPG_ZONE_FIELD,
-#ifndef U_HIDE_DEPRECATED_API
+
+    // Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API,
+    // it is needed for layout of DateTimePatternGenerator object.
     /**
      * One more than the highest normal UDateTimePatternField value.
      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
      */
     UDATPG_FIELD_COUNT
-#endif  // U_HIDE_DEPRECATED_API
 } UDateTimePatternField;
 
 /**
index e8608a35944cbd2a7747be4b5a7dc99bfa3c3e43..34d54427f05ffd669c6f6391c523248232d37382 100644 (file)
@@ -325,13 +325,14 @@ enum UCurrencySpacing {
     UNUM_CURRENCY_SURROUNDING_MATCH,
     /** @stable ICU 4.8 */
     UNUM_CURRENCY_INSERT,
-#ifndef U_HIDE_DEPRECATED_API
+
+    // Do not conditionalize the following with #ifndef U_HIDE_DEPRECATED_API,
+    // it is needed for layout of DecimalFormatSymbols object.
     /**
      * One more than the highest normal UCurrencySpacing value.
      * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420.
      */
     UNUM_CURRENCY_SPACING_COUNT
-#endif  // U_HIDE_DEPRECATED_API
 };
 typedef enum UCurrencySpacing UCurrencySpacing; /**< @stable ICU 4.8 */
 
index f317909959651649419e32446fa4493f9814ca24..af6495685b765438a1102746f6650b551de83100 100644 (file)
@@ -9,6 +9,8 @@
 #ifndef COLLATION_TEST_DATA
 #define COLLATION_TEST_DATA
 
+#include "unicode/utypes.h"
+
 #define COUNT_TEST_CASES 13
 
 const UChar testSourceCases[][16] = {
index c3251c23c39d4ccca55c75ec17af401c74b97c0b..12b3410a19d440aced087d2c37d9adecafc30037 100644 (file)
@@ -18,6 +18,8 @@
 #define _CCALTST
 
 #include "unicode/utypes.h"
+#include "unicode/ucal.h"
+#include "unicode/udat.h"
 
 #if !UCONFIG_NO_FORMATTING
 
index 3141e07d45dcb09a0fa3168e45f3a7983570c31b..7b4e245824db16128957e8497d09258b0326c326 100644 (file)
@@ -19,6 +19,7 @@
 #define _CDATFRMTST
 
 #include "unicode/utypes.h"
+#include "unicode/udat.h"
 
 #if !UCONFIG_NO_FORMATTING
 
index 3360fb881c2b0c423aeab71d2561028dfffd7b40..caabd3a4255bfc02e25ac9b262b8eb8c79034234 100644 (file)
@@ -19,6 +19,7 @@
 #define _CDTFRRGSTST
 
 #include "unicode/utypes.h"
+#include "unicode/udat.h"
 
 #if !UCONFIG_NO_FORMATTING
 
index f621606b7b5c0d03c39dacb29c8887f3346bdf70..5cfe70f042db237bb0c94c3dbf156c6989e74897 100644 (file)
@@ -19,6 +19,7 @@
 #define _CDTFRRGSTST
 
 #include "unicode/utypes.h"
+#include "unicode/udat.h"
 
 #if !UCONFIG_NO_FORMATTING
 
index 18f68854aa790a61742c2aeb796e8b56f58d1aea..1b680a69f38f305a541eb62b1bc2928833acf32e 100644 (file)
@@ -20,6 +20,7 @@
 #define _CNUMDEPTST
 
 #include "unicode/utypes.h"
+#include "unicode/unum.h"
 
 #if !UCONFIG_NO_FORMATTING
 
index be8d4dbd145bbeb84861dba72c66d9dc4ed8261c..48add5d398e4620e973f6678f92286d41bbd4b12 100644 (file)
 */
 #ifndef _CRESTSTN
 #define _CRESTSTN
+
+#include "unicode/utypes.h"
+#include "unicode/ures.h"
+
 /* C TEST FOR NEW RESOURCEBUNDLE API*/
 #include "cintltst.h"
 
index 6bfceff278af33395bc7ca91bb64f528d48293f1..6562d2a93f62a29746661c0305b880cedbf33947 100644 (file)
 */
 #ifndef _NCCBTST
 #define _NCCBTST
+
+#include "unicode/utypes.h"
+#include "unicode/ucnv.h"
+
 /* C API TEST FOR CALL BACK ROUTINES OF CODESET CONVERSION COMPONENT */
 #include "cintltst.h"
-#include "unicode/utypes.h"
 
 
 static void TestSkipCallBack(void);
index 5a69543b373469d9813723bc6e6d03435a430358..81aa619435dcf49dc309fbacca0c6ff013776e93 100644 (file)
@@ -53,7 +53,7 @@ E_DEP="[6/$(E_NUM)] Hide Deprecated: "
 E_INT="[7/$(E_NUM)] Hide Internal: "
 E_OBS="[8/$(E_NUM)] Hide Obsolete: "
 
-check: dtest ctest cpptest lotest doclean drafttest deprtest internaltest obsoletetest
+check: dtest ctest cpptest doclean drafttest deprtest internaltest obsoletetest
 ifeq ($(MAKECMDGOALS),check)
        $(MAKE) clean
 else
@@ -74,15 +74,7 @@ cpptest:
        done ;\
        exit $$FAIL
 
-lotest:
-       @FAIL=0;for file in $(prefix)/include/layout/*.h; do \
-         incfile=`basename $$file .h` ; \
-         echo "$@ layout/$$incfile.h" ; \
-         echo '#include "'layout/$$incfile'.h"' > ht_$$incfile.cpp ; \
-         echo 'void junk(){}' >> ht_$$incfile.cpp ; \
-          $(COMPILE.cc) -c $(cppflags) -I$(prefix)/include/layout ht_$$incfile.cpp || FAIL=1; \
-       done ;\
-       exit $$FAIL
+# layout is removed
 
 dtest:
        @FAIL=0;NONE="(No deprecated headers)";for stub in `cat $(srcdir)/dfiles.txt | grep -v '^#'` ; do \
@@ -178,5 +170,5 @@ Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
        cd $(top_builddir) \
        && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
-.PHONY:        doclean check all cpptest lotest dtest ctest clean distclean
+.PHONY:        doclean check all cpptest dtest ctest clean distclean
 
index da754f58db3f9ff8e171409e12eef68a146a5a0c..14106926b054c5322a322ae33c5b54efccc3fcac 100755 (executable)
@@ -32,22 +32,17 @@ for file in `ls io/*.h`; do
     $CXX -c -I common -I i18n -I io -O0 ht_temp.cpp ;
 done ;
 
-# layout is deprecated, but layoutex is not.
+# layout is removed.
 
-for file in `ls layout/*.h`; do
-    echo $file
-    echo '#include "'$file'"' > ht_temp.cpp ;
-    echo 'void noop() {}' >> ht_temp.cpp ;
-    $CXX -c -I common -I i18n -I io -O0 ht_temp.cpp ;
-done ;
+# layoutex now depends on external additions such as HarfBuzz, skip here
 
 # -I .  for includes of layout/*.h
-for file in `ls layoutex/*.h`; do
-    echo $file
-    echo '#include "'$file'"' > ht_temp.cpp ;
-    echo 'void noop() {}' >> ht_temp.cpp ;
-    $CXX -c -I common -I i18n -I io -I layout -I . -I layoutex -O0 ht_temp.cpp ;
-done ;
+#for file in `ls layoutex/*.h`; do
+#    echo $file
+#    echo '#include "'$file'"' > ht_temp.cpp ;
+#    echo 'void noop() {}' >> ht_temp.cpp ;
+#    $CXX -c -I common -I i18n -I io -I layout -I . -I layoutex -O0 ht_temp.cpp ;
+#done ;
 
 # Tools
 
@@ -83,7 +78,7 @@ for file in `ls tools/ctestfw/unicode/*.h`; do
 done ;
 
 # C not C++ for cintltst
-for file in `ls tools/cintltst/*.h`; do
+for file in `ls test/cintltst/*.h`; do
     echo $file
     echo '#include "'$file'"' > ht_temp.cpp ;
     echo 'void noop() {}' >> ht_temp.cpp ;
@@ -99,12 +94,14 @@ for test in intltest iotest testmap thaitest; do
     done ;
 done ;
 
-for file in `ls test/letest/*.h`; do
-    echo $file
-    echo '#include "'$file'"' > ht_temp.cpp ;
-    echo 'void noop() {}' >> ht_temp.cpp ;
-    $CXX -c -I common -I i18n -I io -I layout -I . -I layoutex -I tools/toolutil -I tools/ctestfw -I test/letest -O0 ht_temp.cpp ;
-done ;
+# layoutex now depends on external additions such as HarfBuzz, skip here
+
+#for file in `ls test/letest/*.h`; do
+#    echo $file
+#    echo '#include "'$file'"' > ht_temp.cpp ;
+#    echo 'void noop() {}' >> ht_temp.cpp ;
+#    $CXX -c -I common -I i18n -I io -I layout -I . -I layoutex -I tools/toolutil -I tools/ctestfw -I test/letest -O0 ht_temp.cpp ;
+#done ;
 
 # TODO: perf/*/*.h