Hi

Just upgraded to v40 and again have had to apply a mod to StrToIp6 so 
that the header does not throw a C++ builder compile time error:

[BCC32 Error] Synaip.hpp(36): E2091 Functions cannot return arrays or 
functions
   Full parser context
     TSenderEmail.cpp(9): #include 
c:\dev\cmp\synapse\source\lib\smtpsend.hpp
     smtpsend.hpp(19): #include c:\dev\cmp\synapse\source\lib\Blcksock.hpp
     Blcksock.hpp(23): #include c:\dev\cmp\synapse\source\lib\Synaip.hpp
     Synaip.hpp(23): namespace Synaip



PROPOSAL:

function StrToIp6(value: string; ipv6Result: TIp6Bytes): Boolean;
var
  IPv6: TIp6Words;
  Index: Integer;
  n: integer;
  b1, b2: byte;
  s: string;
  x: integer;
begin
  Result := False;
   for n := 0 to 15 do
     ipv6Result[n] := 0;
   for n := 0 to 7 do
     Ipv6[n] := 0;
   Index := 0;
   Value := ExpandIP6(value);
   if value = '' then
     exit;
   while Value <> '' do
   begin
     if Index > 7 then
       Exit;
     s := fetch(value, ':');
     if s = '@' then
       break;
     if s = '' then
     begin
       IPv6[Index] := 0;
     end
     else
     begin
       x := StrToIntDef('$' + s, -1);
       if (x > 65535) or (x < 0) then
         Exit;
       IPv6[Index] := x;
     end;
     Inc(Index);
   end;
   for n := 0 to 7 do
   begin
     b1 := ipv6[n] div 256;
     b2 := ipv6[n] mod 256;
     ipv6Result[n * 2] := b1;
     ipv6Result[(n * 2) + 1] := b2;
   end;

   Result := true;
end;


And related changes in blcksend.pas



(If you would be so kind)
Thanks
Paul Read
nSolve


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to