Peter Kümmel wrote:
> Bo Peng wrote:
>> On 6/26/07, José Matos <[EMAIL PROTECTED]> wrote:
>>> Hi all,
>>>         as discussed in this list I would like to release rc2 today.
>>>
>>>         The only thing that needs to be done now is to commit
>>> configure.ac. I have
>>> all other the changes committed.
>>>
>> OK. I have commit the scons part of the configure.ac change. I guess
>> you (or JMarc) can apply the configure.ac part.
>>
>> Bo
>>
> 
> Bo, shouldn't it be
> 
> +#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4 && ! defined(__FREEBSD__)
> +#  define USE_WCHAR_T
> 
> like in JMarcs last patch?
> 
> 
> 
> Peter
> 


Here a updated patch with the scons changes. Should I apply?
Or comes JMarc back before RC2?


-- 
Peter Kümmel
Index: src/support/docstream.cpp
===================================================================
--- src/support/docstream.cpp   (revision 18898)
+++ src/support/docstream.cpp   (working copy)
@@ -322,7 +322,7 @@
 
 }
 
-#if (!defined(HAVE_WCHAR_T) || SIZEOF_WCHAR_T != 4) && defined(__GNUC__)
+#if ! defined(USE_WCHAR_T) && defined(__GNUC__)
 // We get undefined references to these virtual methods. This looks like
 // a bug in gcc. The implementation here does not do anything useful, since
 // it is overriden in iconv_codecvt_facet.
Index: src/support/docstring.cpp
===================================================================
--- src/support/docstring.cpp   (revision 18898)
+++ src/support/docstring.cpp   (working copy)
@@ -217,7 +217,7 @@
 
 } // namespace lyx
 
-#if (!defined(HAVE_WCHAR_T) || SIZEOF_WCHAR_T != 4) && defined(__GNUC__)
+#if ! defined(USE_WCHAR_T) && defined(__GNUC__)
 
 // gcc does not have proper locale facets for lyx::char_type if
 // sizeof(wchar_t) == 2, so we have to implement them on our own.
Index: src/support/types.h
===================================================================
--- src/support/types.h (revision 18898)
+++ src/support/types.h (working copy)
@@ -23,7 +23,7 @@
 namespace lyx {
 
        /// The type used to hold characters in paragraphs
-#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4
+#ifdef USE_WCHAR_T
        // Prefer this if possible because GNU libstdc++ has usable
        // std::ctype<wchar_t> locale facets but not
        // std::ctype<boost::uint32_t>. gcc older than 3.4 is also missing
Index: configure.ac
===================================================================
--- configure.ac        (revision 18898)
+++ configure.ac        (working copy)
@@ -383,8 +383,18 @@
 #  define WANT_GETFILEATTRIBUTESEX_WRAPPER 1
 #endif
 
-#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4
-#  define LIBC_WCTYPE_USES_UCS4
+/*
+ * the FreeBSD libc uses UCS4, but libstdc++ has no proper wchar_t
+ * support compiled in:
+ * http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#3_9
+ * And we are not interested at all what libc
+ * does: What we need is a 32bit wide wchar_t, and a libstdc++ that
+ * has the needed wchar_t support and uses UCS4. Whether it
+ * implements this with the help of libc, or whether it has own code
+ * does not matter for us, because we don't use libc directly (Georg)
+*/
+#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4 && ! defined(__FREEBSD__)
+#  define USE_WCHAR_T
 #endif
 
 #endif
Index: development/scons/SConstruct
===================================================================
--- development/scons/SConstruct        (revision 18898)
+++ development/scons/SConstruct        (working copy)
@@ -825,7 +825,7 @@
  * does not matter for us, because we don't use libc directly (Georg)
 */
 #if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4 && ! defined(__FREEBSD__)
-#  define LIBC_WCTYPE_USES_UCS4
+#  define USE_WCHAR_T
 #endif
 
 #endif

Reply via email to