You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Da...@lotus.com on 2000/11/27 19:46:45 UTC

Re: Xalan porting issues

Since your compiler can discover the problems, why don't you find the
problem spots and send us the diffs?

I have to admit that this will be difficult to keep up with, since all of
our primary platforms implement vector iterators as pointers, but we'll do
our best.

Dave



                                                                                                                               
                    chenrici@atra                                                                                              
                    xis.com              To:     xalan-dev@xml.apache.org                                                      
                                         cc:     "Jack Reeves" <JR...@sairgroup.com>, (bcc: David N Bertoni/CAM/Lotus)       
                    11/27/2000           Subject:     Xalan porting issues                                                     
                    02:01 PM                                                                                                   
                    Please                                                                                                     
                    respond to                                                                                                 
                    xalan-dev                                                                                                  
                                                                                                                               
                                                                                                                               





We are using both xerces-c and xalan-c for the following two platforms: AIX
4.2.x and HP-UX 11.00.
On HP-UX we are using the  aCC A.03.13 compiler.
On AIX we are using xlC_r of Visual Age 5.0.
On HP-UX we have an initial port running and working.
On AIX we are still porting.  (.....after a second go through on boths
platforms, we could send the diffs...)

One of the few nastier problems encountered on AIX with the Visual Age 5.0
compiler which uses the Dinkum C++ Standard Library,
was the following:

The Xalan code relys heavly on a non-standard feature of many standard
library
implementations,
being that Vector Iterators are actually implemented as pointers to the
type of
a Vector, like:

               vector<XalanDOMChar>    theBuffer;
               .........
               return XalanDOMString(theBuffer.begin())

Where XalanDOMString expects a pointer of type XalanDOMChar.

This is'nt standard compliant. Certainly with the Dinkum C++ Standard
Library on
AIX  this does'nt compile.

So the fix was --- thanks Jack ---:

               return XalanDOMString(&*theBuffer.begin());

So that fix was more or less straight forward ....

But things get uglier, when you actually depend on a null pointer of a
Iterator
as valid return value of a function
and base decisions on it ->  See MutableNodeRefList.cpp:


MutableNodeRefList::NodeListIteratorType
findInsertionPointBinarySearch(
               XalanNode*                          node,
               MutableNodeRefList::NodeListIteratorType      begin,
               MutableNodeRefList::NodeListIteratorType      end)
{
....
NodeListIteratorType     insertionPoint = 0;
....
return insertionPoint;
}

I think it would generally be helpful to move towards more standard
compliant
code, since compilier upgrades with a good degree
of standard convergance at least on the platforms we are working with are
immediate.
It would be ashame if not .... because actually the library is cool!

Can we expect a clean-up of the vector depending code? And when?

Kind regards

Christoph Henrici
_____________________________________________

Christoph Henrici                                  Dept:  CHC /
Connectivity
Services
atraxis AG / SAirGroup                                  CH-8058 Zurich
Airport /
Switzerland
Phone: +41(0)1 8123917   Telefax: +41(0)1 8121980                 E-Mail:
chenrici@atraxis.com    http://www.atraxis.com