summaryrefslogtreecommitdiff
path: root/include/dirent.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2015-01-11 16:32:47 -0500
committerRich Felker <dalias@aerifal.cx>2015-01-11 16:32:47 -0500
commit699d4532f6a8f792271c7f46608e2505ca3afc21 (patch)
treed22470164091885b9987df432e6c6527b07837cc /include/dirent.h
parentc574321d75f035ff6d2c18dfb7e3f70db60ba7bd (diff)
downloadmusl-699d4532f6a8f792271c7f46608e2505ca3afc21.tar.gz
fix regression in getopt_long support for non-option arguments
commit b72cd07f176b876aa51864d93aa8101477b1d732 added support for a this feature in getopt, but it was later broken in the case where getopt_long is used as a side effect of the changes made in commit 91184c4f16b143107fa9935edebe5d2b20bd70d8, which prevented the underlying getopt call from seeing the leading '-' or '+' character in optstring. this commit changes the logic in the getopt_long core to check for a leading colon, possibly after the leading '-' or '+', without depending on the latter having been skipped by the caller. a minor incorrectness in the return value for one error condition in getopt_long is also fixed when opterr has been set to zero but optstring has no leading ':'.
Diffstat (limited to 'include/dirent.h')
0 files changed, 0 insertions, 0 deletions