posix: improve portability of constant definitions.
posix: improve portability of constant definitions.

Rather than try to catalog what compiler/OS releases supply what
constant symbols in their headers with a rats nest of `#if __BSD`
etc, wrap all of the contentious preprocessor defines in matching
`#ifdefs` so that they are only provided by luaposix in the
environments that define them.  This should provide much better
future portability to new compiler/OS combinations.
* lposix.c (lua_open_posix_c): Simplify the declarations by using
a consistent MENTRY definition.
Except for extremely well-known groups of symbols, and groups
that are already inside _POSIX_VERSION >= 200112L guards, wrap
each constant declaration in a matching `#ifdef`.

Signed-off-by: Gary V. Vaughan <f9023000f29773649f3850298becb9544b5fd6a9@gnu.org>

jimmyharris/luaposix,ardje/luaposix,rrthomas/luaposix,zevv/luaposix,snegovick/luaposix,ardje/luaposix,snegovick/luaposix,zevv/luaposix,luaposix/luaposix,rrthomas/luaposix,jimmyharris/luaposix