summaryrefslogtreecommitdiff
path: root/rtl/bsd
diff options
context:
space:
mode:
authormarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2008-09-15 20:01:17 +0000
committermarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2008-09-15 20:01:17 +0000
commit6b8914589e4dcceec2834b1d68d0051d4883456a (patch)
treeb3ff977d9546bb84ddcb5b780bd9faf2f00a3876 /rtl/bsd
parent0daa775f33daca02303537d307ab7bd2e290ab8d (diff)
downloadfpc-6b8914589e4dcceec2834b1d68d0051d4883456a.tar.gz
* lots of little longint() to TSysParam() fixes. Ancient code, brr.
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11790 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/bsd')
-rw-r--r--rtl/bsd/bunxsysc.inc36
-rw-r--r--rtl/bsd/ossysc.inc6
-rw-r--r--rtl/bsd/sysctl.pp2
3 files changed, 22 insertions, 22 deletions
diff --git a/rtl/bsd/bunxsysc.inc b/rtl/bsd/bunxsysc.inc
index 5784b7e1a0..3a4e8f6014 100644
--- a/rtl/bsd/bunxsysc.inc
+++ b/rtl/bsd/bunxsysc.inc
@@ -37,7 +37,7 @@ Function FPSigPending(var nset: sigset_t):cint;
signals is set in SSet
}
begin
- FPsigpending:=do_syscall(syscall_nr_sigpending,longint(@nset));
+ FPsigpending:=do_syscall(syscall_nr_sigpending,TSysParam(@nset));
end;
function FPsigsuspend(const sigmask:sigset_t):cint;
@@ -47,7 +47,7 @@ function FPsigsuspend(const sigmask:sigset_t):cint;
}
begin
- FPsigsuspend:= do_syscall(syscall_nr_sigsuspend,longint(@sigmask));
+ FPsigsuspend:= do_syscall(syscall_nr_sigsuspend,TSysParam(@sigmask));
end;
Type // implementation side for now. Should move to BSD unit.
@@ -63,13 +63,13 @@ Const ITimer_Real =0;
Function SetITimer(Which : Longint;Const value : ItimerVal; var VarOValue:ItimerVal):Longint;
Begin
- SetItimer:=Do_Syscall(syscall_nr_setitimer,Which,Longint(@Value),longint(@varovalue));
+ SetItimer:=Do_Syscall(syscall_nr_setitimer,Which,TSysParam(@Value),TSysParam(@varovalue));
End;
Function GetITimer(Which : Longint;Var value : ItimerVal):Longint;
Begin
- GetItimer:=Do_Syscall(syscall_nr_getItimer,Which,Longint(@value));
+ GetItimer:=Do_Syscall(syscall_nr_getItimer,Which,TSysParam(@value));
End;
Function FPalarm(Seconds: cuint):cuint;
@@ -225,7 +225,7 @@ function FPwait(var stat_loc:cint): pid_t;
}
begin // actually a wait4() call with 4th arg 0.
- FPWait:=do_syscall(syscall_nr_WaitPID,WAIT_ANY,longint(@Stat_loc),0,0);
+ FPWait:=do_syscall(syscall_nr_WaitPID,WAIT_ANY,TSysParam(@Stat_loc),0,0);
end;
//function FPgetpid : pid_t;
@@ -281,7 +281,7 @@ end;
function FPgetgroups(gidsetsize : cint; var grouplist:tgrparr): cint;
begin
- FPgetgroups:=do_syscall(syscall_nr_getgroups,gidsetsize,longint(@grouplist));
+ FPgetgroups:=do_syscall(syscall_nr_getgroups,gidsetsize,TSysParam(@grouplist));
end;
function FPgetpgrp : pid_t;
@@ -311,25 +311,25 @@ Function FPlink(existing:pchar;newone:pchar):cint;
In effect, new will be the same file as old.
}
begin
- FPLink:=Do_Syscall(syscall_nr_link,longint(existing),longint(newone));
+ FPLink:=Do_Syscall(syscall_nr_link,TSysParam(existing),TSysParam(newone));
end;
Function FPmkfifo(path:pchar;mode:mode_t):cint;
begin
- FPmkfifo:=do_syscall(syscall_nr_mkfifo,longint(path),longint(mode));
+ FPmkfifo:=do_syscall(syscall_nr_mkfifo,TSysParam(path),TSysParam(mode));
end;
Function FPchmod(path:pchar;mode:mode_t):cint;
begin
- FPchmod:=do_syscall(syscall_nr_chmod,longint(path),longint(mode));
+ FPchmod:=do_syscall(syscall_nr_chmod,TSysParam(path),TSysParam(mode));
end;
Function FPchown(path:pchar;owner:uid_t;group:gid_t):cint;
begin
- FPChOwn:=do_syscall(syscall_nr_chown,longint(path),longint(owner),longint(group));
+ FPChOwn:=do_syscall(syscall_nr_chown,TSysParam(path),TSysParam(owner),TSysParam(group));
end;
Function FPUtime(path:pchar;times:putimbuf):cint;
@@ -348,13 +348,13 @@ begin
tv[1].tv_usec:=0;
tvp:=@tv;
end;
- FPutime:=do_syscall(syscall_nr_utimes,longint(path),longint(tvp));
+ FPutime:=do_syscall(syscall_nr_utimes,TSysParam(path),TSysParam(tvp));
end;
Function FPpipe(var fildes : tfildes):cint;
begin
- FPpipe:=do_syscall(syscall_nr_pipe,longint(@fildes));
+ FPpipe:=do_syscall(syscall_nr_pipe,TSysParam(@fildes));
end;
function FPfcntl(fildes:cint;Cmd:cint;Arg:cint):cint;
@@ -366,7 +366,7 @@ end;
function FPfcntl(fildes:cint;Cmd:cint;var Arg:flock):cint;
begin
- FPfcntl:=do_syscall(syscall_nr_fcntl,fildes,cmd,longint(@arg));
+ FPfcntl:=do_syscall(syscall_nr_fcntl,fildes,cmd,TSysParam(@arg));
end;
function FPfcntl(fildes:cint;Cmd:cint):cint;
@@ -378,13 +378,13 @@ end;
function FPexecve(path:pchar;argv:ppchar;envp:ppchar):cint;
Begin
- FPexecve:=do_syscall(syscall_nr_Execve,longint(path),longint(argv),longint(envp));
+ FPexecve:=do_syscall(syscall_nr_Execve,TSysParam(path),TSysParam(argv),TSysParam(envp));
End;
function FPexecv(path:pchar;argv:ppchar):cint;
Begin
- FPexecv:=do_syscall(syscall_nr_Execve,longint(path),longint(argv),longint(envp));
+ FPexecv:=do_syscall(syscall_nr_Execve,TSysParam(path),TSysParam(argv),TSysParam(envp));
End;
CONST RUSAGE_SELF = 0;
@@ -393,7 +393,7 @@ CONST RUSAGE_SELF = 0;
function FPgetrusage(who:cint;var ru : rusage):cint;
begin
- FPgetrusage:=do_syscall(syscall_nr_getrusage,longint(who),longint(@ru));
+ FPgetrusage:=do_syscall(syscall_nr_getrusage,longint(who),TSysParam(@ru));
end;
function FPtimes(var buffer : tms):clock_t;
@@ -422,7 +422,7 @@ begin
exit(clock_t(-1));
buffer.tms_cutime := CONVTCK(ru.ru_utime);
buffer.tms_cstime := CONVTCK(ru.ru_stime);
- if do_syscall(syscall_nr_gettimeofday,longint(@t),0)<>0 Then
+ if do_syscall(syscall_nr_gettimeofday,TSysParam(@t),0)<>0 Then
exit(clock_t(-1));
FPtimes:=clock_t(CONVTCK(t));
end;
@@ -434,7 +434,7 @@ Function fpSelect(N:cint;readfds,writefds,exceptfds:pfdSet;TimeOut:PTimeVal):cin
}
begin
- fpSelect:=do_syscall(syscall_nr_select,n,longint(readfds),longint(writefds),longint(exceptfds),longint(timeout));
+ fpSelect:=do_syscall(syscall_nr_select,n,TSysParam(readfds),TSysParam(writefds),TSysParam(exceptfds),TSysParam(timeout));
end;
Function fpLstat(path:pchar;Info:pstat):cint;
diff --git a/rtl/bsd/ossysc.inc b/rtl/bsd/ossysc.inc
index 7f91cc144d..051d46b69a 100644
--- a/rtl/bsd/ossysc.inc
+++ b/rtl/bsd/ossysc.inc
@@ -198,7 +198,7 @@ begin
exit;
ptr^.dd_fd:=fd;
ptr^.dd_loc:=-1;
- ptr^.dd_rewind:=longint(ptr^.dd_buf);
+ ptr^.dd_rewind:=ptrint(ptr^.dd_buf);
ptr^.dd_size:=0;
// ptr^.dd_max:=sizeof(ptr^.dd_buf^);
Fpopendir:=ptr;
@@ -248,7 +248,7 @@ begin
if (dirp^.dd_buf=nil) or (dirp^.dd_loc=0) THEN
exit(nil);
if (dirp^.dd_loc=-1) OR {First readdir on this pdir. Initial fill of buffer}
- (dirp^.dd_rewind>=(longint(dirp^.dd_buf)+dirp^.dd_size)) then {no more entries left?}
+ (dirp^.dd_rewind>=(ptrint(dirp^.dd_buf)+dirp^.dd_size)) then {no more entries left?}
Begin
if readbuffer=0 then {succesful read?}
Exit(NIL); {No more data}
@@ -477,7 +477,7 @@ function FPSigProcMask(how:cint;nset : psigset;oset : psigset):cint; [public, al
}
begin
- FPsigprocmask:=do_syscall(syscall_nr_sigprocmask,longint(how),longint(nset),longint(oset));
+ FPsigprocmask:=do_syscall(syscall_nr_sigprocmask,tsysparam(how),TSysParam(nset),TSysParam(oset));
end;
{$user BLA!}
Function FpNanoSleep(req : ptimespec;rem : ptimespec) : cint; [public, alias : 'FPC_SYSC_NANOSLEEP'];
diff --git a/rtl/bsd/sysctl.pp b/rtl/bsd/sysctl.pp
index 8f35529c9f..8a63b4234f 100644
--- a/rtl/bsd/sysctl.pp
+++ b/rtl/bsd/sysctl.pp
@@ -105,7 +105,7 @@ function FPsysctl (Name: pchar; namelen:cuint; oldp:pointer;oldlenp:psize_t; new
Begin
if (name[0] <> chr(CTL_USER)) Then
- exit(do_syscall(syscall_nr___sysctl,longint(name), namelen, longint(oldp), longint(oldlenp), longint(newp), longint(newlen)))
+ exit(do_syscall(syscall_nr___sysctl,TSysParam(name), namelen, TSysParam(oldp), TSysParam(oldlenp), TSysParam(newp), TSysParam(newlen)))
else
Exit(0);
End;