From ce286ecc2626c736b2776a6983fd1f3811e231ae Mon Sep 17 00:00:00 2001 From: Chris Young Date: Thu, 30 Jan 2014 10:26:33 +0000 Subject: Initial threaded resolver patch from kas1e --- .../patches/libcurl/ppc-amigaos/lib.hostip4.c.p | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p (limited to 'sdk') diff --git a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p new file mode 100644 index 0000000..c663716 --- /dev/null +++ b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p @@ -0,0 +1,61 @@ +--- curl_orig/lib/hostip4.c 2013-10-23 21:55:34.000000000 +0100 ++++ curl/lib/hostip4.c 2014-01-30 10:19:46.900018967 +0000 +@@ -122,6 +122,11 @@ Curl_addrinfo *Curl_getaddrinfo(struct c + * implying that only threadsafe code and function calls may be used. + * + */ ++#ifdef __amigaos4__ ++#include ++#include ++#endif ++ + Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, + int port) + { +@@ -132,6 +137,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 + + if(Curl_inet_pton(AF_INET, hostname, &in) > 0) + /* This is a dotted IP address 123.123.123.123-style */ +@@ -294,7 +302,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 */ + } + +@@ -304,7 +325,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) */ -- cgit v1.2.3 From 2d5b184d470110989f18d92fe4336d74ff4a1c57 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Thu, 30 Jan 2014 10:29:17 +0000 Subject: Enable threaded resolver for ppc-amigaos target --- sdk/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sdk') diff --git a/sdk/Makefile b/sdk/Makefile index 2b1ba8f..e63dd99 100644 --- a/sdk/Makefile +++ b/sdk/Makefile @@ -114,7 +114,7 @@ endif ifeq ($(TARGET),ppc-amigaos) SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, libiconv.d libtre.d libpbl.d spidermonkey.d $(COMMON_SDK_ITEMS)) EXTRAARGS_LIBCARES := --disable-shared - EXTRAARGS_LIBCURL := --disable-ntlm-wb --without-random + EXTRAARGS_LIBCURL := --disable-ntlm-wb --without-random --enable-threaded-resolver VERSION_SPIDERMONKEY := 1.7.0 endif -- cgit v1.2.3 From f41a278839fd3032eff8b070805b19ba1e9f4fd3 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Thu, 30 Jan 2014 10:34:58 +0000 Subject: Correct patch header --- sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sdk') diff --git a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p index c663716..9a2b590 100644 --- a/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p +++ b/sdk/recipes/patches/libcurl/ppc-amigaos/lib.hostip4.c.p @@ -1,5 +1,5 @@ ---- curl_orig/lib/hostip4.c 2013-10-23 21:55:34.000000000 +0100 -+++ curl/lib/hostip4.c 2014-01-30 10:19:46.900018967 +0000 +--- lib/hostip4.c 2013-10-23 21:55:34.000000000 +0100 ++++ lib/hostip4.c 2014-01-30 10:19:46.900018967 +0000 @@ -122,6 +122,11 @@ Curl_addrinfo *Curl_getaddrinfo(struct c * implying that only threadsafe code and function calls may be used. * -- cgit v1.2.3 From aa29618e0f90f1ac1ae574397b768ed62685e2be Mon Sep 17 00:00:00 2001 From: Chris Young Date: Tue, 4 Feb 2014 23:43:44 +0000 Subject: Use pthreads --- sdk/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sdk') diff --git a/sdk/Makefile b/sdk/Makefile index e63dd99..2f67241 100644 --- a/sdk/Makefile +++ b/sdk/Makefile @@ -114,7 +114,7 @@ endif ifeq ($(TARGET),ppc-amigaos) SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, libiconv.d libtre.d libpbl.d spidermonkey.d $(COMMON_SDK_ITEMS)) EXTRAARGS_LIBCARES := --disable-shared - EXTRAARGS_LIBCURL := --disable-ntlm-wb --without-random --enable-threaded-resolver + EXTRAARGS_LIBCURL := --disable-ntlm-wb --without-random --enable-threaded-resolver LDFLAGS=-lpthread VERSION_SPIDERMONKEY := 1.7.0 endif -- cgit v1.2.3 From 2f8c4f59e4d9b988b7b92c56db96b3e24d8caa8a Mon Sep 17 00:00:00 2001 From: Chris Young Date: Tue, 4 Feb 2014 23:51:26 +0000 Subject: Use the correct variable --- sdk/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sdk') diff --git a/sdk/Makefile b/sdk/Makefile index 2f67241..cff1247 100644 --- a/sdk/Makefile +++ b/sdk/Makefile @@ -114,7 +114,7 @@ endif ifeq ($(TARGET),ppc-amigaos) SDK_ITEMS := $(addprefix $(BUILDSTEPS)/, libiconv.d libtre.d libpbl.d spidermonkey.d $(COMMON_SDK_ITEMS)) EXTRAARGS_LIBCARES := --disable-shared - EXTRAARGS_LIBCURL := --disable-ntlm-wb --without-random --enable-threaded-resolver LDFLAGS=-lpthread + EXTRAARGS_LIBCURL := --disable-ntlm-wb --without-random --enable-threaded-resolver LIBS=-lpthread VERSION_SPIDERMONKEY := 1.7.0 endif -- cgit v1.2.3 From 3f005e99fb37363ae17de1ebec9c166ccfd48b6e Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 8 Feb 2014 11:30:34 +0000 Subject: Try to ensure Spidermonkey install won't fail --- sdk/recipes/patches/spidermonkey/ppc-amigaos-1.7.0/Makefile.ref.p | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sdk') diff --git a/sdk/recipes/patches/spidermonkey/ppc-amigaos-1.7.0/Makefile.ref.p b/sdk/recipes/patches/spidermonkey/ppc-amigaos-1.7.0/Makefile.ref.p index 9de3033..482907b 100644 --- a/sdk/recipes/patches/spidermonkey/ppc-amigaos-1.7.0/Makefile.ref.p +++ b/sdk/recipes/patches/spidermonkey/ppc-amigaos-1.7.0/Makefile.ref.p @@ -428,9 +428,9 @@ + $(CC) $(CFLAGS) -c $< -o $@ + +export: -+ $(MKDIR) $(JS_DIST)/include/js -+ $(CP) libjs.a $(JS_DIST)/lib -+ $(CP) *.h $(JS_DIST)/include/js -+ $(CP) *.tbl $(JS_DIST)/include/js ++ $(MKDIR) -p $(JS_DIST)/include/js ++ $(CP) -f libjs.a $(JS_DIST)/lib ++ $(CP) -f *.h $(JS_DIST)/include/js ++ $(CP) -f *.tbl $(JS_DIST)/include/js + -- cgit v1.2.3