Import patches from pkgsrc

* Adjust paths to modern conventions.
* Avoid opening /dev/console.
* Consistently provide lowercase and MixedCase options.
* Don't abuse an int as a pointer (optarg).
* Fix compilation errors on NetBSD and DragonFly BSD.
* Fix documentation.
* Import headers and remove redundant declarations.

Signed-off-by: Masanori Ogino <mogino@acm.org>
This commit is contained in:
Masanori Ogino 2023-11-27 10:29:45 +09:00
commit 381c676eda
26 changed files with 143 additions and 98 deletions

View file

@ -215,9 +215,11 @@ char **argv;
(void) setlocale(LC_CTYPE, "ja_JP.EUC");
#endif
opening();
#ifndef __NetBSD__
if (setuid(geteuid())) {
fprintf(stderr, "error at setuid.\r\n"); exit(1);
}
#endif
parse_arg(argc, argv);
read_runcmd();