[PATCH] No extern declarations of optarg & co if getopt.h is available

Damien Miller djm at mindrot.org
Thu Sep 11 12:27:22 EST 2003


Corinna Vinschen wrote:

> This could be easily circumvented by either not declaring the variables
> at all in these main() funcs, or by surrounding the declarations with
> 
>   #ifndef HAVE_GETOPT_H
>       extern char *optarg;
>       ...
>   #endif

We would also need to test whether GETOPT_H declared the variables we 
want. E.g. an AC_TRY_COMPILE test in configure, then

#ifndef GETOPT_H_DECL
...

-d




More information about the openssh-unix-dev mailing list