From: Jakub Narebski Date: Thu, 15 Apr 2010 21:24:58 GMT Subject: Re: [PATCH] Building Git on Tru64 Message-ID: In-Reply-To: <1271360809.25304.1370186353@webmail.messagingengine.com> "Daniel Richard G." 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