Skip to content

Commit e259780

Browse files
committed
Enable WIN32 compilation of libpq.
1 parent bf98a46 commit e259780

File tree

7 files changed

+18
-15
lines changed

7 files changed

+18
-15
lines changed

src/backend/utils/mb/common.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
* This file contains some public functions
33
* usable for both the backend and the frontend.
44
* Tatsuo Ishii
5-
* $Id: common.c,v 1.6 1999/07/19 02:27:07 momjian Exp $ */
5+
* $Id: common.c,v 1.7 1999/07/19 06:25:38 momjian Exp $ */
66

77
#include <stdlib.h>
8-
#include <unistd.h>
98
#include <string.h>
109

1110
#ifdef WIN32
1211
#include "win32.h"
12+
#else
13+
#include <unistd.h>
1314
#endif
1415

1516
#include "mb/pg_wchar.h"

src/interfaces/libpq/fe-auth.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.31 1999/07/19 02:27:14 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.32 1999/07/19 06:25:38 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -25,8 +25,6 @@
2525
*
2626
*/
2727

28-
#include <unistd.h>
29-
3028
#include "postgres.h"
3129
#include "libpq-fe.h"
3230
#include "libpq-int.h"
@@ -35,6 +33,7 @@
3533
#ifdef WIN32
3634
#include "win32.h"
3735
#else
36+
#include <unistd.h>
3837
#include <sys/param.h> /* for MAXHOSTNAMELEN on most */
3938
#ifndef MAXHOSTNAMELEN
4039
#include <netdb.h> /* for MAXHOSTNAMELEN on some */

src/interfaces/libpq/fe-connect.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.100 1999/07/19 02:27:15 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.101 1999/07/19 06:25:38 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414

15-
#include <unistd.h>
1615
#include <fcntl.h>
1716
#include <errno.h>
1817
#include <ctype.h>
@@ -25,6 +24,7 @@
2524
#ifdef WIN32
2625
#include "win32.h"
2726
#else
27+
#include <unistd.h>
2828
#include <netdb.h>
2929
#include <netinet/tcp.h>
3030
#endif

src/interfaces/libpq/fe-exec.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.83 1999/07/19 02:27:15 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.84 1999/07/19 06:25:39 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
14-
#include <unistd.h>
1514
#include <errno.h>
1615
#include <ctype.h>
1716

@@ -21,6 +20,8 @@
2120

2221
#ifdef WIN32
2322
#include "win32.h"
23+
#else
24+
#include <unistd.h>
2425
#endif
2526

2627

src/interfaces/libpq/fe-lobj.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.23 1999/07/19 02:45:43 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.24 1999/07/19 06:25:39 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414

15-
#include <unistd.h>
1615
#include <fcntl.h>
1716
#include <sys/stat.h>
1817

@@ -23,6 +22,8 @@
2322
#ifdef WIN32
2423
#include "win32.h"
2524
#include "io.h"
25+
#else
26+
#include <unistd.h>
2627
#endif
2728

2829
#include "libpq/libpq-fs.h" /* must come after sys/stat.h */

src/interfaces/libpq/fe-misc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@
2424
*
2525
*
2626
* IDENTIFICATION
27-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.27 1999/07/19 02:27:15 momjian Exp $
27+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.28 1999/07/19 06:25:40 momjian Exp $
2828
*
2929
*-------------------------------------------------------------------------
3030
*/
3131

32-
#include <unistd.h>
3332
#include <sys/time.h>
3433
#include <errno.h>
3534
#include <signal.h>
@@ -42,6 +41,8 @@
4241

4342
#ifdef WIN32
4443
#include "win32.h"
44+
#else
45+
#include <unistd.h>
4546
#endif
4647

4748
#ifdef HAVE_SYS_SELECT_H

src/interfaces/libpq/fe-print.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@
99
* didn't really belong there.
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.25 1999/07/19 02:27:16 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.26 1999/07/19 06:25:40 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
16-
#include <unistd.h>
1716
#include <signal.h>
1817

1918
#include "postgres.h"
@@ -24,6 +23,7 @@
2423
#ifdef WIN32
2524
#include "win32.h"
2625
#else
26+
#include <unistd.h>
2727
#include <sys/ioctl.h>
2828
#endif
2929

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