X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/85ef2ce64f0cc31a063fccea69fdcc7281d51548..refs/heads/delphi2010:/dnssync.pas

diff --git a/dnssync.pas b/dnssync.pas
old mode 100755
new mode 100644
index a7ba714..7d6631c
--- a/dnssync.pas
+++ b/dnssync.pas
@@ -26,24 +26,25 @@ interface
       fd_utils,
     {$endif}
     lcorernd,
-    sysutils;
+    sysutils,
+    ltimevalstuff;
 
 //convert a name to an IP
 //will return v4 or v6 depending on what seems favorable, or manual preference setting
 //on error the binip will have a family of 0 (other fiels are also currently
 //zeroed out but may be used for further error information in future)
 //timeout is in miliseconds, it is ignored when using windows dns
-function forwardlookup(name:string;timeout:integer):tbinip;
+function forwardlookup(name:ansistring;timeout:integer):tbinip;
 
 //convert a name to a list of all IP's returned
 //this returns both v4 and v6 IP's, or possibly only v4 or v6, depending on settings
 //on error, returns an empty list
-function forwardlookuplist(name:string;timeout:integer):tbiniplist;
+function forwardlookuplist(name:ansistring;timeout:integer):tbiniplist;
 
 
 //convert an IP to a name, on error a null string will be returned, other
 //details as above
-function reverselookup(ip:tbinip;timeout:integer):string;
+function reverselookup(ip:tbinip;timeout:integer):ansistring;
 
 
 
@@ -73,7 +74,6 @@ implementation
 {$endif}
 
 {$i unixstuff.inc}
-{$i ltimevalstuff.inc}
 
 var
   numsockused:integer;
@@ -110,8 +110,8 @@ end;
 function sendquery(socknum:integer;const packet:tdnspacket;len:integer):boolean;
 var
   a:integer;
-  addr       : string;
-  port       : string;
+  addr       : ansistring;
+  port       : ansistring;
   inaddr     : TInetSockAddrV;
 begin
 {  writeln('sendquery ',decodename(state.packet,state.packetlen,12,0,a),' ',state.requesttype);}
@@ -138,7 +138,7 @@ var
   inAddrtemp : TInetSockAddrV;
   a:integer;
   biniptemp:tbinip;
-  addr:string;
+  addr:ansistring;
 begin
   //init both sockets smultaneously, always, so they get succesive fd's
   if fd[0] > 0 then exit;
@@ -188,7 +188,7 @@ var
   Srcx   : {$ifdef win32}sockaddr_in{$else}TInetSockAddrV{$endif} absolute Src;
   SrcLen : Integer;
   fromip:tbinip;
-  fromport:string;
+  fromport:ansistring;
 
 begin
   if timeout < mintimeout then timeout := defaulttimeout;
@@ -296,7 +296,7 @@ end;
 
 
 
-function forwardlookuplist(name:string;timeout:integer):tbiniplist;
+function forwardlookuplist(name:ansistring;timeout:integer):tbiniplist;
 var
   dummy : integer;
   a,b:integer;
@@ -367,7 +367,7 @@ begin
   end;
 end;
 
-function forwardlookup(name:string;timeout:integer):tbinip;
+function forwardlookup(name:ansistring;timeout:integer):tbinip;
 var
   listtemp:tbiniplist;
 begin
@@ -375,7 +375,7 @@ begin
   result := biniplist_get(listtemp,0);
 end;
 
-function reverselookup(ip:tbinip;timeout:integer):string;
+function reverselookup(ip:tbinip;timeout:integer):ansistring;
 var
   dummy : integer;
 begin