https://bugzilla.mindrot.org/show_bug.cgi?id=1448

Darren Tucker <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #4 from Darren Tucker <[email protected]> ---
whatever it is, it doesn't seem to be gnu-getopt specific.  or if it
is, it's not enabled with the default set of defines.

#include <stdio.h>
#include <unistd.h>

int main(int argc, char **argv)
{
    int ch;
    while ((ch = getopt(argc, argv, "abc:")) != -1) {
        printf("opt %c optarg %s\n", ch, optarg ? optarg : "(null)");
    }
}

gives me:
$ ./a.out --foo      
./a.out: invalid option -- '-'
opt ? optarg (null)
./a.out: invalid option -- 'f'
opt ? optarg (null)
./a.out: invalid option -- 'o'
opt ? optarg (null)
./a.out: invalid option -- 'o'
opt ? optarg (null)

whatever it is, I think it's in our compat library:
$ nm scp | grep -i getop
08051710 T BSDgetopt

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
_______________________________________________
openssh-bugs mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-bugs

Reply via email to