Dave Page wrote:

cube seg

patch attached. Compiles, but not tested.

miscutil
Needs review; includes some deprecated stuff (backend_pid)

pg_logger
deprecated; use redirect_stderr (BTW, is it default on win32 now?)

pgcrypto
misses -lws2_32. According to README, it needs some tuning concerning random() before deploying.

Regards,
Andreas
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;

Index: seg.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/contrib/seg/seg.c,v
retrieving revision 1.10
diff -u -r1.10 seg.c
--- seg.c	29 Aug 2004 05:06:38 -0000	1.10
+++ seg.c	8 Sep 2004 17:58:00 -0000
@@ -14,8 +14,12 @@
 
 #include "segdata.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))
 
 /*
@@ -946,7 +950,7 @@
 	if (exp == 0)
 	{
 		/* use the supplied mantyssa with sign */
-		strcpy((char *) index(result, 'e'), "");
+		strcpy((char *) strchr(result, 'e'), "");
 	}
 	else
 	{

Index: segscan.l
===================================================================
RCS file: /projects/cvsroot/pgsql-server/contrib/seg/segscan.l,v
retrieving revision 1.7
diff -u -r1.7 segscan.l
--- segscan.l	24 Feb 2004 22:06:32 -0000	1.7
+++ segscan.l	8 Sep 2004 17:58:20 -0000
@@ -41,7 +41,7 @@
 
 {range}      yylval.text = yytext; return RANGE;
 {plumin}     yylval.text = yytext; return PLUMIN;
-{float}      yylval.text = yytext; return FLOAT;
+{float}      yylval.text = yytext; return SEGFLOAT;
 \<           yylval.text = "<"; return EXTENSION;
 \>           yylval.text = ">"; return EXTENSION;
 \~           yylval.text = "~"; return EXTENSION;

Index: segparse.y
===================================================================
RCS file: /projects/cvsroot/pgsql-server/contrib/seg/segparse.y,v
retrieving revision 1.12
diff -u -r1.12 segparse.y
--- segparse.y	2 Sep 2004 20:53:42 -0000	1.12
+++ segparse.y	8 Sep 2004 17:59:28 -0000
@@ -38,7 +38,7 @@
   } bnd;
   char * text;
 }
-%token <text> FLOAT
+%token <text> SEGFLOAT
 %token <text> RANGE
 %token <text> PLUMIN
 %token <text> EXTENSION
@@ -105,13 +105,13 @@
       ;
 
 boundary:
-          FLOAT {
+          SEGFLOAT {
              $$.ext = '\0';
 	     $$.sigd = significant_digits($1);
              $$.val = seg_atof($1);
 	  }
       | 
-	  EXTENSION FLOAT {
+	  EXTENSION SEGFLOAT {
              $$.ext = $1[0];
 	     $$.sigd = significant_digits($2);
              $$.val = seg_atof($2);
@@ -119,7 +119,7 @@
       ;
 
 deviation:
-          FLOAT {
+          SEGFLOAT {
              $$.ext = '\0';
 	     $$.sigd = significant_digits($1);
              $$.val = seg_atof($1);

***** CVS exited normally with code 1 *****

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to