[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl5-porters
Subject:    Re: Attn: Paul Evans - Perl source needs a new (fixed) Socket version.
From:       sisyphus <sisyphus359 () gmail ! com>
Date:       2022-06-30 11:23:29
Message-ID: CADZSBj2Ymv_P0a0JZGy-+qJ0pPMQSjTsgWyx1r8MnqONzZNfWg () mail ! gmail ! com
[Download RAW message or body]

On Sun, Jun 26, 2022 at 6:05 PM sisyphus <sisyphus359@gmail.com> wrote:

> ....
> InetNtopA is found in the windows header ws2tcpip.h.
>
>
Here are the pertinent parts of the relevant '#if" block from ws2tcpip.h:
/*******************************/
#if (_WIN32_WINNT >= 0x0600)

#define InetNtopA inet_ntop
WINSOCK_API_LINKAGE LPCSTR WSAAPI InetNtopA(INT Family, LPCVOID pAddr,
LPSTR pStringBuf, size_t StringBufSize);

#define InetPtonA inet_pton
WINSOCK_API_LINKAGE INT WSAAPI InetPtonA(INT Family, LPCSTR pStringBuf,
PVOID pAddr);

#endif /*(_WIN32_WINNT >= 0x0600)*/
/*******************************/

There's other stuff in that block which I've not shown because it's not
relevant to this particular issue.
As you can see, there will be no issue if _WIN32_WINNT < 0x0600, as is the
case with older mingw-w64 toolchains.
But recent mingw-w64 toolchains define _WIN32_WINNT to 0x0a00.

Cheers,
Rob

[Attachment #3 (text/html)]

<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Sun, Jun 26, 2022 at 6:05 PM sisyphus &lt;<a \
href="mailto:sisyphus359@gmail.com">sisyphus359@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div \
dir="ltr">....</div><div class="gmail_quote">InetNtopA is found in the windows header \
ws2tcpip.h.</div><div \
class="gmail_quote"><br></div></div></blockquote><div><br></div><div>Here are the \
pertinent parts of the relevant &#39;#if&quot; block from \
ws2tcpip.h:</div><div>/*******************************/</div><div>#if (_WIN32_WINNT \
&gt;= 0x0600)<br></div><div><br></div><div>#define InetNtopA \
inet_ntop<br></div><div>WINSOCK_API_LINKAGE LPCSTR WSAAPI InetNtopA(INT Family, \
LPCVOID pAddr, LPSTR pStringBuf, size_t \
StringBufSize);<br></div><div><br></div><div>#define InetPtonA \
inet_pton<br></div><div>WINSOCK_API_LINKAGE INT WSAAPI InetPtonA(INT Family, LPCSTR \
pStringBuf, PVOID pAddr);<br></div><div><br></div><div>#endif /*(_WIN32_WINNT &gt;= \
0x0600)*/<br></div><div>/*******************************/<br></div><div><br></div><div>There&#39;s \
other stuff in that block which I&#39;ve not shown because it&#39;s not relevant to \
this particular issue.</div><div>As you can see, there will be no issue if \
_WIN32_WINNT &lt; 0x0600, as is the case with older mingw-w64 \
toolchains.</div><div>But recent mingw-w64 toolchains define _WIN32_WINNT to \
0x0a00.</div><div><br></div><div>Cheers,</div><div>Rob</div></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic