You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Max Gotlib <ma...@cca.usart.ru> on 2001/10/01 13:02:03 UTC

XercesC under FreeBSD...

Hi!

I've searched through the XercesC-related mailing lists, looking for hints
on compiling XercesC under FreeBSD (I'm running 4.2 and 4.4). The solution
(patch) you've posted to the *-dev list makes it possible to compile it
with ICU transcoding staff. I was able to build the package for Iconv
transcoding subsystem (the patch against yours one is attached). The main
problem is caused by the lack of wsc* functions in the FreeBSD libc and
"unexpected" behavior of wcstombs() and mbstowsc() functions, called with
NULL arguments... I was speaking about XercesC-1.5.1...

Max.




Re: XercesC under FreeBSD...

Posted by Michael Huedepohl <mi...@mozquito.com>.
Max Gotlib wrote:
> 
> I've searched through the XercesC-related mailing lists, looking for hints
> on compiling XercesC under FreeBSD (I'm running 4.2 and 4.4). The solution
> (patch) you've posted to the *-dev list makes it possible to compile it
> with ICU transcoding staff. I was able to build the package for Iconv
> transcoding subsystem (the patch against yours one is attached). The main
> problem is caused by the lack of wsc* functions in the FreeBSD libc and
> "unexpected" behavior of wcstombs() and mbstowsc() functions, called with
> NULL arguments... I was speaking about XercesC-1.5.1...

I've tried your patch and first of all - after successfully patching the
source and configuring with
	runConfigure -p freebsd -nsocket -tnative -rpthread
(I suppose that's what you intended - right?)
I got the following error message from the gcc compiler:

IconvTransService.cpp:68: wchar.h: No such file or directory
IconvTransService.cpp:70: wctype.h: No such file or directory

I found that you still include these files which don't exist on FreeBSD 4.3
(and most probably also don't exist on 4.2 or 4.4).
I modified the ifdef's so that these include files are not requested
if XML_FREEBSD is defined.
Then I got the following error:
IconvTransService.cpp: In method `int IconvTransService::compareIString(const
XMLCh *, const XMLCh *)':
IconvTransService.cpp:207: syntax error before `='

Obviously, wint_t is unknown to the compiler, and since the towupper function
provided by you returns XMLCh, I added a definition
	#define wint_t XMLCh
into the XML_FREEBSD branch from above.
With these modifications, I could create the library, and it seems to work
with our applications as well as the version with ICU transcoder.

I'm attaching the modified patch for Iconv.
If you agree to my changes, I can create a new patch for both,
i.e. my ICU patch from last week with your Iconv patch integrated.

Michael