From: Erik Faye-Lund <kusmabite@googlemail.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: "Daniel Richard G." <skunk@iskunk.org>,
Alex Riesen <raa.lkml@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH] Building Git on Tru64
Date: Fri, 16 Apr 2010 08:58:00 +0200 [thread overview]
Message-ID: <h2y40aa078e1004152358s66299ef9p55d454902113c7d4@mail.gmail.com> (raw)
In-Reply-To: <m34ojcfly1.fsf@localhost.localdomain>
On Thu, Apr 15, 2010 at 11:24 PM, Jakub Narebski <jnareb@gmail.com> wrote:
> "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
> ------------------------------
>
> <snip> It is passed into the
> preprocessor output unchanged.
>
Not very useful in this case, no?
$ echo "#define MAP_FAILED (-1L)
#define MAP_FAILED ((void *)MAP_FAILED)
void *v = MAP_FAILED" | gcc -x c -
<stdin>:2:1: warning: "MAP_FAILED" redefined
<stdin>:1:1: warning: this is the location of the previous definition
<stdin>:3: error: 'MAP_FAILED' undeclared here (not in a function)
<stdin>:3: error: expected ',' or ';' at end of input
$ echo "#define MAP_FAILED (-1L)
#define MAP_FAILED ((void *)MAP_FAILED)
void *v = MAP_FAILED" | cpp
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "<stdin>"
<stdin>:2:1: warning: "MAP_FAILED" redefined
<stdin>:1:1: warning: this is the location of the previous definition
void *v = ((void *)MAP_FAILED)
$
--
Erik "kusma" Faye-Lund
prev parent reply other threads:[~2010-04-16 6:58 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
2010-04-16 6:58 ` Erik Faye-Lund [this message]
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=h2y40aa078e1004152358s66299ef9p55d454902113c7d4@mail.gmail.com \
--to=kusmabite@googlemail.com \
--cc=git@vger.kernel.org \
--cc=jnareb@gmail.com \
--cc=kusmabite@gmail.com \
--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).