Commit 4e2ed408 authored by Anton Mitrofanov's avatar Anton Mitrofanov
Browse files

configure: Check for strtok_r compiler support

parent d1eebb29
......@@ -72,11 +72,11 @@ int x264_vsnprintf( char *s, size_t n, const char *fmt, va_list arg );
#define isfinite finite
#endif
#ifdef _WIN32
#ifndef strtok_r
#if !HAVE_STRTOK_R && !defined(strtok_r)
#define strtok_r(str,delim,save) strtok(str,delim)
#endif
#ifdef _WIN32
#define utf8_to_utf16( utf8, utf16 )\
MultiByteToWideChar( CP_UTF8, MB_ERR_INVALID_CHARS, utf8, -1, utf16, sizeof(utf16)/sizeof(wchar_t) )
FILE *x264_fopen( const char *filename, const char *mode );
......
......@@ -377,7 +377,7 @@ NL="
# list of all preprocessor HAVE values we can define
CONFIG_HAVE="MALLOC_H ALTIVEC ALTIVEC_H MMX ARMV6 ARMV6T2 NEON BEOSTHREAD POSIXTHREAD WIN32THREAD THREAD LOG2F SWSCALE \
LAVF FFMS GPAC AVS GPL VECTOREXT INTERLACED CPU_COUNT OPENCL THP LSMASH X86_INLINE_ASM AS_FUNC INTEL_DISPATCHER \
MSA MMAP WINRT VSX ARM_INLINE_ASM"
MSA MMAP WINRT VSX ARM_INLINE_ASM STRTOK_R"
# parse options
......@@ -1044,6 +1044,10 @@ if cc_check "math.h" "-Werror" "return log2f(2);" ; then
define HAVE_LOG2F
fi
if cc_check 'string.h' '' 'strtok_r(0, 0, 0);' ; then
define HAVE_STRTOK_R
fi
if [ "$SYS" != "WINDOWS" ] && cpp_check "sys/mman.h unistd.h" "" "defined(MAP_PRIVATE)"; then
define HAVE_MMAP
fi
......
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