diff options
4 files changed, 30 insertions, 100 deletions
diff --git a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.amigaos.c.p b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.amigaos.c.p index 5243fc5..1c3293b 100644 --- a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.amigaos.c.p +++ b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.amigaos.c.p @@ -1,20 +1,33 @@ ---- lib/amigaos.c 2019-03-25 08:42:50.000000000 +0000 -+++ lib/amigaos.c 2019-03-30 12:49:06.680985341 +0000 -@@ -24,7 +24,7 @@ +--- lib/amigaos.c.orig 2017-10-10 15:19:45.611896396 +0100 ++++ lib/amigaos.c 2017-10-17 15:42:25.304921197 +0100 +@@ -86,7 +86,9 @@ + ULONG enabled = 0; - #ifdef __AMIGA__ - # include "amigaos.h" --# if defined(HAVE_PROTO_BSDSOCKET_H) && !defined(USE_AMISSL) -+# if 0 - # include <amitcp/socketbasetags.h> - # endif - # ifdef __libnix__ -@@ -37,7 +37,7 @@ - #include "memdebug.h" + SocketBaseTags(SBTM_SETVAL(SBTC_CAN_SHARE_LIBRARY_BASES), TRUE, ++#ifdef SBTC_HAVE_GETHOSTADDR_R_API + SBTM_GETREF(SBTC_HAVE_GETHOSTADDR_R_API), (ULONG)&enabled, ++#endif + TAG_DONE); - #ifdef __AMIGA__ --#if defined(HAVE_PROTO_BSDSOCKET_H) && !defined(USE_AMISSL) -+#if 0 - struct Library *SocketBase = NULL; - extern int errno, h_errno; + if(enabled) { +@@ -132,20 +134,6 @@ + struct SocketIFace *ISocket = __CurlISocket; + if(SocketFeatures & HAVE_BSDSOCKET_GETHOSTBYNAME_R) { +- LONG h_errnop = 0; +- struct hostent *buf; +- +- buf = calloc(1, CURL_HOSTENT_SIZE); +- if(buf) { +- h = gethostbyname_r((STRPTR)hostname, buf, +- (char *)buf + sizeof(struct hostent), +- CURL_HOSTENT_SIZE - sizeof(struct hostent), +- &h_errnop); +- if(h) { +- ai = Curl_he2ai(h, port); +- } +- free(buf); +- } + } + else { + #ifdef CURLRES_THREADED diff --git a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.amigaos.h.p b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.amigaos.h.p deleted file mode 100644 index 2f62a1c..0000000 --- a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.amigaos.h.p +++ /dev/null @@ -1,11 +0,0 @@ ---- lib/amigaos.h 2019-03-25 08:42:50.000000000 +0000 -+++ lib/amigaos.h 2019-03-30 12:49:50.744493740 +0000 -@@ -23,7 +23,7 @@ - ***************************************************************************/ - #include "curl_setup.h" - --#if defined(__AMIGA__) && defined(HAVE_BSDSOCKET_H) && !defined(USE_AMISSL) -+#if 0 - - bool Curl_amiga_init(); - void Curl_amiga_cleanup(); diff --git a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.curl_setup.h.p b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.curl_setup.h.p deleted file mode 100644 index 0e52d73..0000000 --- a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.curl_setup.h.p +++ /dev/null @@ -1,12 +0,0 @@ ---- lib/curl_setup.h 2019-03-30 13:44:08.576270700 +0000 -+++ lib/curl_setup.h 2019-03-30 13:44:33.011975643 +0000 -@@ -314,7 +314,8 @@ - # include <exec/execbase.h> - # include <proto/exec.h> - # include <proto/dos.h> --# ifdef HAVE_PROTO_BSDSOCKET_H -+# define HAVE_SELECT 1 -+# if 0 - # include <proto/bsdsocket.h> /* ensure bsdsocket.library use */ - # define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0) - # endif diff --git a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p deleted file mode 100644 index 39952b8..0000000 --- a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p +++ /dev/null @@ -1,60 +0,0 @@ ---- lib/hostip4.c 2020-01-05 09:50:51.000000000 +0000 -+++ lib/hostip4.c 2020-05-07 16:02:59.313823259 +0100 -@@ -120,6 +120,10 @@ Curl_addrinfo *Curl_getaddrinfo(struct c - * implying that only threadsafe code and function calls may be used. - * - */ -+#ifdef __amigaos4__ -+#include <proto/exec.h> -+#include <proto/bsdsocket.h> -+#endif - Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, - int port) - { -@@ -130,6 +134,9 @@ Curl_addrinfo *Curl_ipv4_resolve_r(const - struct hostent *h = NULL; - struct in_addr in; - struct hostent *buf = NULL; -+#ifdef __amigaos4__ -+ struct SocketIFace *ISocket = NULL; -+#endif - - #ifdef ENABLE_IPV6 - { -@@ -302,7 +309,20 @@ Curl_addrinfo *Curl_ipv4_resolve_r(const - * gethostbyname() is the preferred one. - */ - else { -+#ifdef __amigaos4__ -+ struct Library *SocketBase = IExec->OpenLibrary("bsdsocket.library", 4); -+ if (SocketBase) -+ { -+ ISocket = (struct SocketIFace *)IExec->GetInterface(SocketBase, "main", 1, NULL); -+ } -+ -+ if (ISocket) -+ { -+ h = ISocket->gethostbyname((void*)hostname); -+ } -+#else - h = gethostbyname((void *)hostname); -+#endif - #endif /* HAVE_GETADDRINFO_THREADSAFE || HAVE_GETHOSTBYNAME_R */ - } - -@@ -312,7 +332,14 @@ Curl_addrinfo *Curl_ipv4_resolve_r(const - if(buf) /* used a *_r() function */ - free(buf); - } -- -+#ifdef __amigaos4__ -+ if (ISocket) -+ { -+ struct Library *SocketBase = ISocket->Data.LibBase; -+ IExec->DropInterface((struct Interface *)ISocket); -+ IExec->CloseLibrary(SocketBase); -+ } -+#endif - return ai; - } - #endif /* defined(CURLRES_IPV4) && !defined(CURLRES_ARES) */ |