[tz] Thread-safe localtime(3) (was Re: Reading binary files)

Alan Barrett apb at cequrux.com
Wed Nov 2 20:20:07 UTC 2011


On Wed, 02 Nov 2011, Bennett Todd wrote:
> That sounds all superb, and excellent. The one question I'd ask 
> is, would it be practical and reasonable to lose the _z and _rz 
> suffixes, and make the timezone arg an optional extra arg to 
> localtime/mktine, with varargs?

There's a long history of using "_r" a suffix for "re-entrant" or 
"thread safe" versions of functions.  Using "_z" for functions 
that take an explicit timezone argument is new, but seems to fit 
the established pattern.

varargs functions need a way of knowing whether or not more 
arguments are present.  How would you do that?

--apb (Alan Barrett)



More information about the tz mailing list