develooper Front page | perl.perl5.porters | Postings from June 2022

Re: Attn: Paul Evans - Perl source needs a new (fixed) Socketversion.

Thread Previous
From:
sisyphus
Date:
June 30, 2022 11:24
Subject:
Re: Attn: Paul Evans - Perl source needs a new (fixed) Socketversion.
Message ID:
CADZSBj2Ymv_P0a0JZGy-+qJ0pPMQSjTsgWyx1r8MnqONzZNfWg@mail.gmail.com
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

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About