On Sun, Mar 08, 2026 at 07:14:10PM -0300, Gustavo Rios wrote:
> Hi folks!,
> 
> what is the option of choice for openbsd developer :
> 
> int main()

This is no longer valid C. This should be int main(void).

> int main(int argc, char **argv)
> int main(int argc, char **argv, char **envp)
> 
> Which one ?

All three are fine. I would not use int main(void) in real programs
but e.g. configure scripts use that often.
The last one is almost never needed just use getenv(3) if you need to work
with the environment.
 
-- 
:wq Claudio

Reply via email to