kio trash and 64bit

Marco Martin notmart at gmail.com
Wed Apr 30 16:05:34 UTC 2014


On Wednesday 30 April 2014, Harald Sitter wrote:
> alohas,
> 
> today I noticed that kio-extras fails to build on Kubuntu 14.04 32bit
> with the following lovely error:
> 
> /build/buildd/project-neon5-kio-extras-0.0+git20140430.0800+neon4~4ab0de2~1
> 4.04/trash/trashimpl.cpp:225:57: error: size of array
> 'off_t_should_be_64bit' is negative
> 
> which comes from this peculiar line
> 
> char off_t_should_be_64bit[sizeof(off_t) >= 8 ? 1:-1];
> (void)off_t_should_be_64bit;

yeah, very strange line, digging in git history, seems to have been added by 
Dirk Mueller back in 2008
revision 75b415a48b7601d4fad6d7ddc6603385fae4fcb2
of kde-runtime

I'm fine removing it, if it can be replaced by a cmake test

> this line should not:
> - exist (as this is something one can very neatly test with cmake, at
> configuration time, with an isolated test file, while not making the
> entire build fail half way through)
> and in particular:
> - produce random build failure
> - check a posix defined type that may be anywhere between 8bit and a
> godzillion bit wide and then complain that it is not above the
> arbitrary threshold it thinks the type should have
> 
> random google search says this function may want to use the GCC
> extension off64_t btw
> 
> HS


-- 
Marco Martin


More information about the Plasma-devel mailing list