Well, ascitime is in msvcrt thread-save too ... anyway, from my POOV patch is ok. If there are no objections by others, please apply.
Thanks, Kai 2014-11-12 15:50 GMT+01:00 Martell Malone <[email protected]>: > Added a guard to every function and handle errno values > Used memcpy in gmtime_r as discussed > > This version should address all concerns. > Please commit > > On Wed, Nov 12, 2014 at 2:41 PM, Martell Malone <[email protected]> > wrote: >> >> Arg I changed the old patch with including errno.h >> Can someone delete the previous email from the thread >> Sorry >> >> On Wed, Nov 12, 2014 at 2:38 PM, Martell Malone <[email protected]> >> wrote: >>> >>> Caching stopped me from including <errno.h> >>> >>> On Wed, Nov 12, 2014 at 2:34 PM, Martell Malone <[email protected]> >>> wrote: >>>> >>>> Dongsheng Song >>>> Thank you for your suggested changes. >>>> >>>> I would like to note that my implementation was the exact same as the >>>> Macros apart from the _r in acrtime which I did change but somehow didn't >>>> end up in the attached patch due to caching or something heh >>>> The fact that "these functions destroys the result of the previous >>>> calls" mean that the Macros has a major bug in them. >>>> >>>> Should I also guard ctime_r and gmtime_r from NULL pointer arguments >>>> like this? >>>> >>>> + if (_Time == NULL || _Tm == NULL) >>>> + { >>>> + errno = EINVAL; >>>> + return NULL; >>>> + } >>>> >>>> Ktietz what is your take on the tread safeness of asctime_r >>>> I remember you recently telling me that MSDN was often incorrect >>>> As you implemented winpthreads you may be able to tell us :) >>>> >>>> If anyone needs me to address any more changes I'll be glad to >>>> Please Review for commit >>>> >>> >> > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk > _______________________________________________ > Mingw-w64-public mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
