Compiling libpq with VC6 - Mailing list pgsql-patches

From Andreas Pflug
Subject Compiling libpq with VC6
Date
Msg-id 411D03AF.9010905@pse-consulting.de
Whole thread Raw
Responses Re: Compiling libpq with VC6
List pgsql-patches
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.

pgsql-patches by date:

Previous
From: Martin Münstermann
Date:
Subject: Re: [BUGS] 8.0.0beta1: -lpthread missing
Next
From: Peter Eisentraut
Date:
Subject: Re: Translation updates for 7.4/8.0: postgres-ru