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 # if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,21)
27 # define NEED_QUOTA_DEFS
29 # ifdef HAVE_QUOTA_SUPPORT
30 # include <linux/quota.h>
35 * asm-x86_64/processor.h on some SLES 9 distros seems to use
36 * kernel-only typedefs. fortunately skipping it altogether is ok
39 #define __ASM_X86_64_PROCESSOR_H
42 #include <linux/string.h>
48 #if defined(__x86_64__) || defined(__ia64__) || defined(__ppc64__) || \
50 typedef struct stat lstat_t;
52 #define HAVE_LOV_USER_MDS_DATA
53 #elif defined(__USE_LARGEFILE64) || defined(__KERNEL__)
54 typedef struct stat64 lstat_t;
55 #define lstat_f lstat64
56 #define HAVE_LOV_USER_MDS_DATA
60 /* x86_64 defines __u64 as "long" in userspace, but "long long" in the kernel */
61 #if defined(__x86_64__) && defined(__KERNEL__)
67 #elif (BITS_PER_LONG == 32 || __WORDSIZE == 32)
73 #elif (BITS_PER_LONG == 64 || __WORDSIZE == 64)
82 #endif /* _LUSTRE_USER_H */