mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
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;
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
|
Loading…
Reference in a new issue