Commit 73ef184d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

localtime_r: fix Annex K usage

parent 45495aa4
......@@ -18,8 +18,10 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#if (__STDC_VERSION__ >= 201112L)
#if defined(__STDC_LIB_EXT1__) && (__STDC_LIB_EXT1__ >= 20112L)
# define __STDC_WANT_LIB_EXT1__ 1
#else
# define __STDC_WANT_LIB_EXT1__ 0
#endif
#ifdef HAVE_CONFIG_H
# include <config.h>
......@@ -32,7 +34,7 @@
* thread-specific storage. */
struct tm *localtime_r (const time_t *timep, struct tm *result)
{
#if (__STDC_VERSION__ >= 201112L)
#if (__STDC_WANT_LIB_EXT1__)
return localtime_s(timep, result);
#elif defined (_WIN32)
return ((errno = localtime_s(result, timep)) == 0) ? result : NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment