The fix worked fine... no more unaligned access errors.  Thank you for
getting that in to the sources.  I did run into a problem compiling xerces
though.  When linking the shared lib together I got an unresolved symbol
warning for 'pow'.  By adding in the '-lm' option to the ALLLIBS variable
defined in src/Makefile.incl, the problem was fixed.  Here are the diffs:

# diff Makefile.incl.orig Makefile.incl
376c376
<       ALLLIBS =
${LIBS} -L/usr/lib -L/usr/local/lib -L/usr/ccs/lib -lc -lrt
---
>       ALLLIBS =
${LIBS} -L/usr/lib -L/usr/local/lib -L/usr/ccs/lib -lc -lrt -lm

It should probably be included on line 374 also (when using ICU) but I do
not have ICU so I cannot try it.  And maybe also in the TRU64/g++ section
(again I don't have a g++ compiler on my machine to try it).

Thanks!
Kari


----- Original Message -----
From: "Tinny Ng" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 07, 2001 11:39 AM
Subject: Re: Unaligned Access warnings in IDOM samples


> I tried it on a number of platforms and seem to be ok.  Your fix is now in
CVS.
> Please verify (the nightly build package will be available tomorrow).
>
> Thanks!
>
> Tinny
>
> Kari Whitcomb wrote:
>
> > I just wanted to bring this discussion back to the surface since it has
been
> > silent for a few days.  I would really like to see this issue resolved
as
> > soon as possible.  There has not been a real response to my suggestion
of
> > the following change.  It eliminates the unaligned access warnings on
TRU64
> > but I do not know if it is appropriate for other platforms.  Should I
file a
> > bug report, or is there someone willing to work with me to find a
solution
> > and submit the change to the code pool?
> >
> > Thanks
> > Kari
> >
> > ----- Original Message -----
> > From: "Kari Whitcomb" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, August 02, 2001 10:41 AM
> > Subject: Re: Unaligned Access warnings in IDOM samples
> >
> > > Instead of padding the size that we want to allocate before calling
the
> > > allocate function, perhaps this should happen within
> > > IDDocumentImpl::allocate().  Maybe something like the following?  I
don't
> > > know if this will still cause the compiler errors reported yesterday
with
> > > g++ 2.95.4.  Could someone try it out?
> > > Thanks,
> > > Kari
> > >
> > > *** IDDocumentImpl.cpp  Wed Aug  1 15:19:13 2001
> > > --- xml/xerces-c-src1_5_1/src/idom/IDDocumentImpl.cpp   Thu Aug  2
> > 10:43:07
> > > 2001
> > > ***************
> > > *** 858,863 ****
> > > --- 858,867 ----
> > >
> > >   void *         IDDocumentImpl::allocate(size_t amount)
> > >   {
> > > +     size_t sizeOfPointer = sizeof(void *);
> > > +     if (amount%sizeOfPointer!=0)
> > > +       amount = amount + (sizeOfPointer - (amount % sizeOfPointer));
> > > +
> > >       // If the request is for a largish block, hand it off to the
system
> > >       //   allocator.  The block still must be linked into the list of
> > >       //   allocated blocks so that it will be deleted when the time
> > comes.
> > > ***************
> > > *** 884,890 ****
> > >               fFreePtr = 0;
> > >               fFreeBytesRemaining = 0;
> > >           }
> > > !         void *retPtr = (char *)newBlock + 4;
> > >           return retPtr;
> > >       }
> > >
> > > --- 888,894 ----
> > >               fFreePtr = 0;
> > >               fFreeBytesRemaining = 0;
> > >           }
> > > !       void *retPtr = (char *)newBlock + sizeOfPointer;
> > >           return retPtr;
> > >       }
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to