|
@@ -513,7 +513,7 @@ Type
|
|
end;
|
|
end;
|
|
pstatx_timestamp = ^statx_timestamp;
|
|
pstatx_timestamp = ^statx_timestamp;
|
|
|
|
|
|
- statx = record
|
|
|
|
|
|
+ tstatx = record
|
|
stx_mask : __u32;
|
|
stx_mask : __u32;
|
|
stx_blksize : __u32;
|
|
stx_blksize : __u32;
|
|
stx_attributes : __u64;
|
|
stx_attributes : __u64;
|
|
@@ -536,9 +536,9 @@ Type
|
|
stx_dev_minor : __u32;
|
|
stx_dev_minor : __u32;
|
|
__spare2 : array[0..13] of __u64;
|
|
__spare2 : array[0..13] of __u64;
|
|
end;
|
|
end;
|
|
- pstatx = ^statx;
|
|
|
|
|
|
+ pstatx = ^tstatx;
|
|
|
|
|
|
- function Fpstatx(dfd: cint; filename: pchar; flags,mask: cuint; var buf: statx):cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'statx'; {$ENDIF}
|
|
|
|
|
|
+ function statx(dfd: cint; filename: pchar; flags,mask: cuint; var buf: tstatx):cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'statx'; {$ENDIF}
|
|
|
|
|
|
Type
|
|
Type
|
|
kernel_time64_t = clonglong;
|
|
kernel_time64_t = clonglong;
|
|
@@ -551,8 +551,8 @@ Type
|
|
|
|
|
|
tkernel_timespecs = array[0..1] of kernel_timespec;
|
|
tkernel_timespecs = array[0..1] of kernel_timespec;
|
|
|
|
|
|
-Function fputimensat(dfd: cint; path:pchar;const times:tkernel_timespecs;flags:cint):cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'statx'; {$ENDIF}
|
|
|
|
-Function fpfutimens(fd: cint; const times:tkernel_timespecs):cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'futimens'; {$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}
|
|
|
|
|
|
implementation
|
|
implementation
|
|
|
|
|
|
@@ -853,49 +853,49 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
-function Fpstatx(dfd: cint; filename: pchar; flags,mask: cuint; var buf: statx):cint;
|
|
|
|
|
|
+function statx(dfd: cint; filename: pchar; flags,mask: cuint; var buf: tstatx):cint;
|
|
begin
|
|
begin
|
|
- Fpstatx:=do_syscall(syscall_nr_statx,TSysParam(dfd),TSysParam(filename),TSysParam(flags),TSysParam(mask),TSysParam(@buf));
|
|
|
|
|
|
+ statx:=do_syscall(syscall_nr_statx,TSysParam(dfd),TSysParam(filename),TSysParam(flags),TSysParam(mask),TSysParam(@buf));
|
|
end;
|
|
end;
|
|
|
|
|
|
{$endif}
|
|
{$endif}
|
|
|
|
|
|
-Function fputimensat(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;
|
|
begin
|
|
begin
|
|
{$if sizeof(clong)<=4}
|
|
{$if sizeof(clong)<=4}
|
|
- fputimensat:=do_syscall(syscall_nr_utimensat_time64,dfd,TSysParam(path),TSysParam(@times),0);
|
|
|
|
- if (fputimensat>=0) or (fpgeterrno<>ESysENOSYS) then
|
|
|
|
|
|
+ utimensat:=do_syscall(syscall_nr_utimensat_time64,dfd,TSysParam(path),TSysParam(@times),0);
|
|
|
|
+ if (utimensat>=0) or (fpgeterrno<>ESysENOSYS) then
|
|
exit;
|
|
exit;
|
|
{ try 32 bit fall back }
|
|
{ try 32 bit fall back }
|
|
tsa[0].tv_sec := times[0].tv_sec;
|
|
tsa[0].tv_sec := times[0].tv_sec;
|
|
tsa[0].tv_nsec := times[0].tv_nsec;
|
|
tsa[0].tv_nsec := times[0].tv_nsec;
|
|
tsa[1].tv_sec := times[1].tv_sec;
|
|
tsa[1].tv_sec := times[1].tv_sec;
|
|
tsa[1].tv_nsec := times[1].tv_nsec;
|
|
tsa[1].tv_nsec := times[1].tv_nsec;
|
|
- fputimensat:=do_syscall(syscall_nr_utimensat,dfd,TSysParam(path),TSysParam(@tsa),0);
|
|
|
|
|
|
+ utimensat:=do_syscall(syscall_nr_utimensat,dfd,TSysParam(path),TSysParam(@tsa),0);
|
|
{$else sizeof(clong)<=4}
|
|
{$else sizeof(clong)<=4}
|
|
- fputimensat:=do_syscall(syscall_nr_utimensat,dfd,TSysParam(path),TSysParam(@times),0);
|
|
|
|
|
|
+ utimensat:=do_syscall(syscall_nr_utimensat,dfd,TSysParam(path),TSysParam(@times),0);
|
|
{$endif sizeof(clong)<=4}
|
|
{$endif sizeof(clong)<=4}
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
-Function fpfutimens(fd: cint; const times:tkernel_timespecs):cint;
|
|
|
|
|
|
+Function futimens(fd: cint; const times:tkernel_timespecs):cint;
|
|
var
|
|
var
|
|
tsa: Array[0..1] of timespec;
|
|
tsa: Array[0..1] of timespec;
|
|
begin
|
|
begin
|
|
{$if sizeof(clong)<=4}
|
|
{$if sizeof(clong)<=4}
|
|
- fpfutimens:=do_syscall(syscall_nr_utimensat_time64,fd,TSysParam(nil),TSysParam(@times),0);
|
|
|
|
- if (fpfutimens>=0) or (fpgeterrno<>ESysENOSYS) then
|
|
|
|
|
|
+ futimens:=do_syscall(syscall_nr_utimensat_time64,fd,TSysParam(nil),TSysParam(@times),0);
|
|
|
|
+ if (futimens>=0) or (fpgeterrno<>ESysENOSYS) then
|
|
exit;
|
|
exit;
|
|
{ try 32 bit fall back }
|
|
{ try 32 bit fall back }
|
|
tsa[0].tv_sec := times[0].tv_sec;
|
|
tsa[0].tv_sec := times[0].tv_sec;
|
|
tsa[0].tv_nsec := times[0].tv_nsec;
|
|
tsa[0].tv_nsec := times[0].tv_nsec;
|
|
tsa[1].tv_sec := times[1].tv_sec;
|
|
tsa[1].tv_sec := times[1].tv_sec;
|
|
tsa[1].tv_nsec := times[1].tv_nsec;
|
|
tsa[1].tv_nsec := times[1].tv_nsec;
|
|
- fpfutimens:=do_syscall(syscall_nr_utimensat,fd,TSysParam(nil),TSysParam(@tsa),0);
|
|
|
|
|
|
+ futimens:=do_syscall(syscall_nr_utimensat,fd,TSysParam(nil),TSysParam(@tsa),0);
|
|
{$else sizeof(clong)<=4}
|
|
{$else sizeof(clong)<=4}
|
|
- fpfutimens:=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;
|
|
|
|
|