From 3d996441e70c5fb5fa309d8a90b33e0fda40d499 Mon Sep 17 00:00:00 2001 From: Norbert Runge Date: Fri, 17 Mar 2017 21:42:57 +0000 Subject: [PATCH] ICU-13048 fixes to make internal header test pass. X-SVN-Rev: 39853 --- icu4c/source/i18n/dtptngen_impl.h | 3 +++ icu4c/source/i18n/smpdtfst.h | 1 + icu4c/source/io/ufile.h | 2 ++ .../source/test/hdrtst/testinternalheaders.sh | 20 +++++++++---------- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/icu4c/source/i18n/dtptngen_impl.h b/icu4c/source/i18n/dtptngen_impl.h index cb4e47740f6..38afd5ff5a8 100644 --- a/icu4c/source/i18n/dtptngen_impl.h +++ b/icu4c/source/i18n/dtptngen_impl.h @@ -15,6 +15,9 @@ #define __DTPTNGEN_IMPL_H__ #include "unicode/udatpg.h" + +#include "unicode/strenum.h" +#include "unicode/unistr.h" #include "uvector.h" // TODO(claireho): Split off Builder class. diff --git a/icu4c/source/i18n/smpdtfst.h b/icu4c/source/i18n/smpdtfst.h index 6eea81aa9fe..cc80909c88e 100644 --- a/icu4c/source/i18n/smpdtfst.h +++ b/icu4c/source/i18n/smpdtfst.h @@ -16,6 +16,7 @@ #ifndef SMPDTFST_H #define SMPDTFST_H +#include "unicode/uobject.h" #include "unicode/utypes.h" #if !UCONFIG_NO_FORMATTING diff --git a/icu4c/source/io/ufile.h b/icu4c/source/io/ufile.h index 29605bc278b..e85208fcd35 100644 --- a/icu4c/source/io/ufile.h +++ b/icu4c/source/io/ufile.h @@ -25,6 +25,8 @@ #if !UCONFIG_NO_CONVERSION +#include + #include "unicode/ucnv.h" #include "unicode/utrans.h" #include "locbund.h" diff --git a/icu4c/source/test/hdrtst/testinternalheaders.sh b/icu4c/source/test/hdrtst/testinternalheaders.sh index 14106926b05..afff9a2104d 100755 --- a/icu4c/source/test/hdrtst/testinternalheaders.sh +++ b/icu4c/source/test/hdrtst/testinternalheaders.sh @@ -15,21 +15,21 @@ for file in `ls common/*.h`; do echo $file echo '#include "'$file'"' > ht_temp.cpp ; echo 'void noop() {}' >> ht_temp.cpp ; - $CXX -c -I common -O0 ht_temp.cpp ; + $CXX -c -std=c++11 -I common -O0 ht_temp.cpp ; done ; for file in `ls i18n/*.h`; do echo $file echo '#include "'$file'"' > ht_temp.cpp ; echo 'void noop() {}' >> ht_temp.cpp ; - $CXX -c -I common -I i18n -O0 ht_temp.cpp ; + $CXX -c -std=c++11 -I common -I i18n -O0 ht_temp.cpp ; done ; for file in `ls io/*.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 ; + $CXX -c -std=c++11 -I common -I i18n -I io -O0 ht_temp.cpp ; done ; # layout is removed. @@ -50,7 +50,7 @@ for file in `ls tools/toolutil/*.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 tools/toolutil -O0 ht_temp.cpp ; + $CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -O0 ht_temp.cpp ; done ; # Exclude tzcode: tools/tzcode/private.h uses an argument "new" in a function declaration. @@ -64,7 +64,7 @@ for tool in genccode gencmn gencolusb gennorm2 genren gentest icupkg icuswap pkg echo $file echo '#include "'$file'"' > ht_temp.cpp ; echo 'void noop() {}' >> ht_temp.cpp ; - $CXX -c -I common -I i18n -I io -I tools/toolutil -I tools/$tool -O0 ht_temp.cpp ; + $CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -I tools/$tool -O0 ht_temp.cpp ; done ; done ; @@ -74,15 +74,15 @@ for file in `ls tools/ctestfw/unicode/*.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 tools/toolutil -I tools/ctestfw -O0 ht_temp.cpp ; + $CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -O0 ht_temp.cpp ; done ; # C not C++ for cintltst for file in `ls test/cintltst/*.h`; do echo $file - echo '#include "'$file'"' > ht_temp.cpp ; - echo 'void noop() {}' >> ht_temp.cpp ; - $CC -c -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -I test/cintltst -O0 ht_temp.cpp ; + echo '#include "'$file'"' > ht_temp.c ; + echo 'void noop() {}' >> ht_temp.c ; + $CC -c -std=c11 -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -I test/cintltst -O0 ht_temp.c ; done ; for test in intltest iotest testmap thaitest; do @@ -90,7 +90,7 @@ for test in intltest iotest testmap thaitest; do echo $file echo '#include "'$file'"' > ht_temp.cpp ; echo 'void noop() {}' >> ht_temp.cpp ; - $CXX -c -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -I test/$test -O0 ht_temp.cpp ; + $CXX -c -std=c++11 -I common -I i18n -I io -I tools/toolutil -I tools/ctestfw -I test/$test -O0 ht_temp.cpp ; done ; done ; -- 2.40.0