MorphOS: enabled sockets unit, and a bunch of network-related packages which depends on it

* this brings MorphOS to the same level of network package support as classic Amiga and AROS

git-svn-id: trunk@30990 -
This commit is contained in:
Károly Balogh 2015-06-06 01:45:57 +00:00
parent 96228327f8
commit 5955e67c83
8 changed files with 20 additions and 19 deletions

View File

@ -24,7 +24,7 @@ begin
P.Email := ''; P.Email := '';
P.Description := 'FastCGI header translation to Pascal'; P.Description := 'FastCGI header translation to Pascal';
P.NeedLibC:= false; P.NeedLibC:= false;
P.OSes := AllUnixOSes+AllWindowsOSes-[qnx]+[amiga,aros]; P.OSes := AllUnixOSes+AllWindowsOSes+AllAmigaLikeOSes-[qnx];
P.SourcePath.Add('src'); P.SourcePath.Add('src');

View File

@ -19,7 +19,7 @@ begin
{$endif ALLPACKAGES} {$endif ALLPACKAGES}
P.Version:='3.1.1'; P.Version:='3.1.1';
P.Dependencies.Add('fcl-base'); P.Dependencies.Add('fcl-base');
P.Dependencies.Add('openssl',AllOSes - [amiga,aros]); P.Dependencies.Add('openssl',AllOSes - AllAmigaLikeOSes);
P.Dependencies.Add('fcl-xml'); P.Dependencies.Add('fcl-xml');
P.Dependencies.Add('fcl-passrc'); P.Dependencies.Add('fcl-passrc');
P.Dependencies.Add('fcl-async',[linux,freebsd,netbsd,openbsd,dragonfly]); P.Dependencies.Add('fcl-async',[linux,freebsd,netbsd,openbsd,dragonfly]);
@ -37,18 +37,19 @@ begin
P.IncludePath.Add('src/unix',AllUnixOSes); P.IncludePath.Add('src/unix',AllUnixOSes);
P.IncludePath.Add('src/win',AllWindowsOSes); P.IncludePath.Add('src/win',AllWindowsOSes);
P.IncludePath.Add('src/os2',[EMX]); P.IncludePath.Add('src/os2',[EMX]);
P.IncludePath.Add('src/amiga',[morphos]);
P.IncludePath.Add('src/$(OS)',AllOSes-AllWindowsOSes-AllUnixOSes-[EMX]); P.IncludePath.Add('src/$(OS)',AllOSes-AllWindowsOSes-AllUnixOSes-[EMX]);
// IP and Sockets // IP and Sockets
T:=P.Targets.AddUnit('netdb.pp',AllUnixOSes); T:=P.Targets.AddUnit('netdb.pp',AllUnixOSes);
T:=P.Targets.AddUnit('resolve.pp',AllUnixOSes+AllWindowsOSes+[OS2,EMX,amiga,aros]); T:=P.Targets.AddUnit('resolve.pp',AllUnixOSes+AllWindowsOSes+AllAmigaLikeOSes+[OS2,EMX]);
with T.Dependencies do with T.Dependencies do
begin begin
AddInclude('resolve.inc'); AddInclude('resolve.inc');
AddUnit('netdb',AllUnixOSes); AddUnit('netdb',AllUnixOSes);
end; end;
T.ResourceStrings := True; T.ResourceStrings := True;
T:=P.Targets.AddUnit('ssockets.pp',AllUnixOSes+AllWindowsOSes+[OS2,EMX, amiga,aros]); T:=P.Targets.AddUnit('ssockets.pp',AllUnixOSes+AllWindowsOSes+AllAmigaLikeOSes+[OS2,EMX]);
with T.Dependencies do with T.Dependencies do
begin begin
AddUnit('resolve'); AddUnit('resolve');

View File

@ -474,7 +474,7 @@ var
begin begin
{$if defined(unix)} {$if defined(unix)}
fpShutdown(FSocket,SHUT_RDWR); fpShutdown(FSocket,SHUT_RDWR);
{$elseif defined(mswindows) or defined(aros) or defined(amiga)} {$elseif defined(mswindows) or defined(hasamiga)}
CloseSocket(FSocket); CloseSocket(FSocket);
{$else} {$else}
{$WARNING Method Abort is not tested on this platform!} {$WARNING Method Abort is not tested on this platform!}

View File

@ -18,7 +18,7 @@ begin
P.Directory:=ADirectory; P.Directory:=ADirectory;
{$endif ALLPACKAGES} {$endif ALLPACKAGES}
P.Version:='3.1.1'; P.Version:='3.1.1';
P.OSes := [beos,haiku,freebsd,darwin,iphonesim,solaris,netbsd,openbsd,linux,win32,win64,wince,aix,amiga,aros,dragonfly]; P.OSes := [beos,haiku,freebsd,darwin,iphonesim,solaris,netbsd,openbsd,linux,win32,win64,wince,aix,amiga,aros,morphos,dragonfly];
P.Dependencies.Add('fcl-base'); P.Dependencies.Add('fcl-base');
P.Dependencies.Add('fcl-db'); P.Dependencies.Add('fcl-db');
P.Dependencies.Add('fcl-xml'); P.Dependencies.Add('fcl-xml');
@ -26,8 +26,8 @@ begin
P.Dependencies.Add('fcl-net'); P.Dependencies.Add('fcl-net');
P.Dependencies.Add('fcl-process'); P.Dependencies.Add('fcl-process');
P.Dependencies.Add('fastcgi'); P.Dependencies.Add('fastcgi');
P.Dependencies.Add('httpd22', AllOses - [amiga,aros]); P.Dependencies.Add('httpd22', AllOses - [amiga,aros,morphos]);
P.Dependencies.Add('httpd24', AllOses - [amiga,aros]); P.Dependencies.Add('httpd24', AllOses - [amiga,aros,morphos]);
// (Temporary) indirect dependencies, not detected by fpcmake: // (Temporary) indirect dependencies, not detected by fpcmake:
P.Dependencies.Add('univint',[MacOSX,iphonesim]); P.Dependencies.Add('univint',[MacOSX,iphonesim]);
@ -123,12 +123,12 @@ begin
end; end;
with P.Targets.AddUnit('fpfcgi.pp') do with P.Targets.AddUnit('fpfcgi.pp') do
begin begin
OSes:=AllOses-[wince,darwin,iphonesim,aix,amiga,aros]; OSes:=AllOses-[wince,darwin,iphonesim,aix,amiga,aros,morphos];
Dependencies.AddUnit('custfcgi'); Dependencies.AddUnit('custfcgi');
end; end;
with P.Targets.AddUnit('custfcgi.pp') do with P.Targets.AddUnit('custfcgi.pp') do
begin begin
OSes:=AllOses-[wince,darwin,iphonesim,aix,amiga,aros]; OSes:=AllOses-[wince,darwin,iphonesim,aix,amiga,aros,morphos];
Dependencies.AddUnit('httpprotocol'); Dependencies.AddUnit('httpprotocol');
Dependencies.AddUnit('cgiprotocol'); Dependencies.AddUnit('cgiprotocol');
Dependencies.AddUnit('custcgi'); Dependencies.AddUnit('custcgi');
@ -138,7 +138,7 @@ begin
end; end;
with P.Targets.AddUnit('fpapache.pp') do with P.Targets.AddUnit('fpapache.pp') do
begin begin
OSes:=AllOses-[amiga,aros]; OSes:=AllOses-[amiga,aros,morphos];
Dependencies.AddUnit('httpprotocol'); Dependencies.AddUnit('httpprotocol');
Dependencies.AddUnit('fphttp'); Dependencies.AddUnit('fphttp');
Dependencies.AddUnit('custweb'); Dependencies.AddUnit('custweb');
@ -146,7 +146,7 @@ begin
end; end;
with P.Targets.AddUnit('fpapache24.pp') do with P.Targets.AddUnit('fpapache24.pp') do
begin begin
OSes:=AllOses-[amiga,aros]; OSes:=AllOses-[amiga,aros,morphos];
Dependencies.AddUnit('fphttp'); Dependencies.AddUnit('fphttp');
Dependencies.AddUnit('custweb'); Dependencies.AddUnit('custweb');
ResourceStrings:=true; ResourceStrings:=true;

View File

@ -281,7 +281,7 @@ Function EncodeURLElement(S : String) : String;
Function DecodeURLElement(Const S : String) : String; Function DecodeURLElement(Const S : String) : String;
implementation implementation
{$if not defined(aros) and not defined(amiga)} {$if not defined(hasamiga)}
uses sslsockets; uses sslsockets;
{$endif} {$endif}
@ -433,7 +433,7 @@ begin
if Assigned(FonGetSocketHandler) then if Assigned(FonGetSocketHandler) then
FOnGetSocketHandler(Self,UseSSL,Result); FOnGetSocketHandler(Self,UseSSL,Result);
if (Result=Nil) then if (Result=Nil) then
{$if not defined(AROS) and not defined(Amiga)} {$if not defined(HASAMIGA)}
If UseSSL then If UseSSL then
Result:=TSSLSocketHandler.Create Result:=TSSLSocketHandler.Create
else else

View File

@ -30,7 +30,7 @@ begin
P.Email := ''; P.Email := '';
P.Description := 'Google API client libraries.'; P.Description := 'Google API client libraries.';
P.NeedLibC:= false; P.NeedLibC:= false;
P.OSes := [beos,haiku,freebsd,darwin,iphonesim,solaris,netbsd,openbsd,linux,win32,win64,wince,aix,amiga,aros,dragonfly]; P.OSes := [beos,haiku,freebsd,darwin,iphonesim,solaris,netbsd,openbsd,linux,win32,win64,wince,aix,amiga,aros,morphos,dragonfly];
P.Directory:=ADirectory; P.Directory:=ADirectory;
P.Version:='3.1.1'; P.Version:='3.1.1';
P.Dependencies.Add('fcl-base'); P.Dependencies.Add('fcl-base');

View File

@ -27,8 +27,7 @@ Const
ObjectsOSes = [amiga,aros,emx,gba,go32v2,morphos,msdos,nds,netware,netwlibc,os2,win32,win64,wince]+UnixLikes; ObjectsOSes = [amiga,aros,emx,gba,go32v2,morphos,msdos,nds,netware,netwlibc,os2,win32,win64,wince]+UnixLikes;
WinsockOSes = [win32,win64,wince,os2,emx,netware,netwlibc]; WinsockOSes = [win32,win64,wince,os2,emx,netware,netwlibc];
WinSock2OSes = [win32,win64,wince]; WinSock2OSes = [win32,win64,wince];
// sockets of morphos is implemented, but not active SocketsOSes = UnixLikes+AllAmigaLikeOSes+[netware,netwlibc,os2,wince,win32,win64];
SocketsOSes = UnixLikes+[amiga,aros,netware,netwlibc,os2,wince,win32,win64];
Socksyscall = [beos,freebsd,haiku,linux,netbsd,openbsd,dragonfly]; Socksyscall = [beos,freebsd,haiku,linux,netbsd,openbsd,dragonfly];
Socklibc = unixlikes-socksyscall; Socklibc = unixlikes-socksyscall;
gpmOSes = [Linux,Android]; gpmOSes = [Linux,Android];

View File

@ -80,7 +80,8 @@ const
pseudo_AF_PIP = 25; {* Help Identify PIP packets *} pseudo_AF_PIP = 25; {* Help Identify PIP packets *}
AF_MAX = 26; AF_MAX = 26;
SO_LINGER = $0080;
SOL_SOCKET = $FFFF;
const const
EsockEINTR = 4; // EsysEINTR; EsockEINTR = 4; // EsysEINTR;
@ -120,12 +121,12 @@ function bsd_recvfrom(s : LongInt location 'd0'; buf : pChar location 'a0'; len
function bsd_recv(s : LongInt location 'd0'; buf : pChar location 'a0'; len : LongInt location 'd1'; flags : LongInt location 'd2') : LongInt; syscall legacy SocketBase 078; function bsd_recv(s : LongInt location 'd0'; buf : pChar location 'a0'; len : LongInt location 'd1'; flags : LongInt location 'd2') : LongInt; syscall legacy SocketBase 078;
function bsd_shutdown(s : LongInt location 'd0'; how : LongInt location 'd1') : LongInt; syscall legacy SocketBase 084; function bsd_shutdown(s : LongInt location 'd0'; how : LongInt location 'd1') : LongInt; syscall legacy SocketBase 084;
function bsd_closesocket(d : LongInt location 'd0') : LongInt; syscall legacy SocketBase 120; function bsd_closesocket(d : LongInt location 'd0') : LongInt; syscall legacy SocketBase 120;
function bsd_Errno: LongInt; syscall SocketBase 162;
function bsd_inet_ntoa(in_ : DWord location 'd0') : pChar; syscall legacy SocketBase 174; function bsd_inet_ntoa(in_ : DWord location 'd0') : pChar; syscall legacy SocketBase 174;
function bsd_inet_addr(const cp : pChar location 'a0') : DWord; syscall legacy SocketBase 180; function bsd_inet_addr(const cp : pChar location 'a0') : DWord; syscall legacy SocketBase 180;
function bsd_gethostbyname(const name : pChar location 'a0') : phostent; syscall legacy SocketBase 210; function bsd_gethostbyname(const name : pChar location 'a0') : phostent; syscall legacy SocketBase 210;
function bsd_gethostbyaddr(const addr : pChar location 'a0'; len : LongInt location 'd0'; type_ : LongInt location 'd1') : phostent; syscall legacy SocketBase 216; function bsd_gethostbyaddr(const addr : pChar location 'a0'; len : LongInt location 'd0'; type_ : LongInt location 'd1') : phostent; syscall legacy SocketBase 216;
Implementation Implementation
//Uses {$ifndef FPC_USE_LIBC}SysCall{$else}initc{$endif}; //Uses {$ifndef FPC_USE_LIBC}SysCall{$else}initc{$endif};