Re: [PATCH 2/2] Improve portability: Avoid SS constant as it is already defined
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 27, 2008, 18:56 UTC
- Message-ID
- <7vwsi2p9qk.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <1219858743-4476-3-git-send-email-sn_@gmx.net>
David Soria Parra <sn_@gmx.net> writes:
Show 5 quoted lines
> 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.
First of all, why are you including <sys/regset.h>? We certainly don't include from any of our header or source files. And second of all, why is the indirect inclusion of that header file by some standard header file we do include cause the namespace to get poluted with "SS" symbol?