diff options
| author | Zack Weinberg <zackw@panix.com> | 2017-04-01 16:19:50 -0400 |
|---|---|---|
| committer | Zack Weinberg <zackw@panix.com> | 2017-04-07 07:51:28 -0400 |
| commit | dfbea09f96ce9e7a56f88c47d1593f07dc55c53c (patch) | |
| tree | bbe379b210cf4bdcaceaf77ba80e046635ed81a3 /ChangeLog | |
| parent | c1af8775f2de694bd567813af51164e2d978a78d (diff) | |
| download | glibc-dfbea09f96ce9e7a56f88c47d1593f07dc55c53c.tar.xz glibc-dfbea09f96ce9e7a56f88c47d1593f07dc55c53c.zip | |
getopt: refactor long-option handling
There were two copies of the bulk of the code to handle long options.
Now there is only one. (Yes, this is in aid of merging from gnulib.)
The change to bug-getopt4.c clarifies the error messages when the test
fails.
* posix/getopt.c (process_long_option): New function split out
from _getopt_internal_r.
(_getopt_internal_r): Replace both copies of the long-option
processing code with calls to process_long_option.
* posix/bug-getopt4.c (one_test): Print argv[0] in error messages.
(do_test): Differentiate argv[0] in the two subtests.
Diffstat (limited to 'ChangeLog')
| -rw-r--r-- | ChangeLog | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1,5 +1,12 @@ 2017-04-07 Zack Weinberg <zackw@panix.com> + * posix/getopt.c (process_long_option): New function split out + from _getopt_internal_r. + (_getopt_internal_r): Replace both copies of the long-option + processing code with calls to process_long_option. + * posix/bug-getopt4.c (one_test): Print argv[0] in error messages. + (do_test): Differentiate argv[0] in the two subtests. + * 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. |
