features: bump _XOPEN_SOURCE to 600

This enables support for SUS sixth revision.
Also add it where it was missed. This cleanups build under lucid.

TODO: Move feature_test_macros(7) to separate header.
TODO: Switch to -std=gnu99(?)
history: fixed return value handling
it: python: simplified code