[Expat-discuss] Data misalignment on PocketPC platform

Karl Waclawek karl@waclawek.net
Fri Apr 26 09:29:11 2002


> I have compiled Expat to run on a PocketPC device with an ARM processor
> (with the XML_UNICODE #def).  However certain bits of code can produce a
> Datatype Misalignment exception, for example line 317 of xmltok.c (*to++ =
> *from++;), as I guess the processor can't do that operation if the address
> is not word aligned?
> 
> So my options are:
> 
> 1. To find a version that has this fixed (or fix it myself using the
> __unaligned macro maybe?).
> or
> 2. To not use the XML_UNICODE #def and hope the problem goes away (and do
> the unicode to ascii conversion myself).
> 

Which version are you using?
The XML_UNICODE def does not work in the current release 1.95.2.
A fix has been checked in - you need expat.h rev. >= 1.16, and
xmlparse.c rev. >= 1.29.

Karl