[vlc-devel] [PATCH] Support for newest freerdp snapshot
Paweł Stankowski
aambitny at gmail.com
Tue Dec 2 01:34:13 CET 2014
>
>
> Le 29/11/2014 21:33, Paweł Stankowski a écrit :
>> Support for newest freerdp snapshot [part 2]
>>
>> 'freerdp_channels_global_init' and '...uninit' functions were removed
>> in version 1.2 of freerdp, because they had empty definitions.
>> Checking whether FREERDP_VERSION_* macros are defined was wrong as old
>> FreeRDP versions do not define these.
>>
>
>> -#if defined(FREERDP_VERSION_MAJOR) && defined(FREERDP_VERSION_MINOR) && \
>> - !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 &&
>> FREERDP_VERSION_MINOR >= 2))
>> +#if !(FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 &&
>> FREERDP_VERSION_MINOR >= 2))
>> CLRBUF_24BPP |
>> #endif
>
> Wrong according to your description and other fixed lines from the
> patch. If those definitions do not exists in older versions, this will
> break.
>
> Francois
Yeah, that may be tricky. I count on fact that compilers treat undefined
macro as it would be set to 0, which I believe is part of C standard. So
"FREERDP_VERSION_MAJOR > 1 || (FREERDP_VERSION_MAJOR == 1 &&
>> FREERDP_VERSION_MINOR >= 2)" which in turns implies, that
CLRBUF_24BPP will be used when both macros are not defined. This code
will be perfectly fine. Some other parts of the same file use the same
assumption.
BTW: assumption that undefined macro is set to 0 was used in this file
before, wasn't it?
Regards,
Paweł Stankowski
More information about the vlc-devel
mailing list