Skip to content

Commit 26fc9b6

Browse files
committed
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
1 parent 6a5718b commit 26fc9b6

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

src/interfaces/libpq/fe-lobj.c

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,36 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-lobj.c,v 1.48 2004/03/05 01:53:59 tgl Exp $
11+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-lobj.c,v 1.49 2004/08/17 02:44:13 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
15-
#include "postgres_fe.h"
1615

17-
#include <fcntl.h>
18-
#include <sys/stat.h>
19-
#include <errno.h>
16+
#ifdef WIN32
17+
/*
18+
* As unlink/rename are #define'd in port.h (via postgres_fe.h), io.h
19+
* must be included first on MS C. Might as well do it for all WIN32's
20+
* here.
21+
*/
22+
#include <io.h>
23+
#endif
24+
25+
#include "postgres_fe.h"
2026

2127
#ifdef WIN32
2228
#include "win32.h"
23-
#include "io.h"
2429
#else
2530
#include <unistd.h>
2631
#endif
2732

33+
#include <fcntl.h>
34+
#include <sys/stat.h>
35+
#include <errno.h>
36+
2837
#include "libpq-fe.h"
2938
#include "libpq-int.h"
3039
#include "libpq/libpq-fs.h" /* must come after sys/stat.h */
3140

32-
3341
#define LO_BUFSIZE 8192
3442

3543
static int lo_initialize(PGconn *conn);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy