summaryrefslogtreecommitdiff
path: root/oslib
diff options
context:
space:
mode:
authorKefu Chai <tchaikov@gmail.com>2018-07-25 22:02:09 +0800
committerKefu Chai <tchaikov@gmail.com>2018-07-25 22:02:14 +0800
commit3376ecf43b2bdd3952c6291d8b469bdf49d3a273 (patch)
tree17598a53bd296e3e55427c1dcae5f96697f1396a /oslib
parent540e235dcd276e63c57ca4bd35f70a0651e2d00e (diff)
replace typeof with __typeof__
so we are able to extend fio with C++ . Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Diffstat (limited to 'oslib')
-rw-r--r--oslib/libmtd_common.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/oslib/libmtd_common.h b/oslib/libmtd_common.h
index 87f93b6..4ed9f0b 100644
--- a/oslib/libmtd_common.h
+++ b/oslib/libmtd_common.h
@@ -49,18 +49,18 @@ extern "C" {
#define min(a, b) MIN(a, b) /* glue for linux kernel source */
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
-#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1)
+#define ALIGN(x,a) __ALIGN_MASK(x,(__typeof__(x))(a)-1)
#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
#define min_t(t,x,y) ({ \
- typeof((x)) _x = (x); \
- typeof((y)) _y = (y); \
+ __typeof__((x)) _x = (x); \
+ __typeof__((y)) _y = (y); \
(_x < _y) ? _x : _y; \
})
#define max_t(t,x,y) ({ \
- typeof((x)) _x = (x); \
- typeof((y)) _y = (y); \
+ __typeof__((x)) _x = (x); \
+ __typeof__((y)) _y = (y); \
(_x > _y) ? _x : _y; \
})