git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Soria Parra <dsoria@gmx.net>
To: Junio C Hamano <gitster@pobox.com>
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: Thu, 28 Aug 2008 02:34:37 +0200	[thread overview]
Message-ID: <48B5F29D.3040306@gmx.net> (raw)
In-Reply-To: <7vod3ep8sn.fsf@gitster.siamese.dyndns.org>

Should be fine as well.

Junio C Hamano wrote:
> 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-28  0:35 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
2008-08-28  0:34         ` David Soria Parra [this message]
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=48B5F29D.3040306@gmx.net \
    --to=dsoria@gmx.net \
    --cc=dsp@php.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).