fix autolib for gcc3+
This commit is contained in:
parent
f8104b3d3d
commit
9b4de09d41
1 changed files with 10 additions and 0 deletions
10
include/u.h
10
include/u.h
|
|
@ -116,6 +116,16 @@ typedef short s16int;
|
||||||
*/
|
*/
|
||||||
#define AUTOLIB(x) static int __p9l_autolib_ ## x = 1;
|
#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)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue