Uploaded image for project: 'Xerces-C++'
  1. Xerces-C++
  2. XERCESC-1856

Can't build Xerces-C 3.0 with GNUiconv on UNIX (AIX, HP-UX, Sun Solaris) because the header endian.h is missing there

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.1
    • 3.1.0
    • Build
    • None
    • AIX 5.3 and 6.1, HP-UX B.11.23, Sun Solaris 2.10; may be more other versions

    Description

      The configure can't set-up the Makefile with gnuiconv support because the system header "endian.h" is missing on these systems (AIX, HP-UX, Sun Solaris).
      I made an experiment removing the check for endian.h in configure, then change the source of util/Transcoders/IconvGNU/IconvGNUTransService.cpp in this way:

      #if HAVE_ENDIAN_H
      #include <endian.h>
      #elif HAVE_MACHINE_ENDIAN_H
      #include <machine/endian.h>
      #else
      #include <arpa/nameser_compat.h>
      #endif

      The header "arpa/nameser_compat.h" contains workaround definitions of LITTLE_ENDIAN, BIG_ENDIAN and BYTE_ORDER.
      The compilation of Xerces-C library finished with success, and my little test program works fine (convert file from cp1251 encoding to UTF-8).

      I think the fix of it is not big deal. There is possible to use the header "arpa/nameser_compat.h" which exists on all UNIX machines, or use some specific header of Xerces-C library.

      Regards,
      Vladimir Penev

      Attachments

        Activity

          People

            amassari Alberto Massari
            vpenev Vladimir Penev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: