[vlc-commits] localtime_r: fix Annex K usage
Rémi Denis-Courmont
git at videolan.org
Fri Jun 26 17:02:25 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jun 26 18:00:24 2015 +0300| [73ef184d3e4a7316023610ee13397ccbdb41dda7] | committer: Rémi Denis-Courmont
localtime_r: fix Annex K usage
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=73ef184d3e4a7316023610ee13397ccbdb41dda7
---
compat/localtime_r.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/compat/localtime_r.c b/compat/localtime_r.c
index 67da422..cc20265 100644
--- a/compat/localtime_r.c
+++ b/compat/localtime_r.c
@@ -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;
More information about the vlc-commits
mailing list