<commit_before>--- icu/source/config/mh-mingw	2012-11-05 12:15:12 -0500
+++ icu/source/config/mh-mingw2	2013-09-30 11:27:45 -0400
@@ -62,20 +62,27 @@
 SO_TARGET_VERSION_SUFFIX = 
 endif
 
+LIBPREFIX=lib
+
 # Static library prefix and file extension
 LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
 A = a
 
 ## An import library is needed for z/OS and MSVC
-IMPORT_LIB_EXT = .lib
-
-LIBPREFIX=
+#IMPORT_LIB_EXT = .lib
+IMPORT_LIB_EXT = .dll.a
 
 # Change the stubnames so that poorly working FAT disks and installation programs can work.
 # This is also for backwards compatibility.
 DATA_STUBNAME = dt
 I18N_STUBNAME = in
-LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)
+LIBICU = lib$(ICUPREFIX)
+
+ifeq ($(wildcard $(LIBDIR)/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(IMPORT_LIB_EXT)),)
+LIBICUDT=	$(top_builddir)/stubdata/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(IMPORT_LIB_EXT)
+else
+LIBICUDT=	$(LIBDIR)/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(IMPORT_LIB_EXT)
+endif
 
 # The #M# is used to delete lines for icu-config
 # Current full path directory.
--- icu/source/tools/pkgdata/pkgdata.cpp	2012-11-05 12:14:56 -0500
+++ icu/source/tools/pkgdata/pkgdata2.cpp	2013-09-30 14:45:30 -0400
@@ -858,13 +858,14 @@
 static void createFileNames(UPKGOptions *o, const char mode, const char *version_major, const char *version, const char *libName, UBool reverseExt, UBool noVersion) {
 #if U_PLATFORM == U_PF_MINGW
         /* MinGW does not need the library prefix when building in dll mode. */
-        if (IN_DLL_MODE(mode)) {
-            sprintf(libFileNames[LIB_FILE], "%s", libName);
-        } else {
+		/* not true if using msys */
+        //if (IN_DLL_MODE(mode)) {
+        //    sprintf(libFileNames[LIB_FILE], "%s", libName);
+        //} else {
             sprintf(libFileNames[LIB_FILE], "%s%s",
                     pkgDataFlags[LIBPREFIX],
                     libName);
-        }
+        //}
 #else
         sprintf(libFileNames[LIB_FILE], "%s%s",
                 pkgDataFlags[LIBPREFIX],
@@ -876,7 +877,7 @@
         }
 
 #if U_PLATFORM == U_PF_MINGW
-        sprintf(libFileNames[LIB_FILE_MINGW], "%s%s.lib", pkgDataFlags[LIBPREFIX], libName);
+        sprintf(libFileNames[LIB_FILE_MINGW], "%s%s.dll.a", pkgDataFlags[LIBPREFIX], libName);
 #elif U_PLATFORM == U_PF_CYGWIN
         sprintf(libFileNames[LIB_FILE_CYGWIN], "cyg%s.%s",
                 libName,
--- icu/source/common/unicode/platform.h	2012-11-05 12:14:34 -0500
+++ icu/source/common/unicode/platform2.h	2012-11-09 12:57:46 -0500
@@ -664,9 +664,9 @@
      * does not support u"abc" string literals.
      * gcc 4.4 defines the __CHAR16_TYPE__ macro to a usable type but
      * does not support u"abc" string literals.
-     * C++11 requires support for UTF-16 literals
+     * C++11 and C11 require support for UTF-16 literals
      */
-#   if (defined(__cplusplus) && __cplusplus >= 201103L)
+#   if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L)
 #       define U_HAVE_CHAR16_T 1
 #   else
 #       define U_HAVE_CHAR16_T 0

--- icu/source/common/unicode/umachine.h	2012-11-05 12:14:34 -0500
+++ icu/source/common/unicode/umachine2.h	2012-11-09 12:57:46 -0500
@@ -256,7 +256,7 @@
 
 /**
  * \var UChar
- * Define UChar to be char16_t, if available,
+ * Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t),
  * or wchar_t if that is 16 bits wide; always assumed to be unsigned.
  * If neither is available, then define UChar to be uint16_t.
  *
@@ -266,10 +266,10 @@
  *
  * @stable ICU 4.4
  */
-
-/* Define UChar to be compatible with char16_t or wchar_t if possible. */
-#if U_HAVE_CHAR16_T
-    typedef char16_t UChar;
+#if defined(UCHAR_TYPE)
+    typedef UCHAR_TYPE UChar;
+/* Not #elif U_HAVE_CHAR16_T -- because that is type-incompatible with pre-C++11 callers
+    typedef char16_t UChar;  */
 #elif U_SIZEOF_WCHAR_T==2
     typedef wchar_t UChar;
 #elif defined(__CHAR16_TYPE__)

--- icu/source/common/unicode/ustring.h	2012-11-05 12:14:34 -0500
+++ icu/source/common/unicode/ustring2.h	2012-11-09 12:57:46 -0500
@@ -939,7 +939,7 @@
  * @stable ICU 2.0
  */
 #if defined(U_DECLARE_UTF16)
-#   define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]=U_DECLARE_UTF16(cs)
+#   define U_STRING_DECL(var, cs, length) static const UChar *var=(const UChar *)U_DECLARE_UTF16(cs)
     /**@stable ICU 2.0 */
 #   define U_STRING_INIT(var, cs, length)
 #elif U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && (U_CHARSET_FAMILY==U_ASCII_FAMILY || (U_SIZEOF_UCHAR == 2 && defined(U_WCHAR_IS_UTF16)))

--- icu/source/test/intltest/strtest.cpp	2012-11-05 12:13:46 -0500
+++ icu/source/test/intltest/strtest2.cpp	2012-11-09 12:57:46 -0500
@@ -1,6 +1,6 @@
 /********************************************************************
  * COPYRIGHT: 
- * Copyright (c) 1997-2011, International Business Machines Corporation and
+ * Copyright (c) 1997-2012, International Business Machines Corporation and
  * others. All Rights Reserved.
  ********************************************************************/
 /*   file name:  strtest.cpp
@@ -94,7 +94,7 @@
 void
 StringTest::Test_U_STRING() {
     U_STRING_INIT(ustringVar, "aZ0 -", 5);
-    if( sizeof(ustringVar)/sizeof(*ustringVar)!=6 ||
+    if( u_strlen(ustringVar)!=5 ||
         ustringVar[0]!=0x61 ||
         ustringVar[1]!=0x5a ||
         ustringVar[2]!=0x30 ||

--- icu/source/config/Makefile.inc.in	2012-11-05 12:15:12 -0500
+++ icu/source/config/Makefile.inc.in2	2013-09-30 15:58:24 -0400
@@ -87,7 +87,7 @@
 
 # Name flexibility for the library naming scheme.  Any modifications should
 # be made in the mh- file for the specific platform.
-DATA_STUBNAME = data
+DATA_STUBNAME = dt
 COMMON_STUBNAME = uc
 I18N_STUBNAME = i18n
 LAYOUT_STUBNAME = le<commit_msg>Keep data and i18n stubs, just make sure they are consistent.<commit_after>--- icu/source/config/mh-mingw	2012-11-05 12:15:12 -0500
+++ icu/source/config/mh-mingw2	2013-09-30 11:27:45 -0400
@@ -62,20 +62,27 @@
 SO_TARGET_VERSION_SUFFIX = 
 endif
 
+LIBPREFIX=lib
+
 # Static library prefix and file extension
 LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
 A = a
 
 ## An import library is needed for z/OS and MSVC
-IMPORT_LIB_EXT = .lib
-
-LIBPREFIX=
+#IMPORT_LIB_EXT = .lib
+IMPORT_LIB_EXT = .dll.a
 
 # Change the stubnames so that poorly working FAT disks and installation programs can work.
 # This is also for backwards compatibility.
-DATA_STUBNAME = dt
-I18N_STUBNAME = in
-LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)
+DATA_STUBNAME = data
+I18N_STUBNAME = i18n
+LIBICU = lib$(ICUPREFIX)
+
+ifeq ($(wildcard $(LIBDIR)/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(IMPORT_LIB_EXT)),)
+LIBICUDT=	$(top_builddir)/stubdata/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(IMPORT_LIB_EXT)
+else
+LIBICUDT=	$(LIBDIR)/$(LIBICU)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(IMPORT_LIB_EXT)
+endif
 
 # The #M# is used to delete lines for icu-config
 # Current full path directory.
--- icu/source/tools/pkgdata/pkgdata.cpp	2012-11-05 12:14:56 -0500
+++ icu/source/tools/pkgdata/pkgdata2.cpp	2013-09-30 14:45:30 -0400
@@ -858,13 +858,14 @@
 static void createFileNames(UPKGOptions *o, const char mode, const char *version_major, const char *version, const char *libName, UBool reverseExt, UBool noVersion) {
 #if U_PLATFORM == U_PF_MINGW
         /* MinGW does not need the library prefix when building in dll mode. */
-        if (IN_DLL_MODE(mode)) {
-            sprintf(libFileNames[LIB_FILE], "%s", libName);
-        } else {
+		/* not true if using msys */
+        //if (IN_DLL_MODE(mode)) {
+        //    sprintf(libFileNames[LIB_FILE], "%s", libName);
+        //} else {
             sprintf(libFileNames[LIB_FILE], "%s%s",
                     pkgDataFlags[LIBPREFIX],
                     libName);
-        }
+        //}
 #else
         sprintf(libFileNames[LIB_FILE], "%s%s",
                 pkgDataFlags[LIBPREFIX],
@@ -876,7 +877,7 @@
         }
 
 #if U_PLATFORM == U_PF_MINGW
-        sprintf(libFileNames[LIB_FILE_MINGW], "%s%s.lib", pkgDataFlags[LIBPREFIX], libName);
+        sprintf(libFileNames[LIB_FILE_MINGW], "%s%s.dll.a", pkgDataFlags[LIBPREFIX], libName);
 #elif U_PLATFORM == U_PF_CYGWIN
         sprintf(libFileNames[LIB_FILE_CYGWIN], "cyg%s.%s",
                 libName,
--- icu/source/common/unicode/platform.h	2012-11-05 12:14:34 -0500
+++ icu/source/common/unicode/platform2.h	2012-11-09 12:57:46 -0500
@@ -664,9 +664,9 @@
      * does not support u"abc" string literals.
      * gcc 4.4 defines the __CHAR16_TYPE__ macro to a usable type but
      * does not support u"abc" string literals.
-     * C++11 requires support for UTF-16 literals
+     * C++11 and C11 require support for UTF-16 literals
      */
-#   if (defined(__cplusplus) && __cplusplus >= 201103L)
+#   if (defined(__cplusplus) && __cplusplus >= 201103L) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L)
 #       define U_HAVE_CHAR16_T 1
 #   else
 #       define U_HAVE_CHAR16_T 0

--- icu/source/common/unicode/umachine.h	2012-11-05 12:14:34 -0500
+++ icu/source/common/unicode/umachine2.h	2012-11-09 12:57:46 -0500
@@ -256,7 +256,7 @@
 
 /**
  * \var UChar
- * Define UChar to be char16_t, if available,
+ * Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t),
  * or wchar_t if that is 16 bits wide; always assumed to be unsigned.
  * If neither is available, then define UChar to be uint16_t.
  *
@@ -266,10 +266,10 @@
  *
  * @stable ICU 4.4
  */
-
-/* Define UChar to be compatible with char16_t or wchar_t if possible. */
-#if U_HAVE_CHAR16_T
-    typedef char16_t UChar;
+#if defined(UCHAR_TYPE)
+    typedef UCHAR_TYPE UChar;
+/* Not #elif U_HAVE_CHAR16_T -- because that is type-incompatible with pre-C++11 callers
+    typedef char16_t UChar;  */
 #elif U_SIZEOF_WCHAR_T==2
     typedef wchar_t UChar;
 #elif defined(__CHAR16_TYPE__)

--- icu/source/common/unicode/ustring.h	2012-11-05 12:14:34 -0500
+++ icu/source/common/unicode/ustring2.h	2012-11-09 12:57:46 -0500
@@ -939,7 +939,7 @@
  * @stable ICU 2.0
  */
 #if defined(U_DECLARE_UTF16)
-#   define U_STRING_DECL(var, cs, length) static const UChar var[(length)+1]=U_DECLARE_UTF16(cs)
+#   define U_STRING_DECL(var, cs, length) static const UChar *var=(const UChar *)U_DECLARE_UTF16(cs)
     /**@stable ICU 2.0 */
 #   define U_STRING_INIT(var, cs, length)
 #elif U_SIZEOF_WCHAR_T==U_SIZEOF_UCHAR && (U_CHARSET_FAMILY==U_ASCII_FAMILY || (U_SIZEOF_UCHAR == 2 && defined(U_WCHAR_IS_UTF16)))

--- icu/source/test/intltest/strtest.cpp	2012-11-05 12:13:46 -0500
+++ icu/source/test/intltest/strtest2.cpp	2012-11-09 12:57:46 -0500
@@ -1,6 +1,6 @@
 /********************************************************************
  * COPYRIGHT: 
- * Copyright (c) 1997-2011, International Business Machines Corporation and
+ * Copyright (c) 1997-2012, International Business Machines Corporation and
  * others. All Rights Reserved.
  ********************************************************************/
 /*   file name:  strtest.cpp
@@ -94,7 +94,7 @@
 void
 StringTest::Test_U_STRING() {
     U_STRING_INIT(ustringVar, "aZ0 -", 5);
-    if( sizeof(ustringVar)/sizeof(*ustringVar)!=6 ||
+    if( u_strlen(ustringVar)!=5 ||
         ustringVar[0]!=0x61 ||
         ustringVar[1]!=0x5a ||
         ustringVar[2]!=0x30 ||

{'fraction_non_alphanumeric': 0.165014164305949, 'fraction_numerical': 0.07586756373937677, 'mean_word_length': 3.5829614604462474, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7369341', 'n_tokens_mistral': 4812, 'n_tokens_neox': 4203, 'n_words': 931}