fix autolib for gcc3+

This commit is contained in:
rsc 2005-01-06 23:06:03 +00:00
parent f8104b3d3d
commit 9b4de09d41

View file

@ -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