|
@@ -20,7 +20,7 @@ unit Linux;
|
|
{$i osdefs.inc}
|
|
{$i osdefs.inc}
|
|
|
|
|
|
{$packrecords c}
|
|
{$packrecords c}
|
|
-{$ifdef FPC_USE_LIBC}
|
|
|
|
|
|
+{$ifdef FPC_USE_LIBC}
|
|
{$linklib rt} // for clock* functions
|
|
{$linklib rt} // for clock* functions
|
|
{$endif}
|
|
{$endif}
|
|
|
|
|
|
@@ -40,7 +40,7 @@ type
|
|
__s32 = Longint;
|
|
__s32 = Longint;
|
|
__u64 = QWord;
|
|
__u64 = QWord;
|
|
__s64 = Int64;
|
|
__s64 = Int64;
|
|
-
|
|
|
|
|
|
+
|
|
type
|
|
type
|
|
TSysInfo = record
|
|
TSysInfo = record
|
|
uptime: clong; //* Seconds since boot */
|
|
uptime: clong; //* Seconds since boot */
|
|
@@ -479,8 +479,8 @@ Type
|
|
function clock_getres(clk_id : clockid_t; res : ptimespec) : cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'clock_getres'; {$ENDIF}
|
|
function clock_getres(clk_id : clockid_t; res : ptimespec) : cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'clock_getres'; {$ENDIF}
|
|
function clock_gettime(clk_id : clockid_t; tp: ptimespec) : cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'clock_gettime'; {$ENDIF}
|
|
function clock_gettime(clk_id : clockid_t; tp: ptimespec) : cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'clock_gettime'; {$ENDIF}
|
|
function clock_settime(clk_id : clockid_t; tp : ptimespec) : cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'clock_settime'; {$ENDIF}
|
|
function clock_settime(clk_id : clockid_t; tp : ptimespec) : cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'clock_settime'; {$ENDIF}
|
|
-function setregid(rgid,egid : uid_t): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'setregid'; {$ENDIF}
|
|
|
|
-function setreuid(ruid,euid : uid_t): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'setreuid'; {$ENDIF}
|
|
|
|
|
|
+function setregid(rgid,egid : uid_t): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'setregid'; {$ENDIF}
|
|
|
|
+function setreuid(ruid,euid : uid_t): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'setreuid'; {$ENDIF}
|
|
|
|
|
|
Const
|
|
Const
|
|
STATX_TYPE = $00000001;
|
|
STATX_TYPE = $00000001;
|
|
@@ -551,8 +551,10 @@ Type
|
|
|
|
|
|
tkernel_timespecs = array[0..1] of kernel_timespec;
|
|
tkernel_timespecs = array[0..1] of kernel_timespec;
|
|
|
|
|
|
|
|
+{$ifndef android}
|
|
Function utimensat(dfd: cint; path:pchar;const times:tkernel_timespecs;flags:cint):cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'statx'; {$ENDIF}
|
|
Function utimensat(dfd: cint; path:pchar;const times:tkernel_timespecs;flags:cint):cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'statx'; {$ENDIF}
|
|
Function futimens(fd: cint; const times:tkernel_timespecs):cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'futimens'; {$ENDIF}
|
|
Function futimens(fd: cint; const times:tkernel_timespecs):cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'futimens'; {$ENDIF}
|
|
|
|
+{$endif android}
|
|
|
|
|
|
implementation
|
|
implementation
|
|
|
|
|
|
@@ -846,7 +848,7 @@ function setregid(rgid,egid : uid_t): cint;
|
|
begin
|
|
begin
|
|
setregid:=do_syscall(syscall_nr_setregid,rgid,egid);
|
|
setregid:=do_syscall(syscall_nr_setregid,rgid,egid);
|
|
end;
|
|
end;
|
|
-
|
|
|
|
|
|
+
|
|
function setreuid(ruid,euid : uid_t): cint;
|
|
function setreuid(ruid,euid : uid_t): cint;
|
|
begin
|
|
begin
|
|
setreuid:=do_syscall(syscall_nr_setreuid,ruid,euid);
|
|
setreuid:=do_syscall(syscall_nr_setreuid,ruid,euid);
|
|
@@ -860,6 +862,7 @@ end;
|
|
|
|
|
|
{$endif}
|
|
{$endif}
|
|
|
|
|
|
|
|
+{$ifndef android}
|
|
Function utimensat(dfd: cint; path:pchar;const times:tkernel_timespecs;flags:cint):cint;
|
|
Function utimensat(dfd: cint; path:pchar;const times:tkernel_timespecs;flags:cint):cint;
|
|
var
|
|
var
|
|
tsa: Array[0..1] of timespec;
|
|
tsa: Array[0..1] of timespec;
|
|
@@ -898,6 +901,7 @@ begin
|
|
futimens:=do_syscall(syscall_nr_utimensat,fd,TSysParam(nil),TSysParam(@times),0);
|
|
futimens:=do_syscall(syscall_nr_utimensat,fd,TSysParam(nil),TSysParam(@times),0);
|
|
{$endif sizeof(clong)<=4}
|
|
{$endif sizeof(clong)<=4}
|
|
end;
|
|
end;
|
|
|
|
+{$endif android}
|
|
|
|
|
|
end.
|
|
end.
|
|
|
|
|