#cmakedefine HAVE_IOS 1
#cmakedefine HAVE_LOCALE 1
#cmakedefine HAVE_OPEN 1
+#cmakedefine HAVE_CHMOD 1
#cmakedefine HAVE_CLOSE 1
#cmakedefine HAVE_POPEN 1
#cmakedefine HAVE_PCLOSE 1
#cmakedefine HAVE_LC_MESSAGES 1
#cmakedefine HAVE_SSTREAM 1
#cmakedefine HAVE_ARGZ_H 1
+#cmakedefine SIZEOF_WCHAR_T_IS_2 1
+#cmakedefine SIZEOF_WCHAR_T_IS_4 1
+
+#ifdef SIZEOF_WCHAR_T_IS_2
+# define SIZEOF_WCHAR_T 2
+#else
+# ifdef SIZEOF_WCHAR_T_IS_4
+# define SIZEOF_WCHAR_T 4
+# endif
+#endif
#cmakedefine HAVE_ALLOCA 1
#cmakedefine HAVE_SYMBOL_ALLOCA 1
#cmakedefine USE_POSIX_PACKAGING 1
#cmakedefine USE_WINDOWS_PACKAGING 1
+#cmakedefine USE_MACOSX_PACKAGING 1
#cmakedefine PATH_MAX ${PATH_MAX}
#ifdef _MSC_VER
#endif
+#ifdef _DEBUG
+# define ENABLE_ASSERTIONS 1
+#endif
+
#if !defined(ENABLE_ASSERTIONS)
# define BOOST_DISABLE_ASSERTS 1
#endif
# define WANT_GETFILEATTRIBUTESEX_WRAPPER 1
#endif
+
+/*
+ * 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__) && !defined(__FreeBSD_kernel__)
+# define USE_WCHAR_T
+#endif
+
#if defined(MAKE_INTL_LIB) && defined(_MSC_VER)
#define __attribute__(x)
#define inline
#define uintmax_t UINT_MAX
#endif
+#ifdef _MSC_VER
+#ifdef HAVE_CHMOD
+#undef HAVE_CHMOD
+#endif
+#endif
+#ifdef HAVE_CHMOD
+#define HAVE_MODE_T
+#endif
+#ifdef LYX_ENABLE_PCH
+#include "pcheaders.h"
+#endif
#endif