On Mon, Jan 3, 2011 at 10:36 PM, Kohei Yoshida <kyoshida@novell.com> wrote:
On Mon, 2011-01-03 at 21:47 +0100, Soeren Moeller wrote:
Hi
I have removed dependencies on tools/solar.h in some files in sc
(according to http://wiki.documentfoundation.org/Easy_Hacks#write_tools.2F_pieces_out
) please review and commit.
Thanks, pushed!
BTW, we generally prefer the standard bool over sal_Bool, so I replaced
sal_Bool with bool in your patch. The only place we need to use
sal_Bool is when dealing with the UNO API. Other than that, the
standard boolean type is preferred.
Also, it's a bit weird to use sal_uIntPtr which isn't used much in our
code base. So I replaced that with sal_uInt32.
Kohei,
I have not read the related code, but in principle uintptr_t and
int32_t are not interchangeable.
int32_t is 32 bit long, uintptr_t is supposed to be the same size
than void* (that is 32 or 64 bits)
in our sources,
ULONG is typedef'ed as sal_uIntPrt (in tools/solar.h) , which is wrong (*)
but that explain why Soeren used sal_uIntPtr.
(*) it is wrong because there are multiple model of 64 bits support.
Notoriously, Microsoft, as usual, instead of fixing their 64 bits
support bugs, have, once again, turn their bugs into a standard and
use the so-called LLP64 model, in which sizeof(long) != sizeof(void*)
Note that ULONG is defined at multiple place, most of them as unsigned
long (which conflict with the main definition of ULONG = sal_uIntPtr).
Which raise the following question: has anyone successfully built
LibreOffice for Win64 ?
Note:
C99 has been a standard for quite a while now. why are we not using
the standardized type for these. that is:
int8_t uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t,
uint64_t, intptr_t, uintptr_t,...
see http://en.wikipedia.org/wiki/Stdint.h
Yes, I know, Microsoft still do not have a compiler compliant with the
C-standard published 10 years ago... but that can be worked around
with a compat.h header to hide Microsoft's screw-ups, without
'uglyfying' the rest of the code.
Kohei
--
Kohei Yoshida, LibreOffice hacker, Calc
<kyoshida@novell.com>
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.