libpq currently doesn't compile with vc6. The reason is a conflict of prototypes for rename and unlink, which happens when fe-lobj.c includes io.h.

The attached patch will redefine unlink and rename only if FRONTEND is not defined.

Regards,
Andreas

Index: port.h
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/include/port.h,v
retrieving revision 1.52
diff -u -r1.52 port.h
--- port.h	12 Aug 2004 18:32:43 -0000	1.52
+++ port.h	13 Aug 2004 15:58:19 -0000
@@ -141,7 +141,7 @@
 
 extern int pclose_check(FILE *stream);
 
-#if defined(WIN32) || defined(__CYGWIN__)
+#if (defined(WIN32) || defined(__CYGWIN__)) && !defined(FRONTEND)
 /*
  *	Win32 doesn't have reliable rename/unlink during concurrent access,
  *	and we need special code to do symlinks.
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to