[x264-devel] [VC6 patch for x264]
Eric Viscito
eric at ev-consulting.com
Wed Jul 30 17:05:18 CEST 2008
On Wed, July 30, 2008 1:36 am, Loren Merritt wrote:
> On Tue, 29 Jul 2008, Guillaume Poirier wrote:
>
>> Here's in attachment a patch that contains only the relevant changes.
>
>> +# define INT64_MAX 9223372036854775807
>
> hex
>
>> - if (delta > 32767ll || delta < -32768ll)
>> + if (delta > INT64_C(32767) || delta < INT64_C(-32768))
>
> The better fix is to remove the ll suffix. C integer promotion is
> well-defined, and constants need not be int64 just because they're
> compared to a int64.
>
>> +#ifndef _MSC_VER
>> #define ERROR(...)\
>> {\
>> if( verbose )\
>> x264_log( h, X264_LOG_WARNING, __VA_ARGS__ );\
>> ret = 1;\
>> }
>> +#else
>> +#define ERROR() {}
>> +#pragma warning(disable:4002) /* disable warning "too many actual
>> parameters for macro" */
>> +#endif
>
> If msvc really doesn't support vararg macros, then that's the last straw.
> The patch is rejected entirely, msvc can go screw itself, and I'll delete
> the project file.
I just ran into this problem with MSVC myself. Only editions 2005 and
later support variadic macros. It's not MSVC per se, just older versions.
Eric Viscito
More information about the x264-devel
mailing list