From: Bruce Momjian Date: Tue, 17 Aug 2004 02:44:13 +0000 (+0000) Subject: Move io.h include higher in the file so it doesn't conflict with X-Git-Tag: REL8_0_0BETA2~117 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=26fc9b655bb3678e9a8892ff0e544cd792818b8a;p=postgresql Move io.h include higher in the file so it doesn't conflict with rename/unlink defined later. Problem exists on MS VC. Andrew Francis --- diff --git a/src/interfaces/libpq/fe-lobj.c b/src/interfaces/libpq/fe-lobj.c index e9ef61358a..7281bfff06 100644 --- a/src/interfaces/libpq/fe-lobj.c +++ b/src/interfaces/libpq/fe-lobj.c @@ -8,28 +8,36 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-lobj.c,v 1.48 2004/03/05 01:53:59 tgl Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-lobj.c,v 1.49 2004/08/17 02:44:13 momjian Exp $ * *------------------------------------------------------------------------- */ -#include "postgres_fe.h" -#include -#include -#include +#ifdef WIN32 +/* + * As unlink/rename are #define'd in port.h (via postgres_fe.h), io.h + * must be included first on MS C. Might as well do it for all WIN32's + * here. + */ +#include +#endif + +#include "postgres_fe.h" #ifdef WIN32 #include "win32.h" -#include "io.h" #else #include #endif +#include +#include +#include + #include "libpq-fe.h" #include "libpq-int.h" #include "libpq/libpq-fs.h" /* must come after sys/stat.h */ - #define LO_BUFSIZE 8192 static int lo_initialize(PGconn *conn);