[tex-k] FAIL: tests/ttf.test

Norbert Preining preining at logic.at
Thu Nov 15 00:35:52 CET 2012


Hi Peter,

On Mi, 14 Nov 2012, Peter Breitenlohner wrote:
> I have not seen any such.  Please (re)send me that mail and the patch.

strange indeed, I thought I send it, but I cannot find it myself.
Anyway, it was a follow up on Jonathan's email:

On Fr, 09 Nov 2012, Jonathan Kew wrote:
> I think this change (just checked-in to ICU) will probably resolve the  
> build problems you've been seeing, if you can't work around the problem  
> by some adjustment to configure/compiler options.
[...]
> I have checked in a fix under ticket #9728
> <http://bugs.icu-project.org/trac/ticket/9728> which changes back to not
> automatically defining UChar=char16_t. It adds the ability to optionally
> define a custom UCHAR_TYPE.
[...]

I tried the patch mentioned in the ticket 9728 and with it TL builds
without any special options even with new gcc.

I attach the patch, for convenience.

Best wishes

Norbert
------------------------------------------------------------------------
Norbert Preining            preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan                                 TeX Live & Debian Developer
DSA: 0x09C5B094   fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
Ah, " said Arthur, "this is obviously some strange usage
of the word safe that I wasn't previously aware of.
                 --- Douglas Adams, The Hitchhikers Guide to the Galaxy
-------------- next part --------------
---
 libs/icu/icu-50.1/common/unicode/platform.h |    4 ++--
 libs/icu/icu-50.1/common/unicode/umachine.h |   10 +++++-----
 libs/icu/icu-50.1/common/unicode/ustring.h  |    2 +-
 libs/icu/icu-50.1/test/intltest/strtest.cpp |    4 ++--
 4 files changed, 10 insertions(+), 10 deletions(-)

--- texlive-bin.orig/libs/icu/icu-50.1/test/intltest/strtest.cpp
+++ texlive-bin/libs/icu/icu-50.1/test/intltest/strtest.cpp
@@ -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 ||
--- texlive-bin.orig/libs/icu/icu-50.1/common/unicode/platform.h
+++ texlive-bin/libs/icu/icu-50.1/common/unicode/platform.h
@@ -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
--- texlive-bin.orig/libs/icu/icu-50.1/common/unicode/ustring.h
+++ texlive-bin/libs/icu/icu-50.1/common/unicode/ustring.h
@@ -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)))
--- texlive-bin.orig/libs/icu/icu-50.1/common/unicode/umachine.h
+++ texlive-bin/libs/icu/icu-50.1/common/unicode/umachine.h
@@ -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__)


More information about the tex-k mailing list