From kde-core-devel Fri Jun 23 09:51:09 2006 From: Allan Sandfeld Jensen Date: Fri, 23 Jun 2006 09:51:09 +0000 To: kde-core-devel Subject: Re: 0 or 0L for empty pointers? Message-Id: <200606231151.10094.kde () carewolf ! com> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=115105654616270 On Wednesday 21 June 2006 10:59, Thiago Macieira wrote: > David Faure wrote: > >On Tuesday 20 June 2006 23:15, Michael Buesch wrote: > >> On Tuesday 20 June 2006 20:02, Friedrich W. H. Kossebau wrote: > >> > IIRC it was something with sizeof(long)==sizeof(void*) not always > >> > true. Any experts? > >> > >> sizeof(long)==sizeof(void*) is an assumption in the linux kernel, at > >> least. So it is true for all archs which are supported by linux. > >> I don't know if there are archs supported by KDE for which this is not > >> true, though. > > > >I was told that this assumption doesn't hold on Windows-64bit. > > No, it doesn't. > > All 32-bit machines I know use the ILP32 concept (ints, longs and pointers > are 32 bits). All 64-bit Unixes I know are LP64. > > But Windows 64-bit isn't. It's P64: longs are still 32-bit. Worst of all: > Microsoft brags about it :-) Yes. But this is compiler dependent. All sensible compilers on Windows still treat long as sizeof(void*) or can be configured to do it. I doubt KDE could be compiled by MSVC anyway. `Allan