I tried to install Indy (more or less current snapshot) in Lazarus
0.9.29 on Darwin (MacOS Leopard), but it fails.
First problem was (or is) in IdGlobalProtocols.pas, there TUnixTime is
undefined. As a quick and dirty workaround I changed to:
function TimeZoneBias: TDateTime;
{$IFDEF USE_INLINE} inline; {$ENDIF}
{$IFNDEF FPC}
{$IFDEF UNIX}
var
T: Time_T;
TV: TimeVal;
{$IFDEF USE_VCL_POSIX}
UT: tm;
{$ELSE}
UT: TUnixTime;
{$ENDIF}
{$ENDIF}
{$ENDIF}
begin
{$IFNDEF FPC}
{$IFDEF UNIX}
{from http://edn.embarcadero.com/article/27890 }
gettimeofday(TV, nil);
T := TV.tv_sec;
{$IFDEF USE_VCL_POSIX}
localtime_r(T, UT);
// __tm_gmtoff is the bias in seconds from the UTC to the current time.
// so I multiply by -1 to compensate for this.
Result := (UT.tm_gmtoff / 60 / 60 / 24);
{$ELSE}
localtime_r(@T, UT);
// __tm_gmtoff is the bias in seconds from the UTC to the current time.
// so I multiply by -1 to compensate for this.
Result := (UT.__tm_gmtoff / 60 / 60 / 24);
{$ENDIF}
{$ELSE}
Result := -OffsetFromUTC;
{$ENDIF}
{$ELSE}
Result := -OffsetFromUTC;
{$ENDIF}
end;
At least IdGlobalProtocols.pas is compileable this way.
But then I get errors for IdSSLOpenSSLHeaders.pas:
Compiling IdSSLOpenSSLHeaders.pas
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(9874,12)
Hint: Type "size_t" redefinition
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(9883,14)
Hint: Type "time_t" redefinition
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(11526,30)
Hint: Type "PSTACK_OF_POLICYQUALINFO" redefinition
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(11526,30)
Error: Duplicate identifier "PSTACK_OF_POLICYQUALINFO"
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(11526,30)
Hint: Identifier already defined in IdSSLOpenSSLHeaders.pas at line 10942
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(11791,31)
Hint: Type "PSTACK_OF_X509_NAME_ENTRY" redefinition
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(11791,31)
Error: Duplicate identifier "PSTACK_OF_X509_NAME_ENTRY"
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(11791,31)
Hint: Identifier already defined in IdSSLOpenSSLHeaders.pas at line 10905
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(14005,49)
Hint: C arrays are passed by reference
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(14006,64)
Hint: C arrays are passed by reference
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(14009,68)
Hint: C arrays are passed by reference
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(14200,55)
Error: Identifier not found "sockaddr"
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(14308,59)
Error: Identifier not found "Sockaddr"
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(14309,76)
Error: Identifier not found "Sockaddr"
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(14312,58)
Error: Identifier not found "SockAddr"
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(14313,54)
Error: Identifier not found "SockAddr"
/Developer/lazarus/components/indy/IdSSLOpenSSLHeaders.pas(14445,1)
Fatal: There were 7 errors compiling module, stopping
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus