1
mirror of https://code.videolan.org/videolan/vlc synced 2024-09-28 23:09:59 +02:00

localtime_r: fix Annex K usage

This commit is contained in:
Rémi Denis-Courmont 2015-06-26 18:00:24 +03:00
parent 45495aa458
commit 73ef184d3e

View File

@ -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;