Call tzset() in main() so we don't need to check TZ repeatedly.
authormillert <millert@openbsd.org>
Fri, 29 Mar 2024 01:01:00 +0000 (01:01 +0000)
committermillert <millert@openbsd.org>
Fri, 29 Mar 2024 01:01:00 +0000 (01:01 +0000)
commit3d209abb55e9230a388b32a1b331fec756dbebdb
treee000a61fab1496c504a9a706b9bd2d1d36d89c65
parent923a0a4840e4bcbf83afaa0594a2627fa74f95c4
Call tzset() in main() so we don't need to check TZ repeatedly.
This has the greatest impact on makewhatis, which used to make
thousands of calls to issetugid(2) via localtime(3) and strftime(3).
Inspired by a different diff from miod@.  OK miod@
usr.bin/mandoc/main.c