Skip to content

Commit 58f4028

Browse files
committed
From Jason Tishler <jt@dothill.com>
* doc/FAQ_MSWIN: Update to be consistent with software -- mainly change comment from lack of Cygwin UNIX domain socket support and to list of current Cygwin UNIX domain socket issues. * src/include/config.h.in: Enable UNIX domain sockets for Cygwin. * src/include/port/win.h: Disable UNIX domain sockets for Cygwin b20.1. * src/test/regress/pg_regress.sh: Use UNIX domain sockets for Cygwin instead of TCP/IP.
1 parent d4067b5 commit 58f4028

File tree

4 files changed

+24
-14
lines changed

4 files changed

+24
-14
lines changed

doc/FAQ_MSWIN

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
How do I installing PostgreSQL on Windows NT or Windows 2000?
22
=============================================================
3-
$Date: 2000/10/18 21:14:56 $
3+
$Date: 2001/01/19 23:43:35 $
44

55
1. Install the Cygwin package.
66

77
The Cygwin package provides a UNIX-like API on top of the Win32
88
API. It is available at <http://sources.redhat.com/cygwin/>.
9-
The 1.1.x series is recommended (1.1.4 was the latest at the time
9+
The 1.1.x series is recommended (1.1.7 was the latest at the time
1010
of this writing); using 1.0 or B20 might require extra efforts.
1111
For B20 you also need to download the separate crypt library at the
1212
same location.
1313

1414
2. Install the cygipc package, available at
15-
<http://cygutils.netpedia.net/V1.1/cygipc/>. Do not use versions
16-
prior to 1.04, they will not work.
15+
<http://www.neuro.gatech.edu/users/cwilson/cygutils/V1.1/cygipc/>.
16+
Do not use versions prior to 1.04, they will not work.
1717

1818
3. Optional: The "Andy Piper Tools" at <http://www.xemacs.freeserve.co.uk/>
1919
are a collection of pre-compiled libraries and utilities that you
@@ -29,10 +29,13 @@ $Date: 2000/10/18 21:14:56 $
2929

3030
6. Proceed according to the INSTALL file. (./configure; make; etc.)
3131

32-
NOTE: By default, PostgreSQL clients like psql communicate using Unix
33-
domain sockets, which do not work on Windows. Start the postmaster
34-
with -i, and when connecting to the database from a client, set the
35-
PGHOST environment variable to `localhost' or supply the hostname on
36-
the command line.
32+
NOTE: There are two issues with Cygwin's current UNIX domain socket
33+
support:
34+
35+
1. psql (and other clients) will hang if postmaster is not running and
36+
the socket file (e.g., /tmp/.s.PGSQL.5432) exists.
37+
38+
2. Cygwin's AF_UNIX sockets are really implemented as AF_INET sockets
39+
so they are inherently insecure.
3740

3841
Problem reports can be sent to <pgsql-ports@postgresql.org>.

src/include/config.h.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* or in config.h afterwards. Of course, if you edit config.h, then your
99
* changes will be overwritten the next time you run configure.
1010
*
11-
* $Id: config.h.in,v 1.155 2001/01/09 18:40:15 petere Exp $
11+
* $Id: config.h.in,v 1.156 2001/01/19 23:43:35 petere Exp $
1212
*/
1313

1414
#ifndef CONFIG_H
@@ -228,7 +228,7 @@
228228
/*
229229
* Define this if your operating system supports AF_UNIX family sockets.
230230
*/
231-
#if !defined(__CYGWIN__) && !defined(__QNX__) && !defined(__BEOS__)
231+
#if !defined(__QNX__) && !defined(__BEOS__)
232232
# define HAVE_UNIX_SOCKETS 1
233233
#endif
234234

src/include/port/win.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,10 @@ typedef unsigned char slock_t;
99
#define HAVE_INT_TIMEZONE /* has int _timezone */
1010

1111
#include <cygwin/version.h>
12+
13+
/*
14+
* Check for b20.1 and disable AF_UNIX family socket support.
15+
*/
16+
#if CYGWIN_VERSION_DLL_MAJOR < 1001
17+
# undef HAVE_UNIX_SOCKETS
18+
#endif

src/test/regress/pg_regress.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.17 2001/01/13 03:25:48 petere Exp $
2+
# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.18 2001/01/19 23:43:36 petere Exp $
33

44
me=`basename $0`
55
: ${TMPDIR=/tmp}
@@ -156,11 +156,11 @@ done
156156

157157

158158
# ----------
159-
# When on Windows, QNX or BeOS, don't use Unix sockets.
159+
# When on QNX or BeOS, don't use Unix sockets.
160160
# ----------
161161

162162
case $host_platform in
163-
*-*-cygwin* | *-*-qnx* | *beos*)
163+
*-*-qnx* | *beos*)
164164
unix_sockets=no;;
165165
*)
166166
unix_sockets=yes;;

0 commit comments

Comments
 (0)