Browse Source

F_GetLk/SetLk have different values for sparc/sparc64

git-svn-id: trunk@45829 -
pierre 5 years ago
parent
commit
9f60f5093d
3 changed files with 22 additions and 0 deletions
  1. 9 0
      rtl/linux/ostypes.inc
  2. 7 0
      tests/tbs/tb0561a.pp
  3. 6 0
      tests/tbs/tb0561b.pp

+ 9 - 0
rtl/linux/ostypes.inc

@@ -382,11 +382,20 @@ CONST
   F_SetFd  = 2;
   F_GetFl  = 3;
   F_SetFl  = 4;
+
+{$if defined(cpusparc) or defined(cpusparc64)}
+  F_GetLk  = 7;
+  F_SetLk  = 8;
+  F_SetLkW = 9;
+  F_SetOwn = 5;
+  F_GetOwn = 6;
+{$else}
   F_GetLk  = 5;
   F_SetLk  = 6;
   F_SetLkW = 7;
   F_SetOwn = 8;
   F_GetOwn = 9;
+{$endif}
 
 { getrlimit/ugetrlimit resource parameter constants }
 const

+ 7 - 0
tests/tbs/tb0561a.pp

@@ -8,9 +8,16 @@ program test;
 Uses    cthreads, Classes, SysUtils, BaseUnix;
 
 Const   Fn      = '/tmp/fpctest.lock';
+
+{$if defined(cpusparc) or defined(cpusparc64)}
+     F_RDLCK = 1;
+     F_WRLCK = 2;
+     F_UNLCK = 3;
+{$else}
      F_RDLCK = 0;
      F_WRLCK = 1;
      F_UNLCK = 2;
+{$endif}
 
 Var     F, I    : Integer;
      Region  : FLock;

+ 6 - 0
tests/tbs/tb0561b.pp

@@ -10,9 +10,15 @@ Uses    cthreads, Classes, SysUtils, BaseUnix;
   support locking
 }
 Const   Fn      = '/tmp/fpctest.lock';
+{$if defined(cpusparc) or defined(cpusparc64)}
+     F_RDLCK = 1;
+     F_WRLCK = 2;
+     F_UNLCK = 3;
+{$else}
      F_RDLCK = 0;
      F_WRLCK = 1;
      F_UNLCK = 2;
+{$endif}
 
 Var     F, I    : Integer;
      Region  : FLock;