Re: extern already declared

2020-02-14 Thread Ingo Schwarze
Hi, Todd C. Miller wrote on Sun, Feb 09, 2020 at 09:49:35AM -0700: > On Sun, 09 Feb 2020 17:46:51 +0100, Jan Stary wrote: >> Whenever unistd.h declares getopt(3), it also declares >> the extern optind and optarg, so files including unistd.h >> don't need to declare those themselves, right? > Co

Re: extern already declared

2020-02-13 Thread Todd C . Miller
On Thu, 13 Feb 2020 23:53:49 +0100, Jan Stary wrote: > On Feb 09 09:49:35, mill...@openbsd.org wrote: > > On Sun, 09 Feb 2020 17:46:51 +0100, Jan Stary wrote: > > > > > Whenever unistd.h declares getopt(3), it also declares > > > the extern optind and optarg, so files including unistd.h > > > don

Re: extern already declared

2020-02-13 Thread Jan Stary
On Feb 09 17:46:51, h...@stare.cz wrote: > Whenever unistd.h declares getopt(3), it also declares > the extern optind and optarg, so files including unistd.h > don't need to declare those themselves, right? > > Jan > > Index: games/fortune/strfile/strfile.c > ===

Re: extern already declared

2020-02-09 Thread Todd C . Miller
On Sun, 09 Feb 2020 19:05:28 +0100, Jan Stary wrote: > But the externs should be mentioned in the manpage, right? > That's the only place they are mentioned before being talked about > in the text; although I suspect that's why people keep declaring them > in source code - it's what SYNOPSIS said.

Re: extern already declared

2020-02-09 Thread Jan Stary
On Feb 09 09:49:35, mill...@openbsd.org wrote: > On Sun, 09 Feb 2020 17:46:51 +0100, Jan Stary wrote: > > > Whenever unistd.h declares getopt(3), it also declares > > the extern optind and optarg, so files including unistd.h > > don't need to declare those themselves, right? > > Correct. Most of

Re: extern already declared

2020-02-09 Thread Todd C . Miller
On Sun, 09 Feb 2020 17:46:51 +0100, Jan Stary wrote: > Whenever unistd.h declares getopt(3), it also declares > the extern optind and optarg, so files including unistd.h > don't need to declare those themselves, right? Correct. Most of those date back from before optind and optarg were defined f

extern already declared

2020-02-09 Thread Jan Stary
Whenever unistd.h declares getopt(3), it also declares the extern optind and optarg, so files including unistd.h don't need to declare those themselves, right? Jan Index: games/fortune/strfile/strfile.c === RCS file: /cvs/src