Windows + IP6 progress

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Windows + IP6 progress
Date: 2005-08-18 22:16:48
Message-ID: 430508D0.1010309@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I have just managed to get pg server and client (cvs tip) talking IPv6
on Windows. :-)

1. Building
- added in library in configure.in:
AC_CHECK_LIB(ws2_32, main)
- faked out getaddrinfo test in resulting configure and force answer
to "yes"
- added these lines to src/include/port/win32/sys/socket.h:
#include <ws2tcpip.h>
#define gai_strerrorA(err) "undetermined getaddrinfo error"

After installation and initdb, I edited postgresql.conf to set
listen_addresses to '127.0.0.1, ::1' just to make sure what we were getting.

2. Running without IPv6 driver installed.
The build works, although it complains about IPv6 addresses. But I
could run it with IPv4 addresses quite happily - the IPv6 addresses just
fail, but they don't stop us running.

3. Running with IPv6 driver installed
Now the build does not complain about IPv6 addresses (either in
pg_hba.conf or postgresql.conf)
And this command works: psql -h ::1 -l

So the remaining questions are:
. what do we do about the getaddrinfo test? I'm almost inclined not to
do it on windows, and assume that if we have ws2_32.dll we have it.
. what to do about the gai_strerror mess (import our own but leave out
our own getaddrinfo?)
. make sure that this doesn't break less modern Windows platforms than
mine (XP Pro SP1). How ubiquitous is ws2_32.dll?

I have asked a few people to test this build. I don't want to publish
its location openly, but if anyone wants to help they can drop me an
email. Alternatively, some kind person could provide a site on a nice
fat pipe for an 18Mb download.

cheers

andrew

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2005-08-18 22:25:56 Re: Found: some pretty ugly VACUUM bugs
Previous Message Djoerd Hiemstra 2005-08-18 21:41:50 Re: SQL/XML extension