Re: [PATCH] Building Git on Tru64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Daniel Richard G." <skunk@xxxxxxxxxx> writes:

> On Thu, 2010 Apr 15 21:29+0200, Alex Riesen wrote:
> >
> > That one may be better handled at one place (git-compat-util.h?) with
> > something like:
> >
> >   #ifdef Tru64
> >   #define MAP_FAILED ((void *)MAP_FAILED)
> >   #endif
> 
> I agree with the sentiment, but you can't have a macro refer to itself

It can.  From (cpp.info)

  3.10.5 Self-Referential Macros
  ------------------------------

  A "self-referential" macro is one whose name appears in its definition.
  Recall that all macro definitions are rescanned for more macros to
  replace.  If the self-reference were considered a use of the macro, it
  would produce an infinitely large expansion.  To prevent this, the
  self-reference is not considered a macro call.  It is passed into the
  preprocessor output unchanged.

  [...]

     One common, useful use of self-reference is to create a macro which
  expands to itself.  If you write

       #define EPERM EPERM

-- 
Jakub Narebski
Poland
ShadeHawk on #git
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]