summaryrefslogtreecommitdiff
path: root/system/bsd-compat-headers/sys-cdefs.h
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-01-21 18:52:46 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-01-21 18:52:46 +0000
commitd0c6712454611c372fcd917f32d91eb8de44cb26 (patch)
treee2a5ccbd89a0b810175bda00b99a0d512b716c71 /system/bsd-compat-headers/sys-cdefs.h
parenta78b2f2c6a1712a9a6b3a41cf42ba8203d6182d3 (diff)
downloadpackages-d0c6712454611c372fcd917f32d91eb8de44cb26.tar.gz
packages-d0c6712454611c372fcd917f32d91eb8de44cb26.tar.bz2
packages-d0c6712454611c372fcd917f32d91eb8de44cb26.tar.xz
packages-d0c6712454611c372fcd917f32d91eb8de44cb26.zip
system/libc-dev -> system/bsd-compat-headers
Diffstat (limited to 'system/bsd-compat-headers/sys-cdefs.h')
-rw-r--r--system/bsd-compat-headers/sys-cdefs.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/system/bsd-compat-headers/sys-cdefs.h b/system/bsd-compat-headers/sys-cdefs.h
new file mode 100644
index 000000000..209a623c0
--- /dev/null
+++ b/system/bsd-compat-headers/sys-cdefs.h
@@ -0,0 +1,26 @@
+#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