From: Warren Young Date: February 20 2007 12:02pm Subject: Re: Known bug with localtime_s in msvs7.1 List-Archive: http://lists.mysql.com/plusplus/6364 Message-Id: <45DAE36B.6060000@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit Андрей Покровский wrote: > This will fix it (file datetime.cpp:194) Thanks for the patch, but I decided to approach it a different way. Instead of trying to test for all the platforms where localtime_r() is known to _not_ exist, we're now just explicitly testing for it during the autconf stage. We can do this because localtime_r() is only on systems where we use autoconf already. That gives us these three cases: 1. It's VS2005 and we're not using STLport. So, use localtime_s(). 2. We found localtime_r() during the autoconf stage, so use that. 3. None of the above, so fall back to good old localtime().