1Be aware that this file is a concatenation of two patches. 2NOTE: the first one is not used anymore, support for MSVC 6.0 has stopped. 3 4It is necessary to patch the evaluator_tab.c file so Microsoft Visual 5C++ 6.0 can grok it. 6 7For some (probably fabulously clever) reason, the MSVC++ compiler 8doesn't set __STDC__ when it's running in "C mode", which will then 9"undefine" the "const" keyword, which again leads to all kinds of 10trouble. 11 12 -- mortene 13 14 15--- old-evaluator_tab.c Wed Jun 28 13:39:43 2000 16+++ evaluator_tab.c Wed Jun 28 13:39:45 2000 17@@ -72,13 +72,6 @@ 18 int so_evallex(void); 19 #include <stdio.h> 20 21-#ifndef __cplusplus 22-#ifndef __STDC__ 23-#define const 24-#endif 25-#endif 26- 27- 28 29 #define YYFINAL 149 30 #define YYFLAG -32768 31 32 33The Sun Forte CC compiler will warn on passing string literals to 34functions with "char *" as argument type. This patch fixes that 35problem. 36 37Index: evaluator_tab.c 38=================================================================== 39RCS file: /export/cvsroot/Coin-2/src/engines/evaluator_tab.c,v 40retrieving revision 1.3 41diff -u -r1.3 evaluator_tab.c 42--- evaluator_tab.c 5 Jun 2003 12:20:57 -0000 1.3 43+++ evaluator_tab.c 13 Jan 2004 14:40:00 -0000 44@@ -68,7 +68,7 @@ 45 static char * get_regname(char reg, int regtype); 46 enum { REGTYPE_IN, REGTYPE_OUT, REGTYPE_TMP }; 47 static so_eval_node *root_node; 48- static int so_evalerror(char *); 49+ static int so_evalerror(const char *); 50 static int so_evallex(void); 51 #include <stdio.h> 52 53@@ -1336,7 +1336,7 @@ 54 * Called by bison parser upon lexical/syntax error. 55 */ 56 int 57-so_evalerror(char *myerr) 58+so_evalerror(const char *myerr) 59 { 60 strncpy(myerrorbuf, myerr, 512); 61 myerrorbuf[511] = 0; /* just in case string was too long */ 62