aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mount_util.h
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-03-20 10:51:23 +0000
committerMiklos Szeredi <mszeredi@suse.cz>2013-02-20 18:31:48 +0100
commitd8f3ab77d99dc6603b343fdf52b64ac7fec91a21 (patch)
tree6e1705342ad1c63c06aee62c8efb933421853f2a /lib/mount_util.h
parentbf0aae7f7608b447236effb8348e94ec94bf08a7 (diff)
downloadlibfuse-d8f3ab77d99dc6603b343fdf52b64ac7fec91a21.tar.gz
libfuse: don't force -D_FILE_OFFSET_BITS=64 in pkgconfig file.
FUSE_CFLAGS defines -D_FILE_OFFSET_BITS=64. There are three problems with this: (1) A larger program using libfuse might have modules compiled with and without FUSE_CFLAGS, which, if LFS is not enabled and the platform is 32 bit, would result in a fatal mix of 32 and 64 bit off_t. (This would, of course, be a bug, but I think there is a better way to detect this -- see below) (2) Programs may need to be adjusted to support LFS. It's the intention of the LFS standard that the _programmer_ enables LFS once the program has been checked/adjusted. (3) _FILE_OFFSET_BITS does not need to be defined at all on 64 bit Linux. 64 bit off_t is the default there. So I think it's better not to force -D_FILE_OFFSET_BITS=64, and because of (3) I also think you shouldn't test for it. However off_t must still be 64 bits, so how to enforce that? C1X will define static assertions[1], and these can be used to check the size of off_t. Not all compilers support static assertions yet, although several do. Therefore I have surrounded the static assertion with a conservative check that the compiler is GCC >= 4.6. In the long run, this test can be removed and you can just use 'static_assert'.
Diffstat (limited to 'lib/mount_util.h')
0 files changed, 0 insertions, 0 deletions