mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 17:59:27 +02:00
* fix ioCtl differences between BSD and POSIX
git-svn-id: trunk@8676 -
This commit is contained in:
parent
b9752680a5
commit
5474e0c987
@ -510,7 +510,7 @@ end;
|
||||
// prototype is cint __P(cint,culong,....)
|
||||
// actual meaning of return value depends on request.
|
||||
|
||||
Function FpIOCtl(fd:cint;request:culong;Data: Pointer):cint; [public, alias : 'FPC_SYSC_IOCTL'];
|
||||
Function FpIOCtl(fd:cint;request:cint;Data: Pointer):cint; [public, alias : 'FPC_SYSC_IOCTL'];
|
||||
// This was missing here, instead hardcoded in Do_IsDevice
|
||||
begin
|
||||
FpIOCtl:=do_SysCall(syscall_nr_ioctl,tsysparam(fd),tsysparam(Request),TSysParam(data));
|
||||
|
@ -90,7 +90,11 @@ Type TGrpArr = Array [0..0] of TGid; { C style array workarounds}
|
||||
Function FpFtruncate (fd : cInt; flength : TOff): cInt; external name 'FPC_SYSC_FTRUNCATE';
|
||||
Function FPSigaction (sig: cInt; act : pSigActionRec; oact : pSigActionRec): cint; external name 'FPC_SYSC_SIGACTION';
|
||||
Function FPSelect (N:cint;readfds,writefds,exceptfds:pfdSet;TimeOut:PTimeVal):cint;
|
||||
Function FpIOCtl (Handle:cint;Ndx: culong;Data: Pointer):cint; external name 'FPC_SYSC_IOCTL';
|
||||
{$ifdef BSD}
|
||||
Function FpIOCtl (Handle:cint;Ndx: culong; Data: Pointer):cint; external name 'FPC_SYSC_IOCTL';
|
||||
{$else}
|
||||
Function FpIOCtl (Handle:cint;Ndx: cInt; Data: Pointer):cint; external name 'FPC_SYSC_IOCTL';
|
||||
{$endif}
|
||||
Function FpNanoSleep (req : ptimespec;rem : ptimespec):cint; external name 'FPC_SYSC_NANOSLEEP';
|
||||
Function fpLstat(path:pchar;Info:pstat):cint;
|
||||
Function fpLstat(Filename: ansistring;Info:pstat):cint;
|
||||
|
@ -74,7 +74,11 @@ const
|
||||
procedure FpExit (status : cint); cdecl; external clib name '_exit';
|
||||
function fpmmap (addr:pointer;len:size_t;prot:cint;flags:cint;fd:cint;ofs:off_t):pointer; cdecl; external clib name 'mmap'+suffix64bit;
|
||||
function fpmunmap (addr:pointer;len:size_t):cint; cdecl; external clib name 'munmap';
|
||||
{$ifdef BSD}
|
||||
function FpIOCtl (Handle:cint;Ndx: culong;Data: Pointer):cint; cdecl; external clib name 'ioctl';
|
||||
{$else}
|
||||
function FpIOCtl (Handle:cint;Ndx: cint;Data: Pointer):cint; cdecl; external clib name 'ioctl';
|
||||
{$endif}
|
||||
{$ifdef beos}
|
||||
Function FPSelect (N:cint;readfds,writefds,exceptfds:pfdSet;TimeOut:PTimeVal):cint; cdecl; external 'net' name 'select';
|
||||
{$else}
|
||||
|
Loading…
Reference in New Issue
Block a user