Re: [Mingw-w64-public] [PATCH] wrong declaration of InetNtopA and InetNtopW

2019-04-19 Thread Liu Hao
在 2019/4/19 下午3:29, Vincent Torri 写道:
> hello
> 
> in ws2tcpip.h, i have the following declarations of these 2 functions :
> 
> WINSOCK_API_LINKAGE LPCWSTR WSAAPI InetNtopW(INT Family, PVOID pAddr,
> LPWSTR pStringBuf, size_t StringBufSIze);
> WINSOCK_API_LINKAGE LPCSTR WSAAPI InetNtopA(INT Family, PVOID pAddr,
> LPSTR pStringBuf, size_t StringBufSize);
> 
> that is the 2nd parameter is a void *
> 
> But in the doc :
> 
> https://docs.microsoft.com/fr-fr/windows/desktop/api/ws2tcpip/nf-ws2tcpip-inet_ntop
> https://docs.microsoft.com/fr-fr/windows/desktop/api/ws2tcpip/nf-ws2tcpip-inetntopw
> 
> the 2nd parameter is a  const void *
> 
> is it normal or is it a bug in the declaration ?
> 
> thank you
> 
> Vincent Torri
> 
> 

It looks like typos. The patch attached should fix this issue.



-- 
Best regards,
LH_Mouse
From 0c4170ffcd3ef4718820027669cfb1d3d59b8175 Mon Sep 17 00:00:00 2001
From: Liu Hao 
Date: Fri, 19 Apr 2019 16:34:10 +0800
Subject: [PATCH] include/ws2tcpip.h: Fix prototypes of `InetNtop{A,W}`.

Signed-off-by: Liu Hao 
---
 mingw-w64-headers/include/ws2tcpip.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mingw-w64-headers/include/ws2tcpip.h b/mingw-w64-headers/include/ws2tcpip.h
index ed562cdd..e8b0abc8 100644
--- a/mingw-w64-headers/include/ws2tcpip.h
+++ b/mingw-w64-headers/include/ws2tcpip.h
@@ -447,8 +447,8 @@ WINSOCK_API_LINKAGE int WSAAPI WSASetSocketSecurity(
 
 #define InetNtopA inet_ntop
 
-WINSOCK_API_LINKAGE LPCWSTR WSAAPI InetNtopW(INT Family, PVOID pAddr, LPWSTR pStringBuf, size_t StringBufSIze);
-WINSOCK_API_LINKAGE LPCSTR WSAAPI InetNtopA(INT Family, PVOID pAddr, LPSTR pStringBuf, size_t StringBufSize);
+WINSOCK_API_LINKAGE LPCWSTR WSAAPI InetNtopW(INT Family, PCVOID pAddr, LPWSTR pStringBuf, size_t StringBufSIze);
+WINSOCK_API_LINKAGE LPCSTR WSAAPI InetNtopA(INT Family, PCVOID pAddr, LPSTR pStringBuf, size_t StringBufSize);
 
 #define InetNtop __MINGW_NAME_AW(InetNtop)
 
-- 
2.17.1



signature.asc
Description: OpenPGP digital signature
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] wrong declaration of InetNtopA and InetNtopW

2019-04-19 Thread Vincent Torri
when will this hit git or next mingw-w64 release ?

On Fri, Apr 19, 2019 at 10:35 AM Liu Hao  wrote:
>
> 在 2019/4/19 下午3:29, Vincent Torri 写道:
> > hello
> >
> > in ws2tcpip.h, i have the following declarations of these 2 functions :
> >
> > WINSOCK_API_LINKAGE LPCWSTR WSAAPI InetNtopW(INT Family, PVOID pAddr,
> > LPWSTR pStringBuf, size_t StringBufSIze);
> > WINSOCK_API_LINKAGE LPCSTR WSAAPI InetNtopA(INT Family, PVOID pAddr,
> > LPSTR pStringBuf, size_t StringBufSize);
> >
> > that is the 2nd parameter is a void *
> >
> > But in the doc :
> >
> > https://docs.microsoft.com/fr-fr/windows/desktop/api/ws2tcpip/nf-ws2tcpip-inet_ntop
> > https://docs.microsoft.com/fr-fr/windows/desktop/api/ws2tcpip/nf-ws2tcpip-inetntopw
> >
> > the 2nd parameter is a  const void *
> >
> > is it normal or is it a bug in the declaration ?
> >
> > thank you
> >
> > Vincent Torri
> >
> >
>
> It looks like typos. The patch attached should fix this issue.
>
>
>
> --
> Best regards,
> LH_Mouse


___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] wrong declaration of InetNtopA and InetNtopW

2019-04-19 Thread Liu Hao
在 2019/4/19 下午4:59, Vincent Torri 写道:
> when will this hit git or next mingw-w64 release ?
> 


For this small change I will leave it on this mailing list for
discussion. If there is no objection I may push it a couple of days later.

This means that this fix will be shipped with the next major release,
and with the next minor release of the current version by backporting.
But I have no idea what that will happen. JonY will know about it.


-- 
Best regards,
LH_Mouse



signature.asc
Description: OpenPGP digital signature
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] wrong declaration of InetNtopA and InetNtopW

2019-04-22 Thread Martin Storsjö

On Sat, 20 Apr 2019, Liu Hao wrote:


在 2019/4/19 下午4:59, Vincent Torri 写道:

when will this hit git or next mingw-w64 release ?




For this small change I will leave it on this mailing list for
discussion. If there is no objection I may push it a couple of days later.


Your patch broke compilation, as there's no type PCVOID commonly 
defined, only PVOID and LPCVOID.


I pushed a fix for master, I can backport it just like your patch a bit 
later, unless you beat me to it.


// Martin

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] wrong declaration of InetNtopA and InetNtopW

2019-04-22 Thread Liu Hao
在 2019/4/22 下午8:27, Martin Storsjö 写道:
> On Sat, 20 Apr 2019, Liu Hao wrote:
> 
>> 在 2019/4/19 下午4:59, Vincent Torri 写道:
>>> when will this hit git or next mingw-w64 release ?
>>>
>>
>>
>> For this small change I will leave it on this mailing list for
>> discussion. If there is no objection I may push it a couple of days
>> later.
> 
> Your patch broke compilation, as there's no type PCVOID commonly
> defined, only PVOID and LPCVOID.
> 
> I pushed a fix for master, I can backport it just like your patch a bit
> later, unless you beat me to it.
> 
> 

Well, there is a definition of `PCVOID` in 'cfgmgr32.h', but it is only
used in that file.

And, thanks for the fix. I have just noticed that these functions aren't
available unless `_WIN32_WINNT` is at least `0x0600` and it is why it
didn't fail on my side. Apologize for that.


-- 
Best regards,
LH_Mouse



signature.asc
Description: OpenPGP digital signature
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] wrong declaration of InetNtopA and InetNtopW

2019-04-22 Thread Martin Storsjö

On Mon, 22 Apr 2019, Liu Hao wrote:


在 2019/4/22 下午8:27, Martin Storsjö 写道:

On Sat, 20 Apr 2019, Liu Hao wrote:


在 2019/4/19 下午4:59, Vincent Torri 写道:

when will this hit git or next mingw-w64 release ?




For this small change I will leave it on this mailing list for
discussion. If there is no objection I may push it a couple of days
later.


Your patch broke compilation, as there's no type PCVOID commonly
defined, only PVOID and LPCVOID.

I pushed a fix for master, I can backport it just like your patch a bit
later, unless you beat me to it.




Well, there is a definition of `PCVOID` in 'cfgmgr32.h', but it is only
used in that file.


Yup, that's what I meant about "commonly defined". (I was a bit terse 
before, typing on a phone.)



And, thanks for the fix. I have just noticed that these functions aren't
available unless `_WIN32_WINNT` is at least `0x0600` and it is why it
didn't fail on my side. Apologize for that.


Ah, yes, that explains why it slipped through.

// Martin

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] wrong declaration of InetNtopA and InetNtopW

2019-05-08 Thread Vincent Torri
hello

*pton has also the same wrong declaration, no ?

Vincent Torri

On Mon, Apr 22, 2019 at 9:07 PM Martin Storsjö  wrote:
>
> On Mon, 22 Apr 2019, Liu Hao wrote:
>
> > 在 2019/4/22 下午8:27, Martin Storsjö 写道:
> >> On Sat, 20 Apr 2019, Liu Hao wrote:
> >>
> >>> 在 2019/4/19 下午4:59, Vincent Torri 写道:
>  when will this hit git or next mingw-w64 release ?
> 
> >>>
> >>>
> >>> For this small change I will leave it on this mailing list for
> >>> discussion. If there is no objection I may push it a couple of days
> >>> later.
> >>
> >> Your patch broke compilation, as there's no type PCVOID commonly
> >> defined, only PVOID and LPCVOID.
> >>
> >> I pushed a fix for master, I can backport it just like your patch a bit
> >> later, unless you beat me to it.
> >>
> >>
> >
> > Well, there is a definition of `PCVOID` in 'cfgmgr32.h', but it is only
> > used in that file.
>
> Yup, that's what I meant about "commonly defined". (I was a bit terse
> before, typing on a phone.)
>
> > And, thanks for the fix. I have just noticed that these functions aren't
> > available unless `_WIN32_WINNT` is at least `0x0600` and it is why it
> > didn't fail on my side. Apologize for that.
>
> Ah, yes, that explains why it slipped through.
>
> // Martin
>
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH] wrong declaration of InetNtopA and InetNtopW

2019-05-08 Thread Liu Hao
在 2019/5/8 下午8:20, Vincent Torri 写道:
> hello
> 
> *pton has also the same wrong declaration, no ?
> 

No. The third parameter of `InetPton()` is output-only so it is a
pointer to unqualified `void`.


-- 
Best regards,
ltpmouse



signature.asc
Description: OpenPGP digital signature
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public