[vlc-devel] [PATCH 2/2] configure: use WINSTORECOMPAT when building for Windows Store
Steve Lhomme
robux4 at ycbcr.xyz
Tue Mar 19 08:16:37 CET 2019
On 3/18/2019 4:29 PM, Rémi Denis-Courmont wrote:
> Le lundi 18 mars 2019, 16:39:13 EET Steve Lhomme a écrit :
>> We may use some forbidden APIs that are actually usable via
>> WindowsStoreCompat
>>
>> GetACP in the core, for example.
>> ---
>> configure.ac | 10 +++++++---
>> 1 file changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index c878534912..b7b33f23e6 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -339,9 +339,13 @@ AS_IF([test "${SYS}" = "mingw32"],[
>> AS_IF([test "${enable_winstore_app}" = "yes"], [
>> vlc_winstore_app=1
>> LIBCOM=""
>> - VLC_ADD_LIBS([libvlccore], [-lruntimeobject])
>> - AC_LIBOBJ([gai_strerror])
>> - ],[])
>> + AX_APPEND_FLAG([-DWINSTORECOMPAT],[CFLAGS])
>> + AX_APPEND_FLAG([-DWINSTORECOMPAT],[CPPFLAGS])
>> + AX_APPEND_FLAG([-DWINSTORECOMPAT],[CXXFLAGS])
>> + AX_APPEND_FLAG([-lwinstorecompat], [LDFLAGS])
> That looks like it'll define the macro twice. Also, why not AH_something?
If you mean AH_TOP/AH_BOTTOM they are added to config.h. But since it
may not be included in all files or after some includes it's better to
force it on all files we compile as early as possible so to end up using
APIs we shouldn't.
As for the double setting, I think the CPPFLAGS are only used when the
preprocessing is used and shouldn't be used when compiling. In any case,
it won't hurt.
More information about the vlc-devel
mailing list