Different behavior of same code in Linux and Windows

Eike Rathke erack at redhat.com
Thu Jun 30 14:21:06 UTC 2016

Hi Laurent,

On Wednesday, 2016-06-29 05:19:43 -0700, Laurent BP wrote:

> On Linux, *sal_uLong nFrac* and *nDev* are modified and tend to a solution.
> My tests on Windows, thanks to Jenkin, show that *nFrac* and *nDev* keep the
> same values (respectively 0 and 1). So there is an infinite loop with this
> *while* when testing fractions in unit tests.

Try to make them sal_uInt64, as sal_uLong typedef'ed to sal_uIntPtr is
platform dependent and on Windows 32-bit is, well, 32-bit. If that still
fails try to make them volatile in case the compiler over-optimizes
things, or use double type.


LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20160630/e73fc944/attachment.sig>

More information about the LibreOffice mailing list