[ 
https://issues.apache.org/jira/browse/XERCESC-1856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679130#action_12679130
 ] 

Vladimir Penev commented on XERCESC-1856:
-----------------------------------------

Hello Boris,
I can attach the source of IconvGNUTransService.cpp of course but I think they 
are not very good.
First of all I don't understand of configure programing and I made a simple 
change in the script removing the check for endian.h
I do this on HP-UX but for Linux based systems it is necessary. I don't know 
how to modify configure in the right way. There should add a check for 
arpa/nameser_compat.h and it will be ok in both cases, for Linux and for UNIX. 
But if endian.h is still mandatory for both system types then it will stay as 
an obstacle for the UNIXes. If the configure is changed with 1. "skip check of 
endian.h for UNIX systems" and 2. "check of arpa/nameser_compat.h for UNIX 
systems" then the source util/Transcoders/IconvGNU/IconvGNUTransService.cpp can 
be modified in this way:

from:
#if HAVE_ENDIAN_H
  #include <endian.h>
#elif HAVE_MACHINE_ENDIAN_H
  #include <machine/endian.h>
#endif

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

Regards,
Vladimir Penev

> Can't build Xerces-C 3.0 with GNUiconv on UNIX (AIX, HP-UX, Sun Solaris) 
> because the header endian.h is missing there
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: XERCESC-1856
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1856
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.0.1
>         Environment: AIX 5.3 and 6.1, HP-UX B.11.23, Sun Solaris 2.10; may be 
> more other versions
>            Reporter: Vladimir Penev
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to