]> granicus.if.org Git - libvpx/commitdiff
Fixed compilation on mingw with secure APIs enabled by default.
authorJacek Caban <cjacek@gmail.com>
Thu, 13 Feb 2014 11:19:30 +0000 (12:19 +0100)
committerJohann <johannkoenig@google.com>
Sat, 15 Feb 2014 04:13:56 +0000 (20:13 -0800)
If MINGW_HAS_SECURE_API is defined, we don't need to declare strtok_s, but we still need strtok_r define.

Change-Id: I7cf781bb58f991a2bdce6a2ccf5082f6924579a3

vpx/src/svc_encodeframe.c

index 4f5ba6f20cd258ff22606089ddb28dbabd99346e..adce47637522825305b72d46f95b7f11a5baff9c 100644 (file)
 #include "vpx/vp8cx.h"
 #include "vpx/vpx_encoder.h"
 
-#if defined(__MINGW32__) && !defined(MINGW_HAS_SECURE_API)
+#ifdef __MINGW32__
 #define strtok_r strtok_s
+#ifndef MINGW_HAS_SECURE_API
 // proto from /usr/x86_64-w64-mingw32/include/sec_api/string_s.h
 _CRTIMP char *__cdecl strtok_s(char *str, const char *delim, char **context);
-#endif
+#endif  /* MINGW_HAS_SECURE_API */
+#endif  /* __MINGW32__ */
 
 #ifdef _MSC_VER
 #define strdup _strdup