mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
FreeBSD libc uses UCS4, but libstdc++ has no proper wchar_t support compiled in (Jean-Marc)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18913 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d8dbaf3558
commit
5cbe5cf5ad
14
configure.ac
14
configure.ac
@ -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
|
||||
|
@ -322,7 +322,7 @@ odocstream & operator<<(odocstream & os, SetEnc e)
|
||||
|
||||
}
|
||||
|
||||
#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.
|
||||
|
@ -217,7 +217,7 @@ lyx::docstring & operator+=(lyx::docstring & l, char r)
|
||||
|
||||
} // 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.
|
||||
|
@ -98,7 +98,7 @@ lyx::docstring & operator+=(lyx::docstring & l, char r);
|
||||
} // namespace lyx
|
||||
|
||||
|
||||
#if SIZEOF_WCHAR_T != 4 && defined(__GNUC__) && defined(__GNUC_MINOR__) && __GNUC__ == 3 && __GNUC_MINOR__ < 4
|
||||
#if ! defined(USE_WCHAR_T) && defined(__GNUC__) && defined(__GNUC_MINOR__) && __GNUC__ == 3 && __GNUC_MINOR__ < 4
|
||||
// Missing char_traits methods in gcc 3.3 and older. Taken from gcc 4.2svn.
|
||||
namespace std {
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user