X-Original-To: pgsql-hackers-win32-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 958E552CBF for ; Wed, 17 Aug 2005 18:35:22 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 22416-09 for ; Wed, 17 Aug 2005 21:35:20 +0000 (GMT) Received: from trolak.mydnsbox2.com (ns1.mydnsbox2.com [207.44.142.118]) by svr1.postgresql.org (Postfix) with ESMTP id E3C8552CC5 for ; Wed, 17 Aug 2005 18:35:18 -0300 (ADT) Received: from [192.168.1.103] (cpe-024-211-165-134.nc.res.rr.com [24.211.165.134]) (authenticated (0 bits)) by trolak.mydnsbox2.com (8.11.6/8.11.6) with ESMTP id j7HKov627731 for ; Wed, 17 Aug 2005 15:50:57 -0500 Message-ID: <4303AD95.5010806@dunslane.net> Date: Wed, 17 Aug 2005 17:35:17 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050719 Fedora/1.7.10-1.3.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-hackers-win32 Subject: looking for getaddrinfo Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.153 required=5 tests=[AWL=-0.054, UPPERCASE_25_50=0.207] X-Spam-Level: X-Archive-Number: 200508/34 X-Sequence-Number: 3346 I'm having trouble with a configure test for getaddrinfo on Windows. The relevant part of config.log is as below. Any help would be appreciated. According to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/getaddrinfo_2.asp ws2_32.dll is what I should need, and is what I am using. thanks andrew configure:14625: checking for getaddrinfo configure:14682: gcc -o conftest.exe -O2 -Wall -Wmissing-prototypes -Wpointer-arith -fno-strict-aliasing -I./src/include/port/win32 -DEXEC_BACKEND -Wl,--allow-multiple-definition conftest.c -lz -lws2_32 -lwsock32 -lm >&5 C:/DOCUME~1/pgrunner/LOCALS~1/Temp/ccGQbaaa.o(.text+0x1a):conftest.c: undefined reference to `getaddrinfo' C:/DOCUME~1/pgrunner/LOCALS~1/Temp/ccGQbaaa.o(.data+0x0):conftest.c: undefined reference to `getaddrinfo' configure:14688: $? = 1 configure: failed program was: | /* confdefs.h. */ | | #define PACKAGE_NAME "PostgreSQL" | #define PACKAGE_TARNAME "postgresql" | #define PACKAGE_VERSION "8.1devel" | #define PACKAGE_STRING "PostgreSQL 8.1devel" | #define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org" | #define PG_VERSION "8.1devel" | #define DEF_PGPORT 5432 | #define DEF_PGPORT_STR "5432" | #define PG_VERSION_STR "PostgreSQL 8.1devel on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.2.3 (mingw special 20030504-1)" | #define PG_KRB_SRVNAM "postgres" | #define HAVE_LIBM 1 | #define HAVE_LIBWSOCK32 1 | #define HAVE_LIBWS2_32 1 | #define HAVE_LIBZ 1 | #define HAVE_SPINLOCKS 1 | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_GETOPT_H 1 | #define HAVE_PWD_H 1 | #define HAVE_SYS_SOCKET_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_NETINET_IN_H 1 | #define HAVE_STRINGIZE 1 | #define HAVE_FUNCNAME__FUNC 1 | #define HAVE_STRUCT_SOCKADDR_STORAGE 1 | #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 | #define HAVE_STRUCT_ADDRINFO 1 | #define HAVE_STRUCT_OPTION 1 | #define HAVE_INT_TIMEZONE | #define ACCEPT_TYPE_RETURN unsigned int PASCAL | #define ACCEPT_TYPE_ARG1 unsigned int | #define ACCEPT_TYPE_ARG2 struct sockaddr * | #define ACCEPT_TYPE_ARG3 int | #define HAVE_CBRT 1 | #define HAVE_FCVT 1 | #define HAVE_MEMMOVE 1 | #define HAVE_TOWLOWER 1 | #define HAVE_UTIME 1 | #define HAVE_WCSTOMBS 1 | #define HAVE_DECL_FDATASYNC 0 | #define HAVE_IPV6 1 | #define HAVE_SNPRINTF 1 | #define HAVE_VSNPRINTF 1 | #define HAVE_DECL_SNPRINTF 1 | #define HAVE_DECL_VSNPRINTF 1 | #define HAVE_ISINF 1 | #define HAVE_GETOPT 1 | #define HAVE_RINT 1 | #define HAVE_STRDUP 1 | #define HAVE_STRERROR 1 | #define HAVE_STRTOL 1 | #define HAVE_STRTOUL 1 | /* end confdefs.h. */ | /* Define getaddrinfo to an innocuous variant, in case declares getaddrinfo. | For example, HP-UX 11i declares gettimeofday. */ | #define getaddrinfo innocuous_getaddrinfo | | /* System header to define __stub macros and hopefully few prototypes, | which can conflict with char getaddrinfo (); below. | Prefer to if __STDC__ is defined, since | exists even on freestanding compilers. */ | | #ifdef __STDC__ | # include | #else | # include | #endif | | #undef getaddrinfo | | /* Override any gcc2 internal prototype to avoid an error. */ | #ifdef __cplusplus | extern "C" | { | #endif | /* We use char because int might match the return type of a gcc2 | builtin and then its argument prototype would still apply. */ | char getaddrinfo (); | /* The GNU C library defines this for functions which it implements | to always fail with ENOSYS. Some functions are actually named | something starting with __ and the normal name is an alias. */ | #if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo) | choke me | #else | char (*f) () = getaddrinfo; | #endif | #ifdef __cplusplus | } | #endif | | int | main () | { | return f != getaddrinfo; | ; | return 0; | } configure:14713: result: no