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.Description := 'FastCGI header translation to Pascal';
P.NeedLibC:= false;
P.OSes := AllUnixOSes+AllWindowsOSes-[qnx]+[amiga,aros];
P.OSes := AllUnixOSes+AllWindowsOSes+AllAmigaLikeOSes-[qnx];
P.SourcePath.Add('src');

View File

@ -19,7 +19,7 @@ begin
{$endif ALLPACKAGES}
P.Version:='3.1.1';
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-passrc');
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/win',AllWindowsOSes);
P.IncludePath.Add('src/os2',[EMX]);
P.IncludePath.Add('src/amiga',[morphos]);
P.IncludePath.Add('src/$(OS)',AllOSes-AllWindowsOSes-AllUnixOSes-[EMX]);
// IP and Sockets
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
begin
AddInclude('resolve.inc');
AddUnit('netdb',AllUnixOSes);
end;
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
begin
AddUnit('resolve');

View File

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

View File

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

View File

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

View File

@ -30,7 +30,7 @@ begin
P.Email := '';
P.Description := 'Google API client libraries.';
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.Version:='3.1.1';
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;
WinsockOSes = [win32,win64,wince,os2,emx,netware,netwlibc];
WinSock2OSes = [win32,win64,wince];
// sockets of morphos is implemented, but not active
SocketsOSes = UnixLikes+[amiga,aros,netware,netwlibc,os2,wince,win32,win64];
SocketsOSes = UnixLikes+AllAmigaLikeOSes+[netware,netwlibc,os2,wince,win32,win64];
Socksyscall = [beos,freebsd,haiku,linux,netbsd,openbsd,dragonfly];
Socklibc = unixlikes-socksyscall;
gpmOSes = [Linux,Android];

View File

@ -80,7 +80,8 @@ const
pseudo_AF_PIP = 25; {* Help Identify PIP packets *}
AF_MAX = 26;
SO_LINGER = $0080;
SOL_SOCKET = $FFFF;
const
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_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_Errno: LongInt; syscall SocketBase 162;
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_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;
Implementation
//Uses {$ifndef FPC_USE_LIBC}SysCall{$else}initc{$endif};