Re: Is there a way to build PostgreSQL client libraries with MinGW

From: Xiaobo Gu <guxiaobo1982(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Is there a way to build PostgreSQL client libraries with MinGW
Date: 2011-01-27 14:55:12
Message-ID: AANLkTimhrzt5EcK7-s_CnaQA0xVHWcXn+m-MEikK6Pom@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Thu, Jan 27, 2011 at 10:44 PM, Xiaobo Gu <guxiaobo1982(at)gmail(dot)com> wrote:
> On Thu, Jan 27, 2011 at 9:32 PM, Andrew Dunstan <andrew(at)dunslane(dot)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_PTR WSAAPI' '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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Dunstan 2011-01-27 15:05:04 Re: Is there a way to build PostgreSQL client libraries with MinGW
Previous Message Tom Lane 2011-01-27 14:40:04 Re: BUG #5852: Function date_trunc is not IMMUTABLE

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2011-01-27 15:05:04 Re: Is there a way to build PostgreSQL client libraries with MinGW
Previous Message Tom Lane 2011-01-27 14:46:56 Re: ALTER TYPE 3: add facility to identify further no-work cases