1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * This file is part of Lustre, http://www.lustre.org
6 * Lustre public user-space interface definitions.
9 #ifndef _LINUX_LUSTRE_USER_H
10 #define _LINUX_LUSTRE_USER_H
12 #ifdef HAVE_ASM_TYPES_H
13 #include <asm/types.h>
15 #include <lustre/types.h>
20 # define NEED_QUOTA_DEFS
21 # ifdef HAVE_QUOTA_SUPPORT
22 # include <sys/quota.h>
25 # include <linux/version.h>
26 # ifdef HAVE_QUOTA_SUPPORT
27 # include <linux/quota.h>
32 * asm-x86_64/processor.h on some SLES 9 distros seems to use
33 * kernel-only typedefs. fortunately skipping it altogether is ok
36 #define __ASM_X86_64_PROCESSOR_H
39 #include <linux/string.h>
45 #if defined(__x86_64__) || defined(__ia64__) || defined(__ppc64__) || \
46 defined(__craynv) || defined (__mips64__)
47 typedef struct stat lstat_t;
49 #define HAVE_LOV_USER_MDS_DATA
50 #elif defined(__USE_LARGEFILE64) || defined(__KERNEL__)
51 typedef struct stat64 lstat_t;
52 #define lstat_f lstat64
53 #define HAVE_LOV_USER_MDS_DATA
57 /* this is a bit chunky */
58 #if defined(__KERNEL__)
59 #define _LWORDSIZE BITS_PER_LONG
61 #define _LWORDSIZE __WORDSIZE
63 /* x86_64 defines __u64 as "long" in userspace, but "long long" in the kernel */
64 #if (defined(__x86_64__) && (defined(__KERNEL__) || defined(CRAY_XT3)))
70 #elif (_LWORDSIZE == 32)
76 #elif (_LWORDSIZE == 64)
88 #endif /* _LUSTRE_USER_H */