>>>>> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:
Georg> Yes. But I think that a comment should be added in configure.ac
Georg> why FreeBSD is excluded, probably pointing to the libstdc++ bug
Georg> report (or the lyx-devel thread). Then it will be easy to check
Georg> whether the FreeBSD exclusion can be removed or not if somebody
Georg> stumbles over the test and wonders why it is there.
That would be this (with shamelessly stolen text).
JMarc
Index: src/support/docstream.cpp
===================================================================
--- src/support/docstream.cpp (révision 18889)
+++ src/support/docstream.cpp (copie de travail)
@@ -322,7 +322,7 @@ odocstream & operator<<(odocstream & os,
}
-#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 (révision 18889)
+++ src/support/docstring.cpp (copie de travail)
@@ -217,7 +217,7 @@ lyx::docstring & operator+=(lyx::docstri
} // 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 (révision 18889)
+++ src/support/types.h (copie de travail)
@@ -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 (révision 18889)
+++ configure.ac (copie de travail)
@@ -383,8 +383,18 @@ int mkstemp(char*);
# 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