]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - include/xfs.h
xfsprogs: convert to SPDX license tags
[thirdparty/xfsprogs-dev.git] / include / xfs.h
1 // SPDX-License-Identifier: LGPL-2.1
2 /*
3 * Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved.
4 */
5 #ifndef __XFS_H__
6 #define __XFS_H__
7
8 #if defined(__linux__)
9 #include <xfs/linux.h>
10 #elif defined(__FreeBSD__)
11 #include <xfs/freebsd.h>
12 #elif defined(__FreeBSD_kernel__)
13 #include <xfs/gnukfreebsd.h>
14 #elif defined(__APPLE__)
15 #include <xfs/darwin.h>
16 #else
17 # error unknown platform... have fun porting!
18 #endif
19
20 /*
21 * make sure that any user of the xfs headers has a 64bit off_t type
22 */
23 extern int xfs_assert_largefile[sizeof(off_t)-8];
24
25 /*
26 * sparse kernel source annotations
27 */
28 #ifndef __user
29 #define __user
30 #endif
31
32 /*
33 * kernel struct packing shortcut
34 */
35 #ifndef __packed
36 #define __packed __attribute__((packed))
37 #endif
38
39 #ifndef BUILD_BUG_ON
40 #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
41 #endif
42
43 #include <xfs/xfs_types.h>
44 #include <xfs/xfs_fs.h>
45
46 #endif /* __XFS_H__ */