fstests: Replace all __[u]intNN_t types with standard [u]intNN_t
[xfstests-dev.git] / src / global.h
index 158c1faca7950d2c3a41e79afb0cd64bc70821c0..9dec9d49dd82dae907b25820b513f41436861817 100644 (file)
@@ -21,9 +21,8 @@
 
 #include <config.h>
 
-#ifdef sgi
-#include <../../irix/include/xfs/platform_defs.h>
-#include <../../xfsprogs/include/irix.h>
+#ifdef HAVE_XFS_XFS_H
+#include <xfs/xfs.h>
 #endif
 
 #ifdef HAVE_XFS_LIBXFS_H
 
 #ifdef STDC_HEADERS
 #include <signal.h>
+#include <stdint.h>
 #endif
 
 #ifdef HAVE_STRINGS_H
 #include <sys/param.h>
 #endif
 
+#ifdef HAVE_LINUX_FALLOC_H
+#include <linux/falloc.h>
+
+#ifndef FALLOC_FL_KEEP_SIZE
+#define FALLOC_FL_KEEP_SIZE            0x01
+#endif
+
+#ifndef FALLOC_FL_PUNCH_HOLE
+#define FALLOC_FL_PUNCH_HOLE           0x02
+#endif
+
+#ifndef FALLOC_FL_NO_HIDE_STALE
+#define FALLOC_FL_NO_HIDE_STALE                0x04
+#endif
+
+#ifndef FALLOC_FL_COLLAPSE_RANGE
+#define FALLOC_FL_COLLAPSE_RANGE       0x08
 #endif
+
+#ifndef FALLOC_FL_ZERO_RANGE
+#define FALLOC_FL_ZERO_RANGE           0x10
+#endif
+
+#ifndef FALLOC_FL_INSERT_RANGE
+#define FALLOC_FL_INSERT_RANGE         0x20
+#endif
+
+#endif /* HAVE_LINUX_FALLOC_H */
+
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif
+
+#endif /* GLOBAL_H */