summaryrefslogtreecommitdiff
path: root/include/sys/cdefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sys/cdefs.h')
-rw-r--r--include/sys/cdefs.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h
index bbb12fb2..50fe0c19 100644
--- a/include/sys/cdefs.h
+++ b/include/sys/cdefs.h
@@ -20,11 +20,32 @@
#define __malloc __attribute__((__malloc__))
#define __pure __attribute__((__pure__))
#define __nodiscard __attribute__((__warn_unused_result__))
-#define __weak __attribute__((__weak__))
-#define __naked __attribute__((__naked__))
-#define __const __attribute__((__const__))
+#undef __weak
+#define __weak __attribute__((__weak__))
+#define __naked __attribute__((__naked__))
+#define __const __attribute__((__const__))
#define __predict_true(exp) __builtin_expect((exp) != 0, 1)
#define __predict_false(exp) __builtin_expect((exp) != 0, 0)
+#define __INT128_TYPE__ __int128
+#define __UINT128_TYPE__ unsigned __INT128_TYPE__
+
+typedef __INT8_TYPE__ i8;
+typedef __INT16_TYPE__ i16;
+typedef __INT32_TYPE__ i32;
+typedef __INT64_TYPE__ i64;
+typedef __INT128_TYPE__ i128;
+
+typedef __UINT8_TYPE__ u8;
+typedef __UINT16_TYPE__ u16;
+typedef __UINT32_TYPE__ u32;
+typedef __UINT64_TYPE__ u64;
+typedef __UINT128_TYPE__ u128;
+
+typedef _Float16 f16;
+typedef float f32;
+typedef double f64;
+typedef __float128 f128;
+
#endif