diff mbox series

[FFmpeg-devel] configure: Include objbase.h when checking for CoTaskMemFree

Message ID 20230819211246.51724-1-martin@martin.st
State Accepted
Commit aea2d269db7419703710afad5027bc696be34ede
Headers show
Series [FFmpeg-devel] configure: Include objbase.h when checking for CoTaskMemFree | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Martin Storsjö Aug. 19, 2023, 9:12 p.m. UTC
ddc1cd5cdd2570bf3d6ab807ee0ecfacdf09431d defined WIN32_LEAN_AND_MEAN
globally, which makes for much fewer transitive includes from
windows.h. With that define, CoTaskMemFree no longer gets
implicitly declared by just including windows.h, but one has to
include the right header objbase.h too.

That commit caused ole32 to no longer get detected, which caused
dxva2 to no longer be enabled. This gets fixed by this patch.

Signed-off-by: Martin Storsjö <martin@martin.st>
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Gyan Doshi Aug. 20, 2023, 7:57 a.m. UTC | #1
On 2023-08-20 02:42 am, Martin Storsjö wrote:
> ddc1cd5cdd2570bf3d6ab807ee0ecfacdf09431d defined WIN32_LEAN_AND_MEAN
> globally, which makes for much fewer transitive includes from
> windows.h. With that define, CoTaskMemFree no longer gets
> implicitly declared by just including windows.h, but one has to
> include the right header objbase.h too.
>
> That commit caused ole32 to no longer get detected, which caused
> dxva2 to no longer be enabled. This gets fixed by this patch.
>
> Signed-off-by: Martin Storsjö <martin@martin.st>
> ---
>   configure | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index ff6a5c3600..04bb9fe9dd 100755
> --- a/configure
> +++ b/configure
> @@ -6488,7 +6488,7 @@ done
>   check_lib advapi32 "windows.h"            RegCloseKey          -ladvapi32
>   check_lib bcrypt   "windows.h bcrypt.h"   BCryptGenRandom      -lbcrypt &&
>       check_cpp_condition bcrypt bcrypt.h "defined BCRYPT_RNG_ALGORITHM"
> -check_lib ole32    "windows.h"            CoTaskMemFree        -lole32
> +check_lib ole32    "windows.h objbase.h"  CoTaskMemFree        -lole32
>   check_lib shell32  "windows.h shellapi.h" CommandLineToArgvW   -lshell32
>   check_lib psapi    "windows.h psapi.h"    GetProcessMemoryInfo -lpsapi
>   

Tested; LGTM.

Regards,
Gyan
Martin Storsjö Aug. 21, 2023, 8:16 p.m. UTC | #2
On Sun, 20 Aug 2023, Gyan Doshi wrote:

>
>
> On 2023-08-20 02:42 am, Martin Storsjö wrote:
>> ddc1cd5cdd2570bf3d6ab807ee0ecfacdf09431d defined WIN32_LEAN_AND_MEAN
>> globally, which makes for much fewer transitive includes from
>> windows.h. With that define, CoTaskMemFree no longer gets
>> implicitly declared by just including windows.h, but one has to
>> include the right header objbase.h too.
>>
>> That commit caused ole32 to no longer get detected, which caused
>> dxva2 to no longer be enabled. This gets fixed by this patch.
>>
>> Signed-off-by: Martin Storsjö <martin@martin.st>
>> ---
>>   configure | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/configure b/configure
>> index ff6a5c3600..04bb9fe9dd 100755
>> --- a/configure
>> +++ b/configure
>> @@ -6488,7 +6488,7 @@ done
>>   check_lib advapi32 "windows.h"            RegCloseKey          -ladvapi32
>>   check_lib bcrypt   "windows.h bcrypt.h"   BCryptGenRandom      -lbcrypt 
> &&
>>       check_cpp_condition bcrypt bcrypt.h "defined BCRYPT_RNG_ALGORITHM"
>> -check_lib ole32    "windows.h"            CoTaskMemFree        -lole32
>> +check_lib ole32    "windows.h objbase.h"  CoTaskMemFree        -lole32
>>   check_lib shell32  "windows.h shellapi.h" CommandLineToArgvW   -lshell32
>>   check_lib psapi    "windows.h psapi.h"    GetProcessMemoryInfo -lpsapi
>> 
>
> Tested; LGTM.

Thanks, pushed now.

// Martin
diff mbox series

Patch

diff --git a/configure b/configure
index ff6a5c3600..04bb9fe9dd 100755
--- a/configure
+++ b/configure
@@ -6488,7 +6488,7 @@  done
 check_lib advapi32 "windows.h"            RegCloseKey          -ladvapi32
 check_lib bcrypt   "windows.h bcrypt.h"   BCryptGenRandom      -lbcrypt &&
     check_cpp_condition bcrypt bcrypt.h "defined BCRYPT_RNG_ALGORITHM"
-check_lib ole32    "windows.h"            CoTaskMemFree        -lole32
+check_lib ole32    "windows.h objbase.h"  CoTaskMemFree        -lole32
 check_lib shell32  "windows.h shellapi.h" CommandLineToArgvW   -lshell32
 check_lib psapi    "windows.h psapi.h"    GetProcessMemoryInfo -lpsapi