From: Steven R. Loomis Date: Fri, 5 Sep 2014 21:27:11 +0000 (+0000) Subject: ICU-10920 enable "io" library to build (with no APIs) with UCONFIG_NO_CONVERSION... X-Git-Tag: milestone-59-0-1~1610 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2382d5a3b836d1489f211cbfcf4426ed6b4e25c;p=icu ICU-10920 enable "io" library to build (with no APIs) with UCONFIG_NO_CONVERSION set. X-SVN-Rev: 36367 --- diff --git a/icu4c/source/io/locbund.cpp b/icu4c/source/io/locbund.cpp index ddf81679d11..594ecc3b02f 100644 --- a/icu4c/source/io/locbund.cpp +++ b/icu4c/source/io/locbund.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1998-2013, International Business Machines +* Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -18,7 +18,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_CONVERSION #include "locbund.h" diff --git a/icu4c/source/io/sprintf.c b/icu4c/source/io/sprintf.c index 91d29c56f06..9f86e254812 100644 --- a/icu4c/source/io/sprintf.c +++ b/icu4c/source/io/sprintf.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 2001-2008, International Business Machines +* Copyright (C) 2001-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -20,7 +20,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_CONVERSION #include "unicode/ustdio.h" #include "unicode/ustring.h" diff --git a/icu4c/source/io/sscanf.c b/icu4c/source/io/sscanf.c index eb0bedfb84e..ffc850c84f4 100644 --- a/icu4c/source/io/sscanf.c +++ b/icu4c/source/io/sscanf.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 2000-2004, International Business Machines +* Copyright (C) 2000-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -17,7 +17,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_CONVERSION #include "unicode/putil.h" #include "unicode/ustdio.h" diff --git a/icu4c/source/io/ufile.c b/icu4c/source/io/ufile.c index 11a235e27fa..a8d8f0a3a60 100644 --- a/icu4c/source/io/ufile.c +++ b/icu4c/source/io/ufile.c @@ -27,6 +27,9 @@ #include "locmap.h" #include "unicode/ustdio.h" + +#if !UCONFIG_NO_CONVERSION + #include "ufile.h" #include "unicode/uloc.h" #include "unicode/ures.h" @@ -342,3 +345,4 @@ U_CAPI const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(UFILE *file) } #endif +#endif diff --git a/icu4c/source/io/ufile.h b/icu4c/source/io/ufile.h index 33056429169..42be4662c6e 100644 --- a/icu4c/source/io/ufile.h +++ b/icu4c/source/io/ufile.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 1998-2010, International Business Machines + * Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -20,6 +20,9 @@ #define UFILE_H #include "unicode/utypes.h" + +#if !UCONFIG_NO_CONVERSION + #include "unicode/ucnv.h" #include "unicode/utrans.h" #include "locbund.h" @@ -130,3 +133,4 @@ ufile_flush_io(UFILE *f); #endif +#endif diff --git a/icu4c/source/io/ufmt_cmn.c b/icu4c/source/io/ufmt_cmn.c index e4e09033911..90eaf8b7919 100644 --- a/icu4c/source/io/ufmt_cmn.c +++ b/icu4c/source/io/ufmt_cmn.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1998-2006, International Business Machines +* Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -25,6 +25,9 @@ #include "unicode/ucnv.h" #include "ustr_cnv.h" +#if !UCONFIG_NO_CONVERSION + + #define DIGIT_0 0x0030 #define DIGIT_9 0x0039 #define LOWERCASE_A 0x0061 @@ -251,3 +254,4 @@ ufmt_defaultCPToUnicode(const char *s, int32_t sSize, } +#endif diff --git a/icu4c/source/io/unicode/ustdio.h b/icu4c/source/io/unicode/ustdio.h index b98ae6a74ce..d31dbe51970 100644 --- a/icu4c/source/io/unicode/ustdio.h +++ b/icu4c/source/io/unicode/ustdio.h @@ -31,6 +31,8 @@ #include "unicode/localpointer.h" #include "unicode/unum.h" +#if !UCONFIG_NO_CONVERSION + /* TODO The following is a small list as to what is currently wrong/suggestions for @@ -1006,6 +1008,8 @@ u_vsscanf_u(const UChar *buffer, const UChar *patternSpecification, va_list ap); + +#endif #endif #endif diff --git a/icu4c/source/io/unicode/ustream.h b/icu4c/source/io/unicode/ustream.h index dbb3098b49f..41ccf5ae036 100644 --- a/icu4c/source/io/unicode/ustream.h +++ b/icu4c/source/io/unicode/ustream.h @@ -17,6 +17,8 @@ #include "unicode/unistr.h" +#if !UCONFIG_NO_CONVERSION // not available without conversion + /** * \file * \brief C++ API: Unicode iostream like API @@ -63,3 +65,4 @@ U_NAMESPACE_END /* No operator for UChar because it can conflict with wchar_t */ #endif +#endif diff --git a/icu4c/source/io/uprintf.cpp b/icu4c/source/io/uprintf.cpp index 02788adb474..a7e79f8ea89 100644 --- a/icu4c/source/io/uprintf.cpp +++ b/icu4c/source/io/uprintf.cpp @@ -20,7 +20,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_CONVERSION #include "unicode/ustdio.h" #include "unicode/ustring.h" diff --git a/icu4c/source/io/uprntf_p.c b/icu4c/source/io/uprntf_p.c index 78c2e5da759..09ae6bad857 100644 --- a/icu4c/source/io/uprntf_p.c +++ b/icu4c/source/io/uprntf_p.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1998-2011, International Business Machines +* Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -19,7 +19,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_CONVERSION #include "unicode/ustring.h" #include "unicode/utf16.h" diff --git a/icu4c/source/io/uscanf.c b/icu4c/source/io/uscanf.c index 5743f651991..3ef9b3c7bee 100644 --- a/icu4c/source/io/uscanf.c +++ b/icu4c/source/io/uscanf.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1998-2004, International Business Machines +* Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -18,7 +18,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_CONVERSION #include "unicode/putil.h" #include "unicode/ustdio.h" diff --git a/icu4c/source/io/uscanf.h b/icu4c/source/io/uscanf.h index dd8b8546a10..c192d66537c 100644 --- a/icu4c/source/io/uscanf.h +++ b/icu4c/source/io/uscanf.h @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1998-2004, International Business Machines +* Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -21,7 +21,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_CONVERSION #include "unicode/ustdio.h" diff --git a/icu4c/source/io/uscanf_p.c b/icu4c/source/io/uscanf_p.c index e6b22e326f2..8219b55688f 100644 --- a/icu4c/source/io/uscanf_p.c +++ b/icu4c/source/io/uscanf_p.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1998-2011, International Business Machines +* Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -18,7 +18,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_CONVERSION #include "unicode/uchar.h" #include "unicode/ustring.h" diff --git a/icu4c/source/io/ustdio.c b/icu4c/source/io/ustdio.c index df4c4f1c37c..3e6f7176587 100644 --- a/icu4c/source/io/ustdio.c +++ b/icu4c/source/io/ustdio.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * - * Copyright (C) 1998-2011, International Business Machines + * Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -18,6 +18,9 @@ */ #include "unicode/ustdio.h" + +#if !UCONFIG_NO_CONVERSION + #include "unicode/putil.h" #include "cmemory.h" #include "cstring.h" @@ -724,3 +727,4 @@ u_file_read( UChar *chars, return read; } +#endif diff --git a/icu4c/source/io/ustream.cpp b/icu4c/source/io/ustream.cpp index fb5f8880150..be02dd05427 100644 --- a/icu4c/source/io/ustream.cpp +++ b/icu4c/source/io/ustream.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2001-2011, International Business Machines +* Copyright (C) 2001-2014, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * FILE NAME : ustream.cpp @@ -13,6 +13,9 @@ */ #include "unicode/utypes.h" + +#if !UCONFIG_NO_CONVERSION + #include "unicode/uobject.h" #include "unicode/ustream.h" #include "unicode/ucnv.h" @@ -165,3 +168,4 @@ STOP_READING: U_NAMESPACE_END #endif +#endif