summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2017-12-21 20:23:14 +0100
committerwm4 <nfxjfg@googlemail.com>2017-12-26 02:49:48 +0100
commit9b121dfc32810250938021952aab4172a988cb56 (patch)
tree4ba00da9da3be930ef112c7e802d3ed12744bef8 /configure
parent2aee5a87233277027bb281372f888b5246a58e77 (diff)
w32pthreads: always use Vista+ API, drop XP support
This removes the XP compatibility code, and switches entirely to SWR locks, which are available starting at Windows Vista. This removes CRITICAL_SECTION use, which allows us to add PTHREAD_MUTEX_INITIALIZER, which will be useful later. Windows XP is hereby not a supported build target anymore. It was decided in a project vote that this is OK.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure13
1 files changed, 7 insertions, 6 deletions
diff --git a/configure b/configure
index d3187d71ed..19a0f310cf 100755
--- a/configure
+++ b/configure
@@ -2092,7 +2092,6 @@ TOOLCHAIN_FEATURES="
"
TYPES_LIST="
- CONDITION_VARIABLE_Ptr
kCMVideoCodecType_HEVC
socklen_t
struct_addrinfo
@@ -5159,6 +5158,8 @@ probe_libc(){
add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1
eval test \$${pfx_no_}cc_type = "gcc" &&
add_${pfx}cppflags -D__printf__=__gnu_printf__
+ check_${pfx}cpp_condition windows.h "!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600" &&
+ add_${pfx}cppflags -D_WIN32_WINNT=0x0600
elif check_${pfx}cpp_condition _mingw.h "defined __MINGW_VERSION" ||
check_${pfx}cpp_condition _mingw.h "defined __MINGW32_VERSION"; then
eval ${pfx}libc_type=mingw32
@@ -5168,8 +5169,8 @@ probe_libc(){
add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1
check_${pfx}cpp_condition _mingw.h "__MSVCRT_VERSION__ < 0x0700" &&
add_${pfx}cppflags -D__MSVCRT_VERSION__=0x0700
- check_${pfx}cpp_condition windows.h "defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0502" &&
- add_${pfx}cppflags -D_WIN32_WINNT=0x0502
+ check_${pfx}cpp_condition windows.h "!defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600" &&
+ add_${pfx}cppflags -D_WIN32_WINNT=0x0600
eval test \$${pfx_no_}cc_type = "gcc" &&
add_${pfx}cppflags -D__printf__=__gnu_printf__
elif check_${pfx}cpp_condition crtversion.h "defined _VC_CRT_MAJOR_VERSION"; then
@@ -5189,14 +5190,14 @@ probe_libc(){
# 0x601 by default unless something else is set by the user.
# This can easily lead to us detecting functions only present
# in such new versions and producing binaries requiring windows 7.0.
- # Therefore explicitly set the default to XP unless the user has
+ # Therefore explicitly set the default to Vista unless the user has
# set something else on the command line.
# Don't do this if WINAPI_FAMILY is set and is set to a non-desktop
# family. For these cases, configure is free to use any functions
# found in the SDK headers by default. (Alternatively, we could force
# _WIN32_WINNT to 0x0602 in that case.)
check_${pfx}cpp_condition stdlib.h "defined(_WIN32_WINNT)" ||
- { check_${pfx}cpp <<EOF && add_${pfx}cppflags -D_WIN32_WINNT=0x0502; }
+ { check_${pfx}cpp <<EOF && add_${pfx}cppflags -D_WIN32_WINNT=0x0600; }
#ifdef WINAPI_FAMILY
#include <winapifamily.h>
#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
@@ -5674,7 +5675,6 @@ check_func_headers windows.h SetConsoleTextAttribute
check_func_headers windows.h SetConsoleCtrlHandler
check_func_headers windows.h Sleep
check_func_headers windows.h VirtualAlloc
-check_struct windows.h "CONDITION_VARIABLE" Ptr
check_func_headers glob.h glob
enabled xlib &&
check_func_headers "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext
@@ -5758,6 +5758,7 @@ check_cpp_condition windows.h "!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP
if ! disabled w32threads && ! enabled pthreads; then
check_func_headers "windows.h process.h" _beginthreadex &&
+ check_type "windows.h" CONDITION_VARIABLE &&
enable w32threads || disable w32threads
if ! enabled w32threads && enabled winrt; then
check_func_headers "windows.h" CreateThread &&