Message ID | 1437904678-19444-2-git-send-email-martin@martin.st |
---|---|
State | Committed |
Commit | c6e0829e3696c894d24c8088c3ee30a9c17534c2 |
Headers | show |
On 26 Jul, Martin Storsjö wrote : > + # found in the SDK headers by default. (Alternatively, we could force > + # _WIN32_WINNT to 0x0602 in that case.) Why don't you force to 0x0603 in those partition cases? Wouldn't that be simpler? With my kindest regards,
On Sun, 26 Jul 2015, Jean-Baptiste Kempf wrote: > On 26 Jul, Martin Storsjö wrote : >> + # found in the SDK headers by default. (Alternatively, we could force >> + # _WIN32_WINNT to 0x0602 in that case.) > > Why don't you force to 0x0603 in those partition cases? > Wouldn't that be simpler? We could do that as well, but I tried to minimize the number of cflags we add (even internally within the build system), so if code in general works without setting _WIN32_WINNT at all (except for the dxva2/d3d11va overriding, as tweaked in 1/10) I'd rather go that way. But I don't have a strong opinion here. // Martin
On Sun, Jul 26, 2015 at 1:05 PM, Martin Storsjö <martin@martin.st> wrote: > On Sun, 26 Jul 2015, Jean-Baptiste Kempf wrote: > >> On 26 Jul, Martin Storsjö wrote : >>> >>> + # found in the SDK headers by default. (Alternatively, we could >>> force >>> + # _WIN32_WINNT to 0x0602 in that case.) >> >> >> Why don't you force to 0x0603 in those partition cases? >> Wouldn't that be simpler? > > > We could do that as well, but I tried to minimize the number of cflags we > add (even internally within the build system), so if code in general works > without setting _WIN32_WINNT at all (except for the dxva2/d3d11va > overriding, as tweaked in 1/10) I'd rather go that way. But I don't have a > strong opinion here. I agree with that, keeping the CFLAG overrides smaller is generally best, so LGTM.
On Sun, Jul 26, 2015 at 12:58 PM, Jean-Baptiste Kempf <jb@videolan.org> wrote: > On 26 Jul, Martin Storsjö wrote : >> + # found in the SDK headers by default. (Alternatively, we could force >> + # _WIN32_WINNT to 0x0602 in that case.) > > Why don't you force to 0x0603 in those partition cases? > Wouldn't that be simpler? In <sdkddkver.h> on the WP8.1 SDK (included at the top of <windows.h>) there is: #if !defined(_WIN32_WINNT) && !defined(_CHICAGO_) #define _WIN32_WINNT 0x0603 #endif I think depending on the SDK you use it sets the minimum version already. So when building for WinRT/WP/W10 that shouldn't be an issue. There's a chance building with clang we may not have such luck. > With my kindest regards, > > -- > Jean-Baptiste Kempf > http://www.jbkempf.com/ - +33 672 704 734 > Sent from my Electronic Device > _______________________________________________ > libav-devel mailing list > libav-devel@libav.org > https://lists.libav.org/mailman/listinfo/libav-devel
On Sun, 26 Jul 2015, Steve Lhomme wrote: > On Sun, Jul 26, 2015 at 12:58 PM, Jean-Baptiste Kempf <jb@videolan.org> wrote: >> On 26 Jul, Martin Storsjö wrote : >>> + # found in the SDK headers by default. (Alternatively, we could force >>> + # _WIN32_WINNT to 0x0602 in that case.) >> >> Why don't you force to 0x0603 in those partition cases? >> Wouldn't that be simpler? > > In <sdkddkver.h> on the WP8.1 SDK (included at the top of <windows.h>) there is: > > #if !defined(_WIN32_WINNT) && !defined(_CHICAGO_) > #define _WIN32_WINNT 0x0603 > #endif > > I think depending on the SDK you use it sets the minimum version > already. So when building for WinRT/WP/W10 that shouldn't be an issue. Ok, so I take this as consensus that this patch is ok. // Martin
diff --git a/configure b/configure index b76f838..9ccd0da 100755 --- a/configure +++ b/configure @@ -3789,8 +3789,19 @@ probe_libc(){ # in such new versions and producing binaries requiring windows 7.0. # Therefore explicitly set the default to XP 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)" || - add_${pfx}cppflags -D_WIN32_WINNT=0x0502 + { check_${pfx}cpp <<EOF && add_${pfx}cppflags -D_WIN32_WINNT=0x0502; } +#ifdef WINAPI_FAMILY +#include <winapifamily.h> +#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +#error not desktop +#endif +#endif +EOF elif check_${pfx}cpp_condition stddef.h "defined __KLIBC__"; then eval ${pfx}libc_type=klibc elif check_${pfx}cpp_condition sys/cdefs.h "defined __BIONIC__"; then