From c1af8775f2de694bd567813af51164e2d978a78d Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Sat, 1 Apr 2017 12:42:41 -0400 Subject: 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. --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index e2587267b7..5e9c79d49e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2017-04-07 Zack Weinberg + * 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. + * posix/getopt.h: Add backup definition of __nonnull for consistency with gnulib. Define __getopt_argv_const to const if not already defined. -- cgit v1.2.3