diff options
author | Ron Yorston <rmy@pobox.com> | 2022-11-24 14:44:52 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2022-11-24 15:01:05 +0000 |
commit | ed2c6fc1eeab6234f26f9e1817bba8a7d9c84063 (patch) | |
tree | 8e39ab8e01a882767fbc9dc0a46cd6007d2cece7 /init | |
parent | 1363e586c5eaf87df062db27f2419cb1b25e291f (diff) | |
download | busybox-w32-ed2c6fc1eeab6234f26f9e1817bba8a7d9c84063.tar.gz busybox-w32-ed2c6fc1eeab6234f26f9e1817bba8a7d9c84063.tar.bz2 busybox-w32-ed2c6fc1eeab6234f26f9e1817bba8a7d9c84063.zip |
getopt: use name supplied with '-n' to report error
On Windows:
$ getopt -o a -n my_script -- -z
getopt: unknown option -- z
On Linux:
$ getopt -o a -n my_script -- -z
my_script: unknown option -- z
The difference arises because the Mingw-w64 implementation of
getopt(3) uses __argv[0] to report errors, not the first element
of the argument array passed to it.
Make __argv[0] point to the name supplied with the '-n' option to
match behaviour when glibc getopt(3) is used.
(GitHub issue #274)
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions