Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> supposed to be dynamically probed to adapt to different toolchain environments

that's a bygone practice from before compilers were widely capable.



You still can't test for the existence of functions, non-macro constants, typedefs, structure members, or other arbitrary interfaces. Newer compiler introspection facilities like __has_include or __has_builtin generally only help with compiler portability.

musl libc specifically recommends using external feature detection a la autoconf, and is so opinionated about this that it refuses to add any identifying macros, like __GLIBC__.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: