Re: Is there a way to build PostgreSQL client libraries with MinGW - Mailing list pgsql-hackers

From Xiaobo Gu
Subject Re: Is there a way to build PostgreSQL client libraries with MinGW
Date
Msg-id AANLkTimhrzt5EcK7-s_CnaQA0xVHWcXn+m-MEikK6Pom@mail.gmail.com
Whole thread Raw
In response to Is there a way to build PostgreSQL client libraries with MinGW  ("XiaoboGu" <guxiaobo1982@gmail.com>)
Responses Re: Is there a way to build PostgreSQL client libraries with MinGW  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Thu, Jan 27, 2011 at 10:44 PM, Xiaobo Gu <guxiaobo1982@gmail.com> wrote:
> On Thu, Jan 27, 2011 at 9:32 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
>>
>>
>> On 01/27/2011 07:56 AM, Xiaobo Gu wrote:
>>>>
>>>> Clearly there is a problem, or configure would have worked. You need to
>>>> answer the question I asked previously, namely what is the declaration of
>>>> accept() in the mingw64 headers? You have that source and I don't so I
>>>> can't
>>>> answer the question.
>>>
>>> #ifndef __WINSOCK_WS1_SHARED
>>> /* these 46 functions have the same prototypes as in winsock2 */
>>>   WINSOCK_API_LINKAGE SOCKET WSAAPI accept(SOCKET s,struct sockaddr
>>> *addr,int *addrlen);
>>>   WINSOCK_API_LINKAGE int WSAAPI bind(SOCKET s,const struct sockaddr
>>> *name,int namelen);
>>>   WINSOCK_API_LINKAGE int WSAAPI closesocket(SOCKET s);
>>>   WINSOCK_API_LINKAGE int WSAAPI connect(SOCKET s,const struct
>>> sockaddr *name,int namelen);
>>
>> Ok, now in src/config/ac_func_accept_argtypes.m4 on line 48, try adding the
>> following alternatives for the return type:
>>
>>   unsigned int WSAAPI
>>   int WSAAPI
>>   unsigned INT_PTR WSAAPI
>>   INT_PTR WSAAPI
>
> None of them works, I'll try to add  '__int64' as an option to first argument,
>
>> and see if one of them lets configure pass.

AC_DEFUN([AC_FUNC_ACCEPT_ARGTYPES],
[AC_MSG_CHECKING([types of arguments for
accept()])AC_CACHE_VAL(ac_cv_func_accept_return,dnl[AC_CACHE_VAL(ac_cv_func_accept_arg1,dnl
[AC_CACHE_VAL(ac_cv_func_accept_arg2,dnl [AC_CACHE_VAL(ac_cv_func_accept_arg3,dnl   [for ac_cv_func_accept_return in
'INT_PTRWSAAPI' 'int' 'unsigned 
int PASCAL'  ; do     for ac_cv_func_accept_arg1 in '__int64' 'int' 'unsigned int' ; do      for ac_cv_func_accept_arg2
in'struct sockaddr *' 'const struct 
sockaddr *' 'void *'; do       for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t'
'unsigned int' 'void'; do        AC_TRY_COMPILE(

The above combinition does not pass, another question,

Because I just want to build the client side of PostgreSQL, can I
ignore this error and let the configure pass

Xiaobo Gu


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ALTER TYPE 3: add facility to identify further no-work cases
Next
From: Andrew Dunstan
Date:
Subject: Re: Is there a way to build PostgreSQL client libraries with MinGW