[PATCH 1/2] msvcrt: sizeof(long double) is 12 with MS, but not necessarily so on UNIX.

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Mon Feb 14 06:33:49 CST 2011


Hi,

this fixes bug #25273.  More specifically, using test.winehq's winetest.exe does
not make Mac OS crash in msvcrt/misc.ok I10_OUTPUT anymore, which
proves that Wine on Mac OS X now implements the expected ABI.

The second patch changes the tests such that
make test succeeds again on Mac OS X.

It is on purpose that I've not merged the fix in msvcrt with the
update to the tests, so that testing each patch is trivial.

The memcpy(xm,y,10) was what I was recommended to do by the author
of libffcall. Supposedly for speed issues, FP sticks to 80 bits on PCs even
though larger mantissas (and exponents) are concievable
(and do exist elsewhere).

Hence, although 10 bytes are enough to hold a long double, C alignment and
padding rules (e.g. sizeof must be multiple of alignof) (and history?)
impose using a larger structure, wasting space.

Regards,
 Jörg Höhle

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-msvcrt-sizeof-long-double-is-12-with-MS-but-not-nece.patch
Type: application/octet-stream
Size: 3413 bytes
Desc: 0001-msvcrt-sizeof-long-double-is-12-with-MS-but-not-nece.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20110214/e4398bae/attachment-0001.obj>


More information about the wine-patches mailing list