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

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

Thread Previous | Thread Next
From:
sisyphus
Date:
June 26, 2022 08:05
Subject:
Re: Attn: Paul Evans - Perl source needs a new (fixed) Socketversion.
Message ID:
CADZSBj2yTgCmPfAn4Ff1dUTSOJbDAXF=PWaygu=428_J3WV_sw@mail.gmail.com
--- Socket.xs_orig	2022-04-30 00:30:13 +1000
+++ Socket.xs	2022-06-26 17:24:28 +1000
@@ -98,6 +98,14 @@
 
 #endif
 
+/*
+ * The Windows implementations of inet_ntop and inet_pton are available
+ * whenever (and only when) InetNtopA is defined.
+ * Use those implementations whenever they are available.
+ * Else use the implementations provided below.
+*/
+#ifndef InetNtopA
+
 static int inet_pton(int af, const char *src, void *dst)
 {
   struct sockaddr_storage ss;
@@ -146,6 +154,8 @@
     return dst;
 }
 
+#endif /* InetNtopA  not defined */
+
 #define HAS_INETPTON
 #define HAS_INETNTOP
 #endif

Thread Previous | Thread Next


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