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 Michael Huedepohl <mi...@mozquito.com> on 2001/11/29 18:41:56 UTC

Re: Plan for Xerces-C++ 1.6 / FreeBSD port

Hi Tiny,

let me answer a second time to your email from Nov 23,
because things have changed meanwhile.

First of all, I found that the compilation bug from the
nightly build has been fixed, as I've seen from the CVS Web 
interface. I replaced the three files
	src/util/XMLAbstractDoubleFloat.hpp
	src/util/XMLDouble.hpp
	src/util/XMLFloat.hpp
with the new versions, and now everything went perfectly.
In addition to my first patch for FreeBSD, I also ported the
examples, and they all work well.

I compared all the files which I modified for the FreeBSD port
with the version numbers and dates from the CVS Web interface
and confirmed that they are all up-to-date now.

Since you prefer a zip file instead of a patch script, I've 
created a zip file containing the modified files and the new 
FreeBSD platform specific files, of course in the corresponding 
directories.

With this port, you can configure on FreeBSD with ICU transcoder
(-t icu) or with the native transcoder (Iconv, default).

The Iconv part has been written originally by Max Gotlib and
slightly corrected by me. It's ONLY contained in the file
IconvTransService.cpp, so you can decide for yourself to add
this modification or to omit the changes in IconvTransService.cpp
If you omit it, the configure with native transcoder will fail
at least on FreeBSD up to version 4.3 because
- wchar.h and wctype.h don't exist
- towupper doesn't exist
- wcstombs and mbstowcs are not conforming to the standard
  (NULL pointer argument for array length computation doesn't work)
Development goes on and at least the header files seem to be
available in FreeBSD 4.4, but I'm not sure if the rest is also OK.
So the Iconv port would still be helpful, but with the drawback
of having platform specific code in IconvTransService.cpp.
I don't see an easy way of moving this code elsewhere.
But XMLCh is not redefined as you complained - only wint_t
(which is also undefined on FreeBSD) is defined here to be XMLCh,
which is quite conforming to the definition in XXXDefs.hpp.

Hope you can integrate/commit it now.

Cheers, Michael


Michael Huedepohl wrote:
> 
> Tinny Ng wrote:
> >
> > Michael,
> >
> > Just checked the mail archive, and I think you have submitted two patches.
> > One on Sept 27, and one on Oct 1 ....
> 
> The one of Sept 27 is sufficient. This port uses (and needs) the ICU transcoder.
> The second patch included a patch from Max Gotlib for the Iconv transcoder,
> in addition. Both are based on Xerces 1.5.1 release.
> 
> > To avoid grepping the wrong patch, can you zip all your patches (better use
> > the latest code base) and resend the zip file again?  Thanks!!
> 
> I tried to use the nightly build from yesterday
> (xml-xerces_20011128111840.tar.gz)
> for forming a new patch, but this version produced compilation errors with gcc
> (see below). I checked it on Solaris with the original sources, and got the
> same errors - so it's independent from the FreeBSD port.
> 
> >
> > BTW I notice your patch in IconvTransService.cpp redefine XMLCh for FreeBSD.
> > Normally this should coded in those compiler specific header
> > src/util/Compilers/XXXDefs.hpp.  Please see if you can localize your FreeBSD
> > specific changes in src/util/Compilers/XXXDefs.hpp instead of
> > IconvTransService.cpp directly.
> 
> I understand your intention, but I'm afraid this will be hard or impossible,
> because my ICU version uses the original XMLCh definition, and only the IConv
> version (from Max Gotlib) redefines XMLCh - I'm afraid this distinction must
> take
> place in IconvTransService.cpp where also some FreeBSD replacements for the
> wcstombs, mbstowcs, and towupper functions are supplied. These functions are
> not implemented in the FreeBSD 4.3 Standard C library, as well as the headers
> <wchar.h> and <wctype.h>.
> 
> So, what do you think - can you use my patch from Sept 27 and merge the
> changes and bug fixes which appeared after 1.5.1 into it, or would you
> like to get a new patch based on the nightly build although I cannot test it
> because of the compilation errors caused by some other bug?
> And in the latter case, do you prefer the ICU-only port without OS specific
> changes in IconvTransService.cpp, or the combined ICU+Iconv port with some
> compromise in code structure?
> 
> Here are the compiler messages:
> 
> g++ -fPIC -DFREEBSD -I/usr/local/include -c -O -DXML_USE_ICU_TRANSCODER
> -I/usr/local/lib/icu/current/include -DXML_USE_INMEM_MESSAGELOADER
> -D_THREAD_SAFE -DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_SOCKET
> -I/xml-xerces/include  -o /xml-xerces/obj/FREEBSD/XMLAbstractDoubleFloat.o
> XMLAbstractDoubleFloat.cpp
> In file included from XMLAbstractDoubleFloat.cpp:72:
> /xml-xerces/include/util/XMLAbstractDoubleFloat.hpp:167: ANSI C++ forbids
> declaration `operator =' with no type
> gmake[1]: *** [XMLAbstractDoubleFloat.o] Error 1
> gmake[1]: Leaving directory `/home/michael/xerces_20011128111840/src/util'
> 
> g++ -fPIC -DFREEBSD -I/usr/local/include -c -O -DXML_USE_ICU_TRANSCODER
> -I/usr/local/lib/icu/current/include -DXML_USE_INMEM_MESSAGELOADER
> -D_THREAD_SAFE -DXML_USE_PTHREADS -DXML_USE_NETACCESSOR_SOCKET
> -I/xml-xerces/include  -o /xml-xerces/obj/FREEBSD/DatatypeValidatorFactory.o
> DatatypeValidatorFactory.cpp
> In file included from /xml-xerces/include/util/XMLDouble.hpp:92,
>                  from
> /xml-xerces/include/validators/datatype/DoubleDatatypeValidator.hpp:84,
>                  from DatatypeValidatorFactory.cpp:165:
> /xml-xerces/include/util/XMLAbstractDoubleFloat.hpp:167: ANSI C++ forbids
> declaration `operator =' with no type
> In file included from
> /xml-xerces/include/validators/datatype/DoubleDatatypeValidator.hpp:84,
>                  from DatatypeValidatorFactory.cpp:165:
> /xml-xerces/include/util/XMLDouble.hpp:143: ANSI C++ forbids declaration
> `operator =' with no type
> In file included from
> /xml-xerces/include/validators/datatype/FloatDatatypeValidator.hpp:85,
>                  from DatatypeValidatorFactory.cpp:166:
> /xml-xerces/include/util/XMLFloat.hpp:138: ANSI C++ forbids declaration
> `operator =' with no type
> gmake[2]: *** [DatatypeValidatorFactory.o] Error 1
> gmake[2]: Leaving directory
> `/home/michael/xerces_20011128111840/src/validators/datatype'
> 
> Regards, Michael
> 
> >
> > Thanks!
> >
> > Tinny
> >
> > Michael Huedepohl wrote:
> >
> > > Is it possible to integrate the FreeBSD support supplied by me
> > > some weeks ago?
> > >
> > > --
> > > Michael Huedepohl, Mozquito Technologies
> > >
> > > Tinny Ng wrote:
> > > >
> > > > Hi all,
> > > >
> > > > We've finished most of the schema features, and are now in testing and
> > > > wrapping up mode.   So I think it's time to call for Xerces-C++ 1.6.  If
> > > > you have any urgent fix or important code wanna to get in, please do so.
> > > >
> > > > Feel free to play with the latest nightly build
> > > > (http://xml.apache.org/dist/xerces-c/nightly/), and let us know any bugs
> > > > and leaks found so that we can fix them before releasing Xerces-C++ 1.6.
> > > >
> > > > Unless we hear any on-hold request, the target date for Xerces-C++ 1.6
> > > > should be sometime early December.
> > > >
> > > > Thanks!
> > > >
> > > > Regards,
> > > >
> > > > Tinny Ng
> > > > XML Parsers Development
> > > > IBM Toronto Laboratory, email: tng-xml@ca.ibm.com