]> granicus.if.org Git - icu/commitdiff
ICU-8730 move some @internal, rarely-used platform macros to putilimp.h
authorMarkus Scherer <markus.icu@gmail.com>
Wed, 27 Jul 2011 20:55:09 +0000 (20:55 +0000)
committerMarkus Scherer <markus.icu@gmail.com>
Wed, 27 Jul 2011 20:55:09 +0000 (20:55 +0000)
X-SVN-Rev: 30432

icu4c/source/common/putilimp.h
icu4c/source/common/umapfile.h
icu4c/source/common/umutex.h
icu4c/source/common/unicode/platform.h
icu4c/source/common/utrie2.h
icu4c/source/tools/pkgdata/pkgtypes.c
icu4c/source/tools/toolutil/filetools.cpp

index cee8026b230012004252a4617874ebde20f494fa..a82d77297dd45e3fff7f9a60d98892a45f183041 100644 (file)
 #include "unicode/utypes.h"
 #include "unicode/putil.h"
 
+/**
+ * \def U_HAVE_MSVC_2003_OR_EARLIER
+ * Flag for workaround of MSVC 2003 optimization bugs
+ * @internal
+ */
+#if !defined(U_HAVE_MSVC_2003_OR_EARLIER) && defined(_MSC_VER) && (_MSC_VER < 1400)
+#define U_HAVE_MSVC_2003_OR_EARLIER
+#endif
+
+/*===========================================================================*/
+/** @{ Information about POSIX support                                       */
+/*===========================================================================*/
+
+#ifdef U_HAVE_NL_LANGINFO_CODESET
+    /* Use the predefined value. */
+#elif U_PLATFORM_HAS_WIN32_API
+#   define U_HAVE_NL_LANGINFO_CODESET 0
+#else
+#   define U_HAVE_NL_LANGINFO_CODESET 1
+#endif
+
+#ifdef U_NL_LANGINFO_CODESET
+    /* Use the predefined value. */
+#elif !U_HAVE_NL_LANGINFO_CODESET
+#   define U_NL_LANGINFO_CODESET -1
+#else
+#   define U_NL_LANGINFO_CODESET CODESET
+#endif
+
+#ifdef U_TZSET
+    /* Use the predefined value. */
+#elif U_PLATFORM_HAS_WIN32_API
+#   define U_TZSET _tzset
+#else
+#   define U_TZSET tzset
+#endif
+
+#ifdef U_TIMEZONE
+    /* Use the predefined value. */
+#elif U_PLATFORM_IS_LINUX_BASED
+#   define U_TIMEZONE __timezone
+#elif U_PLATFORM_HAS_WIN32_API
+#   define U_TIMEZONE _timezone
+#else
+#   define U_TIMEZONE timezone
+#endif
+
+#ifdef U_TZNAME
+    /* Use the predefined value. */
+#elif U_PLATFORM_HAS_WIN32_API
+#   define U_TZNAME _tzname
+#else
+#   define U_TZNAME tzname
+#endif
+
+#ifdef U_HAVE_MMAP
+    /* Use the predefined value. */
+#elif U_PLATFORM_HAS_WIN32_API
+#   define U_HAVE_MMAP 0
+#else
+#   define U_HAVE_MMAP 1
+#endif
+
+#ifdef U_HAVE_POPEN
+    /* Use the predefined value. */
+#elif U_PLATFORM_HAS_WIN32_API
+#   define U_HAVE_POPEN 0
+#else
+#   define U_HAVE_POPEN 1
+#endif
+
+/**
+ * \def U_HAVE_DIRENT_H
+ * Defines whether dirent.h is available.
+ * @internal
+ */
+#ifdef U_HAVE_DIRENT_H
+    /* Use the predefined value. */
+#elif U_PLATFORM_HAS_WIN32_API
+#   define U_HAVE_DIRENT_H 0
+#else
+#   define U_HAVE_DIRENT_H 1
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/** @{ GCC built in functions for atomic memory operations                   */
+/*===========================================================================*/
+
+/**
+ * \def U_HAVE_GCC_ATOMICS
+ * @internal
+ */
+#ifdef U_HAVE_GCC_ATOMICS
+    /* Use the predefined value. */
+#elif defined(__GNUC__)
+#   define U_HAVE_GCC_ATOMICS 1
+#else
+#   define U_HAVE_GCC_ATOMICS 0
+#endif
+
+/** @} */
+
+/*===========================================================================*/
+/** @{ Programs used by ICU code                                             */
+/*===========================================================================*/
+
+/**
+ * \def U_MAKE_IS_NMAKE
+ * Defines whether the "make" program is Windows nmake.
+ */
+#ifdef U_MAKE_IS_NMAKE
+    /* Use the predefined value. */
+#elif U_PLATFORM == U_PF_WINDOWS
+#   define U_MAKE_IS_NMAKE 1
+#else
+#   define U_MAKE_IS_NMAKE 0
+#endif
+
+/** @} */
+
 /*==========================================================================*/
 /* Platform utilities                                                       */
 /*==========================================================================*/
index 1f4b43c5d9e1c31b5c6db58a5a024b47196412ed..1de9f412d7b9fc9dfda4941ce82b73c043163135 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "unicode/putil.h"
 #include "unicode/udata.h"
+#include "putilimp.h"
 
 U_CFUNC UBool uprv_mapFile(UDataMemory *pdm, const char *path);
 U_CFUNC void  uprv_unmapFile(UDataMemory *pData);
index 089afb775e5f7a2d18a2f2dfb25b3e619c083a07..78cfc890adfaaf6b7cfdddcf2374c6cc30741ca5 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "unicode/utypes.h"
 #include "unicode/uclean.h"
+#include "putilimp.h"
 
 #if defined(_MSC_VER) && _MSC_VER >= 1500
 # include <intrin.h>
index 99e9da88ea298bc36c270427a8015c04dd13a1c2..d136ef591840cb5cd4a9a357ed2bc3e3260116be 100644 (file)
 #   define U_PLATFORM_IS_DARWIN_BASED 0
 #endif
 
-/**
- * \def U_HAVE_DIRENT_H
- * Defines whether dirent.h is available.
- * @internal
- */
-#ifdef U_HAVE_DIRENT_H
-    /* Use the predefined value. */
-#elif U_PLATFORM_HAS_WIN32_API
-#   define U_HAVE_DIRENT_H 0
-#else
-#   define U_HAVE_DIRENT_H 1
-#endif
-
 /**
  * \def U_HAVE_STDINT_H
  * Defines whether stdint.h is available. It is a C99 standard header.
 
 /** @} */
 
-/*===========================================================================*/
-/** @{ Information about POSIX support                                       */
-/*===========================================================================*/
-
-#ifdef U_HAVE_NL_LANGINFO_CODESET
-    /* Use the predefined value. */
-#elif U_PLATFORM_HAS_WIN32_API
-#   define U_HAVE_NL_LANGINFO_CODESET 0
-#else
-#   define U_HAVE_NL_LANGINFO_CODESET 1
-#endif
-
-#ifdef U_NL_LANGINFO_CODESET
-    /* Use the predefined value. */
-#elif !U_HAVE_NL_LANGINFO_CODESET
-#   define U_NL_LANGINFO_CODESET -1
-#else
-#   define U_NL_LANGINFO_CODESET CODESET
-#endif
-
-#ifdef U_TZSET
-    /* Use the predefined value. */
-#elif U_PLATFORM_HAS_WIN32_API
-#   define U_TZSET _tzset
-#else
-#   define U_TZSET tzset
-#endif
-
-#ifdef U_TIMEZONE
-    /* Use the predefined value. */
-#elif U_PLATFORM_IS_LINUX_BASED
-#   define U_TIMEZONE __timezone
-#elif U_PLATFORM_HAS_WIN32_API
-#   define U_TIMEZONE _timezone
-#else
-#   define U_TIMEZONE timezone
-#endif
-
-#ifdef U_TZNAME
-    /* Use the predefined value. */
-#elif U_PLATFORM_HAS_WIN32_API
-#   define U_TZNAME _tzname
-#else
-#   define U_TZNAME tzname
-#endif
-
-#ifdef U_HAVE_MMAP
-    /* Use the predefined value. */
-#elif U_PLATFORM_HAS_WIN32_API
-#   define U_HAVE_MMAP 0
-#else
-#   define U_HAVE_MMAP 1
-#endif
-
-#ifdef U_HAVE_POPEN
-    /* Use the predefined value. */
-#elif U_PLATFORM_HAS_WIN32_API
-#   define U_HAVE_POPEN 0
-#else
-#   define U_HAVE_POPEN 1
-#endif
-
-/** @} */
-
 /*===========================================================================*/
 /** @{ Symbol import-export control                                          */
 /*===========================================================================*/
 
 /** @} */
 
-/**
- * \def U_HAVE_MSVC_2003_OR_EARLIER
- * Flag for workaround of MSVC 2003 optimization bugs
- * @internal
- */
-#if !defined(U_HAVE_MSVC_2003_OR_EARLIER) && defined(_MSC_VER) && (_MSC_VER < 1400)
-#define U_HAVE_MSVC_2003_OR_EARLIER
-#endif
-
-/*===========================================================================*/
-/** @{ GCC built in functions for atomic memory operations                   */
-/*===========================================================================*/
-
-/**
- * \def U_HAVE_GCC_ATOMICS
- * @internal
- */
-#ifdef U_HAVE_GCC_ATOMICS
-    /* Use the predefined value. */
-#elif defined(__GNUC__)
-#   define U_HAVE_GCC_ATOMICS 1
-#else
-#   define U_HAVE_GCC_ATOMICS 0
-#endif
-
-/** @} */
-
-/*===========================================================================*/
-/** @{ Programs used by ICU code                                             */
-/*===========================================================================*/
-
-/**
- * \def U_MAKE_IS_NMAKE
- * Defines whether the "make" program is Windows nmake.
- */
-#ifdef U_MAKE_IS_NMAKE
-    /* Use the predefined value. */
-#elif U_PLATFORM == U_PF_WINDOWS
-#   define U_MAKE_IS_NMAKE 1
-#else
-#   define U_MAKE_IS_NMAKE 0
-#endif
-
-/** @} */
-
 /*===========================================================================*/
 /* Custom icu entry point renaming                                           */
 /*===========================================================================*/
index 439d0d3dfe4465e543d1535b3b1db0b939abf457..1bac06ac6573b23b0399442eb11944463073c015 100644 (file)
@@ -18,6 +18,7 @@
 #define __UTRIE2_H__
 
 #include "unicode/utypes.h"
+#include "putilimp.h"
 #include "udataswp.h"
 
 U_CDECL_BEGIN
index 7b71054c572ffa4fcd699bf4be68aee4a71b5c48..2769e4538218730c1b9978693cd74eb32b61628e 100644 (file)
@@ -1,6 +1,6 @@
 /**************************************************************************
 *
-*   Copyright (C) 2000-2008, International Business Machines
+*   Copyright (C) 2000-2011, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 ***************************************************************************
@@ -22,7 +22,7 @@
 #include "cmemory.h"
 #include "cstring.h"
 #include "pkgtypes.h"
-
+#include "putilimp.h"
 
 const char *pkg_writeCharListWrap(FileStream *s, CharList *l, const char *delim, const char *brk, int32_t quote)
 {
index 058a6f7ccb3f8aeaf5cac9c041153fc428482ff5..7f560f6cd376051c5b657ae9e903cde63dc2d9a6 100644 (file)
@@ -1,5 +1,5 @@
 /******************************************************************************
- *   Copyright (C) 2009, International Business Machines
+ *   Copyright (C) 2009-2011, International Business Machines
  *   Corporation and others.  All Rights Reserved.
  *******************************************************************************
  */
@@ -8,6 +8,7 @@
 #include "filestrm.h"
 #include "cstring.h"
 #include "unicode/putil.h"
+#include "putilimp.h"
 
 #include <stdio.h>
 #include <stdlib.h>