git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Daniel Richard G." <skunk@iSKUNK.ORG>
Cc: "Alex Riesen" <raa.lkml@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] Building Git on Tru64
Date: Thu, 15 Apr 2010 14:24:58 -0700 (PDT)	[thread overview]
Message-ID: <m34ojcfly1.fsf@localhost.localdomain> (raw)
In-Reply-To: <1271360809.25304.1370186353@webmail.messagingengine.com>

"Daniel Richard G." <skunk@iSKUNK.ORG> 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

  parent reply	other threads:[~2010-04-15 21:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-15 19:09 [PATCH] Building Git on Tru64 Daniel Richard G.
2010-04-15 19:29 ` Alex Riesen
2010-04-15 19:46   ` Daniel Richard G.
2010-04-15 20:04     ` Nicolas Pitre
2010-04-15 20:21       ` Daniel Richard G.
2010-04-15 21:24     ` Jakub Narebski [this message]
2010-04-16  6:58       ` Erik Faye-Lund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m34ojcfly1.fsf@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=raa.lkml@gmail.com \
    --cc=skunk@iSKUNK.ORG \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).