On 7/25/08, Hiroshi Saito <[EMAIL PROTECTED]> wrote: > I tackled with hope temporarily. It seems that some adjustment is still > required. > http://winpg.jp/~saito/pg_work/plproxy/ > However, windows user desires to use. Of course, it is also me. > Regards, > Hiroshi Saito
Thanks, I applied the patch to CVS, with minor changes: - Use HAVE_SYS_SELECT_H instead of WIN32 for <sys/select.h> - Do SHLIB_LINK += instead of separate var. Could you please test the attached patch or CVS HEAD, whether everything works fine now? Btw, do not worry about regtest failure in plproxy_many, this is due to differences in system random() function. The test should rewritten, although I have not yet decided how... -- marko
Index: Makefile =================================================================== RCS file: /cvsroot/plproxy/plproxy/Makefile,v retrieving revision 1.25 retrieving revision 1.27 diff -p -u -r1.25 -r1.27 --- Makefile 21 Jul 2008 14:06:18 -0000 1.25 +++ Makefile 28 Jul 2008 12:39:42 -0000 1.27 @@ -19,6 +19,10 @@ EXTRA_CLEAN = src/scanner.[ch] src/parse PG_CPPFLAGS = -I$(PQINC) SHLIB_LINK = -L$(PQLIB) -lpq +ifeq ($(PORTNAME), win32) +SHLIB_LINK += -lws2_32 -lpgport +endif + TARNAME = plproxy-$(PLPROXY_VERSION) DIST_DIRS = src sql expected config doc debian DIST_FILES = Makefile src/plproxy.h src/rowstamp.h src/scanner.l src/parser.y \ Index: src/parser.y =================================================================== RCS file: /cvsroot/plproxy/plproxy/src/parser.y,v retrieving revision 1.11 retrieving revision 1.12 diff -p -u -r1.11 -r1.12 --- src/parser.y 27 Jun 2008 09:20:01 -0000 1.11 +++ src/parser.y 28 Jul 2008 12:14:51 -0000 1.12 @@ -57,7 +57,7 @@ static void reset_parser_vars(void) %name-prefix="plproxy_yy" %token <str> CONNECT CLUSTER RUN ON ALL ANY SELECT -%token <str> IDENT CONST NUMBER FNCALL STRING +%token <str> IDENT NUMBER FNCALL STRING %token <str> SQLIDENT SQLPART %union Index: src/poll_compat.c =================================================================== RCS file: /cvsroot/plproxy/plproxy/src/poll_compat.c,v retrieving revision 1.2 retrieving revision 1.3 diff -p -u -r1.2 -r1.3 --- src/poll_compat.c 14 May 2008 12:46:27 -0000 1.2 +++ src/poll_compat.c 28 Jul 2008 12:30:04 -0000 1.3 @@ -10,7 +10,10 @@ */ #include <sys/time.h> + +#ifdef HAVE_SYS_SELECT_H #include <sys/select.h> +#endif /* * dynamic buffer for fd_set to avoid depending on FD_SETSIZE Index: src/scanner.l =================================================================== RCS file: /cvsroot/plproxy/plproxy/src/scanner.l,v retrieving revision 1.8 retrieving revision 1.10 diff -p -u -r1.8 -r1.10 --- src/scanner.l 27 Jun 2008 08:38:28 -0000 1.8 +++ src/scanner.l 28 Jul 2008 12:30:04 -0000 1.10 @@ -25,6 +25,13 @@ /* for standard_conforming_strings */ #include <parser/gramparse.h> +#ifndef WIN32 +#include <parser/gramparse.h> +#else +__attribute__((dllimport)) extern bool standard_conforming_strings; +#endif + + /* shut down crappy flex warnings */ int yyget_lineno(void); int yyget_leng(void); @@ -107,7 +114,7 @@ int plproxy_yyget_lineno(void) /* disable stdio related code */ #define YY_INPUT(buf, res, maxlen) { res = 0; } -/* shortcut for returning CONST */ +/* shortcut for returning SQLPART */ #define RETPART do { yylval.str = yytext; return SQLPART; } while (0) /* dollar quoting helpers */
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers