git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] Improve portability: Avoid SS constant as it is already defined

From
David Soria Parra <sn_@gmx.net>
Date
Aug 27, 2008, 17:39 UTC
Message-ID
<1219858743-4476-3-git-send-email-sn_@gmx.net>
In-Reply-To
<1219858743-4476-2-git-send-email-sn_@gmx.net>
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.

Signed-off-by: David Soria Parra <dsp@php.net>
---
 ctype.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ctype.c b/ctype.c
index ee06eb7..6ed2ba2 100644
--- a/ctype.c
+++ b/ctype.c
@@ -5,14 +5,14 @@
  */
 #include "cache.h"
 
-#define SS GIT_SPACE
+#define SP GIT_SPACE
 #define AA GIT_ALPHA
 #define DD GIT_DIGIT
 
 unsigned char sane_ctype[256] = {
-	 0,  0,  0,  0,  0,  0,  0,  0,  0, SS, SS,  0,  0, SS,  0,  0,		/* 0-15 */
+	 0,  0,  0,  0,  0,  0,  0,  0,  0, SP, SP,  0,  0, SP,  0,  0,		/* 0-15 */
 	 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,		/* 16-15 */
-	SS,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,		/* 32-15 */
+	SP,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,		/* 32-15 */
 	DD, DD, DD, DD, DD, DD, DD, DD, DD, DD,  0,  0,  0,  0,  0,  0,		/* 48-15 */
 	 0, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA,		/* 64-15 */
 	AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA,  0,  0,  0,  0,  0,		/* 80-15 */
-- 
1.6.0.174.gd789c
Previous: David Soria ParraNext: Junio C Hamano
Message 3 of 9 in “Improve portability for OpenSolaris”
  1. 0/2 Improve portability for OpenSolarisDavid Soria Parra, Aug 27, 2008
  2. 1/2 Improvate portability: Display pid_t's always as longDavid Soria Parra, Aug 27, 2008
  3. 2/2 Improve portability: Avoid SS constant as it is already definedDavid Soria Parra, Aug 27, 2008
  4. Junio C HamanoAug 27, 2008
  5. Junio C HamanoAug 27, 2008
  6. David Soria ParraAug 28, 2008
  7. Junio C HamanoAug 27, 2008
  8. David Soria ParraAug 30, 2008
  9. Junio C HamanoAug 31, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.