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

Måns Rullgård mru
Wed Mar 1 20:19:44 CET 2006

Steve Lhomme <slhomme at divxcorp.com> writes:

> M?ns Rullg?rd wrote:
>> Steve Lhomme <steve.lhomme at free.fr> writes:
>>> Michael Niedermayer wrote:
>>>> 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
>>> This is exactly like renaming onenear to
>>> smallandstinkingsoft_not_knowing_c_standard. Which I already do.
>> No it's not.
> Yes it is.

No, one involves changing our code, the other changes yours.  You are
the one using broken compilers, so it is up to you to deal with the
problems they cause.

>>> I just thought you might want the fix.
>> The fix should go where the bug is, i.e. in the compiler.  If they
>> needed a new keyword they should have used __near.
> Too bad, that keyword existed before Linux was even started.

It has nothing to do with Linux, and has everything to do with the C
programming language.  Quoting ISO/IEC 9899:1999 (aka C99):

  6.4.1 Keywords
       keyword: one of
             auto      enum     restrict unsigned
             break     extern   return   void
             case      float    short    volatile
             char      for      signed   while
             const     goto     sizeof   _Bool
             continue  if       static   _Complex
             default   inline   struct   _Imaginary
             do        int      switch
             double    long     typedef
             else      register union

I do not see "near" anywhere in that list.  Neither is it defined as
part of the standard library.

M?ns Rullg?rd
mru at inprovide.com

More information about the ffmpeg-devel mailing list