mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-01 09:01:03 +01:00
For whatever reason, glibc decided that the __attribute__ keyword is the exclusive property of gcc, and redefines it to an empty macro on other compilers. Some non-gcc compilers also support it (possibly partially), tinycc is one of them. By doing this, glibc silently broke all constructors, resulting in code that arrives in main() with uninitialized variables. The solution we use here consists in undefining the macro on non-gcc compilers, and redefining it to itself in order to cause a conflict in the event the redefinition would happen afterwards. This visibly solved the problem.