On Fri, 29 Aug 2003, Dustin Navea wrote:
: Shouldnt something like this added to the loader work for a runtime check? : (note im not using proper function names or anything, just an example) : : if (running_on_netbsd && version >= first_version_that_supports_MAP_TRYFIXED) : #define can_use_MAP_TRYFIXED
That kind of OS dependency runtime check does not belong in an application that runs on multiple OS's. In every sane application, both "running_on_netbsd" AND "version" are constants, so the test is either always true or always false.
What it comes down to is this: NetBSD doesn't do all the kernel and libc shuffling of Linux. Its version numbers are quite well defined, and it's trivial to state what version was used to compile a binary. So the patch is Just Fine as-is, and needs no further pollution.