Index: src/backend/parser/gram.y =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/parser/gram.y,v retrieving revision 2.581 diff -c -r2.581 gram.y *** src/backend/parser/gram.y 13 Mar 2007 00:33:41 -0000 2.581 --- src/backend/parser/gram.y 17 Mar 2007 13:14:40 -0000 *************** *** 62,67 **** --- 62,71 ---- #include "utils/numeric.h" #include "utils/xml.h" + /* MSVC does not define __STDC__, but Bison 2.1 generates broken code without it */ + #ifdef WIN32_ONLY_COMPILER + #define __STDC__ 1 + #endif /* Location tracking support --- simpler than bison's default */ #define YYLLOC_DEFAULT(Current, Rhs, N) \ Index: src/backend/bootstrap/bootparse.y =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v retrieving revision 1.88 diff -c -r1.88 bootparse.y *** src/backend/bootstrap/bootparse.y 13 Mar 2007 00:33:39 -0000 1.88 --- src/backend/bootstrap/bootparse.y 17 Mar 2007 13:14:56 -0000 *************** *** 51,56 **** --- 51,61 ---- #include "tcop/dest.h" #include "utils/rel.h" + /* MSVC does not define __STDC__, but Bison 2.1 generates broken code without it */ + #ifdef WIN32_ONLY_COMPILER + #define __STDC__ 1 + #endif + #define atooid(x) ((Oid) strtoul((x), NULL, 10)) Index: src/pl/plpgsql/src/gram.y =================================================================== RCS file: /projects/cvsroot/pgsql/src/pl/plpgsql/src/gram.y,v retrieving revision 1.99 diff -c -r1.99 gram.y *** src/pl/plpgsql/src/gram.y 19 Feb 2007 03:18:51 -0000 1.99 --- src/pl/plpgsql/src/gram.y 17 Mar 2007 13:15:11 -0000 *************** *** 18,23 **** --- 18,27 ---- #include "parser/parser.h" + /* MSVC does not define __STDC__, but Bison 2.1 generates broken code without it */ + #ifdef WIN32_ONLY_COMPILER + #define __STDC__ 1 + #endif static PLpgSQL_expr *read_sql_construct(int until, int until2,