Merge pull request #247 from matthiasbeyer/change-to_errno

Change function interfaces and implementations to use errno.h constants
Hotfix: failing ll tests