ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/runtime/sv5ipc.inc
(Generate patch)

Comparing ibx/trunk/runtime/sv5ipc.inc (file contents):
Revision 38 by tony, Sat Jul 18 12:30:52 2015 UTC vs.
Revision 39 by tony, Tue May 17 08:14:52 2016 UTC

# Line 11 | Line 11 | const
11    cWriterBusyEventSemaphore = 8;
12    cDefaultTimeout = 1; { 1 seconds }
13  
14 + {$IF FPC_FULLVERSION = 30000 }
15 + {Fix regression in FPC 3.0.0 ipc.pp unit. Expected to be fixed in fpc 3.0.2}
16 + {$IF defined(darwin) }
17 + SEM_GETNCNT = 3;   { Return the value of sempid (READ)  }
18 + SEM_GETPID  = 4;   { Return the value of semval (READ)  }
19 + SEM_GETVAL  = 5;   { Return semvals into arg.array (READ)  }
20 + SEM_GETALL  = 6;   { Return the value of semzcnt (READ)  }
21 + SEM_GETZCNT = 7;   { Set the value of semval to arg.val (ALTER)  }
22 + SEM_SETVAL  = 8;   { Set semvals from arg.array (ALTER)  }
23 + SEM_SETALL  = 9;
24 + {$ENDIF}
25 + {$ENDIF}
26 +
27   {
28    The call to semctl in ipc is broken in FPC release 2.4.2 and earlier. Hence
29    need to replace with a working libc call. semtimedop is not present in 2.4.2 and earlier.
# Line 256 | Line 269 | begin
269        F := fpOpen(IPCFileName, O_WrOnly or O_Creat or O_Excl);
270        if F < 0 then
271        begin
272 <        if fpgetErrno = 17 {EEXIST} then
272 >        if fpgetErrno = ESysEEXIST {EEXIST} then
273          begin
274            { looks like it already exists}
275            Sleep(100);
276            F := fpOpen(IPCFileName,O_RdOnly);
277 <          if (F < 0) and (fpgetErrno = 2 {ENOENT}) then
277 >          if (F < 0) and (fpgetErrno = ESysENOENT {ENOENT}) then
278              {probably just got deleted }
279            else
280            if F < 0 then

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines