Jeff Trawick wrote: I disagree. Encouraging the use of platform tests instead of feature tests is a very bad idea. Certainly, APR needs platform tests internally, but it should not expose platform knowledge directly to the user. Instead, the differences should be hidden in feature-test macros and constants; in this case, there should be a symbol for the (default) shared library name suffix.
Imagine the mess if all APR users started to use APR_PLATFORM_IS_HPUX to decide the .so vs. .sl thing... this is exactly what APR is meant to avoid.
Is APR a babysitter?
I would encourage people to use an APR define instead of
__hpux __hpux__ __linux__ _AIX SOLARIS2 __MVS__ WIN32 __whatevertheheck
in the rare places where such a check is useful. Lowest-common-denominator code doesn't need such a check. Some other code does. If people use it elsewhere that's their problem, and they were going to make the platform check anyway. At least it might be more consistent and easier to locate in their code.