summaryrefslogtreecommitdiff
path: root/lib/types.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2015-12-01 09:00:00 -0700
committerJens Axboe <axboe@fb.com>2015-12-01 09:00:00 -0700
commite39c0676d1af779004194ae4b3cc111db49bef7a (patch)
tree4ff723b610d770fb0bf3a92814d8806183f7b6c6 /lib/types.h
parentb9c8a72a5795a58bd6bf060a79393e835db57a95 (diff)
downloadfio-e39c0676d1af779004194ae4b3cc111db49bef7a.tar.gz
fio-e39c0676d1af779004194ae4b3cc111db49bef7a.tar.bz2
Add 'bool' type
Let's cleanup and modernize the code a bit, add a boolean type that we can use for all the 0/1 function returns. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'lib/types.h')
-rw-r--r--lib/types.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/types.h b/lib/types.h
new file mode 100644
index 00000000..287a3b42
--- /dev/null
+++ b/lib/types.h
@@ -0,0 +1,16 @@
+#ifndef FIO_TYPES_H
+#define FIO_TYPES_H
+
+#ifndef CONFIG_HAVE_BOOL
+typedef int bool;
+#ifndef false
+#define false 0
+#endif
+#ifndef true
+#define true 1
+#endif
+#else
+#include <stdbool.h>
+#endif
+
+#endif