From de16c44aa9f170c5d1643ef2d42fd0355e7c902b Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Wed, 26 Oct 2011 23:02:14 +0000 Subject: [PATCH] ICU-8908 #error if U_COMMON_IMPLEMENTATION, etc isnt set X-SVN-Rev: 30876 --- icu4c/source/common/putil.cpp | 5 +++++ icu4c/source/common/ubidiln.c | 6 +++++- icu4c/source/i18n/format.cpp | 6 +++++- icu4c/source/io/ucln_io.c | 7 ++++++- icu4c/source/tools/toolutil/toolutil.cpp | 4 ++++ 5 files changed, 25 insertions(+), 3 deletions(-) diff --git a/icu4c/source/common/putil.cpp b/icu4c/source/common/putil.cpp index dcb48e21e3c..ae39d532527 100644 --- a/icu4c/source/common/putil.cpp +++ b/icu4c/source/common/putil.cpp @@ -61,6 +61,11 @@ #include #include +#ifndef U_COMMON_IMPLEMENTATION +#error U_COMMON_IMPLEMENTATION not set - must be set for all ICU source files in common/ - see http://userguide.icu-project.org/howtouseicu +#endif + + /* include system headers */ #if U_PLATFORM_USES_ONLY_WIN32_API /* diff --git a/icu4c/source/common/ubidiln.c b/icu4c/source/common/ubidiln.c index 66bcefcc365..518a54d80ab 100644 --- a/icu4c/source/common/ubidiln.c +++ b/icu4c/source/common/ubidiln.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1999-2010, International Business Machines +* Copyright (C) 1999-2011, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -22,6 +22,10 @@ #include "ubidiimp.h" #include "uassert.h" +#ifndef U_COMMON_IMPLEMENTATION +#error U_COMMON_IMPLEMENTATION not set - must be set for all ICU source files in common/ - see http://userguide.icu-project.org/howtouseicu +#endif + /* * General remarks about the functions in this file: * diff --git a/icu4c/source/i18n/format.cpp b/icu4c/source/i18n/format.cpp index 701b489fff7..d80a44da7a8 100644 --- a/icu4c/source/i18n/format.cpp +++ b/icu4c/source/i18n/format.cpp @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 1997-2010, International Business Machines Corporation and * +* Copyright (C) 1997-2011, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* * @@ -23,6 +23,10 @@ #include "unicode/utypes.h" +#ifndef U_I18N_IMPLEMENTATION +#error U_I18N_IMPLEMENTATION not set - must be set for all ICU source files in i18n/ - see http://userguide.icu-project.org/howtouseicu +#endif + /* * Dummy code: * If all modules in the I18N library are switched off, then there are no diff --git a/icu4c/source/io/ucln_io.c b/icu4c/source/io/ucln_io.c index 05c00b9ea10..791a285c11b 100644 --- a/icu4c/source/io/ucln_io.c +++ b/icu4c/source/io/ucln_io.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * * -* Copyright (C) 2001-2009, International Business Machines * +* Copyright (C) 2001-2011, International Business Machines * * Corporation and others. All Rights Reserved. * * * ****************************************************************************** @@ -19,6 +19,11 @@ #include "umutex.h" #include "uassert.h" +#ifndef U_IO_IMPLEMENTATION +#error U_IO_IMPLEMENTATION not set - must be set for all ICU source files in io/ - see http://userguide.icu-project.org/howtouseicu +#endif + + /** Auto-client */ #define UCLN_TYPE UCLN_IO #include "ucln_imp.h" diff --git a/icu4c/source/tools/toolutil/toolutil.cpp b/icu4c/source/tools/toolutil/toolutil.cpp index bef774f4be4..b42044ed7fe 100644 --- a/icu4c/source/tools/toolutil/toolutil.cpp +++ b/icu4c/source/tools/toolutil/toolutil.cpp @@ -22,6 +22,10 @@ #include #include "unicode/utypes.h" +#ifndef U_TOOLUTIL_IMPLEMENTATION +#error U_TOOLUTIL_IMPLEMENTATION not set - must be set for all ICU source files in common/ - see http://userguide.icu-project.org/howtouseicu +#endif + #if U_PLATFORM_USES_ONLY_WIN32_API # define VC_EXTRALEAN # define WIN32_LEAN_AND_MEAN -- 2.40.0