Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-2062

Make qiconvcodec work correctly in DragonFly BSD

    XMLWordPrintable

Details

    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_)

      1. include <langinfo.h>
        #endif

      @@ -69,6 +74,9 @@

      1. else
      2. define UTF16 "UTF-16LE"
      3. endif
        +#elif defined(_DragonFly_) && __DragonFly_version < 197700
        +# define NO_BOM
        +# define UTF16 "UTF-16"
        #else
      4. 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)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jasmcdon Jason McDonald (Closed Nokia Identity. Please assign to "macadder" instead) (Inactive)
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes