summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/include/sys/cdefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/dietlibc/include/sys/cdefs.h')
-rw-r--r--mdk-stage1/dietlibc/include/sys/cdefs.h35
1 files changed, 30 insertions, 5 deletions
diff --git a/mdk-stage1/dietlibc/include/sys/cdefs.h b/mdk-stage1/dietlibc/include/sys/cdefs.h
index 895bb74b8..4ccb0ed2f 100644
--- a/mdk-stage1/dietlibc/include/sys/cdefs.h
+++ b/mdk-stage1/dietlibc/include/sys/cdefs.h
@@ -1,10 +1,13 @@
#ifndef _SYS_CDEFS_H
#define _SYS_CDEFS_H
-#define __dietlibc__
+/* Suppress kernel-name space pollution unless user expressedly asks
+ for it. */
+#ifndef _LOOSE_KERNEL_NAMES
+# define __KERNEL_STRICT_NAMES
+#endif
#ifndef __cplusplus
-#define throw ()
#define __THROW
#define __BEGIN_DECLS
#define __END_DECLS
@@ -16,21 +19,43 @@
#ifndef __GNUC__
#define __attribute__(xyz)
+#define __extension__
#endif
-#define __pure__
-#ifdef __GNUC__
#if (__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 96))
-#undef __pure__
#define __pure__ __attribute__ ((__pure__))
+#else
+#define __pure__
#endif
#if (__GNUC__ == 2) && (__GNUC_MINOR__ < 95)
#define __restrict__
#endif
+#ifndef __STRICT_ANSI__
+#if __GNUC__ < 3
+#define __builtin_expect(foo,bar) (foo)
+#define expect(foo,bar) (foo)
+#else
+#define expect(foo,bar) __builtin_expect(foo,bar)
+#define __attribute_malloc__ __attribute__((malloc))
+#endif
+#endif
+
+#ifndef __attribute_malloc__
+#define __attribute_malloc__
#endif
#define __P(x) x
+#define __ptr_t void*
+
+#ifdef __STRICT_ANSI__
+#define inline
+#endif
+
+#ifndef __i386__
+#define regparm(x)
+#endif
+
#endif