pg.ddx.io  pgsql-hackers-win32@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-hackers-win32 <pgsql-hackers-win32@postgresql.org>
Subject: looking for getaddrinfo
Date: Wed, 17 Aug 2005 17:35:17 -0400
Message-ID: <4303AD95.5010806@dunslane.net> (raw)


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 <limits.h> 
declares getaddrinfo.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define getaddrinfo innocuous_getaddrinfo
|
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char getaddrinfo (); below.
|     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
|     <limits.h> exists even on freestanding compilers.  */
|
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #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




Message-ID: <4303AD95.5010806@dunslane.net>
Permalink:  ../4303AD95.5010806@dunslane.net/
Also on:    postgresql.org/message-id/4303AD95.5010806@dunslane.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers-win32@postgresql.org
  Cc: andrew@dunslane.net
  Subject: Re: looking for getaddrinfo
  In-Reply-To: <4303AD95.5010806@dunslane.net>
  References: <4303AD95.5010806@dunslane.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox