Details
-
Suggestion
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.4.0
Description
It would be nice if qiconvcodec would work correctly in DragonFly BSD system.
DragonFly BSD has Citrus iconv (http://citrus.bsdclub.org) implementation in the base system.
The following patch was offered as a solution for this which seeks to handle Citrus iconv versions 1.13
— src/corelib/codecs/qiconvcodec.cpp.orig 2008-04-28 16:11:18 +0300
+++ src/corelib/codecs/qiconvcodec.cpp 2008-05-08 10:14:05 +0300
@@ -50,9 +50,14 @@
#include <stdio.h>
#include <dlfcn.h>
+// for __DragonFly_version
+#if defined(_DragonFly_)
+#include <sys/param.h>
+#endif
+
// unistd.h is needed for the _XOPEN_UNIX macro
#include <unistd.h>
-#if defined(_XOPEN_UNIX) && !defined(Q_OS_QNX6) && !defined(Q_OS_OSF)
+#if (defined(XOPEN_UNIX) && !defined(Q_OS_QNX6) && !defined(Q_OS_OSF)) || defined(DragonFly_)
- include <langinfo.h>
#endif
@@ -69,6 +74,9 @@
- else
- define UTF16 "UTF-16LE"
- endif
+#elif defined(_DragonFly_) && __DragonFly_version < 197700
+# define NO_BOM
+# define UTF16 "UTF-16"
#else - define UTF16 "UTF-16"
#endif
@@ -296,7 +304,7 @@
char *codeset = 0;
#endif
-#if defined(_XOPEN_UNIX) && !defined(Q_OS_QNX6) && !defined(Q_OS_OSF)
+#if (defined(XOPEN_UNIX) && !defined(Q_OS_QNX6) && !defined(Q_OS_OSF)) || defined(DragonFly_)
if (cd == (iconv_t) -1) {
codeset = nl_langinfo(CODESET);
if (codeset)