I am porting an old application from Delphi to Lazarus and Windows to Linux.
This application has a unit ExecWait, which was created to simplify running tool programs from the main program, so it supplies two procedures as:
function ExecAndWait(Cmdline: string; Hide: boolean = false; MaxWait:
DWORD = INFINITE; Prio: TExecPrio = normal): DWORD;
function ExecStart(Cmdline: string; InheritHandle: boolean = true;
Prio: TExecPrio = normal): DWORD;I have had no problems with this unit when moving from Delphi to FPC, it compiles just fine on Windows.
But when I move the code to Linux (via Subversion) it throws an error on "Run/Quick Compile":
ExecWait.pas(15,79) Error: Identifier not found "INFINITE"The line that gets the error is the declaration for ExecAndWait above.
On Windows I could check where it is defined and I found it in: C:\Programs\Lazarus_2.0.8\fpc\3.0.4\source\rtl\win\wininc\defines.inc
How do I bring in the corresponding Linux version of this? Is there some specific uses clause to set?
Right now I have this:
uses
{$IFDEF UNIX}
unix;
{$ELSE}
windows;
{$ENDIF}As it compiles in Windows it must be something I have to do when porting to Linux....
