From 4be21e4a341fbd4c8ecc14675fe6db9de7d18fec Mon Sep 17 00:00:00 2001
From: beware <beware@bircd.org>
Date: Mon, 31 Mar 2008 10:45:42 +0000
Subject: [PATCH 1/1] secondlistener in lcoreconfig

git-svn-id: file:///svnroot/lcore/trunk@14 b1de8a11-f9be-4011-bde0-cc7ace90066a
---
 lcoreconfig.inc | 9 +++++++++
 lsocket.pas     | 3 ---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/lcoreconfig.inc b/lcoreconfig.inc
index 48933e0..12fe918 100644
--- a/lcoreconfig.inc
+++ b/lcoreconfig.inc
@@ -18,3 +18,12 @@ when getaddrinfo is used, there is no reason to include dnscore, and it increase
 unless you want to use custom nameserver addresses. enable this setting to always include it.}
 
 {-$define syncdnscore}
+
+{on windows up to XP, listening on ipv6 will not listen on ipv4, while on other platforms it does, 
+so a single listener cant get all connections for a port number, only those for one address family.
+also it means a portable app would gave to deal with inconsistent behavior.
+enable this option to simulate the behavior of listening on both v4 and v6}
+
+{$ifdef win32}
+{$define secondlistener}
+{$endif}
diff --git a/lsocket.pas b/lsocket.pas
index 3b2d918..7438c26 100755
--- a/lsocket.pas
+++ b/lsocket.pas
@@ -56,7 +56,6 @@ interface
     classes,{pgdebugout,}pgtypes,lcore,fd_utils,binipstuff,dnssync;
 
 {$ifdef ipv6}
-{$define secondlistener}
 const
   v4listendefault:boolean=false;
 {$endif}
@@ -143,8 +142,6 @@ type
   twsocket=tlsocket; {easy}
 
 
-{!!!function longipdns(s:string):longint;}
-
 const
   TCP_NODELAY=1;
   IPPROTO_TCP=6;
-- 
2.30.2