Winelib over Solaris/SPARC
efrias at syncad.com
Fri Jan 5 09:19:37 CST 2007
Keyur Pujara wrote:
> I am contemplating to port a complex windows
> application using winelib over Solaris/SPARC. In one
> of the emails in wine-devel list, I saw that there may
> be following issues in the process:
> * byte endianness
> * alignment issues
> * pointer size
> * must not use x86 assembly
> Could someone kindly advise on whether above issues
> *exists* in current version of wine? How do I identify
> and resolve them?
Winelib itself is in pretty good shape on sparc. All of the above
issues are things you will have to deal with in the porting process, but
mostly just in your own code. We ported a large application to winelib
on sparc, and we discovered a few bugs in winelib in the process. Most
of them were endian or alignment errors (usually in resource-related
code), and they've been fixed. If you're porting an application that
has a complex GUI, you'll probably find one or two more of these bugs.
If your GUI is pretty basic, you might be ok.
The rest of the problems are going to be the same whether you used
winelib or not. You've probably got a pretty good feel for how much
byte-level manipulation of binary data goes on in your software. If you
do a lot, you'll surely run into endian and alignment bugs. If you
don't, and you avoid questionable casts as much as possible, you'll
probably be in pretty good shape. In our software, these weren't much
of a problem, and we had a pretty good idea of where they were going to
turn up. Pointer size wasn't an issue since we were porting from 32-bit
windows to 32-bit sparc. We didn't use x86 assembly, but if you do
you'll have to change it. You may also have to deal with differences in
the standard library functions... we ran into a good number of these
problems. I don't remember most of them, but you'll find all sorts of
little differences, like solaris' printf will format floating point
numbers slightly differently than what you're used to on windows... that
sort of thing. I think it's safe to say that we spent much more time
dealing with this type of error than we did chasing bugs in winelib.
We ported to x86 Linux/winelib first, then went on to move to Solaris.
It makes a nice stepping stone, letting you get your makefiles correct,
your code gcc-compatible, and the basic unix porting done on a system
where winelib is well supported. When you move on to Solaris, you'll
have a better idea of what is causing all of the new bugs.
More information about the wine-devel