GNOME Bugzilla – Bug 742957
_NL_ADDRESS_POSTAL_FMT is declared by glibc, not gcc
Last modified: 2015-01-15 13:11:29 UTC
I found this commit https://git.gnome.org/browse/geocode-glib/commit/?id=005075f6a28c18f5196ba60ff07b888776af6dfc. It doesn't work because the constant _NL_ADDRESS_POSTAL_FMT is provided by glibc, but __GNUC__ can only be used to check gcc-compatible compilers. We use clang (which also defines __GNUC__) on FreeBSD, and it still fails because of _NL_ADDRESS_POSTAL_FMT.
Thanks! Do you now what define can be used to check for glibc?
Created attachment 294578 [details] [review] Use __GLIBC__ when checking for GLIBC only feature The __GNUC__ macro is used to checking for gcc compatible compilers. We should instead use __GLIBC__ to check for GLIBC only features. This also adds the guard to the test, since it uses LC_ADDRESS.
Created attachment 294579 [details] [review] Use __GLIBC__ when checking for GLIBC only feature The __GNUC__ macro is used to checking for gcc compatible compilers. We should instead use __GLIBC__ to check for GLIBC only features. This also adds the guard to the test, since it uses LC_ADDRESS.
Attachment 294579 [details] works.
Review of attachment 294579 [details] [review]: Looks good.
Comment on attachment 294579 [details] [review] Use __GLIBC__ when checking for GLIBC only feature Pushed to master