[Ffmpeg-devel] [PATCH] near is a special keyword

Steve Lhomme slhomme
Thu Mar 2 19:13:35 CET 2006

Just for the record. I replaced my changes with the original FFMPEG code 
and it compiles fine in MSVC. But guess what, the problem is in MinGW 
(ie gcc) and not MSVC, because we include the DirectX SDK that is not 
part of the MinGW API.

Just so that you know that the error is not always Microsoft. Even 
though the SDK had to be fixed here and there to work with MinGW. But 
you can't blame Microsoft for not supporting other compilers than 
theirs. Nobody expects them to be that open.

Ivan Kalvachev wrote:
> 2006/3/1, Michael Niedermayer <michaelni at gmx.at>:
>> Hi
>> On Tue, Feb 28, 2006 at 03:42:26PM -1000, Steve Lhomme wrote:
>>> ...on some windows compilers (far vs near pointers). So I renamed items
>>> called "near".
>> #define near smallandstinkingsoft_not_knowing_c_standard
> I'm sorry but this might not work.
> It seems that if the compiler have reserved special keyword it cannot
> be redefined or undef-ed
> Here I tried this small program with gcc
> ---
> #include <stdlib.h>
> #include <stdio.h>
> //#undef for
> #define for foobar
> #undef for
> int main(){
>    int i;
>    for(i=0;i<10;i++)
>        printf("baka!\n");
> }
> ---
> The result, program compiles and runs just fine.
> So if gcc does this I guess other inferiour compilers could do the same.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/ffmpeg-devel

More information about the ffmpeg-devel mailing list