fixed some return codes and made O_ defs same as cc65 std headers