tfix autolib for gcc3+ - plan9port - [fork] Plan 9 from user space
HTML git clone git://src.adamsgaard.dk/plan9port
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 9b4de09d413c43059afcd75ceba4d2adcdc0a0a8
DIR parent f8104b3d3df082856fe6f94af3c0665b81f86127
HTML Author: rsc <devnull@localhost>
Date: Thu, 6 Jan 2005 23:06:03 +0000
fix autolib for gcc3+
Diffstat:
M include/u.h | 10 ++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)
---
DIR diff --git a/include/u.h b/include/u.h
t@@ -116,6 +116,16 @@ typedef short s16int;
*/
#define AUTOLIB(x) static int __p9l_autolib_ ## x = 1;
+/*
+ * Gcc 3 is too smart for its own good.
+ */
+#if defined(__GNUC__)
+# if __GNUC__ >= 3
+# undef AUTOLIB
+# define AUTOLIB(x) int __p9l_autolib_ ## x __attribute__ ((weak));
+# endif
+#endif
+
#if defined(__cplusplus)
}
#endif