diff options
author | Zack Weinberg <zackw@panix.com> | 2017-04-01 12:42:41 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2017-04-07 07:50:31 -0400 |
commit | c1af8775f2de694bd567813af51164e2d978a78d (patch) | |
tree | fb0696a62187bc79ad4ed5f3186c9d65389ad79a /posix/getopt_int.h | |
parent | 7a7be6c9a2a89ac5783d4f27d67b0fae3218228f (diff) | |
download | glibc-c1af8775f2de694bd567813af51164e2d978a78d.zip glibc-c1af8775f2de694bd567813af51164e2d978a78d.tar.gz glibc-c1af8775f2de694bd567813af51164e2d978a78d.tar.bz2 |
getopt: tidy up _getopt_initialize a bit
_getopt_data.__posixly_correct is completely redundant to
_getopt_data.__ordering, and some work that logically belongs in
_getopt_initialize was being done by _getopt_internal_r, making the
code harder to understand.
As a side effect, getenv will no longer be called if the first
character of the options string is '+' or '-', which is probably a
Good Thing. (Perhaps we should have a flag character that
specifically asks for the permutation behavior?)
* posix/getopt_int.h (_getopt_data): Remove __posixly_correct field.
* posix/getopt.c (_getopt_internal_r): Move some initialization code...
(_getopt_initialize): ...here. Don't set d->__posixly_correct.
Diffstat (limited to 'posix/getopt_int.h')
-rw-r--r-- | posix/getopt_int.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/posix/getopt_int.h b/posix/getopt_int.h index 762679a..6a02954 100644 --- a/posix/getopt_int.h +++ b/posix/getopt_int.h @@ -83,10 +83,6 @@ struct _getopt_data /* See __ord above. */ enum __ord __ordering; - /* True if behaving strictly as specified by POSIX. */ - int __posixly_correct; - - /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have |