Re: [HACKERS] Proposed patch to getaddrinfo.c to support

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: [HACKERS] Proposed patch to getaddrinfo.c to support
Дата
Msg-id 430E4E29.6090705@dunslane.net
обсуждение исходный текст
Ответ на Re: [HACKERS] Proposed patch to getaddrinfo.c to support  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Proposed patch to getaddrinfo.c to support  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] Proposed patch to getaddrinfo.c to support  (Petr Jelinek <pjmodos@seznam.cz>)
Список pgsql-patches

Tom Lane wrote:

>Petr Jelinek <pjmodos@seznam.cz> writes:
>
>
>>Yep those changes proposed in my previous email fixes IPv4 too.
>>
>>
>
>Apparently not on loris (unless there was another patch that I missed).
>Maybe something to do with a different version of Windows?
>
>
>
>

I suspected we'd forgotten something.

The attached small patch appears to be what's required (at least on
loris).  "make check" failed but not for any apparent ipv6 reason. More
importantly, we correctly set HAVE_IPV6 and HAVE_STRUCT_ADDRINFO.

cheers

andrew
Index: src/include/port/win32/sys/socket.h
===================================================================
RCS file: /projects/cvsroot/pgsql/src/include/port/win32/sys/socket.h,v
retrieving revision 1.2
diff -c -r1.2 socket.h
*** src/include/port/win32/sys/socket.h    4 Aug 2003 00:43:32 -0000    1.2
--- src/include/port/win32/sys/socket.h    25 Aug 2005 22:55:39 -0000
***************
*** 5,10 ****
--- 5,11 ----
   *
   * Note: Don't include <wingdi.h> directly.  It causes compile errors.
   */
+ #include <ws2tcpip.h>
  #include <winsock2.h>
  #undef ERROR
  #undef small
***************
*** 13,16 ****
--- 14,24 ----
  #ifdef PGERROR
  #define ERROR PGERROR

+ /*
+  * we can't use the windows gai_strerror{AW} functions because
+  * they are defined inline in the MS header files. So we'll use our
+  * own
+  */
+ #undef gai_strerror
+
  #endif

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: CRC32 function
Следующее
От: "Chuck McDevitt"
Дата:
Сообщение: Re: [HACKERS] Proposed patch to getaddrinfo.c to support