* @{
*/
-#include <libcfs/types.h>
+#include <linux/types.h>
#ifdef __KERNEL__
# include <linux/quota.h>
# include <linux/version.h>
#else /* !__KERNEL__ */
# define NEED_QUOTA_DEFS
+# include <limits.h>
+# include <stdbool.h>
# include <stdio.h> /* snprintf() */
# include <string.h>
# include <sys/quota.h>
};
};
-#define DOSTID LPX64":"LPU64
-#define POSTID(oi) ostid_seq(oi), ostid_id(oi)
+#define DOSTID "%#llx:%llu"
+#define POSTID(oi) ((unsigned long long)ostid_seq(oi)), \
+ ((unsigned long long)ostid_id(oi))
struct ll_futimes_3 {
__u64 lfu_atime_sec;
e.g. printf("file FID is "DFID"\n", PFID(fid)); */
#define FID_NOBRACE_LEN 40
#define FID_LEN (FID_NOBRACE_LEN + 2)
-#define DFID_NOBRACE LPX64":0x%x:0x%x"
+#define DFID_NOBRACE "%#llx:0x%x:0x%x"
#define DFID "["DFID_NOBRACE"]"
-#define PFID(fid) \
- (fid)->f_seq, \
- (fid)->f_oid, \
+#define PFID(fid) \
+ (unsigned long long)(fid)->f_seq, \
+ (fid)->f_oid, \
(fid)->f_ver
-/* scanf input parse format -- strip '[' first.
- e.g. sscanf(fidstr, SFID, RFID(&fid)); */
-/* #define SFID "0x"LPX64i":0x"LPSZX":0x"LPSZX""
-liblustreapi.c:2893: warning: format '%lx' expects type 'long unsigned int *', but argument 4 has type 'unsigned int *'
-liblustreapi.c:2893: warning: format '%lx' expects type 'long unsigned int *', but argument 5 has type 'unsigned int *'
-*/
-#define SFID "0x"LPX64i":0x%x:0x%x"
+#define SFID "0x%llx:0x%x:0x%x"
#define RFID(fid) \
&((fid)->f_seq), \
&((fid)->f_oid), \