Recent

Author Topic: Indy Compile error << correction >>  (Read 612 times)

BSaidus

  • Sr. Member
  • ****
  • Posts: 333
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Indy Compile error << correction >>
« on: December 16, 2019, 11:16:51 am »
hello.
To maintainer of Indy please notice that the package do not compile on lazarus 2.0.6 fpc 3.0.4 due to a missing or errors in some units.

unit IdGlobalProtocols missing :
Code: Pascal  [Select][+][-]
  1. uses
  2.   Classes,
  3.   {$IFDEF WINDOWS}
  4.   Windows,
  5.   {$ENDIF}
  6.   IdCharsets,
  7.   IdBaseComponent,
  8.   IdGlobal,
  9.   IdException,
  10.   SysUtils
  11.   {$IFDEF FPC}, dateutils {$ENDIF};     // added by me.
  12.  

unit IdIMAPServer line 705
Code: Pascal  [Select][+][-]
  1. function TIdIMAP4Server.MessageSetToMessageNumbers(AUseUID: Boolean; ASender: TIdCommand;
  2.   AMessageNumbers: TStrings; AMessageSet: string): Boolean;
  3. {AMessageNumbers may be '7' or maybe '2:4' (2, 3 & 4) or maybe '2,4,6' (2, 4 & 6)
  4. or maybe '1:*'}
  5. var
  6.   LPos: integer;
  7.   LStart: Int64;
  8.   LN: {$IFDEF FPC} LongInt {$ELSE} Int64 {$ENDIF}; // added by ME
  9.   LEnd: Int64;
  10.   LTemp: string;
  11.   LContext: TIdIMAP4PeerContext;
  12. begin
  13.   LContext := TIdIMAP4PeerContext(ASender.Context);
  14.   AMessageNumbers.BeginUpdate;
  15.   try
  16.     AMessageNumbers.Clear;
  17.     //See is it a sequence like 2:4 ...
  18.     LPos := IndyPos(':', AMessageSet);      {Do not Localize}
  19.     if LPos > 0 then begin
  20.       LTemp := Copy(AMessageSet, 1, LPos-1);
  21.       LStart := IndyStrToInt64(LTemp);
  22.       LTemp := Copy(AMessageSet, LPos+1, MAXINT);
  23.       if LTemp = '*' then begin  {Do not Localize}
  24.         if AUseUID then begin
  25.           LEnd := IndyStrToInt64(LContext.MailBox.UIDNext)-1;
  26.         end else begin
  27.           LEnd := LContext.MailBox.MessageList.Count;
  28.         end;
  29.       end else begin
  30.         LEnd := IndyStrToInt64(LTemp);
  31.       end;
  32.       for LN := LStart to LEnd do begin
  33.         AMessageNumbers.Add(IntToStr(LN));
  34.       end;
  35.     end else begin  
  36.     // .....
  37.  



Thanks you !!
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

 

TinyPortal © 2005-2018