Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix two compatibility issues with our getopt_long_only() vs. the GNU version: | millert | 2002-12-06 | 1 | -28/+61 |
| | | | | | | | | | | | | | | o Check for long options even when not at the beginning of an option. For instance, if -a is a short option w/o an arg and -static is a boolean long option then -astatic is valid for getopt_long_only(). o If a potential long argument does not match longopts and the first character is not a short option, print a warning and skip the rest of the argument. Also clean up some trailing whitespace and change return value of parse_long_options() from -2 to -1 when unmatched and in long_only mode. With these fixes the binutils ld seems happy with our getopt_long_only() | ||||
* | Correctly handle -Wlong_arg (no space between -W and long_arg) when "W;" | millert | 2002-12-05 | 1 | -6/+8 |
| | | | | is in optstring. | ||||
* | Reorganize this so that getopt_only_only() works correctly. | millert | 2002-12-05 | 1 | -221/+208 |
| | | | | | | | | In order for getopt_only_only() to work we need to check for long options before short ones. I have merged getopt_internal and getopt_long_internal into a single function with the actual long args parsing broken out into a separate function. This also simplifies the flow of control. | ||||
* | Whoops, add missing #ifdef REPLACE_GETOPT | millert | 2002-12-03 | 1 | -2/+4 |
| | |||||
* | GNU-like getopt_long() from NetBSD with changes by me to support | millert | 2002-12-03 | 1 | -0/+510 |
getopt_long_only(). At some point this should replace the BSD getopt(3) but we are not there yet. While I am here add protection from the multiple getopt() definitions due to conflicting standards. |