summaryrefslogtreecommitdiff
path: root/repo/musl-legacy-compat/cdefs.h
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-06-06 21:25:48 +0000
committerdavidovski <david@davidovski.xyz>2022-06-06 21:25:48 +0000
commitccc722b7ed330198d82a3cf28ead76d6d107a70a (patch)
tree7611b3cc4f3ca681524fa28b174a0253eb802e0e /repo/musl-legacy-compat/cdefs.h
parent9ee32689f0b57b9e1de6d22c84ce8e3700b6122b (diff)
added java
Diffstat (limited to 'repo/musl-legacy-compat/cdefs.h')
-rw-r--r--repo/musl-legacy-compat/cdefs.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/repo/musl-legacy-compat/cdefs.h b/repo/musl-legacy-compat/cdefs.h
new file mode 100644
index 0000000..841a5da
--- /dev/null
+++ b/repo/musl-legacy-compat/cdefs.h
@@ -0,0 +1,34 @@
+#ifndef _SYS_CDEFS_H_
+#define _SYS_CDEFS_H_
+
+#warning usage of non-standard #include <sys/cdefs.h> is deprecated
+
+#undef __P
+#undef __PMT
+
+#define __P(args) args
+#define __PMT(args) args
+
+#define __CONCAT(x,y) x ## y
+#define __STRING(x) #x
+
+#ifdef __cplusplus
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+#else
+# define __BEGIN_DECLS
+# define __END_DECLS
+#endif
+
+#if defined(__GNUC__) && !defined(__cplusplus)
+# define __THROW __attribute__ ((__nothrow__))
+# define __NTH(fct) __attribute__ ((__nothrow__)) fct
+#else
+# define __THROW
+# define __NTH(fct) fct
+#endif
+
+#define __CONCAT(x,y) x ## y
+#define __STRING(x) #x
+
+#endif /* _SYS_CDEFS_H_ */