xfs
[Top] [All Lists]

[PATCHv2 xfsprogs 13/14] xfs.h: require transparent LFS for all users

To: xfs@xxxxxxxxxxx
Subject: [PATCHv2 xfsprogs 13/14] xfs.h: require transparent LFS for all users
From: Felix Janda <felix.janda@xxxxxxxxx>
Date: Sat, 13 Aug 2016 18:03:16 +0200
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <cover.1471107858.git.felix.janda@xxxxxxxxx>
References: <cover.1471107858.git.felix.janda@xxxxxxxxx>
Resent-date: Sat, 13 Aug 2016 19:25:02 +0200
Resent-from: Felix Janda <felix.janda@xxxxxxxxx>
Resent-message-id: <20160813172502.GK3858@nyan>
Resent-to: xfs@xxxxxxxxxxx
Since our interfaces depend on the consistent use of a 64bit offset
type, force downstreams to use transparent LFS (_FILE_OFFSET_BITS=64),
so that it becomes impossible for them to use 32bit interfaces.

Signed-off-by: Felix Janda <felix.janda@xxxxxxxxx>
---
 include/xfs.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/xfs.h b/include/xfs.h
index 7bed957..0a294f0 100644
--- a/include/xfs.h
+++ b/include/xfs.h
@@ -48,6 +48,11 @@
 #endif
 
 /*
+ * make sure that any user of the xfs headers has a 64bit off_t type
+ */
+extern int xfs_assert_largefile[sizeof(off_t)-8];
+
+/*
  * sparse kernel source annotations
  */
 #ifndef __user
-- 
2.7.3

<Prev in Thread] Current Thread [Next in Thread>