Re: [PATCH] Building Git on Tru64
flat view
From: Jakub Narebski <hidden>
Date: 2016-06-15 22:48:39
"Daniel Richard G." [off-list ref] writes:
On Thu, 2010 Apr 15 21:29+0200, Alex Riesen wrote:quoted
That one may be better handled at one place (git-compat-util.h?) with something like: #ifdef Tru64 #define MAP_FAILED ((void *)MAP_FAILED) #endifI 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