Skip to content
Permalink
Browse files

fixed BSD compilation

  • Loading branch information
Arnaud Bouchez
Arnaud Bouchez committed Nov 12, 2019
1 parent f9e48c7 commit 61117a5e5b3ecdc641b57e31cdc1ef318281f158
Showing with 5 additions and 3 deletions.
  1. +3 −2 SQLite3/mORMotService.pas
  2. +1 −0 Synopse.inc
  3. +1 −1 SynopseCommit.inc
@@ -600,7 +600,8 @@ function RunProcess(const path, arg1: TFileName; waitfor: boolean;
const arg2: TFileName=''; const arg3: TFileName=''; const arg4: TFileName='';
const arg5: TFileName=''; const env: TFileName=''; envaddexisting: boolean=false): integer;

/// like fpSystem, but cross-platform and calling bash only if needed
/// like fpSystem, but cross-platform
// - under POSIX, calls bash only if needed, after ParseCommandArgs() analysis
// - under Windows (especially Windows 10), creating a process can be dead slow
// https://randomascii.wordpress.com/2019/04/21/on2-in-createprocess
function RunCommand(const cmd: TFileName; waitfor: boolean;
@@ -1821,7 +1822,7 @@ function RunCommand(const cmd: TFileName; waitfor: boolean;
result := RunInternal(a, waitfor, env, envaddexisting)
else if err * PARSECOMMAND_ERROR <> [] then
// no system call for clearly invalid command line
result := {$ifdef FPC}-ESysELIBBAD{$else}-80{$endif}
result := {$ifdef FPCLINUXNOTBSD}-ESysELIBBAD{$else}-80{$endif}
else begin // execute complex commands via the shell
a[0] := '/bin/sh';
a[1] := '-c';
@@ -307,6 +307,7 @@
{$else}
{$ifdef LINUX}
{$define LINUXNOTBSD} // e.g. to disable epoll API
{$define FPCLINUXNOTBSD}
{$endif}
{$endif}

@@ -1 +1 @@
'1.18.5457'
'1.18.5458'

0 comments on commit 61117a5

Please sign in to comment.
You can’t perform that action at this time.