This particular implementation is a wrapper around getopt_long(3). That interface unfortunatly does not provide enough information to give the best error messages with malformed input. If the implementation changes there is a good chance that the binary interface will remain the same.