All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: David Soria Parra <sn_@gmx.net>
Cc: git@vger.kernel.org, David Soria Parra <dsp@php.net>
Subject: Re: [PATCH 2/2] Improve portability: Avoid SS constant as it is already defined
Date: Wed, 27 Aug 2008 12:17:12 -0700	[thread overview]
Message-ID: <7vod3ep8sn.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7vwsi2p9qk.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Wed, 27 Aug 2008 11:56:51 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> David Soria Parra <sn_@gmx.net> writes:
>
>> From: David Soria Parra <dsp@php.net>
>>
>> Constants that have the names of CPU registers are already defined
>> in OpenSolaris's sys/regset.h. This causes a warning as we try to
>> (re)define SS in ctype.c. So we just use another name.
>
> I do not mind this _particular_ workaround per-se, but I have to wonder
> what happens the next time some random other platform has "SP" defined in
> a random header file.

If we are doing an workaround, how about doing it this way instead?

 ctype.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git i/ctype.c w/ctype.c
index ee06eb7..d2bd38e 100644
--- i/ctype.c
+++ w/ctype.c
@@ -5,6 +5,11 @@
  */
 #include "cache.h"
 
+/* Just so that no insane platform contaminates the namespace with these symbols */
+#undef SS
+#undef AA
+#undef DD
+
 #define SS GIT_SPACE
 #define AA GIT_ALPHA
 #define DD GIT_DIGIT

  reply	other threads:[~2008-08-27 19:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-27 17:39 [PATCH 0/2] Improve portability for OpenSolaris David Soria Parra
2008-08-27 17:39 ` [PATCH 1/2] Improvate portability: Display pid_t's always as long David Soria Parra
2008-08-27 17:39   ` [PATCH 2/2] Improve portability: Avoid SS constant as it is already defined David Soria Parra
2008-08-27 18:56     ` Junio C Hamano
2008-08-27 19:17       ` Junio C Hamano [this message]
2008-08-28  0:34         ` David Soria Parra
2008-08-27 19:03   ` [PATCH 1/2] Improvate portability: Display pid_t's always as long Junio C Hamano
2008-08-30 20:40     ` David Soria Parra
2008-08-31  7:15       ` Junio C Hamano

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=7vod3ep8sn.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=dsp@php.net \
    --cc=git@vger.kernel.org \
    --cc=sn_@gmx.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.