This reverts 72dc626b and replace glibc specific macros with compiler's pre-defined macros.
mentioned in commit cab22cae
mentioned in commit b9a223ca
mentioned in commit 1733a1fb