From f2186b6d333bc7b106a043577503e492622bf034 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Wed, 24 Feb 2016 00:49:51 +0000 Subject: [PATCH] ICU-12141 make each internal header file compile by itself; add includes where necessary; add simple test script X-SVN-Rev: 38341 --- icu4c/source/common/norm2_nfc_data.h | 6 +++- icu4c/source/common/normalizer2.cpp | 3 +- icu4c/source/common/propname_data.h | 6 ++-- icu4c/source/common/rbbicst.pl | 6 ++-- icu4c/source/common/rbbinode.h | 3 +- icu4c/source/common/rbbirpt.h | 4 ++- icu4c/source/common/rbbiscan.h | 6 ++-- icu4c/source/common/ubidi_props_data.h | 6 ++-- icu4c/source/common/ubidiimp.h | 3 +- icu4c/source/common/ucase_props_data.h | 6 ++-- icu4c/source/common/uchar_props_data.h | 5 ++-- icu4c/source/i18n/collationfastlatinbuilder.h | 3 +- icu4c/source/i18n/collunsafe.h | 5 +++- icu4c/source/i18n/csdetect.h | 4 ++- icu4c/source/i18n/decNumberLocal.h | 3 +- icu4c/source/i18n/decfmtst.h | 8 +++-- icu4c/source/i18n/dtptngen_impl.h | 9 +++--- icu4c/source/i18n/plurrule_impl.h | 3 +- icu4c/source/i18n/regexcmp.h | 7 +++-- icu4c/source/i18n/regexcst.h | 4 ++- icu4c/source/i18n/regexcst.pl | 6 ++-- icu4c/source/i18n/uitercollationiterator.h | 3 +- icu4c/source/i18n/uspoof_conf.h | 4 ++- icu4c/source/i18n/utf8collationiterator.h | 3 +- icu4c/source/i18n/vzone.h | 3 +- icu4c/source/i18n/zrule.h | 6 ++-- icu4c/source/i18n/ztrans.h | 4 ++- .../source/test/hdrtst/testinternalheaders.sh | 29 +++++++++++++++++++ .../gencolusb/extract_unsafe_backwards.cpp | 4 ++- 29 files changed, 113 insertions(+), 49 deletions(-) create mode 100755 icu4c/source/test/hdrtst/testinternalheaders.sh diff --git a/icu4c/source/common/norm2_nfc_data.h b/icu4c/source/common/norm2_nfc_data.h index 0b9124bfd7b..9925afa3413 100644 --- a/icu4c/source/common/norm2_nfc_data.h +++ b/icu4c/source/common/norm2_nfc_data.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1999-2015, International Business Machines + * Copyright (C) 1999-2016, International Business Machines * Corporation and others. All Rights Reserved. * * file name: norm2_nfc_data.h @@ -7,6 +7,8 @@ * machine-generated by: icu/source/tools/gennorm2/n2builder.cpp */ +#ifdef INCLUDED_FROM_NORMALIZER2_CPP + static const UVersionInfo norm2_nfc_data_formatVersion={2,0,0,0}; static const UVersionInfo norm2_nfc_data_dataVersion={8,0,0,0}; @@ -1124,3 +1126,5 @@ static const UTrie2 norm2_nfc_data_trie={ 0x24b4, NULL, 0, FALSE, FALSE, 0, NULL }; + +#endif // INCLUDED_FROM_NORMALIZER2_CPP diff --git a/icu4c/source/common/normalizer2.cpp b/icu4c/source/common/normalizer2.cpp index eacc57168bb..c345c06e21d 100644 --- a/icu4c/source/common/normalizer2.cpp +++ b/icu4c/source/common/normalizer2.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2009-2014, International Business Machines +* Copyright (C) 2009-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -31,6 +31,7 @@ using icu::Normalizer2Impl; // NFC/NFD data machine-generated by gennorm2 --csource +#define INCLUDED_FROM_NORMALIZER2_CPP #include "norm2_nfc_data.h" U_NAMESPACE_BEGIN diff --git a/icu4c/source/common/propname_data.h b/icu4c/source/common/propname_data.h index 521b9db50ec..3acc640b19a 100644 --- a/icu4c/source/common/propname_data.h +++ b/icu4c/source/common/propname_data.h @@ -7,9 +7,7 @@ * machine-generated by: icu/tools/unicode/c/genprops/pnamesbuilder.cpp */ -#ifndef INCLUDED_FROM_PROPNAME_CPP -# error This file must be #included from propname.cpp only. -#endif +#ifdef INCLUDED_FROM_PROPNAME_CPP U_NAMESPACE_BEGIN @@ -1607,3 +1605,5 @@ const char PropNameData::nameGroups[17897]={ }; U_NAMESPACE_END + +#endif // INCLUDED_FROM_PROPNAME_CPP diff --git a/icu4c/source/common/rbbicst.pl b/icu4c/source/common/rbbicst.pl index 98b06cbc27d..52383bef08b 100755 --- a/icu4c/source/common/rbbicst.pl +++ b/icu4c/source/common/rbbicst.pl @@ -1,6 +1,6 @@ #************************************************************************** -# Copyright (C) 2002-2005 International Business Machines Corporation * -# and others. All rights reserved. * +# Copyright (C) 2002-2016 International Business Machines Corporation +# and others. All rights reserved. #************************************************************************** # # rbbicst Compile the RBBI rule paser state table data into initialized C data. @@ -348,6 +348,8 @@ else print "#ifndef RBBIRPT_H\n"; print "#define RBBIRPT_H\n"; print "\n"; + print "#include \"unicode/utypes.h\"\n"; + print "\n"; print "U_NAMESPACE_BEGIN\n"; # diff --git a/icu4c/source/common/rbbinode.h b/icu4c/source/common/rbbinode.h index 0cbf6a71abe..8f7890bd8e3 100644 --- a/icu4c/source/common/rbbinode.h +++ b/icu4c/source/common/rbbinode.h @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2001-2006, International Business Machines Corporation and + * Copyright (c) 2001-2016, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -8,6 +8,7 @@ #define RBBINODE_H #include "unicode/utypes.h" +#include "unicode/unistr.h" #include "unicode/uobject.h" // diff --git a/icu4c/source/common/rbbirpt.h b/icu4c/source/common/rbbirpt.h index deea57b7add..b6c8795c35d 100644 --- a/icu4c/source/common/rbbirpt.h +++ b/icu4c/source/common/rbbirpt.h @@ -6,13 +6,15 @@ // It is generated by the Perl script "rbbicst.pl" from // the rule parser state definitions file "rbbirpt.txt". // -// Copyright (C) 2002-2005 International Business Machines Corporation +// Copyright (C) 2002-2016 International Business Machines Corporation // and others. All rights reserved. // //--------------------------------------------------------------------------------- #ifndef RBBIRPT_H #define RBBIRPT_H +#include "unicode/utypes.h" + U_NAMESPACE_BEGIN // // Character classes for RBBI rule scanning. diff --git a/icu4c/source/common/rbbiscan.h b/icu4c/source/common/rbbiscan.h index dd9b8e6370f..f1f9fd71f1e 100644 --- a/icu4c/source/common/rbbiscan.h +++ b/icu4c/source/common/rbbiscan.h @@ -1,7 +1,7 @@ // // rbbiscan.h // -// Copyright (C) 2002-2008, International Business Machines Corporation and others. +// Copyright (C) 2002-2016, International Business Machines Corporation and others. // All Rights Reserved. // // This file contains declarations for class RBBIRuleScanner @@ -21,9 +21,7 @@ #include "unicode/symtable.h"// For UnicodeSet parsing, is the interface that // looks up references to $variables within a set. #include "rbbinode.h" -//#include "rbbitblb.h" - - +#include "rbbirpt.h" U_NAMESPACE_BEGIN diff --git a/icu4c/source/common/ubidi_props_data.h b/icu4c/source/common/ubidi_props_data.h index 3699708e264..2650a6651b2 100644 --- a/icu4c/source/common/ubidi_props_data.h +++ b/icu4c/source/common/ubidi_props_data.h @@ -7,9 +7,7 @@ * machine-generated by: icu/tools/unicode/c/genprops/bidipropsbuilder.cpp */ -#ifndef INCLUDED_FROM_UBIDI_PROPS_C -# error This file must be #included from ubidi_props.c only. -#endif +#ifdef INCLUDED_FROM_UBIDI_PROPS_C static const UVersionInfo ubidi_props_dataVersion={8,0,0,0}; @@ -796,3 +794,5 @@ static const UBiDiProps ubidi_props_singleton={ }, { 2,2,0,0 } }; + +#endif // INCLUDED_FROM_UBIDI_PROPS_C diff --git a/icu4c/source/common/ubidiimp.h b/icu4c/source/common/ubidiimp.h index accd177ce09..9a23dc03a81 100644 --- a/icu4c/source/common/ubidiimp.h +++ b/icu4c/source/common/ubidiimp.h @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1999-2015, International Business Machines +* Copyright (C) 1999-2016, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -18,6 +18,7 @@ #define UBIDIIMP_H #include "unicode/utypes.h" +#include "unicode/ubidi.h" #include "unicode/uchar.h" #include "ubidi_props.h" diff --git a/icu4c/source/common/ucase_props_data.h b/icu4c/source/common/ucase_props_data.h index edfbda06668..5b3a3ff9878 100644 --- a/icu4c/source/common/ucase_props_data.h +++ b/icu4c/source/common/ucase_props_data.h @@ -7,9 +7,7 @@ * machine-generated by: icu/tools/unicode/c/genprops/casepropsbuilder.cpp */ -#ifndef INCLUDED_FROM_UCASE_CPP -# error This file must be #included from ucase.cpp only. -#endif +#ifdef INCLUDED_FROM_UCASE_CPP static const UVersionInfo ucase_props_dataVersion={8,0,0,0}; @@ -876,3 +874,5 @@ static const UCaseProps ucase_props_singleton={ }, { 3,0,0,0 } }; + +#endif // INCLUDED_FROM_UCASE_CPP diff --git a/icu4c/source/common/uchar_props_data.h b/icu4c/source/common/uchar_props_data.h index 40e0af22a70..f898e3f0a56 100644 --- a/icu4c/source/common/uchar_props_data.h +++ b/icu4c/source/common/uchar_props_data.h @@ -7,9 +7,7 @@ * machine-generated by: icu/tools/unicode/c/genprops/corepropsbuilder.cpp */ -#ifndef INCLUDED_FROM_UCHAR_C -# error This file must be #included from uchar.c only. -#endif +#ifdef INCLUDED_FROM_UCHAR_C static const UVersionInfo dataVersion={8,0,0,0}; @@ -3394,3 +3392,4 @@ static const uint16_t scriptExtensions[172]={ static const int32_t indexes[UPROPS_INDEX_COUNT]={0x26ca,0x26ca,0x26ca,0x26ca,0x5c6c,3,0x7397,0x73ed,0x73ed,0x73ed,0xb06a6,0x2774191,0,0,0,0}; +#endif // INCLUDED_FROM_UCHAR_C diff --git a/icu4c/source/i18n/collationfastlatinbuilder.h b/icu4c/source/i18n/collationfastlatinbuilder.h index 631e0fb7f84..b9eedf985af 100644 --- a/icu4c/source/i18n/collationfastlatinbuilder.h +++ b/icu4c/source/i18n/collationfastlatinbuilder.h @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2013-2015, International Business Machines +* Copyright (C) 2013-2016, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************* * collationfastlatinbuilder.h @@ -16,6 +16,7 @@ #if !UCONFIG_NO_COLLATION +#include "unicode/ucol.h" #include "unicode/unistr.h" #include "unicode/uobject.h" #include "collation.h" diff --git a/icu4c/source/i18n/collunsafe.h b/icu4c/source/i18n/collunsafe.h index 81e888fdc24..93d41bd5b7a 100644 --- a/icu4c/source/i18n/collunsafe.h +++ b/icu4c/source/i18n/collunsafe.h @@ -1,5 +1,6 @@ // collunsafe.h -// Copyright (C) 2015, International Business Machines Corporation and others. All Rights Reserved. +// Copyright (C) 2015-2016, International Business Machines Corporation and others. +// All Rights Reserved. // To be included by collationdatareader.cpp, and generated by gencolusb. // Machine generated, do not edit. @@ -7,6 +8,8 @@ #ifndef COLLUNSAFE_H #define COLLUNSAFE_H +#include "unicode/utypes.h" + #define COLLUNSAFE_ICU_VERSION "56.0.1" #define COLLUNSAFE_COLL_VERSION "9.64" #define COLLUNSAFE_SERIALIZE 1 diff --git a/icu4c/source/i18n/csdetect.h b/icu4c/source/i18n/csdetect.h index 15910453e84..bbe81c80166 100644 --- a/icu4c/source/i18n/csdetect.h +++ b/icu4c/source/i18n/csdetect.h @@ -1,6 +1,6 @@ /* ********************************************************************** - * Copyright (C) 2005-2013, International Business Machines + * Copyright (C) 2005-2016, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** */ @@ -12,6 +12,8 @@ #if !UCONFIG_NO_CONVERSION +#include "unicode/uenum.h" + U_NAMESPACE_BEGIN class InputText; diff --git a/icu4c/source/i18n/decNumberLocal.h b/icu4c/source/i18n/decNumberLocal.h index bf6d54b8b27..c6e542d0c26 100644 --- a/icu4c/source/i18n/decNumberLocal.h +++ b/icu4c/source/i18n/decNumberLocal.h @@ -1,7 +1,7 @@ /* ------------------------------------------------------------------ */ /* decNumber package local type, tuning, and macro definitions */ /* ------------------------------------------------------------------ */ -/* Copyright (c) IBM Corporation, 2000-2012. All rights reserved. */ +/* Copyright (c) IBM Corporation, 2000-2016. All rights reserved. */ /* */ /* This software is made available under the terms of the */ /* ICU License -- ICU 1.8.1 and later. */ @@ -29,6 +29,7 @@ #include /* for abs */ #include /* for memset, strcpy */ + #include "decContext.h" /* Conditional code flag -- set this to match hardware platform */ #if !defined(DECLITEND) diff --git a/icu4c/source/i18n/decfmtst.h b/icu4c/source/i18n/decfmtst.h index c6db2234588..3c774a3249b 100644 --- a/icu4c/source/i18n/decfmtst.h +++ b/icu4c/source/i18n/decfmtst.h @@ -1,7 +1,7 @@ /* ******************************************************************************* -* Copyright (C) 2009-2013, International Business Machines Corporation and * -* others. All Rights Reserved. * +* Copyright (C) 2009-2016, International Business Machines Corporation and +* others. All Rights Reserved. ******************************************************************************* * * This file contains declarations for the class DecimalFormatStaticSets @@ -16,7 +16,9 @@ #include "unicode/utypes.h" - #if !UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING + +#include "unicode/uobject.h" U_NAMESPACE_BEGIN diff --git a/icu4c/source/i18n/dtptngen_impl.h b/icu4c/source/i18n/dtptngen_impl.h index ec9fb00dfd6..72cc76a0389 100644 --- a/icu4c/source/i18n/dtptngen_impl.h +++ b/icu4c/source/i18n/dtptngen_impl.h @@ -1,7 +1,7 @@ /* ******************************************************************************* -* Copyright (C) 2007-2015, International Business Machines Corporation and -* others. All Rights Reserved. * +* Copyright (C) 2007-2016, International Business Machines Corporation and +* others. All Rights Reserved. ******************************************************************************* * * File DTPTNGEN.H @@ -9,11 +9,12 @@ ******************************************************************************* */ -#include "uvector.h" - #ifndef __DTPTNGEN_IMPL_H__ #define __DTPTNGEN_IMPL_H__ +#include "unicode/udatpg.h" +#include "uvector.h" + // TODO(claireho): Split off Builder class. // TODO(claireho): If splitting off Builder class: As subclass or independent? diff --git a/icu4c/source/i18n/plurrule_impl.h b/icu4c/source/i18n/plurrule_impl.h index 785600bff54..d829110cd03 100644 --- a/icu4c/source/i18n/plurrule_impl.h +++ b/icu4c/source/i18n/plurrule_impl.h @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2007-2015, International Business Machines Corporation and +* Copyright (C) 2007-2016, International Business Machines Corporation and * others. All Rights Reserved. ******************************************************************************* * @@ -33,6 +33,7 @@ U_NAMESPACE_BEGIN class AndConstraint; class RuleChain; class DigitInterval; +class PluralRules; class VisibleDigits; static const UChar DOT = ((UChar)0x002E); diff --git a/icu4c/source/i18n/regexcmp.h b/icu4c/source/i18n/regexcmp.h index 50bb3027fc6..f6bdeafd031 100644 --- a/icu4c/source/i18n/regexcmp.h +++ b/icu4c/source/i18n/regexcmp.h @@ -1,7 +1,7 @@ // // regexcmp.h // -// Copyright (C) 2002-2015, International Business Machines Corporation and others. +// Copyright (C) 2002-2016, International Business Machines Corporation and others. // All Rights Reserved. // // This file contains declarations for the class RegexCompile @@ -17,9 +17,10 @@ #include "unicode/utypes.h" #if !UCONFIG_NO_REGULAR_EXPRESSIONS -#include "unicode/uobject.h" -#include "unicode/uniset.h" #include "unicode/parseerr.h" +#include "unicode/uniset.h" +#include "unicode/uobject.h" +#include "unicode/utext.h" #include "uhash.h" #include "uvector.h" #include "uvectr32.h" diff --git a/icu4c/source/i18n/regexcst.h b/icu4c/source/i18n/regexcst.h index 3e62485f7c9..ed800ed42d6 100644 --- a/icu4c/source/i18n/regexcst.h +++ b/icu4c/source/i18n/regexcst.h @@ -5,13 +5,15 @@ // It is generated by the Perl script "regexcst.pl" from // the rule parser state definitions file "regexcst.txt". // -// Copyright (C) 2002-2015 International Business Machines Corporation +// Copyright (C) 2002-2016 International Business Machines Corporation // and others. All rights reserved. // //--------------------------------------------------------------------------------- #ifndef RBBIRPT_H #define RBBIRPT_H +#include "unicode/utypes.h" + U_NAMESPACE_BEGIN // // Character classes for regex pattern scanning. diff --git a/icu4c/source/i18n/regexcst.pl b/icu4c/source/i18n/regexcst.pl index d52093629c5..84870053117 100755 --- a/icu4c/source/i18n/regexcst.pl +++ b/icu4c/source/i18n/regexcst.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl # ******************************************************************** # * COPYRIGHT: -# * Copyright (c) 2002-2015, International Business Machines Corporation and +# * Copyright (c) 2002-2016, International Business Machines Corporation and # * others. All Rights Reserved. # ******************************************************************** # @@ -206,13 +206,15 @@ print "// This file contains the state table for the ICU Regular Expression P print "// It is generated by the Perl script \"regexcst.pl\" from\n"; print "// the rule parser state definitions file \"regexcst.txt\".\n"; print "//\n"; -print "// Copyright (C) 2002-2015 International Business Machines Corporation \n"; +print "// Copyright (C) 2002-2016 International Business Machines Corporation \n"; print "// and others. All rights reserved. \n"; print "//\n"; print "//---------------------------------------------------------------------------------\n"; print "#ifndef RBBIRPT_H\n"; print "#define RBBIRPT_H\n"; print "\n"; +print "#include \"unicode/utypes.h\"\n"; +print "\n"; print "U_NAMESPACE_BEGIN\n"; # diff --git a/icu4c/source/i18n/uitercollationiterator.h b/icu4c/source/i18n/uitercollationiterator.h index b1100c8ba1a..a64f88561b3 100644 --- a/icu4c/source/i18n/uitercollationiterator.h +++ b/icu4c/source/i18n/uitercollationiterator.h @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2012-2014, International Business Machines +* Copyright (C) 2012-2016, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************* * uitercollationiterator.h @@ -20,6 +20,7 @@ #include "cmemory.h" #include "collation.h" #include "collationdata.h" +#include "collationiterator.h" #include "normalizer2impl.h" U_NAMESPACE_BEGIN diff --git a/icu4c/source/i18n/uspoof_conf.h b/icu4c/source/i18n/uspoof_conf.h index b2be5d0388e..663b06cfef2 100644 --- a/icu4c/source/i18n/uspoof_conf.h +++ b/icu4c/source/i18n/uspoof_conf.h @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 2008-2011, International Business Machines +* Copyright (C) 2008-2016, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -23,6 +23,8 @@ #if !UCONFIG_NO_REGULAR_EXPRESSIONS +#include "unicode/uregex.h" +#include "uhash.h" #include "uspoof_impl.h" U_NAMESPACE_BEGIN diff --git a/icu4c/source/i18n/utf8collationiterator.h b/icu4c/source/i18n/utf8collationiterator.h index 3ec348d9f2e..bb0fc1179dc 100644 --- a/icu4c/source/i18n/utf8collationiterator.h +++ b/icu4c/source/i18n/utf8collationiterator.h @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2012-2014, International Business Machines +* Copyright (C) 2012-2016, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************* * utf8collationiterator.h @@ -19,6 +19,7 @@ #include "cmemory.h" #include "collation.h" #include "collationdata.h" +#include "collationiterator.h" #include "normalizer2impl.h" U_NAMESPACE_BEGIN diff --git a/icu4c/source/i18n/vzone.h b/icu4c/source/i18n/vzone.h index 5752be4f3cd..cbdda26d1a8 100644 --- a/icu4c/source/i18n/vzone.h +++ b/icu4c/source/i18n/vzone.h @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2009-2011, International Business Machines Corporation and +* Copyright (C) 2009-2016, International Business Machines Corporation and * others. All Rights Reserved. ******************************************************************************* */ @@ -19,6 +19,7 @@ #if !UCONFIG_NO_FORMATTING +#include "unicode/uobject.h" #include "ztrans.h" #ifndef UCNV_H diff --git a/icu4c/source/i18n/zrule.h b/icu4c/source/i18n/zrule.h index 52e90eaf160..a1f405c61fd 100644 --- a/icu4c/source/i18n/zrule.h +++ b/icu4c/source/i18n/zrule.h @@ -1,7 +1,7 @@ /* ******************************************************************************* -* Copyright (C) 2009-2011, International Business Machines Corporation and * -* others. All Rights Reserved. * +* Copyright (C) 2009-2016, International Business Machines Corporation and +* others. All Rights Reserved. ******************************************************************************* */ #ifndef __ZRULE_H @@ -16,6 +16,8 @@ #if !UCONFIG_NO_FORMATTING +#include "unicode/uobject.h" + #ifndef UCNV_H /** diff --git a/icu4c/source/i18n/ztrans.h b/icu4c/source/i18n/ztrans.h index 1a0d10c6f83..0331df88a82 100644 --- a/icu4c/source/i18n/ztrans.h +++ b/icu4c/source/i18n/ztrans.h @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2009-2011, International Business Machines Corporation and +* Copyright (C) 2009-2016, International Business Machines Corporation and * others. All Rights Reserved. ******************************************************************************* */ @@ -16,6 +16,8 @@ #if !UCONFIG_NO_FORMATTING +#include "unicode/uobject.h" + #ifndef UCNV_H /** diff --git a/icu4c/source/test/hdrtst/testinternalheaders.sh b/icu4c/source/test/hdrtst/testinternalheaders.sh new file mode 100755 index 00000000000..d267edcd11d --- /dev/null +++ b/icu4c/source/test/hdrtst/testinternalheaders.sh @@ -0,0 +1,29 @@ +# Copyright (C) 2016 International Business Machines Corporation +# and others. All rights reserved. +# +# Run this script from $ICU_ROOT/src/source/ + +CXX=clang++ + +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 ; +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 ; +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 ; +done ; + +rm ht_temp.cpp ht_temp.o diff --git a/icu4c/source/tools/gencolusb/extract_unsafe_backwards.cpp b/icu4c/source/tools/gencolusb/extract_unsafe_backwards.cpp index 72e55c69565..44dcaefc609 100644 --- a/icu4c/source/tools/gencolusb/extract_unsafe_backwards.cpp +++ b/icu4c/source/tools/gencolusb/extract_unsafe_backwards.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 1999-2015, International Business Machines Corporation and + * Copyright (c) 1999-2016, International Business Machines Corporation and * others. All Rights Reserved. * * Generator for source/i18n/collunsafe.h @@ -106,6 +106,8 @@ int main(int argc, const char *argv[]) { printf("#ifndef COLLUNSAFE_H\n" "#define COLLUNSAFE_H\n" "\n" + "#include \"unicode/utypes.h\"\n" + "\n" "#define COLLUNSAFE_ICU_VERSION \"" U_ICU_VERSION "\"\n"); printf("#define COLLUNSAFE_COLL_VERSION \"%s\"\n", verString); -- 2.40.0