cygwin requires -ldb explicitly. should be harmless.
PRIO_MAX is not defined in cygwin, why?