[gdi] bug reading/writing metafiles on sparc

Phil Krylov phil at newstar.rinet.ru
Thu Apr 13 13:39:57 CDT 2006

On Thu, 13 Apr 2006 11:58:02 -0400
Eric Frias <efrias at syncad.com> wrote:

> Due to little-endian/big-endian differences, winelib on Sparc can't read 
> windows metafiles generated on a PC (or on Wine on x86), and conversely 
> PCs can't read metafiles created on a Sparc.  It looks like there are a 
> few ways this could be fixed, and I wanted to make sure we don't go 
> about it the wrong way (and that nobody else is working on it).
> I think the right thing to do is make the on-disk and in-memory formats 
> always be little-endian.  We would only convert the data to big-endian 
> format when it is generated or used.  GetMetaFileBitsEx and 
> SetMetaFileBitsEx would return & take the raw data in little-endian format.

I have submitted a patch that fixes creation of on-disk _enhanced_ metafiles
a few days ago:


It byteswaps EMF records just for writing to disk. Adding
byteswapping for reading from disk seems very easy - just feed the file
content to the same byteswapper functions. I think it is a bit more clean
than your approach.

-- Ph.

More information about the wine-devel mailing list