Index: cube.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/contrib/cube/cube.c,v
retrieving revision 1.16
diff -u -r1.16 cube.c
--- cube.c	29 Aug 2004 05:06:34 -0000	1.16
+++ cube.c	8 Sep 2004 17:45:32 -0000
@@ -15,8 +15,12 @@
 
 #include "cubedata.h"
 
+#ifndef max
 #define max(a,b)		((a) >	(b) ? (a) : (b))
+#endif
+#ifndef min
 #define min(a,b)		((a) <= (b) ? (a) : (b))
+#endif
 #define abs(a)			((a) <	(0) ? (-a) : (a))
 
 extern int	cube_yyparse();

Index: cubeparse.y
===================================================================
RCS file: /projects/cvsroot/pgsql-server/contrib/cube/cubeparse.y,v
retrieving revision 1.11
diff -u -r1.11 cubeparse.y
--- cubeparse.y	2 Sep 2004 20:53:42 -0000	1.11
+++ cubeparse.y	8 Sep 2004 17:45:43 -0000
@@ -28,7 +28,7 @@
 %}
 
 /* BISON Declarations */
-%token FLOAT O_PAREN C_PAREN O_BRACKET C_BRACKET COMMA
+%token CUBEFLOAT O_PAREN C_PAREN O_BRACKET C_BRACKET COMMA
 %start box
 
 /* Grammar follows */
@@ -128,13 +128,13 @@
       ;
 
 list:
-          FLOAT {
+          CUBEFLOAT {
 			 /* alloc enough space to be sure whole list will fit */
              $$ = palloc(scanbuflen + 1);
 			 strcpy($$, $1);
 	  }
       | 
-	  list COMMA FLOAT {
+	  list COMMA CUBEFLOAT {
              $$ = $1;
 	     strcat($$, ",");
 	     strcat($$, $3);

Index: cubescan.l
===================================================================
RCS file: /projects/cvsroot/pgsql-server/contrib/cube/cubescan.l,v
retrieving revision 1.8
diff -u -r1.8 cubescan.l
--- cubescan.l	24 Feb 2004 22:06:32 -0000	1.8
+++ cubescan.l	8 Sep 2004 17:45:50 -0000
@@ -39,7 +39,7 @@
 
 %%
 
-{float}      yylval = yytext; return FLOAT;
+{float}      yylval = yytext; return CUBEFLOAT;
 \[           yylval = "("; return O_BRACKET;
 \]           yylval = ")"; return C_BRACKET;
 \(           yylval = "("; return O_PAREN;

