mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-07 07:26:13 +02:00
* Fixes from Unix merge and changes of socketh.inc
This commit is contained in:
parent
dbe013f847
commit
f4bba8049d
@ -877,7 +877,7 @@ strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
|
||||
$(SYSTEMUNIT)$(PPUEXT)
|
||||
unix$(PPUEXT) : $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
|
||||
syscalls.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc $(SYSTEMUNIT)$(PPUEXT) \
|
||||
$(UNIXINC)/linsysca.inc
|
||||
unixsysc.inc
|
||||
dos$(PPUEXT) : $(UNIXINC)/dos.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
|
||||
unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
||||
crt$(PPUEXT) : $(UNIXINC)/crt.pp $(INC)/textrec.inc unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
||||
|
@ -131,7 +131,7 @@ strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
|
||||
|
||||
unix$(PPUEXT) : $(UNIXINC)/unix.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
|
||||
syscalls.inc systypes.inc sysconst.inc $(UNIXINC)/timezone.inc $(SYSTEMUNIT)$(PPUEXT) \
|
||||
$(UNIXINC)/linsysca.inc
|
||||
unixsysc.inc
|
||||
|
||||
|
||||
#
|
||||
|
@ -102,7 +102,7 @@ type
|
||||
PStat=^Stat;
|
||||
TStat=Stat;
|
||||
|
||||
Statfs = packed record
|
||||
TStatfs = packed record
|
||||
spare2, { place holder}
|
||||
bsize, { fundamental block size}
|
||||
iosize, { optimal block size }
|
||||
@ -120,8 +120,7 @@ type
|
||||
mountpoint : array[0..89] of char;
|
||||
mnfromname : array[0..89] of char;
|
||||
end;
|
||||
PStatFS=^StatFS;
|
||||
TStatFS=StatFS;
|
||||
PStatFS=^TStatFS;
|
||||
|
||||
fdSet=array[0..7] of longint;{=256 bits}
|
||||
pfdset=^fdset;
|
||||
@ -156,7 +155,10 @@ type
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.6 2001-06-19 08:34:16 marco
|
||||
Revision 1.7 2001-06-19 08:59:01 marco
|
||||
* Fixes from Unix merge and changes of socketh.inc
|
||||
|
||||
Revision 1.6 2001/06/19 08:34:16 marco
|
||||
* Peter didn't merge the FreeBSD directory when he merged the Unix one. Fixed
|
||||
|
||||
Revision 1.5 2001/01/20 16:52:37 marco
|
||||
|
@ -7,17 +7,17 @@ begin
|
||||
Socket:=Do_Syscall(syscall_nr_socket,Domain,SocketType,Protocol);
|
||||
end;
|
||||
|
||||
Function Send(Sock:Longint;Var Addr;AddrLen,Flags:Longint):Longint;
|
||||
Function Send(Sock:Longint;Const Buf;BufLen,Flags:Longint):Longint;
|
||||
begin
|
||||
Send:=do_syscall(syscall_nr_sendto,Sock,Longint(@Addr),AddrLen,Flags,0,0);
|
||||
Send:=do_syscall(syscall_nr_sendto,Sock,Longint(@Buf),BufLen,Flags,0,0);
|
||||
end;
|
||||
|
||||
Function Recv(Sock:Longint;Var Addr;AddrLen,Flags:Longint):Longint;
|
||||
Function Recv(Sock:Longint;Var Buf;BufLen,Flags:Longint):Longint;
|
||||
begin
|
||||
Recv:=do_syscall(syscall_nr_Recvfrom,Sock,Longint(@Addr),AddrLen,Flags,0,0);
|
||||
Recv:=do_syscall(syscall_nr_Recvfrom,Sock,Longint(@Buf),BufLen,Flags,0,0);
|
||||
end;
|
||||
|
||||
Function Bind(Sock:Longint;Var Addr;AddrLen:Longint):Boolean;
|
||||
Function Bind(Sock:Longint;Const Addr;AddrLen:Longint):Boolean;
|
||||
begin
|
||||
Bind:=(do_syscall(syscall_nr_Bind,Sock,Longint(@Addr),AddrLen)=0);
|
||||
end;
|
||||
@ -34,7 +34,7 @@ begin
|
||||
Accept:=-1;
|
||||
end;
|
||||
|
||||
Function Connect(Sock:Longint;Var Addr;Addrlen:Longint): boolean;
|
||||
Function Connect(Sock:Longint;Const Addr;Addrlen:Longint): boolean;
|
||||
|
||||
begin
|
||||
Connect:=do_syscall(syscall_nr_connect,Sock,longint(@Addr),AddrLen)=0;
|
||||
@ -61,7 +61,7 @@ end;
|
||||
|
||||
|
||||
|
||||
Function SetSocketOptions(Sock,Level,OptName:Longint;Var OptVal;optlen:longint):Longint;
|
||||
Function SetSocketOptions(Sock,Level,OptName:Longint;Const OptVal;optlen:longint):Longint;
|
||||
begin
|
||||
SetSocketOptions:=do_syscall(syscall_nr_SetSockOpt,Sock,Level,OptName,Longint(@OptVal),OptLen,0);
|
||||
end;
|
||||
|
@ -375,7 +375,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
Function FSStat(Path:Pathstr;Var Info:statfs):Boolean;
|
||||
Function StatFS(Path:Pathstr;Var Info:Tstatfs):Boolean;
|
||||
|
||||
{
|
||||
Get all information on a fileSystem, and return it in Info.
|
||||
@ -385,11 +385,11 @@ Function FSStat(Path:Pathstr;Var Info:statfs):Boolean;
|
||||
|
||||
begin
|
||||
path:=path+#0;
|
||||
FSStat:=Do_Syscall(syscall_nr_statfs,longint(@path[1]),longint(@info))=0;
|
||||
StatFS:=Do_Syscall(syscall_nr_statfs,longint(@path[1]),longint(@info))=0;
|
||||
LinuxError:=Errno;
|
||||
end;
|
||||
|
||||
Function FSStat(Fd:Longint;Var Info:statfs):Boolean;
|
||||
Function StatFS(Fd:Longint;Var Info:tstatfs):Boolean;
|
||||
{
|
||||
Get all information on a fileSystem, and return it in Info.
|
||||
Fd is the file descriptor of a file/directory on the fileSystem
|
||||
@ -397,7 +397,7 @@ Function FSStat(Fd:Longint;Var Info:statfs):Boolean;
|
||||
}
|
||||
|
||||
begin
|
||||
FSStat:=do_syscall(syscall_nr_fstatfs,fd,longint(@info))=0;
|
||||
StatFS:=do_syscall(syscall_nr_fstatfs,fd,longint(@info))=0;
|
||||
LinuxError:=Errno;
|
||||
end;
|
||||
|
||||
@ -748,7 +748,10 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.2 2001-06-02 00:31:30 peter
|
||||
Revision 1.3 2001-06-19 08:59:01 marco
|
||||
* Fixes from Unix merge and changes of socketh.inc
|
||||
|
||||
Revision 1.2 2001/06/02 00:31:30 peter
|
||||
* merge unix updates from the 1.0 branch, mostly related to the
|
||||
solaris target
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user